Re: [PATCH v2 2/2] media: iris: disable time-delta-based rate control for VBR
From: Vikash Garodia
Date: Fri Jul 10 2026 - 04:30:17 EST
On 7/10/2026 8:24 AM, Vishnu Reddy wrote:
From: Gourav Kumar<gouravk@xxxxxxxxxxxxxxxx>
The iris encoder driver was not sending
HFI_PROP_TIME_DELTA_BASED_RATE_CONTROL to the firmware during encoder
initialization. Without this property, the firmware defaults to
time-delta-based rate control (enabled), which calculates the output
bitrate from actual frame timing rather than following the configured
bitrate target.
This caused variable bitrate (VBR) encoding to produce ~5x configured
bitrate. For example, with video_bitrate=896000 (896 Kbps), the output
is ~4.4 Mbps instead of the expected ~896 Kbps.
Time-delta-based rate control is designed for variable frame rate (VFR)
scenarios where the encoder adapts to actual frame timing. However, when
an application explicitly configures a bitrate target, the firmware must
follow that target regardless of frame timing.
Fix this by adding the TIME_DELTA_BASED_RC capability with a default value
of 0 (disabled) and sending HFI_PROP_TIME_DELTA_BASED_RATE_CONTROL = 0 to
the firmware during stream-on, allowing the firmware to use the configured
bitrate as the target.
Signed-off-by: Gourav Kumar<gouravk@xxxxxxxxxxxxxxxx>
Signed-off-by: Vishnu Reddy<busanna.reddy@xxxxxxxxxxxxxxxx>
---
drivers/media/platform/qcom/iris/iris_ctrls.c | 19 +++++++++++++++++++
drivers/media/platform/qcom/iris/iris_ctrls.h | 1 +
drivers/media/platform/qcom/iris/iris_hfi_gen2.c | 10 ++++++++++
.../media/platform/qcom/iris/iris_hfi_gen2_defines.h | 1 +
.../media/platform/qcom/iris/iris_platform_common.h | 1 +
5 files changed, 32 insertions(+)
Reviewed-by: Vikash Garodia <vikash.garodia@xxxxxxxxxxxxxxxx>