ref: 40ffa2839f115beaa805159a74eef07ee36faa45
parent: b71ff28a1aa9f9338083feb0063c3bea6c6c5103
author: Jerome Jiang <[email protected]>
date: Mon Jan 23 10:58:15 EST 2017
vp9: Adjust the threshold to set avg_source_sad_sb flag. Affect only speed 8. Small/Negligible regression on rtc set. Change-Id: I67a6b6b4008a22ed798bd980336d95bb799f64b4
--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -2246,6 +2246,8 @@
int num_samples = 0;
int sb_cols = (cm->mi_cols + MI_BLOCK_SIZE - 1) / MI_BLOCK_SIZE;
int sb_rows = (cm->mi_rows + MI_BLOCK_SIZE - 1) / MI_BLOCK_SIZE;
+ uint64_t avg_source_sad_threshold = 5000;
+ if (cpi->oxcf.speed >= 8) avg_source_sad_threshold = 10000;
if (cpi->oxcf.lag_in_frames > 0) {
src_y = frames[frame]->y_buffer;
src_ystride = frames[frame]->y_stride;
@@ -2264,7 +2266,8 @@
tmp_sad = cpi->fn_ptr[bsize].sdf(src_y, src_ystride, last_src_y,
last_src_ystride);
if (cpi->sf.use_source_sad)
- cpi->avg_source_sad_sb[num_samples] = tmp_sad < 5000 ? 1 : 0;
+ cpi->avg_source_sad_sb[num_samples] =
+ tmp_sad < avg_source_sad_threshold ? 1 : 0;
avg_sad += tmp_sad;
num_samples++;
}