diff options
author | Jingning Han <jingning@google.com> | 2013-04-06 10:00:53 -0700 |
---|---|---|
committer | Jingning Han <jingning@google.com> | 2013-04-08 11:37:03 -0700 |
commit | 12bf0796e6a4ad75d9ffb2768c362c584441ea05 (patch) | |
tree | 4c0c50ab8f3a3d33882b969d3bc56a1193951e1e /vp9/decoder | |
parent | 0e7b7e47c299277863c6a3b77635321af1f1ee62 (diff) | |
download | libvpx-12bf0796e6a4ad75d9ffb2768c362c584441ea05.tar libvpx-12bf0796e6a4ad75d9ffb2768c362c584441ea05.tar.gz libvpx-12bf0796e6a4ad75d9ffb2768c362c584441ea05.tar.bz2 libvpx-12bf0796e6a4ad75d9ffb2768c362c584441ea05.zip |
Clamp inferred motion vectors only
Clamp only the motion vectors inferred from neighboring reference
macroblocks. The motion vectors obtained through motion search in
NEWMV mode are constrained during the search process, which allows
a relatively larger referencing region than the inferred mvs.
Hence further clamping the best mv provided by the motion search may
affect the efficacy of NEWMV mode.
Synchronized the decoding process. The decoded mvs in NEWMV modes
should be guaranteed to fit in the effective range. Put a mv range
clamping function there for security purpose.
This improves the coding performance of high motion sequences, e.g.,
derf set:
foreman 0.233%
husky 0.175%
icd 0.135%
mother_daughter 0.337%
pamphlet 0.561%
stdhd set:
blue_sky 0.408%
city 0.455%
also saw sunflower goes down by -0.469%.
Change-Id: I3fcbba669e56dab779857a8126a91b926e899cb5
Diffstat (limited to 'vp9/decoder')
-rw-r--r-- | vp9/decoder/vp9_decodemv.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/vp9/decoder/vp9_decodemv.c b/vp9/decoder/vp9_decodemv.c index e033a2435..f081e7174 100644 --- a/vp9/decoder/vp9_decodemv.c +++ b/vp9/decoder/vp9_decodemv.c @@ -1026,11 +1026,6 @@ static void read_mb_modes_mv(VP9D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi, case NEWMV: process_mv(bc, &mv->as_mv, &best_mv.as_mv, nmvc, &cm->fc.NMVcount, xd->allow_high_precision_mv); - - // Don't need to check this on NEARMV and NEARESTMV modes - // since those modes clamp the MV. The NEWMV mode does not, - // so signal to the prediction stage whether special - // handling may be required. mbmi->need_to_clamp_mvs = check_mv_bounds(mv, mb_to_left_edge, mb_to_right_edge, @@ -1040,11 +1035,11 @@ static void read_mb_modes_mv(VP9D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi, if (mbmi->second_ref_frame > 0) { process_mv(bc, &mbmi->mv[1].as_mv, &best_mv_second.as_mv, nmvc, &cm->fc.NMVcount, xd->allow_high_precision_mv); - mbmi->need_to_clamp_secondmv |= check_mv_bounds(&mbmi->mv[1], - mb_to_left_edge, - mb_to_right_edge, - mb_to_top_edge, - mb_to_bottom_edge); + mbmi->need_to_clamp_secondmv = check_mv_bounds(&mbmi->mv[1], + mb_to_left_edge, + mb_to_right_edge, + mb_to_top_edge, + mb_to_bottom_edge); } break; default: |