summaryrefslogtreecommitdiff
path: root/vp9/encoder
diff options
context:
space:
mode:
authorMarco Paniconi <marpan@google.com>2016-11-11 17:11:19 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2016-11-11 17:11:19 +0000
commitb6f616934880342224e717c94dcf9ec4bb5d7897 (patch)
tree8a4054517b2568f2fabef992edef38e84000fc3b /vp9/encoder
parentba016b710a651a2fc564ba4c581d4ff529ae6ff1 (diff)
parent18794d8ddc5b30358a35dbad4cc1af1be9472366 (diff)
downloadlibvpx-b6f616934880342224e717c94dcf9ec4bb5d7897.tar
libvpx-b6f616934880342224e717c94dcf9ec4bb5d7897.tar.gz
libvpx-b6f616934880342224e717c94dcf9ec4bb5d7897.tar.bz2
libvpx-b6f616934880342224e717c94dcf9ec4bb5d7897.zip
Merge "vp9: Adjust thresholds for limiting cyclic refresh for noisy content."
Diffstat (limited to 'vp9/encoder')
-rw-r--r--vp9/encoder/vp9_aq_cyclicrefresh.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/vp9/encoder/vp9_aq_cyclicrefresh.c b/vp9/encoder/vp9_aq_cyclicrefresh.c
index 072d92e4e..862f47288 100644
--- a/vp9/encoder/vp9_aq_cyclicrefresh.c
+++ b/vp9/encoder/vp9_aq_cyclicrefresh.c
@@ -383,13 +383,14 @@ static void cyclic_refresh_update_map(VP9_COMP *const cpi) {
: vp9_get_qindex(&cm->seg, CR_SEGMENT_ID_BOOST1, cm->base_qindex);
// More aggressive settings for noisy content.
if (cpi->noise_estimate.enabled && cpi->noise_estimate.level >= kMedium) {
- consec_zero_mv_thresh = 80;
+ consec_zero_mv_thresh = 60;
qindex_thresh =
VPXMAX(vp9_get_qindex(&cm->seg, CR_SEGMENT_ID_BOOST1, cm->base_qindex),
- 7 * cm->base_qindex >> 3);
+ cm->base_qindex);
}
do {
int sum_map = 0;
+ int consec_zero_mv_thresh_block = consec_zero_mv_thresh;
// Get the mi_row/mi_col corresponding to superblock index i.
int sb_row_index = (i / sb_cols);
int sb_col_index = i - sb_row_index * sb_cols;
@@ -403,6 +404,9 @@ static void cyclic_refresh_update_map(VP9_COMP *const cpi) {
VPXMIN(cm->mi_cols - mi_col, num_8x8_blocks_wide_lookup[BLOCK_64X64]);
ymis =
VPXMIN(cm->mi_rows - mi_row, num_8x8_blocks_high_lookup[BLOCK_64X64]);
+ if (cpi->noise_estimate.enabled && cpi->noise_estimate.level >= kMedium &&
+ (xmis <= 2 || ymis <= 2))
+ consec_zero_mv_thresh_block = 10;
for (y = 0; y < ymis; y++) {
for (x = 0; x < xmis; x++) {
const int bl_index2 = bl_index + y * cm->mi_cols + x;
@@ -412,7 +416,7 @@ static void cyclic_refresh_update_map(VP9_COMP *const cpi) {
if (cr->map[bl_index2] == 0) {
count_tot++;
if (cr->last_coded_q_map[bl_index2] > qindex_thresh ||
- cpi->consec_zero_mv[bl_index2] < consec_zero_mv_thresh) {
+ cpi->consec_zero_mv[bl_index2] < consec_zero_mv_thresh_block) {
sum_map++;
count_sel++;
}