Start adaptive threshold for each mode at max.
Each frame we reset all adaptive thresholds to MAX rather than base. As modes are picked their thresholds drop down. Change-Id: Ia37f03a73003c2d9bfcda57edea07205e9a0e5e8
This commit is contained in:
parent
e606cac046
commit
689957e3ad
@ -397,24 +397,6 @@ static void update_state(VP9_COMP *cpi, PICK_MODE_CONTEXT *ctx,
|
|||||||
cpi->mode_chosen_counts[kf_mode_index[mb_mode]]++;
|
cpi->mode_chosen_counts[kf_mode_index[mb_mode]]++;
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
/*
|
|
||||||
// Reduce the activation RD thresholds for the best choice mode
|
|
||||||
if ((cpi->rd_baseline_thresh[mb_mode_index] > 0) &&
|
|
||||||
(cpi->rd_baseline_thresh[mb_mode_index] < (INT_MAX >> 2)))
|
|
||||||
{
|
|
||||||
int best_adjustment = (cpi->rd_thresh_mult[mb_mode_index] >> 2);
|
|
||||||
|
|
||||||
cpi->rd_thresh_mult[mb_mode_index] =
|
|
||||||
(cpi->rd_thresh_mult[mb_mode_index]
|
|
||||||
>= (MIN_THRESHMULT + best_adjustment)) ?
|
|
||||||
cpi->rd_thresh_mult[mb_mode_index] - best_adjustment :
|
|
||||||
MIN_THRESHMULT;
|
|
||||||
cpi->rd_threshes[mb_mode_index] =
|
|
||||||
(cpi->rd_baseline_thresh[mb_mode_index] >> 7)
|
|
||||||
* cpi->rd_thresh_mult[mb_mode_index];
|
|
||||||
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
// Note how often each mode chosen as best
|
// Note how often each mode chosen as best
|
||||||
cpi->mode_chosen_counts[mb_mode_index]++;
|
cpi->mode_chosen_counts[mb_mode_index]++;
|
||||||
if (mbmi->ref_frame[0] != INTRA_FRAME
|
if (mbmi->ref_frame[0] != INTRA_FRAME
|
||||||
|
@ -227,7 +227,8 @@ void vp9_initialize_rd_consts(VP9_COMP *cpi, int qindex) {
|
|||||||
cpi->rd_threshes[bsize][i] = INT_MAX;
|
cpi->rd_threshes[bsize][i] = INT_MAX;
|
||||||
}
|
}
|
||||||
cpi->rd_baseline_thresh[bsize][i] = cpi->rd_threshes[bsize][i];
|
cpi->rd_baseline_thresh[bsize][i] = cpi->rd_threshes[bsize][i];
|
||||||
cpi->rd_thresh_freq_fact[bsize][i] = BASE_RD_THRESH_FREQ_FACT;
|
|
||||||
|
cpi->rd_thresh_freq_fact[bsize][i] = MAX_RD_THRESH_FREQ_FACT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -247,7 +248,7 @@ void vp9_initialize_rd_consts(VP9_COMP *cpi, int qindex) {
|
|||||||
cpi->rd_threshes[bsize][i] = INT_MAX;
|
cpi->rd_threshes[bsize][i] = INT_MAX;
|
||||||
}
|
}
|
||||||
cpi->rd_baseline_thresh[bsize][i] = cpi->rd_threshes[bsize][i];
|
cpi->rd_baseline_thresh[bsize][i] = cpi->rd_threshes[bsize][i];
|
||||||
cpi->rd_thresh_freq_fact[bsize][i] = BASE_RD_THRESH_FREQ_FACT;
|
cpi->rd_thresh_freq_fact[bsize][i] = MAX_RD_THRESH_FREQ_FACT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user