diff options
author | Paul Wilkins <paulwilkins@google.com> | 2010-12-09 15:02:04 +0000 |
---|---|---|
committer | Paul Wilkins <paulwilkins@google.com> | 2010-12-09 15:02:04 +0000 |
commit | c63fc881e109de884e98959ecabcc057fbba2d32 (patch) | |
tree | eb824e19fc452c17c14c75f176a9de0bfe019c5f /vp8 | |
parent | 160f3c7e9e25089b5e0c9f324415333051510a5e (diff) | |
download | libvpx-c63fc881e109de884e98959ecabcc057fbba2d32.tar libvpx-c63fc881e109de884e98959ecabcc057fbba2d32.tar.gz libvpx-c63fc881e109de884e98959ecabcc057fbba2d32.tar.bz2 libvpx-c63fc881e109de884e98959ecabcc057fbba2d32.zip |
Correct q_low and q_high limits for the recode loop
Corrected the initial Q range limits for the recode loop
to reflect the current allowed range for the frame.
In experimental work on constrained quality this bug was
causing unnecessary recodes.
Change-Id: I7e256fbfa681293b0223fe21ec329933d76c229f
Diffstat (limited to 'vp8')
-rw-r--r-- | vp8/encoder/onyx_if.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c index aad326ca2..a003828b0 100644 --- a/vp8/encoder/onyx_if.c +++ b/vp8/encoder/onyx_if.c @@ -3837,17 +3837,16 @@ static void encode_frame_to_data_rate vp8_compute_frame_size_bounds(cpi, &frame_under_shoot_limit, &frame_over_shoot_limit); - // Limit Q range for the adaptive loop (Values not clipped to range 20-60 as in VP8). + // Limit Q range for the adaptive loop. bottom_index = cpi->active_best_quality; top_index = cpi->active_worst_quality; + q_low = cpi->active_best_quality; + q_high = cpi->active_worst_quality; vp8_save_coding_context(cpi); loop_count = 0; - q_low = cpi->best_quality; - q_high = cpi->worst_quality; - scale_and_extend_source(cpi->un_scaled_source, cpi); #if !(CONFIG_REALTIME_ONLY) && CONFIG_POSTPROC @@ -4029,15 +4028,13 @@ static void encode_frame_to_data_rate Q = vp8_regulate_q(cpi, cpi->this_frame_target); - q_low = cpi->best_quality; - q_high = cpi->worst_quality; - vp8_compute_frame_size_bounds(cpi, &frame_under_shoot_limit, &frame_over_shoot_limit); - // Limit Q range for the adaptive loop (Values not clipped to range 20-60 as in VP8). + // Limit Q range for the adaptive loop. bottom_index = cpi->active_best_quality; top_index = cpi->active_worst_quality; - + q_low = cpi->active_best_quality; + q_high = cpi->active_worst_quality; loop_count++; Loop = TRUE; |