[x265] [PATCH 2 of 3] compress: save inter sa8d costs also in m_sa8dCost

deepthi at multicorewareinc.com deepthi at multicorewareinc.com
Sun Jul 13 15:21:10 CEST 2014


# HG changeset patch
# User Deepthi Nandakumar <deepthi at multicorewareinc.com>
# Date 1405255779 -19800
#      Sun Jul 13 18:19:39 2014 +0530
# Node ID 1bdad29895e601ec5b72d330158bb0ed550d3fb0
# Parent  0fe178bf1f2d53636eb84cd0848e95b9b9cc4292
compress: save inter sa8d costs also in m_sa8dCost

diff -r 0fe178bf1f2d -r 1bdad29895e6 source/encoder/compress.cpp
--- a/source/encoder/compress.cpp	Sun Jul 13 18:14:05 2014 +0530
+++ b/source/encoder/compress.cpp	Sun Jul 13 18:19:39 2014 +0530
@@ -220,7 +220,7 @@
         uint32_t distortion = primitives.sa8d[sizeIdx](m_origYuv[depth]->getLumaAddr(), m_origYuv[depth]->getStride(),
                                                        outPredYuv->getLumaAddr(), outPredYuv->getStride());
         outTempCU->m_totalDistortion = distortion;
-        outTempCU->m_totalRDCost = m_rdCost.calcRdSADCost(distortion, outTempCU->m_totalBits);
+        outTempCU->m_sa8dCost = m_rdCost.calcRdSADCost(distortion, outTempCU->m_totalBits);
     }
     else
     {
@@ -442,12 +442,12 @@
                 {
                     xComputeCostInter(m_interCU_Nx2N[depth], m_modePredYuv[1][depth], SIZE_Nx2N);
                     xComputeCostInter(m_interCU_2NxN[depth], m_modePredYuv[2][depth], SIZE_2NxN);
-                    if (m_interCU_Nx2N[depth]->m_totalRDCost < outBestCU->m_totalRDCost)
+                    if (m_interCU_Nx2N[depth]->m_sa8dCost < outBestCU->m_totalRDCost)
                     {
                         outBestCU = m_interCU_Nx2N[depth];
                         std::swap(m_bestPredYuv[depth], m_modePredYuv[1][depth]);
                     }
-                    if (m_interCU_2NxN[depth]->m_totalRDCost < outBestCU->m_totalRDCost)
+                    if (m_interCU_2NxN[depth]->m_sa8dCost < outBestCU->m_totalRDCost)
                     {
                         outBestCU = m_interCU_2NxN[depth];
                         std::swap(m_bestPredYuv[depth], m_modePredYuv[2][depth]);
@@ -519,7 +519,7 @@
                 }
                 if (m_param->rdLevel == 2)
                 {
-                    if (m_bestMergeCU[depth]->m_sa8dCost < outBestCU->m_totalRDCost)
+                    if (m_bestMergeCU[depth]->m_sa8dCost < outBestCU->m_sa8dCost)
                     {
                         outBestCU = m_bestMergeCU[depth];
                         std::swap(m_bestPredYuv[depth], m_modePredYuv[3][depth]);
@@ -541,7 +541,7 @@
                 }
                 else if (m_param->rdLevel == 1)
                 {
-                    if (m_bestMergeCU[depth]->m_sa8dCost < outBestCU->m_totalRDCost)
+                    if (m_bestMergeCU[depth]->m_sa8dCost < outBestCU->m_sa8dCost)
                     {
                         outBestCU = m_bestMergeCU[depth];
                         std::swap(m_bestPredYuv[depth], m_modePredYuv[3][depth]);


More information about the x265-devel mailing list