From 2b26cf17862949123618d2dbe60a661fbb7eb4a9 Mon Sep 17 00:00:00 2001 From: Deb Mukherjee Date: Thu, 6 Sep 2012 09:07:42 -0700 Subject: Adds feature for companded MV encoding The high-precision (1/8) pel bit is turned off if the reference MV is larger than a threshold. The motivation for this patch is the intuition that if motion is likely large (as indicated by the reference), there is likley to be more motion blur, and as a result 1/8 pel precision would be wasteful both in rd sense as well as computationally. The feature is incorporated as part of the newmventropy experiment. There is a modest RD improvement with the patch. Overall the results with the newmventropy experiment with the threshold being 16 integer pels are: derf: +0.279% std-hd: +0.617% hd: +1.299% yt: +0.822% With threshold 8 integer pels are: derf: +0.295% std-hd: +0.623% hd: +1.365% yt: +0.847% Patch: rebased Patch: rebase fixes Change-Id: I4ed14600df3c457944e6541ed407cb6e91fe428b --- vp8/decoder/decodemv.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'vp8/decoder') diff --git a/vp8/decoder/decodemv.c b/vp8/decoder/decodemv.c index 8d0f94e65..7f7567e4e 100644 --- a/vp8/decoder/decodemv.c +++ b/vp8/decoder/decodemv.c @@ -244,6 +244,7 @@ static void read_nmv(vp8_reader *r, MV *mv, const MV *ref, static void read_nmv_fp(vp8_reader *r, MV *mv, const MV *ref, const nmv_context *mvctx, int usehp) { MV_JOINT_TYPE j = vp8_get_mv_joint(*mv); + usehp = usehp && vp8_use_nmv_hp(ref); if (j == MV_JOINT_HZVNZ || j == MV_JOINT_HNZVNZ) { mv->row = read_nmv_component_fp(r, mv->row, ref->row, &mvctx->comps[0], usehp); @@ -252,6 +253,7 @@ static void read_nmv_fp(vp8_reader *r, MV *mv, const MV *ref, mv->col = read_nmv_component_fp(r, mv->col, ref->col, &mvctx->comps[1], usehp); } + //printf(" %d: %d %d ref: %d %d\n", usehp, mv->row, mv-> col, ref->row, ref->col); } static void update_nmv(vp8_reader *bc, vp8_prob *const p, -- cgit v1.2.3