Changeset 290 in SHVCSoftware for branches/SHM-2.1-dev/source/Lib/TLibDecoder
- Timestamp:
- 18 Jun 2013, 13:57:03 (12 years ago)
- Location:
- branches/SHM-2.1-dev/source/Lib/TLibDecoder
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-2.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r289 r290 1143 1143 #endif 1144 1144 #endif 1145 #if VPS_EXTN_DIRECT_REF_LAYERS && M0457_PREDICTION_INDICATIONS 1146 READ_UVLC( uiCode, "direct_dep_type_len_minus2"); vps->setDirectDepTypeLen(uiCode+2); 1147 for(i = 1; i < vps->getMaxLayers(); i++) 1148 { 1149 for(j = 0; j < i; j++) 1150 { 1151 if (vps->getDirectDependencyFlag(i, j)) 1152 { 1153 READ_CODE( vps->getDirectDepTypeLen(), uiCode, "direct_dependency_type[i][j]" ); vps->setDirectDependencyType(i, j, uiCode); 1154 } 1155 } 1156 } 1157 #endif 1145 1158 } 1146 1159 #endif -
branches/SHM-2.1-dev/source/Lib/TLibDecoder/TDecTop.cpp
r288 r290 538 538 m_apcSlicePilot->setTLayerInfo(nalu.m_temporalId); 539 539 540 #if VPS_EXTN_DIRECT_REF_LAYERS && M0457_PREDICTION_INDICATIONS 541 setRefLayerParams(m_apcSlicePilot->getVPS()); 542 #endif 540 543 #if SVC_EXTENSION 541 544 m_cEntropyDecoder.decodeSliceHeader (m_apcSlicePilot, &m_parameterSetManagerDecoder[m_layerId]); … … 1316 1319 #endif 1317 1320 1321 #if VPS_EXTN_DIRECT_REF_LAYERS && M0457_PREDICTION_INDICATIONS 1322 1323 Void TDecTop::setRefLayerParams( TComVPS* vps ) 1324 { 1325 for(UInt layer = 0; layer < m_numLayer; layer++) 1326 { 1327 TDecTop *decTop = (TDecTop *)getLayerDec(layer); 1328 decTop->setNumSamplePredRefLayers(0); 1329 decTop->setNumMotionPredRefLayers(0); 1330 decTop->setNumDirectRefLayers(0); 1331 for(Int i = 0; i < MAX_VPS_LAYER_ID_PLUS1; i++) 1332 { 1333 decTop->setSamplePredEnabledFlag(i, false); 1334 decTop->setMotionPredEnabledFlag(i, false); 1335 decTop->setSamplePredRefLayerId(i, 0); 1336 decTop->setMotionPredRefLayerId(i, 0); 1337 } 1338 for(Int j = 0; j < layer; j++) 1339 { 1340 if (vps->getDirectDependencyFlag(layer, j)) 1341 { 1342 decTop->setRefLayerId(decTop->getNumDirectRefLayers(), vps->getLayerIdInNuh(layer)); 1343 decTop->setNumDirectRefLayers(decTop->getNumDirectRefLayers() + 1); 1344 1345 Int samplePredEnabledFlag = (vps->getDirectDependencyType(layer, j) + 1) & 1; 1346 decTop->setSamplePredEnabledFlag(j, samplePredEnabledFlag == 1 ? true : false); 1347 decTop->setNumSamplePredRefLayers(decTop->getNumSamplePredRefLayers() + samplePredEnabledFlag); 1348 1349 Int motionPredEnabledFlag = ((vps->getDirectDependencyType(layer, j) + 1) & 2) >> 1; 1350 decTop->setMotionPredEnabledFlag(j, motionPredEnabledFlag == 1 ? true : false); 1351 decTop->setNumMotionPredRefLayers(decTop->getNumMotionPredRefLayers() + motionPredEnabledFlag); 1352 } 1353 } 1354 } 1355 for ( Int i = 1, mIdx = 0, sIdx = 0; i < m_numLayer; i++ ) 1356 { 1357 Int iNuhLId = vps->getLayerIdInNuh(i); 1358 TDecTop *decTop = (TDecTop *)getLayerDec(iNuhLId); 1359 for ( Int j = 0; j < i; j++ ) 1360 { 1361 if (decTop->getMotionPredEnabledFlag(j)) 1362 { 1363 decTop->setMotionPredRefLayerId(mIdx++, vps->getLayerIdInNuh(j)); 1364 } 1365 if (decTop->getSamplePredEnabledFlag(j)) 1366 { 1367 decTop->setSamplePredRefLayerId(sIdx++, vps->getLayerIdInNuh(j)); 1368 } 1369 } 1370 } 1371 } 1372 1373 #endif 1318 1374 //! \} -
branches/SHM-2.1-dev/source/Lib/TLibDecoder/TDecTop.h
r250 r290 120 120 Int m_iBLSourceHeight; 121 121 #endif 122 #if VPS_EXTN_DIRECT_REF_LAYERS && M0457_PREDICTION_INDICATIONS 123 Int m_numDirectRefLayers; 124 Int m_refLayerId[MAX_VPS_LAYER_ID_PLUS1]; 125 Int m_numSamplePredRefLayers; 126 Int m_samplePredRefLayerId[MAX_VPS_LAYER_ID_PLUS1]; 127 Int m_numMotionPredRefLayers; 128 Int m_motionPredRefLayerId[MAX_VPS_LAYER_ID_PLUS1]; 129 Bool m_samplePredEnabledFlag[MAX_VPS_LAYER_ID_PLUS1]; 130 Bool m_motionPredEnabledFlag[MAX_VPS_LAYER_ID_PLUS1]; 131 #endif 122 132 #endif 123 133 #if AVC_SYNTAX || SYNTAX_OUTPUT … … 158 168 #if VPS_EXTN_DIRECT_REF_LAYERS 159 169 TDecTop* getRefLayerDec(UInt refLayerIdc); 170 #if M0457_PREDICTION_INDICATIONS 171 Int getNumDirectRefLayers () { return m_numDirectRefLayers; } 172 Void setNumDirectRefLayers (Int num) { m_numDirectRefLayers = num; } 173 174 Int getRefLayerId (Int i) { return m_refLayerId[i]; } 175 Void setRefLayerId (Int i, Int refLayerId) { m_refLayerId[i] = refLayerId; } 176 177 Int getNumSamplePredRefLayers () { return m_numSamplePredRefLayers; } 178 Void setNumSamplePredRefLayers (Int num) { m_numSamplePredRefLayers = num; } 179 180 Int getSamplePredRefLayerId (Int i) { return m_samplePredRefLayerId[i]; } 181 Void setSamplePredRefLayerId (Int i, Int refLayerId) { m_samplePredRefLayerId[i] = refLayerId; } 182 183 Int getNumMotionPredRefLayers () { return m_numMotionPredRefLayers; } 184 Void setNumMotionPredRefLayers (Int num) { m_numMotionPredRefLayers = num; } 185 186 Int getMotionPredRefLayerId (Int i) { return m_motionPredRefLayerId[i]; } 187 Void setMotionPredRefLayerId (Int i, Int refLayerId) { m_motionPredRefLayerId[i] = refLayerId; } 188 189 Bool getSamplePredEnabledFlag (Int i) { return m_samplePredEnabledFlag[i]; } 190 Void setSamplePredEnabledFlag (Int i,Bool flag) { m_samplePredEnabledFlag[i] = flag; } 191 192 Bool getMotionPredEnabledFlag (Int i) { return m_motionPredEnabledFlag[i]; } 193 Void setMotionPredEnabledFlag (Int i,Bool flag) { m_motionPredEnabledFlag[i] = flag; } 194 195 TDecTop* getSamplePredRefLayerDec ( UInt layerId ); 196 TDecTop* getMotionPredRefLayerDec ( UInt layerId ); 197 198 Void setRefLayerParams( TComVPS* vps ); 199 #endif 160 200 #endif 161 201 #if AVC_BASE
Note: See TracChangeset for help on using the changeset viewer.