[x265] [PATCH] TComSlice: Removed un-used createExplicitReferencePictureSetFromReference() Method

Gopu Govindaswamy gopu at multicorewareinc.com
Tue Oct 8 10:52:39 CEST 2013


# HG changeset patch
# User Gopu Govindaswamy <gopu at multicorewareinc.com>
# Date 1381222349 -19800
# Node ID fe870acd8a628e322d3a758f6af3fdf37857b7c0
# Parent  ac6cbc9cb2be08bd04c54b8e323633e676b0503f
TComSlice: Removed un-used createExplicitReferencePictureSetFromReference() Method

diff -r ac6cbc9cb2be -r fe870acd8a62 source/Lib/TLibCommon/TComSlice.cpp
--- a/source/Lib/TLibCommon/TComSlice.cpp	Tue Oct 08 14:16:51 2013 +0530
+++ b/source/Lib/TLibCommon/TComSlice.cpp	Tue Oct 08 14:22:29 2013 +0530
@@ -759,98 +759,6 @@
     }
 }
 
-/** Function for constructing an explicit Reference Picture Set out of the available pictures in a referenced Reference Picture Set
-*/
-void TComSlice::createExplicitReferencePictureSetFromReference(TComList<TComPic*>& picList, TComReferencePictureSet *rps, bool isRAP)
-{
-    TComPic* outPic;
-    int i, j;
-    int k = 0;
-    int nrOfNegativePictures = 0;
-    int nrOfPositivePictures = 0;
-    TComReferencePictureSet* refRPS = this->getLocalRPS();
-
-    // loop through all pictures in the Reference Picture Set
-    for (i = 0; i < rps->getNumberOfPictures(); i++)
-    {
-        j = 0;
-        // loop through all pictures in the reference picture buffer
-        TComList<TComPic*>::iterator iterPic = picList.begin();
-        while (iterPic != picList.end())
-        {
-            j++;
-            outPic = *(iterPic++);
-
-            if (outPic->getPicSym()->getSlice()->getPOC() == this->getPOC() + rps->getDeltaPOC(i) && outPic->getSlice()->isReferenced())
-            {
-                // This picture exists as a reference picture
-                // and should be added to the explicit Reference Picture Set
-                refRPS->setDeltaPOC(k, rps->getDeltaPOC(i));
-                refRPS->setUsed(k, rps->getUsed(i) && (!isRAP));
-                if (refRPS->getDeltaPOC(k) < 0)
-                {
-                    nrOfNegativePictures++;
-                }
-                else
-                {
-                    nrOfPositivePictures++;
-                }
-                k++;
-            }
-        }
-    }
-
-    refRPS->setNumberOfNegativePictures(nrOfNegativePictures);
-    refRPS->setNumberOfPositivePictures(nrOfPositivePictures);
-    refRPS->setNumberOfPictures(nrOfNegativePictures + nrOfPositivePictures);
-    // This is a simplistic inter rps example. A smarter encoder will look for a better reference RPS to do the
-    // inter RPS prediction with.  Here we just use the reference used by pReferencePictureSet.
-    // If pReferencePictureSet is not inter_RPS_predicted, then inter_RPS_prediction is for the current RPS also disabled.
-    if (!rps->getInterRPSPrediction())
-    {
-        refRPS->setInterRPSPrediction(false);
-        refRPS->setNumRefIdc(0);
-    }
-    else
-    {
-        int rIdx =  this->getRPSidx() - rps->getDeltaRIdxMinus1() - 1;
-        int deltaRPS = rps->getDeltaRPS();
-        const TComReferencePictureSet *refRPSOther = this->getSPS()->getRPSList()->getReferencePictureSet(rIdx);
-        int refPics = refRPSOther->getNumberOfPictures();
-        int newIdc = 0;
-        for (i = 0; i <= refPics; i++)
-        {
-            int deltaPOC = ((i != refPics) ? refRPSOther->getDeltaPOC(i) : 0); // check if the reference abs POC is >= 0
-            int refIdc = 0;
-            for (j = 0; j < refRPS->getNumberOfPictures(); j++) // loop through the  pictures in the new RPS
-            {
-                if ((deltaPOC + deltaRPS) == refRPS->getDeltaPOC(j))
-                {
-                    if (refRPS->getUsed(j))
-                    {
-                        refIdc = 1;
-                    }
-                    else
-                    {
-                        refIdc = 2;
-                    }
-                }
-            }
-
-            refRPS->setRefIdc(i, refIdc);
-            newIdc++;
-        }
-
-        refRPS->setInterRPSPrediction(true);
-        refRPS->setNumRefIdc(newIdc);
-        refRPS->setDeltaRPS(deltaRPS);
-        refRPS->setDeltaRIdxMinus1(rps->getDeltaRIdxMinus1() + this->getSPS()->getRPSList()->getNumberOfReferencePictureSets() - this->getRPSidx());
-    }
-
-    this->setRPS(refRPS);
-    this->setRPSidx(-1);
-}
-
 /** get AC and DC values for weighted pred
  * \param *wp
  * \returns void
diff -r ac6cbc9cb2be -r fe870acd8a62 source/Lib/TLibCommon/TComSlice.h
--- a/source/Lib/TLibCommon/TComSlice.h	Tue Oct 08 14:16:51 2013 +0530
+++ b/source/Lib/TLibCommon/TComSlice.h	Tue Oct 08 14:22:29 2013 +0530
@@ -1622,7 +1622,6 @@
     void setTLayerInfo(UInt tlayer);
     void decodingMarking(TComList<TComPic*>& picList, int gopSize, int& maxRefPicNum);
     int  checkThatAllRefPicsAreAvailable(TComList<TComPic*>& picList, TComReferencePictureSet *rps, bool printErrors, int pocRandomAccess = 0);
-    void createExplicitReferencePictureSetFromReference(TComList<TComPic*>& picList, TComReferencePictureSet *rps, bool isRAP);
 
     void setMaxNumMergeCand(UInt val)          { m_maxNumMergeCand = val; }
 


More information about the x265-devel mailing list