[x265] [PATCH] bugfix: encode only once the final best mode when picturecsp=400 and not merge2Nx2N

santhoshini at multicorewareinc.com santhoshini at multicorewareinc.com
Fri Jul 22 11:03:25 CEST 2016


# HG changeset patch
# User Santhoshini Sekar<santhoshini at multicorewareinc.com>
# Date 1469173422 -19800
#      Fri Jul 22 13:13:42 2016 +0530
# Node ID ffe85684abfc3fb33e68036a81b00aee8edf71bc
# Parent  2737c6ff5f80895356c439ba225b06cb46e32db4
bugfix: encode only once the final best mode when picturecsp=400 and not merge2Nx2N

diff -r 2737c6ff5f80 -r ffe85684abfc source/encoder/analysis.cpp
--- a/source/encoder/analysis.cpp	Tue Jul 19 21:13:13 2016 +0200
+++ b/source/encoder/analysis.cpp	Fri Jul 22 13:13:42 2016 +0530
@@ -1731,17 +1731,18 @@
                     ProfileCounter(parentCTU, skippedIntraCU[cuGeom.depth]);
                 }
             }
-            if ((md.bestMode->cu.isInter(0) && !(md.bestMode->cu.m_mergeFlag[0] && md.bestMode->cu.m_partSize[0] == SIZE_2Nx2N)) && (m_frame->m_fencPic->m_picCsp == X265_CSP_I400 && m_csp != X265_CSP_I400))
+        }
+
+        if ((md.bestMode->cu.isInter(0) && !(md.bestMode->cu.m_mergeFlag[0] && md.bestMode->cu.m_partSize[0] == SIZE_2Nx2N)) && (m_frame->m_fencPic->m_picCsp == X265_CSP_I400 && m_csp != X265_CSP_I400))
+        {
+            uint32_t numPU = md.bestMode->cu.getNumPartInter(0);
+
+            for (uint32_t puIdx = 0; puIdx < numPU; puIdx++)
             {
-                uint32_t numPU = md.bestMode->cu.getNumPartInter(0);
-
-                for (uint32_t puIdx = 0; puIdx < numPU; puIdx++)
-                {
-                    PredictionUnit pu(md.bestMode->cu, cuGeom, puIdx);
-                    motionCompensation(md.bestMode->cu, pu, md.bestMode->predYuv, false, m_csp != X265_CSP_I400);
-                }
-                encodeResAndCalcRdInterCU(*md.bestMode, cuGeom);
+                PredictionUnit pu(md.bestMode->cu, cuGeom, puIdx);
+                motionCompensation(md.bestMode->cu, pu, md.bestMode->predYuv, false, m_csp != X265_CSP_I400);
             }
+            encodeResAndCalcRdInterCU(*md.bestMode, cuGeom);
         }
 
         if (m_bTryLossless)


More information about the x265-devel mailing list