[x265-commits] [x265] slice: white-space cleanups, remove dead funcdefs and for...

Steve Borho steve at borho.org
Tue Jul 15 09:00:26 CEST 2014


details:   http://hg.videolan.org/x265/rev/2454ef2a083e
branches:  
changeset: 7346:2454ef2a083e
user:      Steve Borho <steve at borho.org>
date:      Mon Jul 14 23:28:12 2014 -0500
description:
slice: white-space cleanups, remove dead funcdefs and forward defs
Subject: [x265] param: fix cut-paste bug

details:   http://hg.videolan.org/x265/rev/836c08981029
branches:  
changeset: 7347:836c08981029
user:      Steve Borho <steve at borho.org>
date:      Tue Jul 15 00:00:42 2014 -0500
description:
param: fix cut-paste bug
Subject: [x265] slice: remove RPS list class and relevant SPS encoding logic

details:   http://hg.videolan.org/x265/rev/59855812b4ef
branches:  
changeset: 7348:59855812b4ef
user:      Steve Borho <steve at borho.org>
date:      Tue Jul 15 00:00:14 2014 -0500
description:
slice: remove RPS list class and relevant SPS encoding logic

x265 only codes a reference picture set in the slice header, none in the SPS
and never an "inter-RPS"
Subject: [x265] api: add an option to disable the informational SEI message

details:   http://hg.videolan.org/x265/rev/6f51bf4ba665
branches:  
changeset: 7349:6f51bf4ba665
user:      Steve Borho <steve at borho.org>
date:      Tue Jul 15 00:35:35 2014 -0500
description:
api: add an option to disable the informational SEI message

For regression testing, or comparing outputs between compilers or platforms,
this header is quite unhelpful, so make it optional.
Subject: [x265] slice: remove set/get methods from ProfileTierLevel, and dead encoder vars

details:   http://hg.videolan.org/x265/rev/fa4fc98233e0
branches:  
changeset: 7350:fa4fc98233e0
user:      Steve Borho <steve at borho.org>
date:      Tue Jul 15 00:54:29 2014 -0500
description:
slice: remove set/get methods from ProfileTierLevel, and dead encoder vars
Subject: [x265] slice: Remove get/set methods from TComPTL

details:   http://hg.videolan.org/x265/rev/c52a6321b845
branches:  
changeset: 7351:c52a6321b845
user:      Steve Borho <steve at borho.org>
date:      Tue Jul 15 01:02:25 2014 -0500
description:
slice: Remove get/set methods from TComPTL
Subject: [x265] entropy: remove profilePresentFlag argument from codePTL, always 1

details:   http://hg.videolan.org/x265/rev/5995d7bbfa1a
branches:  
changeset: 7352:5995d7bbfa1a
user:      Steve Borho <steve at borho.org>
date:      Tue Jul 15 01:05:43 2014 -0500
description:
entropy: remove profilePresentFlag argument from codePTL, always 1
Subject: [x265] entropy: simplify PTL coding, there is only one layer

details:   http://hg.videolan.org/x265/rev/8542b057d33e
branches:  
changeset: 7353:8542b057d33e
user:      Steve Borho <steve at borho.org>
date:      Tue Jul 15 01:17:43 2014 -0500
description:
entropy: simplify PTL coding, there is only one layer
Subject: [x265] encoder: keep ProfileTierLevel singleton in the top-level encoder

details:   http://hg.videolan.org/x265/rev/83b498cd9aef
branches:  
changeset: 7354:83b498cd9aef
user:      Steve Borho <steve at borho.org>
date:      Tue Jul 15 01:30:26 2014 -0500
description:
encoder: keep ProfileTierLevel singleton in the top-level encoder

Remove the copies in the SPS and VPS and remove the TComPTL object entirely,
there is only one level.
Subject: [x265] entropy: hoist a couple of trivial functions, brace nits

details:   http://hg.videolan.org/x265/rev/5c5183eeacb5
branches:  
changeset: 7355:5c5183eeacb5
user:      Steve Borho <steve at borho.org>
date:      Tue Jul 15 01:48:38 2014 -0500
description:
entropy: hoist a couple of trivial functions, brace nits

diffstat:

 doc/reST/cli.rst                    |    8 +
 source/CMakeLists.txt               |    2 +-
 source/Lib/TLibCommon/TComSlice.cpp |   57 ------
 source/Lib/TLibCommon/TComSlice.h   |  298 ++++++++++++-----------------------
 source/common/param.cpp             |    8 +-
 source/encoder/encoder.cpp          |   37 +---
 source/encoder/encoder.h            |    4 +-
 source/encoder/entropy.cpp          |  296 +++++++---------------------------
 source/encoder/entropy.h            |   13 +-
 source/encoder/frameencoder.cpp     |   47 +++--
 source/x265.cpp                     |    3 +
 source/x265.h                       |    5 +
 12 files changed, 234 insertions(+), 544 deletions(-)

diffs (truncated from 1570 to 300 lines):

diff -r e3efe14f4e6a -r 5c5183eeacb5 doc/reST/cli.rst
--- a/doc/reST/cli.rst	Mon Jul 14 13:59:03 2014 -0500
+++ b/doc/reST/cli.rst	Tue Jul 15 01:48:38 2014 -0500
@@ -904,6 +904,14 @@ Bitstream options
 	to keep the stream headers for you and you want keyframes to be
 	random access points. Default disabled
 
+.. option:: --info, --no-info
+
+	Emit an informational SEI with the stream headers which describes
+	the encoder version, build info, and encode parameters. This is very
+	helpful for debugging purposes but encoding version numbers and
+	build info could make your bitstreams diverge and interfere with
+	regression testing. Default enabled
+
 .. option:: --hrd, --no-hrd
 
 	Enable the signalling of HRD parameters to the decoder. The HRD
diff -r e3efe14f4e6a -r 5c5183eeacb5 source/CMakeLists.txt
--- a/source/CMakeLists.txt	Mon Jul 14 13:59:03 2014 -0500
+++ b/source/CMakeLists.txt	Tue Jul 15 01:48:38 2014 -0500
@@ -19,7 +19,7 @@ include(CheckSymbolExists)
 include(CheckCXXCompilerFlag)
 
 # X265_BUILD must be incremented each time the public API is changed
-set(X265_BUILD 26)
+set(X265_BUILD 27)
 configure_file("${PROJECT_SOURCE_DIR}/x265.def.in"
                "${PROJECT_BINARY_DIR}/x265.def")
 configure_file("${PROJECT_SOURCE_DIR}/x265_config.h.in"
diff -r e3efe14f4e6a -r 5c5183eeacb5 source/Lib/TLibCommon/TComSlice.cpp
--- a/source/Lib/TLibCommon/TComSlice.cpp	Mon Jul 14 13:59:03 2014 -0500
+++ b/source/Lib/TLibCommon/TComSlice.cpp	Tue Jul 15 01:48:38 2014 -0500
@@ -498,13 +498,6 @@ TComSPS::TComSPS()
 TComSPS::~TComSPS()
 {
     delete m_scalingList;
-    m_RPSList.destroy();
-}
-
-void  TComSPS::createRPSList(int numRPS)
-{
-    m_RPSList.destroy();
-    m_RPSList.create(numRPS);
 }
 
 TComPPS::TComPPS()
@@ -673,37 +666,6 @@ void TComReferencePictureSet::printDelta
     printf("}\n");
 }
 
-TComRPSList::TComRPSList()
-    : m_numberOfReferencePictureSets(0)
-    , m_referencePictureSets(NULL)
-{}
-
-TComRPSList::~TComRPSList()
-{}
-
-void TComRPSList::create(int numberOfReferencePictureSets)
-{
-    m_numberOfReferencePictureSets = numberOfReferencePictureSets;
-    m_referencePictureSets = new TComReferencePictureSet[numberOfReferencePictureSets];
-}
-
-void TComRPSList::destroy()
-{
-    delete [] m_referencePictureSets;
-    m_numberOfReferencePictureSets = 0;
-    m_referencePictureSets = NULL;
-}
-
-TComReferencePictureSet* TComRPSList::getReferencePictureSet(int referencePictureSetNum)
-{
-    return &m_referencePictureSets[referencePictureSetNum];
-}
-
-int TComRPSList::getNumberOfReferencePictureSets() const
-{
-    return m_numberOfReferencePictureSets;
-}
-
 TComScalingList::TComScalingList()
 {
     m_useTransformSkip = false;
@@ -926,23 +888,4 @@ void TComScalingList::checkDcOfMatrix()
     }
 }
 
-ProfileTierLevel::ProfileTierLevel()
-    : m_profileSpace(0)
-    , m_tierFlag(false)
-    , m_profileIdc(0)
-    , m_levelIdc(0)
-    , m_progressiveSourceFlag(false)
-    , m_interlacedSourceFlag(false)
-    , m_nonPackedConstraintFlag(false)
-    , m_frameOnlyConstraintFlag(false)
-{
-    ::memset(m_profileCompatibilityFlag, 0, sizeof(m_profileCompatibilityFlag));
-}
-
-TComPTL::TComPTL()
-{
-    ::memset(m_subLayerProfilePresentFlag, 0, sizeof(m_subLayerProfilePresentFlag));
-    ::memset(m_subLayerLevelPresentFlag,   0, sizeof(m_subLayerLevelPresentFlag));
-}
-
 //! \}
diff -r e3efe14f4e6a -r 5c5183eeacb5 source/Lib/TLibCommon/TComSlice.h
--- a/source/Lib/TLibCommon/TComSlice.h	Mon Jul 14 13:59:03 2014 -0500
+++ b/source/Lib/TLibCommon/TComSlice.h	Tue Jul 15 01:48:38 2014 -0500
@@ -49,8 +49,6 @@ namespace x265 {
 // private namespace
 
 class Frame;
-class TComTrQuant;
-class MotionReference;
 class PicList;
 
 // ====================================================================================================================
@@ -64,7 +62,7 @@ class PicList;
 /// Reference Picture Set class
 class TComReferencePictureSet
 {
-private:
+public:
 
     // Parameters for inter RPS prediction
     int  m_deltaRIdxMinus1;
@@ -78,8 +76,6 @@ private:
     int  m_deltaPOCMSBCycleLT[MAX_NUM_REF_PICS];
     bool m_deltaPocMSBPresentFlag[MAX_NUM_REF_PICS];
 
-public:
-
     int  m_numberOfPictures;
     int  m_numberOfNegativePictures;
     int  m_numberOfPositivePictures;
@@ -93,17 +89,15 @@ public:
     TComReferencePictureSet();
     ~TComReferencePictureSet();
 
-    int   getPocLSBLT(int i)                       { return m_pocLSBLT[i]; }
+    void setPocLSBLT(int i, int x)                { m_pocLSBLT[i] = x; }
 
-    void  setPocLSBLT(int i, int x)                { m_pocLSBLT[i] = x; }
+    int  getDeltaPocMSBCycleLT(int i)             { return m_deltaPOCMSBCycleLT[i]; }
 
-    int   getDeltaPocMSBCycleLT(int i)             { return m_deltaPOCMSBCycleLT[i]; }
+    void setDeltaPocMSBCycleLT(int i, int x)      { m_deltaPOCMSBCycleLT[i] = x; }
 
-    void  setDeltaPocMSBCycleLT(int i, int x)      { m_deltaPOCMSBCycleLT[i] = x; }
+    bool getDeltaPocMSBPresentFlag(int i)         { return m_deltaPocMSBPresentFlag[i]; }
 
-    bool  getDeltaPocMSBPresentFlag(int i)         { return m_deltaPocMSBPresentFlag[i]; }
-
-    void  setDeltaPocMSBPresentFlag(int i, bool x) { m_deltaPocMSBPresentFlag[i] = x; }
+    void setDeltaPocMSBPresentFlag(int i, bool x) { m_deltaPocMSBPresentFlag[i] = x; }
 
     void setUsed(int bufferNum, bool used);
     void setDeltaPOC(int bufferNum, int deltaPOC);
@@ -136,26 +130,6 @@ public:
     void printDeltaPOC();
 };
 
-/// Reference Picture Set set class
-class TComRPSList
-{
-private:
-
-    int  m_numberOfReferencePictureSets;
-    TComReferencePictureSet* m_referencePictureSets;
-
-public:
-
-    TComRPSList();
-    ~TComRPSList();
-
-    void  create(int numberOfEntries);
-    void  destroy();
-
-    TComReferencePictureSet* getReferencePictureSet(int referencePictureSetNum);
-    int getNumberOfReferencePictureSets() const;
-};
-
 /// SCALING_LIST class
 class TComScalingList
 {
@@ -172,18 +146,18 @@ public:
 
     void     setUseTransformSkip(bool b)                        { m_useTransformSkip = b; }
 
-    int32_t* getScalingListAddress(uint32_t sizeId, uint32_t listId)    { return m_scalingListCoef[sizeId][listId]; }          //!< get matrix coefficient
+    int32_t* getScalingListAddress(uint32_t sizeId, uint32_t listId)    { return m_scalingListCoef[sizeId][listId]; }
 
     bool     checkPredMode(uint32_t sizeId, int listId);
-    void     setRefMatrixId(uint32_t sizeId, uint32_t listId, uint32_t u)   { m_refMatrixId[sizeId][listId] = u;    }                    //!< set reference matrix ID
+    void     setRefMatrixId(uint32_t sizeId, uint32_t listId, uint32_t u) { m_refMatrixId[sizeId][listId] = u; }
 
-    uint32_t getRefMatrixId(uint32_t sizeId, uint32_t listId)           { return m_refMatrixId[sizeId][listId]; }                    //!< get reference matrix ID
+    uint32_t getRefMatrixId(uint32_t sizeId, uint32_t listId)           { return m_refMatrixId[sizeId][listId]; }
 
-    int32_t* getScalingListDefaultAddress(uint32_t sizeId, uint32_t listId);                                                         //!< get default matrix coefficient
+    int32_t* getScalingListDefaultAddress(uint32_t sizeId, uint32_t listId);
     void     processDefaultMarix(uint32_t sizeId, uint32_t listId);
-    void     setScalingListDC(uint32_t sizeId, uint32_t listId, uint32_t u) { m_scalingListDC[sizeId][listId] = u; }                   //!< set DC value
+    void     setScalingListDC(uint32_t sizeId, uint32_t listId, uint32_t u) { m_scalingListDC[sizeId][listId] = u; }
 
-    int      getScalingListDC(uint32_t sizeId, uint32_t listId)         { return m_scalingListDC[sizeId][listId]; }                //!< get DC value
+    int      getScalingListDC(uint32_t sizeId, uint32_t listId)         { return m_scalingListDC[sizeId][listId]; }
 
     void     checkDcOfMatrix();
     void     processRefMatrix(uint32_t sizeId, uint32_t listId, uint32_t refListId);
@@ -204,6 +178,8 @@ private:
 
 class ProfileTierLevel
 {
+public:
+
     int     m_profileSpace;
     bool    m_tierFlag;
     int     m_profileIdc;
@@ -214,64 +190,18 @@ class ProfileTierLevel
     bool    m_nonPackedConstraintFlag;
     bool    m_frameOnlyConstraintFlag;
 
-public:
-
-    ProfileTierLevel();
-
-    int getProfileSpace() const { return m_profileSpace; }
-
-    bool getTierFlag() const    { return m_tierFlag; }
-
-    void setTierFlag(bool x)    { m_tierFlag = x; }
-
-    int getProfileIdc() const   { return m_profileIdc; }
-
-    void setProfileIdc(int x)   { m_profileIdc = x; }
-
-    bool getProfileCompatibilityFlag(int i) const   { return m_profileCompatibilityFlag[i]; }
-
-    void setProfileCompatibilityFlag(int i, bool x) { m_profileCompatibilityFlag[i] = x; }
-
-    int getLevelIdc() const                 { return m_levelIdc; }
-
-    void setLevelIdc(int x)                 { m_levelIdc = x; }
-
-    bool getProgressiveSourceFlag() const   { return m_progressiveSourceFlag; }
-
-    void setProgressiveSourceFlag(bool b)   { m_progressiveSourceFlag = b; }
-
-    bool getInterlacedSourceFlag() const    { return m_interlacedSourceFlag; }
-
-    void setInterlacedSourceFlag(bool b)    { m_interlacedSourceFlag = b; }
-
-    bool getNonPackedConstraintFlag() const { return m_nonPackedConstraintFlag; }
-
-    void setNonPackedConstraintFlag(bool b) { m_nonPackedConstraintFlag = b; }
-
-    bool getFrameOnlyConstraintFlag() const { return m_frameOnlyConstraintFlag; }
-
-    void setFrameOnlyConstraintFlag(bool b) { m_frameOnlyConstraintFlag = b; }
-};
-
-class TComPTL
-{
-    ProfileTierLevel m_generalPTL;
-    ProfileTierLevel m_subLayerPTL[6];    // max. value of max_sub_layers_minus1 is 6
-    bool m_subLayerProfilePresentFlag[6];
-    bool m_subLayerLevelPresentFlag[6];
-
-public:
-
-    TComPTL();
-    bool getSubLayerProfilePresentFlag(int i) const { return m_subLayerProfilePresentFlag[i]; }
-
-    void setSubLayerProfilePresentFlag(int i, bool x) { m_subLayerProfilePresentFlag[i] = x; }
-
-    bool getSubLayerLevelPresentFlag(int i) const { return m_subLayerLevelPresentFlag[i]; }
-
-    ProfileTierLevel* getGeneralPTL() { return &m_generalPTL; }
-
-    ProfileTierLevel* getSubLayerPTL(int i) { return &m_subLayerPTL[i]; }
+    ProfileTierLevel()
+        : m_profileSpace(0)
+        , m_tierFlag(false)
+        , m_profileIdc(0)
+        , m_levelIdc(0)
+        , m_progressiveSourceFlag(false)
+        , m_interlacedSourceFlag(false)
+        , m_nonPackedConstraintFlag(false)
+        , m_frameOnlyConstraintFlag(false)
+    {
+        ::memset(m_profileCompatibilityFlag, 0, sizeof(m_profileCompatibilityFlag));
+    }
 };
 
 /// VPS class


More information about the x265-commits mailing list