else if (noise_level < kLow)
threshold_base = (7 * threshold_base) >> 3;
}
+ if (cpi->oxcf.speed >= 8 && cm->width <= 640 && cm->height <= 480)
+ threshold_base = (5 * threshold_base) >> 2;
thresholds[0] = threshold_base;
thresholds[2] = threshold_base << cpi->oxcf.speed;
if (cm->width <= 352 && cm->height <= 288) {
}
}
+// Adjust the ac_thr according to speed, width, height and normalized sum
+static int ac_thr_factor(const int speed, const int width, const int height,
+ const int norm_sum) {
+ if (speed >= 8 && norm_sum < 5) {
+ if (width <= 640 && height <= 480)
+ return 4;
+ else
+ return 2;
+ }
+ return 1;
+}
+
static void model_rd_for_sb_y_large(VP9_COMP *cpi, BLOCK_SIZE bsize,
MACROBLOCK *x, MACROBLOCKD *xd,
int *out_rate_sum, int64_t *out_dist_sum,
const uint32_t dc_quant = pd->dequant[0];
const uint32_t ac_quant = pd->dequant[1];
const int64_t dc_thr = dc_quant * dc_quant >> 6;
- const int64_t ac_thr = ac_quant * ac_quant >> 6;
+ int64_t ac_thr = ac_quant * ac_quant >> 6;
unsigned int var;
int sum;
int skip_dc = 0;
*var_y = var;
*sse_y = sse;
+ ac_thr *= ac_thr_factor(cpi->oxcf.speed, cpi->common.width,
+ cpi->common.height, abs(sum) >> (bw + bh));
+
if (cpi->common.tx_mode == TX_MODE_SELECT) {
if (sse > (var << 2))
tx_size = VPXMIN(max_txsize_lookup[bsize],