[FFmpeg-devel] [PATCH v1 1/1] lavc/qsvenc: disable SEI frame before each P-frame

Ting Hu siriushu at hotmail.com
Sun Aug 6 14:54:53 EEST 2023


From: tinghu3 <siriushu at hotmail.com>

In order to save bandwith for video conference application,
set pic_timing_sei of av_option to disable SEI frames.
It doesn't take effect.

Signed-off-by: tinghu3 <siriushu at hotmail.com>
---
 libavcodec/qsvenc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index df63c182b0..7a5ea5391e 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -937,7 +937,7 @@ static int init_video_param(AVCodecContext *avctx, QSVEncContext *q)
         q->extco.Header.BufferSz      = sizeof(q->extco);
 
         q->extco.PicTimingSEI         = q->pic_timing_sei ?
-                                        MFX_CODINGOPTION_ON : MFX_CODINGOPTION_UNKNOWN;
+                                        MFX_CODINGOPTION_ON : MFX_CODINGOPTION_OFF;
         q->old_pic_timing_sei = q->pic_timing_sei;
 
         if (q->rdo >= 0)
@@ -968,6 +968,7 @@ static int init_video_param(AVCodecContext *avctx, QSVEncContext *q)
             q->extco.AUDelimiter          = q->aud ? MFX_CODINGOPTION_ON : MFX_CODINGOPTION_OFF;
         }
 
+        q->extco.RefPicMarkRep = q->pic_timing_sei ? MFX_CODINGOPTION_ON : MFX_CODINGOPTION_OFF;
         q->extparam_internal[q->nb_extparam_internal++] = (mfxExtBuffer *)&q->extco;
 
         if (avctx->codec_id == AV_CODEC_ID_H264) {
-- 
2.38.1



More information about the ffmpeg-devel mailing list