[x265] [PATCH 2 of 2] ratecontrol: cleanup, remove sliceQPBase

deepthi at multicorewareinc.com deepthi at multicorewareinc.com
Fri Feb 14 11:59:47 CET 2014


# HG changeset patch
# User Deepthi Nandakumar <deepthi at multicorewareinc.com>
# Date 1392372120 -19800
# Node ID ed28c1935087ddf2c7aae6c5b491592fa6162d7e
# Parent  6ac5fa8bf0f9d8994c69978f7f46a50d666c79ac
ratecontrol: cleanup, remove sliceQPBase.

Always a duplicate of sliceQp.

diff -r 6ac5fa8bf0f9 -r ed28c1935087 source/Lib/TLibCommon/TComSlice.cpp
--- a/source/Lib/TLibCommon/TComSlice.cpp	Fri Feb 14 15:04:23 2014 +0530
+++ b/source/Lib/TLibCommon/TComSlice.cpp	Fri Feb 14 15:32:00 2014 +0530
@@ -54,7 +54,6 @@
     , m_sliceType(I_SLICE)
     , m_sliceQp(0)
     , m_dependentSliceSegmentFlag(false)
-    , m_sliceQpBase(0)
     , m_deblockingFilterDisable(false)
     , m_deblockingFilterOverrideFlag(false)
     , m_deblockingFilterBetaOffsetDiv2(0)
diff -r 6ac5fa8bf0f9 -r ed28c1935087 source/Lib/TLibCommon/TComSlice.h
--- a/source/Lib/TLibCommon/TComSlice.h	Fri Feb 14 15:04:23 2014 +0530
+++ b/source/Lib/TLibCommon/TComSlice.h	Fri Feb 14 15:32:00 2014 +0530
@@ -1303,7 +1303,6 @@
     SliceType   m_sliceType;
     int         m_sliceQp;
     bool        m_dependentSliceSegmentFlag;
-    int         m_sliceQpBase;
     bool        m_deblockingFilterDisable;
     bool        m_deblockingFilterOverrideFlag;    //< offsets for deblocking filter inherit from PPS
     int         m_deblockingFilterBetaOffsetDiv2;  //< beta offset for deblocking filter
@@ -1414,9 +1413,7 @@
     bool      getDependentSliceSegmentFlag() const   { return m_dependentSliceSegmentFlag; }
 
     void      setDependentSliceSegmentFlag(bool val) { m_dependentSliceSegmentFlag = val; }
-
-    int       getSliceQpBase()                    { return m_sliceQpBase; }
-
+    
     int       getSliceQpDelta()                   { return m_sliceQpDelta; }
 
     int       getSliceQpDeltaCb()                 { return m_sliceQpDeltaCb; }
@@ -1476,8 +1473,6 @@
 
     void      setSliceQp(int i)                       { m_sliceQp = i; }
 
-    void      setSliceQpBase(int i)                   { m_sliceQpBase = i; }
-
     void      setSliceQpDelta(int i)                  { m_sliceQpDelta = i; }
 
     void      setSliceQpDeltaCb(int i)                { m_sliceQpDeltaCb = i; }
diff -r 6ac5fa8bf0f9 -r ed28c1935087 source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp	Fri Feb 14 15:04:23 2014 +0530
+++ b/source/encoder/encoder.cpp	Fri Feb 14 15:32:00 2014 +0530
@@ -831,11 +831,10 @@
     {
         char c = (slice->isIntra() ? 'I' : slice->isInterP() ? 'P' : 'B');
         int poc = slice->getPOC();
-        int QP_Base = slice->getSliceQpBase();
         int QP = slice->getSliceQp();
         if (!slice->isReferenced())
             c += 32; // lower case if unreferenced
-        fprintf(stderr, "\rPOC %4d ( %c-SLICE, nQP %d QP %d) %10d bits", poc, c, QP_Base, QP, bits);
+        fprintf(stderr, "\rPOC %4d ( %c-SLICE, QP %d) %10d bits", poc, c, QP, bits);
         if (param.bEnablePsnr)
             fprintf(stderr, " [Y:%6.2lf U:%6.2lf V:%6.2lf]", psnrY, psnrU, psnrV);
         if (param.bEnableSsim)
@@ -860,7 +859,7 @@
         // per frame CSV logging if the file handle is valid
         if (m_csvfpt)
         {
-            fprintf(m_csvfpt, "%d, %c-SLICE, %4d, %d, %d, %10d,", m_outputCount++, c, poc, QP_Base, QP, bits);
+            fprintf(m_csvfpt, "%d, %c-SLICE, %4d, %d, %10d,", m_outputCount++, c, poc, QP, bits);
             double psnr = (psnrY * 6 + psnrU + psnrV) / 8;
             if (param.bEnablePsnr)
                 fprintf(m_csvfpt, "%.3lf, %.3lf, %.3lf, %.3lf,", psnrY, psnrU, psnrV, psnr);
diff -r 6ac5fa8bf0f9 -r ed28c1935087 source/encoder/frameencoder.cpp
--- a/source/encoder/frameencoder.cpp	Fri Feb 14 15:04:23 2014 +0530
+++ b/source/encoder/frameencoder.cpp	Fri Feb 14 15:32:00 2014 +0530
@@ -414,7 +414,6 @@
     {
         qp = MAX_QP;
         slice->setSliceQp(qp);
-        slice->setSliceQpBase(qp);
     }
     slice->setSliceQpDelta(0);
     slice->setSliceQpDeltaCb(0);
diff -r 6ac5fa8bf0f9 -r ed28c1935087 source/encoder/ratecontrol.cpp
--- a/source/encoder/ratecontrol.cpp	Fri Feb 14 15:04:23 2014 +0530
+++ b/source/encoder/ratecontrol.cpp	Fri Feb 14 15:32:00 2014 +0530
@@ -402,7 +402,6 @@
     framesDone++;
     /* set the final QP to slice structure */
     curSlice->setSliceQp(qp);
-    curSlice->setSliceQpBase(qp);
     curSlice->m_avgQpRc = qp;
 }
 


More information about the x265-devel mailing list