]> granicus.if.org Git - libvpx/commitdiff
Adjust the vbp early termination threshold slightly
authorYunqing Wang <yunqingwang@google.com>
Mon, 27 Apr 2015 19:40:00 +0000 (12:40 -0700)
committerYunqing Wang <yunqingwang@google.com>
Thu, 30 Apr 2015 15:51:02 +0000 (08:51 -0700)
Calculated cpi->vbp_threshold_sad from this frame's dequant value.
The encoding quality and speed didn't change much. Borg test
result: PSNR: -0.002%, SSIM: -0.003%.

Change-Id: I97c9826986f39582f29910d637d08a69c90afdee

vp9/encoder/vp9_encodeframe.c

index fa7a694c532199290e6ed3e6007887d5c01e7405..cd50ccfd936b3f7f1e4bd5800a7ef5dd32c6ea51 100644 (file)
@@ -499,7 +499,8 @@ void vp9_set_vbp_thresholds(VP9_COMP *cpi, int q) {
         cpi->vbp_thresholds[0] = threshold_base;
         cpi->vbp_thresholds[1] = (5 * threshold_base) >> 2;
         cpi->vbp_thresholds[2] = threshold_base << cpi->oxcf.speed;
-        cpi->vbp_threshold_sad = 1000;
+        cpi->vbp_threshold_sad = (cpi->y_dequant[q][1] << 1) > 1000 ?
+            (cpi->y_dequant[q][1] << 1) : 1000;
       }
       cpi->vbp_bsize_min = BLOCK_16X16;
     }