Changeset 492 in 3DVCSoftware


Ignore:
Timestamp:
24 Jun 2013, 16:01:58 (11 years ago)
Author:
tech
Message:

Added encoder parameters related to output layers.

Location:
branches/HTM-DEV-0.3-dev0
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-DEV-0.3-dev0/cfg/3D-HEVC/baseCfg_2view+depth.cfg

    r446 r492  
    3030LayerIdInNuh                  : 0           # Layer Id in NAL unit header, (0: no explicit signalling ) (m)
    3131SplittingFlag                 : 0           # Splitting Flag
     32
     33#======== VPS/ Layer sets ================
     34VpsNumLayerSets               : 3           # Number of layer sets   
     35LayerIdsInSet_0               : 0           # LayerIds of Layer set
     36LayerIdsInSet_1               : 0 1         # LayerIds of Layer set
     37LayerIdsInSet_2               : 0 1 2 3     # LayerIds of Layer set
     38
     39DefaultOneTargetOutputLayerFlag: 0           # Output highest layer of layer sets by default
     40OutputLayerSetIdx             : 2            # Indices of layer sets used as additional output layer sets
     41LayerIdsInAddOutputLayerSet_0 : 2 3          # LayerIds of additional output layers
     42ProfileLevelTierIdx           : 0 0 0 0      # Indices to profile level tier (TBD)
    3243
    3344#========== Camera parameters ==========
  • branches/HTM-DEV-0.3-dev0/cfg/3D-HEVC/baseCfg_2view.cfg

    r446 r492  
    2222SplittingFlag                 : 0           # Splitting Flag
    2323
     24#======== VPS/ Layer sets ================
     25VpsNumLayerSets               : 2            # Number of layer sets   
     26LayerIdsInSet_0               : 0            # LayerIds of Layer set
     27LayerIdsInSet_1               : 0 1          # LayerIds of Layer set
     28
     29DefaultOneTargetOutputLayerFlag: 0           # Output highest layer of layer sets by default
     30OutputLayerSetIdx             : 1            # Indices of layer sets used as additional output layer sets
     31LayerIdsInAddOutputLayerSet_0 : 1            # LayerIds of additional output layers
     32ProfileLevelTierIdx           : 0 0          # Indices to profile level tier (TBD)
    2433
    2534#========== Camera parameters ==========
  • branches/HTM-DEV-0.3-dev0/cfg/3D-HEVC/baseCfg_3view+depth.cfg

    r446 r492  
    3030LayerIdInNuh                  : 0           # Layer Id in NAL unit header, (0: no explicit signalling ) (m)
    3131SplittingFlag                 : 0           # Splitting Flag
     32
     33#======== VPS/ Layer sets ================
     34VpsNumLayerSets               : 5           # Number of layer sets   
     35LayerIdsInSet_0               : 0           # LayerIds of Layer set
     36LayerIdsInSet_1               : 0 1         # LayerIds of Layer set
     37LayerIdsInSet_2               : 0 1 2 3     # LayerIds of Layer set
     38LayerIdsInSet_3               : 0 1 4 5     # LayerIds of Layer set
     39LayerIdsInSet_4               : 0 1 2 3 4 5 # LayerIds of Layer set
     40
     41DefaultOneTargetOutputLayerFlag: 0           # Output highest layer of layer sets by default
     42OutputLayerSetIdx             : 2 3          # Indices of layer sets used as additional output layer sets
     43LayerIdsInAddOutputLayerSet_0 : 2 3          # LayerIds of additional output layers
     44LayerIdsInAddOutputLayerSet_1 : 4 5          # LayerIds of additional output layers
     45ProfileLevelTierIdx           : 0 0 0 0 0 0  # Indices to profile level tier (TBD)
    3246
    3347#========== Camera parameters ==========
  • branches/HTM-DEV-0.3-dev0/cfg/3D-HEVC/baseCfg_3view.cfg

    r446 r492  
    2323LayerIdInNuh                  : 0           # Layer Id in NAL unit header, (0: no explicit signalling ) (m)
    2424SplittingFlag                 : 0           # Splitting Flag
     25
     26#======== VPS/ Layer sets ================
     27VpsNumLayerSets               : 4            # Number of layer sets   
     28LayerIdsInSet_0               : 0            # LayerIds of Layer set
     29LayerIdsInSet_1               : 0 1          # LayerIds of Layer set
     30LayerIdsInSet_2               : 0 2          # LayerIds of Layer set
     31LayerIdsInSet_3               : 0 1 2        # LayerIds of Layer set
     32
     33DefaultOneTargetOutputLayerFlag: 0           # Output highest layer of layer sets by default
     34OutputLayerSetIdx             : 1 2          # Indices of layer sets used as additional output layer sets
     35LayerIdsInAddOutputLayerSet_0 : 1            # LayerIds of additional output layers
     36LayerIdsInAddOutputLayerSet_0 : 1            # LayerIds of additional output layers
     37ProfileLevelTierIdx           : 0 0 0 0      # Indices to profile level tier (TBD)
    2538
    2639#========== Camera parameters ==========
  • branches/HTM-DEV-0.3-dev0/cfg/3D-HEVC/fullCfg.cfg

    r446 r492  
    3434LayerIdInNuh                  : 0           # Layer Id in NAL unit header, (0: no explicit signalling ) (m)
    3535SplittingFlag                 : 0           # Splitting Flag
     36
     37#======== VPS/ Layer sets ================
     38VpsNumLayerSets               : 5           # Number of layer sets   
     39LayerIdsInSet_0               : 0           # LayerIds of Layer set
     40LayerIdsInSet_1               : 0 1         # LayerIds of Layer set
     41LayerIdsInSet_2               : 0 1 2 3     # LayerIds of Layer set
     42LayerIdsInSet_3               : 0 1 4 5     # LayerIds of Layer set
     43LayerIdsInSet_4               : 0 1 2 3 4 5 # LayerIds of Layer set
     44
     45DefaultOneTargetOutputLayerFlag: 0           # Output highest layer of layer sets by default
     46OutputLayerSetIdx             : 2 3          # Indices of layer sets used as additional output layer sets
     47LayerIdsInAddOutputLayerSet_0 : 2 3          # LayerIds of additional output layers
     48LayerIdsInAddOutputLayerSet_1 : 4 5          # LayerIds of additional output layers
     49ProfileLevelTierIdx           : 0 0 0 0 0 0  # Indices to profile level tier (TBD)
     50
    3651
    3752#========== Camera parameters ==========
  • branches/HTM-DEV-0.3-dev0/cfg/MV-HEVC/baseCfg_2view.cfg

    r446 r492  
    2121LayerIdInNuh                  : 0           # Layer Id in NAL unit header, (0: no explicit signalling ) (m)
    2222SplittingFlag                 : 0           # Splitting Flag
     23
     24#======== VPS/ Layer sets ================
     25VpsNumLayerSets               : 2            # Number of layer sets   
     26LayerIdsInSet_0               : 0            # LayerIds of Layer set
     27LayerIdsInSet_1               : 0 1          # LayerIds of Layer set
     28
     29DefaultOneTargetOutputLayerFlag: 0           # Output highest layer of layer sets by default
     30OutputLayerSetIdx             : 1            # Indices of layer sets used as additional output layer sets
     31LayerIdsInAddOutputLayerSet_0 : 1            # LayerIds of additional output layers
     32ProfileLevelTierIdx           : 0            # Indices to profile level tier (TBD)
    2333
    2434#======== Unit definition ================
  • branches/HTM-DEV-0.3-dev0/cfg/MV-HEVC/baseCfg_3view.cfg

    r446 r492  
    2323LayerIdInNuh                  : 0           # Layer Id in NAL unit header, (0: no explicit signalling ) (m)
    2424SplittingFlag                 : 0           # Splitting Flag
     25
     26#======== VPS/ Layer sets ================
     27VpsNumLayerSets               : 4            # Number of layer sets   
     28LayerIdsInSet_0               : 0            # LayerIds of Layer set
     29LayerIdsInSet_1               : 0 1          # LayerIds of Layer set
     30LayerIdsInSet_2               : 0 2          # LayerIds of Layer set
     31LayerIdsInSet_3               : 0 1 2        # LayerIds of Layer set
     32
     33DefaultOneTargetOutputLayerFlag: 0           # Output highest layer of layer sets by default
     34OutputLayerSetIdx             : 1 2          # Indices of layer sets used as additional output layer sets
     35LayerIdsInAddOutputLayerSet_0 : 1            # LayerIds of additional output layers
     36LayerIdsInAddOutputLayerSet_1 : 2            # LayerIds of additional output layers
     37ProfileLevelTierIdx           : 0 0 0 0      # Indices to profile level tier (TBD)
    2538
    2639#======== Unit definition ================
  • branches/HTM-DEV-0.3-dev0/cfg/MV-HEVC/fullCfg.cfg

    r446 r492  
    2727LayerIdInNuh                  : 0           # Layer Id in NAL unit header, (0: no explicit signalling ) (m)
    2828SplittingFlag                 : 0           # Splitting Flag
     29
     30#======== VPS/ Layer sets ================
     31VpsNumLayerSets               : 4            # Number of layer sets   
     32LayerIdsInSet_0               : 0            # LayerIds of Layer set
     33LayerIdsInSet_1               : 0 1          # LayerIds of Layer set
     34LayerIdsInSet_2               : 0 2          # LayerIds of Layer set
     35LayerIdsInSet_3               : 0 1 2        # LayerIds of Layer set
     36
     37DefaultOneTargetOutputLayerFlag: 0           # Output highest layer of layer sets by default
     38OutputLayerSetIdx             : 1 2          # Indices of layer sets used as additional output layer sets
     39LayerIdsInAddOutputLayerSet_0 : 1            # LayerIds of additional output layers
     40LayerIdsInAddOutputLayerSet_0 : 1            # LayerIds of additional output layers
     41ProfileLevelTierIdx           : 0 0 0 0      # Indices to profile level tier (TBD)
    2942
    3043#======== Unit definition ================
  • branches/HTM-DEV-0.3-dev0/source/App/TAppEncoder/TAppEncCfg.cpp

    r491 r492  
    392392  ("LayerIdInNuh",          m_layerIdInNuh       , std::vector<Int>(1,0), "LayerId in Nuh")
    393393  ("SplittingFlag",         m_splittingFlag      , false                , "Splitting Flag")   
     394
     395  // Layer Sets + Output Layer Sets + Profile Tier Level
     396  ("VpsNumLayerSets",       m_vpsNumLayerSets    , 1                    , "Number of layer sets")   
     397  ("LayerIdsInSet_%d",      m_layerIdsInSets     , std::vector<Int>(1,0), MAX_VPS_OP_SETS_PLUS1 ,"LayerIds of Layer set") 
     398  ("DefaultOneTargetOutputLayerFlag", m_defaultOneTargetOutputLayerFlag,  false , "Output highest layer of layer sets by default")     
     399  ("OutputLayerSetIdx",     m_outputLayerSetIdx  , std::vector<Int>(1,0), "Indices of layer sets used as additional output layer sets") 
     400  ("LayerIdsInAddOutputLayerSet_%d", m_layerIdsInAddOutputLayerSet      , std::vector<Int>(1,0), MAX_VPS_ADD_OUTPUT_LAYER_SETS, "LayerIds of additional output layers") 
     401  ("ProfileLevelTierIdx",   m_profileLevelTierIdx, std::vector<Int>(1,0), "Indices to profile level tier")
    394402#endif
    395403  ("SourceWidth,-wdt",      m_iSourceWidth,        0, "Source picture width")
     
    12831291  xConfirmPara( m_layerIdInNuh[0] != 0      , "LayerIdInNuh must be 0 for the first layer. ");
    12841292  xConfirmPara( (m_layerIdInNuh.size()!=1) && (m_layerIdInNuh.size() < m_numberOfLayers) , "LayerIdInNuh must be given for all layers. ");
    1285  
     1293
    12861294#if H_3D
    12871295  xConfirmPara( m_scalabilityMask != 1 && m_scalabilityMask != 3, "Scalability Mask must be equal to 1 or 3. ");
     
    12891297  xConfirmPara( m_scalabilityMask != 1 , "Scalability Mask must be equal to 1. ");
    12901298#endif
    1291  
     1299
    12921300  m_dimIds.push_back( m_viewId );
    12931301  const Int viewDimPosition = 0;
     
    12991307  xConfirmPara(  m_dimensionIdLen.size() < m_dimIds.size(), "DimensionIdLen must be given for all dimensions. "   );
    13001308
    1301  for( Int dim = 0; dim < m_dimIds.size(); dim++ )
    1302  {
    1303    xConfirmPara( m_dimIds[dim].size() < m_numberOfLayers,  "DimensionId must be given for all layers and all dimensions. ");   
    1304    xConfirmPara( ( dim != viewDimPosition ) &&  (m_dimIds[dim][0] != 0), "DimensionId of layer 0 must be 0. " );
    1305    xConfirmPara( m_dimensionIdLen[dim] < 1 || m_dimensionIdLen[dim] > 8, "DimensionIdLen must be greater than 0 and less than 9 in all dimensions. " );
    1306    for( Int i = 1; i < m_numberOfLayers; i++ )
    1307    {     
    1308      xConfirmPara(  ( m_dimIds[dim][i] < 0 ) || ( m_dimIds[dim][i] > ( ( 1 << m_dimensionIdLen[dim] ) - 1 ) )   , "DimensionId shall be in the range of 0 to 2^DimensionIdLen - 1. " );
    1309    }
    1310  }
    1311 
    1312  for( Int i = 0; i < m_numberOfLayers; i++ )
    1313  {
    1314    for( Int j = 0; j < i; j++ )
    1315    {     
    1316      Int numDiff  = 0;
    1317      Int lastDiff = -1;
    1318      for( Int dim = 0; dim < m_dimIds.size(); dim++ )
    1319      {
    1320        if ( m_dimIds[dim][i] != m_dimIds[dim][j] )
    1321        {
    1322          numDiff ++;
    1323          lastDiff = dim;
    1324        }
    1325      }
    1326 
    1327      Bool allEqual = ( numDiff == 0 );
    1328 
    1329      if ( allEqual )
    1330      {
    1331        printf( "\nError: Positions of Layers %d and %d are identical in scalability space\n", i, j);
    1332      }
    1333 
    1334      xConfirmPara( allEqual , "Each layer shall have a different position in scalability space." );
    1335 
    1336      if ( numDiff  == 1 )
    1337      {
    1338        Bool inc = m_dimIds[ lastDiff ][ i ] > m_dimIds[ lastDiff ][ j ];
    1339        Bool shallBeButIsNotIncreasing = ( !inc && ( lastDiff != viewDimPosition ) ) ;
    1340        if ( shallBeButIsNotIncreasing )
    1341        {       
    1342          printf( "\nError: Positions of Layers %d and %d is not increasing in dimension %d \n", i, j, lastDiff);       
    1343        }
    1344        xConfirmPara( shallBeButIsNotIncreasing && ( lastDiff != viewDimPosition ),  "DimensionIds shall be increasing within one dimension. " );
    1345      }
    1346    }
    1347  }
    1348 
     1309  for( Int dim = 0; dim < m_dimIds.size(); dim++ )
     1310  {
     1311    xConfirmPara( m_dimIds[dim].size() < m_numberOfLayers,  "DimensionId must be given for all layers and all dimensions. ");   
     1312    xConfirmPara( ( dim != viewDimPosition ) &&  (m_dimIds[dim][0] != 0), "DimensionId of layer 0 must be 0. " );
     1313    xConfirmPara( m_dimensionIdLen[dim] < 1 || m_dimensionIdLen[dim] > 8, "DimensionIdLen must be greater than 0 and less than 9 in all dimensions. " );
     1314    for( Int i = 1; i < m_numberOfLayers; i++ )
     1315    {     
     1316      xConfirmPara(  ( m_dimIds[dim][i] < 0 ) || ( m_dimIds[dim][i] > ( ( 1 << m_dimensionIdLen[dim] ) - 1 ) )   , "DimensionId shall be in the range of 0 to 2^DimensionIdLen - 1. " );
     1317    }
     1318  }
     1319
     1320  for( Int i = 0; i < m_numberOfLayers; i++ )
     1321  {
     1322    for( Int j = 0; j < i; j++ )
     1323    {     
     1324      Int numDiff  = 0;
     1325      Int lastDiff = -1;
     1326      for( Int dim = 0; dim < m_dimIds.size(); dim++ )
     1327      {
     1328        if ( m_dimIds[dim][i] != m_dimIds[dim][j] )
     1329        {
     1330          numDiff ++;
     1331          lastDiff = dim;
     1332        }
     1333      }
     1334
     1335      Bool allEqual = ( numDiff == 0 );
     1336
     1337      if ( allEqual )
     1338      {
     1339        printf( "\nError: Positions of Layers %d and %d are identical in scalability space\n", i, j);
     1340      }
     1341
     1342      xConfirmPara( allEqual , "Each layer shall have a different position in scalability space." );
     1343
     1344      if ( numDiff  == 1 )
     1345      {
     1346        Bool inc = m_dimIds[ lastDiff ][ i ] > m_dimIds[ lastDiff ][ j ];
     1347        Bool shallBeButIsNotIncreasing = ( !inc && ( lastDiff != viewDimPosition ) ) ;
     1348        if ( shallBeButIsNotIncreasing )
     1349        {       
     1350          printf( "\nError: Positions of Layers %d and %d is not increasing in dimension %d \n", i, j, lastDiff);       
     1351        }
     1352        xConfirmPara( shallBeButIsNotIncreasing && ( lastDiff != viewDimPosition ),  "DimensionIds shall be increasing within one dimension. " );
     1353      }
     1354    }
     1355  }
     1356
     1357  /// Layer sets
     1358  xConfirmPara( m_vpsNumLayerSets < 0 || m_vpsNumLayerSets > 1024, "VpsNumLayerSets must be greater than 0 and less than 1025") ;
     1359  for( Int lsIdx = 0; lsIdx < m_vpsNumLayerSets; lsIdx++ )
     1360  {
     1361    if (lsIdx == 0)
     1362    {
     1363      xConfirmPara( m_layerIdsInSets[lsIdx].size() != 1 || m_layerIdsInSets[lsIdx][0] != 0 , "0-th layer shall only include layer 0. ");
     1364    }
     1365    for ( Int i = 0; i < m_layerIdsInSets[lsIdx].size(); i++ )
     1366    {
     1367      xConfirmPara( m_layerIdsInSets[lsIdx][i] < 0 || m_layerIdsInSets[lsIdx].size() >= MAX_NUM_LAYER_IDS, "LayerIdsInSet must be greater than and less than 64" );
     1368    }
     1369  }
     1370
     1371  // Output layer sets
     1372  xConfirmPara( m_outputLayerSetIdx.size() < 0 || m_outputLayerSetIdx.size() > 1024, "The number of output layer set indices must be less than 1025") ;
     1373  for (Int lsIdx = 0; lsIdx < m_outputLayerSetIdx.size(); lsIdx++)
     1374  {   
     1375    Int refLayerSetIdx = m_outputLayerSetIdx[ lsIdx ];
     1376    xConfirmPara(  refLayerSetIdx < 0 || refLayerSetIdx >= m_vpsNumLayerSets, "Output layer set idx must be greater or equal to 0 and less than the VpsNumLayerSets" );
     1377
     1378    for (Int i = 0; i < m_layerIdsInAddOutputLayerSet[ lsIdx ].size(); i++)
     1379    {
     1380      Bool isAlsoInLayerSet = false;
     1381      for (Int j = 0; j < m_layerIdsInSets[ refLayerSetIdx ].size(); j++ )
     1382      {
     1383        if ( m_layerIdsInSets[ refLayerSetIdx ][ j ] == m_layerIdsInAddOutputLayerSet[ lsIdx ][ i ] )
     1384        {
     1385          isAlsoInLayerSet = true;
     1386          break;
     1387        }
     1388        xConfirmPara( !isAlsoInLayerSet, "All output layers must of a output layer set be included in corresponding layer set");
     1389      }
     1390    }
     1391  }
     1392  xConfirmPara( m_profileLevelTierIdx.size() < m_vpsNumLayerSets + m_outputLayerSetIdx.size(), "The number of Profile Level Tier indices must be equal to the number of layer set plus the number of output layer set indices" );
    13491393#endif
    13501394  xConfirmPara( m_iGOPSize < 1 ,                                                            "GOP Size must be greater or equal to 1" );
  • branches/HTM-DEV-0.3-dev0/source/App/TAppEncoder/TAppEncCfg.h

    r488 r492  
    8686  Int                    m_scalabilityMask;                   ///< Mask indicating scalabilities, 1: texture; 3: texture + depth                                                               
    8787  std::vector<Int>       m_dimensionIdLen;                    ///< Length of scalability dimension s
     88
     89  // layer sets
     90  Int                    m_vpsNumLayerSets;                   ///< Number of layer sets
     91  std::vector< std::vector<Int> > m_layerIdsInSets;           ///< LayerIds of Layer set
     92  Bool                   m_defaultOneTargetOutputLayerFlag;   ///< Output highest layer of layer sets by default
     93  Int                    numAddOuputLayerSets;              ///< Number of additional output layer sets
     94  std::vector<Int>       m_outputLayerSetIdx;                 ///< Indices of layer sets used as additional output layer sets 
     95  std::vector< std::vector<Int> > m_layerIdsInAddOutputLayerSet; ///< LayerIds of additional output layers 
     96  std::vector<Int>       m_profileLevelTierIdx;               ///< Indices of of profile level tier
     97
    8898#endif
    8999  Double    m_adLambdaModifier[ MAX_TLAYER ];                 ///< Lambda modifier array for each temporal layer
  • branches/HTM-DEV-0.3-dev0/source/App/TAppEncoder/TAppEncTop.cpp

    r490 r492  
    119119  xSetDimensionIdAndLength ( vps );
    120120  xSetDirectDependencyFlags( vps );
     121  xSetLayerSets            ( vps );
    121122#if H_3D
    122123  vps.initViewIndex();
     
    10311032  return maxVec;
    10321033}
     1034
     1035Void TAppEncTop::xSetLayerSets( TComVPS& vps )
     1036{   
     1037  // Layer sets
     1038  vps.setVpsNumLayerSetsMinus1   ( m_vpsNumLayerSets );
     1039  vps.setVpsNumberLayerSetsMinus1( m_vpsNumLayerSets );
     1040   
     1041  for (Int lsIdx = 0; lsIdx < m_vpsNumLayerSets; lsIdx++ )
     1042  {
     1043    for( Int layerId = 0; layerId < MAX_NUM_LAYER_IDS; layerId++ )
     1044    {
     1045      vps.setLayerIdIncludedFlag( false, lsIdx, layerId );
     1046    }
     1047    for ( Int i = 0; i < m_layerIdsInSets[lsIdx].size(); i++)
     1048    {
     1049      vps.setLayerIdIncludedFlag( true, lsIdx, m_layerIdsInSets[lsIdx][i] );
     1050    }
     1051  }
     1052
     1053  Int numAddOuputLayerSets = m_outputLayerSetIdx.size();
     1054  // Additional output layer sets + profileLevelTierIdx
     1055  vps.setDefaultOneTargetOutputLayerFlag   ( m_defaultOneTargetOutputLayerFlag );
     1056  vps.setMoreOutputLayerSetsThanDefaultFlag( numAddOuputLayerSets       != 0 );   
     1057  vps.setNumAddOutputLayerSetsMinus1       ( numAddOuputLayerSets - 1        );
     1058
     1059  for (Int lsIdx = 1; lsIdx < m_vpsNumLayerSets; lsIdx++)
     1060  {
     1061    vps.setProfileLevelTierIdx( lsIdx, m_profileLevelTierIdx[ lsIdx ] );
     1062  }
     1063
     1064  for (Int addOutLs = 0; addOutLs < numAddOuputLayerSets; addOutLs++ )
     1065  {
     1066    vps.setProfileLevelTierIdx( m_vpsNumLayerSets + addOutLs, m_profileLevelTierIdx[ addOutLs ] );
     1067
     1068    Int refLayerSetIdx = m_outputLayerSetIdx[ addOutLs ];     
     1069    vps.setOutputLayerSetIdxMinus1( m_vpsNumLayerSets + addOutLs, refLayerSetIdx - 1 );
     1070
     1071    for (Int i = 0; i < m_layerIdsInSets[ refLayerSetIdx].size(); i++ )
     1072    {
     1073      Bool outputLayerFlag = false;
     1074      for (Int j = 0; j < m_layerIdsInAddOutputLayerSet[ addOutLs ].size(); j++ )
     1075      {
     1076        if (  m_layerIdsInAddOutputLayerSet[addOutLs][ j ] == m_layerIdsInSets[ refLayerSetIdx][ i ] )
     1077        {
     1078          outputLayerFlag = true;
     1079          break;
     1080        }
     1081      }
     1082      vps.setOutputLayerFlag( m_vpsNumLayerSets + addOutLs, i, outputLayerFlag );       
     1083    }
     1084  }
     1085}
    10331086#endif
    10341087//! \}
  • branches/HTM-DEV-0.3-dev0/source/App/TAppEncoder/TAppEncTop.h

    r446 r492  
    119119  Void xSetDimensionIdAndLength   ( TComVPS& vps );
    120120  Void xSetDirectDependencyFlags  ( TComVPS& vps );
     121  Void xSetLayerSets( TComVPS& vps );
    121122  Int  xGetMax( std::vector<Int>& vec);
    122123#endif
     
    130131#else
    131132  TEncTop&    getTEncTop  ()   { return  m_cTEncTop; }      ///< return encoder class pointer reference
     133 
    132134#endif
    133135};// END CLASS DEFINITION TAppEncTop
  • branches/HTM-DEV-0.3-dev0/source/Lib/TLibCommon/TComSlice.h

    r491 r492  
    494494  UInt*       m_hrdOpSetIdx;
    495495  Bool*       m_cprmsPresentFlag;
    496   UInt        m_numOpSets;
    497 #if H_MV
     496 
     497#if H_MV
     498  UInt        m_vpsNumLayerSetsMinus1;
    498499  Bool        m_layerIdIncludedFlag[MAX_VPS_OP_SETS_PLUS1][MAX_VPS_NUH_LAYER_ID_PLUS1];
    499500#else
     501  UInt        m_numOpSets;
    500502  Bool        m_layerIdIncludedFlag[MAX_VPS_OP_SETS_PLUS1][MAX_VPS_NUH_RESERVED_ZERO_LAYER_ID_PLUS1];
    501503#endif
     
    607609  UInt    getVpsMaxLayerId()                                    { return m_maxLayerId; }
    608610  Void    setVpsMaxLayerId(UInt v)                              { m_maxLayerId = v;    }
     611
     612  UInt    getVpsNumLayerSetsMinus1()                            { return m_vpsNumLayerSetsMinus1; }
     613  Void    setVpsNumLayerSetsMinus1(UInt v)                      { m_vpsNumLayerSetsMinus1 = v;    }
    609614#else
    610615  UInt    getMaxNuhReservedZeroLayerId()                        { return m_maxNuhReservedZeroLayerId; }
    611616  Void    setMaxNuhReservedZeroLayerId(UInt v)                  { m_maxNuhReservedZeroLayerId = v;    }
    612 #endif
    613617
    614618  UInt    getMaxOpSets()                                        { return m_numOpSets; }
    615619  Void    setMaxOpSets(UInt v)                                  { m_numOpSets = v;    }
     620#endif
     621
    616622  Bool    getLayerIdIncludedFlag(UInt opsIdx, UInt id)          { return m_layerIdIncludedFlag[opsIdx][id]; }
    617623  Void    setLayerIdIncludedFlag(Bool v, UInt opsIdx, UInt id)  { m_layerIdIncludedFlag[opsIdx][id] = v;    }
     
    729735  {
    730736    assert( lsIdx >= 0 );
    731     assert( lsIdx < getMaxOpSets() );
     737    assert( lsIdx <= getVpsNumLayerSetsMinus1() );
    732738    Int numLayersInIdList = 0;
    733739    for (Int layerId = 0; layerId < getVpsMaxLayerId(); layerId++ )
  • branches/HTM-DEV-0.3-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r490 r492  
    840840  assert( pcVPS->getVpsMaxLayerId() < MAX_VPS_NUH_LAYER_ID_PLUS1 );
    841841  READ_CODE( 6, uiCode, "vps_max_nuh_layer_id" );   pcVPS->setVpsMaxLayerId( uiCode );
     842
     843  READ_UVLC(    uiCode, "vps_max_num_layer_sets_minus1" );               pcVPS->setVpsNumLayerSetsMinus1( uiCode );
     844  for( UInt opsIdx = 1; opsIdx <= pcVPS->getVpsNumLayerSetsMinus1(); opsIdx ++ )
     845  {
     846    for( UInt i = 0; i <= pcVPS->getVpsMaxLayerId(); i ++ )
    842847#else
    843848  assert( pcVPS->getMaxNuhReservedZeroLayerId() < MAX_VPS_NUH_RESERVED_ZERO_LAYER_ID_PLUS1 );
    844849  READ_CODE( 6, uiCode, "vps_max_nuh_reserved_zero_layer_id" );   pcVPS->setMaxNuhReservedZeroLayerId( uiCode );
    845 #endif
     850
    846851  READ_UVLC(    uiCode, "vps_max_op_sets_minus1" );               pcVPS->setMaxOpSets( uiCode + 1 );
    847852  for( UInt opsIdx = 1; opsIdx <= ( pcVPS->getMaxOpSets() - 1 ); opsIdx ++ )
    848853  {
    849854    // Operation point set
    850 #if H_MV
    851     for( UInt i = 0; i <= pcVPS->getVpsMaxLayerId(); i ++ )
    852 #else
    853855    for( UInt i = 0; i <= pcVPS->getMaxNuhReservedZeroLayerId(); i ++ )
    854856#endif
     
    948950    READ_CODE( 6,  uiCode, "vps_num_profile_tier_level_minus1" );  pcVPS->setVpsNumProfileTierLevelMinus1( uiCode );
    949951
    950     for( Int i = 1; i <= pcVPS->getMaxOpSets() - 1; i++ )
     952    for( Int i = 1; i <= pcVPS->getVpsNumberLayerSetsMinus1(); i++ )
    951953    {
    952954      READ_FLAG(  uiCode, "vps_profile_present_flag[i]" );    pcVPS->setVpsProfilePresentFlag( i, uiCode == 1 );
  • branches/HTM-DEV-0.3-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp

    r490 r492  
    649649#if H_MV
    650650  assert( pcVPS->getVpsMaxLayerId() < MAX_VPS_NUH_LAYER_ID_PLUS1 );
    651   WRITE_CODE( pcVPS->getVpsMaxLayerId(), 6,                 "vps_max_layer_id" );
     651  WRITE_CODE( pcVPS->getVpsMaxLayerId(), 6,                 "vps_max_layer_id" ); 
     652 
     653  WRITE_UVLC( pcVPS->getVpsNumLayerSetsMinus1(),  "vps_max_num_layer_sets_minus1" );
     654  for( UInt opsIdx = 1; opsIdx <= pcVPS->getVpsNumLayerSetsMinus1(); opsIdx ++ )
     655  {
     656    // Operation point set
     657    for( UInt i = 0; i <= pcVPS->getVpsMaxLayerId(); i ++ )
    652658#else
    653659  assert( pcVPS->getMaxNuhReservedZeroLayerId() < MAX_VPS_NUH_RESERVED_ZERO_LAYER_ID_PLUS1 );
    654660  WRITE_CODE( pcVPS->getMaxNuhReservedZeroLayerId(), 6,     "vps_max_nuh_reserved_zero_layer_id" );
    655 #endif
     661
    656662  pcVPS->setMaxOpSets(1);
    657663  WRITE_UVLC( pcVPS->getMaxOpSets() - 1,                    "vps_max_op_sets_minus1" );
     
    659665  {
    660666    // Operation point set
    661 #if H_MV
    662     for( UInt i = 0; i <= pcVPS->getVpsMaxLayerId(); i ++ )
    663 #else
    664667    for( UInt i = 0; i <= pcVPS->getMaxNuhReservedZeroLayerId(); i ++ )
    665668#endif
Note: See TracChangeset for help on using the changeset viewer.