1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-02 04:42:10 +00:00

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.
This commit is contained in:
wm4 2017-07-04 14:06:14 +02:00
parent 46dc15a220
commit bd356333c7
2 changed files with 4 additions and 0 deletions

View File

@ -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,

View File

@ -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,