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 /vpxenc.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 'vpxenc.c')
-rw-r--r-- | vpxenc.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1481,7 +1481,7 @@ static void show_rate_histogram(struct rate_hist *hist, #define mmin(a, b) ((a) < (b) ? (a) : (b)) static void find_mismatch(vpx_image_t *img1, vpx_image_t *img2, - int yloc[2], int uloc[2], int vloc[2]) { + int yloc[4], int uloc[4], int vloc[4]) { const unsigned int bsize = 64; const unsigned int bsize2 = bsize >> 1; unsigned int match = 1; @@ -1510,6 +1510,7 @@ static void find_mismatch(vpx_image_t *img1, vpx_image_t *img2, } } } + uloc[0] = uloc[1] = uloc[2] = uloc[3] = -1; for (i = 0, match = 1; match && i < (img1->d_h + 1) / 2; i += bsize2) { for (j = 0; j < match && (img1->d_w + 1) / 2; j += bsize2) { |