Changeset 798 in SHVCSoftware for branches/SHM-6-dev/source/Lib/TLibCommon
- Timestamp:
- 10 Jun 2014, 01:10:15 (11 years ago)
- Location:
- branches/SHM-6-dev/source/Lib/TLibCommon
- Files:
-
- 4 edited
-
TComPic.h (modified) (2 diffs)
-
TComSlice.cpp (modified) (15 diffs)
-
TComSlice.h (modified) (6 diffs)
-
TypeDef.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-6-dev/source/Lib/TLibCommon/TComPic.h
r754 r798 92 92 Int m_nFrameBit; 93 93 #endif 94 94 #if POC_RESET_IDC_DECODER 95 Bool m_currAuFlag; 96 #endif 95 97 public: 96 98 TComPic(); … … 223 225 Int getFrameBit() { return m_nFrameBit; } 224 226 #endif 227 #if POC_RESET_IDC_DECODER 228 Bool isCurrAu() { return m_currAuFlag; } 229 Void setCurrAuFlag(Bool x) {m_currAuFlag = x; } 230 #endif 225 231 };// END CLASS DEFINITION TComPic 226 232 -
branches/SHM-6-dev/source/Lib/TLibCommon/TComSlice.cpp
r797 r798 125 125 , m_pocMsbValPresentFlag ( false ) 126 126 #endif 127 #if POC_RESET_IDC_DECODER 128 , m_picOrderCntLsb (0) 129 #endif 127 130 #endif //SVC_EXTENSION 128 131 { … … 200 203 m_numEntryPointOffsets = 0; 201 204 m_enableTMVPFlag = true; 205 #if POC_RESET_IDC_SIGNALLING 206 m_pocResetIdc = 0; 207 m_pocResetPeriodId = 0; 208 m_fullPocResetFlag = false; 209 m_pocLsbVal = 0; 210 m_pocMsbVal = 0; 211 m_pocMsbValRequiredFlag = false; 212 m_pocMsbValPresentFlag = false; 213 #endif 214 #if POC_RESET_IDC_DECODER 215 m_picOrderCntLsb = 0; 216 #endif 202 217 } 203 218 … … 223 238 } 224 239 #endif 225 240 #if POC_RESET_IDC_DECODER 241 Bool TComSlice::getRaslPicFlag () 242 { 243 return getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_R 244 || getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_N; 245 } 246 Bool TComSlice::getRadlPicFlag () 247 { 248 return getNalUnitType() == NAL_UNIT_CODED_SLICE_RADL_R 249 || getNalUnitType() == NAL_UNIT_CODED_SLICE_RADL_N; 250 } 251 #endif 252 #if POC_RESET_IDC_ENCODER 253 Void TComSlice::decrementRefPocValues(Int const decrementValue) 254 { 255 for(Int listNum = 0; listNum < 2; listNum++) 256 { 257 RefPicList dpbPicSliceList = (listNum == 1) ? REF_PIC_LIST_1 : REF_PIC_LIST_0; 258 for(Int listIdx = 0; listIdx < getNumRefIdx( dpbPicSliceList ); listIdx++) 259 { 260 setRefPOC( getRefPOC(dpbPicSliceList, listIdx) - decrementValue, 261 dpbPicSliceList, 262 listIdx 263 ); 264 } 265 } 266 } 267 Int TComSlice::getCurrMsb( Int currLsb, Int prevLsb, Int prevMsb, Int maxLsbVal ) 268 { 269 if( prevLsb - currLsb >= (maxLsbVal >> 1) ) 270 { 271 return prevMsb + maxLsbVal; 272 } 273 else if( currLsb - prevLsb > (maxLsbVal >> 1) ) 274 { 275 return prevMsb - maxLsbVal; 276 } 277 else 278 { 279 return prevMsb; 280 } 281 } 282 #endif 226 283 /** 227 284 - allocate table to contain substream sizes to be written to the slice header. … … 279 336 while ( iterPic != rcListPic.end() ) 280 337 { 338 #if POC_RESET_IDC_ENCODER 339 if( (pcPic->getPOC() == poc) && (pcPic->getSlice(0)->isReferenced()) ) 340 #else 281 341 if(pcPic->getPOC() == poc) 342 #endif 282 343 { 283 344 break; … … 293 354 pcPic = *(iterPic); 294 355 } 295 #if POC_RESET_FLAG 356 #if POC_RESET_FLAG || POC_RESET_IDC_DECODER 296 357 assert( pcPic->getSlice(0)->isReferenced() ); 297 358 #endif … … 1087 1148 rpcPic->setCurrSliceIdx(0); 1088 1149 #if NO_CLRAS_OUTPUT_FLAG 1150 #if POC_RESET_IDC_ENCODER 1089 1151 if (noClrasOutputFlag) 1090 1152 { 1153 rpcPic->getSlice(0)->setReferenced(false); // all layers // TODO. This does not mark all layers 1154 } 1155 else 1156 { 1157 if (rpcPic->getLayerId() == m_layerId) rpcPic->getSlice(0)->setReferenced(false); // only current layer 1158 } 1159 #else 1160 if (noClrasOutputFlag) 1161 { 1091 1162 if (rpcPic->getPOC() != pocCurr) rpcPic->getSlice(0)->setReferenced(false); // all layers 1092 1163 } … … 1095 1166 if (rpcPic->getPOC() != pocCurr && rpcPic->getLayerId() == m_layerId) rpcPic->getSlice(0)->setReferenced(false); // only current layer 1096 1167 } 1168 #endif 1097 1169 #else 1098 1170 if (rpcPic->getPOC() != pocCurr) rpcPic->getSlice(0)->setReferenced(false); … … 1100 1172 iterPic++; 1101 1173 } 1174 #if POC_RESET_IDC_ENCODER 1175 this->getPic()->getSlice(0)->setReferenced(true); // Mark the current picture back as refererced. 1176 #endif 1102 1177 if ( getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP 1103 1178 || getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL … … 1328 1403 } 1329 1404 1330 1405 #if POC_RESET_IDC_ENCODER 1406 Void TComSlice::checkLeadingPictureRestrictions(TComList<TComPic*>& rcListPic, Bool usePocBeforeReset) 1407 #else 1331 1408 Void TComSlice::checkLeadingPictureRestrictions(TComList<TComPic*>& rcListPic) 1409 #endif 1332 1410 { 1333 1411 TComPic* rpcPic; … … 1418 1496 nalUnitType == NAL_UNIT_CODED_SLICE_IDR_W_RADL) 1419 1497 { 1498 #if POC_RESET_IDC_ENCODER 1499 if( usePocBeforeReset ) 1500 { 1501 assert(rpcPic->getSlice(0)->getPocValueBeforeReset() < this->getPocValueBeforeReset()); 1502 } 1503 else 1504 { 1505 assert(rpcPic->getPOC() < this->getPOC()); 1506 } 1507 #else 1420 1508 assert(rpcPic->getPOC() < this->getPOC()); 1509 #endif 1421 1510 } 1422 1511 } … … 1436 1525 if(this->getAssociatedIRAPPOC() != rpcPic->getPOC()) 1437 1526 { 1527 #if POC_RESET_IDC_ENCODER 1528 if( usePocBeforeReset ) 1529 { 1530 assert(rpcPic->getSlice(0)->getPocValueBeforeReset() < this->getPocValueBeforeReset()); 1531 } 1532 else 1533 { 1534 assert(rpcPic->getPOC() < this->getPOC()); 1535 } 1536 #else 1438 1537 assert(rpcPic->getPOC() < this->getPOC()); 1538 #endif 1439 1539 } 1440 1540 } … … 1453 1553 // rpcPic is a picture that preceded the leading in decoding order since it exist in the DPB 1454 1554 // rpcPic would violate the constraint if it was a trailing picture 1555 #if POC_RESET_IDC_ENCODER 1556 if( usePocBeforeReset ) 1557 { 1558 assert(rpcPic->getPOC() <= this->getAssociatedIrapPocBeforeReset()); 1559 } 1560 else 1561 { 1562 assert(rpcPic->getPOC() <= this->getAssociatedIRAPPOC()); 1563 } 1564 #else 1455 1565 assert(rpcPic->getPOC() <= this->getAssociatedIRAPPOC()); 1566 #endif 1456 1567 } 1457 1568 } … … 1759 1870 if(isAvailable == 0) 1760 1871 { 1872 #if UNAVAILABLE_PIC_BUGFIX 1873 #if 0 1761 1874 if (this->getPOC() + pReferencePictureSet->getDeltaPOC(i) >= pocRandomAccess) 1875 #endif 1876 #endif 1762 1877 { 1763 1878 if(!pReferencePictureSet->getUsed(i) ) … … 1780 1895 } 1781 1896 #if ALLOW_RECOVERY_POINT_AS_RAP 1897 #if UNAVAILABLE_PIC_BUGFIX 1898 if(bUseRecoveryPoint && this->getPOC() > pocRandomAccess) 1899 #else 1782 1900 else if(bUseRecoveryPoint && this->getPOC() > pocRandomAccess) 1901 #endif 1783 1902 { 1784 1903 atLeastOneUnabledByRecoveryPoint = 1; … … 3761 3880 return false; 3762 3881 } 3763 #if POC_RESET_FLAG 3882 #if POC_RESET_FLAG || POC_RESET_IDC_DECODER 3883 #if POC_RESET_IDC_DECODER 3884 TComPic* pic = xGetRefPic( rcListPic, getPOC() ); 3885 #else 3764 3886 TComPic* pic = xGetRefPic( rcListPic, m_bPocResetFlag ? 0 : m_iPOC ); 3887 #endif 3765 3888 3766 3889 if( pic ) -
branches/SHM-6-dev/source/Lib/TLibCommon/TComSlice.h
r796 r798 1968 1968 Int m_iLastIDR; 1969 1969 Int m_iAssociatedIRAP; 1970 #if POC_RESET_IDC_ENCODER 1971 Int m_associatedIrapPocBeforeReset; 1972 #endif 1973 1970 1974 NalUnitType m_iAssociatedIRAPType; 1971 1975 static Int m_prevTid0POC; … … 2094 2098 Bool m_pocMsbValPresentFlag; 2095 2099 #endif 2100 #if POC_RESET_IDC_ENCODER 2101 Int m_pocValueBeforeReset; 2102 #endif 2103 #if POC_RESET_IDC_DECODER 2104 Int m_picOrderCntLsb; 2105 #endif 2096 2106 #if Q0048_CGS_3D_ASYMLUT 2097 2107 Int m_nCGSOverWritePPS; // for optimization, not output to bitstream … … 2139 2149 Void adjustPrevTid0POC (Int adj) { m_prevTid0POC=m_prevTid0POC-adj; } 2140 2150 #endif 2151 #if POC_RESET_IDC_DECODER 2152 Void setPrevTid0POC( Int x ) { m_prevTid0POC = x; } 2153 #endif 2154 2141 2155 TComRefPicListModification* getRefPicListModification() { return &m_RefPicListModification; } 2142 2156 Void setLastIDR(Int iIDRPOC) { m_iLastIDR = iIDRPOC; } … … 2144 2158 Void setAssociatedIRAPPOC(Int iAssociatedIRAPPOC) { m_iAssociatedIRAP = iAssociatedIRAPPOC; } 2145 2159 Int getAssociatedIRAPPOC() { return m_iAssociatedIRAP; } 2160 #if POC_RESET_IDC_ENCODER 2161 Void setAssociatedIrapPocBeforeReset(Int x) { m_associatedIrapPocBeforeReset = x; } 2162 Int getAssociatedIrapPocBeforeReset( ) { return m_associatedIrapPocBeforeReset; } 2163 #endif 2164 2146 2165 Void setAssociatedIRAPType(NalUnitType associatedIRAPType) { m_iAssociatedIRAPType = associatedIRAPType; } 2147 2166 NalUnitType getAssociatedIRAPType() { return m_iAssociatedIRAPType; } … … 2253 2272 Void setTLayerInfo( UInt uiTLayer ); 2254 2273 Void decodingMarking( TComList<TComPic*>& rcListPic, Int iGOPSIze, Int& iMaxRefPicNum ); 2274 #if POC_RESET_IDC_ENCODER 2275 Void checkLeadingPictureRestrictions(TComList<TComPic*>& rcListPic, Bool usePocBeforeReset = false); 2276 #else 2255 2277 Void checkLeadingPictureRestrictions( TComList<TComPic*>& rcListPic ); 2278 #endif 2256 2279 Void applyReferencePictureSet( TComList<TComPic*>& rcListPic, TComReferencePictureSet *RPSList); 2257 2280 Bool isTemporalLayerSwitchingPoint( TComList<TComPic*>& rcListPic ); … … 2451 2474 Bool getCraPicFlag (); 2452 2475 #endif 2476 #if POC_RESET_IDC_DECODER 2477 Bool getRaslPicFlag (); 2478 Bool getRadlPicFlag (); 2479 Int getPicOrderCntLsb() { return m_picOrderCntLsb; } 2480 Void setPicOrderCntLsb(Int x) { m_picOrderCntLsb = x; } 2481 #endif 2482 2483 #if POC_RESET_IDC_ENCODER 2484 Int getPocValueBeforeReset () { return m_pocValueBeforeReset; } 2485 Void setPocValueBeforeReset (Int x) { m_pocValueBeforeReset = x ; } 2486 Void decrementRefPocValues(Int const decrementValue); 2487 Int getCurrMsb( Int currLsb, Int prevLsb, Int prevMsb, Int maxLsbVal ); 2488 #endif 2489 2453 2490 2454 2491 #endif //SVC_EXTENSION -
branches/SHM-6-dev/source/Lib/TLibCommon/TypeDef.h
r797 r798 97 97 #define O0194_WEIGHTED_PREDICTION_CGS 1 ///< JCTVC-O0194: Weighted prediciton for color gamut scalability 98 98 #endif 99 #define POC_RESET_FLAG 1///< JCTVC-N0244: POC reset flag for layer pictures.99 #define POC_RESET_FLAG 0 ///< JCTVC-N0244: POC reset flag for layer pictures. 100 100 #define POC_RESET_IDC 1 ///< JCTVC-P0041: Include poc_reset_idc and related derivation - eventually will replace POC_RESET_FLAG 101 101 #if POC_RESET_IDC 102 102 #define POC_RESET_IDC_SIGNALLING 1 ///< JCTVC-P0041: Include signalling for poc_reset related syntax elements 103 #define POC_RESET_IDC_ENCODER 1 ///< JCTVC-P0041: Include support of enabling POC reset at the encoder 104 #define POC_RESET_IDC_DECODER 1 ///< JCTVC-P0041: Include support of enabling POC reset at the decoder 105 #define ALIGN_IRAP_BUGFIX 1 106 #define UNAVAILABLE_PIC_BUGFIX 1 103 107 #endif 104 108 #define POC_MSB_VAL_PRESENT_FLAG_SEM 1 ///< JCTVC-Q0146: Inference of poc_msb_val_present_flag
Note: See TracChangeset for help on using the changeset viewer.