From e86d3309411f200f2079937f9d6bfe81cb41a35d Mon Sep 17 00:00:00 2001 From: Jung Zhao Date: Wed, 18 Jan 2017 11:44:26 +0800 Subject: [PATCH] [rc]: fix frame count acc_total_count will be set to 0 when a new gop start. use acc_intra_count+acc_inter_count instead of it. Change-Id: I14b1c75954f5994eb150d1f0ff7d822a74ed2359 Signed-off-by: Jung Zhao --- mpp/codec/mpp_rc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mpp/codec/mpp_rc.cpp b/mpp/codec/mpp_rc.cpp index 1a80c3bf..50fe9200 100644 --- a/mpp/codec/mpp_rc.cpp +++ b/mpp/codec/mpp_rc.cpp @@ -458,7 +458,7 @@ MPP_RET mpp_rc_update_hw_result(MppRateControl *ctx, RcHalResult *result) ctx->last_fps_bits += bits; /* new fps start */ - if (ctx->acc_total_count % ctx->fps_out == 0) { + if ((ctx->acc_intra_count + ctx->acc_inter_count) % ctx->fps_out == 0) { mpp_pid_update(&ctx->pid_fps, ctx->bps_target - ctx->last_fps_bits); ctx->last_fps_bits = 0; }