From: Jingning Han Date: Tue, 13 Nov 2018 00:22:46 +0000 (-0800) Subject: Rescale arf bit budget calculation X-Git-Tag: v1.8.0~157^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=134072dbd37e0adac154fecf0a5434d538d5d096;p=platform%2Fupstream%2Flibvpx.git Rescale arf bit budget calculation To compute the total budget for a depth layer, exclude the count of frames that have been allocated the bit budget. This improves the avg PSNR by 0.15% and overall PSNR by 0.25% for lowres and midres test sets. Change-Id: I5115e33e1422dc930179142cd29aeebe97425283 --- diff --git a/vp9/encoder/vp9_firstpass.c b/vp9/encoder/vp9_firstpass.c index a8b410f..8400b09 100644 --- a/vp9/encoder/vp9_firstpass.c +++ b/vp9/encoder/vp9_firstpass.c @@ -2301,8 +2301,9 @@ static void allocate_gf_group_bits(VP9_COMP *cpi, int64_t gf_group_bits, for (idx = 2; idx < MAX_ARF_LAYERS; ++idx) { if (arf_depth_boost[idx] == 0) break; - arf_depth_bits[idx] = calculate_boost_bits( - rc->baseline_gf_interval, arf_depth_boost[idx], total_group_bits); + arf_depth_bits[idx] = + calculate_boost_bits(rc->baseline_gf_interval - total_arfs, + arf_depth_boost[idx], total_group_bits); total_group_bits -= arf_depth_bits[idx]; total_arfs += arf_depth_count[idx];