[x265] [PATCH] psyrd: rename the variable name for readability

sumalatha at multicorewareinc.com sumalatha at multicorewareinc.com
Mon May 26 13:35:34 CEST 2014


# HG changeset patch
# User Sumalatha Polureddy<sumalatha at multicorewareinc.com>
# Date 1401104123 -19800
# Node ID 5d735ddddcfa3278f05102f87c7f4004dca28690
# Parent  cbe5cc0e48b4122518ca732a1b32de16ba25c467
psyrd: rename the variable name for readability

rename local variable psyRdCost to psycost which calcualtes energy difference between src and recon

diff -r cbe5cc0e48b4 -r 5d735ddddcfa source/Lib/TLibEncoder/TEncCu.cpp
--- a/source/Lib/TLibEncoder/TEncCu.cpp	Mon May 26 12:29:25 2014 +0530
+++ b/source/Lib/TLibEncoder/TEncCu.cpp	Mon May 26 17:05:23 2014 +0530
@@ -1417,10 +1417,10 @@
     if (m_rdCost->psyRdEnabled())
     {
         int part = g_convertToBit[outTempCU->getCUSize(0)];
-        uint32_t psyRdCost = m_rdCost->psyCost(part, m_origYuv[depth]->getLumaAddr(), m_origYuv[depth]->getStride(),
+        uint32_t psyCost = m_rdCost->psyCost(part, m_origYuv[depth]->getLumaAddr(), m_origYuv[depth]->getStride(),
                                                      m_tmpRecoYuv[depth]->getLumaAddr(), m_tmpRecoYuv[depth]->getStride());
-        outTempCU->m_psyCost = psyRdCost;
-        outTempCU->m_totalCost = m_rdCost->calcPsyRdCost(outTempCU->m_totalDistortion, outTempCU->m_totalBits, psyRdCost);
+        outTempCU->m_psyCost = psyCost;
+        outTempCU->m_totalCost = m_rdCost->calcPsyRdCost(outTempCU->m_totalDistortion, outTempCU->m_totalBits, psyCost);
     }
     else
     {
@@ -1465,10 +1465,10 @@
     if (m_rdCost->psyRdEnabled())
     {
         int part = g_convertToBit[outTempCU->getCUSize(0)];
-        uint32_t psyRdCost = m_rdCost->psyCost(part, m_origYuv[depth]->getLumaAddr(), m_origYuv[depth]->getStride(),
+        uint32_t psyCost = m_rdCost->psyCost(part, m_origYuv[depth]->getLumaAddr(), m_origYuv[depth]->getStride(),
                                                      m_tmpRecoYuv[depth]->getLumaAddr(), m_tmpRecoYuv[depth]->getStride());
-        outTempCU->m_psyCost = psyRdCost;
-        outTempCU->m_totalCost = m_rdCost->calcPsyRdCost(outTempCU->m_totalDistortion, outTempCU->m_totalBits, psyRdCost);
+        outTempCU->m_psyCost = psyCost;
+        outTempCU->m_totalCost = m_rdCost->calcPsyRdCost(outTempCU->m_totalDistortion, outTempCU->m_totalBits, psyCost);
     }
     else
     {
diff -r cbe5cc0e48b4 -r 5d735ddddcfa source/Lib/TLibEncoder/TEncSearch.cpp
--- a/source/Lib/TLibEncoder/TEncSearch.cpp	Mon May 26 12:29:25 2014 +0530
+++ b/source/Lib/TLibEncoder/TEncSearch.cpp	Mon May 26 17:05:23 2014 +0530
@@ -2696,10 +2696,10 @@
         if (m_rdCost->psyRdEnabled())
         {
             int size = g_convertToBit[cu->getCUSize(0)];
-            uint32_t psyRdCost = m_rdCost->psyCost(size, fencYuv->getLumaAddr(), fencYuv->getStride(),
+            uint32_t psyCost = m_rdCost->psyCost(size, fencYuv->getLumaAddr(), fencYuv->getStride(),
                                                          outReconYuv->getLumaAddr(), outReconYuv->getStride());
-            cu->m_psyCost = psyRdCost;
-            cu->m_totalCost = m_rdCost->calcPsyRdCost(cu->m_totalDistortion, cu->m_totalBits, psyRdCost);
+            cu->m_psyCost = psyCost;
+            cu->m_totalCost = m_rdCost->calcPsyRdCost(cu->m_totalDistortion, cu->m_totalBits, psyCost);
         }
         else
         {
@@ -2788,10 +2788,10 @@
     if (m_rdCost->psyRdEnabled())
     {
         int size = g_convertToBit[cu->getCUSize(0)];
-        uint32_t psyRdCost = m_rdCost->psyCost(size, fencYuv->getLumaAddr(), fencYuv->getStride(),
+        uint32_t psyCost = m_rdCost->psyCost(size, fencYuv->getLumaAddr(), fencYuv->getStride(),
                                                      outReconYuv->getLumaAddr(), outReconYuv->getStride());
-        cu->m_psyCost = psyRdCost;
-        bcost = m_rdCost->calcPsyRdCost(bdist, bestBits, psyRdCost);
+        cu->m_psyCost = psyCost;
+        bcost = m_rdCost->calcPsyRdCost(bdist, bestBits, psyCost);
     }
     else
     {


More information about the x265-devel mailing list