diff options
author | wm4 <wm4@nowhere> | 2017-10-31 14:14:45 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-10-31 14:14:45 +0100 |
commit | 078a3ed996f6bd4cfaf1e277347057cf1fcc46c5 (patch) | |
tree | 4b45f9649db89aa441be4fd0ce24dde028281f0d | |
parent | ff093e5b7816f6e23fd6d4e9e4f9f54444ad63ac (diff) | |
download | mpv-078a3ed996f6bd4cfaf1e277347057cf1fcc46c5.tar.bz2 mpv-078a3ed996f6bd4cfaf1e277347057cf1fcc46c5.tar.xz |
d3d: remove some legacy code
See #5062.
-rw-r--r-- | video/decode/d3d.c | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/video/decode/d3d.c b/video/decode/d3d.c index a40cc90f7d..bdc907bd71 100644 --- a/video/decode/d3d.c +++ b/video/decode/d3d.c @@ -80,7 +80,6 @@ bool d3d11_check_decoding(ID3D11Device *dev) return !FAILED(hr) && (supported & D3D11_BIND_DECODER); } -#if HAVE_AVCODEC_HW_FRAMES_PARAMS void d3d_hwframes_refine(struct lavc_ctx *ctx, AVBufferRef *hw_frames_ctx) { AVHWFramesContext *fctx = (void *)hw_frames_ctx->data; @@ -91,47 +90,6 @@ void d3d_hwframes_refine(struct lavc_ctx *ctx, AVBufferRef *hw_frames_ctx) hwctx->BindFlags |= D3D11_BIND_SHADER_RESOURCE; } } -#else -void d3d_hwframes_refine(struct lavc_ctx *ctx, AVBufferRef *hw_frames_ctx) -{ - AVHWFramesContext *fctx = (void *)hw_frames_ctx->data; - - int alignment = 16; - switch (ctx->avctx->codec_id) { - // decoding MPEG-2 requires additional alignment on some Intel GPUs, but it - // causes issues for H.264 on certain AMD GPUs..... - case AV_CODEC_ID_MPEG2VIDEO: - alignment = 32; - break; - // the HEVC DXVA2 spec asks for 128 pixel aligned surfaces to ensure - // all coding features have enough room to work with - case AV_CODEC_ID_HEVC: - alignment = 128; - break; - } - fctx->width = FFALIGN(fctx->width, alignment); - fctx->height = FFALIGN(fctx->height, alignment); - -#if HAVE_D3D9_HWACCEL - if (fctx->format == AV_PIX_FMT_DXVA2_VLD) { - AVDXVA2FramesContext *hwctx = fctx->hwctx; - - hwctx->surface_type = DXVA2_VideoDecoderRenderTarget; - } -#endif - - if (fctx->format == AV_PIX_FMT_D3D11) { - AVD3D11VAFramesContext *hwctx = fctx->hwctx; - - hwctx->BindFlags |= D3D11_BIND_DECODER; - - // According to hwcontex_d3d11va.h, yuv420p means DXGI_FORMAT_420_OPAQUE, - // which has no shader support. - if (fctx->sw_format != AV_PIX_FMT_YUV420P) - hwctx->BindFlags |= D3D11_BIND_SHADER_RESOURCE; - } -} -#endif AVBufferRef *d3d11_wrap_device_ref(ID3D11Device *device) { |