ref: ee1b3f34c032f6ec8fe2bb0e899ae03234fd98c6
parent: a7d116aa67797b7dc14ad735bb75fe499b0b76ff
author: Marco <marpan@google.com>
date: Fri Oct 21 07:11:34 EDT 2016
vp9: Nonrd variance partition: increase threshold for using 4x4 avg. In variance partition low resolutions may use varianace based on 4x4 average for better partitioning. Increase the threshold for doing this at speed = 8. Improves speed by ~5%, with little loss, < 1%, on RTC_derf set. Change-Id: Ib5ec420832ccff887a06cb5e1d2c73199b093941
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -799,6 +799,7 @@
int min_var_32x32 = INT_MAX;
int var_32x32;
int avg_16x16[4];
+ int64_t threshold_4x4avg;
NOISE_LEVEL noise_level = kLow;
uint8_t *s;
const uint8_t *d;
@@ -833,6 +834,9 @@
}
}
+ threshold_4x4avg =
+ (cpi->oxcf.speed < 8) ? thresholds[1] << 1 : thresholds[2] >> 1;
+
memset(x->variance_low, 0, sizeof(x->variance_low));
if (xd->mb_to_right_edge < 0) pixels_wide += (xd->mb_to_right_edge >> 3);
@@ -999,7 +1003,7 @@
}
if (is_key_frame || (low_res &&
vt.split[i].split[j].part_variances.none.variance >
- (thresholds[1] << 1))) {
+ threshold_4x4avg)) {
force_split[split_index] = 0;
// Go down to 4x4 down-sampling for variance.
variance4x4downsample[i2 + j] = 1;