Ticket #1054: Ticket_1054_r1.patch
File Ticket_1054_r1.patch, 4.2 KB (added by rickard, 12 years ago) |
---|
-
source/Lib/TLibCommon/TComSlice.cpp
254 254 while ( iterPic != rcListPic.end() ) 255 255 { 256 256 pcPic = *(iterPic); 257 if (pcPic )257 if (pcPic && pcPic->getPOC()!=this->getPOC() && pcPic->getSlice( 0 )->isReferenced()) 258 258 { 259 259 Int picPoc = pcPic->getPOC(); 260 260 if (!pocHasMsb) … … 836 836 TComPic* rpcPic; 837 837 Int i, isReference; 838 838 839 Int j = 0;840 839 // loop through all pictures in the reference picture buffer 841 840 TComList<TComPic*>::iterator iterPic = rcListPic.begin(); 842 841 while ( iterPic != rcListPic.end()) 843 842 { 844 j++;845 843 rpcPic = *(iterPic++); 846 844 845 if(!rpcPic->getSlice( 0 )->isReferenced()) 846 { 847 continue; 848 } 849 847 850 isReference = 0; 848 851 // loop through all pictures in the Reference Picture Set 849 852 // to see if the picture should be kept as reference picture … … 880 883 // the Reference Picture Set 881 884 if(rpcPic->getPicSym()->getSlice(0)->getPOC() != this->getPOC() && isReference == 0) 882 885 { 883 rpcPic->getSlice( 0 )->setReferenced( false ); 886 rpcPic->getSlice( 0 )->setReferenced( false ); 887 rpcPic->setUsedByCurr(0); 884 888 rpcPic->setIsLongTerm(0); 885 889 } 886 890 //check that pictures of higher temporal layers are not used … … 903 907 Int TComSlice::checkThatAllRefPicsAreAvailable( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet, Bool printErrors, Int pocRandomAccess) 904 908 { 905 909 TComPic* rpcPic; 906 Int i, isAvailable , j;910 Int i, isAvailable; 907 911 Int atLeastOneLost = 0; 908 912 Int atLeastOneRemoved = 0; 909 913 Int iPocLost = 0; … … 912 916 // to see if the picture should be kept as reference picture 913 917 for(i=pReferencePictureSet->getNumberOfNegativePictures()+pReferencePictureSet->getNumberOfPositivePictures();i<pReferencePictureSet->getNumberOfPictures();i++) 914 918 { 915 j = 0;916 919 isAvailable = 0; 917 920 // loop through all pictures in the reference picture buffer 918 921 TComList<TComPic*>::iterator iterPic = rcListPic.begin(); 919 922 while ( iterPic != rcListPic.end()) 920 923 { 921 j++;922 924 rpcPic = *(iterPic++); 923 925 if(pReferencePictureSet->getCheckLTMSBPresent(i)==true) 924 926 { … … 941 943 iterPic = rcListPic.begin(); 942 944 while ( iterPic != rcListPic.end()) 943 945 { 944 j++;945 946 rpcPic = *(iterPic++); 946 947 947 948 Int pocCycle = 1 << rpcPic->getPicSym()->getSlice(0)->getSPS()->getBitsForPOC(); … … 986 987 } 987 988 } 988 989 } 989 } 990 } 990 991 // loop through all short-term pictures in the Reference Picture Set 991 992 // to see if the picture should be kept as reference picture 992 993 for(i=0;i<pReferencePictureSet->getNumberOfNegativePictures()+pReferencePictureSet->getNumberOfPositivePictures();i++) 993 994 { 994 j = 0;995 995 isAvailable = 0; 996 996 // loop through all pictures in the reference picture buffer 997 997 TComList<TComPic*>::iterator iterPic = rcListPic.begin(); 998 998 while ( iterPic != rcListPic.end()) 999 999 { 1000 j++;1001 1000 rpcPic = *(iterPic++); 1002 1001 1003 1002 if(!rpcPic->getIsLongTerm() && rpcPic->getPicSym()->getSlice(0)->getPOC() == this->getPOC() + pReferencePictureSet->getDeltaPOC(i) && rpcPic->getSlice(0)->isReferenced()) -
source/Lib/TLibDecoder/TDecCAVLC.cpp
974 974 { 975 975 READ_UVLC( uiCode, "delta_poc_msb_cycle_lt[i]" ); 976 976 Bool deltaFlag = false; 977 // First LTRP || First LTRP from SH || curr LSB != prev LSB978 if( (j == offset+rps->getNumberOfLongtermPictures()-1) || (j == offset+(numOfLtrp-numLtrpInSPS)-1) || (pocLsbLt != prevLSB))977 // First LTRP || First LTRP from SH 978 if( (j == offset+rps->getNumberOfLongtermPictures()-1) || (j == offset+(numOfLtrp-numLtrpInSPS)-1) ) 979 979 { 980 980 deltaFlag = true; 981 981 }