Changeset 1209 in SHVCSoftware
- Timestamp:
- 8 Jul 2015, 22:33:03 (9 years ago)
- Location:
- branches/SHM-dev/source/Lib
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp
r1208 r1209 134 134 , m_pocMsbValPresentFlag ( false ) 135 135 , m_pocMsbValNeeded ( false ) 136 #if POC_RESET_IDC_DECODER || POC_RESET_IDC_ENCODER137 136 , m_picOrderCntLsb (0) 138 #endif139 137 #endif //SVC_EXTENSION 140 138 { … … 197 195 m_activeNumILRRefIdx = 0; 198 196 m_interLayerPredEnabledFlag = 0; 197 m_picOrderCntLsb = 0; 199 198 #endif 200 199 … … 226 225 m_pocMsbValRequiredFlag = false; 227 226 m_pocMsbValPresentFlag = false; 228 #if POC_RESET_IDC_DECODER || POC_RESET_IDC_ENCODER229 m_picOrderCntLsb = 0;230 #endif231 227 m_pocMsbValNeeded = false; 232 228 m_pocResetDeltaPoc = 0; … … 287 283 while ( iterPic != rcListPic.end() ) 288 284 { 289 #if POC_RESET_IDC_ENCODER290 if( (pcPic->getPOC() == poc) && (pcPic->getSlice(0)->isReferenced()) )285 #if SVC_EXTENSION 286 if( pcPic->getPOC() == poc && pcPic->getSlice(0)->isReferenced() ) 291 287 #else 292 288 if(pcPic->getPOC() == poc) … … 886 882 rpcPic->setCurrSliceIdx(0); 887 883 #if NO_CLRAS_OUTPUT_FLAG 888 #if POC_RESET_IDC_ENCODER 889 if (noClrasOutputFlag) 884 if( noClrasOutputFlag ) 890 885 { 891 886 rpcPic->getSlice(0)->setReferenced(false); // all layers // TODO. This does not mark all layers … … 893 888 else 894 889 { 895 if (rpcPic->getLayerId() == m_layerId) rpcPic->getSlice(0)->setReferenced(false); // only current layer 896 } 897 #else 898 if (noClrasOutputFlag) 899 { 900 if (rpcPic->getPOC() != pocCurr) rpcPic->getSlice(0)->setReferenced(false); // all layers 901 } 902 else 903 { 904 if (rpcPic->getPOC() != pocCurr && rpcPic->getLayerId() == m_layerId) rpcPic->getSlice(0)->setReferenced(false); // only current layer 905 } 906 #endif 890 if( rpcPic->getLayerId() == m_layerId ) 891 { 892 rpcPic->getSlice(0)->setReferenced(false); // only current layer 893 } 894 } 907 895 #else 908 896 if (rpcPic->getPOC() != pocCurr) rpcPic->getSlice(0)->setReferenced(false); … … 910 898 iterPic++; 911 899 } 912 #if POC_RESET_IDC_ENCODER 913 this->getPic()->getSlice(0)->setReferenced(true); // Mark the current picture back as refererced. 914 #endif 900 901 #if SVC_EXTENSION 902 m_pcPic->getSlice(0)->setReferenced(true); // Mark the current picture back as refererced. 903 #endif 904 915 905 if ( getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP 916 906 || getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL … … 1141 1131 } 1142 1132 1143 #if POC_RESET_IDC_ENCODER1133 #if SVC_POC 1144 1134 Void TComSlice::checkLeadingPictureRestrictions(TComList<TComPic*>& rcListPic, Bool usePocBeforeReset) 1145 1135 #else … … 1230 1220 nalUnitType == NAL_UNIT_CODED_SLICE_IDR_W_RADL) 1231 1221 { 1232 #if POC_RESET_IDC_ENCODER1222 #if SVC_POC 1233 1223 if( usePocBeforeReset ) 1234 1224 { … … 1259 1249 if(this->getAssociatedIRAPPOC() != rpcPic->getPOC()) 1260 1250 { 1261 #if POC_RESET_IDC_ENCODER1251 #if SVC_POC 1262 1252 if( usePocBeforeReset ) 1263 1253 { … … 1287 1277 // rpcPic is a picture that preceded the leading in decoding order since it exist in the DPB 1288 1278 // rpcPic would violate the constraint if it was a trailing picture 1289 #if POC_RESET_IDC_ENCODER1279 #if SVC_POC 1290 1280 if( usePocBeforeReset ) 1291 1281 { … … 3847 3837 } 3848 3838 #endif 3849 #if POC_RESET_IDC_ENCODER 3839 3850 3840 Void TComSlice::decrementRefPocValues(Int const decrementValue) 3851 3841 { … … 3878 3868 } 3879 3869 } 3880 #endif3881 3870 3882 3871 Void TComSlice::setRefPicListModificationSvc() -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h
r1208 r1209 1895 1895 Int m_iLastIDR; 1896 1896 Int m_iAssociatedIRAP; 1897 #if POC_RESET_IDC_ENCODER1898 Int m_associatedIrapPocBeforeReset;1899 #endif1900 1897 NalUnitType m_iAssociatedIRAPType; 1901 1898 static Int m_prevTid0POC; … … 1985 1982 1986 1983 #if SVC_EXTENSION 1984 Int m_associatedIrapPocBeforeReset; 1987 1985 Bool m_firstSliceInPic; 1988 1986 Bool m_availableForTMVPRefFlag; … … 2012 2010 Bool m_pocMsbValNeeded; 2013 2011 Int m_pocResetDeltaPoc; 2014 #if POC_RESET_IDC_ENCODER2015 2012 Int m_pocValueBeforeReset; 2016 #endif2017 #if POC_RESET_IDC_DECODER || POC_RESET_IDC_ENCODER2018 2013 Int m_picOrderCntLsb; 2019 #endif2020 2014 #if Q0048_CGS_3D_ASYMLUT 2021 2015 Int m_nCGSOverWritePPS; // for optimization, not output to bitstream … … 2137 2131 Void setPrevTid0POC( Int x ) { m_prevTid0POC = x; } 2138 2132 #endif 2139 #if POC_RESET_IDC_ENCODER2140 2133 Void setAssociatedIrapPocBeforeReset(Int x) { m_associatedIrapPocBeforeReset = x; } 2141 2134 Int getAssociatedIrapPocBeforeReset( ) { return m_associatedIrapPocBeforeReset; } 2142 #endif2143 2135 2144 2136 Void setRefPicList ( TComList<TComPic*>& rcListPic, Bool checkNumPocTotalCurr = false, TComPic** ilpPic = NULL ); … … 2185 2177 Void setTLayerInfo( UInt uiTLayer ); 2186 2178 Void decodingMarking( TComList<TComPic*>& rcListPic, Int iGOPSIze, Int& iMaxRefPicNum ); 2187 #if POC_RESET_IDC_ENCODER2179 #if SVC_POC 2188 2180 Void checkLeadingPictureRestrictions(TComList<TComPic*>& rcListPic, Bool usePocBeforeReset = false); 2189 2181 #else … … 2372 2364 Bool getRadlPicFlag (); 2373 2365 #endif 2374 #if POC_RESET_IDC_DECODER || POC_RESET_IDC_ENCODER2375 2366 Int getPicOrderCntLsb() { return m_picOrderCntLsb; } 2376 2367 Void setPicOrderCntLsb(Int x) { m_picOrderCntLsb = x; } 2377 #endif 2378 2379 #if POC_RESET_IDC_ENCODER 2368 2380 2369 Int getPocValueBeforeReset () { return m_pocValueBeforeReset; } 2381 2370 Void setPocValueBeforeReset (Int x) { m_pocValueBeforeReset = x ; } 2382 2371 Void decrementRefPocValues(Int const decrementValue); 2383 2372 Int getCurrMsb( Int currLsb, Int prevLsb, Int prevMsb, Int maxLsbVal ); 2384 #endif 2373 2385 2374 Int getReferenceLayerIdc( UInt refLayerId ); 2386 2375 -
branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
r1208 r1209 69 69 #define POC_RESET_IDC 1 ///< JCTVC-P0041: Include poc_reset_idc and related derivation 70 70 #if POC_RESET_IDC 71 #define POC_RESET_IDC_ENCODER 1 ///< JCTVC-P0041: Include support of enabling POC reset at the encoder72 71 #define POC_RESET_IDC_DECODER 1 ///< JCTVC-P0041: Include support of enabling POC reset at the decoder 73 72 #endif -
branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r1207 r1209 985 985 #endif 986 986 { 987 #if SVC_ EXTENSION && POC_RESET_IDC_ENCODER987 #if SVC_POC 988 988 Int picOrderCntLSB; 989 989 if( pcSlice->getPocResetIdc() == 2 ) // i.e. the LSB is reset -
branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r1208 r1209 109 109 m_associatedIRAPType = NAL_UNIT_CODED_SLICE_IDR_N_LP; 110 110 m_associatedIRAPPOC = 0; 111 #if POC_RESET_IDC_ENCODER111 #if SVC_EXTENSION 112 112 m_pocCraWithoutReset = 0; 113 113 m_associatedIrapPocBeforeReset = 0; 114 #endif115 #if SVC_EXTENSION116 114 m_pcPredSearch = NULL; 117 115 #if Q0048_CGS_3D_ASYMLUT … … 119 117 m_pColorMappedPic = NULL; 120 118 #endif 121 #if POC_RESET_IDC_ENCODER122 119 m_lastPocPeriodId = -1; 123 #endif124 120 m_noRaslOutputFlag = false; 125 121 m_prevPicHasEos = false; … … 1141 1137 1142 1138 #if SVC_EXTENSION 1143 #if POC_RESET_IDC_ENCODER1139 #if SVC_POC 1144 1140 pcSlice->setPocValueBeforeReset( pocCurr ); 1145 1141 // Check if the current picture is to be assigned as a reset picture … … 1148 1144 Bool pocResettingFlag = false; 1149 1145 1150 if (pcSlice->getPocResetIdc() != 0)1151 { 1152 if (pcSlice->getVPS()->getVpsPocLsbAlignedFlag())1146 if( pcSlice->getPocResetIdc() != 0 ) 1147 { 1148 if( pcSlice->getVPS()->getVpsPocLsbAlignedFlag() ) 1153 1149 { 1154 1150 pocResettingFlag = true; 1155 1151 } 1156 else if (m_pcEncTop->getPocDecrementedInDPBFlag())1152 else if( m_pcEncTop->getPocDecrementedInDPBFlag() ) 1157 1153 { 1158 1154 pocResettingFlag = false; … … 1176 1172 m_pcEncTop->setPocAdjustmentValue( pocCurr ); 1177 1173 } 1178 // else 1179 { 1180 // Just subtract POC by the current cumulative POC delta 1181 pcSlice->setPOC( pocCurr - m_pcEncTop->getPocAdjustmentValue() ); 1182 } 1174 1175 // Just subtract POC by the current cumulative POC delta 1176 pcSlice->setPOC( pocCurr - m_pcEncTop->getPocAdjustmentValue() ); 1183 1177 1184 1178 Int maxPocLsb = 1 << pcSlice->getSPS()->getBitsForPOC(); … … 1186 1180 } 1187 1181 // Update the POC of current picture, pictures in the DPB, including references inside the reference pictures 1188 1189 1182 #endif 1190 1183 … … 1530 1523 { 1531 1524 m_associatedIRAPType = pcSlice->getNalUnitType(); 1532 #if POC_RESET_IDC_ENCODER1525 #if SVC_POC 1533 1526 m_associatedIRAPPOC = pcSlice->getPOC(); 1534 1527 m_associatedIrapPocBeforeReset = pocCurr; … … 1539 1532 pcSlice->setAssociatedIRAPType(m_associatedIRAPType); 1540 1533 pcSlice->setAssociatedIRAPPOC(m_associatedIRAPPOC); 1541 #if POC_RESET_IDC_ENCODER1534 #if SVC_POC 1542 1535 pcSlice->setAssociatedIrapPocBeforeReset(m_associatedIrapPocBeforeReset); 1543 1536 #endif … … 1549 1542 pcSlice->decodingRefreshMarking(m_pocCRA, m_bRefreshPending, rcListPic); 1550 1543 #endif 1551 #if POC_RESET_IDC_ENCODER1544 #if SVC_POC 1552 1545 // m_pocCRA may have been update here; update m_pocCraWithoutReset 1553 1546 m_pocCraWithoutReset = m_pocCRA + m_pcEncTop->getPocAdjustmentValue(); … … 1586 1579 #endif 1587 1580 #if ALIGNED_BUMPING 1588 #if POC_RESET_IDC_ENCODER1589 1581 pcSlice->checkLeadingPictureRestrictions(rcListPic, true); 1590 #else1591 pcSlice->checkLeadingPictureRestrictions(rcListPic);1592 #endif1593 1582 #endif 1594 1583 pcSlice->applyReferencePictureSet(rcListPic, pcSlice->getRPS()); … … 1781 1770 if( m_layerId > 0 && pcSlice->getActiveNumILRRefIdx() ) 1782 1771 { 1783 #if POC_RESET_IDC_ENCODER 1784 if ( pocCurr > 0 && pcSlice->isRADL() && pcPic->getSlice(0)->getBaseColPic(pcPic->getSlice(0)->getInterLayerPredLayerIdc(0))->getSlice(0)->isRASL()) 1785 #else 1786 if (pcSlice->getPOC()>0 && pcSlice->isRADL() && pcPic->getSlice(0)->getBaseColPic(pcPic->getSlice(0)->getInterLayerPredLayerIdc(0))->getSlice(0)->isRASL()) 1787 #endif 1772 if( pocCurr > 0 && pcSlice->isRADL() && pcPic->getSlice(0)->getBaseColPic(pcPic->getSlice(0)->getInterLayerPredLayerIdc(0))->getSlice(0)->isRASL() ) 1788 1773 { 1789 1774 pcSlice->setActiveNumILRRefIdx(0); 1790 1775 pcSlice->setInterLayerPredEnabledFlag(0); 1791 1776 } 1777 1792 1778 if( pcSlice->getNalUnitType() >= NAL_UNIT_CODED_SLICE_BLA_W_LP && pcSlice->getNalUnitType() <= NAL_UNIT_CODED_SLICE_CRA ) 1793 1779 { … … 2184 2170 2185 2171 Int sliceQP = m_pcCfg->getInitialQP(); 2186 #if POC_RESET_IDC_ENCODER2172 #if SVC_EXTENSION 2187 2173 if ( ( pocCurr == 0 && m_pcCfg->getInitialQP() > 0 ) || ( frameLevel == 0 && m_pcCfg->getForceIntraQP() ) ) // QP is specified 2188 2174 #else … … 2588 2574 } 2589 2575 pictureTimingSEI.m_auCpbRemovalDelay = std::min<Int>(std::max<Int>(1, m_totalCoded - m_lastBPSEI), static_cast<Int>(pow(2, static_cast<Double>(pcSlice->getSPS()->getVuiParameters()->getHrdParameters()->getCpbRemovalDelayLengthMinus1()+1)))); // Syntax element signalled as minus, hence the . 2590 #if POC_RESET_IDC_ENCODER2576 #if SVC_EXTENSION 2591 2577 pictureTimingSEI.m_picDpbOutputDelay = pcSlice->getSPS()->getNumReorderPics(pcSlice->getSPS()->getMaxTLayers()-1) + pocCurr - m_totalCoded; 2592 2578 #else … … 2736 2722 SEIRecoveryPoint sei_recovery_point; 2737 2723 sei_recovery_point.m_recoveryPocCnt = 0; 2738 #if POC_RESET_IDC_ENCODER2724 #if SVC_EXTENSION 2739 2725 sei_recovery_point.m_exactMatchingFlag = ( pocCurr == 0 ) ? (true) : (false); 2740 2726 #else … … 3851 3837 if( pcSlice->getRefPic(RefPicList(iRefList), iRefIndex)->isILR(m_layerId) ) 3852 3838 { 3853 #if POC_RESET_IDC_ENCODER3854 3839 UInt refLayerId = pcSlice->getRefPic(RefPicList(iRefList), iRefIndex)->getLayerId(); 3855 3840 UInt refLayerIdc = pcSlice->getReferenceLayerIdc(refLayerId); … … 3858 3843 3859 3844 printf( "%d(%d, {%1.2f, %1.2f}x)", pcSlice->getRefPOC(RefPicList(iRefList), iRefIndex), refLayerId, 65536.0/g_posScalingFactor[refLayerIdc][0], 65536.0/g_posScalingFactor[refLayerIdc][1] ); 3860 #else3861 printf( "%d(%d)", pcSlice->getRefPOC(RefPicList(iRefList), iRefIndex)-pcSlice->getLastIDR(), pcSlice->getRefPic(RefPicList(iRefList), iRefIndex)->getLayerId() );3862 #endif3863 3845 } 3864 3846 else 3865 3847 { 3866 #if POC_RESET_IDC_ENCODER3867 3848 printf ("%d", pcSlice->getRefPOC(RefPicList(iRefList), iRefIndex)); 3868 #else3869 printf ("%d", pcSlice->getRefPOC(RefPicList(iRefList), iRefIndex)-pcSlice->getLastIDR());3870 #endif3871 3849 } 3872 3850 … … 4023 4001 } 4024 4002 4025 #if POC_RESET_IDC_ENCODER4026 if( m_pocCraWithoutReset > 0 && this->m_associatedIRAPType == NAL_UNIT_CODED_SLICE_CRA)4003 #if SVC_POC 4004 if( m_pocCraWithoutReset > 0 && m_associatedIRAPType == NAL_UNIT_CODED_SLICE_CRA ) 4027 4005 { 4028 4006 if(pocCurr < m_pocCraWithoutReset) … … 4624 4602 #endif 4625 4603 4626 #if POC_RESET_IDC_ENCODER4627 4604 Void TEncGOP::determinePocResetIdc(Int const pocCurr, TComSlice *const slice) 4628 4605 { … … 4895 4872 } 4896 4873 } 4897 #endif4898 4874 4899 4875 #if O0164_MULTI_LAYER_HRD -
branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.h
r1185 r1209 148 148 Bool m_nestedPictureTimingSEIPresentInAU; 149 149 150 #if POC_RESET_IDC_ENCODER150 #if SVC_EXTENSION 151 151 Int m_pocCraWithoutReset; 152 152 Int m_associatedIrapPocBeforeReset; 153 #endif154 #if SVC_EXTENSION155 153 UInt m_layerId; 156 154 TEncTop** m_ppcTEncTop; … … 172 170 Int **m_temp; 173 171 #endif 174 #if POC_RESET_IDC_ENCODER175 172 Int m_lastPocPeriodId; 176 #endif177 173 Bool m_noRaslOutputFlag; 178 174 Bool m_prevPicHasEos; … … 214 210 Void arrangeLongtermPicturesInRPS(TComSlice *, TComList<TComPic*>& ); 215 211 216 #if POC_RESET_IDC_ENCODER212 #if SVC_EXTENSION 217 213 Void determinePocResetIdc( Int const pocCurr, TComSlice *const slice); 218 214 Int getIntraRefreshInterval() { return m_pcCfg->getIntraPeriod(); } -
branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp
r1203 r1209 85 85 #endif 86 86 m_numRefLayerLocationOffsets = 0; 87 #if POC_RESET_IDC_ENCODER88 87 m_pocAdjustmentValue = 0; 89 #endif90 88 #if NO_CLRAS_OUTPUT_FLAG 91 89 m_noClrasOutputFlag = false; … … 1046 1044 m_cPPS.setCGSFlag( m_nCGSFlag ); 1047 1045 #endif 1048 #if POC_RESET_IDC_ENCODER1049 1046 m_cPPS.setPocResetInfoPresentFlag( true ); 1050 1047 m_cPPS.setExtensionFlag( true ); 1051 1048 m_cPPS.setSliceHeaderExtensionPresentFlag( true ); 1052 #endif1053 1049 #endif //SVC_EXTENSION 1054 1050 } -
branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.h
r1201 r1209 135 135 Int m_phaseVerChroma[MAX_LAYERS]; 136 136 Int m_resamplePhaseSetPresentFlag[MAX_LAYERS]; 137 #if POC_RESET_IDC_ENCODER138 137 Int m_pocAdjustmentValue; 139 #endif140 138 #if NO_CLRAS_OUTPUT_FLAG 141 139 Bool m_noClrasOutputFlag; … … 249 247 TEncTop* getRefLayerEnc(UInt refLayerIdx); 250 248 251 #if POC_RESET_IDC_ENCODER 252 Int getPocAdjustmentValue() { return m_pocAdjustmentValue;} 253 Void setPocAdjustmentValue(Int x) { m_pocAdjustmentValue = x; } 254 #endif 249 Int getPocAdjustmentValue() { return m_pocAdjustmentValue;} 250 Void setPocAdjustmentValue(Int x) { m_pocAdjustmentValue = x; } 255 251 #if NO_CLRAS_OUTPUT_FLAG 256 Int getNoClrasOutputFlag() { return m_noClrasOutputFlag;}257 Void setNoClrasOutputFlag(Bool x) { m_noClrasOutputFlag = x; }258 Int getLayerInitializedFlag() { return m_layerInitializedFlag;}259 Void setLayerInitializedFlag(Bool x) { m_layerInitializedFlag = x; }260 Int getFirstPicInLayerDecodedFlag() { return m_firstPicInLayerDecodedFlag;}261 Void setFirstPicInLayerDecodedFlag(Bool x) { m_firstPicInLayerDecodedFlag = x; }262 Int getNoOutputOfPriorPicsFlags() { return m_noOutputOfPriorPicsFlags;}263 Void setNoOutputOfPriorPicsFlags(Bool x) { m_noOutputOfPriorPicsFlags = x; }264 #endif 265 Void setNumAddLayerSets(Int x) { m_numAddLayerSets = x;}266 Int getNumAddLayerSets() { return m_numAddLayerSets; }267 Void setPocDecrementedInDPBFlag(Bool x) { m_pocDecrementedInDPBFlag = x;}268 Bool getPocDecrementedInDPBFlag() { return m_pocDecrementedInDPBFlag; }269 Void setCurrPocMsb(Int poc) { m_currPocMsb = poc;}270 Int getCurrPocMsb() { return m_currPocMsb; }252 Int getNoClrasOutputFlag() { return m_noClrasOutputFlag;} 253 Void setNoClrasOutputFlag(Bool x) { m_noClrasOutputFlag = x; } 254 Int getLayerInitializedFlag() { return m_layerInitializedFlag;} 255 Void setLayerInitializedFlag(Bool x) { m_layerInitializedFlag = x; } 256 Int getFirstPicInLayerDecodedFlag() { return m_firstPicInLayerDecodedFlag;} 257 Void setFirstPicInLayerDecodedFlag(Bool x) { m_firstPicInLayerDecodedFlag = x; } 258 Int getNoOutputOfPriorPicsFlags() { return m_noOutputOfPriorPicsFlags;} 259 Void setNoOutputOfPriorPicsFlags(Bool x) { m_noOutputOfPriorPicsFlags = x; } 260 #endif 261 Void setNumAddLayerSets(Int x) { m_numAddLayerSets = x; } 262 Int getNumAddLayerSets() { return m_numAddLayerSets; } 263 Void setPocDecrementedInDPBFlag(Bool x) { m_pocDecrementedInDPBFlag = x; } 264 Bool getPocDecrementedInDPBFlag() { return m_pocDecrementedInDPBFlag; } 265 Void setCurrPocMsb(Int poc) { m_currPocMsb = poc; } 266 Int getCurrPocMsb() { return m_currPocMsb; } 271 267 #else //SVC_EXTENSION 272 268 Void encode( Bool bEos,
Note: See TracChangeset for help on using the changeset viewer.