diff options
author | Haihao Xiang <haihao.xiang@intel.com> | 2022-03-10 14:34:22 +0800 |
---|---|---|
committer | Haihao Xiang <haihao.xiang@intel.com> | 2023-02-07 09:51:37 +0800 |
commit | f1355ec9f6125ff8eb644e5beb3e3ccd6e35da28 (patch) | |
tree | bcedfd21b8e2b4ced90296ccc6cdbf9242440c8b /libavutil | |
parent | 3b3a321fed016665b602e50de993f96fa59ece30 (diff) | |
download | ffmpeg-f1355ec9f6125ff8eb644e5beb3e3ccd6e35da28.tar.gz |
lavu/hwcontext_qsv: add support for UYVY
The SDK supports UYVY from version 1.17, and VPP may support UYVY
input on Linux [1]
$ ffmpeg -loglevel verbose -init_hw_device qsv=intel -f lavfi -i \
yuvtestsrc -vf \
"format=uyvy422,hwupload=extra_hw_frames=32,vpp_qsv=format=nv12" \
-f null -
[1] https://github.com/Intel-Media-SDK/MediaSDK/blob/master/doc/samples/readme-vpp_linux.md
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/hwcontext_qsv.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavutil/hwcontext_qsv.c b/libavutil/hwcontext_qsv.c index ec0f72b329..42851d4fd5 100644 --- a/libavutil/hwcontext_qsv.c +++ b/libavutil/hwcontext_qsv.c @@ -118,6 +118,8 @@ static const struct { #if CONFIG_VAAPI { AV_PIX_FMT_YUYV422, MFX_FOURCC_YUY2, 0 }, + { AV_PIX_FMT_UYVY422, + MFX_FOURCC_UYVY, 0 }, { AV_PIX_FMT_Y210, MFX_FOURCC_Y210, 1 }, // VUYX is used for VAAPI child device, @@ -1556,6 +1558,11 @@ static int map_frame_to_surface(const AVFrame *frame, mfxFrameSurface1 *surface) // use the value from the frame. surface->Data.A = frame->data[0] + 6; break; + case AV_PIX_FMT_UYVY422: + surface->Data.Y = frame->data[0] + 1; + surface->Data.U = frame->data[0]; + surface->Data.V = frame->data[0] + 2; + break; #endif default: return MFX_ERR_UNSUPPORTED; |