Changeset 187 in SHVCSoftware for branches/SHM-2.0-dev/source


Ignore:
Timestamp:
12 May 2013, 18:11:47 (12 years ago)
Author:
seregin
Message:

enable zero number of direct references, fix for AVC base YUV input

Location:
branches/SHM-2.0-dev/source
Files:
11 edited

Legend:

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

    r154 r187  
    560560      if ( m_pchReconFile )
    561561      {
     562#if SYNTAX_OUTPUT && ILP_DECODED_PICTURE
     563        m_cTVideoIOYuvReconFile.write( pcPic->getPicYuvRec() );
     564#else
    562565        const Window &conf = pcPic->getConformanceWindow();
    563566        const Window &defDisp = m_respectDefDispWindow ? pcPic->getDefDisplayWindow() : Window();
    564 #if SYNTAX_OUTPUT && ILP_DECODED_PICTURE
    565       m_cTVideoIOYuvReconFile.write( pcPic->getPicYuvRec() );
    566 #else
    567567        m_cTVideoIOYuvReconFile.write( pcPic->getPicYuvRec(),
    568568                                       conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(),
  • branches/SHM-2.0-dev/source/App/TAppEncoder/TAppEncCfg.cpp

    r184 r187  
    6666TAppEncCfg::TAppEncCfg()
    6767: m_pBitstreamFile()
     68#if AVC_BASE
     69, m_avcBaseLayerFlag(0)
     70#endif
    6871, m_pColumnWidth()
    6972, m_pRowHeight()
     
    423426#endif
    424427#if AVC_BASE
    425   ("AvcBase",                 m_avcBaseLayerFlag,     0, "AVC_BASElayer_flag")
     428  ("AvcBase,-avc",            m_avcBaseLayerFlag,     0, "avc_base_layer_flag")
    426429  ("InputBLFile,-ibl",        cfg_BLInputFile,     string(""), "Base layer rec YUV input file name")
    427430#if AVC_SYNTAX
     
    430433#endif
    431434#if REF_IDX_FRAMEWORK
    432   ("EnableElRapB,-use-rap-b",  m_elRapSliceBEnabled, 0, "Set ILP over base-layer I picture to B picture (default is P picture_")
     435  ("EnableElRapB,-use-rap-b",  m_elRapSliceBEnabled, 0, "Set ILP over base-layer I picture to B picture (default is P picture)")
    433436#endif 
    434437#else 
     
    741744  ;
    742745 
    743 #if AVC_BASE
    744   if( m_avcBaseLayerFlag )
    745   {
    746     *cfg_InputFile[0] = cfg_BLInputFile;
    747   }
    748 #endif
    749 
    750746  for(Int i=1; i<MAX_GOP+1; i++) {
    751747    std::ostringstream cOSS;
     
    773769  /* convert std::string to c string for compatability */
    774770#if SVC_EXTENSION
     771#if AVC_BASE
     772  if( m_avcBaseLayerFlag )
     773  {
     774    *cfg_InputFile[0] = cfg_BLInputFile;
     775  }
     776#endif
    775777  m_pBitstreamFile = cfg_BitstreamFile.empty() ? NULL : strdup(cfg_BitstreamFile.c_str());
    776778#if AVC_SYNTAX
     
    18271829  {
    18281830    printf("=== Layer %d settings === \n", layer);
     1831#if AVC_SYNTAX
     1832    m_acLayerCfg[layer].xPrintParameter( layer );
     1833#else
    18291834    m_acLayerCfg[layer].xPrintParameter();
     1835#endif
    18301836    printf("\n");
    18311837  }
  • branches/SHM-2.0-dev/source/App/TAppEncoder/TAppEncLayerCfg.cpp

    r125 r187  
    116116}
    117117
     118#if AVC_SYNTAX
     119Void TAppEncLayerCfg::xPrintParameter( UInt layerId )
     120#else
    118121Void TAppEncLayerCfg::xPrintParameter()
     122#endif
    119123{
    120124  printf("Input File                    : %s\n", m_cInputFile.c_str()  );
    121125  printf("Reconstruction File           : %s\n", m_cReconFile.c_str()  );
    122126#if AVC_SYNTAX
    123   printf("Base layer input file         : %s\n", m_cAppEncCfg->getBLSyntaxFile() );
     127  if( layerId == 0 )
     128  {
     129    printf("Base layer syntax file        : %s\n", m_cAppEncCfg->getBLSyntaxFile() );
     130  }
    124131#endif
    125132  printf("Real     Format               : %dx%d %dHz\n", m_iSourceWidth - m_confLeft - m_confRight, m_iSourceHeight - m_confTop - m_confBottom, m_iFrameRate );
  • branches/SHM-2.0-dev/source/App/TAppEncoder/TAppEncLayerCfg.h

    r184 r187  
    6969  bool  parseCfg  ( const string& cfgFileName );              ///< parse layer configuration file to fill member variables
    7070
     71#if AVC_SYNTAX
     72  Void  xPrintParameter( UInt layerId );
     73#else
    7174  Void  xPrintParameter();
     75#endif
    7276  Bool  xCheckParameter();
    7377
  • branches/SHM-2.0-dev/source/Lib/TLibCommon/TComSlice.cpp

    r181 r187  
    461461
    462462#if REF_IDX_FRAMEWORK
     463#if ZERO_NUM_DIRECT_LAYERS
     464  if( m_layerId == 0 || ( m_layerId > 0 && ( m_activeNumILRRefIdx == 0 || !((getNalUnitType() >= NAL_UNIT_CODED_SLICE_BLA_W_LP) && (getNalUnitType() <= NAL_UNIT_CODED_SLICE_CRA)) ) ) )
     465#else
    463466  if ((getLayerId() == 0) ||
    464467      ((getSPS()->getLayerId()) &&  !((getNalUnitType() >= NAL_UNIT_CODED_SLICE_BLA_W_LP) &&
    465468       (getNalUnitType() <= NAL_UNIT_CODED_SLICE_CRA)) )
    466469     )
     470#endif
    467471  {
    468472#endif
     
    516520  //inter-layer reference picture
    517521#if REF_IDX_MFM
     522#if ZERO_NUM_DIRECT_LAYERS
     523  if( m_layerId > 0 && m_activeNumILRRefIdx > 0 )
     524#else
    518525  if (getLayerId())
     526#endif
    519527  {
    520528    if(!(getNalUnitType() >= NAL_UNIT_CODED_SLICE_BLA_W_LP && getNalUnitType() <= NAL_UNIT_CODED_SLICE_CRA) && getSPS()->getMFMEnabledFlag())
  • branches/SHM-2.0-dev/source/Lib/TLibCommon/TComUpsampleFilter.cpp

    r175 r187  
    437437#if SCALED_REF_LAYER_OFFSETS
    438438      // Only increase the x position of reference upsample picture when within the window
    439       // "-2" to ensure that pointer doesn't go beyond the boundeary rightEndL-1
     439      // "-2" to ensure that pointer doesn't go beyond the boundary rightEndL-1
    440440      if( (i >= leftStartL) && (i <= rightEndL-2) )
    441441      {
     
    605605#if SCALED_REF_LAYER_OFFSETS
    606606      // Only increase the x position of reference upsample picture when within the window
    607       // "-2" to ensure that pointer doesn't go beyond the boundeary rightEndC-1
     607      // "-2" to ensure that pointer doesn't go beyond the boundary rightEndC-1
    608608      if( (i >= leftStartC) && (i <= rightEndC-2) )
    609609      {
  • branches/SHM-2.0-dev/source/Lib/TLibCommon/TypeDef.h

    r175 r187  
    9090#define REF_IDX_MFM                      1      ///< L0336: motion vector mapping of inter-layer reference picture
    9191#define JCTVC_M0458_INTERLAYER_RPS_SIG   1      ///< implementation of JCTVC-L0178 (currently only one reference layer is supported )
     92#if JCTVC_M0458_INTERLAYER_RPS_SIG
     93#define ZERO_NUM_DIRECT_LAYERS           1      ///< support of zero direct reference layers
     94#endif
    9295#else
    9396#define INTRA_BL                         1      ///< inter-layer texture prediction
  • branches/SHM-2.0-dev/source/Lib/TLibDecoder/TDecCu.cpp

    r125 r187  
    370370  m_pcEntropyDecoder->decodePredInfo( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth]);
    371371#endif
    372  
     372
    373373  // Coefficient decoding
    374374  Bool bCodeDQP = getdQPFlag();
  • branches/SHM-2.0-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r182 r187  
    12681268  if( vps->getNumDirectRefLayers( m_layerId ) <= 0 )
    12691269  {
     1270#if ZERO_NUM_DIRECT_LAYERS
     1271    return (TDecTop *)getLayerDec( 0 );
     1272#else
    12701273    return NULL;
     1274#endif
    12711275  }
    12721276
     
    12761280  assert( vps->getMaxOneActiveRefLayerFlag() == 1 );
    12771281#endif
    1278 
    1279 
     1282 
    12801283  return (TDecTop *)getLayerDec( vps->getRefLayerId( m_layerId, 0 ) );
    12811284}
  • branches/SHM-2.0-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r185 r187  
    556556      pcSlice->setNalUnitType(NAL_UNIT_CODED_SLICE_CRA);
    557557    }
     558#if ZERO_NUM_DIRECT_LAYERS
     559    if( m_layerId > 0 && pcSlice->getActiveNumILRRefIdx() == 0 && pcSlice->getNalUnitType() >= NAL_UNIT_CODED_SLICE_BLA_W_LP && pcSlice->getNalUnitType() <= NAL_UNIT_CODED_SLICE_CRA )
     560    {
     561      pcSlice->setSliceType(I_SLICE);
     562    }
     563    else
     564#endif
    558565    if( m_layerId > 0 && !m_pcEncTop->getElRapSliceTypeB() )
    559566    {
     
    657664
    658665#if REF_IDX_FRAMEWORK
     666#if ZERO_NUM_DIRECT_LAYERS
     667    if( m_layerId > 0 && pcSlice->getActiveNumILRRefIdx() )
     668#else
    659669    if(m_layerId > 0)
     670#endif
    660671    {
    661672#if JCTVC_M0458_INTERLAYER_RPS_SIG
     
    690701
    691702#if SVC_EXTENSION     
     703#if ZERO_NUM_DIRECT_LAYERS
     704    if( m_layerId > 0 && pcSlice->getActiveNumILRRefIdx() )
     705#else
    692706    if(m_layerId > 0)
     707#endif
    693708    {
    694709#if !IDR_ALIGNMENT
     
    723738    //  Set reference list
    724739#if REF_IDX_FRAMEWORK
     740#if ZERO_NUM_DIRECT_LAYERS
     741    if(m_layerId ==  0 || ( m_layerId > 0 && pcSlice->getActiveNumILRRefIdx() == 0 ) )
     742#else
    725743    if(m_layerId ==  0)
     744#endif
    726745    {
    727746      pcSlice->setRefPicList( rcListPic);
     
    731750#endif
    732751#if REF_IDX_FRAMEWORK
     752#if ZERO_NUM_DIRECT_LAYERS
     753    if( m_layerId > 0 && pcSlice->getActiveNumILRRefIdx() )
     754#else
    733755    if(m_layerId > 0)
     756#endif
    734757    {
    735758      m_pcEncTop->setILRPic(pcPic);
  • branches/SHM-2.0-dev/source/Lib/TLibEncoder/TEncTop.cpp

    r175 r187  
    11931193  if( m_ppcTEncTop[m_layerId]->getNumDirectRefLayers() <= 0 )
    11941194  {
     1195#if ZERO_NUM_DIRECT_LAYERS
     1196    return (TEncTop *)getLayerEnc( 0 );
     1197#else
    11951198    return NULL;
     1199#endif
    11961200  }
    11971201
Note: See TracChangeset for help on using the changeset viewer.