[FFmpeg-devel] [PATCH] libavcodec/qsvenc: add mbbrc to hevc_qsv
Xiang, Haihao
haihao.xiang at intel.com
Tue Apr 13 08:12:01 EEST 2021
On Tue, 2021-04-13 at 10:22 +0800, wenbin.chen at intel.com wrote:
> 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);
LGTM, thanks!
-Haihao
More information about the ffmpeg-devel
mailing list