[x265] [PATCH 3 of 4] search: do not clip MVP in setSearchRange()

Steve Borho steve at borho.org
Thu Apr 30 03:09:49 CEST 2015


# HG changeset patch
# User Steve Borho <steve at borho.org>
# Date 1430337026 18000
#      Wed Apr 29 14:50:26 2015 -0500
# Node ID cbc2004d147bf9566efba942c2a2b3ab35b824f7
# Parent  cfa2dc688db15171115684527a174252237ed85c
search: do not clip MVP in setSearchRange()

The MVP itself should not be clipped, since this will make MVD calculations
incorrect.  Motion estimation is always careful to clip all motion vectors to
within the available pixel range (mvmin/mvmax) during the search, so it is safe
for the MVP to be out of range.

diff -r cfa2dc688db1 -r cbc2004d147b source/encoder/search.cpp
--- a/source/encoder/search.cpp	Wed Apr 29 14:40:48 2015 -0500
+++ b/source/encoder/search.cpp	Wed Apr 29 14:50:26 2015 -0500
@@ -2411,8 +2411,6 @@
 
 void Search::setSearchRange(const CUData& cu, MV mvp, int merange, MV& mvmin, MV& mvmax) const
 {
-    cu.clipMv(mvp);
-
     MV dist((int16_t)merange << 2, (int16_t)merange << 2);
     mvmin = mvp - dist;
     mvmax = mvp + dist;


More information about the x265-devel mailing list