[x265] [PATCH 3 of 5] search: improve comments and check strings in mergeEstimation()

Steve Borho steve at borho.org
Wed Feb 25 03:17:43 CET 2015


# HG changeset patch
# User Steve Borho <steve at borho.org>
# Date 1424804246 21600
#      Tue Feb 24 12:57:26 2015 -0600
# Node ID 1880722d4edde648f753cd83ff597d8254e8df59
# Parent  e92e2fa6514e033e57e1bad8b0e0def7de362092
search: improve comments and check strings in mergeEstimation()

diff -r e92e2fa6514e -r 1880722d4edd source/encoder/search.cpp
--- a/source/encoder/search.cpp	Tue Feb 24 12:53:13 2015 -0600
+++ b/source/encoder/search.cpp	Tue Feb 24 12:57:26 2015 -0600
@@ -1806,16 +1806,16 @@
     return totalDistortion;
 }
 
-/* estimation of best merge coding of an inter PU (not a merge CU) */
+/* estimation of best merge coding of an inter PU (2Nx2N merge PUs are evaluated as their own mode) */
 uint32_t Search::mergeEstimation(CUData& cu, const CUGeom& cuGeom, const PredictionUnit& pu, int puIdx, MergeData& m)
 {
-    X265_CHECK(cu.m_partSize[0] != SIZE_2Nx2N, "merge tested on non-2Nx2N partition\n");
+    X265_CHECK(cu.m_partSize[0] != SIZE_2Nx2N, "mergeEstimation() called for 2Nx2N\n");
 
     m.maxNumMergeCand = cu.getInterMergeCandidates(pu.puAbsPartIdx, puIdx, m.mvFieldNeighbours, m.interDirNeighbours);
 
     if (cu.isBipredRestriction())
     {
-        /* in 8x8 CUs do not allow bidir merge candidates if not 2Nx2N */
+        /* do not allow bidir merge candidates if PU is smaller than 8x8, drop L1 reference */
         for (uint32_t mergeCand = 0; mergeCand < m.maxNumMergeCand; ++mergeCand)
         {
             if (m.interDirNeighbours[mergeCand] == 3)


More information about the x265-devel mailing list