diff mbox series

[FFmpeg-devel,v4,2/3] avcodec/v4l2_m2m_enc: Enable frame level rate control by default

Message ID 20200223184733.13113-2-andriy.gelman@gmail.com
State New
Headers show
Series [FFmpeg-devel,v4,1/3] avcodec/v4l2_m2m_enc: Reduce log verbosity for some params
Related show


Context Check Description
andriy/ffmpeg-patchwork pending
andriy/ffmpeg-patchwork success Applied patch
andriy/ffmpeg-patchwork success Configure finished
andriy/ffmpeg-patchwork success Make finished
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

Andriy Gelman Feb. 23, 2020, 6:47 p.m. UTC
From: Andriy Gelman <andriy.gelman@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@gmail.com>
 libavcodec/v4l2_m2m_enc.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series


diff --git a/libavcodec/v4l2_m2m_enc.c b/libavcodec/v4l2_m2m_enc.c
index 859feb7bde7..0098d5314bb 100644
--- a/libavcodec/v4l2_m2m_enc.c
+++ b/libavcodec/v4l2_m2m_enc.c
@@ -179,6 +179,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", 0);
     v4l2_set_ext_ctrl(s, MPEG_CID(BITRATE) , avctx->bit_rate, "bit rate", 1);
+    v4l2_set_ext_ctrl(s, MPEG_CID(FRAME_RC_ENABLE), 1, "frame level rate control", 0);
     v4l2_set_ext_ctrl(s, MPEG_CID(GOP_SIZE), avctx->gop_size,"gop size", 1);
     av_log(avctx, AV_LOG_DEBUG,