From 2ff2376fbcb240c202a51d0f77b339da4ee63450 Mon Sep 17 00:00:00 2001 From: Jerome Jiang Date: Thu, 12 Jan 2017 17:59:22 -0800 Subject: [PATCH] vp9: Update threshold for partition copy. Avoid many visual artifacts. Compression quality is improved by more than 1%. Encode speed is about 4% for QVGA and 6% for VGA faster on android. Change-Id: I4dd0a81429ddf7efdef1e80a191da5fb8de8e8af --- vp9/encoder/vp9_encodeframe.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c index 096ff4f61..e11307ef7 100644 --- a/vp9/encoder/vp9_encodeframe.c +++ b/vp9/encoder/vp9_encodeframe.c @@ -527,11 +527,13 @@ void vp9_set_variance_partition_thresholds(VP9_COMP *cpi, int q) { : 1000; cpi->vbp_bsize_min = BLOCK_16X16; if (cm->width <= 352 && cm->height <= 288) - cpi->vbp_threshold_copy = 40960; + cpi->vbp_threshold_copy = 4000; + else if (cm->width <= 640 && cm->height <= 360) + cpi->vbp_threshold_copy = 9000; else - cpi->vbp_threshold_copy = (cpi->y_dequant[q][1] << 6) > 32000 - ? (cpi->y_dequant[q][1] << 6) - : 32000; + cpi->vbp_threshold_copy = (cpi->y_dequant[q][1] << 5) > 16000 + ? (cpi->y_dequant[q][1] << 5) + : 16000; } cpi->vbp_threshold_minmax = 15 + (q >> 3); }