Re: [PATCH 2/2] media: iris: add new rate control type MBR for encoder
From: Sachin Kumar Garg
Date: Mon Mar 30 2026 - 01:45:51 EST
On 3/17/2026 12:17 AM, Dmitry Baryshkov wrote:
On Mon, Mar 16, 2026 at 01:37:21PM -0400, Nicolas Dufresne wrote:Thanks for the suggestion.
Le lundi 16 mars 2026 à 11:52 +0530, Sachin Kumar Garg a écrit :
On 2/13/2026 3:24 PM, Konrad Dybcio wrote:
On 2/13/26 7:04 AM, Sachin Kumar Garg wrote:
Introduce V4L2_MPEG_VIDEO_BITRATE_MODE_MBR rate control to Encoder.
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.
---
drivers/media/platform/qcom/iris/iris_ctrls.c | 2 +
.../platform/qcom/iris/iris_hfi_gen1_defines.h | 1 +
.../media/platform/qcom/iris/iris_platform_gen1.c | 9 +-
.../platform/qcom/iris/iris_platform_sc7280.h | 202
+++++++++++++++++++++
Is this really only available on 7280?
Konrad
Yes Konrad, in this series we enable V4L2_MPEG_VIDEO_BITRATE_MODE_MBR
only for SC7280 because currently, we have added the support only for
low tier chipset. MBR rate control aims to improve the compression
efficiency of encoder for static and low motion scenes for extremely low
bitrate use-case.
Without a spec definition, which constrained the implementations toward
interoperability, this needs to be made vendor specific. That being said, even
as vendor specific control, I think it deserves more documentation for your
users.
What kind of documentation would be a better fit for keeping this in the
generic namespace? Frankly speaking, I think that the current
documentation is too vendor-specific, it describe the particular
algorithm, while the control seems to be more generic. However, I also
feel that defining it as "Maximum Bitrate" might not be specific enough
(nor would it show a difference from the CBR mode).
I understand that this functionality is vendor-specific and should not be exposed via a generic control. Would it be acceptable to convert this into a vendor-specific control (for example, V4L2_MPEG_VIDEO_BITRATE_MODE_QCOM_MBR) and update the documentation accordingly?
Please let me know if this aligns with upstream expectations, or can you please suggest if there is any other preferred approach for adding vendor-specific controls in this case.
Thanks,
Sachin