[x265] [PATCH] tcomslice: removed un-used checkThatAllRefPicsAreAvailable() function

Gopu Govindaswamy gopu at multicorewareinc.com
Tue Oct 8 10:55:42 CEST 2013


# HG changeset patch
# User Gopu Govindaswamy <gopu at multicorewareinc.com>
# Date 1381222532 -19800
# Node ID 565270489635b5b70f682eb03d47004b2b2fdeeb
# Parent  fe870acd8a628e322d3a758f6af3fdf37857b7c0
tcomslice: removed un-used checkThatAllRefPicsAreAvailable() function

diff -r fe870acd8a62 -r 565270489635 source/Lib/TLibCommon/TComSlice.cpp
--- a/source/Lib/TLibCommon/TComSlice.cpp	Tue Oct 08 14:22:29 2013 +0530
+++ b/source/Lib/TLibCommon/TComSlice.cpp	Tue Oct 08 14:25:32 2013 +0530
@@ -611,154 +611,6 @@
     m_maxNumMergeCand = src->m_maxNumMergeCand;
 }
 
-/** Function for applying picture marking based on the Reference Picture Set in pReferencePictureSet.
-*/
-int TComSlice::checkThatAllRefPicsAreAvailable(TComList<TComPic*>& picList, TComReferencePictureSet *rps, bool printErrors, int pocRandomAccess)
-{
-    TComPic* outPic;
-    int i, isAvailable;
-    int atLeastOneLost = 0;
-    int atLeastOneRemoved = 0;
-    int iPocLost = 0;
-
-    // loop through all long-term pictures in the Reference Picture Set
-    // to see if the picture should be kept as reference picture
-    for (i = rps->getNumberOfNegativePictures() + rps->getNumberOfPositivePictures(); i < rps->getNumberOfPictures(); i++)
-    {
-        isAvailable = 0;
-        // loop through all pictures in the reference picture buffer
-        TComList<TComPic*>::iterator iterPic = picList.begin();
-        while (iterPic != picList.end())
-        {
-            outPic = *(iterPic++);
-            if (rps->getCheckLTMSBPresent(i) == true)
-            {
-                if (outPic->getIsLongTerm() && (outPic->getPicSym()->getSlice()->getPOC()) == rps->getPOC(i) && outPic->getSlice()->isReferenced())
-                {
-                    isAvailable = 1;
-                }
-            }
-            else
-            {
-                if (outPic->getIsLongTerm() && (outPic->getPicSym()->getSlice()->getPOC() % (1 << outPic->getPicSym()->getSlice()->getSPS()->getBitsForPOC())) == rps->getPOC(i) % (1 << outPic->getPicSym()->getSlice()->getSPS()->getBitsForPOC()) && outPic->getSlice()->isReferenced())
-                {
-                    isAvailable = 1;
-                }
-            }
-        }
-
-        // if there was no such long-term check the short terms
-        if (!isAvailable)
-        {
-            iterPic = picList.begin();
-            while (iterPic != picList.end())
-            {
-                outPic = *(iterPic++);
-
-                int pocCycle = 1 << outPic->getPicSym()->getSlice()->getSPS()->getBitsForPOC();
-                int curPoc = outPic->getPicSym()->getSlice()->getPOC();
-                int refPoc = rps->getPOC(i);
-                if (!rps->getCheckLTMSBPresent(i))
-                {
-                    curPoc = curPoc % pocCycle;
-                    refPoc = refPoc % pocCycle;
-                }
-
-                if (outPic->getSlice()->isReferenced() && curPoc == refPoc)
-                {
-                    isAvailable = 1;
-                    outPic->setIsLongTerm(1);
-                    break;
-                }
-            }
-        }
-        // report that a picture is lost if it is in the Reference Picture Set
-        // but not available as reference picture
-        if (isAvailable == 0)
-        {
-            if (this->getPOC() + rps->getDeltaPOC(i) >= pocRandomAccess)
-            {
-                if (!rps->getUsed(i))
-                {
-                    if (printErrors)
-                    {
-                        printf("\nLong-term reference picture with POC = %3d seems to have been removed or not correctly decoded.", this->getPOC() + rps->getDeltaPOC(i));
-                    }
-                    atLeastOneRemoved = 1;
-                }
-                else
-                {
-                    if (printErrors)
-                    {
-                        printf("\nLong-term reference picture with POC = %3d is lost or not correctly decoded!", this->getPOC() + rps->getDeltaPOC(i));
-                    }
-                    atLeastOneLost = 1;
-                    iPocLost = this->getPOC() + rps->getDeltaPOC(i);
-                }
-            }
-        }
-    }
-
-    // loop through all short-term pictures in the Reference Picture Set
-    // to see if the picture should be kept as reference picture
-    for (i = 0; i < rps->getNumberOfNegativePictures() + rps->getNumberOfPositivePictures(); i++)
-    {
-        isAvailable = 0;
-        // loop through all pictures in the reference picture buffer
-        TComList<TComPic*>::iterator iterPic = picList.begin();
-        while (iterPic != picList.end())
-        {
-            outPic = *(iterPic++);
-
-            if (!outPic->getIsLongTerm() && outPic->getPicSym()->getSlice()->getPOC() == this->getPOC() + rps->getDeltaPOC(i) &&
-                outPic->getSlice()->isReferenced())
-            {
-                isAvailable = 1;
-            }
-        }
-
-        // report that a picture is lost if it is in the Reference Picture Set
-        // but not available as reference picture
-        if (isAvailable == 0)
-        {
-            if (this->getPOC() + rps->getDeltaPOC(i) >= pocRandomAccess)
-            {
-                if (!rps->getUsed(i))
-                {
-                    if (printErrors)
-                    {
-                        printf("\nShort-term reference picture with POC = %3d seems to have been removed or not correctly decoded.",
-                               this->getPOC() + rps->getDeltaPOC(i));
-                    }
-                    atLeastOneRemoved = 1;
-                }
-                else
-                {
-                    if (printErrors)
-                    {
-                        printf("\nShort-term reference picture with POC = %3d is lost or not correctly decoded!", this->getPOC() + rps->getDeltaPOC(i));
-                    }
-                    atLeastOneLost = 1;
-                    iPocLost = this->getPOC() + rps->getDeltaPOC(i);
-                }
-            }
-        }
-    }
-
-    if (atLeastOneLost)
-    {
-        return iPocLost + 1;
-    }
-    if (atLeastOneRemoved)
-    {
-        return -2;
-    }
-    else
-    {
-        return 0;
-    }
-}
-
 /** get AC and DC values for weighted pred
  * \param *wp
  * \returns void
diff -r fe870acd8a62 -r 565270489635 source/Lib/TLibCommon/TComSlice.h
--- a/source/Lib/TLibCommon/TComSlice.h	Tue Oct 08 14:22:29 2013 +0530
+++ b/source/Lib/TLibCommon/TComSlice.h	Tue Oct 08 14:25:32 2013 +0530
@@ -1621,7 +1621,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 setMaxNumMergeCand(UInt val)          { m_maxNumMergeCand = val; }
 


More information about the x265-devel mailing list