[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 <jung.zhao@rock-chips.com>
This commit is contained in:
Jung Zhao
2017-01-18 11:44:26 +08:00
committed by Herman Chen
parent b3fd37aa08
commit e86d330941

View File

@@ -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;
}