AQ1 - remove first pass weights.
Removed redundant weighting function tied for AQ1 from first pass code. Improvment in baseline AQ1 results:- Derf opsnr +0.142% SSIm +0.258% YT opsnr +0.173% SSIm +0.3% Change-Id: I16ef91caf2d7f302cd5940cc5e2626d48ebcb212
This commit is contained in:
parent
5e935126a6
commit
31b6d7c1eb
@ -52,14 +52,6 @@ double vp9_vaq_rdmult_ratio(int energy) {
|
||||
return RDMULT_RATIO(energy);
|
||||
}
|
||||
|
||||
double vp9_vaq_inv_q_ratio(int energy) {
|
||||
ENERGY_IN_BOUNDS(energy);
|
||||
|
||||
vp9_clear_system_state();
|
||||
|
||||
return Q_RATIO(-energy);
|
||||
}
|
||||
|
||||
void vp9_vaq_init() {
|
||||
int i;
|
||||
double base_ratio;
|
||||
|
@ -20,7 +20,6 @@ extern "C" {
|
||||
|
||||
unsigned int vp9_vaq_segment_id(int energy);
|
||||
double vp9_vaq_rdmult_ratio(int energy);
|
||||
double vp9_vaq_inv_q_ratio(int energy);
|
||||
|
||||
void vp9_vaq_init();
|
||||
void vp9_vaq_frame_setup(VP9_COMP *cpi);
|
||||
|
@ -593,7 +593,6 @@ void vp9_first_pass(VP9_COMP *cpi, const struct lookahead_entry *source) {
|
||||
for (mb_col = 0; mb_col < cm->mb_cols; ++mb_col) {
|
||||
int this_error;
|
||||
const int use_dc_pred = (mb_col || mb_row) && (!mb_col || !mb_row);
|
||||
double error_weight = 1.0;
|
||||
const BLOCK_SIZE bsize = get_bsize(cm, mb_row, mb_col);
|
||||
double log_intra;
|
||||
int level_sample;
|
||||
@ -615,11 +614,6 @@ void vp9_first_pass(VP9_COMP *cpi, const struct lookahead_entry *source) {
|
||||
mb_col << 1, num_8x8_blocks_wide_lookup[bsize],
|
||||
cm->mi_rows, cm->mi_cols);
|
||||
|
||||
if (cpi->oxcf.aq_mode == VARIANCE_AQ) {
|
||||
const int energy = vp9_block_energy(cpi, x, bsize);
|
||||
error_weight = vp9_vaq_inv_q_ratio(energy);
|
||||
}
|
||||
|
||||
// Do intra 16x16 prediction.
|
||||
x->skip_encode = 0;
|
||||
xd->mi[0].src_mi->mbmi.mode = DC_PRED;
|
||||
@ -665,11 +659,6 @@ void vp9_first_pass(VP9_COMP *cpi, const struct lookahead_entry *source) {
|
||||
else
|
||||
brightness_factor += 1.0;
|
||||
|
||||
if (cpi->oxcf.aq_mode == VARIANCE_AQ) {
|
||||
vp9_clear_system_state();
|
||||
this_error = (int)(this_error * error_weight);
|
||||
}
|
||||
|
||||
// Intrapenalty below deals with situations where the intra and inter
|
||||
// error scores are very low (e.g. a plain black frame).
|
||||
// We do not have special cases in first pass for 0,0 and nearest etc so
|
||||
@ -741,20 +730,12 @@ void vp9_first_pass(VP9_COMP *cpi, const struct lookahead_entry *source) {
|
||||
// Test last reference frame using the previous best mv as the
|
||||
// starting point (best reference) for the search.
|
||||
first_pass_motion_search(cpi, x, &best_ref_mv, &mv, &motion_error);
|
||||
if (cpi->oxcf.aq_mode == VARIANCE_AQ) {
|
||||
vp9_clear_system_state();
|
||||
motion_error = (int)(motion_error * error_weight);
|
||||
}
|
||||
|
||||
// If the current best reference mv is not centered on 0,0 then do a
|
||||
// 0,0 based search as well.
|
||||
if (!is_zero_mv(&best_ref_mv)) {
|
||||
tmp_err = INT_MAX;
|
||||
first_pass_motion_search(cpi, x, &zero_mv, &tmp_mv, &tmp_err);
|
||||
if (cpi->oxcf.aq_mode == VARIANCE_AQ) {
|
||||
vp9_clear_system_state();
|
||||
tmp_err = (int)(tmp_err * error_weight);
|
||||
}
|
||||
|
||||
if (tmp_err < motion_error) {
|
||||
motion_error = tmp_err;
|
||||
@ -785,10 +766,6 @@ void vp9_first_pass(VP9_COMP *cpi, const struct lookahead_entry *source) {
|
||||
|
||||
first_pass_motion_search(cpi, x, &zero_mv, &tmp_mv,
|
||||
&gf_motion_error);
|
||||
if (cpi->oxcf.aq_mode == VARIANCE_AQ) {
|
||||
vp9_clear_system_state();
|
||||
gf_motion_error = (int)(gf_motion_error * error_weight);
|
||||
}
|
||||
|
||||
if (gf_motion_error < motion_error && gf_motion_error < this_error)
|
||||
++second_ref_count;
|
||||
|
Loading…
Reference in New Issue
Block a user