Changeset 1172 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibDecoder


Ignore:
Timestamp:
8 Jul 2015, 01:45:57 (10 years ago)
Author:
seregin
Message:

macro cleanup: Q0078_ADD_LAYER_SETS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r1170 r1172  
    10461046  assert( pcVPS->getMaxLayerId()       < MAX_NUM_LAYER_IDS );
    10471047  READ_CODE( 6, uiCode, "vps_max_layer_id" );           pcVPS->setMaxLayerId( uiCode );
    1048 #if Q0078_ADD_LAYER_SETS
    10491048  READ_UVLC(uiCode, "vps_num_layer_sets_minus1");  pcVPS->setVpsNumLayerSetsMinus1(uiCode);
    10501049  pcVPS->setNumLayerSets(pcVPS->getVpsNumLayerSetsMinus1() + 1);
     1050
    10511051  for (UInt opsIdx = 1; opsIdx <= pcVPS->getVpsNumLayerSetsMinus1(); opsIdx++)
    1052 #else
    1053   READ_UVLC(    uiCode, "vps_num_layer_sets_minus1" );  pcVPS->setNumLayerSets( uiCode + 1 );
    1054   for( UInt opsIdx = 1; opsIdx <= ( pcVPS->getNumLayerSets() - 1 ); opsIdx ++ )
    1055 #endif
    10561052  {
    10571053    // Operation point set
     
    14551451      }
    14561452#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
    14641456        {
    14651457          Int layerSetIdxForOutputLayerSet = pcSlice->getVPS()->getOutputLayerSetIdx( ii );
     
    14721464            }
    14731465          }
    1474           if(chkAssert)
     1466
     1467          if( chkAssert )
    14751468          {
    14761469            UInt layerIdc = pcSlice->getVPS()->getLayerIdcForOls( ii, pcSlice->getLayerId() );
     
    14801473          }
    14811474        }
    1482 
    1483 
    1484       }
     1475      }
     1476
    14851477      if(pcSlice->getLayerId() == 0)
    14861478      {
     
    27852777  }
    27862778
    2787 #if Q0078_ADD_LAYER_SETS
    27882779#if O0092_0094_DEPENDENCY_CONSTRAINT // Moved here
    27892780  vps->setNumRefLayers();
     
    27992790  vps->setPredictedLayerIds();
    28002791  vps->setTreePartitionLayerIdList();
    2801 #endif
    2802 #if Q0078_ADD_LAYER_SETS
    2803   if (vps->getNumIndependentLayers() > 1)
     2792
     2793  if( vps->getNumIndependentLayers() > 1 )
    28042794  {
    28052795    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) )
    28122803        {
    28132804          len++;
    28142805        }
     2806
    28152807        READ_CODE(len, uiCode, "highest_layer_idx_plus1[i][j]"); vps->setHighestLayerIdxPlus1(i, j, uiCode);
    28162808      }
     
    28232815    vps->setNumAddLayerSets(0);
    28242816  }
    2825 #endif
    28262817
    28272818  READ_FLAG( uiCode, "vps_sub_layers_max_minus1_present_flag"); vps->setMaxTSLayersPresentFlag(uiCode ? true : false);
     
    29372928    Int layerSetIdxForOutputLayerSet = vps->getOutputLayerSetIdx(i);
    29382929
    2939 #if Q0078_ADD_LAYER_SETS
    29402930    if( i > vps->getVpsNumLayerSetsMinus1() || vps->getDefaultTargetOutputLayerIdc() == 2 )
    2941 #else
    2942     if( i > (vps->getNumLayerSets() - 1) || vps->getDefaultTargetOutputLayerIdc() == 2 )
    2943 #endif
    29442931    {
    29452932      for( j = 0; j < vps->getNumLayersInIdList(layerSetIdxForOutputLayerSet); j++ )
     
    31263113    }
    31273114  }
    3128 
    3129 #if !Q0078_ADD_LAYER_SETS
    3130 #if O0092_0094_DEPENDENCY_CONSTRAINT // Moved up
    3131   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 #endif
    3141 #endif
    31423115
    31433116  READ_UVLC( uiCode,           "vps_non_vui_extension_length"); vps->setVpsNonVuiExtLength((Int)uiCode);
     
    36033576      parseHrdParameters(vps->getBspHrd(i), i==0 ? 1 : vps->getBspCprmsPresentFlag(i), vps->getMaxTLayers()-1);
    36043577    }
    3605 #if Q0078_ADD_LAYER_SETS
    36063578    for (UInt h = 1; h <= vps->getVpsNumLayerSetsMinus1(); h++)
    3607 #else
    3608     for( UInt h = 1; h <= (vps->getNumLayerSets()-1); h++ )
    3609 #endif
    36103579    {
    36113580      READ_UVLC( uiCode, "num_bitstream_partitions[i]"); vps->setNumBitstreamPartitions(h, uiCode);
Note: See TracChangeset for help on using the changeset viewer.