diff options
author | Jerome Jiang <jianj@google.com> | 2017-07-30 18:57:44 -0700 |
---|---|---|
committer | Jerome Jiang <jianj@google.com> | 2017-07-30 19:49:31 -0700 |
commit | f027908ad0011fd71e777e107353cd960c387960 (patch) | |
tree | 3be97c63ea6175006c8ee09df6c77485174c2e69 /vp9/encoder/vp9_encodeframe.c | |
parent | facb124941b0a88c7591d09fefe6a7736afea04a (diff) | |
download | libvpx-f027908ad0011fd71e777e107353cd960c387960.tar libvpx-f027908ad0011fd71e777e107353cd960c387960.tar.gz libvpx-f027908ad0011fd71e777e107353cd960c387960.tar.bz2 libvpx-f027908ad0011fd71e777e107353cd960c387960.zip |
Revert "Revert "vp9: Speed feature to adapt partition based on source_sad.""
This reverts commit c9266b85476aadf078238b7bde3c36bf7953e11c.
Disable source_sad when resolution > 1080P. The test should
pass now.
BUG=webm:1452
Change-Id: I72dde88e66590ff9e41da5e5dd83f5550a83f082
Diffstat (limited to 'vp9/encoder/vp9_encodeframe.c')
-rw-r--r-- | vp9/encoder/vp9_encodeframe.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c index b927bac02..0f486ad4f 100644 --- a/vp9/encoder/vp9_encodeframe.c +++ b/vp9/encoder/vp9_encodeframe.c @@ -981,8 +981,8 @@ static void chroma_check(VP9_COMP *cpi, MACROBLOCK *x, int bsize, } } -static void avg_source_sad(VP9_COMP *cpi, MACROBLOCK *x, int shift, - int sb_offset) { +static uint64_t avg_source_sad(VP9_COMP *cpi, MACROBLOCK *x, int shift, + int sb_offset) { unsigned int tmp_sse; uint64_t tmp_sad; unsigned int tmp_variance; @@ -994,7 +994,7 @@ static void avg_source_sad(VP9_COMP *cpi, MACROBLOCK *x, int shift, uint64_t avg_source_sad_threshold = 10000; uint64_t avg_source_sad_threshold2 = 12000; #if CONFIG_VP9_HIGHBITDEPTH - if (cpi->common.use_highbitdepth) return; + if (cpi->common.use_highbitdepth) return 0; #endif src_y += shift; last_src_y += shift; @@ -1026,7 +1026,7 @@ static void avg_source_sad(VP9_COMP *cpi, MACROBLOCK *x, int shift, cpi->content_state_sb_fd[sb_offset] = 0; } } - return; + return tmp_sad; } // This function chooses partitioning based on the variance between source and @@ -4168,7 +4168,9 @@ static void encode_nonrd_sb_row(VP9_COMP *cpi, ThreadData *td, if (cpi->compute_source_sad_onepass && cpi->sf.use_source_sad) { int shift = cpi->Source->y_stride * (mi_row << 3) + (mi_col << 3); int sb_offset2 = ((cm->mi_cols + 7) >> 3) * (mi_row >> 3) + (mi_col >> 3); - avg_source_sad(cpi, x, shift, sb_offset2); + int64_t source_sad = avg_source_sad(cpi, x, shift, sb_offset2); + if (sf->adapt_partition_source_sad && source_sad > 40000) + partition_search_type = REFERENCE_PARTITION; } // Set the partition type of the 64X64 block |