[x265-commits] [x265] TComSlice: remove unused m_list1IdxToList0Idx and methods

Steve Borho steve at borho.org
Wed Oct 16 03:52:38 CEST 2013


details:   http://hg.videolan.org/x265/rev/676788df0ab2
branches:  
changeset: 4476:676788df0ab2
user:      Steve Borho <steve at borho.org>
date:      Tue Oct 15 20:38:20 2013 -0500
description:
TComSlice: remove unused m_list1IdxToList0Idx and methods
Subject: [x265] TEncSearch: nits

details:   http://hg.videolan.org/x265/rev/9bff70c75d32
branches:  
changeset: 4477:9bff70c75d32
user:      Steve Borho <steve at borho.org>
date:      Tue Oct 15 20:50:42 2013 -0500
description:
TEncSearch: nits

diffstat:

 source/Lib/TLibCommon/TComSlice.cpp   |  28 ----------------------------
 source/Lib/TLibCommon/TComSlice.h     |   5 -----
 source/Lib/TLibEncoder/TEncSearch.cpp |  14 ++++++--------
 source/encoder/dpb.cpp                |   1 -
 4 files changed, 6 insertions(+), 42 deletions(-)

diffs (140 lines):

diff -r 397589048016 -r 9bff70c75d32 source/Lib/TLibCommon/TComSlice.cpp
--- a/source/Lib/TLibCommon/TComSlice.cpp	Tue Oct 15 20:32:14 2013 -0500
+++ b/source/Lib/TLibCommon/TComSlice.cpp	Tue Oct 15 20:50:42 2013 -0500
@@ -86,11 +86,6 @@ TComSlice::TComSlice()
 
     initEqualRef();
 
-    for (int idx = 0; idx < MAX_NUM_REF; idx++)
-    {
-        m_list1IdxToList0Idx[idx] = -1;
-    }
-
     for (int numCount = 0; numCount < MAX_NUM_REF; numCount++)
     {
         m_refPicList[0][numCount] = NULL;
@@ -225,24 +220,6 @@ void TComSlice::setRefPOCList()
     }
 }
 
-void TComSlice::setList1IdxToList0Idx()
-{
-    int idxL0, idxL1;
-
-    for (idxL1 = 0; idxL1 < getNumRefIdx(REF_PIC_LIST_1); idxL1++)
-    {
-        m_list1IdxToList0Idx[idxL1] = -1;
-        for (idxL0 = 0; idxL0 < getNumRefIdx(REF_PIC_LIST_0); idxL0++)
-        {
-            if (m_refPicList[REF_PIC_LIST_0][idxL0]->getPOC() == m_refPicList[REF_PIC_LIST_1][idxL1]->getPOC())
-            {
-                m_list1IdxToList0Idx[idxL1] = idxL0;
-                break;
-            }
-        }
-    }
-}
-
 void TComSlice::setRefPicList(PicList& picList, bool checkNumPocTotalCurr)
 {
     if (!checkNumPocTotalCurr)
@@ -502,11 +479,6 @@ void TComSlice::copySliceInfo(TComSlice 
         m_numRefIdx[i] = src->m_numRefIdx[i];
     }
 
-    for (i = 0; i < MAX_NUM_REF; i++)
-    {
-        m_list1IdxToList0Idx[i] = src->m_list1IdxToList0Idx[i];
-    }
-
     m_bCheckLDC           = src->m_bCheckLDC;
     m_sliceQpDelta        = src->m_sliceQpDelta;
     m_sliceQpDeltaCb      = src->m_sliceQpDeltaCb;
diff -r 397589048016 -r 9bff70c75d32 source/Lib/TLibCommon/TComSlice.h
--- a/source/Lib/TLibCommon/TComSlice.h	Tue Oct 15 20:32:14 2013 -0500
+++ b/source/Lib/TLibCommon/TComSlice.h	Tue Oct 15 20:50:42 2013 -0500
@@ -1358,7 +1358,6 @@ private:
     bool        m_deblockingFilterOverrideFlag;    //< offsets for deblocking filter inherit from PPS
     int         m_deblockingFilterBetaOffsetDiv2;  //< beta offset for deblocking filter
     int         m_deblockingFilterTcOffsetDiv2;    //< tc offset for deblocking filter
-    int         m_list1IdxToList0Idx[MAX_NUM_REF];
     int         m_numRefIdx[2];     //  for multiple reference of current slice
 
     bool        m_bCheckLDC;
@@ -1509,8 +1508,6 @@ public:
 
     int       getNumRpsCurrTempList();
 
-    int       getList1IdxToList0Idx(int list1Idx) { return m_list1IdxToList0Idx[list1Idx]; }
-
     void      setReferenced(bool b)            { m_bReferenced = b; }
 
     bool      isReferenced()                   { return m_bReferenced; }
@@ -1588,8 +1585,6 @@ public:
         m_bEqualRef[e][refIdx1][refIdx2] = m_bEqualRef[e][refIdx2][refIdx1] = b;
     }
 
-    void setList1IdxToList0Idx();
-
     void setTLayerInfo(UInt tlayer);
 
     void setMaxNumMergeCand(UInt val)          { m_maxNumMergeCand = val; }
diff -r 397589048016 -r 9bff70c75d32 source/Lib/TLibEncoder/TEncSearch.cpp
--- a/source/Lib/TLibEncoder/TEncSearch.cpp	Tue Oct 15 20:32:14 2013 -0500
+++ b/source/Lib/TLibEncoder/TEncSearch.cpp	Tue Oct 15 20:50:42 2013 -0500
@@ -2331,7 +2331,7 @@ void TEncSearch::predInterSearch(TComDat
                         refIdx[list] = idx;
                     }
 
-                    if (list == 1 && costTemp < costValidList1 && cu->getSlice()->getList1IdxToList0Idx(idx) < 0)
+                    if (list == 1 && costTemp < costValidList1)
                     {
                         costValidList1 = costTemp;
                         bitsValidList1 = bitsTemp;
@@ -2343,7 +2343,7 @@ void TEncSearch::predInterSearch(TComDat
                 }
             }
 
-            //  Bi-directional prediction
+            // Bi-directional prediction
             if ((cu->getSlice()->isInterB()) && (cu->isBipredRestriction(partIdx) == false))
             {
                 mvBidir[0] = mv[0];
@@ -2354,14 +2354,12 @@ void TEncSearch::predInterSearch(TComDat
                 ::memcpy(mvPredBi, mvPred, sizeof(mvPred));
                 ::memcpy(mvpIdxBi, mvpIdx, sizeof(mvpIdx));
 
-                pixel *ref0, *ref1;
-
-                //Generate reference subpels
+                // Generate reference subpels
                 xPredInterLumaBlk(cu, cu->getSlice()->m_mref[0][refIdx[0]], partAddr, &mv[0], roiWidth, roiHeight, &m_predYuv[0]);
                 xPredInterLumaBlk(cu, cu->getSlice()->m_mref[1][refIdx[1]], partAddr, &mv[1], roiWidth, roiHeight, &m_predYuv[1]);
 
-                ref0 = m_predYuv[0].getLumaAddr(partAddr);
-                ref1 = m_predYuv[1].getLumaAddr(partAddr);
+                pixel *ref0 = m_predYuv[0].getLumaAddr(partAddr);
+                pixel *ref1 = m_predYuv[1].getLumaAddr(partAddr);
 
                 ALIGN_VAR_32(pixel, avg[MAX_CU_SIZE * MAX_CU_SIZE]);
 
@@ -2393,7 +2391,7 @@ void TEncSearch::predInterSearch(TComDat
                     xCheckBestMVP(cu, REF_PIC_LIST_0, mvzero, mvPredBi[0][refIdxBidir[0]], mvpIdxBi[0][refIdxBidir[0]], bitsZero0, costTemp);
                     xCheckBestMVP(cu, REF_PIC_LIST_1, mvzero, mvPredBi[1][refIdxBidir[1]], mvpIdxBi[1][refIdxBidir[1]], bitsZero1, costTemp);
 
-                    int costZero =  satdCost + m_rdCost->getCost(bitsZero0) + m_rdCost->getCost(bitsZero1);
+                    int costZero = satdCost + m_rdCost->getCost(bitsZero0) + m_rdCost->getCost(bitsZero1);
                     if (costZero < costbi)
                     {
                         costbi = costZero;
diff -r 397589048016 -r 9bff70c75d32 source/encoder/dpb.cpp
--- a/source/encoder/dpb.cpp	Tue Oct 15 20:32:14 2013 -0500
+++ b/source/encoder/dpb.cpp	Tue Oct 15 20:50:42 2013 -0500
@@ -159,7 +159,6 @@ void DPB::prepareEncode(TComPic *pic)
     }
 
     slice->setRefPOCList();
-    slice->setList1IdxToList0Idx();
     slice->setEnableTMVPFlag(1);
 
     bool bGPBcheck = false;


More information about the x265-commits mailing list