Changeset 435 in SHVCSoftware for branches/SHM-3.1-dev/source/App


Ignore:
Timestamp:
14 Oct 2013, 16:04:33 (11 years ago)
Author:
nokia
Message:

add inter-layer constrained tiles sets SEI from JCTVC-N0383

Location:
branches/SHM-3.1-dev/source/App/TAppEncoder
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-3.1-dev/source/App/TAppEncoder/TAppEncCfg.cpp

    r431 r435  
    457457#if AVC_SYNTAX
    458458  string  cfg_BLSyntaxFile;
     459#endif
     460#if N0383_IL_CONSTRAINED_TILE_SETS_SEI
     461  string  cfg_tileSets;
    459462#endif
    460463#else
     
    849852  ("AdaptiveResolutionChange",     m_adaptiveResolutionChange, 0, "Adaptive resolution change frame number. Should coincide with EL RAP picture. (0: disable)")
    850853#endif
     854#if N0383_IL_CONSTRAINED_TILE_SETS_SEI
     855  ("SEIInterLayerConstrainedTileSets", m_interLayerConstrainedTileSetsSEIEnabled, false, "Control generation of inter layer constrained tile sets SEI message")
     856  ("IlNumSetsInMessage",               m_ilNumSetsInMessage,                         0u, "Number of inter layer constrained tile sets")
     857  ("TileSetsArray",                    cfg_tileSets,                         string(""), "Array containing tile sets params (TopLeftTileIndex, BottonRightTileIndex and ilcIdc for each set) ")
     858#endif
    851859  ;
    852860 
     
    13551363    }
    13561364  }
     1365#if N0383_IL_CONSTRAINED_TILE_SETS_SEI
     1366  if (m_interLayerConstrainedTileSetsSEIEnabled)
     1367  {
     1368    if (m_iNumColumnsMinus1 == 0 && m_iNumRowsMinus1 == 0)
     1369    {
     1370      printf( "Tiles are not defined (needed for inter-layer comnstrained tile sets SEI).\n" );
     1371      exit( EXIT_FAILURE );
     1372    }
     1373    Char* pTileSets = cfg_tileSets.empty() ? NULL : strdup(cfg_tileSets.c_str());
     1374    int i = 0;
     1375    char *topLeftTileIndex = strtok(pTileSets, " ,");
     1376    while(topLeftTileIndex != NULL)
     1377    {
     1378      if( i >= m_ilNumSetsInMessage )
     1379      {
     1380        printf( "The number of tile sets is larger than defined by IlNumSetsInMessage.\n" );
     1381        exit( EXIT_FAILURE );
     1382      }
     1383      *( m_topLeftTileIndex + i ) = atoi( topLeftTileIndex );
     1384      char *bottonRightTileIndex = strtok(NULL, " ,");
     1385      if( bottonRightTileIndex == NULL )
     1386      {
     1387        printf( "BottonRightTileIndex is missing in the tile sets.\n" );
     1388        exit( EXIT_FAILURE );
     1389      }
     1390      *( m_bottomRightTileIndex + i ) = atoi( bottonRightTileIndex );
     1391      char *ilcIdc = strtok(NULL, " ,");
     1392      if( ilcIdc == NULL )
     1393      {
     1394        printf( "IlcIdc is missing in the tile sets.\n" );
     1395        exit( EXIT_FAILURE );
     1396      }
     1397      *( m_ilcIdc + i ) = atoi( ilcIdc );
     1398      topLeftTileIndex = strtok(NULL, " ,");
     1399      i++;
     1400    }
     1401    if( i < m_ilNumSetsInMessage )
     1402    {
     1403      printf( "The number of tile sets is smaller than defined by IlNumSetsInMessage.\n" );
     1404      exit( EXIT_FAILURE );
     1405    }
     1406    m_skippedTileSetPresentFlag = false;
     1407  }
     1408#endif
    13571409  // check validity of input parameters
    13581410  xCheckParameter();
  • branches/SHM-3.1-dev/source/App/TAppEncoder/TAppEncCfg.h

    r431 r435  
    367367  RepFormatCfg m_repFormatCfg[16];                            ///< Rep_format structures
    368368#endif
     369#if N0383_IL_CONSTRAINED_TILE_SETS_SEI
     370  Bool      m_interLayerConstrainedTileSetsSEIEnabled;
     371  UInt      m_ilNumSetsInMessage;
     372  Bool      m_skippedTileSetPresentFlag;
     373  UInt      m_topLeftTileIndex[1024];
     374  UInt      m_bottomRightTileIndex[1024];
     375  UInt      m_ilcIdc[1024];
     376#endif
    369377public:
    370378  TAppEncCfg();
  • branches/SHM-3.1-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r433 r435  
    463463    m_acTEncTop[layer].setSOPDescriptionSEIEnabled( m_SOPDescriptionSEIEnabled );
    464464    m_acTEncTop[layer].setScalableNestingSEIEnabled( m_scalableNestingSEIEnabled );
     465#if N0383_IL_CONSTRAINED_TILE_SETS_SEI
     466    m_acTEncTop[layer].setInterLayerConstrainedTileSetsSEIEnabled( m_interLayerConstrainedTileSetsSEIEnabled );
     467    m_acTEncTop[layer].setIlNumSetsInMessage( m_ilNumSetsInMessage );
     468    m_acTEncTop[layer].setSkippedTileSetPresentFlag( m_skippedTileSetPresentFlag );
     469    m_acTEncTop[layer].setTopLeftTileIndex( m_topLeftTileIndex );
     470    m_acTEncTop[layer].setBottomRightTileIndex( m_bottomRightTileIndex );
     471    m_acTEncTop[layer].setIlcIdc( m_ilcIdc );
     472#endif
    465473    m_acTEncTop[layer].setUniformSpacingIdr          ( m_iUniformSpacingIdr );
    466474    m_acTEncTop[layer].setNumColumnsMinus1           ( m_iNumColumnsMinus1 );
Note: See TracChangeset for help on using the changeset viewer.