Message ID | 20230131084126.613-2-tong1.wu@intel.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel,1/3] hwcontext_d3d11va: add mutiple supported DXGI formats | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
On Di, 2023-01-31 at 16:41 +0800, Tong Wu wrote: > Add support for VUYX, YUYV422, Y210, XV30, P012, Y212, XV36. > The added formats work with qsv acceleration and will not have > impact on dxva2 acceleration(-hwaccel dxva2) since so far > these formats are still not supported by using dxva2 acceleration. hwupload and hwdownload can work with the added formats, please update the commit log. Thanks Haihao > > Signed-off-by: Tong Wu <tong1.wu@intel.com> > --- > libavutil/hwcontext_dxva2.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/libavutil/hwcontext_dxva2.c b/libavutil/hwcontext_dxva2.c > index 53d00fa815..ea378df720 100644 > --- a/libavutil/hwcontext_dxva2.c > +++ b/libavutil/hwcontext_dxva2.c > @@ -82,6 +82,13 @@ static const struct { > } supported_formats[] = { > { MKTAG('N', 'V', '1', '2'), AV_PIX_FMT_NV12 }, > { MKTAG('P', '0', '1', '0'), AV_PIX_FMT_P010 }, > + { MKTAG('A', 'Y', 'U', 'V'), AV_PIX_FMT_VUYX }, > + { MKTAG('Y', 'U', 'Y', '2'), AV_PIX_FMT_YUYV422 }, > + { MKTAG('Y', '2', '1', '0'), AV_PIX_FMT_Y210 }, > + { MKTAG('Y', '4', '1', '0'), AV_PIX_FMT_XV30 }, > + { MKTAG('P', '0', '1', '6'), AV_PIX_FMT_P012 }, > + { MKTAG('Y', '2', '1', '6'), AV_PIX_FMT_Y212 }, > + { MKTAG('Y', '4', '1', '6'), AV_PIX_FMT_XV36 }, > { D3DFMT_P8, AV_PIX_FMT_PAL8 }, > { D3DFMT_A8R8G8B8, AV_PIX_FMT_BGRA }, > };
diff --git a/libavutil/hwcontext_dxva2.c b/libavutil/hwcontext_dxva2.c index 53d00fa815..ea378df720 100644 --- a/libavutil/hwcontext_dxva2.c +++ b/libavutil/hwcontext_dxva2.c @@ -82,6 +82,13 @@ static const struct { } supported_formats[] = { { MKTAG('N', 'V', '1', '2'), AV_PIX_FMT_NV12 }, { MKTAG('P', '0', '1', '0'), AV_PIX_FMT_P010 }, + { MKTAG('A', 'Y', 'U', 'V'), AV_PIX_FMT_VUYX }, + { MKTAG('Y', 'U', 'Y', '2'), AV_PIX_FMT_YUYV422 }, + { MKTAG('Y', '2', '1', '0'), AV_PIX_FMT_Y210 }, + { MKTAG('Y', '4', '1', '0'), AV_PIX_FMT_XV30 }, + { MKTAG('P', '0', '1', '6'), AV_PIX_FMT_P012 }, + { MKTAG('Y', '2', '1', '6'), AV_PIX_FMT_Y212 }, + { MKTAG('Y', '4', '1', '6'), AV_PIX_FMT_XV36 }, { D3DFMT_P8, AV_PIX_FMT_PAL8 }, { D3DFMT_A8R8G8B8, AV_PIX_FMT_BGRA }, };
Add support for VUYX, YUYV422, Y210, XV30, P012, Y212, XV36. The added formats work with qsv acceleration and will not have impact on dxva2 acceleration(-hwaccel dxva2) since so far these formats are still not supported by using dxva2 acceleration. Signed-off-by: Tong Wu <tong1.wu@intel.com> --- libavutil/hwcontext_dxva2.c | 7 +++++++ 1 file changed, 7 insertions(+)