[FFmpeg-devel] [PATCH v3 1/3] avcodec/v4l2_m2m_enc: Enable frame level rate control by default

Andriy Gelman andriy.gelman at gmail.com
Sun Feb 16 21:31:42 EET 2020


From: Andriy Gelman <andriy.gelman at gmail.com>

Without this setting, bitrate and qmin/qmax options have no
affect on the s5p-mfc hardware encoder.

Signed-off-by: Andriy Gelman <andriy.gelman at gmail.com>
---
 libavcodec/v4l2_m2m_enc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/v4l2_m2m_enc.c b/libavcodec/v4l2_m2m_enc.c
index 98b9dfc2c0b..94373b3b6e7 100644
--- a/libavcodec/v4l2_m2m_enc.c
+++ b/libavcodec/v4l2_m2m_enc.c
@@ -177,6 +177,7 @@ static int v4l2_prepare_encoder(V4L2m2mContext *s)
     /* set ext ctrls */
     v4l2_set_ext_ctrl(s, MPEG_CID(HEADER_MODE), MPEG_VIDEO(HEADER_MODE_SEPARATE), "header mode");
     v4l2_set_ext_ctrl(s, MPEG_CID(BITRATE) , avctx->bit_rate, "bit rate");
+    v4l2_set_ext_ctrl(s, MPEG_CID(FRAME_RC_ENABLE), 1, "frame level rate control");
     v4l2_set_ext_ctrl(s, MPEG_CID(GOP_SIZE), avctx->gop_size,"gop size");
 
     av_log(avctx, AV_LOG_DEBUG,
-- 
2.25.0



More information about the ffmpeg-devel mailing list