summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_variance.c
diff options
context:
space:
mode:
authorYunqing Wang <yunqingwang@google.com>2014-04-01 17:32:20 -0700
committerYunqing Wang <yunqingwang@google.com>2014-04-08 17:03:02 -0700
commit4e66293fcb5b4779490faf8f40300e7e0096640e (patch)
treed770fe0a5fe94c6363be6a25c591208537d87ec5 /vp9/encoder/vp9_variance.c
parent06159fcd18b3438bb703a2baff4019aa6393b267 (diff)
downloadlibvpx-4e66293fcb5b4779490faf8f40300e7e0096640e.tar
libvpx-4e66293fcb5b4779490faf8f40300e7e0096640e.tar.gz
libvpx-4e66293fcb5b4779490faf8f40300e7e0096640e.tar.bz2
libvpx-4e66293fcb5b4779490faf8f40300e7e0096640e.zip
Use source frame difference to make partition decision
Calculate the difference variance between last source frame and current source frame. The variance is calculated at 16x16 block level. The variances are compared to several thresholds to decide final partition sizes. An adaptive strategy is implemented to decide using SOURCE_VAR_BASED_PARTITION or FIXED_PARTITION based on motions in the video. The switching test is done once every search_type_check_frequency frames. The selection of source_var_thresh needs to be investigated further later. RTC set Borg test showed 0.424% overall psnr gain, and 0.357% ssim gain. For clips with large enough static area, the encoding speedup is around 2% to 15%. Change-Id: Id7d268f1d8cbca7fb8026aa4a53b3c77459dc156
Diffstat (limited to 'vp9/encoder/vp9_variance.c')
-rw-r--r--vp9/encoder/vp9_variance.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/vp9/encoder/vp9_variance.c b/vp9/encoder/vp9_variance.c
index 996f730ef..71867a938 100644
--- a/vp9/encoder/vp9_variance.c
+++ b/vp9/encoder/vp9_variance.c
@@ -417,6 +417,12 @@ unsigned int vp9_variance32x32_c(const uint8_t *src_ptr,
return (var - (((int64_t)avg * avg) >> 10));
}
+void vp9_get_sse_sum_16x16_c(const uint8_t *src_ptr, int source_stride,
+ const uint8_t *ref_ptr, int ref_stride,
+ unsigned int *sse, int *sum) {
+ variance(src_ptr, source_stride, ref_ptr, ref_stride, 16, 16, sse, sum);
+}
+
unsigned int vp9_variance16x16_c(const uint8_t *src_ptr,
int source_stride,
const uint8_t *ref_ptr,