Changeset 805 in SHVCSoftware for branches/SHM-6-dev/source/Lib/TLibDecoder
- Timestamp:
- 17 Jun 2014, 16:58:15 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-6-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r802 r805 973 973 assert( pcVPS->getMaxLayerId() < MAX_VPS_LAYER_ID_PLUS1 ); 974 974 READ_CODE( 6, uiCode, "vps_max_layer_id" ); pcVPS->setMaxLayerId( uiCode ); 975 #if Q0078_ADD_LAYER_SETS 976 READ_UVLC(uiCode, "vps_num_layer_sets_minus1"); pcVPS->setVpsNumLayerSetsMinus1(uiCode); 977 pcVPS->setNumLayerSets(pcVPS->getVpsNumLayerSetsMinus1() + 1); 978 for (UInt opsIdx = 1; opsIdx <= pcVPS->getVpsNumLayerSetsMinus1(); opsIdx++) 979 #else 975 980 READ_UVLC( uiCode, "vps_num_layer_sets_minus1" ); pcVPS->setNumLayerSets( uiCode + 1 ); 976 981 for( UInt opsIdx = 1; opsIdx <= ( pcVPS->getNumLayerSets() - 1 ); opsIdx ++ ) 982 #endif 977 983 { 978 984 // Operation point set … … 1310 1316 } 1311 1317 } 1312 1313 for (i = 0; i < vps->getNumAddLayerSets(); i++) 1314 { 1315 for (j = 1; j < vps->getNumIndependentLayers(); j++) 1316 { 1317 Int layerNum = 0; 1318 Int lsIdx = vps->getNumLayerSets() + i; 1319 for (Int layerId = 0; layerId < MAX_VPS_LAYER_ID_PLUS1; layerId++) 1320 { 1321 vps->setLayerIdIncludedFlag(false, lsIdx, layerId); 1322 } 1323 for (Int treeIdx = 1; treeIdx < vps->getNumIndependentLayers(); treeIdx++) 1324 { 1325 for (Int layerCnt = 0; layerCnt < vps->getHighestLayerIdxPlus1(i, j); layerCnt++) 1326 { 1327 vps->setLayerSetLayerIdList(lsIdx, layerNum, vps->getTreePartitionLayerId(treeIdx, layerCnt)); 1328 vps->setLayerIdIncludedFlag(true, lsIdx, vps->getTreePartitionLayerId(treeIdx, layerCnt)); 1329 layerNum++; 1330 } 1331 } 1332 vps->setNumLayersInIdList(lsIdx, layerNum); 1333 } 1334 } 1318 vps->setNumLayerSets(vps->getNumLayerSets() + vps->getNumAddLayerSets()); 1319 vps->setLayerIdIncludedFlagsForAddLayerSets(); 1335 1320 } 1336 1321 #endif … … 1394 1379 vps->setOutputLayerSetIdx( i, i ); 1395 1380 } 1381 #if Q0078_ADD_LAYER_SETS 1382 if ( i > vps->getVpsNumLayerSetsMinus1() || vps->getDefaultTargetOutputLayerIdc() >= 2 ) 1383 #else 1396 1384 if ( i > (vps->getNumLayerSets() - 1) || vps->getDefaultTargetOutputLayerIdc() >= 2 ) 1385 #endif 1397 1386 { 1398 1387 Int lsIdx = vps->getOutputLayerSetIdx(i); … … 2135 2124 Bool parseFlag = vps->getBitRatePresentVpsFlag() || vps->getPicRatePresentVpsFlag(); 2136 2125 2126 #if Q0078_ADD_LAYER_SETS 2127 for( i = 0; i <= vps->getVpsNumLayerSetsMinus1(); i++ ) 2128 #else 2137 2129 for( i = 0; i < vps->getNumLayerSets(); i++ ) 2130 #endif 2138 2131 { 2139 2132 #if BITRATE_PICRATE_SIGNALLING … … 2367 2360 parseHrdParameters(vps->getBspHrd(i), i==0 ? 1 : vps->getBspCprmsPresentFlag(i), vps->getMaxTLayers()-1); 2368 2361 } 2362 #if Q0078_ADD_LAYER_SETS 2363 for (UInt h = 1; h <= vps->getVpsNumLayerSetsMinus1(); h++) 2364 #else 2369 2365 for( UInt h = 1; h <= (vps->getNumLayerSets()-1); h++ ) 2366 #endif 2370 2367 { 2371 2368 READ_UVLC( uiCode, "num_bitstream_partitions[i]"); vps->setNumBitstreamPartitions(h, uiCode); … … 2776 2773 if(rpcSlice->getVPS()->getVpsExtensionFlag()==1) 2777 2774 { 2775 #if Q0078_ADD_LAYER_SETS 2776 for (Int ii = 1; ii < (rpcSlice->getVPS()->getVpsNumLayerSetsMinus1() + 1); ii++) // prevent assert error when num_add_layer_sets > 0 2777 #else 2778 2778 for (Int ii=1; ii< rpcSlice->getVPS()->getNumOutputLayerSets(); ii++ ) 2779 #endif 2779 2780 { 2780 2781 Int layerSetIdxForOutputLayerSet = rpcSlice->getVPS()->getOutputLayerSetIdx( ii ); … … 2789 2790 if(chkAssert) 2790 2791 { 2792 // There may be something wrong here (layer id assumed to be layer idx?) 2791 2793 assert(rps->getNumberOfNegativePictures() <= rpcSlice->getVPS()->getMaxVpsDecPicBufferingMinus1(ii , rpcSlice->getLayerId() , rpcSlice->getVPS()->getMaxSLayersInLayerSetMinus1(ii))); 2792 2794 assert(rps->getNumberOfPositivePictures() <= rpcSlice->getVPS()->getMaxVpsDecPicBufferingMinus1(ii , rpcSlice->getLayerId() , rpcSlice->getVPS()->getMaxSLayersInLayerSetMinus1(ii)) - rps->getNumberOfNegativePictures());
Note: See TracChangeset for help on using the changeset viewer.