From d99e89084080c1d8060f926c0ccf28c9e6a3fdcb Mon Sep 17 00:00:00 2001 From: Paul Wilkins <paulwilkins@google.com> Date: Thu, 19 Dec 2013 15:27:44 +0000 Subject: [PATCH] Remove unused code and data structure. Remove modified_error_used and adjust_active_maxq(). Change-Id: I8915007128dc1a17e11693104cfb008a6d64e6a2 --- vp9/encoder/vp9_firstpass.c | 24 ------------------------ vp9/encoder/vp9_onyx_int.h | 1 - 2 files changed, 25 deletions(-) diff --git a/vp9/encoder/vp9_firstpass.c b/vp9/encoder/vp9_firstpass.c index 0460e8e08d..3dcf6baac4 100644 --- a/vp9/encoder/vp9_firstpass.c +++ b/vp9/encoder/vp9_firstpass.c @@ -1157,7 +1157,6 @@ void vp9_init_second_pass(VP9_COMP *cpi) { start_pos = cpi->twopass.stats_in; // Note starting "file" position cpi->twopass.modified_error_total = 0.0; - cpi->twopass.modified_error_used = 0.0; while (input_stats(cpi, &this_frame) != EOF) { cpi->twopass.modified_error_total += @@ -1855,9 +1854,6 @@ static void define_gf_group(VP9_COMP *cpi, FIRSTPASS_STATS *this_frame) { // Reset the file position reset_fpf_position(cpi, start_pos); - // Update the record of error used so far (only done once per gf group) - cpi->twopass.modified_error_used += gf_group_err; - // Assign bits to the arf or gf. for (i = 0; i <= (cpi->rc.source_alt_ref_pending && @@ -2043,26 +2039,6 @@ static void assign_std_frame_bits(VP9_COMP *cpi, FIRSTPASS_STATS *this_frame) { cpi->rc.per_frame_bandwidth = target_frame_size; } -// Make a damped adjustment to the active max q. -static int adjust_active_maxq(int old_maxqi, int new_maxqi) { - int i; - const double old_q = vp9_convert_qindex_to_q(old_maxqi); - const double new_q = vp9_convert_qindex_to_q(new_maxqi); - const double target_q = ((old_q * 7.0) + new_q) / 8.0; - - if (target_q > old_q) { - for (i = old_maxqi; i <= new_maxqi; i++) - if (vp9_convert_qindex_to_q(i) >= target_q) - return i; - } else { - for (i = old_maxqi; i >= new_maxqi; i--) - if (vp9_convert_qindex_to_q(i) <= target_q) - return i; - } - - return new_maxqi; -} - void vp9_second_pass(VP9_COMP *cpi) { int tmp_q; int frames_left = (int)(cpi->twopass.total_stats.count - diff --git a/vp9/encoder/vp9_onyx_int.h b/vp9/encoder/vp9_onyx_int.h index 3679c008a2..7a0b85396b 100644 --- a/vp9/encoder/vp9_onyx_int.h +++ b/vp9/encoder/vp9_onyx_int.h @@ -533,7 +533,6 @@ typedef struct VP9_COMP { int64_t clip_bits_total; double avg_iiratio; double modified_error_total; - double modified_error_used; double modified_error_left; double kf_intra_err_min; double gf_intra_err_min; -- GitLab