[x265] [PATCH] Modify TEncSearch structure to fix 420 format output mismatch

ashok at multicorewareinc.com ashok at multicorewareinc.com
Fri Jan 10 15:31:02 CET 2014


# HG changeset patch
# User ashok at multicorewareinc.com
# Date 1389344952 -19800
#      Fri Jan 10 14:39:12 2014 +0530
# Node ID 182e873f46a13b6f9cfd4ff72cc1a17d3ffe067e
# Parent  a22dc06f1a49deebe52e50a796a8a0beb0bb0454
Modify TEncSearch structure to fix 420 format output mismatch

diff -r a22dc06f1a49 -r 182e873f46a1 source/Lib/TLibEncoder/TEncSearch.cpp
--- a/source/Lib/TLibEncoder/TEncSearch.cpp	Wed Jan 08 12:04:22 2014 +0530
+++ b/source/Lib/TLibEncoder/TEncSearch.cpp	Fri Jan 10 14:39:12 2014 +0530
@@ -4111,15 +4111,12 @@
     assert(cu->getPredictionMode(absPartIdx) != MODE_INTRA);
 
     bool mCodeAll = true;
-    if ((ttype == TEXT_CHROMA_U) || (ttype == TEXT_CHROMA_V))
+    int width  = 1 << trSizeLog2;
+    int height = 1 << trSizeLog2;
+    const uint32_t numPels = (width >> cu->getHorzChromaShift()) * (height >> cu->getHorzChromaShift());
+    if (numPels < (MIN_TU_SIZE * MIN_TU_SIZE))
     {
-        int width  = 1 << trSizeLog2;
-        int height = 1 << trSizeLog2;
-        const uint32_t numPels = (width >> cu->getHorzChromaShift()) * (height >> cu->getHorzChromaShift());
-        if(numPels < (MIN_TU_SIZE * MIN_TU_SIZE))
-        {
-            mCodeAll = false;
-        }
+        mCodeAll = false;
     }
 
     if (bSubdivAndCbf)


More information about the x265-devel mailing list