sr_correction = 0.75;
}
- // Calculate a corrective factor based on a rolling ratio of bits spent
- // vs target bits
- if (cpi->rc.rolling_target_bits > 0 &&
- cpi->rc.active_worst_quality < cpi->rc.worst_quality) {
- double rolling_ratio = (double)cpi->rc.rolling_actual_bits /
- (double)cpi->rc.rolling_target_bits;
-
- if (rolling_ratio < 0.95)
- cpi->twopass.est_max_qcorrection_factor -= 0.005;
- else if (rolling_ratio > 1.05)
- cpi->twopass.est_max_qcorrection_factor += 0.005;
-
- cpi->twopass.est_max_qcorrection_factor = fclamp(
- cpi->twopass.est_max_qcorrection_factor, 0.1, 10.0);
- }
-
// Corrections for higher compression speed settings
// (reduced compression expected)
// FIXME(jimbankoski): Once we settle on vp9 speed features we need to
err_correction_factor = calc_correction_factor(err_per_mb,
ERR_DIVISOR, 0.4, 0.90, q) *
- sr_correction * speed_correction *
- cpi->twopass.est_max_qcorrection_factor;
+ sr_correction * speed_correction;
bits_per_mb_at_this_q = vp9_rc_bits_per_mb(INTER_FRAME, q,
err_correction_factor);
if (cpi->common.current_video_frame == 0) {
int section_target_bandwidth =
(int)(cpi->twopass.bits_left / frames_left);
- cpi->twopass.est_max_qcorrection_factor = 1.0;
// guess at maxq needed in 2nd pass
cpi->twopass.maxq_max_limit = cpi->rc.worst_quality;
cpi->rc.rate_correction_factor = 1.0;
cpi->rc.key_frame_rate_correction_factor = 1.0;
cpi->rc.gf_rate_correction_factor = 1.0;
- cpi->twopass.est_max_qcorrection_factor = 1.0;
cal_nmvjointsadcost(cpi->mb.nmvjointsadcost);
cpi->mb.nmvcost[0] = &cpi->mb.nmvcosts[0][MV_MAX];
if (cpi->twopass.total_left_stats.coded_error != 0.0)
fprintf(f, "%10d %10d %10d %10d %10d %10d %10d %10d %10d"
"%7.2f %7.2f %7.2f %7.2f %7.2f %7.2f"
- "%6d %6d %5d %5d %5d %8.2f %10d %10.3f"
+ "%6d %6d %5d %5d %5d %10d %10.3f"
"%10.3f %8d %10d %10d %10d\n",
cpi->common.current_video_frame, cpi->rc.this_frame_target,
cpi->rc.projected_frame_size, 0,
vp9_convert_qindex_to_q(cpi->cq_target_quality),
cpi->refresh_last_frame, cpi->refresh_golden_frame,
cpi->refresh_alt_ref_frame, cm->frame_type, cpi->rc.gfu_boost,
- cpi->twopass.est_max_qcorrection_factor, (int)cpi->twopass.bits_left,
+ (int)cpi->twopass.bits_left,
cpi->twopass.total_left_stats.coded_error,
(double)cpi->twopass.bits_left /
(1 + cpi->twopass.total_left_stats.coded_error),
int alt_extra_bits;
int sr_update_lag;
- double est_max_qcorrection_factor;
} twopass;
YV12_BUFFER_CONFIG alt_ref_buffer;