Changeset 665 in SHVCSoftware for branches/SHM-6-dev


Ignore:
Timestamp:
10 Apr 2014, 18:06:20 (11 years ago)
Author:
seregin
Message:

add a check for num_add_output_layer_sets

Location:
branches/SHM-6-dev/source/Lib
Files:
2 edited

Legend:

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

    r664 r665  
    11331133#endif
    11341134#if VPS_TSLAYERS
    1135     READ_FLAG( uiCode, "vps_sub_layers_max_minus1_present_flag"); vps->setMaxTSLayersPresentFlag(uiCode ? true : false);
    1136     if (vps->getMaxTSLayersPresentFlag())
    1137     {
    1138         for(i = 0; i < vps->getMaxLayers(); i++)
    1139         {
    1140             READ_CODE( 3, uiCode, "sub_layers_vps_max_minus1[i]" ); vps->setMaxTSLayersMinus1(i, uiCode);
    1141         }
    1142     }
    1143     else
    1144     {
    1145         for( i = 0; i < vps->getMaxLayers(); i++)
    1146         {
    1147             vps->setMaxTSLayersMinus1(i, vps->getMaxTLayers()-1);
    1148         }
    1149     }
     1135  READ_FLAG( uiCode, "vps_sub_layers_max_minus1_present_flag"); vps->setMaxTSLayersPresentFlag(uiCode ? true : false);
     1136
     1137  if (vps->getMaxTSLayersPresentFlag())
     1138  {
     1139    for(i = 0; i < vps->getMaxLayers(); i++)
     1140    {
     1141      READ_CODE( 3, uiCode, "sub_layers_vps_max_minus1[i]" ); vps->setMaxTSLayersMinus1(i, uiCode);
     1142    }
     1143  }
     1144  else
     1145  {
     1146    for( i = 0; i < vps->getMaxLayers(); i++)
     1147    {
     1148      vps->setMaxTSLayersMinus1(i, vps->getMaxTLayers()-1);
     1149    }
     1150  }
    11501151#endif
    11511152#if N0120_MAX_TID_REF_PRESENT_FLAG
     
    12681269  READ_UVLC( uiCode, "num_add_output_layer_sets" );          vps->setNumAddOutputLayerSets( uiCode );
    12691270#endif
     1271
     1272  // The value of num_add_output_layer_sets shall be in the range of 0 to 1023, inclusive.
     1273  assert( vps->getNumAddOutputLayerSets() >= 0 && vps->getNumAddOutputLayerSets() < 1024 );
     1274
    12701275  Int numOutputLayerSets = vps->getNumLayerSets() + vps->getNumAddOutputLayerSets();
    12711276#endif
  • branches/SHM-6-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r664 r665  
    996996  }
    997997#else
    998   Int numOutputLayerSets = vps->getNumOutputLayerSets() ;
    999   assert( numOutputLayerSets - (Int)vps->getNumLayerSets() >= 0 );
     998  Int numOutputLayerSets = vps->getNumOutputLayerSets();
     999  Int numAddOutputLayerSets = numOutputLayerSets - (Int)vps->getNumLayerSets();
     1000
     1001  // The value of num_add_output_layer_sets shall be in the range of 0 to 1023, inclusive.
     1002  assert( numAddOutputLayerSets >= 0 && numAddOutputLayerSets < 1024 );
    10001003
    10011004#if Q0165_NUM_ADD_OUTPUT_LAYER_SETS
    10021005  if( vps->getNumLayerSets() > 1 )
    10031006  {
    1004     WRITE_UVLC( numOutputLayerSets - vps->getNumLayerSets(), "num_add_output_layer_sets" );
     1007    WRITE_UVLC( numAddOutputLayerSets, "num_add_output_layer_sets" );
    10051008    WRITE_CODE( vps->getDefaultTargetOutputLayerIdc(), 2, "default_target_output_layer_idc" );
    10061009  }
     
    10081011  WRITE_UVLC( numOutputLayerSets - vps->getNumLayerSets(), "num_add_output_layer_sets" );
    10091012#endif
    1010 
    10111013#endif
    10121014
Note: See TracChangeset for help on using the changeset viewer.