Changeset 1328 in 3DVCSoftware for branches/HTM-15.1-dev0/source/App/TAppEncoder


Ignore:
Timestamp:
14 Sep 2015, 19:41:29 (9 years ago)
Author:
tech
Message:

Integrated general SEI changes and following SEIs:

  • Multiview view position SEI
  • Multiview acquisition information SEI
  • Multiview scene information SEI
  • Inter-layer constrained tile sets SEI
Location:
branches/HTM-15.1-dev0/source/App/TAppEncoder
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-15.1-dev0/source/App/TAppEncoder/TAppEncCfg.cpp

    r1313 r1328  
    223223}
    224224
     225
     226#if NH_MV_SEI
     227Void TAppEncCfg::xParseSeiCfg()
     228{
     229  for (Int i = 0; i < MAX_NUM_SEIS; i++)
     230  {
     231    if ( m_seiCfgFileNames[i] != NULL )
     232    {
     233      Int payloadType;
     234      po::Options opts;     
     235     
     236      opts.addOptions()("PayloadType", payloadType,-1, "Payload Type");
     237      po::setDefaults(opts);     
     238
     239      po::ErrorReporter err;
     240      err.output_on_unknow_parameter = false;
     241      po::parseConfigFile( opts, m_seiCfgFileNames[i], err );
     242      SEI* sei = SEI::getNewSEIMessage( (SEI::PayloadType) payloadType );
     243      assert( sei != NULL );
     244
     245      sei->setupFromCfgFile( m_seiCfgFileNames[i] );
     246
     247      m_seiMessages.push_back( sei );
     248    }
     249  }
     250}
     251#endif
     252
    225253std::istringstream &operator>>(std::istringstream &in, GOPEntry &entry)     //input
    226254{
     
    854882#endif 
    855883  ("DimensionIdLen",        m_dimensionIdLen     , cfg_dimensionLength  , "Number of bits used to store dimensions Id")
    856   ("ViewOrderIndex",        m_viewOrderIndex     , std::vector<Int>(1,0), "View Order Index per layer")
    857   ("ViewId",                m_viewId             , std::vector<Int>(1,0), "View Id per View Order Index")
    858   ("AuxId",                 m_auxId              , std::vector<Int>(1,0), "AuxId per layer")
     884  ("ViewOrderIndex",                 m_viewOrderIndex              , IntAry1d(1,0),                                "View Order Index per layer")
     885  ("ViewId",                         m_viewId                      , IntAry1d(1,0),                                "View Id per View Order Index")
     886  ("AuxId",                          m_auxId                       , IntAry1d(1,0),                                "AuxId per layer")
    859887#if NH_3D
    860   ("DepthFlag",             m_depthFlag          , std::vector<Int>(1,0), "Depth Flag")
    861 #endif
    862   ("TargetEncLayerIdList",  m_targetEncLayerIdList, std::vector<Int>(0,0), "LayerIds in Nuh to be encoded") 
    863   ("LayerIdInNuh",          m_layerIdInNuh        , std::vector<Int>(1,0), "LayerId in Nuh") 
     888  ("DepthFlag",                      m_depthFlag                   , IntAry1d(1,0),                                "Depth Flag")
     889#endif
     890  ("TargetEncLayerIdList",           m_targetEncLayerIdList        , IntAry1d(0,0),                                "LayerIds in Nuh to be encoded") 
     891  ("LayerIdInNuh",                   m_layerIdInNuh                , IntAry1d(1,0),                                "LayerId in Nuh") 
    864892  ("SplittingFlag",         m_splittingFlag       , false                , "Splitting Flag")   
    865893
    866894  // Layer Sets + Output Layer Sets + Profile Tier Level
    867895  ("VpsNumLayerSets",       m_vpsNumLayerSets    , 1                    , "Number of layer sets")   
    868   ("LayerIdsInSet_%d",      m_layerIdsInSets     , std::vector<Int>(1,0), MAX_VPS_OP_SETS_PLUS1 ,"LayerIds of Layer set") 
     896  ("LayerIdsInSet_%d"              , m_layerIdsInSets              , IntAry1d(1,0) , MAX_VPS_OP_SETS_PLUS1      ,   "LayerIds of Layer set") 
    869897  ("NumAddLayerSets"     , m_numAddLayerSets     , 0                                              , "NumAddLayerSets     ")
    870   ("HighestLayerIdxPlus1_%d", m_highestLayerIdxPlus1, std::vector< Int  >(0,0)  ,MAX_VPS_NUM_ADD_LAYER_SETS, "HighestLayerIdxPlus1")
     898  ("HighestLayerIdxPlus1_%d"       , m_highestLayerIdxPlus1        , IntAry1d(0,0) , MAX_VPS_NUM_ADD_LAYER_SETS ,  "HighestLayerIdxPlus1")
    871899  ("DefaultTargetOutputLayerIdc"     , m_defaultOutputLayerIdc     , 0, "Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet")
    872   ("OutputLayerSetIdx",     m_outputLayerSetIdx  , std::vector<Int>(0,0), "Indices of layer sets used as additional output layer sets") 
    873 
    874   ("LayerIdsInAddOutputLayerSet_%d", m_layerIdsInAddOutputLayerSet      , std::vector<Int>(0,0), MAX_VPS_ADD_OUTPUT_LAYER_SETS, "Indices in VPS of output layers in additional output layer set") 
    875   ("LayerIdsInDefOutputLayerSet_%d", m_layerIdsInDefOutputLayerSet      , std::vector<Int>(0,0), MAX_VPS_OP_SETS_PLUS1, "Indices in VPS of output layers in layer set") 
    876   ("AltOutputLayerFlag",    m_altOutputLayerFlag , std::vector<Bool>(1,0), "Alt output layer flag")
     900  ("OutputLayerSetIdx"             , m_outputLayerSetIdx           , IntAry1d(0,0)                              ,   "Indices of layer sets used as additional output layer sets")
     901  ("LayerIdsInAddOutputLayerSet_%d", m_layerIdsInAddOutputLayerSet , IntAry1d(0,0) , MAX_VPS_ADD_OUTPUT_LAYER_SETS, "Indices in VPS of output layers in additional output layer set") 
     902  ("LayerIdsInDefOutputLayerSet_%d", m_layerIdsInDefOutputLayerSet , IntAry1d(0,0) , MAX_VPS_OP_SETS_PLUS1,         "Indices in VPS of output layers in layer set") 
     903  ("AltOutputLayerFlag"            , m_altOutputLayerFlag          , BoolAry1d(1,0),                                "Alt output layer flag")
    877904 
    878   ("ProfileTierLevelIdx_%d",  m_profileTierLevelIdx, std::vector<Int>(0), MAX_NUM_LAYERS, "Indices to profile level tier for ols")
     905  ("ProfileTierLevelIdx_%d"        , m_profileTierLevelIdx         , IntAry1d(0)  , MAX_NUM_LAYERS,                  "Indices to profile level tier for ols")
    879906  // Layer dependencies
    880   ("DirectRefLayers_%d",    m_directRefLayers    , std::vector<Int>(0,0), MAX_NUM_LAYERS, "LayerIdx in VPS of direct reference layers")
    881   ("DependencyTypes_%d",    m_dependencyTypes    , std::vector<Int>(0,0), MAX_NUM_LAYERS, "Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion")
     907  ("DirectRefLayers_%d"            , m_directRefLayers             , IntAry1d(0,0), MAX_NUM_LAYERS,                  "LayerIdx in VPS of direct reference layers")
     908  ("DependencyTypes_%d"            , m_dependencyTypes             , IntAry1d(0,0), MAX_NUM_LAYERS,                  "Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion")
    882909#endif
    883910  ("SourceWidth,-wdt",                                m_iSourceWidth,                                       0, "Source picture width")
     
    11431170  ("BitRatePresentFlag"          , m_bitRatePresentFlag          , BoolAry1d(1,0)  ,MAX_VPS_OP_SETS_PLUS1, "BitRatePresentFlag per sub layer for the N-th layer set")
    11441171  ("PicRatePresentFlag"          , m_picRatePresentFlag          , BoolAry1d(1,0)  ,MAX_VPS_OP_SETS_PLUS1, "PicRatePresentFlag per sub layer for the N-th layer set")
    1145   ("AvgBitRate"                  , m_avgBitRate                  , std::vector< Int  >(1,0)  ,MAX_VPS_OP_SETS_PLUS1, "AvgBitRate         per sub layer for the N-th layer set")
    1146   ("MaxBitRate"                  , m_maxBitRate                  , std::vector< Int  >(1,0)  ,MAX_VPS_OP_SETS_PLUS1, "MaxBitRate         per sub layer for the N-th layer set")
    1147   ("ConstantPicRateIdc"          , m_constantPicRateIdc          , std::vector< Int  >(1,0)  ,MAX_VPS_OP_SETS_PLUS1, "ConstantPicRateIdc per sub layer for the N-th layer set")
    1148   ("AvgPicRate"                  , m_avgPicRate                  , std::vector< Int  >(1,0)  ,MAX_VPS_OP_SETS_PLUS1, "AvgPicRate         per sub layer for the N-th layer set")
     1172  ("AvgBitRate"                  , m_avgBitRate                   , IntAry1d (1,0), MAX_VPS_OP_SETS_PLUS1, "AvgBitRate         per sub layer for the N-th layer set")
     1173  ("MaxBitRate"                  , m_maxBitRate                   , IntAry1d (1,0), MAX_VPS_OP_SETS_PLUS1, "MaxBitRate         per sub layer for the N-th layer set")
     1174  ("ConstantPicRateIdc"          , m_constantPicRateIdc           , IntAry1d (1,0), MAX_VPS_OP_SETS_PLUS1, "ConstantPicRateIdc per sub layer for the N-th layer set")
     1175  ("AvgPicRate"                  , m_avgPicRate                   , IntAry1d (1,0), MAX_VPS_OP_SETS_PLUS1, "AvgPicRate         per sub layer for the N-th layer set")
    11491176  ("TilesNotInUseFlag"            , m_tilesNotInUseFlag            , true                                          , "TilesNotInUseFlag            ")
    11501177  ("TilesInUseFlag"               , m_tilesInUseFlag               , BoolAry1d(1,false)                   , "TilesInUseFlag               ")
     
    11541181  ("TileBoundariesAlignedFlag"   , m_tileBoundariesAlignedFlag   , BoolAry1d(1,0)  ,MAX_NUM_LAYERS       , "TileBoundariesAlignedFlag    per direct reference for the N-th layer")
    11551182  ("IlpRestrictedRefLayersFlag"  , m_ilpRestrictedRefLayersFlag  , false                                           , "IlpRestrictedRefLayersFlag")
    1156   ("MinSpatialSegmentOffsetPlus1", m_minSpatialSegmentOffsetPlus1, std::vector< Int  >(1,0)  ,MAX_NUM_LAYERS       , "MinSpatialSegmentOffsetPlus1 per direct reference for the N-th layer")
     1183  ("MinSpatialSegmentOffsetPlus1", m_minSpatialSegmentOffsetPlus1 , IntAry1d (1,0), MAX_NUM_LAYERS       , "MinSpatialSegmentOffsetPlus1 per direct reference for the N-th layer")
    11571184  ("CtuBasedOffsetEnabledFlag"   , m_ctuBasedOffsetEnabledFlag   , BoolAry1d(1,0)  ,MAX_NUM_LAYERS       , "CtuBasedOffsetEnabledFlag    per direct reference for the N-th layer")
    1158   ("MinHorizontalCtuOffsetPlus1" , m_minHorizontalCtuOffsetPlus1 , std::vector< Int  >(1,0)  ,MAX_NUM_LAYERS       , "MinHorizontalCtuOffsetPlus1  per direct reference for the N-th layer")
     1185  ("MinHorizontalCtuOffsetPlus1" , m_minHorizontalCtuOffsetPlus1  , IntAry1d (1,0), MAX_NUM_LAYERS       , "MinHorizontalCtuOffsetPlus1  per direct reference for the N-th layer")
    11591186  ("SingleLayerForNonIrapFlag", m_singleLayerForNonIrapFlag, false                                          , "SingleLayerForNonIrapFlag")
    11601187  ("HigherLayerIrapSkipFlag"  , m_higherLayerIrapSkipFlag  , false                                          , "HigherLayerIrapSkipFlag  ")
     
    13051332  ("SEIMasteringDisplayWhitePoint",                   cfg_DisplayWhitePointCode,     cfg_DisplayWhitePointCode, "Mastering display white point CIE xy coordinates in normalised increments of 1/50000 (e.g. 0.333 = 16667)")
    13061333#if NH_MV
     1334#if !NH_MV_SEI
    13071335  ("SubBitstreamPropSEIEnabled",                      m_subBistreamPropSEIEnabled,    false                     ,"Enable signaling of sub-bitstream property SEI message")
    13081336  ("SEISubBitstreamNumAdditionalSubStreams",          m_sbPropNumAdditionalSubStreams,0                         ,"Number of substreams for which additional information is signalled")
    1309   ("SEISubBitstreamSubBitstreamMode",                 m_sbPropSubBitstreamMode,       std::vector< Int  >(1,0)  ,"Specifies mode of generation of the i-th sub-bitstream (0 or 1)")
    1310   ("SEISubBitstreamOutputLayerSetIdxToVps",           m_sbPropOutputLayerSetIdxToVps, std::vector< Int  >(1,0)  ,"Specifies output layer set index of the i-th sub-bitstream ")
    1311   ("SEISubBitstreamHighestSublayerId",                m_sbPropHighestSublayerId,      std::vector< Int  >(1,0)  ,"Specifies highest TemporalId of the i-th sub-bitstream")
    1312   ("SEISubBitstreamAvgBitRate",                       m_sbPropAvgBitRate,             std::vector< Int  >(1,0)  ,"Specifies average bit rate of the i-th sub-bitstream")
    1313   ("SEISubBitstreamMaxBitRate",                       m_sbPropMaxBitRate,             std::vector< Int  >(1,0)  ,"Specifies maximum bit rate of the i-th sub-bitstream")
    1314 
     1337  ("SEISubBitstreamSubBitstreamMode",                 m_sbPropSubBitstreamMode,       IntAry1d (1,0)            ,"Specifies mode of generation of the i-th sub-bitstream (0 or 1)")
     1338  ("SEISubBitstreamOutputLayerSetIdxToVps",           m_sbPropOutputLayerSetIdxToVps, IntAry1d (1,0)            ,"Specifies output layer set index of the i-th sub-bitstream ")
     1339  ("SEISubBitstreamHighestSublayerId",                m_sbPropHighestSublayerId,      IntAry1d (1,0)            ,"Specifies highest TemporalId of the i-th sub-bitstream")
     1340  ("SEISubBitstreamAvgBitRate",                       m_sbPropAvgBitRate,             IntAry1d (1,0)            ,"Specifies average bit rate of the i-th sub-bitstream")
     1341  ("SEISubBitstreamMaxBitRate",                       m_sbPropMaxBitRate,             IntAry1d (1,0)            ,"Specifies maximum bit rate of the i-th sub-bitstream")
     1342#else
     1343  ("SeiCfgFileName_%d",                               m_seiCfgFileNames,             (Char *) 0 , MAX_NUM_SEIS , "SEI cfg file name %d")
     1344#endif
    13151345  ("OutputVpsInfo",                                   m_outputVpsInfo,                false                     ,"Output information about the layer dependencies and layer sets")
    13161346#endif
     
    19231953  }
    19241954
     1955#if NH_MV_SEI
     1956  xParseSeiCfg();
     1957#endif
    19251958  if( m_masteringDisplay.colourVolumeSEIEnabled )
    19261959  {
     
    32953328  }
    32963329  }
     3330#if !NH_MV_SEI
    32973331  // Check input parameters for Sub-bitstream property SEI message
    32983332  if( m_subBistreamPropSEIEnabled )
     
    33123346    }
    33133347  }
     3348#endif
    33143349#endif
    33153350
  • branches/HTM-15.1-dev0/source/App/TAppEncoder/TAppEncCfg.h

    r1313 r1328  
    7777// VPS specification
    7878  IntAry2d m_dimIds;                   ///< dimension ids ( pointers to m_viewId and m_depthFlag
    79   std::vector<Int>       m_viewId;                            ///< view id
    80   std::vector<Int>       m_viewOrderIndex;                    ///< view order index 
    81   std::vector<Int>       m_auxId;                             ///< auxiliary id
     79  IntAry1d               m_viewId;                            ///< view id
     80  IntAry1d               m_viewOrderIndex;                    ///< view order index 
     81  IntAry1d               m_auxId;                             ///< auxiliary id
    8282#if NH_3D
    83   std::vector<Int>       m_depthFlag;                         ///< depth flag
    84 #endif
    85   std::vector<Int>       m_targetEncLayerIdList;              ///< layer Ids in Nuh to be encoded
    86   std::vector<Int>       m_layerIdInNuh;                      ///< layer Id in Nuh for each layer
     83  IntAry1d               m_depthFlag;                         ///< depth flag
     84#endif
     85  IntAry1d               m_targetEncLayerIdList;              ///< layer Ids in Nuh to be encoded
     86  IntAry1d               m_layerIdInNuh;                      ///< layer Id in Nuh for each layer
    8787  Bool                   m_splittingFlag;                     ///< Splitting Flag
    8888  Int                    m_scalabilityMask;                   ///< Mask indicating scalabilities, 1: texture; 3: texture + depth                                                               
    89   std::vector<Int>       m_dimensionIdLen;                    ///< Length of scalability dimension s
     89  IntAry1d               m_dimensionIdLen;                    ///< Length of scalability dimension s
    9090 
    9191// layer sets   
     
    9595  IntAry2d m_highestLayerIdxPlus1;      ///< HighestLayerIdxPlus1 for each additional layer set and each independent layer (value with index 0 will be ignored)
    9696  Int                    m_defaultOutputLayerIdc;             ///< Specifies output layers of layer sets, 0: output all layers, 1: output highest layers, 2: specified by LayerIdsInDefOuputLayerSet
    97   std::vector<Int>       m_outputLayerSetIdx;                 ///< Indices of layer sets used as additional output layer sets 
     97  IntAry1d               m_outputLayerSetIdx;                 ///< Indices of layer sets used as additional output layer sets 
    9898  IntAry2d m_layerIdsInAddOutputLayerSet; ///< LayerIds in vps of additional output layers
    9999  IntAry2d m_layerIdsInDefOutputLayerSet; ///< Indices in vps of output layers in layer sets
    100100  IntAry2d               m_profileTierLevelIdx;      ///< Indices of of profile, per layer in layer set
    101   std::vector<Bool>      m_altOutputLayerFlag;                ///< Alt output layer flag
     101  BoolAry1d              m_altOutputLayerFlag;                ///< Alt output layer flag
    102102
    103103  // Dependencies
     
    112112  Bool m_bitRatePresentVpsFlag;
    113113  Bool m_picRatePresentVpsFlag;
    114   std::vector< std::vector<Bool > > m_bitRatePresentFlag;
    115   std::vector< std::vector<Bool > > m_picRatePresentFlag;
    116   std::vector< std::vector<Int  > > m_avgBitRate;
    117   std::vector< std::vector<Int  > > m_maxBitRate;
    118   std::vector< std::vector<Int  > > m_constantPicRateIdc;
    119   std::vector< std::vector<Int  > > m_avgPicRate;
     114  BoolAry2d              m_bitRatePresentFlag;
     115  BoolAry2d              m_picRatePresentFlag;
     116  IntAry2d              m_avgBitRate;
     117  IntAry2d              m_maxBitRate;
     118  IntAry2d              m_constantPicRateIdc;
     119  IntAry2d              m_avgPicRate;
    120120  Bool                              m_tilesNotInUseFlag;
    121121  BoolAry1d               m_tilesInUseFlag;
     
    124124  BoolAry1d               m_wppInUseFlag;
    125125
    126   std::vector< std::vector<Bool > > m_tileBoundariesAlignedFlag; 
     126  BoolAry2d              m_tileBoundariesAlignedFlag; 
    127127  Bool m_ilpRestrictedRefLayersFlag;
    128   std::vector< std::vector<Int  > > m_minSpatialSegmentOffsetPlus1;
    129   std::vector< std::vector<Bool > > m_ctuBasedOffsetEnabledFlag;
    130   std::vector< std::vector<Int  > > m_minHorizontalCtuOffsetPlus1;
     128  IntAry2d              m_minSpatialSegmentOffsetPlus1;
     129  BoolAry2d              m_ctuBasedOffsetEnabledFlag;
     130  IntAry2d              m_minHorizontalCtuOffsetPlus1;
    131131  Bool m_singleLayerForNonIrapFlag;
    132132  Bool m_higherLayerIrapSkipFlag;
     
    195195  // coding structure
    196196#if NH_MV
    197   std::vector<Int> m_iIntraPeriod;                            ///< period of I-slice (random access period)
     197  IntAry1d m_iIntraPeriod;                            ///< period of I-slice (random access period)
    198198#else
    199199  Int       m_iIntraPeriod;                                   ///< period of I-slice (random access period)
     
    256256#endif
    257257  TComSEIMasteringDisplay m_masteringDisplay;
     258#if NH_MV_SEI
     259  std::vector<char*>     m_seiCfgFileNames;               ///< SEI message files.
     260  SEIMessages            m_seiMessages;                       ///< Buffer for SEI messages.
     261#endif
    258262
    259263  Bool      m_bUseAdaptiveQP;                                 ///< Flag for enabling QP adaptation based on a psycho-visual model
     
    509513  UInt        m_summaryVerboseness;                           ///< Specifies the level of the verboseness of the text output.
    510514#if NH_MV
     515#if !NH_MV_SEI
    511516  Bool              m_subBistreamPropSEIEnabled;
    512517  Int               m_sbPropNumAdditionalSubStreams;
    513   std::vector<Int>  m_sbPropSubBitstreamMode;
    514   std::vector<Int>  m_sbPropOutputLayerSetIdxToVps;
    515   std::vector<Int>  m_sbPropHighestSublayerId;
    516   std::vector<Int>  m_sbPropAvgBitRate;
    517   std::vector<Int>  m_sbPropMaxBitRate;
     518  IntAry1d          m_sbPropSubBitstreamMode;
     519  IntAry1d          m_sbPropOutputLayerSetIdxToVps;
     520  IntAry1d          m_sbPropHighestSublayerId;
     521  IntAry1d          m_sbPropAvgBitRate;
     522  IntAry1d          m_sbPropMaxBitRate;
     523#endif
    518524  Bool              m_outputVpsInfo;
    519525#endif
     
    654660  Void xPrintVectorElem( Double elem ) { printf(" %5.2f", elem            );}; 
    655661  Void xPrintVectorElem( Bool   elem ) { printf(" %d"   , ( elem ? 1 : 0 ));};
     662#if NH_MV_SEI
     663  Void xParseSeiCfg();
     664#endif
    656665#endif
    657666#if NH_MV
  • branches/HTM-15.1-dev0/source/App/TAppEncoder/TAppEncTop.cpp

    r1321 r1328  
    591591  m_cTEncTop.setScalableNestingSEIEnabled                         ( m_scalableNestingSEIEnabled );
    592592#if NH_MV
     593#if !NH_MV_SEI
    593594  m_cTEncTop.setSubBitstreamPropSEIEnabled                        ( m_subBistreamPropSEIEnabled );
    594595  if( m_subBistreamPropSEIEnabled )                               
     
    601602    m_cTEncTop.setMaxBitRate                                      ( m_sbPropMaxBitRate );
    602603  }
     604#endif
    603605#endif
    604606
     
    622624  m_cTEncTop.setKneeSEIOutputKneePoint                            ( m_kneeSEIOutputKneePoint );
    623625  m_cTEncTop.setMasteringDisplaySEI                               ( m_masteringDisplay );
     626
     627#if NH_MV_SEI
     628  m_cTEncTop.setSeiMessages                                       ( &m_seiMessages );
     629#endif
    624630
    625631  m_cTEncTop.setTileUniformSpacingFlag                            ( m_tileUniformSpacingFlag );
Note: See TracChangeset for help on using the changeset viewer.