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/encoder/vp9_rdopt.c | |
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/encoder/vp9_rdopt.c')
-rw-r--r-- | vp9/encoder/vp9_rdopt.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c index 35e204aff..97a5cb994 100644 --- a/vp9/encoder/vp9_rdopt.c +++ b/vp9/encoder/vp9_rdopt.c @@ -3706,7 +3706,11 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, for (i = 0; i < num_refs; ++i) { cur_mv[i] = frame_mv[this_mode][refs[i]]; // Clip "next_nearest" so that it does not extend to far out of image - clamp_mv2(&cur_mv[i], xd); + if (this_mode == NEWMV) + assert(!clamp_mv2(&cur_mv[i], xd)); + else + clamp_mv2(&cur_mv[i], xd); + if (mv_check_bounds(x, &cur_mv[i])) return INT64_MAX; mbmi->mv[i].as_int = cur_mv[i].as_int; |