AV1 RT: Adjust VBP thresholds for speed 9
~10% speed up on RTC test set with 1.7% BDRate decrease
Change-Id: I6d322019915090098dc82a7163b5290ec0421302
diff --git a/av1/encoder/var_based_part.c b/av1/encoder/var_based_part.c
index 106b071..ec664d9 100644
--- a/av1/encoder/var_based_part.c
+++ b/av1/encoder/var_based_part.c
@@ -394,7 +394,6 @@
scale_part_thresh_content(threshold_base, cpi->oxcf.speed, cm->width,
cm->height, cpi->svc.non_reference_frame);
#endif
-
thresholds[0] = threshold_base >> 1;
thresholds[1] = threshold_base;
thresholds[3] = threshold_base << cpi->oxcf.speed;
@@ -445,6 +444,11 @@
else
weight =
1.0 - (current_qindex - QINDEX_LARGE_BLOCK_THR + win) / (2 * win);
+ if (cm->width * cm->height > 640 * 360) {
+ for (int i = 0; i < 4; i++) {
+ thresholds[i] <<= 1;
+ }
+ }
if (cm->width * cm->height <= 352 * 288) {
thresholds[1] <<= 2;
thresholds[2] <<= 5;
@@ -469,7 +473,7 @@
thresholds[1] =
(int)((1 - weight) * (thresholds[1] << 2) + weight * thresholds[1]);
thresholds[2] =
- (int)((1 - weight) * (thresholds[2] << 5) + weight * thresholds[2]);
+ (int)((1 - weight) * (thresholds[2] << 4) + weight * thresholds[2]);
thresholds[3] = INT32_MAX;
}
}