From 60cb39da860c91adc45f51f2dfa193d19598a801 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Tue, 6 Dec 2011 11:53:02 -0800 Subject: 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 --- vp8/common/generic/systemdependent.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) (limited to 'vp8/common/generic/systemdependent.c') 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; -- cgit v1.2.3