[x265] [PATCH 2 of 4] TComSlice: remove unused TComRefPicListModification

Steve Borho steve at borho.org
Thu Oct 24 07:01:42 CEST 2013


# HG changeset patch
# User Steve Borho <steve at borho.org>
# Date 1382590354 18000
#      Wed Oct 23 23:52:34 2013 -0500
# Node ID 3c4d2da71540f69e68bc2ea32c4dee832c92e0b1
# Parent  db5d34950f77f8af13ef3edcc2185d1aa6e95201
TComSlice: remove unused TComRefPicListModification

diff -r db5d34950f77 -r 3c4d2da71540 source/Lib/TLibCommon/TComSlice.cpp
--- a/source/Lib/TLibCommon/TComSlice.cpp	Wed Oct 23 23:37:31 2013 -0500
+++ b/source/Lib/TLibCommon/TComSlice.cpp	Wed Oct 23 23:52:34 2013 -0500
@@ -359,7 +359,7 @@
 
     for (int rIdx = 0; rIdx < m_numRefIdx[0]; rIdx++)
     {
-        cIdx = m_refPicListModification.getRefPicListModificationFlagL0() ? m_refPicListModification.getRefPicSetIdxL0(rIdx) : rIdx % numPocTotalCurr;
+        cIdx = rIdx % numPocTotalCurr;
         assert(cIdx >= 0 && cIdx < numPocTotalCurr);
         m_refPicList[0][rIdx] = rpsCurrList0[cIdx];
         m_bIsUsedAsLongTerm[0][rIdx] = (cIdx >= numPocStCurr0 + numPocStCurr1);
@@ -374,7 +374,7 @@
     {
         for (int rIdx = 0; rIdx < m_numRefIdx[1]; rIdx++)
         {
-            cIdx = m_refPicListModification.getRefPicListModificationFlagL1() ? m_refPicListModification.getRefPicSetIdxL1(rIdx) : rIdx % numPocTotalCurr;
+            cIdx = rIdx % numPocTotalCurr;
             assert(cIdx >= 0 && cIdx < numPocTotalCurr);
             m_refPicList[1][rIdx] = rpsCurrList1[cIdx];
             m_bIsUsedAsLongTerm[1][rIdx] = (cIdx >= numPocStCurr0 + numPocStCurr1);
@@ -1032,17 +1032,6 @@
     return m_numberOfReferencePictureSets;
 }
 
-TComRefPicListModification::TComRefPicListModification()
-    : m_bRefPicListModificationFlagL0(false)
-    , m_bRefPicListModificationFlagL1(false)
-{
-    ::memset(m_RefPicSetIdxL0, 0, sizeof(m_RefPicSetIdxL0));
-    ::memset(m_RefPicSetIdxL1, 0, sizeof(m_RefPicSetIdxL1));
-}
-
-TComRefPicListModification::~TComRefPicListModification()
-{}
-
 TComScalingList::TComScalingList()
 {
     m_useTransformSkip = false;
diff -r db5d34950f77 -r 3c4d2da71540 source/Lib/TLibCommon/TComSlice.h
--- a/source/Lib/TLibCommon/TComSlice.h	Wed Oct 23 23:37:31 2013 -0500
+++ b/source/Lib/TLibCommon/TComSlice.h	Wed Oct 23 23:52:34 2013 -0500
@@ -1053,41 +1053,6 @@
     TComPTL* getPTL() { return &m_ptl; }
 };
 
-/// Reference Picture Lists class
-class TComRefPicListModification
-{
-private:
-
-    bool m_bRefPicListModificationFlagL0;
-    bool m_bRefPicListModificationFlagL1;
-    UInt m_RefPicSetIdxL0[32];
-    UInt m_RefPicSetIdxL1[32];
-
-public:
-
-    TComRefPicListModification();
-    virtual ~TComRefPicListModification();
-
-    void create();
-    void destroy();
-
-    bool getRefPicListModificationFlagL0() { return m_bRefPicListModificationFlagL0; }
-
-    void setRefPicListModificationFlagL0(bool flag) { m_bRefPicListModificationFlagL0 = flag; }
-
-    bool getRefPicListModificationFlagL1() { return m_bRefPicListModificationFlagL1; }
-
-    void setRefPicListModificationFlagL1(bool flag) { m_bRefPicListModificationFlagL1 = flag; }
-
-    void setRefPicSetIdxL0(UInt idx, UInt refPicSetIdx) { m_RefPicSetIdxL0[idx] = refPicSetIdx; }
-
-    UInt getRefPicSetIdxL0(UInt idx) { return m_RefPicSetIdxL0[idx]; }
-
-    void setRefPicSetIdxL1(UInt idx, UInt refPicSetIdx) { m_RefPicSetIdxL1[idx] = refPicSetIdx; }
-
-    UInt getRefPicSetIdxL1(UInt idx) { return m_RefPicSetIdxL1[idx]; }
-};
-
 /// PPS class
 class TComPPS
 {
@@ -1317,7 +1282,6 @@
     TComReferencePictureSet *m_rps;
     TComReferencePictureSet m_localRPS;
     int         m_bdIdx;
-    TComRefPicListModification m_refPicListModification;
     NalUnitType m_nalUnitType;       ///< Nal unit type for the slice
     SliceType   m_sliceType;
     int         m_sliceQp;
@@ -1424,8 +1388,6 @@
 
     int       getRPSidx()                         { return m_bdIdx; }
 
-    TComRefPicListModification* getRefPicListModification() { return &m_refPicListModification; }
-
     void      setLastIDR(int idrPoc)              { m_lastIDR = idrPoc; }
 
     int       getLastIDR()                        { return m_lastIDR; }
diff -r db5d34950f77 -r 3c4d2da71540 source/Lib/TLibEncoder/TEncSbac.cpp
--- a/source/Lib/TLibEncoder/TEncSbac.cpp	Wed Oct 23 23:37:31 2013 -0500
+++ b/source/Lib/TLibEncoder/TEncSbac.cpp	Wed Oct 23 23:52:34 2013 -0500
@@ -1223,55 +1223,6 @@
             slice->setNumRefIdx(REF_PIC_LIST_1, 0);
         }
 
-        if (slice->getPPS()->getListsModificationPresentFlag() && slice->getNumRpsCurrTempList() > 1)
-        {
-            TComRefPicListModification* refPicListModification = slice->getRefPicListModification();
-            if (!slice->isIntra())
-            {
-                WRITE_FLAG(slice->getRefPicListModification()->getRefPicListModificationFlagL0() ? 1 : 0,       "ref_pic_list_modification_flag_l0");
-                if (slice->getRefPicListModification()->getRefPicListModificationFlagL0())
-                {
-                    int numRpsCurrTempList0 = slice->getNumRpsCurrTempList();
-                    if (numRpsCurrTempList0 > 1)
-                    {
-                        int length = 1;
-                        numRpsCurrTempList0--;
-                        while (numRpsCurrTempList0 >>= 1)
-                        {
-                            length++;
-                        }
-
-                        for (int i = 0; i < slice->getNumRefIdx(REF_PIC_LIST_0); i++)
-                        {
-                            WRITE_CODE(refPicListModification->getRefPicSetIdxL0(i), length, "list_entry_l0");
-                        }
-                    }
-                }
-            }
-            if (slice->isInterB())
-            {
-                WRITE_FLAG(slice->getRefPicListModification()->getRefPicListModificationFlagL1() ? 1 : 0,       "ref_pic_list_modification_flag_l1");
-                if (slice->getRefPicListModification()->getRefPicListModificationFlagL1())
-                {
-                    int numRpsCurrTempList1 = slice->getNumRpsCurrTempList();
-                    if (numRpsCurrTempList1 > 1)
-                    {
-                        int length = 1;
-                        numRpsCurrTempList1--;
-                        while (numRpsCurrTempList1 >>= 1)
-                        {
-                            length++;
-                        }
-
-                        for (int i = 0; i < slice->getNumRefIdx(REF_PIC_LIST_1); i++)
-                        {
-                            WRITE_CODE(refPicListModification->getRefPicSetIdxL1(i), length, "list_entry_l1");
-                        }
-                    }
-                }
-            }
-        }
-
         if (slice->isInterB())
         {
             WRITE_FLAG(slice->getMvdL1ZeroFlag() ? 1 : 0,   "mvd_l1_zero_flag");
diff -r db5d34950f77 -r 3c4d2da71540 source/encoder/dpb.cpp
--- a/source/encoder/dpb.cpp	Wed Oct 23 23:37:31 2013 -0500
+++ b/source/encoder/dpb.cpp	Wed Oct 23 23:52:34 2013 -0500
@@ -112,9 +112,6 @@
     applyReferencePictureSet(slice->getRPS(), pocCurr); // Mark pictures in m_piclist as unreferenced if they are not included in RPS
 
     arrangeLongtermPicturesInRPS(slice);
-    TComRefPicListModification* refPicListModification = slice->getRefPicListModification();
-    refPicListModification->setRefPicListModificationFlagL0(false);
-    refPicListModification->setRefPicListModificationFlagL1(false);
     slice->setNumRefIdx(REF_PIC_LIST_0, X265_MIN(m_maxRefL0, slice->getRPS()->getNumberOfNegativePictures())); // Ensuring L0 contains just the -ve POC
     slice->setNumRefIdx(REF_PIC_LIST_1, X265_MIN(m_maxRefL1, slice->getRPS()->getNumberOfPositivePictures()));
 


More information about the x265-devel mailing list