Changeset 154 in SHVCSoftware for branches/SHM-2.0-dev/source/App/TAppEncoder


Ignore:
Timestamp:
7 May 2013, 00:03:47 (12 years ago)
Author:
seregin
Message:

set and check for avc_base_layer_flag

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

Legend:

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

    r146 r154  
    343343#endif
    344344  }
     345#if AVC_BASE
     346  string  cfg_BLInputFile;
     347#endif
    345348#if AVC_SYNTAX
    346349  string  cfg_BLSyntaxFile;
     
    399402
    400403#if AVC_BASE
    401   ("InputBLFile,-ibl",        *cfg_InputFile[0],     string(""), "Base layer rec YUV input file name")
     404  ("AvcBase",                 m_avcBaseLayerFlag,     0, "AVC_BASElayer_flag")
     405  ("InputBLFile,-ibl",        cfg_BLInputFile,     string(""), "Base layer rec YUV input file name")
    402406#if AVC_SYNTAX
    403407  ("InputBLSyntaxFile,-ibs",  cfg_BLSyntaxFile,     string(""), "Base layer syntax input file name")
     
    716720  ;
    717721 
     722#if AVC_BASE
     723  if( m_avcBaseLayerFlag )
     724  {
     725    *cfg_InputFile[0] = cfg_BLInputFile;
     726  }
     727#endif
     728
    718729  for(Int i=1; i<MAX_GOP+1; i++) {
    719730    std::ostringstream cOSS;
     
    19061917#if SVC_EXTENSION
    19071918  printf("RecalQP:%d ", m_recalculateQPAccordingToLambda ? 1 : 0 );
    1908   printf("AVC_BASE:%d ", AVC_BASE);
     1919#if AVC_BASE
     1920  printf("AvcBase:%d ", m_avcBaseLayerFlag ? 1 : 0);
     1921#else
     1922  printf("AvcBase:%d ", 0);
     1923#endif
    19091924#if REF_IDX_FRAMEWORK
    19101925  printf("REF_IDX_FRAMEWORK:%d ", REF_IDX_FRAMEWORK);
  • branches/SHM-2.0-dev/source/App/TAppEncoder/TAppEncCfg.h

    r133 r154  
    6767  UInt      m_FrameSkip;                                      ///< number of skipped frames from the beginning
    6868  Int       m_framesToBeEncoded;                              ///< number of encoded frames
     69#if AVC_BASE
     70  Int       m_avcBaseLayerFlag;                               ///< AVC_BASElayer_flag
     71#endif
    6972#if AVC_SYNTAX
    70   char*     m_BLSyntaxFile;                                   ///< input syntax file
     73  Char*     m_BLSyntaxFile;                                   ///< input syntax file
    7174#endif
    7275#else
  • branches/SHM-2.0-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r152 r154  
    112112
    113113#if REF_IDX_MFM
     114#if AVC_BASE
     115    m_acTEncTop[layer].setMFMEnabledFlag(layer == 0 ? false : ( m_avcBaseLayerFlag ? AVC_SYNTAX : true ));
     116#else
    114117    m_acTEncTop[layer].setMFMEnabledFlag(layer == 0 ? false : true);
     118#endif
    115119#endif
    116120    // set layer ID
     
    805809#if VPS_EXTN_MASK_AND_DIM_INFO
    806810  UInt i = 0, dimIdLen = 0;
     811#if AVC_BASE
     812  vps->setAvcBaseLayerFlag(m_avcBaseLayerFlag);
     813#else
    807814  vps->setAvcBaseLayerFlag(false);
     815#endif
    808816  vps->setSplittingFlag(false);
    809817  for(i = 0; i < MAX_VPS_NUM_SCALABILITY_TYPES; i++)
     
    931939
    932940#if AVC_SYNTAX
    933   if( !m_BLSyntaxFile )
    934   {
    935     printf( "Wrong base layer syntax input file\n" );
    936     exit(EXIT_FAILURE);
    937   }
    938   fstream streamSyntaxFile( m_BLSyntaxFile, fstream::in | fstream::binary );
    939   if( !streamSyntaxFile.good() )
    940   {
    941     printf( "Base layer syntax input reading error\n" );
    942     exit(EXIT_FAILURE);
    943   }
    944   m_acTEncTop[0].setBLSyntaxFile( &streamSyntaxFile );
     941  fstream streamSyntaxFile;
     942  if( m_acTEncTop[0].getVPS()->getAvcBaseLayerFlag() )
     943  {
     944    if( !m_BLSyntaxFile )
     945    {
     946      printf( "Wrong base layer syntax input file\n" );
     947      exit(EXIT_FAILURE);
     948    }
     949    streamSyntaxFile.open( m_BLSyntaxFile, fstream::in | fstream::binary );
     950    if( !streamSyntaxFile.good() )
     951    {
     952      printf( "Base layer syntax input reading error\n" );
     953      exit(EXIT_FAILURE);
     954    }
     955    m_acTEncTop[0].setBLSyntaxFile( &streamSyntaxFile );
     956  }
    945957#endif
    946958
Note: See TracChangeset for help on using the changeset viewer.