changeset 5764:f9c427b44459

rd: check DQP before best cu is copied to the pic in rd 0
author Deepthi Devaki <deepthidevaki@multicorewareinc.com>
date Tue, 17 Dec 2013 15:17:42 +0530
parents 5828f199d745
children e476d497f3cd
files source/encoder/compress.cpp
diffstat 1 files changed, 3 insertions(+-), 2 deletions(-) [+]
line wrap: on
line diff
--- a/source/encoder/compress.cpp	Tue Dec 17 15:09:43 2013 +0530
+++ b/source/encoder/compress.cpp	Tue Dec 17 15:17:42 2013 +0530
@@ -607,6 +607,7 @@ void TEncCu::xCompressInterCU(TComDataCU
                         if (m_mergeCU[depth]->m_totalDistortion < threshold[index])
                         {
                             m_mergeCU[depth]->setSkipFlagSubParts(true, 0, depth);
+                            xCheckDQP(m_mergeCU[depth]);
                             outBestCU = m_mergeCU[depth];
                             if (bestMergePred != m_bestPredYuv[depth])
                             {
@@ -899,6 +900,7 @@ void TEncCu::encodeResidue(TComDataCU* l
 
             //Residual encoding
             m_search->residualTransformQuantInter(cu, 0, 0, m_tmpResiYuv[depth], cu->getDepth(0), true);
+            xCheckDQP(cu);
 
             if (lcu->getMergeFlag(absPartIdx) && cu->getPartitionSize(0) == SIZE_2Nx2N && !cu->getQtRootCbf(0))
             {
@@ -931,7 +933,6 @@ void TEncCu::encodeResidue(TComDataCU* l
                 reco = m_bestRecoYuv[0]->getCrAddr(absPartIdx);
                 primitives.chroma[m_cfg->param.internalCsp].add_ps[part](reco, dststride, pred, res, src1stride, src2stride);
                 m_bestRecoYuv[0]->copyToPicYuv(lcu->getPic()->getPicYuvRec(), lcu->getAddr(), 0);
-                xCheckDQP(cu);
                 return;
             }
         }
@@ -959,9 +960,9 @@ void TEncCu::encodeResidue(TComDataCU* l
     {
         m_origYuv[0]->copyPartToYuv(m_origYuv[depth], absPartIdx);
         m_search->generateCoeffRecon(cu, m_origYuv[depth], m_modePredYuv[5][depth], m_tmpResiYuv[depth],  m_tmpRecoYuv[depth], false);
+        xCheckDQP(cu);
         m_tmpRecoYuv[depth]->copyToPicYuv(cu->getPic()->getPicYuvRec(), lcu->getAddr(), absPartIdx);
         m_tmpRecoYuv[depth]->copyToPartYuv(m_bestRecoYuv[0], absPartIdx);
         cu->copyCodedToPic(depth);
     }
-    xCheckDQP(cu);
 }