<div dir="ltr">This series is awesome...<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jul 11, 2014 at 6:00 AM, Steve Borho <span dir="ltr"><<a href="mailto:steve@borho.org" target="_blank">steve@borho.org</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"># HG changeset patch<br>
# User Steve Borho <<a href="mailto:steve@borho.org">steve@borho.org</a>><br>
# Date 1405031594 18000<br>
#      Thu Jul 10 17:33:14 2014 -0500<br>
# Node ID d6c423c66e4d5a06dc4dccbd9eade7a21f9c8adf<br>
# Parent  57a4c1c2274ec6b40f4a138523c6b67ffa853e09<br>
cu, search: remove redundant m_rdGoOnSbacCoder pointer<br>
<br>
m_rdGoOnSbacCoder was always either pointing to the same SBac as m_sbacCoder<br>
(for calls to compressCU()) or it was supposed to be unused (for calls to<br>
encodeCU)<br>
<br>
diff -r 57a4c1c2274e -r d6c423c66e4d source/Lib/TLibEncoder/TEncCu.cpp<br>
--- a/source/Lib/TLibEncoder/TEncCu.cpp Thu Jul 10 14:13:30 2014 -0500<br>
+++ b/source/Lib/TLibEncoder/TEncCu.cpp Thu Jul 10 17:33:14 2014 -0500<br>
@@ -75,7 +75,6 @@<br>
     m_rdCost          = NULL;<br>
     m_sbacCoder       = NULL;<br>
     m_rdSbacCoders    = NULL;<br>
-    m_rdGoOnSbacCoder = NULL;<br>
     m_bBitCounting    = false;<br>
 }<br>
<br>
@@ -1348,7 +1347,7 @@<br>
     // Encode Coefficients<br>
     bool bEncodeDQP = m_bEncodeDQP;<br>
     m_sbacCoder->codeCoeff(outTempCU, 0, depth, outTempCU->getCUSize(0), bEncodeDQP);<br>
-    m_rdGoOnSbacCoder->store(m_rdSbacCoders[depth][CI_TEMP_BEST]);<br>
+    m_sbacCoder->store(m_rdSbacCoders[depth][CI_TEMP_BEST]);<br>
     outTempCU->m_totalBits = m_sbacCoder->getNumberOfWrittenBits();<br>
     outTempCU->m_coeffBits = outTempCU->m_totalBits - outTempCU->m_mvBits;<br>
<br>
@@ -1397,7 +1396,7 @@<br>
     // Encode Coefficients<br>
     bool bCodeDQP = m_bEncodeDQP;<br>
     m_sbacCoder->codeCoeff(outTempCU, 0, depth, outTempCU->getCUSize(0), bCodeDQP);<br>
-    m_rdGoOnSbacCoder->store(m_rdSbacCoders[depth][CI_TEMP_BEST]);<br>
+    m_sbacCoder->store(m_rdSbacCoders[depth][CI_TEMP_BEST]);<br>
     outTempCU->m_totalBits = m_sbacCoder->getNumberOfWrittenBits();<br>
     outTempCU->m_coeffBits = outTempCU->m_totalBits - outTempCU->m_mvBits;<br>
<br>
diff -r 57a4c1c2274e -r d6c423c66e4d source/Lib/TLibEncoder/TEncCu.h<br>
--- a/source/Lib/TLibEncoder/TEncCu.h   Thu Jul 10 14:13:30 2014 -0500<br>
+++ b/source/Lib/TLibEncoder/TEncCu.h   Thu Jul 10 17:33:14 2014 -0500<br>
@@ -124,7 +124,6 @@<br>
<br>
     // RD SBac pointers<br>
     SBac       (*m_rdSbacCoders)[CI_NUM];<br>
-    SBac*        m_rdGoOnSbacCoder;<br>
<br>
     uint8_t      m_totalDepth;<br>
<br>
diff -r 57a4c1c2274e -r d6c423c66e4d source/Lib/TLibEncoder/TEncSearch.cpp<br>
--- a/source/Lib/TLibEncoder/TEncSearch.cpp     Thu Jul 10 14:13:30 2014 -0500<br>
+++ b/source/Lib/TLibEncoder/TEncSearch.cpp     Thu Jul 10 17:33:14 2014 -0500<br>
@@ -68,7 +68,6 @@<br>
     m_trQuant = NULL;<br>
     m_sbacCoder = NULL;<br>
     m_rdSbacCoders = NULL;<br>
-    m_rdGoOnSbacCoder = NULL;<br>
     m_numLayers = 0;<br>
 }<br>
<br>
@@ -636,7 +635,7 @@<br>
         if (checkTransformSkip || checkTQbypass)<br>
         {<br>
             //----- store original entropy coding status -----<br>
-            m_rdGoOnSbacCoder->store(m_rdSbacCoders[fullDepth][CI_QT_TRAFO_ROOT]);<br>
+            m_sbacCoder->store(m_rdSbacCoders[fullDepth][CI_QT_TRAFO_ROOT]);<br>
<br>
             uint32_t  singleDistYTmp = 0;<br>
             uint32_t  singlePsyEnergyYTmp = 0;<br>
@@ -694,10 +693,10 @@<br>
                     bestTQbypass = singleTQbypass;<br>
                     bestModeId   = modeId;<br>
                     if (bestModeId == firstCheckId)<br>
-                        m_rdGoOnSbacCoder->store(m_rdSbacCoders[fullDepth][CI_TEMP_BEST]);<br>
+                        m_sbacCoder->store(m_rdSbacCoders[fullDepth][CI_TEMP_BEST]);<br>
                 }<br>
                 if (modeId == firstCheckId)<br>
-                    m_rdGoOnSbacCoder->load(m_rdSbacCoders[fullDepth][CI_QT_TRAFO_ROOT]);<br>
+                    m_sbacCoder->load(m_rdSbacCoders[fullDepth][CI_QT_TRAFO_ROOT]);<br>
             }<br>
<br>
             cu->setTransformSkipSubParts(checkTransformSkip ? bestModeId : 0, TEXT_LUMA, absPartIdx, fullDepth);<br>
@@ -708,7 +707,7 @@<br>
             {<br>
                 xLoadIntraResultQT(cu, absPartIdx, log2TrSize, reconQt, reconQtStride);<br>
                 cu->setCbfSubParts(singleCbfY << trDepth, TEXT_LUMA, absPartIdx, fullDepth);<br>
-                m_rdGoOnSbacCoder->load(m_rdSbacCoders[fullDepth][CI_TEMP_BEST]);<br>
+                m_sbacCoder->load(m_rdSbacCoders[fullDepth][CI_TEMP_BEST]);<br>
             }<br>
             else<br>
             {<br>
@@ -719,7 +718,7 @@<br>
         }<br>
         else<br>
         {<br>
-            m_rdGoOnSbacCoder->store(m_rdSbacCoders[fullDepth][CI_QT_TRAFO_ROOT]);<br>
+            m_sbacCoder->store(m_rdSbacCoders[fullDepth][CI_QT_TRAFO_ROOT]);<br>
<br>
             //----- code luma block with given intra prediction mode and store Cbf-----<br>
             cu->setTransformSkipSubParts(0, TEXT_LUMA, absPartIdx, fullDepth);<br>
@@ -748,11 +747,11 @@<br>
         //----- store full entropy coding status, load original entropy coding status -----<br>
         if (bCheckFull)<br>
         {<br>
-            m_rdGoOnSbacCoder->store(m_rdSbacCoders[fullDepth][CI_QT_TRAFO_TEST]);<br>
-            m_rdGoOnSbacCoder->load(m_rdSbacCoders[fullDepth][CI_QT_TRAFO_ROOT]);<br>
+            m_sbacCoder->store(m_rdSbacCoders[fullDepth][CI_QT_TRAFO_TEST]);<br>
+            m_sbacCoder->load(m_rdSbacCoders[fullDepth][CI_QT_TRAFO_ROOT]);<br>
         }<br>
         else<br>
-            m_rdGoOnSbacCoder->store(m_rdSbacCoders[fullDepth][CI_QT_TRAFO_ROOT]);<br>
+            m_sbacCoder->store(m_rdSbacCoders[fullDepth][CI_QT_TRAFO_ROOT]);<br>
<br>
         //----- code splitted block -----<br>
         uint64_t splitCost     = 0;<br>
@@ -776,7 +775,7 @@<br>
             cu->getCbf(TEXT_LUMA)[absPartIdx + offs] |= (splitCbfY << trDepth);<br>
<br>
         //----- restore context states -----<br>
-        m_rdGoOnSbacCoder->load(m_rdSbacCoders[fullDepth][CI_QT_TRAFO_ROOT]);<br>
+        m_sbacCoder->load(m_rdSbacCoders[fullDepth][CI_QT_TRAFO_ROOT]);<br>
<br>
         //----- determine rate and r-d cost -----<br>
         uint32_t splitBits = xGetIntraBitsQTLuma(cu, trDepth, absPartIdx);<br>
@@ -798,7 +797,7 @@<br>
             cu->m_psyEnergy = singlePsyEnergyY;<br>
<br>
         //----- set entropy coding status -----<br>
-        m_rdGoOnSbacCoder->load(m_rdSbacCoders[fullDepth][CI_QT_TRAFO_TEST]);<br>
+        m_sbacCoder->load(m_rdSbacCoders[fullDepth][CI_QT_TRAFO_TEST]);<br>
<br>
         //--- set transform index and Cbf values ---<br>
         cu->setTrIdxSubParts(trDepth, absPartIdx, fullDepth);<br>
@@ -1103,7 +1102,7 @@<br>
                 if (checkTransformSkip)<br>
                 {<br>
                     // use RDO to decide whether Cr/Cb takes TS<br>
-                    m_rdGoOnSbacCoder->store(m_rdSbacCoders[fullDepth][CI_QT_TRAFO_ROOT]);<br>
+                    m_sbacCoder->store(m_rdSbacCoders[fullDepth][CI_QT_TRAFO_ROOT]);<br>
<br>
                     uint64_t singleCost     = MAX_INT64;<br>
                     int      bestModeId     = 0;<br>
@@ -1154,17 +1153,17 @@<br>
                             singleCbfC  = singleCbfCTmp;<br>
                             singlePsyEnergy = singlePsyEnergyTmp;<br>
                             if (bestModeId == firstCheckId)<br>
-                                m_rdGoOnSbacCoder->store(m_rdSbacCoders[fullDepth][CI_TEMP_BEST]);<br>
+                                m_sbacCoder->store(m_rdSbacCoders[fullDepth][CI_TEMP_BEST]);<br>
                         }<br>
                         if (chromaModeId == firstCheckId)<br>
-                            m_rdGoOnSbacCoder->load(m_rdSbacCoders[fullDepth][CI_QT_TRAFO_ROOT]);<br>
+                            m_sbacCoder->load(m_rdSbacCoders[fullDepth][CI_QT_TRAFO_ROOT]);<br>
                     }<br>
<br>
                     if (bestModeId == firstCheckId)<br>
                     {<br>
                         xLoadIntraResultChromaQT(cu, absPartIdxC, log2TrSizeC, chromaId, reconQt, reconQtStride);<br>
                         cu->setCbfPartRange(singleCbfC << trDepth, (TextType)chromaId, absPartIdxC, tuIterator.absPartIdxStep);<br>
-                        m_rdGoOnSbacCoder->load(m_rdSbacCoders[fullDepth][CI_TEMP_BEST]);<br>
+                        m_sbacCoder->load(m_rdSbacCoders[fullDepth][CI_TEMP_BEST]);<br>
                     }<br>
                     else<br>
                     {<br>
@@ -1178,7 +1177,7 @@<br>
                     outDist += singleDistC;<br>
<br>
                     if (chromaId == 1)<br>
-                        m_rdGoOnSbacCoder->store(m_rdSbacCoders[fullDepth][CI_QT_TRAFO_ROOT]);<br>
+                        m_sbacCoder->store(m_rdSbacCoders[fullDepth][CI_QT_TRAFO_ROOT]);<br>
                 }<br>
                 else<br>
                 {<br>
@@ -1578,7 +1577,7 @@<br>
             cu->setLumaIntraDirSubParts(origMode, partOffset, depth + initTrDepth);<br>
<br>
             // set context models<br>
-            m_rdGoOnSbacCoder->load(m_rdSbacCoders[depth][CI_CURR_BEST]);<br>
+            m_sbacCoder->load(m_rdSbacCoders[depth][CI_CURR_BEST]);<br>
<br>
             // determine residual for partition<br>
             uint32_t puDistY = 0;<br>
@@ -1607,7 +1606,7 @@<br>
             cu->setLumaIntraDirSubParts(origMode, partOffset, depth + initTrDepth);<br>
<br>
             // set context models<br>
-            m_rdGoOnSbacCoder->load(m_rdSbacCoders[depth][CI_CURR_BEST]);<br>
+            m_sbacCoder->load(m_rdSbacCoders[depth][CI_CURR_BEST]);<br>
<br>
             // determine residual for partition<br>
             uint32_t puDistY = 0;<br>
@@ -1664,7 +1663,7 @@<br>
     }<br>
<br>
     //===== reset context models =====<br>
-    m_rdGoOnSbacCoder->load(m_rdSbacCoders[depth][CI_CURR_BEST]);<br>
+    m_sbacCoder->load(m_rdSbacCoders[depth][CI_CURR_BEST]);<br>
<br>
     //===== set distortion (rate and r-d costs are determined later) =====<br>
     cu->m_totalDistortion = overallDistY;<br>
@@ -1764,7 +1763,7 @@<br>
         for (uint32_t mode = minMode; mode < maxMode; mode++)<br>
         {<br>
             //----- restore context models -----<br>
-            m_rdGoOnSbacCoder->load(m_rdSbacCoders[depth][CI_CURR_BEST]);<br>
+            m_sbacCoder->load(m_rdSbacCoders[depth][CI_CURR_BEST]);<br>
<br>
             //----- chroma coding -----<br>
             uint32_t dist = 0;<br>
@@ -1774,7 +1773,7 @@<br>
             xRecurIntraChromaCodingQT(cu, initTrDepth, absPartIdxC, fencYuv, predYuv, resiYuv, dist);<br>
<br>
             if (cu->getSlice()->getPPS()->getUseTransformSkip())<br>
-                m_rdGoOnSbacCoder->load(m_rdSbacCoders[depth][CI_CURR_BEST]);<br>
+                m_sbacCoder->load(m_rdSbacCoders[depth][CI_CURR_BEST]);<br>
<br>
             uint32_t bits = xGetIntraBitsQTChroma(cu, initTrDepth, absPartIdxC, tuIterator.absPartIdxStep);<br>
             uint64_t cost = 0;<br>
@@ -1841,7 +1840,7 @@<br>
         }<br>
     }<br>
     //----- restore context models -----<br>
-    m_rdGoOnSbacCoder->load(m_rdSbacCoders[depth][CI_CURR_BEST]);<br>
+    m_sbacCoder->load(m_rdSbacCoders[depth][CI_CURR_BEST]);<br>
 }<br>
<br>
 /** estimation of best merge coding<br>
@@ -2339,7 +2338,7 @@<br>
         distortion += m_rdCost->scaleChromaDistCb(primitives.sse_pp[part](fencYuv->getCbAddr(), fencYuv->getCStride(), outReconYuv->getCbAddr(), outReconYuv->getCStride()));<br>
         distortion += m_rdCost->scaleChromaDistCr(primitives.sse_pp[part](fencYuv->getCrAddr(), fencYuv->getCStride(), outReconYuv->getCrAddr(), outReconYuv->getCStride()));<br>
<br>
-        m_rdGoOnSbacCoder->load(m_rdSbacCoders[depth][CI_CURR_BEST]);<br>
+        m_sbacCoder->load(m_rdSbacCoders[depth][CI_CURR_BEST]);<br>
         m_sbacCoder->resetBits();<br>
         if (cu->getSlice()->getPPS()->getTransquantBypassEnableFlag())<br>
             m_sbacCoder->codeCUTransquantBypassFlag(cu, 0);<br>
@@ -2360,7 +2359,7 @@<br>
         else<br>
             cu->m_totalRDCost = m_rdCost->calcRdCost(cu->m_totalDistortion, cu->m_totalBits);<br>
<br>
-        m_rdGoOnSbacCoder->store(m_rdSbacCoders[depth][CI_TEMP_BEST]);<br>
+        m_sbacCoder->store(m_rdSbacCoders[depth][CI_TEMP_BEST]);<br>
<br>
         cu->clearCbf(0, depth);<br>
         cu->setTrIdxSubParts(0, 0, depth);<br>
@@ -2394,7 +2393,7 @@<br>
         bits = 0;<br>
         distortion = 0;<br>
<br>
-        m_rdGoOnSbacCoder->load(m_rdSbacCoders[depth][CI_CURR_BEST]);<br>
+        m_sbacCoder->load(m_rdSbacCoders[depth][CI_CURR_BEST]);<br>
         xEstimateResidualQT(cu, 0, fencYuv, predYuv, outResiYuv, depth, cost, bits, distortion, &zeroDistortion, curUseRDOQ);<br>
<br>
         m_sbacCoder->resetBits();<br>
@@ -2435,7 +2434,7 @@<br>
         else<br>
             xSetResidualQTData(cu, 0, NULL, depth, false);<br>
<br>
-        m_rdGoOnSbacCoder->load(m_rdSbacCoders[depth][CI_CURR_BEST]);<br>
+        m_sbacCoder->load(m_rdSbacCoders[depth][CI_CURR_BEST]);<br>
<br>
         bits = xSymbolBitsInter(cu);<br>
<br>
@@ -2451,7 +2450,7 @@<br>
<br>
             bestBits = bits;<br>
             bestCost = cost;<br>
-            m_rdGoOnSbacCoder->store(m_rdSbacCoders[depth][CI_TEMP_BEST]);<br>
+            m_sbacCoder->store(m_rdSbacCoders[depth][CI_TEMP_BEST]);<br>
         }<br>
<br>
         X265_CHECK(bestCost != MAX_INT64, "no best cost\n");<br>
@@ -2714,7 +2713,7 @@<br>
<br>
     uint32_t bestCBF[MAX_NUM_COMPONENT];<br>
     uint32_t bestsubTUCBF[MAX_NUM_COMPONENT][2];<br>
-    m_rdGoOnSbacCoder->store(m_rdSbacCoders[depth][CI_QT_TRAFO_ROOT]);<br>
+    m_sbacCoder->store(m_rdSbacCoders[depth][CI_QT_TRAFO_ROOT]);<br>
<br>
     uint32_t trSize = 1 << log2TrSize;<br>
     const bool splitIntoSubTUs = (chFmt == CHROMA_422);<br>
@@ -3107,7 +3106,7 @@<br>
             ALIGN_VAR_32(coeff_t, tsCoeffY[MAX_TS_SIZE * MAX_TS_SIZE]);<br>
             ALIGN_VAR_32(int16_t, tsResiY[MAX_TS_SIZE * MAX_TS_SIZE]);<br>
<br>
-            m_rdGoOnSbacCoder->load(m_rdSbacCoders[depth][CI_QT_TRAFO_ROOT]);<br>
+            m_sbacCoder->load(m_rdSbacCoders[depth][CI_QT_TRAFO_ROOT]);<br>
<br>
             cu->setTransformSkipSubParts(1, TEXT_LUMA, absPartIdx, depth);<br>
<br>
@@ -3172,7 +3171,7 @@<br>
             uint64_t singleCostU = MAX_INT64;<br>
             uint64_t singleCostV = MAX_INT64;<br>
<br>
-            m_rdGoOnSbacCoder->load(m_rdSbacCoders[depth][CI_QT_TRAFO_ROOT]);<br>
+            m_sbacCoder->load(m_rdSbacCoders[depth][CI_QT_TRAFO_ROOT]);<br>
<br>
             TURecurse tuIterator(splitIntoSubTUs ? VERTICAL_SPLIT : DONT_SPLIT, absPartIdxStep, absPartIdx);<br>
<br>
@@ -3304,7 +3303,7 @@<br>
             while (tuIterator.isNextSection());<br>
         }<br>
<br>
-        m_rdGoOnSbacCoder->load(m_rdSbacCoders[depth][CI_QT_TRAFO_ROOT]);<br>
+        m_sbacCoder->load(m_rdSbacCoders[depth][CI_QT_TRAFO_ROOT]);<br>
<br>
         m_sbacCoder->resetBits();<br>
<br>
@@ -3388,8 +3387,8 @@<br>
     {<br>
         if (bCheckFull)<br>
         {<br>
-            m_rdGoOnSbacCoder->store(m_rdSbacCoders[depth][CI_QT_TRAFO_TEST]);<br>
-            m_rdGoOnSbacCoder->load(m_rdSbacCoders[depth][CI_QT_TRAFO_ROOT]);<br>
+            m_sbacCoder->store(m_rdSbacCoders[depth][CI_QT_TRAFO_TEST]);<br>
+            m_sbacCoder->load(m_rdSbacCoders[depth][CI_QT_TRAFO_ROOT]);<br>
         }<br>
         uint32_t subdivDist = 0;<br>
         uint32_t subdivBits = 0;<br>
@@ -3435,7 +3434,7 @@<br>
             cu->getCbf(TEXT_CHROMA_V)[absPartIdx + i] |= vcbf << trMode;<br>
         }<br>
<br>
-        m_rdGoOnSbacCoder->load(m_rdSbacCoders[depth][CI_QT_TRAFO_ROOT]);<br>
+        m_sbacCoder->load(m_rdSbacCoders[depth][CI_QT_TRAFO_ROOT]);<br>
         m_sbacCoder->resetBits();<br>
<br>
         xEncodeResidualQT(cu, absPartIdx, depth, true,  TEXT_LUMA);<br>
@@ -3479,7 +3478,7 @@<br>
             }<br>
         }<br>
         X265_CHECK(bCheckFull, "check-full must be set\n");<br>
-        m_rdGoOnSbacCoder->load(m_rdSbacCoders[depth][CI_QT_TRAFO_TEST]);<br>
+        m_sbacCoder->load(m_rdSbacCoders[depth][CI_QT_TRAFO_TEST]);<br>
     }<br>
<br>
     rdCost += singleCost;<br>
@@ -3691,7 +3690,7 @@<br>
 uint32_t TEncSearch::xModeBitsIntra(TComDataCU* cu, uint32_t mode, uint32_t partOffset, uint32_t depth)<br>
 {<br>
     // Reload only contexts required for coding intra mode information<br>
-    m_rdGoOnSbacCoder->loadIntraDirModeLuma(m_rdSbacCoders[depth][CI_CURR_BEST]);<br>
+    m_sbacCoder->loadIntraDirModeLuma(m_rdSbacCoders[depth][CI_CURR_BEST]);<br>
<br>
     cu->getLumaIntraDir()[partOffset] = (uint8_t)mode;<br>
<br>
diff -r 57a4c1c2274e -r d6c423c66e4d source/Lib/TLibEncoder/TEncSearch.h<br>
--- a/source/Lib/TLibEncoder/TEncSearch.h       Thu Jul 10 14:13:30 2014 -0500<br>
+++ b/source/Lib/TLibEncoder/TEncSearch.h       Thu Jul 10 17:33:14 2014 -0500<br>
@@ -104,8 +104,6 @@<br>
     MotionEstimate   m_me;<br>
     MotionReference (*m_mref)[MAX_NUM_REF + 1];<br>
<br>
-    SBac          (*m_rdSbacCoders)[CI_NUM];<br>
-    SBac*           m_rdGoOnSbacCoder;<br>
     bool            m_bFrameParallel;<br>
<br>
     ShortYuv*       m_qtTempShortYuv;<br>
@@ -122,6 +120,8 @@<br>
     SBac*           m_sbacCoder;<br>
     x265_param*     m_param;<br>
<br>
+    SBac          (*m_rdSbacCoders)[CI_NUM];<br>
+<br>
     bool            m_bEnableRDOQ;<br>
     int             m_numLayers;<br>
<br>
diff -r 57a4c1c2274e -r d6c423c66e4d source/encoder/compress.cpp<br>
--- a/source/encoder/compress.cpp       Thu Jul 10 14:13:30 2014 -0500<br>
+++ b/source/encoder/compress.cpp       Thu Jul 10 17:33:14 2014 -0500<br>
@@ -42,7 +42,7 @@<br>
     uint32_t initTrDepth = cu->getPartitionSize(0) == SIZE_2Nx2N ? 0 : 1;<br>
<br>
     // set context models<br>
-    m_search->m_rdGoOnSbacCoder->load(m_search->m_rdSbacCoders[depth][CI_CURR_BEST]);<br>
+    m_sbacCoder->load(m_search->m_rdSbacCoders[depth][CI_CURR_BEST]);<br>
<br>
     m_search->xRecurIntraCodingQT(cu, initTrDepth, 0, fencYuv, predYuv, outResiYuv, puDistY, false, puCost);<br>
     m_search->xSetIntraResultQT(cu, initTrDepth, 0, outReconYuv);<br>
@@ -71,7 +71,7 @@<br>
     // Encode Coefficients<br>
     bool bCodeDQP = m_bEncodeDQP;<br>
     m_sbacCoder->codeCoeff(cu, 0, depth, cu->getCUSize(0), bCodeDQP);<br>
-    m_rdGoOnSbacCoder->store(m_rdSbacCoders[depth][CI_TEMP_BEST]);<br>
+    m_sbacCoder->store(m_rdSbacCoders[depth][CI_TEMP_BEST]);<br>
<br>
     cu->m_totalBits = m_sbacCoder->getNumberOfWrittenBits();<br>
     cu->m_coeffBits = cu->m_totalBits - cu->m_mvBits;<br>
diff -r 57a4c1c2274e -r d6c423c66e4d source/encoder/cturow.cpp<br>
--- a/source/encoder/cturow.cpp Thu Jul 10 14:13:30 2014 -0500<br>
+++ b/source/encoder/cturow.cpp Thu Jul 10 17:33:14 2014 -0500<br>
@@ -69,10 +69,8 @@<br>
     // setup thread local data structures to use this row's CABAC state<br>
     tld.m_search.m_sbacCoder = &m_rdGoOnSbacCoder;<br>
     tld.m_search.m_rdSbacCoders = m_rdSbacCoders;<br>
-    tld.m_search.m_rdGoOnSbacCoder = &m_rdGoOnSbacCoder;<br>
     tld.m_cuCoder.m_sbacCoder = &m_rdGoOnSbacCoder;<br>
     tld.m_cuCoder.m_rdSbacCoders = m_rdSbacCoders;<br>
-    tld.m_cuCoder.m_rdGoOnSbacCoder = &m_rdGoOnSbacCoder;<br>
<br></blockquote><div>The above code explains it all.<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
     BitCounter bc;<br>
     m_rdGoOnSbacCoder.setBitstream(&bc);<br>
_______________________________________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a><br>
</blockquote></div><br></div></div>