From 8999a2f21d1ed11b4ce4400d20a11959a2b18869 Mon Sep 17 00:00:00 2001 From: Linjie Fu Date: Wed, 26 Feb 2020 16:40:02 +0800 Subject: lavc/qsvenc: add encode support for HEVC 4:2:2 8-bit and 10-bit Enables HEVC Range Extension encoding support (Linux) for 4:2:2 8/10 bit on ICL+ (gen11 +) platform. Restricted to linux only for now. Signed-off-by: Linjie Fu --- libavcodec/qsvenc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libavcodec/qsvenc.c') diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index 9ec0636dde..edf37708cb 100644 --- a/libavcodec/qsvenc.c +++ b/libavcodec/qsvenc.c @@ -66,6 +66,7 @@ static const struct { { MFX_PROFILE_HEVC_MAIN, "main" }, { MFX_PROFILE_HEVC_MAIN10, "main10" }, { MFX_PROFILE_HEVC_MAINSP, "mainsp" }, + { MFX_PROFILE_HEVC_REXT, "rext" }, #endif }; @@ -544,7 +545,8 @@ static int init_video_param(AVCodecContext *avctx, QSVEncContext *q) q->param.mfx.FrameInfo.CropH = avctx->height; q->param.mfx.FrameInfo.AspectRatioW = avctx->sample_aspect_ratio.num; q->param.mfx.FrameInfo.AspectRatioH = avctx->sample_aspect_ratio.den; - q->param.mfx.FrameInfo.ChromaFormat = MFX_CHROMAFORMAT_YUV420; + q->param.mfx.FrameInfo.ChromaFormat = MFX_CHROMAFORMAT_YUV420 + + !desc->log2_chroma_w + !desc->log2_chroma_h; q->param.mfx.FrameInfo.BitDepthLuma = desc->comp[0].depth; q->param.mfx.FrameInfo.BitDepthChroma = desc->comp[0].depth; q->param.mfx.FrameInfo.Shift = desc->comp[0].depth > 8; -- cgit v1.2.3