Changeset 820 in SHVCSoftware


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

remove macros SYNTAX_BYTES, SYNTAX_OUTPUT, and AVC_SYNTAX

Location:
branches/SHM-dev/source
Files:
19 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
  • branches/SHM-dev/source/Lib/TLibCommon/TComMotionInfo.h

    r713 r820  
    155155  Void compress(Char* pePredMode, Int scale);
    156156
    157 #if AVC_SYNTAX
    158   Void           setMv    (TComMv cMv,  Int iIdx )         { m_pcMv    [iIdx] = cMv; }
    159   Void           setRefIdx(Int iRefIdx, Int iIdx   )       { m_piRefIdx[iIdx] =  iRefIdx; }
    160 #endif
    161 
    162157#if REF_IDX_MFM
    163158  Void setMvField( TComMvField const& mvField, Int iIdx )
  • branches/SHM-dev/source/Lib/TLibCommon/TComPic.cpp

    r815 r820  
    334334#endif
    335335
    336 #if AVC_SYNTAX
    337 Void TComPic::readBLSyntax( fstream* filestream, UInt numBytes )
    338 {
    339   if( !filestream->good() )
    340   {
    341     return;
    342   }
    343 
    344   UInt   width      = this->getPicYuvRec()->getWidth();
    345   UInt   height     = this->getPicYuvRec()->getHeight();
    346 
    347   UInt64 poc        = (UInt64)this->getPOC();
    348   UInt   partWidth  = width / 4;
    349   UInt   partHeight = height / 4;
    350 
    351   UInt numPartInWidth    = this->getNumPartInWidth();
    352   UInt numPartInHeight   = this->getNumPartInHeight();
    353   UInt numPartLCUInWidth = this->getFrameWidthInCU();
    354 
    355   UInt64 uiPos = (UInt64)poc * width * height * numBytes / 16;
    356    
    357   filestream->seekg( uiPos, ios_base::beg );
    358 
    359   for( Int i = 0; i < partHeight; i++ )
    360   {
    361     for( Int j = 0; j < partWidth; j++ )
    362     {
    363       UInt x = ( j / numPartInWidth );
    364       UInt y = ( i / numPartInHeight );
    365 
    366       UInt addrLCU = y * numPartLCUInWidth + x;
    367       UInt partAddr = ( i - y * numPartInHeight ) * numPartInWidth + ( j - x * numPartInWidth );
    368       partAddr = g_auiRasterToZscan[partAddr];
    369      
    370       TComDataCU* pcCU = this->getCU( addrLCU );
    371      
    372       TComMv mv;
    373       Short temp;
    374 
    375       // RefIdxL0
    376       Char refIdxL0 = -1;
    377       filestream->read( &refIdxL0, 1 );
    378       assert( refIdxL0 >= -1 );
    379       pcCU->getCUMvField( REF_PIC_LIST_0 )->setRefIdx( (Int)refIdxL0, partAddr );
    380 
    381       // RefIdxL1
    382       Char refIdxL1 = -1;
    383       filestream->read( &refIdxL1, 1 );
    384       assert( refIdxL1 >= -1 );
    385       pcCU->getCUMvField( REF_PIC_LIST_1 )->setRefIdx( (Int)refIdxL1, partAddr );
    386 
    387       // MV L0
    388       temp = 0;
    389       filestream->read( reinterpret_cast<char*>(&temp), 2 );
    390       mv.setHor( (Short)temp );
    391       temp = 0;
    392       filestream->read( reinterpret_cast<char*>(&temp), 2 );
    393       mv.setVer( (Short)temp );
    394       pcCU->getCUMvField( REF_PIC_LIST_0 )->setMv( mv, partAddr );
    395 
    396       // MV L1
    397       temp = 0;
    398       filestream->read( reinterpret_cast<char*>(&temp), 2 );
    399       mv.setHor( (Short)temp );
    400       temp = 0;
    401       filestream->read( reinterpret_cast<char*>(&temp), 2 );
    402       mv.setVer( (Short)temp );
    403       pcCU->getCUMvField( REF_PIC_LIST_1 )->setMv( mv, partAddr );
    404 
    405       // set dependent information
    406       pcCU->setPredictionMode( partAddr, ( refIdxL0 == NOT_VALID && refIdxL1 == NOT_VALID ) ? MODE_INTRA : MODE_INTER );
    407       UInt interDir = ( refIdxL0 != NOT_VALID ) + ( refIdxL1 != NOT_VALID && this->getSlice(0)->isInterB() ) * 2;
    408       assert( interDir <= 3 );
    409       pcCU->setInterDir( partAddr, interDir );     
    410     }
    411   }
    412 }
    413 #endif
    414 
    415 #if SYNTAX_OUTPUT
    416 Void TComPic::wrireBLSyntax( fstream* filestream, UInt numBytes )
    417 {
    418   if( !filestream->good() )
    419   {
    420     return;
    421   }
    422 
    423   UInt   width       = this->getPicYuvRec()->getWidth();
    424   UInt   height      = this->getPicYuvRec()->getHeight();
    425 
    426   UInt64 poc        = (UInt64)this->getPOC();
    427   UInt   partWidth  = width / 4;
    428   UInt   partHeight = height / 4;
    429 
    430   UInt numPartInWidth    = this->getNumPartInWidth();
    431   UInt numPartInHeight   = this->getNumPartInHeight();
    432   UInt numPartLCUInWidth = this->getFrameWidthInCU();
    433 
    434   filestream->seekg( poc * width * height * numBytes / 16 );
    435    
    436   for( Int i = 0; i < partHeight; i++ )
    437   {
    438     for( Int j = 0; j < partWidth; j++ )
    439     {
    440       UInt x = ( j / numPartInWidth );
    441       UInt y = ( i / numPartInHeight );
    442 
    443       UInt addrLCU = y * numPartLCUInWidth + x;
    444       UInt partAddr = ( i - y * numPartInHeight ) * numPartInWidth + ( j - x * numPartInWidth );
    445       partAddr = g_auiRasterToZscan[partAddr];
    446      
    447       TComDataCU* pcCU = this->getCU( addrLCU );
    448      
    449       TComMv mv;
    450       Short temp;
    451       Char refIdxL0 = NOT_VALID, refIdxL1 = NOT_VALID;
    452 
    453       // RefIdx
    454       if( !pcCU->isIntra( partAddr ) )
    455       {
    456         refIdxL0 = (Char)pcCU->getCUMvField( REF_PIC_LIST_0 )->getRefIdx( partAddr );
    457         refIdxL1 = (Char)pcCU->getCUMvField( REF_PIC_LIST_1 )->getRefIdx( partAddr );
    458       }
    459       assert( refIdxL0 >= - 1 && refIdxL1 >= - 1 );
    460       filestream->put( refIdxL0 );
    461       filestream->put( refIdxL1 );
    462 
    463       // MV L0
    464       mv.setZero();
    465       if( refIdxL0 >= 0 )
    466       {
    467         mv = pcCU->getCUMvField( REF_PIC_LIST_0 )->getMv( partAddr );
    468       }
    469       temp = (Short)mv.getHor();
    470       filestream->write( reinterpret_cast<char*>(&temp), 2 );
    471       temp = (Short)mv.getVer();
    472       filestream->write( reinterpret_cast<char*>(&temp), 2 );
    473 
    474       // MV L1
    475       mv.setZero();
    476       if( refIdxL1 >= 0 )
    477       {
    478         mv = pcCU->getCUMvField( REF_PIC_LIST_1 )->getMv( partAddr );
    479       }
    480       temp = (Short)mv.getHor();
    481       filestream->write( reinterpret_cast<char*>(&temp), 2 );
    482       temp = (Short)mv.getVer();
    483       filestream->write( reinterpret_cast<char*>(&temp), 2 );
    484     }
    485   }
    486 }
    487 #endif
    488 
    489336#if MFM_ENCCONSTRAINT
    490337Bool TComPic::checkSameRefInfo()
  • branches/SHM-dev/source/Lib/TLibCommon/TComPic.h

    r815 r820  
    4545#include "TComBitStream.h"
    4646#include "SEI.h"
    47 #if AVC_BASE || SYNTAX_OUTPUT
     47#if AVC_BASE
    4848#include <fstream>
    4949#endif
     
    213213#endif
    214214  Void  copyUpsampledPictureYuv(TComPicYuv*   pcPicYuvIn, TComPicYuv*   pcPicYuvOut);
    215 #if AVC_SYNTAX
    216   Void readBLSyntax( fstream* filestream, UInt numBytes );
    217 #endif
    218 #endif
    219 #if SYNTAX_OUTPUT
    220   Void wrireBLSyntax( fstream* filestream, UInt numBytes );
    221215#endif
    222216
  • branches/SHM-dev/source/Lib/TLibCommon/TComPicSym.h

    r595 r820  
    161161  UInt        getMaxCUHeight()          { return m_uiMaxCUHeight;               }
    162162#endif
    163 #if AVC_SYNTAX
    164   UInt        getMaxCUWidth()           { return m_uiMaxCUWidth;                }
    165   UInt        getMaxCUHeight()          { return m_uiMaxCUHeight;               }
    166   UInt        getMaxDepth()             { return m_uhTotalDepth;               }
    167 #endif
    168163#if N0383_IL_CONSTRAINED_TILE_SETS_SEI
    169164  Void         setTileSetIdxMap( Int i, Int tileSetIdx, UChar setType, Bool skipFlag )
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp

    r815 r820  
    38543854
    38553855#if SVC_EXTENSION
    3856 #if AVC_SYNTAX
    3857 Void TComSlice::initBaseLayerRPL( TComSlice *pcSlice )
    3858 {
    3859 // Assumed that RPL of the base layer is same to the EL, otherwise this information should be also dumped and read from the metadata file
    3860   setPOC( pcSlice->getPOC() );
    3861   if( pcSlice->getNalUnitType() >= NAL_UNIT_CODED_SLICE_BLA_W_LP && pcSlice->getNalUnitType() <= NAL_UNIT_CODED_SLICE_CRA )
    3862   {
    3863     setSliceType( I_SLICE );
    3864   }
    3865   else
    3866   {
    3867     setSliceType( pcSlice->getSliceType() );
    3868   }
    3869 
    3870   if( this->isIntra() )
    3871   {
    3872     return;
    3873   }
    3874 
    3875   //initialize reference POC of BL
    3876   for( Int iRefPicList = 0; iRefPicList < 2; iRefPicList++ )
    3877   {
    3878     RefPicList eRefPicList = RefPicList( iRefPicList );
    3879 
    3880     assert( pcSlice->getNumRefIdx( eRefPicList) >= 0 );
    3881     setNumRefIdx( eRefPicList, pcSlice->getNumRefIdx( eRefPicList ) - 1 );
    3882     assert( getNumRefIdx( eRefPicList) <= MAX_NUM_REF);
    3883 
    3884     for(Int refIdx = 0; refIdx < getNumRefIdx( eRefPicList ); refIdx++)
    3885     {
    3886       setRefPOC( pcSlice->getRefPic( eRefPicList, refIdx )->getPOC(), eRefPicList, refIdx );
    3887       setRefPic( pcSlice->getRefPic( eRefPicList, refIdx ), eRefPicList, refIdx );
    3888       /*
    3889       // should be set if the base layer has its own instance of the reference picture lists, currently EL RPL is reused.
    3890       getRefPic( eRefPicList, refIdx )->setLayerId( 0 );
    3891       getRefPic( eRefPicList, refIdx )->setIsLongTerm( pcSlice->getRefPic( eRefPicList, refIdx )->getIsLongTerm() );     
    3892       */
    3893 
    3894     }
    3895   } 
    3896   return;
    3897 }
    3898 #endif
    3899 
    39003856Bool TComSlice::setBaseColPic(  TComList<TComPic*>& rcListPic, UInt refLayerIdc )
    39013857
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h

    r819 r820  
    24072407  TComPicYuv* getFullPelBaseRec   (UInt refLayerIdc)               { return  m_pcFullPelBaseRec[refLayerIdc];  }
    24082408
    2409 #if AVC_SYNTAX
    2410   Void      initBaseLayerRPL( TComSlice *pcSlice );
    2411 #endif
    2412 
    24132409  Void      setRefPicListModificationSvc();
    24142410  Int       getNumILRRefIdx     ( )                     { return  m_pcVPS->getNumDirectRefLayers( m_layerId ); }
  • branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h

    r818 r820  
    4141#define SVC_EXTENSION                    1
    4242
    43 #define SYNTAX_BYTES                     10     ///< number of bytes taken by syntaxes per 4x4 block [RefIdxL0(1byte), RefIdxL1(1byte), MVxL0(2bytes), MVyL0(2bytes), MVxL1(2bytes), MVyL1(2bytes)]
    4443#if SVC_EXTENSION
    4544#define MAX_LAYERS                       8      ///< max number of layers the codec is supposed to handle
     
    152151
    153152#define AVC_BASE                         1      ///< YUV BL reading for AVC base SVC
    154 #if AVC_BASE
    155 #define AVC_SYNTAX                       0      ///< Syntax reading for AVC base
    156 #endif
    157153
    158154#define REF_IDX_MFM                      1      ///< JCTVC-L0336: motion vector mapping of inter-layer reference picture
     
    262258
    263259
    264 #else
    265 #define SYNTAX_OUTPUT                    0
    266260#endif // SVC_EXTENSION
    267261
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r815 r820  
    7474  memset(m_cIlpPic, 0, sizeof(m_cIlpPic));
    7575#endif
    76 #if AVC_SYNTAX || SYNTAX_OUTPUT
    77   m_pBLSyntaxFile = NULL;
    78 #endif
    7976  m_prevSliceSkipped = false;
    8077  m_skippedPOC = 0;
     
    522519  m_cGopDecoder.filterPicture(pcPic);
    523520
    524 #if SYNTAX_OUTPUT
    525   pcPic->wrireBLSyntax( getBLSyntaxFile(), SYNTAX_BYTES );
    526 #endif
    527521  TComSlice::sortPicList( m_cListPic ); // sorting for application output
    528522  poc                 = pcPic->getSlice(m_uiSliceIdx-1)->getPOC();
     
    781775
    782776#if AUXILIARY_PICTURES
    783 #if AVC_SYNTAX
    784       pBLPic->create( repFormat->getPicWidthVpsInLumaSamples(), repFormat->getPicHeightVpsInLumaSamples(), repFormat->getChromaFormatVpsIdc(), activeSPS->getMaxCUWidth(), activeSPS->getMaxCUHeight(), activeSPS->getMaxCUDepth(), conformanceWindow, defaultDisplayWindow, numReorderPics, activeSPS, true);
    785 #else
    786777      pBLPic->create( repFormat->getPicWidthVpsInLumaSamples(), repFormat->getPicHeightVpsInLumaSamples(), repFormat->getChromaFormatVpsIdc(), activeSPS->getMaxCUWidth(), activeSPS->getMaxCUHeight(), activeSPS->getMaxCUDepth(), conformanceWindow, defaultDisplayWindow, numReorderPics, NULL, true);
    787 #endif
    788 #else
    789 #if AVC_SYNTAX
    790       pBLPic->create( repFormat->getPicWidthVpsInLumaSamples(), repFormat->getPicHeightVpsInLumaSamples(), activeSPS->getMaxCUWidth(), activeSPS->getMaxCUHeight(), activeSPS->getMaxCUDepth(), conformanceWindow, defaultDisplayWindow, numReorderPics, activeSPS, true);
    791778#else
    792779      pBLPic->create( repFormat->getPicWidthVpsInLumaSamples(), repFormat->getPicHeightVpsInLumaSamples(), activeSPS->getMaxCUWidth(), activeSPS->getMaxCUHeight(), activeSPS->getMaxCUDepth(), conformanceWindow, defaultDisplayWindow, numReorderPics, NULL, true);
    793 #endif
    794780#endif
    795781      // it is needed where the VPS is accessed through the slice
     
    18051791            continue;
    18061792          }
    1807 #if AVC_SYNTAX
    1808           TComPic* pBLPic = pcSlice->getBaseColPic(refLayerIdc);
    1809           if( pcSlice->getPOC() == 0 )
    1810           {
    1811             // initialize partition order.
    1812             UInt* piTmp = &g_auiZscanToRaster[0];
    1813             initZscanToRaster( pBLPic->getPicSym()->getMaxDepth() + 1, 1, 0, piTmp );
    1814             initRasterToZscan( pBLPic->getPicSym()->getMaxCUWidth(), pBLPic->getPicSym()->getMaxCUHeight(), pBLPic->getPicSym()->getMaxDepth() + 1 );
    1815           }     
    1816           pBLPic->getSlice( 0 )->initBaseLayerRPL( pcSlice );
    1817           pBLPic->readBLSyntax( m_ppcTDecTop[0]->getBLSyntaxFile(), SYNTAX_BYTES );
    1818 #endif
    18191793        }
    18201794        else
     
    19311905        {
    19321906          pcSlice->setBaseColPic ( refLayerIdc, *m_ppcTDecTop[0]->getListPic()->begin() );
    1933 #if AVC_SYNTAX
    1934           TComPic* pBLPic = pcSlice->getBaseColPic(refLayerIdc);
    1935           if( pcSlice->getPOC() == 0 )
    1936           {
    1937             // initialize partition order.
    1938             UInt* piTmp = &g_auiZscanToRaster[0];
    1939             initZscanToRaster( pBLPic->getPicSym()->getMaxDepth() + 1, 1, 0, piTmp );
    1940             initRasterToZscan( pBLPic->getPicSym()->getMaxCUWidth(), pBLPic->getPicSym()->getMaxCUHeight(), pBLPic->getPicSym()->getMaxDepth() + 1 );
    1941           }     
    1942           pBLPic->getSlice( 0 )->initBaseLayerRPL( pcSlice );
    1943           pBLPic->readBLSyntax( m_ppcTDecTop[0]->getBLSyntaxFile(), SYNTAX_BYTES );
    1944 #endif
    19451907        }
    19461908        else
     
    22942256          exit(EXIT_FAILURE);
    22952257        }       
    2296 #if AVC_SYNTAX
    2297         if( !m_ppcTDecTop[0]->getBLSyntaxFile()->good() )
    2298         {
    2299           printf( "Base layer syntax input reading error\n" );
    2300           exit(EXIT_FAILURE);
    2301         }
    2302 #endif
    23032258      }
    23042259      else
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.h

    r815 r820  
    195195  CommonDecoderParams*    m_commonDecoderParams;
    196196#endif
    197 #if AVC_SYNTAX || SYNTAX_OUTPUT
    198   fstream*               m_pBLSyntaxFile;
    199 #endif
    200 
    201197#if NO_CLRAS_OUTPUT_FLAG 
    202198  Bool                    m_noClrasOutputFlag;
     
    327323#endif
    328324#endif //SVC_EXTENSION
    329 #if AVC_SYNTAX || SYNTAX_OUTPUT
    330   Void      setBLSyntaxFile( fstream* pFile ) { m_pBLSyntaxFile = pFile; }
    331   fstream* getBLSyntaxFile() { return m_pBLSyntaxFile; }
    332 #endif
     325
    333326protected:
    334327  Void  xGetNewPicBuffer  (TComSlice* pcSlice, TComPic*& rpcPic);
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r818 r820  
    21742174      }
    21752175#endif
    2176 #if AVC_SYNTAX
    2177       pcPic->readBLSyntax( m_ppcTEncTop[0]->getBLSyntaxFile(), SYNTAX_BYTES );
    2178 #endif
    21792176      return;
    21802177    }
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.h

    r815 r820  
    125125  static Int              m_iSPSIdCnt;                    ///< next Id number for SPS   
    126126  static Int              m_iPPSIdCnt;                    ///< next Id number for PPS   
    127 #if AVC_SYNTAX
    128   fstream*                m_pBLSyntaxFile;
    129 #endif
    130127  TEncTop**               m_ppcTEncTop;
    131128  TEncTop*                getLayerEnc(UInt layer)   { return m_ppcTEncTop[layer]; }
     
    246243  Bool      getInterLayerWeightedPredFlag()            { return m_interLayerWeightedPredFlag; }
    247244#endif
    248 #if AVC_SYNTAX
    249   Void      setBLSyntaxFile( fstream* pFile ) { m_pBLSyntaxFile = pFile; }
    250   fstream*  getBLSyntaxFile() { return m_pBLSyntaxFile; }
    251 #endif
    252245  Void      encode( TComPicYuv* pcPicYuvOrg, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsOut, Int iPicIdInGOP );
    253246  Void      encodePrep( TComPicYuv* pcPicYuvOrg );
Note: See TracChangeset for help on using the changeset viewer.