Changeset 1006 in SHVCSoftware for branches/SHM-upgrade/source/Lib/TLibDecoder
- Timestamp:
- 27 Jan 2015, 19:44:15 (10 years ago)
- Location:
- branches/SHM-upgrade/source/Lib/TLibDecoder
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-upgrade/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1002 r1006 1525 1525 for(Int kk = 0; kk < pcSlice->getVPS()->getNumLayersInIdList(layerSetIdxForOutputLayerSet); kk++) 1526 1526 { 1527 #if R0235_SMALLEST_LAYER_ID 1528 if( pcSlice->getVPS()->getNecessaryLayerFlag(ii, kk) && pcSlice->getLayerId() == pcSlice->getVPS()->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, kk) ) 1529 #else 1527 1530 if(pcSlice->getLayerId() == pcSlice->getVPS()->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, kk)) 1531 #endif 1528 1532 { 1529 1533 chkAssert=1; … … 3218 3222 #endif 3219 3223 { 3220 READ_CODE( numBitsForPtlIdx, uiCode, "profile_ level_tier_idx[i]" );3224 READ_CODE( numBitsForPtlIdx, uiCode, "profile_tier_level_idx[i]" ); 3221 3225 vps->setProfileLevelTierIdx(i, j, uiCode ); 3222 3226 … … 3228 3232 //If OpTid of the output operation point is equal to vps_max_sub_layer_minus1, the conformance is indicated by general_profile_idc being equal to 7 or general_profile_compatibility_flag[ 7 ] being equal to 1 3229 3233 //The following assert may be updated / upgraded to take care of general_profile_compatibility_flag. 3234 #if R0235_SMALLEST_LAYER_ID 3235 // The assertion below is not valid for independent non-base layers 3236 if (vps->getNumAddLayerSets() == 0) 3237 { 3238 #endif 3230 3239 if (j > 0 && vps->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, j) != 0 && vps->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, j - 1) != 0) 3231 3240 { … … 3234 3243 vps->getPTL(vps->getProfileLevelTierIdx(i, j))->getGeneralPTL()->getProfileCompatibilityFlag(vps->getPTL(vps->getProfileLevelTierIdx(i, j - 1))->getGeneralPTL()->getProfileIdc()) ); 3235 3244 } 3245 #if R0235_SMALLEST_LAYER_ID 3246 } 3247 #endif 3236 3248 #endif 3237 3249 } … … 3243 3255 numBits++; 3244 3256 } 3245 READ_CODE( numBits, uiCode, "profile_ level_tier_idx[i]" ); vps->setProfileLevelTierIdx(i, uiCode);3257 READ_CODE( numBits, uiCode, "profile_tier_level_idx[i]" ); vps->setProfileLevelTierIdx(i, uiCode); 3246 3258 #endif 3247 3259 #if P0300_ALT_OUTPUT_LAYER_FLAG -
branches/SHM-upgrade/source/Lib/TLibDecoder/TDecTop.cpp
r1000 r1006 91 91 #if SVC_EXTENSION 92 92 m_layerId = 0; 93 #if R0235_SMALLEST_LAYER_ID 94 m_smallestLayerId = 0; 95 #endif 93 96 #if AVC_BASE 94 97 m_pBLReconFile = NULL; … … 838 841 #if OUTPUT_LAYER_SET_INDEX 839 842 // Following check should go wherever the VPS is activated 843 #if R0235_SMALLEST_LAYER_ID 844 if (!m_apcSlicePilot->getVPS()->getBaseLayerAvailableFlag()) 845 { 846 assert(nalu.m_layerId != 0); 847 assert(m_apcSlicePilot->getVPS()->getNumAddLayerSets() > 0); 848 if (getCommonDecoderParams()->getTargetOutputLayerSetIdx() >= 0) 849 { 850 UInt layerIdx = m_apcSlicePilot->getVPS()->getOutputLayerSetIdx(getCommonDecoderParams()->getTargetOutputLayerSetIdx()); 851 assert(layerIdx > m_apcSlicePilot->getVPS()->getVpsNumLayerSetsMinus1()); 852 } 853 } 854 if (m_apcSlicePilot->getVPS()->getNumAddLayerSets() == 0) 855 { 856 checkValueOfTargetOutputLayerSetIdx(m_apcSlicePilot->getVPS()); 857 } 858 #else 840 859 checkValueOfTargetOutputLayerSetIdx( m_apcSlicePilot->getVPS()); 860 #endif 841 861 #endif 842 862 #if RESOLUTION_BASED_DPB … … 969 989 #if NO_OUTPUT_OF_PRIOR_PICS 970 990 #if NO_CLRAS_OUTPUT_FLAG 991 #if R0235_SMALLEST_LAYER_ID 992 if (m_layerId == m_smallestLayerId && m_apcSlicePilot->getRapPicFlag()) 993 #else 971 994 if (m_layerId == 0 && m_apcSlicePilot->getRapPicFlag() ) 995 #endif 972 996 { 973 997 if (m_bFirstSliceInSequence) … … 1001 1025 } 1002 1026 1027 #if R0235_SMALLEST_LAYER_ID 1028 m_apcSlicePilot->decodingRefreshMarking( m_cListPic, m_noClrasOutputFlag, m_smallestLayerId ); 1029 #else 1003 1030 m_apcSlicePilot->decodingRefreshMarking( m_cListPic, m_noClrasOutputFlag ); 1031 #endif 1004 1032 #endif 1005 1033 … … 2470 2498 cListPic->clear(); 2471 2499 } 2500 #endif 2501 #if R0235_SMALLEST_LAYER_ID 2502 xDeriveSmallestLayerId(m_parameterSetManagerDecoder.getPrefetchedVPS(0)); 2472 2503 #endif 2473 2504 return false; … … 3116 3147 Void TDecTop::xCheckLayerReset() 3117 3148 { 3149 #if R0235_SMALLEST_LAYER_ID 3150 if (m_apcSlicePilot->isIRAP() && m_layerId > m_smallestLayerId) 3151 #else 3118 3152 if (m_apcSlicePilot->isIRAP() && m_layerId > 0) 3153 #endif 3119 3154 { 3120 3155 Bool layerResetFlag; … … 3200 3235 #endif 3201 3236 3237 #if R0235_SMALLEST_LAYER_ID 3238 Void TDecTop::xDeriveSmallestLayerId(TComVPS* vps) 3239 { 3240 UInt smallestLayerId; 3241 UInt targetOlsIdx = getCommonDecoderParams()->getTargetOutputLayerSetIdx(); 3242 UInt targetDecLayerSetIdx = vps->getOutputLayerSetIdx(targetOlsIdx); 3243 UInt lsIdx = targetDecLayerSetIdx; 3244 UInt targetDecLayerIdList[MAX_LAYERS] = {0}; 3245 3246 for (UInt i = 0, j = 0; i < vps->getNumLayersInIdList(lsIdx); i++) 3247 { 3248 if (vps->getNecessaryLayerFlag(targetOlsIdx, i)) 3249 { 3250 targetDecLayerIdList[j++] = vps->getLayerSetLayerIdList(lsIdx, i); 3251 } 3252 } 3253 3254 if (targetDecLayerSetIdx <= vps->getVpsNumLayerSetsMinus1()) 3255 { 3256 smallestLayerId = 0; 3257 } 3258 else if (vps->getNumLayersInIdList(targetDecLayerSetIdx) == 1) 3259 { 3260 smallestLayerId = 0; 3261 } 3262 else 3263 { 3264 smallestLayerId = targetDecLayerIdList[0]; 3265 } 3266 3267 for (UInt layer = 0; layer <= MAX_VPS_LAYER_ID_PLUS1 - 1; layer++) 3268 { 3269 m_ppcTDecTop[layer]->m_smallestLayerId = smallestLayerId; 3270 } 3271 } 3272 #endif 3273 3202 3274 #endif //SVC_EXTENSION 3203 3275 -
branches/SHM-upgrade/source/Lib/TLibDecoder/TDecTop.h
r979 r1006 133 133 UInt m_numLayer; 134 134 TDecTop** m_ppcTDecTop; 135 #if R0235_SMALLEST_LAYER_ID 136 UInt m_smallestLayerId; 137 #endif 135 138 #if P0297_VPS_POC_LSB_ALIGNED_FLAG 136 139 Bool m_pocResettingFlag; … … 256 259 Void setLayerDec(TDecTop **p) { m_ppcTDecTop = p; } 257 260 TDecTop* getLayerDec(UInt layer) { return m_ppcTDecTop[layer]; } 261 #if R0235_SMALLEST_LAYER_ID 262 Void xDeriveSmallestLayerId(TComVPS* vps); 263 #endif 258 264 #if VPS_EXTN_DIRECT_REF_LAYERS 259 265 TDecTop* getRefLayerDec(UInt refLayerIdc);
Note: See TracChangeset for help on using the changeset viewer.