[FFmpeg-devel] [PATCH] libavutil/hwcontext_d3d11va: Support Y212/XV36 pixel format
fei.w.wang at intel.com
fei.w.wang at intel.com
Thu Oct 31 14:45:11 EET 2024
From: Fei Wang <fei.w.wang at intel.com>
Use DXGI 16bit pixel format to compatible with 12bit Y212/XV36 since
there is no 12bit pixel defined in D3D11.
Fix cmdline on Windows:
$ ffmpeg.exe -hwaccel qsv -i input_12bit.bin -f null -
Signed-off-by: Fei Wang <fei.w.wang at intel.com>
---
libavutil/hwcontext_d3d11va.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavutil/hwcontext_d3d11va.c b/libavutil/hwcontext_d3d11va.c
index 9d81effe5e..2cde44af8e 100644
--- a/libavutil/hwcontext_d3d11va.c
+++ b/libavutil/hwcontext_d3d11va.c
@@ -104,6 +104,10 @@ static const struct {
{ DXGI_FORMAT_P016, AV_PIX_FMT_P012 },
{ DXGI_FORMAT_Y216, AV_PIX_FMT_Y216 },
{ DXGI_FORMAT_Y416, AV_PIX_FMT_XV48 },
+ // There is no 12bit pixel format defined in D3D11, use 16bit to compatible
+ // with 12 bit AV_PIX_FMT* formats.
+ { DXGI_FORMAT_Y216, AV_PIX_FMT_Y212 },
+ { DXGI_FORMAT_Y416, AV_PIX_FMT_XV36 },
// Special opaque formats. The pix_fmt is merely a place holder, as the
// opaque format cannot be accessed directly.
{ DXGI_FORMAT_420_OPAQUE, AV_PIX_FMT_YUV420P },
--
2.34.1
More information about the ffmpeg-devel
mailing list