diff options
author | wm4 <wm4@nowhere> | 2017-07-04 14:06:14 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-07-04 14:06:31 +0200 |
commit | bd356333c71352e44c89757ee65637448fcb2757 (patch) | |
tree | 39c3fc4a0b5783ad40ed8dd8fbc4fd9e7bdd7f2a | |
parent | 46dc15a220212326bf691fa142d7ffa5e7072de7 (diff) | |
download | mpv-bd356333c71352e44c89757ee65637448fcb2757.tar.bz2 mpv-bd356333c71352e44c89757ee65637448fcb2757.tar.xz |
d3d: fix behavior with deprecated FFmpeg J pixel formats
They have been deprecated for a decade, yet you're forced to explicitly
deal with them at every step, or they will break your shit.
FFmpeg insists on keeping them, because libavfilter is too stupid to
deal with color ranges properly. Ridiculous.
-rw-r--r-- | video/decode/hw_d3d11va.c | 2 | ||||
-rw-r--r-- | video/decode/hw_dxva2.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/video/decode/hw_d3d11va.c b/video/decode/hw_d3d11va.c index b75960945d..d191c955f9 100644 --- a/video/decode/hw_d3d11va.c +++ b/video/decode/hw_d3d11va.c @@ -658,6 +658,7 @@ const struct vd_lavc_hwdec mp_vd_lavc_d3d11va = { .pixfmt_map = (const enum AVPixelFormat[][2]) { {AV_PIX_FMT_YUV420P10, AV_PIX_FMT_P010}, {AV_PIX_FMT_YUV420P, AV_PIX_FMT_NV12}, + {AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_NV12}, {AV_PIX_FMT_NONE} }, }; @@ -674,6 +675,7 @@ const struct vd_lavc_hwdec mp_vd_lavc_d3d11va_copy = { .pixfmt_map = (const enum AVPixelFormat[][2]) { {AV_PIX_FMT_YUV420P10, AV_PIX_FMT_P010}, {AV_PIX_FMT_YUV420P, AV_PIX_FMT_NV12}, + {AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_NV12}, {AV_PIX_FMT_NONE} }, .delay_queue = HWDEC_DELAY_QUEUE_COUNT, diff --git a/video/decode/hw_dxva2.c b/video/decode/hw_dxva2.c index 65b76c6b9a..eef1ebfcb4 100644 --- a/video/decode/hw_dxva2.c +++ b/video/decode/hw_dxva2.c @@ -698,6 +698,7 @@ const struct vd_lavc_hwdec mp_vd_lavc_dxva2 = { .pixfmt_map = (const enum AVPixelFormat[][2]) { {AV_PIX_FMT_YUV420P10, AV_PIX_FMT_P010}, {AV_PIX_FMT_YUV420P, AV_PIX_FMT_NV12}, + {AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_NV12}, {AV_PIX_FMT_NONE} }, }; @@ -714,6 +715,7 @@ const struct vd_lavc_hwdec mp_vd_lavc_dxva2_copy = { .pixfmt_map = (const enum AVPixelFormat[][2]) { {AV_PIX_FMT_YUV420P10, AV_PIX_FMT_P010}, {AV_PIX_FMT_YUV420P, AV_PIX_FMT_NV12}, + {AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_NV12}, {AV_PIX_FMT_NONE} }, .delay_queue = HWDEC_DELAY_QUEUE_COUNT, |