vp9: Adjust the threshold to set avg_source_sad_sb flag.
Affect only speed 8. Small/Negligible regression on rtc set. Change-Id: I67a6b6b4008a22ed798bd980336d95bb799f64b4
This commit is contained in:
parent
b71ff28a1a
commit
40ffa2839f
@ -2246,6 +2246,8 @@ void vp9_avg_source_sad(VP9_COMP *cpi) {
|
|||||||
int num_samples = 0;
|
int num_samples = 0;
|
||||||
int sb_cols = (cm->mi_cols + MI_BLOCK_SIZE - 1) / MI_BLOCK_SIZE;
|
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;
|
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) {
|
if (cpi->oxcf.lag_in_frames > 0) {
|
||||||
src_y = frames[frame]->y_buffer;
|
src_y = frames[frame]->y_buffer;
|
||||||
src_ystride = frames[frame]->y_stride;
|
src_ystride = frames[frame]->y_stride;
|
||||||
@ -2264,7 +2266,8 @@ void vp9_avg_source_sad(VP9_COMP *cpi) {
|
|||||||
tmp_sad = cpi->fn_ptr[bsize].sdf(src_y, src_ystride, last_src_y,
|
tmp_sad = cpi->fn_ptr[bsize].sdf(src_y, src_ystride, last_src_y,
|
||||||
last_src_ystride);
|
last_src_ystride);
|
||||||
if (cpi->sf.use_source_sad)
|
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;
|
avg_sad += tmp_sad;
|
||||||
num_samples++;
|
num_samples++;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user