aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorWenbin Chen <wenbin.chen-at-intel.com@ffmpeg.org>2022-02-21 16:56:56 +0800
committerHaihao Xiang <haihao.xiang@intel.com>2022-02-28 12:40:02 +0800
commit342d4fb0563cafa4e444c83dc4ecfa0d69a71eda (patch)
tree22bf1a4da44b0cda80145350092cf8fbbf7e72f4 /libavcodec
parent4869ccb3f38a606401a1c3e3a31f18d35eb7dc39 (diff)
downloadffmpeg-342d4fb0563cafa4e444c83dc4ecfa0d69a71eda.tar.gz
libavcodec/qsvenc: add mbbrc to hevc_qsv
Add mbbrc to hevc_qsv For detailed description, please see "mbbrc" part in: https://github.com/Intel-Media-SDK/MediaSDK/blob/master/doc/mediasdk-man.md#mfxextcodingoption2 Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/qsvenc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index 3008f329e5..49f61ae6bb 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -878,8 +878,6 @@ static int init_video_param(AVCodecContext *avctx, QSVEncContext *q)
if (avctx->codec_id == AV_CODEC_ID_H264) {
if (q->bitrate_limit >= 0)
q->extco2.BitrateLimit = q->bitrate_limit ? MFX_CODINGOPTION_ON : MFX_CODINGOPTION_OFF;
- if (q->mbbrc >= 0)
- q->extco2.MBBRC = q->mbbrc ? MFX_CODINGOPTION_ON : MFX_CODINGOPTION_OFF;
#if QSV_HAVE_TRELLIS
if (avctx->trellis >= 0)
@@ -936,6 +934,9 @@ static int init_video_param(AVCodecContext *avctx, QSVEncContext *q)
q->extco2.MaxQPP = q->extco2.MaxQPB = q->extco2.MaxQPI;
}
#endif
+ if (q->mbbrc >= 0)
+ q->extco2.MBBRC = q->mbbrc ? MFX_CODINGOPTION_ON : MFX_CODINGOPTION_OFF;
+
q->extco2.Header.BufferId = MFX_EXTBUFF_CODING_OPTION2;
q->extco2.Header.BufferSz = sizeof(q->extco2);