[x265] [PATCH] qp: remove Encoder::m_useLossless

deepthi at multicorewareinc.com deepthi at multicorewareinc.com
Tue Jun 3 12:37:42 CEST 2014


# HG changeset patch
# User Deepthi Nandakumar <deepthi at multicorewareinc.com>
# Date 1401791842 -19800
#      Tue Jun 03 16:07:22 2014 +0530
# Node ID 414f08539dceee694c1ee5b8e179915267a4a4b6
# Parent  d3f55d391314527b87a985fa68bc213bd8cce584
qp: remove Encoder::m_useLossless.

This patch removes confusion between Encoder::m_useLossless and x265_param::bUseLossless.
m_useLossless was set whenever qp = 0, and used in TComSPS. qp = 0  is still a valid
encoder option.

diff -r d3f55d391314 -r 414f08539dce source/Lib/TLibCommon/TComSlice.cpp
--- a/source/Lib/TLibCommon/TComSlice.cpp	Tue Jun 03 16:01:08 2014 +0530
+++ b/source/Lib/TLibCommon/TComSlice.cpp	Tue Jun 03 16:07:22 2014 +0530
@@ -487,7 +487,6 @@
     , m_bitDepthC(8)
     , m_qpBDOffsetY(0)
     , m_qpBDOffsetC(0)
-    , m_useLossless(false)
     , m_pcmBitDepthLuma(8)
     , m_pcmBitDepthChroma(8)
     , m_bPCMFilterDisableFlag(false)
diff -r d3f55d391314 -r 414f08539dce source/Lib/TLibCommon/TComSlice.h
--- a/source/Lib/TLibCommon/TComSlice.h	Tue Jun 03 16:01:08 2014 +0530
+++ b/source/Lib/TLibCommon/TComSlice.h	Tue Jun 03 16:07:22 2014 +0530
@@ -816,8 +816,6 @@
     int         m_qpBDOffsetY;
     int         m_qpBDOffsetC;
 
-    bool        m_useLossless;
-
     uint32_t    m_pcmBitDepthLuma;
     uint32_t    m_pcmBitDepthChroma;
     bool        m_bPCMFilterDisableFlag;
@@ -973,11 +971,6 @@
 
     uint32_t getMaxTrSize() const   { return m_maxTrSize; }
 
-    // Tool list
-    bool getUseLossless() const { return m_useLossless; }
-
-    void setUseLossless(bool b) { m_useLossless  = b; }
-
     // AMP accuracy
     int       getAMPAcc(uint32_t depth) const { return m_iAMPAcc[depth]; }
 
diff -r d3f55d391314 -r 414f08539dce source/Lib/TLibEncoder/TEncSearch.cpp
--- a/source/Lib/TLibEncoder/TEncSearch.cpp	Tue Jun 03 16:01:08 2014 +0530
+++ b/source/Lib/TLibEncoder/TEncSearch.cpp	Tue Jun 03 16:07:22 2014 +0530
@@ -638,7 +638,7 @@
                                    !cu->getCUTransquantBypass(0));
         if (checkTransformSkip)
         {
-            checkTransformSkip &= (!((cu->getQP(0) == 0) && (cu->getSlice()->getSPS()->getUseLossless())));
+            checkTransformSkip &= !((cu->getQP(0) == 0));
             if (m_cfg->param->bEnableTSkipFast)
             {
                 checkTransformSkip &= (cu->getPartitionSize(absPartIdx) == SIZE_NxN);
diff -r d3f55d391314 -r 414f08539dce source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp	Tue Jun 03 16:01:08 2014 +0530
+++ b/source/encoder/encoder.cpp	Tue Jun 03 16:07:22 2014 +0530
@@ -1057,7 +1057,6 @@
     sps->setQuadtreeTUMaxDepthIntra(param->tuQTMaxIntraDepth);
 
     sps->setTMVPFlagsPresent(false);
-    sps->setUseLossless(m_useLossless);
 
     sps->setMaxTrSize(1 << m_quadtreeTULog2MaxSize);
 
@@ -1154,16 +1153,9 @@
 
     int lowestQP = -QP_BD_OFFSET;
 
-    if (m_useLossless)
+    if ((m_maxCuDQPDepth == 0) && (param->rc.qp == lowestQP))
     {
-        if ((m_maxCuDQPDepth == 0) && (param->rc.qp == lowestQP))
-        {
-            bUseDQP = false;
-        }
-        else
-        {
-            bUseDQP = true;
-        }
+        bUseDQP = false;
     }
 
     if (bUseDQP)
@@ -1447,8 +1439,6 @@
     m_bPCMInputBitDepthFlag = true;
     m_bPCMFilterDisableFlag = false;
 
-    m_useLossless = false;  // x264 configures this via --qp=0
-    
     if (p->bLossless)
     {
         m_TransquantBypassEnableFlag  = true;


More information about the x265-devel mailing list