Changeset 55 in SHVCSoftware for trunk/source/Lib/TLibDecoder


Ignore:
Timestamp:
4 Mar 2013, 22:43:28 (12 years ago)
Author:
seregin
Message:

Reintegrate SHM-1.1-dev branch into the trunk

Location:
trunk/source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/source

  • trunk/source/Lib/TLibDecoder/TDecCu.cpp

    r17 r55  
    546546 
    547547  //===== get prediction signal =====
    548 #if INTRA_BL
     548#if INTRA_BL && !NO_RESIDUAL_FLAG_FOR_BLPRED
    549549  if(pcCU->isIntraBL ( uiAbsPartIdx ) )
    550550  {
     
    651651 
    652652  //===== get prediction signal =====
    653 #if INTRA_BL
     653#if INTRA_BL && !NO_RESIDUAL_FLAG_FOR_BLPRED
    654654  if(pcCU->isIntraBL ( uiAbsPartIdx ) )
    655655  {
  • trunk/source/Lib/TLibDecoder/TDecTop.cpp

    r30 r55  
    8181  memset(m_cIlpPic, 0, sizeof(m_cIlpPic));
    8282#endif
     83#if AVC_SYNTAX || SYNTAX_OUTPUT
     84  m_pBLSyntaxFile = NULL;
     85#endif
    8386
    8487}
     
    335338
    336339  m_cGopDecoder.filterPicture(pcPic);
     340
     341#if SYNTAX_OUTPUT
     342  pcPic->wrireBLSyntax( getBLSyntaxFile(), SYNTAX_BYTES );
     343#endif
    337344
    338345  TComSlice::sortPicList( m_cListPic ); // sorting for application output
     
    554561  if (m_bFirstSliceInPicture)
    555562  {
    556 
    557563#if AVC_BASE
    558564  if( m_layerId == 1 )
    559565  {
    560566    TComPic* pBLPic = (*m_ppcTDecTop[0]->getListPic()->begin());
    561     FILE* pFile = m_ppcTDecTop[0]->getBLReconFile();
    562     UInt uiWidth = pBLPic->getPicYuvRec()->getWidth();
    563     UInt uiHeight = pBLPic->getPicYuvRec()->getHeight();
     567    fstream* pFile = m_ppcTDecTop[0]->getBLReconFile();
     568    UInt uiWidth    = pBLPic->getPicYuvRec()->getWidth() - pBLPic->getPicYuvRec()->getPicCropLeftOffset() - pBLPic->getPicYuvRec()->getPicCropRightOffset();;
     569    UInt uiHeight   = pBLPic->getPicYuvRec()->getHeight() - pBLPic->getPicYuvRec()->getPicCropTopOffset() - pBLPic->getPicYuvRec()->getPicCropBottomOffset();
    564570       
    565     if( pFile )
    566     {
    567       fseek( pFile, m_apcSlicePilot->getPOC() * uiWidth * uiHeight * 3 / 2, SEEK_SET );
     571    if( pFile->good() )
     572    {
     573      UInt64 uiPos = (UInt64) m_apcSlicePilot->getPOC() * uiWidth * uiHeight * 3 / 2;
     574
     575      pFile->seekg((UInt)uiPos, ios::beg );
    568576
    569577      Pel* pPel = pBLPic->getPicYuvRec()->getLumaAddr();
     
    573581        for( Int j = 0; j < uiWidth; j++ )
    574582        {
    575           pPel[j] = fgetc( pFile );
     583          pPel[j] = pFile->get();
    576584        }
    577585        pPel += uiStride;
     
    584592        for( Int j = 0; j < uiWidth/2; j++ )
    585593        {
    586           pPel[j] = fgetc( pFile );
     594          pPel[j] = pFile->get();
    587595        }
    588596        pPel += uiStride;
     
    595603        for( Int j = 0; j < uiWidth/2; j++ )
    596604        {
    597           pPel[j] = fgetc( pFile );
     605          pPel[j] = pFile->get();
    598606        }
    599607        pPel += uiStride;
     
    737745  {
    738746    pcSlice->checkCRA(pcSlice->getRPS(), m_pocCRA, m_prevRAPisBLA, m_cListPic);
    739 #if !REF_IDX_FRAMEWORK
     747#if !REF_IDX_FRAMEWORK || AVC_SYNTAX
    740748    // Set reference list
    741749    pcSlice->setRefPicList( m_cListPic );
     
    747755#if AVC_BASE
    748756      pcSlice->setBaseColPic ( *m_ppcTDecTop[0]->getListPic()->begin() );
     757#if AVC_SYNTAX
     758      TComPic* pBLPic = pcSlice->getBaseColPic();
     759      if( pcSlice->getPOC() == 0 )
     760      {
     761        // initialize partition order.
     762        UInt* piTmp = &g_auiZscanToRaster[0];
     763        initZscanToRaster( pBLPic->getPicSym()->getMaxDepth() + 1, 1, 0, piTmp );
     764        initRasterToZscan( pBLPic->getPicSym()->getMaxCUWidth(), pBLPic->getPicSym()->getMaxCUHeight(), pBLPic->getPicSym()->getMaxDepth() + 1 );
     765      }     
     766      pBLPic->getSlice( 0 )->initBaseLayerRPL( pcSlice );
     767      pBLPic->readBLSyntax( m_ppcTDecTop[0]->getBLSyntaxFile(), SYNTAX_BYTES );
     768#endif
     769
    749770#else
    750771      TDecTop *pcTDecTop = (TDecTop *)getLayerDec( m_layerId-1 );
     
    767788
    768789#if REF_IDX_FRAMEWORK
     790#if !AVC_SYNTAX
    769791    // Set reference list
    770792    pcSlice->setRefPicList( m_cListPic );
     793#endif
    771794    if(m_layerId > 0)
    772795    {
     
    9791002        {
    9801003#if SVC_UPSAMPLING
     1004#if AVC_SYNTAX
     1005          TComSPS* sps = new TComSPS();
     1006          pBLPic->create( m_ppcTDecTop[0]->getBLWidth(), m_ppcTDecTop[0]->getBLHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, sps, true);
     1007#else
    9811008          pBLPic->create( m_ppcTDecTop[0]->getBLWidth(), m_ppcTDecTop[0]->getBLHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, NULL, true);
     1009#endif
    9821010#else
    9831011          pBLPic->create( m_ppcTDecTop[0]->getBLWidth(), m_ppcTDecTop[0]->getBLHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, true);
  • trunk/source/Lib/TLibDecoder/TDecTop.h

    r28 r55  
    127127  TDecTop**               m_ppcTDecTop;
    128128#if AVC_BASE
    129   FILE*                   m_pBLReconFile;
     129  fstream*                m_pBLReconFile;
    130130  Int                     m_iBLSourceWidth;
    131131  Int                     m_iBLSourceHeight;
    132132#endif
    133133#endif
     134#if AVC_SYNTAX || SYNTAX_OUTPUT
     135  fstream*               m_pBLSyntaxFile;
     136#endif
    134137#if REF_IDX_FRAMEWORK
    135138  TComPic*                m_cIlpPic[MAX_NUM_REF];                    ///<  Inter layer Prediction picture =  upsampled picture
     
    165168  TDecTop*            getLayerDec(UInt layer)   { return m_ppcTDecTop[layer]; }
    166169#if AVC_BASE
    167   Void      setBLReconFile( FILE* pFile ) { m_pBLReconFile = pFile; }
    168   FILE*     getBLReconFile() { return m_pBLReconFile; }
     170  Void      setBLReconFile( fstream* pFile ) { m_pBLReconFile = pFile; }
     171  fstream*  getBLReconFile() { return m_pBLReconFile; }
    169172  Void      setBLsize( Int iWidth, Int iHeight ) { m_iBLSourceWidth = iWidth; m_iBLSourceHeight = iHeight; }
    170173  Int       getBLWidth() { return  m_iBLSourceWidth; }
    171174  Int       getBLHeight() { return  m_iBLSourceHeight; }
    172175#endif
     176#endif
     177#if AVC_SYNTAX || SYNTAX_OUTPUT
     178  Void      setBLSyntaxFile( fstream* pFile ) { m_pBLSyntaxFile = pFile; }
     179  fstream* getBLSyntaxFile() { return m_pBLSyntaxFile; }
    173180#endif
    174181#if REF_IDX_FRAMEWORK
Note: See TracChangeset for help on using the changeset viewer.