Changeset 978 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibDecoder
- Timestamp:
- 13 Jan 2015, 14:56:46 (11 years ago)
- Location:
- branches/SHM-dev/source/Lib/TLibDecoder
- Files:
-
- 2 edited
-
TDecTop.cpp (modified) (7 diffs)
-
TDecTop.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
r953 r978 100 100 m_isLastNALWasEos = false; 101 101 #endif 102 #if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS 103 m_lastPicHasEos = false; 104 #endif 102 105 #if NO_CLRAS_OUTPUT_FLAG 103 106 m_noClrasOutputFlag = false; … … 1146 1149 setNoClrasOutputFlag(true); 1147 1150 } 1151 #if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS 1152 else if (m_lastPicHasEos) 1153 { 1154 setNoClrasOutputFlag(true); 1155 } 1156 #endif 1148 1157 else if ( m_apcSlicePilot->getBlaPicFlag() ) 1149 1158 { … … 1833 1842 } 1834 1843 #endif 1844 #if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS 1845 xCheckLayerReset(); 1846 xSetLayerInitializedFlag(); 1847 #endif 1835 1848 // Buffer initialize for prediction. 1836 1849 m_cPrediction.initTempBuff(); … … 2426 2439 #if P0297_VPS_POC_LSB_ALIGNED_FLAG 2427 2440 setFirstPicInLayerDecodedFlag(true); 2441 #endif 2442 #if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS 2443 m_lastPicHasEos = false; 2428 2444 #endif 2429 2445 … … 2690 2706 #if Q0177_EOS_CHECKS 2691 2707 assert( m_isLastNALWasEos == false ); 2708 #if !R0071_IRAP_EOS_CROSS_LAYER_IMPACTS 2692 2709 //Check layer id of the nalu. if it is not 0, give a warning message and just return without doing anything. 2693 2710 if (nalu.m_layerId > 0) … … 2696 2713 return false; 2697 2714 } 2715 #endif 2698 2716 m_isLastNALWasEos = true; 2717 #if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS 2718 m_lastPicHasEos = true; 2719 #endif 2699 2720 #endif 2700 2721 m_associatedIRAPType = NAL_UNIT_INVALID; … … 3101 3122 } 3102 3123 #endif 3124 3125 #if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS 3126 Void TDecTop::xCheckLayerReset() 3127 { 3128 if (m_apcSlicePilot->isIRAP() && m_layerId > 0) 3129 { 3130 Bool layerResetFlag; 3131 UInt dolLayerId; 3132 if (m_lastPicHasEos) 3133 { 3134 layerResetFlag = true; 3135 dolLayerId = m_layerId; 3136 } 3137 else if ((m_apcSlicePilot->isCRA() && m_apcSlicePilot->getHandleCraAsBlaFlag()) || 3138 (m_apcSlicePilot->isIDR() && m_apcSlicePilot->getCrossLayerBLAFlag()) || m_apcSlicePilot->isBLA()) 3139 { 3140 layerResetFlag = true; 3141 dolLayerId = m_layerId; 3142 } 3143 else 3144 { 3145 layerResetFlag = false; 3146 } 3147 3148 if (layerResetFlag) 3149 { 3150 for (Int i = 0; i < m_apcSlicePilot->getVPS()->getNumPredictedLayers(dolLayerId); i++) 3151 { 3152 UInt iLayerId = m_apcSlicePilot->getVPS()->getPredictedLayerId(dolLayerId, i); 3153 m_ppcTDecTop[iLayerId]->m_layerInitializedFlag = false; 3154 m_ppcTDecTop[iLayerId]->m_firstPicInLayerDecodedFlag = false; 3155 } 3156 3157 for (TComList<TComPic*>::iterator i = m_cListPic.begin(); i != m_cListPic.end(); i++) 3158 { 3159 if ((*i)->getPOC() != m_apcSlicePilot->getPOC()) 3160 { 3161 (*i)->getSlice(0)->setReferenced(false); 3162 } 3163 } 3164 3165 for (UInt i = 0; i < m_apcSlicePilot->getVPS()->getNumPredictedLayers(dolLayerId); i++) 3166 { 3167 UInt predLId = m_apcSlicePilot->getVPS()->getPredictedLayerId(dolLayerId, i); 3168 for (TComList<TComPic*>::iterator pic = m_ppcTDecTop[predLId]->getListPic()->begin(); pic != m_ppcTDecTop[predLId]->getListPic()->end(); pic++) 3169 { 3170 if ((*pic)->getSlice(0)->getPOC() != m_apcSlicePilot->getPOC()) 3171 { 3172 (*pic)->getSlice(0)->setReferenced(false); 3173 } 3174 } 3175 } 3176 } 3177 } 3178 } 3179 3180 Void TDecTop::xSetLayerInitializedFlag() 3181 { 3182 if (m_apcSlicePilot->isIRAP() && m_apcSlicePilot->getNoRaslOutputFlag()) 3183 { 3184 if (m_layerId == 0) 3185 { 3186 m_ppcTDecTop[m_layerId]->setLayerInitializedFlag(true); 3187 } 3188 else if (!m_ppcTDecTop[m_layerId]->getLayerInitializedFlag() && m_apcSlicePilot->getVPS()->getNumDirectRefLayers(m_layerId) == 0) 3189 { 3190 m_ppcTDecTop[m_layerId]->setLayerInitializedFlag(true); 3191 } 3192 else if (!m_ppcTDecTop[m_layerId]->getLayerInitializedFlag()) 3193 { 3194 Bool refLayersInitialized = true; 3195 for (UInt j = 0; j < m_apcSlicePilot->getVPS()->getNumDirectRefLayers(m_layerId); j++) 3196 { 3197 UInt refLayerId = m_apcSlicePilot->getVPS()->getRefLayerId(m_layerId, j); 3198 if (!m_ppcTDecTop[refLayerId]->getLayerInitializedFlag()) 3199 { 3200 refLayersInitialized = false; 3201 } 3202 } 3203 if (refLayersInitialized) 3204 { 3205 m_ppcTDecTop[m_layerId]->setLayerInitializedFlag(true); 3206 } 3207 } 3208 } 3209 } 3210 #endif 3211 3103 3212 #endif //SVC_EXTENSION 3104 3213 -
branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.h
r953 r978 120 120 Bool m_isLastNALWasEos; 121 121 #endif 122 #if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS 123 Bool m_lastPicHasEos; 124 #endif 122 125 #if SVC_EXTENSION 123 126 static UInt m_prevPOC; // POC of the previous slice … … 350 353 Void setConfModeFlag(Bool x) { m_confModeFlag = x; } 351 354 #endif 355 #if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS 356 Void xCheckLayerReset(); 357 Void xSetNoRaslOutputFlag(); 358 Void xSetLayerInitializedFlag(); 359 #endif 352 360 };// END CLASS DEFINITION TDecTop 353 361
Note: See TracChangeset for help on using the changeset viewer.