[FFmpeg-devel] [PATCH] libavcodec/qsvenc: add mbbrc to hevc_qsv
wenbin.chen at intel.com
wenbin.chen at intel.com
Tue Apr 13 05:22:35 EEST 2021
From: "Chen,Wenbin" <wenbin.chen at intel.com>
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 at intel.com>
---
libavcodec/qsvenc.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index 566a5c8552..19e246a8fb 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -701,8 +701,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
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 (q->max_frame_size >= 0)
q->extco2.MaxFrameSize = q->max_frame_size;
@@ -755,6 +753,9 @@ FF_ENABLE_DEPRECATION_WARNINGS
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);
--
2.25.1
More information about the ffmpeg-devel
mailing list