From b5ea2fbc2c1554769848774c836aad262af95072 Mon Sep 17 00:00:00 2001 From: John Koleszar Date: Wed, 29 Jun 2011 11:41:50 -0400 Subject: Improved 1-pass CBR rate control This patch attempts to improve the handling of CBR streams with respect to the short term buffering requirements. The "buffer level" is changed to be an average over the rc buffer, rather than a long running average. Overshoot is also tracked over the same interval and the golden frame targets suppressed accordingly to correct for overly aggressive boosting. Testing shows that this is fairly consistently positive in one metric or another -- some clips that show significant decreases in quality have better buffering characteristics, others show improvenents in both. Change-Id: I924c89aa9bdb210271f2e03311e63de3f1f8f920 --- vp8/encoder/onyx_int.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'vp8/encoder/onyx_int.h') diff --git a/vp8/encoder/onyx_int.h b/vp8/encoder/onyx_int.h index be79cb0a5..341ece3e8 100644 --- a/vp8/encoder/onyx_int.h +++ b/vp8/encoder/onyx_int.h @@ -348,6 +348,10 @@ typedef struct VP8_COMP int per_frame_bandwidth; // Current section per frame bandwidth target int av_per_frame_bandwidth; // Average frame size target for clip int min_frame_bandwidth; // Minimum allocation that should be used for any frame + int buffered_av_per_frame_bandwidth; // Average bitrate over the last buffer + int buffered_av_per_frame_bandwidth_rem; // Average bitrate remainder + int accumulated_overshoot; // Accumulated # of bits spent > target + int inter_frame_target; double output_frame_rate; long long last_time_stamp_seen; -- cgit v1.2.3