Changeset 979 in SHVCSoftware for branches/SHM-upgrade/source/Lib/TLibDecoder
- Timestamp:
- 13 Jan 2015, 17:32:39 (10 years ago)
- Location:
- branches/SHM-upgrade/source/Lib/TLibDecoder
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-upgrade/source/Lib/TLibDecoder/TDecTop.cpp
r962 r979 105 105 m_isLastNALWasEos = false; 106 106 #endif 107 #if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS 108 m_lastPicHasEos = false; 109 #endif 107 110 #if NO_CLRAS_OUTPUT_FLAG 108 111 m_noClrasOutputFlag = false; … … 972 975 setNoClrasOutputFlag(true); 973 976 } 977 #if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS 978 else if( m_lastPicHasEos ) 979 { 980 setNoClrasOutputFlag(true); 981 } 982 #endif 974 983 else if ( m_apcSlicePilot->getBlaPicFlag() ) 975 984 { … … 1663 1672 } 1664 1673 #endif 1674 #if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS 1675 xCheckLayerReset(); 1676 xSetLayerInitializedFlag(); 1677 #endif 1665 1678 // Buffer initialize for prediction. 1666 1679 m_cPrediction.initTempBuff(m_apcSlicePilot->getSPS()->getChromaFormatIdc()); … … 2246 2259 #if P0297_VPS_POC_LSB_ALIGNED_FLAG 2247 2260 setFirstPicInLayerDecodedFlag(true); 2261 #endif 2262 #if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS 2263 m_lastPicHasEos = false; 2248 2264 #endif 2249 2265 … … 2526 2542 #if Q0177_EOS_CHECKS 2527 2543 assert( m_isLastNALWasEos == false ); 2544 #if !R0071_IRAP_EOS_CROSS_LAYER_IMPACTS 2528 2545 //Check layer id of the nalu. if it is not 0, give a warning message and just return without doing anything. 2529 2546 if (nalu.m_layerId > 0) … … 2532 2549 return false; 2533 2550 } 2551 #endif 2534 2552 m_isLastNALWasEos = true; 2553 #if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS 2554 m_lastPicHasEos = true; 2555 #endif 2535 2556 #endif 2536 2557 m_associatedIRAPType = NAL_UNIT_INVALID; … … 3091 3112 } 3092 3113 #endif 3114 3115 #if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS 3116 Void TDecTop::xCheckLayerReset() 3117 { 3118 if (m_apcSlicePilot->isIRAP() && m_layerId > 0) 3119 { 3120 Bool layerResetFlag; 3121 UInt dolLayerId; 3122 if (m_lastPicHasEos) 3123 { 3124 layerResetFlag = true; 3125 dolLayerId = m_layerId; 3126 } 3127 else if ((m_apcSlicePilot->isCRA() && m_apcSlicePilot->getHandleCraAsBlaFlag()) || 3128 (m_apcSlicePilot->isIDR() && m_apcSlicePilot->getCrossLayerBLAFlag()) || m_apcSlicePilot->isBLA()) 3129 { 3130 layerResetFlag = true; 3131 dolLayerId = m_layerId; 3132 } 3133 else 3134 { 3135 layerResetFlag = false; 3136 } 3137 3138 if (layerResetFlag) 3139 { 3140 for (Int i = 0; i < m_apcSlicePilot->getVPS()->getNumPredictedLayers(dolLayerId); i++) 3141 { 3142 UInt iLayerId = m_apcSlicePilot->getVPS()->getPredictedLayerId(dolLayerId, i); 3143 m_ppcTDecTop[iLayerId]->m_layerInitializedFlag = false; 3144 m_ppcTDecTop[iLayerId]->m_firstPicInLayerDecodedFlag = false; 3145 } 3146 3147 for (TComList<TComPic*>::iterator i = m_cListPic.begin(); i != m_cListPic.end(); i++) 3148 { 3149 if ((*i)->getPOC() != m_apcSlicePilot->getPOC()) 3150 { 3151 (*i)->getSlice(0)->setReferenced(false); 3152 } 3153 } 3154 3155 for (UInt i = 0; i < m_apcSlicePilot->getVPS()->getNumPredictedLayers(dolLayerId); i++) 3156 { 3157 UInt predLId = m_apcSlicePilot->getVPS()->getPredictedLayerId(dolLayerId, i); 3158 for (TComList<TComPic*>::iterator pic = m_ppcTDecTop[predLId]->getListPic()->begin(); pic != m_ppcTDecTop[predLId]->getListPic()->end(); pic++) 3159 { 3160 if ((*pic)->getSlice(0)->getPOC() != m_apcSlicePilot->getPOC()) 3161 { 3162 (*pic)->getSlice(0)->setReferenced(false); 3163 } 3164 } 3165 } 3166 } 3167 } 3168 } 3169 3170 Void TDecTop::xSetLayerInitializedFlag() 3171 { 3172 if (m_apcSlicePilot->isIRAP() && m_apcSlicePilot->getNoRaslOutputFlag()) 3173 { 3174 if (m_layerId == 0) 3175 { 3176 m_ppcTDecTop[m_layerId]->setLayerInitializedFlag(true); 3177 } 3178 else if (!m_ppcTDecTop[m_layerId]->getLayerInitializedFlag() && m_apcSlicePilot->getVPS()->getNumDirectRefLayers(m_layerId) == 0) 3179 { 3180 m_ppcTDecTop[m_layerId]->setLayerInitializedFlag(true); 3181 } 3182 else if (!m_ppcTDecTop[m_layerId]->getLayerInitializedFlag()) 3183 { 3184 Bool refLayersInitialized = true; 3185 for (UInt j = 0; j < m_apcSlicePilot->getVPS()->getNumDirectRefLayers(m_layerId); j++) 3186 { 3187 UInt refLayerId = m_apcSlicePilot->getVPS()->getRefLayerId(m_layerId, j); 3188 if (!m_ppcTDecTop[refLayerId]->getLayerInitializedFlag()) 3189 { 3190 refLayersInitialized = false; 3191 } 3192 } 3193 if (refLayersInitialized) 3194 { 3195 m_ppcTDecTop[m_layerId]->setLayerInitializedFlag(true); 3196 } 3197 } 3198 } 3199 } 3200 #endif 3201 3093 3202 #endif //SVC_EXTENSION 3094 3203 -
branches/SHM-upgrade/source/Lib/TLibDecoder/TDecTop.h
r962 r979 124 124 Bool m_isLastNALWasEos; 125 125 #endif 126 #if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS 127 Bool m_lastPicHasEos; 128 #endif 126 129 static UInt m_prevPOC; // POC of the previous slice 127 130 static UInt m_uiPrevLayerId; // LayerId of the previous slice … … 356 359 Void resetPocRestrictionCheckParameters(); 357 360 #endif 361 #if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS 362 Void xCheckLayerReset(); 363 Void xSetNoRaslOutputFlag(); 364 Void xSetLayerInitializedFlag(); 365 #endif 358 366 };// END CLASS DEFINITION TDecTop 359 367
Note: See TracChangeset for help on using the changeset viewer.