From ac16b2c63ee9de6b7e291205fa276f5d26a13641 Mon Sep 17 00:00:00 2001 From: Yanjun Liao Date: Mon, 28 Jul 2025 14:28:05 +0800 Subject: [PATCH] fix[h264e_api_v2]: Fix bit_real calc in skip mode Platform: all Spec: h264e The hw_length is in bytes, but bit_real is in bits. Change-Id: I53428c6347c3f33ad63d2f6dd78daa72b910055f Signed-off-by: Yanjun Liao --- mpp/codec/enc/h264/h264e_api_v2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mpp/codec/enc/h264/h264e_api_v2.c b/mpp/codec/enc/h264/h264e_api_v2.c index 76702482..c0cae07a 100644 --- a/mpp/codec/enc/h264/h264e_api_v2.c +++ b/mpp/codec/enc/h264/h264e_api_v2.c @@ -959,7 +959,7 @@ static MPP_RET h264e_sw_enc(void *ctx, HalEncTask *task) task->length += final_len; - rc_info->bit_real = task->length; + rc_info->bit_real = task->length * 8; rc_info->quality_real = rc_info->quality_target; p->dpb.curr->prev_ref_idx = p->frms.refr_idx; mpp_packet_add_segment_info(packet, H264_NALU_TYPE_SLICE, length, final_len);