Changeset 820 in SHVCSoftware for branches/SHM-dev/source/App


Ignore:
Timestamp:
7 Jul 2014, 11:08:41 (11 years ago)
Author:
seregin
Message:

remove macros SYNTAX_BYTES, SYNTAX_OUTPUT, and AVC_SYNTAX

Location:
branches/SHM-dev/source/App
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/App/TAppDecoder/TAppDecCfg.cpp

    r815 r820  
    7878  string cfg_ReconFile;
    7979#endif
    80 #if AVC_SYNTAX || SYNTAX_OUTPUT
    81   string cfg_BLSyntaxFile;
    82 #endif
     80
    8381  string cfg_TargetDecLayerIdSetFile;
    8482
     
    9694  ("BLSourceHeight,-hgt",   m_iBLSourceHeight,       0, "BL source picture height")
    9795#endif
    98 #if AVC_SYNTAX
    99   ("BLSyntaxFile,-ibs",    cfg_BLSyntaxFile,  string(""), "BL syntax input file name") 
    100 #endif
    10196#endif
    10297#else
    10398  ("ReconFile,o",     cfg_ReconFile,     string(""), "reconstructed YUV output file name\n"
    10499                                                     "YUV writing is skipped if omitted")
    105 #endif
    106 #if SYNTAX_OUTPUT
    107   ("BLSyntaxFile,-ibs",    cfg_BLSyntaxFile,  string(""), "BL syntax input file name")
    108   ("BLSourceWidth,-wdt",    m_iBLSourceWidth,        0, "BL source picture width")
    109   ("BLSourceHeight,-hgt",   m_iBLSourceHeight,       0, "BL source picture height")
    110   ("BLFrames,-fr",          m_iBLFrames,       0, "BL number of frames")
    111100#endif
    112101  ("SkipFrames,s", m_iSkipFrame, 0, "number of frames to skip before random access")
     
    163152#else
    164153  m_pchReconFile = cfg_ReconFile.empty() ? NULL : strdup(cfg_ReconFile.c_str());
    165 #endif
    166 #if AVC_SYNTAX || SYNTAX_OUTPUT
    167   m_pchBLSyntaxFile = cfg_BLSyntaxFile.empty() ? NULL : strdup(cfg_BLSyntaxFile.c_str());
    168154#endif
    169155
  • branches/SHM-dev/source/App/TAppDecoder/TAppDecCfg.h

    r713 r820  
    7878  Int           m_iBLSourceHeight;
    7979#endif
    80 #if AVC_SYNTAX
    81   Char*         m_pchBLSyntaxFile;                     ///< input BL syntax file name 
    8280#endif
    83 #endif
    84 #endif
    85 
    86 #if SYNTAX_OUTPUT
    87   Char*         m_pchBLSyntaxFile;                     ///< input BL syntax file name
    88 #if !REPN_FORMAT_IN_VPS
    89   Int           m_iBLSourceWidth;
    90   Int           m_iBLSourceHeight;
    91 #endif
    92   Int           m_iBLFrames;
    9381#endif
    9482
     
    116104  , m_iBLSourceHeight(0)
    117105#endif
    118 #if SYNTAX_OUTPUT
    119   , m_iBLSourceWidth(0)
    120   , m_iBLSourceHeight(0)
    121   , m_iBLFrames(0)
    122 #endif
    123106#endif
    124107  , m_respectDefDispWindow(0)
  • branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.cpp

    r815 r820  
    102102  }
    103103#endif
    104 #if AVC_SYNTAX || SYNTAX_OUTPUT
    105   if( m_pchBLSyntaxFile )
    106   {
    107     free ( m_pchBLSyntaxFile );
    108     m_pchBLSyntaxFile = NULL;
    109   }
    110 #endif
    111104}
    112105
     
    163156  }
    164157  TComList<TComPic*> *cListPic = m_acTDecTop[0].getListPic();
    165 #if AVC_SYNTAX || !REPN_FORMAT_IN_VPS
    166   m_acTDecTop[0].setBLsize( m_iBLSourceWidth, m_iBLSourceHeight );
    167 #endif
    168158  m_acTDecTop[0].setBLReconFile( &streamYUV );
    169159  pcBLPic.setLayerId( 0 );
    170160  cListPic->pushBack( &pcBLPic );
    171 #if AVC_SYNTAX
    172   fstream streamSyntaxFile;
    173   if( m_pchBLSyntaxFile )
    174   {
    175     streamSyntaxFile.open( m_pchBLSyntaxFile, fstream::in | fstream::binary );
    176   }
    177   m_acTDecTop[0].setBLSyntaxFile( &streamSyntaxFile );
    178 #endif
    179161#endif
    180162
     
    363345    streamYUV.close();
    364346  }
    365 #if AVC_SYNTAX
    366   if( streamSyntaxFile.is_open() )
    367   {
    368     streamSyntaxFile.close();
    369   }
    370 #endif
    371347  pcBLPic.destroy();
    372348
     
    405381  Bool openedReconFile = false; // reconstruction file not yet opened. (must be performed after SPS is seen)
    406382  Bool loopFiltered = false;
    407 
    408 #if SYNTAX_OUTPUT
    409   if( !m_pchBLSyntaxFile )
    410   {
    411     printf( "Wrong base layer syntax file\n" );
    412     exit(EXIT_FAILURE);
    413   }
    414   fstream streamSyntaxFile( m_pchBLSyntaxFile, fstream::out | fstream::binary );
    415   if( !streamSyntaxFile.good() )
    416   {
    417     printf( "Base layer syntax input reading error\n" );
    418     exit(EXIT_FAILURE);
    419   }
    420   m_cTDecTop.setBLSyntaxFile( &streamSyntaxFile );
    421 
    422   for( Int i = m_iBLFrames * m_iBLSourceWidth * m_iBLSourceHeight * SYNTAX_BYTES / 16; i >= 0; i-- )
    423   {
    424     streamSyntaxFile.put( 0 );
    425   }
    426   streamSyntaxFile.seekp( 0 );
    427 #endif
    428383
    429384  while (!!bitstreamFile)
     
    542497    }
    543498  }
    544 
    545 #if SYNTAX_OUTPUT
    546   if( streamSyntaxFile.is_open() )
    547   {
    548     streamSyntaxFile.close();
    549   }
    550 #endif
    551499
    552500  xFlushOutput( pcListPic );
     
    873821        if ( m_pchReconFile )
    874822        {
    875 #if SYNTAX_OUTPUT
    876           TComPicYuv* pPicCYuvRec = pcPic->getPicYuvRec();
    877 #if Q0074_SEI_COLOR_MAPPING
    878           if( m_acTDecTop[layerIdx].m_ColorMapping->getColorMappingFlag() )
    879           {
    880             pPicCYuvRec = m_acTDecTop[layerIdx].m_ColorMapping->getColorMapping( pPicCYuvRec, 0, layerIdx );
    881           }
    882 #endif
    883823          const Window &conf = pcPic->getConformanceWindow();
    884824          const Window &defDisp = m_respectDefDispWindow ? pcPic->getDefDisplayWindow() : Window();
    885           m_cTVideoIOYuvReconFile.write( pPicCYuvRec,
    886             conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(),
    887             conf.getWindowRightOffset() + defDisp.getWindowRightOffset(),
    888             conf.getWindowTopOffset() + defDisp.getWindowTopOffset(),
    889             conf.getWindowBottomOffset() + defDisp.getWindowBottomOffset() );
    890 #endif
     825          m_cTVideoIOYuvReconFile.write( pcPic->getPicYuvRec(),
     826                                        conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(),
     827                                        conf.getWindowRightOffset() + defDisp.getWindowRightOffset(),
     828                                        conf.getWindowTopOffset() + defDisp.getWindowTopOffset(),
     829                                        conf.getWindowBottomOffset() + defDisp.getWindowBottomOffset() );
    891830        }
    892831
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp

    r815 r820  
    510510  string  cfg_BLInputFile;
    511511#endif
    512 #if AVC_SYNTAX
    513   string  cfg_BLSyntaxFile;
    514 #endif
    515512#if N0383_IL_CONSTRAINED_TILE_SETS_SEI
    516513  string  cfg_tileSets;
     
    629626  ("AvcBase,-avc",            m_avcBaseLayerFlag,     0, "avc_base_layer_flag")
    630627  ("InputBLFile,-ibl",        cfg_BLInputFile,     string(""), "Base layer rec YUV input file name")
    631 #if AVC_SYNTAX
    632   ("InputBLSyntaxFile,-ibs",  cfg_BLSyntaxFile,     string(""), "Base layer syntax input file name")
    633 #endif
    634628#endif
    635629  ("EnableElRapB,-use-rap-b",  m_elRapSliceBEnabled, 0, "Set ILP over base-layer I picture to B picture (default is P picture)")
     
    10951089#endif
    10961090  m_pBitstreamFile = cfg_BitstreamFile.empty() ? NULL : strdup(cfg_BitstreamFile.c_str());
    1097 #if AVC_SYNTAX
    1098   m_BLSyntaxFile = cfg_BLSyntaxFile.empty() ? NULL : strdup(cfg_BLSyntaxFile.c_str());
    1099 #endif
    11001091#else //SVC_EXTENSION
    11011092  m_pchInputFile = cfg_InputFile.empty() ? NULL : strdup(cfg_InputFile.c_str());
     
    29332924  {
    29342925    printf("=== Layer %d settings === \n", layer);
    2935 #if AVC_SYNTAX
    2936     m_acLayerCfg[layer].xPrintParameter( layer );
    2937 #else
    29382926    m_acLayerCfg[layer].xPrintParameter();
    2939 #endif
    29402927    printf("\n");
    29412928  }
    29422929  printf("=== Common configuration settings === \n");
    29432930  printf("Bitstream      File          : %s\n", m_pBitstreamFile      );
    2944 #else
     2931#else //SVC_EXTENSION
    29452932  printf("Input          File          : %s\n", m_pchInputFile          );
    29462933  printf("Bitstream      File          : %s\n", m_pchBitstreamFile      );
     
    29482935  printf("Real     Format              : %dx%d %dHz\n", m_iSourceWidth - m_confLeft - m_confRight, m_iSourceHeight - m_confTop - m_confBottom, m_iFrameRate );
    29492936  printf("Internal Format              : %dx%d %dHz\n", m_iSourceWidth, m_iSourceHeight, m_iFrameRate );
    2950 #endif
     2937#endif //SVC_EXTENSION
    29512938  if (m_isField)
    29522939  {
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h

    r815 r820  
    6969#if AVC_BASE
    7070  Int       m_avcBaseLayerFlag;                               ///< avc_baselayer_flag
    71 #endif
    72 #if AVC_SYNTAX
    73   Char*     m_BLSyntaxFile;                                   ///< input syntax file
    7471#endif
    7572  Bool      m_maxTidRefPresentFlag;
     
    470467  Int  getWaveFrontSynchro()        { return m_iWaveFrontSynchro; }
    471468  Void getDirFilename(string& filename, string& dir, const string path);
    472 #if AVC_SYNTAX
    473   Char* getBLSyntaxFile()           { return m_BLSyntaxFile;      }
    474 #endif
    475469  Void cfgStringToArray(Int **arr, string cfgString, Int numEntries, const char* logString);
    476470#if REPN_FORMAT_IN_VPS
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.cpp

    r713 r820  
    157157}
    158158
    159 #if AVC_SYNTAX
    160 Void TAppEncLayerCfg::xPrintParameter( UInt layerId )
    161 #else
    162159Void TAppEncLayerCfg::xPrintParameter()
    163 #endif
    164160{
    165161  printf("Input File                    : %s\n", m_cInputFile.c_str()  );
    166162  printf("Reconstruction File           : %s\n", m_cReconFile.c_str()  );
    167 #if AVC_SYNTAX
    168   if( layerId == 0 )
    169   {
    170     printf("Base layer syntax file        : %s\n", m_cAppEncCfg->getBLSyntaxFile() );
    171   }
    172 #endif
    173163#if REPN_FORMAT_IN_VPS
    174164  printf("Real     Format               : %dx%d %dHz\n", m_iSourceWidth - ( m_confLeft + m_confRight ) * TComSPS::getWinUnitX( m_chromaFormatIDC ), m_iSourceHeight - ( m_confTop + m_confBottom ) * TComSPS::getWinUnitY( m_chromaFormatIDC ), m_iFrameRate );
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.h

    r815 r820  
    122122  bool  parseCfg  ( const string& cfgFileName );              ///< parse layer configuration file to fill member variables
    123123
    124 #if AVC_SYNTAX
    125   Void  xPrintParameter( UInt layerId );
    126 #else
    127124  Void  xPrintParameter();
    128 #endif
    129125  Bool  xCheckParameter( Bool isField );
    130126
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r815 r820  
    226226#if REF_IDX_MFM
    227227#if AVC_BASE
    228     m_acTEncTop[layer].setMFMEnabledFlag(layer == 0 ? false : ( m_avcBaseLayerFlag ? AVC_SYNTAX : true ) && m_acLayerCfg[layer].getNumMotionPredRefLayers());
     228    m_acTEncTop[layer].setMFMEnabledFlag(layer == 0 ? false : ( m_avcBaseLayerFlag ? false : true ) && m_acLayerCfg[layer].getNumMotionPredRefLayers());
    229229#else
    230230    m_acTEncTop[layer].setMFMEnabledFlag(layer == 0 ? false : ( m_acLayerCfg[layer].getNumMotionPredRefLayers() > 0 ) );
     
    16691669  }
    16701670
    1671 #if AVC_SYNTAX
    1672   fstream streamSyntaxFile;
    1673   if( m_acTEncTop[0].getVPS()->getAvcBaseLayerFlag() )
    1674   {
    1675     if( !m_BLSyntaxFile )
    1676     {
    1677       printf( "Wrong base layer syntax input file\n" );
    1678       exit(EXIT_FAILURE);
    1679     }
    1680     streamSyntaxFile.open( m_BLSyntaxFile, fstream::in | fstream::binary );
    1681     if( !streamSyntaxFile.good() )
    1682     {
    1683       printf( "Base layer syntax input reading error\n" );
    1684       exit(EXIT_FAILURE);
    1685     }
    1686     m_acTEncTop[0].setBLSyntaxFile( &streamSyntaxFile );
    1687   }
    1688 #endif
    1689 
    16901671  Bool bFirstFrame = true;
    16911672  while ( !bEos )
     
    18841865    m_acTEncTop[layer].deletePicBuffer();
    18851866  }
    1886 
    1887 #if AVC_SYNTAX
    1888   if( streamSyntaxFile.is_open() )
    1889   {
    1890     streamSyntaxFile.close();
    1891   }
    1892 #endif
    18931867
    18941868  // delete buffers & classes
     
    23242298      if (m_pchReconFile)
    23252299      {
    2326 #if SYNTAX_OUTPUT
    23272300        m_cTVideoIOYuvReconFile.write( pcPicYuvRec, m_confLeft, m_confRight, m_confTop, m_confBottom );
    2328 #endif
    23292301      }
    23302302
Note: See TracChangeset for help on using the changeset viewer.