Changeset 1172 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibDecoder
- Timestamp:
- 8 Jul 2015, 01:45:57 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1170 r1172 1046 1046 assert( pcVPS->getMaxLayerId() < MAX_NUM_LAYER_IDS ); 1047 1047 READ_CODE( 6, uiCode, "vps_max_layer_id" ); pcVPS->setMaxLayerId( uiCode ); 1048 #if Q0078_ADD_LAYER_SETS1049 1048 READ_UVLC(uiCode, "vps_num_layer_sets_minus1"); pcVPS->setVpsNumLayerSetsMinus1(uiCode); 1050 1049 pcVPS->setNumLayerSets(pcVPS->getVpsNumLayerSetsMinus1() + 1); 1050 1051 1051 for (UInt opsIdx = 1; opsIdx <= pcVPS->getVpsNumLayerSetsMinus1(); opsIdx++) 1052 #else1053 READ_UVLC( uiCode, "vps_num_layer_sets_minus1" ); pcVPS->setNumLayerSets( uiCode + 1 );1054 for( UInt opsIdx = 1; opsIdx <= ( pcVPS->getNumLayerSets() - 1 ); opsIdx ++ )1055 #endif1056 1052 { 1057 1053 // Operation point set … … 1455 1451 } 1456 1452 #if DPB_CONSTRAINTS 1457 if(pcSlice->getVPS()->getVpsExtensionFlag()==1) 1458 { 1459 #if Q0078_ADD_LAYER_SETS 1460 for (Int ii = 1; ii < (pcSlice->getVPS()->getVpsNumLayerSetsMinus1() + 1); ii++) // prevent assert error when num_add_layer_sets > 0 1461 #else 1462 for (Int ii=1; ii< pcSlice->getVPS()->getNumOutputLayerSets(); ii++ ) 1463 #endif 1453 if( pcSlice->getVPS()->getVpsExtensionFlag() == 1 ) 1454 { 1455 for( Int ii = 1; ii < (pcSlice->getVPS()->getVpsNumLayerSetsMinus1() + 1); ii++ ) // prevent assert error when num_add_layer_sets > 0 1464 1456 { 1465 1457 Int layerSetIdxForOutputLayerSet = pcSlice->getVPS()->getOutputLayerSetIdx( ii ); … … 1472 1464 } 1473 1465 } 1474 if(chkAssert) 1466 1467 if( chkAssert ) 1475 1468 { 1476 1469 UInt layerIdc = pcSlice->getVPS()->getLayerIdcForOls( ii, pcSlice->getLayerId() ); … … 1480 1473 } 1481 1474 } 1482 1483 1484 } 1475 } 1476 1485 1477 if(pcSlice->getLayerId() == 0) 1486 1478 { … … 2785 2777 } 2786 2778 2787 #if Q0078_ADD_LAYER_SETS2788 2779 #if O0092_0094_DEPENDENCY_CONSTRAINT // Moved here 2789 2780 vps->setNumRefLayers(); … … 2799 2790 vps->setPredictedLayerIds(); 2800 2791 vps->setTreePartitionLayerIdList(); 2801 #endif 2802 #if Q0078_ADD_LAYER_SETS 2803 if (vps->getNumIndependentLayers() > 1) 2792 2793 if( vps->getNumIndependentLayers() > 1 ) 2804 2794 { 2805 2795 READ_UVLC(uiCode, "num_add_layer_sets"); vps->setNumAddLayerSets(uiCode); 2806 for (i = 0; i < vps->getNumAddLayerSets(); i++) 2807 { 2808 for (j = 1; j < vps->getNumIndependentLayers(); j++) 2809 { 2810 int len = 1; 2811 while ((1 << len) < (vps->getNumLayersInTreePartition(j) + 1)) 2796 2797 for( i = 0; i < vps->getNumAddLayerSets(); i++ ) 2798 { 2799 for( j = 1; j < vps->getNumIndependentLayers(); j++ ) 2800 { 2801 Int len = 1; 2802 while( (1 << len) < (vps->getNumLayersInTreePartition(j) + 1) ) 2812 2803 { 2813 2804 len++; 2814 2805 } 2806 2815 2807 READ_CODE(len, uiCode, "highest_layer_idx_plus1[i][j]"); vps->setHighestLayerIdxPlus1(i, j, uiCode); 2816 2808 } … … 2823 2815 vps->setNumAddLayerSets(0); 2824 2816 } 2825 #endif2826 2817 2827 2818 READ_FLAG( uiCode, "vps_sub_layers_max_minus1_present_flag"); vps->setMaxTSLayersPresentFlag(uiCode ? true : false); … … 2937 2928 Int layerSetIdxForOutputLayerSet = vps->getOutputLayerSetIdx(i); 2938 2929 2939 #if Q0078_ADD_LAYER_SETS2940 2930 if( i > vps->getVpsNumLayerSetsMinus1() || vps->getDefaultTargetOutputLayerIdc() == 2 ) 2941 #else2942 if( i > (vps->getNumLayerSets() - 1) || vps->getDefaultTargetOutputLayerIdc() == 2 )2943 #endif2944 2931 { 2945 2932 for( j = 0; j < vps->getNumLayersInIdList(layerSetIdxForOutputLayerSet); j++ ) … … 3126 3113 } 3127 3114 } 3128 3129 #if !Q0078_ADD_LAYER_SETS3130 #if O0092_0094_DEPENDENCY_CONSTRAINT // Moved up3131 vps->setNumRefLayers();3132 3133 if(vps->getMaxLayers() > MAX_REF_LAYERS)3134 {3135 for(i = 1;i < vps->getMaxLayers(); i++)3136 {3137 assert( vps->getNumRefLayers(vps->getLayerIdInNuh(i)) <= MAX_REF_LAYERS);3138 }3139 }3140 #endif3141 #endif3142 3115 3143 3116 READ_UVLC( uiCode, "vps_non_vui_extension_length"); vps->setVpsNonVuiExtLength((Int)uiCode); … … 3603 3576 parseHrdParameters(vps->getBspHrd(i), i==0 ? 1 : vps->getBspCprmsPresentFlag(i), vps->getMaxTLayers()-1); 3604 3577 } 3605 #if Q0078_ADD_LAYER_SETS3606 3578 for (UInt h = 1; h <= vps->getVpsNumLayerSetsMinus1(); h++) 3607 #else3608 for( UInt h = 1; h <= (vps->getNumLayerSets()-1); h++ )3609 #endif3610 3579 { 3611 3580 READ_UVLC( uiCode, "num_bitstream_partitions[i]"); vps->setNumBitstreamPartitions(h, uiCode);
Note: See TracChangeset for help on using the changeset viewer.