Commit d99e8908 authored by Paul Wilkins's avatar Paul Wilkins
Browse files

Remove unused code and data structure.

Remove modified_error_used and adjust_active_maxq().

Change-Id: I8915007128dc1a17e11693104cfb008a6d64e6a2
Showing with 0 additions and 25 deletions
...@@ -1157,7 +1157,6 @@ void vp9_init_second_pass(VP9_COMP *cpi) { ...@@ -1157,7 +1157,6 @@ void vp9_init_second_pass(VP9_COMP *cpi) {
start_pos = cpi->twopass.stats_in; // Note starting "file" position start_pos = cpi->twopass.stats_in; // Note starting "file" position
cpi->twopass.modified_error_total = 0.0; cpi->twopass.modified_error_total = 0.0;
cpi->twopass.modified_error_used = 0.0;
while (input_stats(cpi, &this_frame) != EOF) { while (input_stats(cpi, &this_frame) != EOF) {
cpi->twopass.modified_error_total += cpi->twopass.modified_error_total +=
...@@ -1855,9 +1854,6 @@ static void define_gf_group(VP9_COMP *cpi, FIRSTPASS_STATS *this_frame) { ...@@ -1855,9 +1854,6 @@ static void define_gf_group(VP9_COMP *cpi, FIRSTPASS_STATS *this_frame) {
// Reset the file position // Reset the file position
reset_fpf_position(cpi, start_pos); 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. // Assign bits to the arf or gf.
for (i = 0; for (i = 0;
i <= (cpi->rc.source_alt_ref_pending && i <= (cpi->rc.source_alt_ref_pending &&
...@@ -2043,26 +2039,6 @@ static void assign_std_frame_bits(VP9_COMP *cpi, FIRSTPASS_STATS *this_frame) { ...@@ -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; 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) { void vp9_second_pass(VP9_COMP *cpi) {
int tmp_q; int tmp_q;
int frames_left = (int)(cpi->twopass.total_stats.count - int frames_left = (int)(cpi->twopass.total_stats.count -
......
...@@ -533,7 +533,6 @@ typedef struct VP9_COMP { ...@@ -533,7 +533,6 @@ typedef struct VP9_COMP {
int64_t clip_bits_total; int64_t clip_bits_total;
double avg_iiratio; double avg_iiratio;
double modified_error_total; double modified_error_total;
double modified_error_used;
double modified_error_left; double modified_error_left;
double kf_intra_err_min; double kf_intra_err_min;
double gf_intra_err_min; double gf_intra_err_min;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment