[x265] sao: silence warning

Mateusz mateuszb at poczta.onet.pl
Fri Jun 3 06:22:10 CEST 2016


# HG changeset patch
# User Ma0 <mateuszb at poczta.onet.pl>
# Date 1464927637 -7200
#      Fri Jun 03 06:20:37 2016 +0200
# Node ID bd6f1daf85852177c0e2893d5edab182335ffb0e
# Parent  6098ba3e0cf16b110cff3b2519ce2d997ecac396
sao: silence warning

diff -r 6098ba3e0cf1 -r bd6f1daf8585 source/encoder/sao.cpp
--- a/source/encoder/sao.cpp    Tue May 31 14:06:55 2016 +0100
+++ b/source/encoder/sao.cpp    Fri Jun 03 06:20:37 2016 +0200
@@ -1433,8 +1433,7 @@
     m_entropyCoder.resetBits();
     m_entropyCoder.codeSaoType(0);
 
-    uint32_t rate = m_entropyCoder.getNumberOfWrittenBits();
-    int64_t costPartBest = calcSaoRdoCost(0, rate, lambda[0]);
+    int64_t costPartBest = calcSaoRdoCost(0, m_entropyCoder.getNumberOfWrittenBits(), lambda[0]);
 
     //EO distortion calculation
     for (int typeIdx = 0; typeIdx < MAX_NUM_SAO_TYPE - 1; typeIdx++)
@@ -1456,8 +1455,7 @@
         m_entropyCoder.resetBits();
         m_entropyCoder.codeSaoOffsetEO(m_offset[0][typeIdx] + 1, typeIdx, 0);
 
-        uint32_t rate = m_entropyCoder.getNumberOfWrittenBits();
-        int64_t cost = calcSaoRdoCost(estDist, rate, lambda[0]);
+        int64_t cost = calcSaoRdoCost(estDist, m_entropyCoder.getNumberOfWrittenBits(), lambda[0]);
 
         if (cost < costPartBest)
         {
@@ -1512,8 +1510,7 @@
     m_entropyCoder.resetBits();
     m_entropyCoder.codeSaoOffsetBO(m_offset[0][SAO_BO] + bestClassBO, bestClassBO, 0);
 
-    uint32_t estRate = m_entropyCoder.getNumberOfWrittenBits();
-    int64_t cost = calcSaoRdoCost(estDist, estRate, lambda[0]);
+    int64_t cost = calcSaoRdoCost(estDist, m_entropyCoder.getNumberOfWrittenBits(), lambda[0]);
 
     if (cost < costPartBest)
     {
@@ -1534,8 +1531,7 @@
 
     if (m_param->internalCsp == X265_CSP_I400)
     {
-        uint32_t rate = m_entropyCoder.getNumberOfWrittenBits();
-        bestCost = rateDist + rate;
+        bestCost = rateDist + m_entropyCoder.getNumberOfWrittenBits();
     }
 }
 



More information about the x265-devel mailing list