summaryrefslogtreecommitdiff
path: root/vp8/encoder/encodeframe.c
diff options
context:
space:
mode:
authorPaul Wilkins <paulwilkins@google.com>2012-02-08 15:52:07 +0000
committerPaul Wilkins <paulwilkins@google.com>2012-02-09 15:27:20 +0000
commit59a200f1ea73d2327746fff3d35a05aec10e436f (patch)
tree06e8c70328f7e7d7e146375bd7565ad2b773d558 /vp8/encoder/encodeframe.c
parent915f13bd5972c7e004b48533a455c9c7b7bc6d2d (diff)
downloadlibvpx-59a200f1ea73d2327746fff3d35a05aec10e436f.tar
libvpx-59a200f1ea73d2327746fff3d35a05aec10e436f.tar.gz
libvpx-59a200f1ea73d2327746fff3d35a05aec10e436f.tar.bz2
libvpx-59a200f1ea73d2327746fff3d35a05aec10e436f.zip
Changes to coding of dual_pred flag.
Further use of common prediction functions and experiments with alternate contexts based on mode and reference frame. For the Derf set using reference frame as basis of context gives +0.18% Overall Psnr and +0.08 SSIM Change-Id: Ie7eb76f329f74c9c698614f01ece31de0b6bfc9e
Diffstat (limited to 'vp8/encoder/encodeframe.c')
-rw-r--r--vp8/encoder/encodeframe.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/vp8/encoder/encodeframe.c b/vp8/encoder/encodeframe.c
index 388d8a6bb..b12a41aa0 100644
--- a/vp8/encoder/encodeframe.c
+++ b/vp8/encoder/encodeframe.c
@@ -1811,13 +1811,21 @@ int vp8cx_encode_inter_macroblock
if (x->e_mbd.mode_info_context->mbmi.ref_frame &&
x->e_mbd.mode_info_context->mbmi.mode != SPLITMV)
{
- MB_MODE_INFO *t = &x->e_mbd.mode_info_context[-cpi->common.mode_info_stride].mbmi;
+ unsigned char pred_context;
+
+#if CONFIG_COMPRED
+ pred_context = get_pred_context( cm, xd, PRED_DUAL );
+#else
+ MB_MODE_INFO *t = &x->e_mbd.mode_info_context
+ [-cpi->common.mode_info_stride].mbmi;
MB_MODE_INFO *l = &x->e_mbd.mode_info_context[-1].mbmi;
- int cnt = (t->second_ref_frame != INTRA_FRAME) + (l->second_ref_frame != INTRA_FRAME);
- if (x->e_mbd.mode_info_context->mbmi.second_ref_frame == INTRA_FRAME)
- cpi->single_pred_count[cnt]++;
+ pred_context = (t->second_ref_frame != INTRA_FRAME) +
+ (l->second_ref_frame != INTRA_FRAME);
+#endif
+ if (xd->mode_info_context->mbmi.second_ref_frame == INTRA_FRAME)
+ cpi->single_pred_count[pred_context]++;
else
- cpi->dual_pred_count[cnt]++;
+ cpi->dual_pred_count[pred_context]++;
}
#endif /* CONFIG_DUALPRED */