diff mbox series

[FFmpeg-devel,1/2] lavc/qsvenc: ignore video signal info buffer for VP9

Message ID 20220823061905.4702-1-haihao.xiang@intel.com
State Accepted
Commit ea56f7d5e71ccab1b6fa44f1091153f91c1d4aeb
Headers show
Series [FFmpeg-devel,1/2] lavc/qsvenc: ignore video signal info buffer for VP9 | expand

Checks

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

Commit Message

Xiang, Haihao Aug. 23, 2022, 6:19 a.m. UTC
From: Haihao Xiang <haihao.xiang@intel.com>

The SDK doesn't support this type of buffer for vp9 encoding

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
---
 libavcodec/qsvenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Xiang, Haihao Aug. 29, 2022, 1:54 a.m. UTC | #1
On Tue, 2022-08-23 at 14:19 +0800, Xiang, Haihao wrote:
> From: Haihao Xiang <haihao.xiang@intel.com>
> 
> The SDK doesn't support this type of buffer for vp9 encoding
> 
> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
> ---
>  libavcodec/qsvenc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
> index 202a645ea2..f1838ce597 100644
> --- a/libavcodec/qsvenc.c
> +++ b/libavcodec/qsvenc.c
> @@ -970,7 +970,7 @@ static int init_video_param(AVCodecContext *avctx,
> QSVEncContext *q)
>          q->extvsi.MatrixCoefficients = avctx->colorspace;
>      }
>  
> -    if (q->extvsi.VideoFullRange || q->extvsi.ColourDescriptionPresent) {
> +    if ((avctx->codec_id != AV_CODEC_ID_VP9) && (q->extvsi.VideoFullRange ||
> q->extvsi.ColourDescriptionPresent)) {
>          q->extvsi.Header.BufferId = MFX_EXTBUFF_VIDEO_SIGNAL_INFO;
>          q->extvsi.Header.BufferSz = sizeof(q->extvsi);
>          q->extparam_internal[q->nb_extparam_internal++] = (mfxExtBuffer *)&q-
> >extvsi;

patchset applied,

- Haihao
diff mbox series

Patch

diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index 202a645ea2..f1838ce597 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -970,7 +970,7 @@  static int init_video_param(AVCodecContext *avctx, QSVEncContext *q)
         q->extvsi.MatrixCoefficients = avctx->colorspace;
     }
 
-    if (q->extvsi.VideoFullRange || q->extvsi.ColourDescriptionPresent) {
+    if ((avctx->codec_id != AV_CODEC_ID_VP9) && (q->extvsi.VideoFullRange || q->extvsi.ColourDescriptionPresent)) {
         q->extvsi.Header.BufferId = MFX_EXTBUFF_VIDEO_SIGNAL_INFO;
         q->extvsi.Header.BufferSz = sizeof(q->extvsi);
         q->extparam_internal[q->nb_extparam_internal++] = (mfxExtBuffer *)&q->extvsi;