[x265] [PATCH] [OUTPUT CHANGED for 444] : considering cbf bits for best cost estimation for 444 format

ashok at multicorewareinc.com ashok at multicorewareinc.com
Thu Oct 23 17:11:54 CEST 2014


# HG changeset patch
# User Ashok Kumar Mishra<ashok at multicorewareinc.com>
# Date 1414069796 -19800
#      Thu Oct 23 18:39:56 2014 +0530
# Node ID 0b8d50b858f0e651ee1a85335f8588a3de8d98d5
# Parent  ce304756a6e469b94cceef930e62972bd2168e4f
[OUTPUT CHANGED for 444] : considering cbf bits for best cost estimation for 444 format

diff -r ce304756a6e4 -r 0b8d50b858f0 source/encoder/search.cpp
--- a/source/encoder/search.cpp	Wed Oct 22 23:16:13 2014 -0500
+++ b/source/encoder/search.cpp	Thu Oct 23 18:39:56 2014 +0530
@@ -167,7 +167,12 @@
     int hChromaShift = CHROMA_H_SHIFT(m_csp);
     int vChromaShift = CHROMA_V_SHIFT(m_csp);
 
-    if ((log2TrSize > 2) && !(m_csp == X265_CSP_I444))
+    bool mCodeAll = true;
+    const uint32_t numPels = 1 << (log2TrSize * 2 - hChromaShift - vChromaShift);
+    if (numPels < (MIN_TU_SIZE * MIN_TU_SIZE))
+        mCodeAll = false;
+
+    if (mCodeAll)
     {
         if (!trDepth || cu.getCbf(absPartIdx, TEXT_CHROMA_U, trDepth - 1))
             m_entropyCoder.codeQtCbf(cu, absPartIdx, absPartIdxStep, (width >> hChromaShift), (height >> vChromaShift), TEXT_CHROMA_U, trDepth, !subdiv);


More information about the x265-devel mailing list