aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/hwcontext_qsv.c
diff options
context:
space:
mode:
authorHaihao Xiang <haihao.xiang@intel.com>2022-10-06 15:35:35 +0800
committerHaihao Xiang <haihao.xiang@intel.com>2022-10-10 09:31:34 +0800
commitaba25b391c7f68cea456d1b862a71bcd105b46f3 (patch)
tree877cd941b31780b82002a01c084c3056831bb90a /libavutil/hwcontext_qsv.c
parent3f28116ea26a87fbe1c807248effaf449008d979 (diff)
downloadffmpeg-aba25b391c7f68cea456d1b862a71bcd105b46f3.tar.gz
lavu/hwcontext_qsv: add support for 10bit 4:4:4 content on Linux
XV30 is used for 10bit 4:4:4 content in FFmpeg VAAPI, so XV30 should be used for 10bit 4:4:4 content in FFmpeg QSV too because QSV is based on VAAPI on Linux. However the SDK only declares support for Y410 but does nothing with the alpha in Y410, so this commit fudged a mapping between AV_PIX_FMT_XV30 and MFX_FOURCC_Y410. Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
Diffstat (limited to 'libavutil/hwcontext_qsv.c')
-rw-r--r--libavutil/hwcontext_qsv.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c
index 2272df52f2..93ecd2f1a3 100644
--- a/libavutil/hwcontext_qsv.c
+++ b/libavutil/hwcontext_qsv.c
@@ -124,6 +124,10 @@ static const struct {
// the SDK only delares support for AYUV
{ AV_PIX_FMT_VUYX,
MFX_FOURCC_AYUV, 0 },
+ // XV30 is used for VAAPI child device,
+ // the SDK only delares support for Y410
+ { AV_PIX_FMT_XV30,
+ MFX_FOURCC_Y410, 0 },
#endif
};
@@ -1525,6 +1529,9 @@ static int map_frame_to_surface(const AVFrame *frame, mfxFrameSurface1 *surface)
// use the value from the frame.
surface->Data.A = frame->data[0] + 3;
break;
+ case AV_PIX_FMT_XV30:
+ surface->Data.U = frame->data[0];
+ break;
#endif
default:
return MFX_ERR_UNSUPPORTED;