summaryrefslogtreecommitdiff
path: root/vp8/common/generic/systemdependent.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@google.com>2011-12-06 11:53:02 -0800
committerRonald S. Bultje <rbultje@google.com>2011-12-06 11:53:02 -0800
commit60cb39da860c91adc45f51f2dfa193d19598a801 (patch)
tree1d0a7a90a6dfe13b55eb8dc9c537db71bdd54874 /vp8/common/generic/systemdependent.c
parentb4ad9b5d5052b54d74c98c2ee71d5236c39a1537 (diff)
downloadlibvpx-60cb39da860c91adc45f51f2dfa193d19598a801.tar
libvpx-60cb39da860c91adc45f51f2dfa193d19598a801.tar.gz
libvpx-60cb39da860c91adc45f51f2dfa193d19598a801.tar.bz2
libvpx-60cb39da860c91adc45f51f2dfa193d19598a801.zip
Dual 16x16 inter prediction.
This patch introduces the concept of dual inter16x16 prediction. A 16x16 inter-predicted macroblock can use 2 references instead of 1, where both references use the same mvmode (new, near/est, zero). In the case of newmv, this means that two MVs are coded instead of one. The frame can be encoded in 3 ways: all MBs single-prediction, all MBs dual prediction, or per-MB single/dual prediction selection ("hybrid"), in which case a single bit is coded per-MB to indicate whether the MB uses single or dual inter prediction. In the future, we can (maybe?) get further gains by mixing this with Adrian's 32x32 work, per-segment dual prediction settings, or adding support for dual splitmv/8x8mv inter prediction. Gain (on derf-set, CQ mode) is ~2.8% (SSIM) or ~3.6% (glb PSNR). Most gain is at medium/high bitrates, but there's minor gains at low bitrates also. Output was confirmed to match between encoder and decoder. Note for optimization people: this patch introduces a 2nd version of 16x16/8x8 sixtap/bilin functions, which does an avg instead of a store. They may want to look and make sure this is implemented to their satisfaction so we can optimize it best in the future. Change-ID: I59dc84b07cbb3ccf073ac0f756d03d294cb19281
Diffstat (limited to 'vp8/common/generic/systemdependent.c')
-rw-r--r--vp8/common/generic/systemdependent.c28
1 files changed, 20 insertions, 8 deletions
diff --git a/vp8/common/generic/systemdependent.c b/vp8/common/generic/systemdependent.c
index 68ed8aab0..961916314 100644
--- a/vp8/common/generic/systemdependent.c
+++ b/vp8/common/generic/systemdependent.c
@@ -84,6 +84,10 @@ void vp8_machine_specific_config(VP8_COMMON *ctx)
#endif
rtcd->recon.copy16x16 = vp8_copy_mem16x16_c;
rtcd->recon.copy8x8 = vp8_copy_mem8x8_c;
+#if CONFIG_DUALPRED
+ rtcd->recon.avg16x16 = vp8_avg_mem16x16_c;
+ rtcd->recon.avg8x8 = vp8_avg_mem8x8_c;
+#endif /* CONFIG_DUALPRED */
rtcd->recon.copy8x4 = vp8_copy_mem8x4_c;
rtcd->recon.recon = vp8_recon_b_c;
#if CONFIG_I8X8
@@ -112,14 +116,22 @@ void vp8_machine_specific_config(VP8_COMMON *ctx)
#endif
- rtcd->subpix.sixtap16x16 = vp8_sixtap_predict16x16_c;
- rtcd->subpix.sixtap8x8 = vp8_sixtap_predict8x8_c;
- rtcd->subpix.sixtap8x4 = vp8_sixtap_predict8x4_c;
- rtcd->subpix.sixtap4x4 = vp8_sixtap_predict_c;
- rtcd->subpix.bilinear16x16 = vp8_bilinear_predict16x16_c;
- rtcd->subpix.bilinear8x8 = vp8_bilinear_predict8x8_c;
- rtcd->subpix.bilinear8x4 = vp8_bilinear_predict8x4_c;
- rtcd->subpix.bilinear4x4 = vp8_bilinear_predict4x4_c;
+ rtcd->subpix.sixtap16x16 = vp8_sixtap_predict16x16_c;
+ rtcd->subpix.sixtap8x8 = vp8_sixtap_predict8x8_c;
+#if CONFIG_DUALPRED
+ rtcd->subpix.sixtap_avg16x16 = vp8_sixtap_predict_avg16x16_c;
+ rtcd->subpix.sixtap_avg8x8 = vp8_sixtap_predict_avg8x8_c;
+#endif /* CONFIG_DUALPRED */
+ rtcd->subpix.sixtap8x4 = vp8_sixtap_predict8x4_c;
+ rtcd->subpix.sixtap4x4 = vp8_sixtap_predict_c;
+ rtcd->subpix.bilinear16x16 = vp8_bilinear_predict16x16_c;
+ rtcd->subpix.bilinear8x8 = vp8_bilinear_predict8x8_c;
+#if CONFIG_DUALPRED
+ rtcd->subpix.bilinear_avg16x16 = vp8_bilinear_predict_avg16x16_c;
+ rtcd->subpix.bilinear_avg8x8 = vp8_bilinear_predict_avg8x8_c;
+#endif /* CONFIG_DUALPRED */
+ rtcd->subpix.bilinear8x4 = vp8_bilinear_predict8x4_c;
+ rtcd->subpix.bilinear4x4 = vp8_bilinear_predict4x4_c;
rtcd->loopfilter.normal_mb_v = vp8_loop_filter_mbv_c;
rtcd->loopfilter.normal_b_v = vp8_loop_filter_bv_c;