[x265] search: remove RDOQ level initialisations in initSearch

Deepthi Nandakumar deepthi at multicorewareinc.com
Wed Mar 2 12:32:00 CET 2016


# HG changeset patch
# User Deepthi Nandakumar <deepthi at multicorewareinc.com>
# Date 1456912786 -19800
#      Wed Mar 02 15:29:46 2016 +0530
# Node ID b043f1d2c2c0e25a67730508b1397378498fa364
# Parent  39b9334593cfe67b24d998ade2fa1895f342afb3
search: remove RDOQ level initialisations in initSearch

diff -r 39b9334593cf -r b043f1d2c2c0 source/encoder/search.cpp
--- a/source/encoder/search.cpp Wed Mar 02 16:21:55 2016 +0530
+++ b/source/encoder/search.cpp Wed Mar 02 15:29:46 2016 +0530
@@ -73,7 +73,6 @@
 {
     uint32_t maxLog2CUSize = g_log2Size[param.maxCUSize];
     m_param = ¶m;
-    m_bEnableRDOQ = !!param.rdoqLevel;
     m_bFrameParallel = param.frameNumThreads > 1;
     m_numLayers = g_log2Size[param.maxCUSize] - 2;

@@ -296,6 +295,7 @@
     uint32_t sizeIdx    = log2TrSize - 2;
     bool mightNotSplit  = log2TrSize <= depthRange[1];
     bool mightSplit     = (log2TrSize > depthRange[0]) && (bAllowSplit ||
!mightNotSplit);
+    bool bEnableRDOQ  = !!m_param->rdoqLevel;

     /* If maximum RD penalty, force spits at TU size 32x32 if SPS allows
TUs of 16x16 */
     if (m_param->rdPenalty == 2 && m_slice->m_sliceType != I_SLICE &&
log2TrSize == 5 && depthRange[0] <= 4)
@@ -336,7 +336,7 @@
         coeff_t* coeffY       = m_rqt[qtLayer].coeffRQT[0] + coeffOffsetY;

         // store original entropy coding status
-        if (m_bEnableRDOQ)
+        if (bEnableRDOQ)
             m_entropyCoder.estBit(m_entropyCoder.m_estBitsSbac,
log2TrSize, true);

         primitives.cu[sizeIdx].calcresidual(fenc, pred, residual, stride);
@@ -487,6 +487,7 @@
     uint32_t fullDepth = cuGeom.depth + tuDepth;
     uint32_t log2TrSize = cuGeom.log2CUSize - tuDepth;
     uint32_t tuSize = 1 << log2TrSize;
+    bool bEnableRDOQ = !!m_param->rdoqLevel;

     X265_CHECK(tuSize <= MAX_TS_SIZE, "transform skip is only possible at
4x4 TUs\n");

@@ -525,7 +526,7 @@
     // store original entropy coding status
     m_entropyCoder.store(m_rqt[fullDepth].rqtRoot);

-    if (m_bEnableRDOQ)
+    if (bEnableRDOQ)
         m_entropyCoder.estBit(m_entropyCoder.m_estBitsSbac, log2TrSize,
true);

     int checkTransformSkip = 1;
@@ -782,6 +783,7 @@
 {
     CUData& cu = mode.cu;
     uint32_t log2TrSize = cuGeom.log2CUSize - tuDepth;
+    bool bEnableRDOQ = !!m_param->rdoqLevel;

     if (tuDepth < cu.m_tuDepth[absPartIdx])
     {
@@ -812,7 +814,7 @@
         tuDepthC--;
     }

-    if (m_bEnableRDOQ)
+    if (bEnableRDOQ)
         m_entropyCoder.estBit(m_entropyCoder.m_estBitsSbac, log2TrSizeC,
false);

     bool checkTransformSkip = m_slice->m_pps->bTransformSkipEnabled &&
log2TrSizeC <= MAX_LOG2_TS_SIZE && !cu.m_tqBypass[0];
@@ -2840,6 +2842,7 @@
     CUData& cu = mode.cu;
     uint32_t depth = cuGeom.depth + tuDepth;
     uint32_t log2TrSize = cuGeom.log2CUSize - tuDepth;
+    bool bEnableRDOQ = !!m_param->rdoqLevel;

     bool bCheckSplit = log2TrSize > depthRange[0];
     bool bCheckFull = log2TrSize <= depthRange[1];
@@ -2897,7 +2900,7 @@
         cu.setTUDepthSubParts(tuDepth, absPartIdx, depth);
         cu.setTransformSkipSubParts(0, TEXT_LUMA, absPartIdx, depth);

-        if (m_bEnableRDOQ)
+        if (bEnableRDOQ)
             m_entropyCoder.estBit(m_entropyCoder.m_estBitsSbac,
log2TrSize, true);

         const pixel* fenc = fencYuv->getLumaAddr(absPartIdx);
@@ -3011,7 +3014,7 @@

                     cu.setTransformSkipPartRange(0, (TextType)chromaId,
absPartIdxC, tuIterator.absPartIdxStep);

-                    if (m_bEnableRDOQ && (chromaId != TEXT_CHROMA_V))
+                    if (bEnableRDOQ && (chromaId != TEXT_CHROMA_V))

 m_entropyCoder.estBit(m_entropyCoder.m_estBitsSbac, log2TrSizeC, false);

                     fenc = fencYuv->getChromaAddr(chromaId, absPartIdxC);
@@ -3112,7 +3115,7 @@

             cu.setTransformSkipSubParts(1, TEXT_LUMA, absPartIdx, depth);

-            if (m_bEnableRDOQ)
+            if (bEnableRDOQ)
                 m_entropyCoder.estBit(m_entropyCoder.m_estBitsSbac,
log2TrSize, true);

             fenc = fencYuv->getLumaAddr(absPartIdx);
@@ -3180,7 +3183,7 @@

                     cu.setTransformSkipPartRange(1, (TextType)chromaId,
absPartIdxC, tuIterator.absPartIdxStep);

-                    if (m_bEnableRDOQ && (chromaId != TEXT_CHROMA_V))
+                    if (bEnableRDOQ && (chromaId != TEXT_CHROMA_V))

 m_entropyCoder.estBit(m_entropyCoder.m_estBitsSbac, log2TrSizeC, false);

                     fenc = fencYuv->getChromaAddr(chromaId, absPartIdxC);
diff -r 39b9334593cf -r b043f1d2c2c0 source/encoder/search.h
--- a/source/encoder/search.h Wed Mar 02 16:21:55 2016 +0530
+++ b/source/encoder/search.h Wed Mar 02 15:29:46 2016 +0530
@@ -272,7 +272,6 @@
     pixel*          m_tsRecon;        /* transform skip reconstructed
pixels 32x32 */

     bool            m_bFrameParallel;
-    bool            m_bEnableRDOQ;
     uint32_t        m_numLayers;
     uint32_t        m_refLagPixels;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20160302/6bf7826e/attachment.html>


More information about the x265-devel mailing list