[1/2] media: v4l2-ctrls: add encoder maximum bitrate control
Commit Message
Introduce V4L2_MPEG_VIDEO_BITRATE_MODE_MBR rate control to
limit the frame level maximum bit rate.
Encoder will choose appropriate quantization parameter and
do the smart bit allocation to set the frame maximum bitrate
level as per the Bitrate value configured.
Signed-off-by: Sachin Kumar Garg <quic_sachinku@quicinc.com>
---
Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst | 2 ++
drivers/media/v4l2-core/v4l2-ctrls-defs.c | 1 +
include/uapi/linux/v4l2-controls.h | 1 +
3 files changed, 4 insertions(+)
@@ -576,6 +576,8 @@ enum v4l2_mpeg_video_bitrate_mode -
- Constant bitrate
* - ``V4L2_MPEG_VIDEO_BITRATE_MODE_CQ``
- Constant quality
+ * - ``V4L2_MPEG_VIDEO_BITRATE_MODE_MBR``
+ - Maximum bitrate
@@ -154,6 +154,7 @@ const char * const *v4l2_ctrl_get_menu(u32 id)
"Variable Bitrate",
"Constant Bitrate",
"Constant Quality",
+ "Maximum Bitrate",
NULL
};
static const char * const mpeg_stream_type[] = {
@@ -393,6 +393,7 @@ enum v4l2_mpeg_video_bitrate_mode {
V4L2_MPEG_VIDEO_BITRATE_MODE_VBR = 0,
V4L2_MPEG_VIDEO_BITRATE_MODE_CBR = 1,
V4L2_MPEG_VIDEO_BITRATE_MODE_CQ = 2,
+ V4L2_MPEG_VIDEO_BITRATE_MODE_MBR = 3,
};
#define V4L2_CID_MPEG_VIDEO_BITRATE (V4L2_CID_CODEC_BASE+207)
#define V4L2_CID_MPEG_VIDEO_BITRATE_PEAK (V4L2_CID_CODEC_BASE+208)