Ignore:
Timestamp:
13 Aug 2015, 17:38:13 (9 years ago)
Author:
tech
Message:

Merged 14.1-update-dev1@1312.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/App/TAppRenderer/TAppRendererTop.cpp

    r1179 r1313  
    4141#include "TAppRendererTop.h"
    4242
    43 #if H_3D
     43#if NH_3D
    4444
    4545// ====================================================================================================================
     
    6767    TVideoIOYuv* pcDepthInput = new TVideoIOYuv;
    6868
    69     pcVideoInput->open( m_pchVideoInputFileList[iViewIdx], false, m_inputBitDepthY, m_inputBitDepthC, m_internalBitDepthY, m_internalBitDepthC);  // read mode
    70     pcDepthInput->open( m_pchDepthInputFileList[iViewIdx], false, m_inputBitDepthY, m_inputBitDepthC, m_internalBitDepthY, m_internalBitDepthC  );  // read mode
    71     pcVideoInput->skipFrames(m_iFrameSkip, m_iSourceWidth, m_iSourceHeight  );
    72     pcDepthInput->skipFrames(m_iFrameSkip, m_iSourceWidth, m_iSourceHeight  );
     69//    ( Char* pchFile, Bool bWriteMode, const Int fileBitDepth[MAX_NUM_CHANNEL_TYPE], const Int MSBExtendedBitDepth[MAX_NUM_CHANNEL_TYPE], const Int internalBitDepth[MAX_NUM_CHANNEL_TYPE] )
     70
     71    pcVideoInput->open( m_pchVideoInputFileList[iViewIdx], false, m_inputBitDepth, m_internalBitDepth, m_internalBitDepth );  // read mode
     72    pcDepthInput->open( m_pchDepthInputFileList[iViewIdx], false, m_inputBitDepth, m_internalBitDepth, m_internalBitDepth );  // read mode
     73    pcVideoInput->skipFrames(m_iFrameSkip, m_iSourceWidth, m_iSourceHeight, CHROMA_420 );
     74    pcDepthInput->skipFrames(m_iFrameSkip, m_iSourceWidth, m_iSourceHeight, CHROMA_420 );
    7375
    7476    m_apcTVideoIOYuvVideoInput.push_back( pcVideoInput );
     
    7981  {
    8082    TVideoIOYuv* pcSynthOutput = new TVideoIOYuv;
    81     pcSynthOutput->open( m_pchSynthOutputFileList[iViewIdx], true, m_outputBitDepthY, m_outputBitDepthC, m_internalBitDepthY, m_internalBitDepthC );  // write mode
     83    pcSynthOutput->open( m_pchSynthOutputFileList[iViewIdx], true, m_outputBitDepth, m_internalBitDepth, m_internalBitDepth );  // write mode
    8284    m_apcTVideoIOYuvSynthOutput.push_back( pcSynthOutput );
    8385  }
     
    148150  Int aiPad[2] = { 0, 0 };
    149151
     152  TComPicYuv* pcNewOrg = new TComPicYuv;
     153  pcNewOrg->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true );
     154
    150155  for ( UInt uiBaseView = 0; uiBaseView < m_iNumberOfInputViews; uiBaseView++ )
    151156  {
     
    153158    TComPicYuv* pcNewDepthPic = new TComPicYuv;
    154159
    155     pcNewVideoPic->create( m_iSourceWidth, m_iSourceHeight, 1, 1, 1 );
     160    pcNewVideoPic->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true );
    156161    apcPicYuvBaseVideo.push_back(pcNewVideoPic);
    157162
    158     pcNewDepthPic->create( m_iSourceWidth, m_iSourceHeight, 1, 1, 1 );
     163    pcNewDepthPic->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true);
    159164    apcPicYuvBaseDepth.push_back(pcNewDepthPic);
    160165
     
    165170      pcNewDepthPic = new TComPicYuv;
    166171
    167       pcNewVideoPic->create( m_iSourceWidth, m_iSourceHeight, 1, 1, 1 );
     172      pcNewVideoPic->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true );
    168173      apcPicYuvLastBaseVideo.push_back(pcNewVideoPic);
    169174
    170       pcNewDepthPic->create( m_iSourceWidth, m_iSourceHeight, 1, 1, 1 );
     175      pcNewDepthPic->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true );
    171176      apcPicYuvLastBaseDepth.push_back(pcNewDepthPic);
    172177    }
     
    175180  // Create Buffer for synthesized View
    176181  TComPicYuv* pcPicYuvSynthOut = new TComPicYuv;
    177   pcPicYuvSynthOut->create( m_iSourceWidth, m_iSourceHeight, 1, 1, 1 );
     182  pcPicYuvSynthOut->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true );
    178183
    179184  Bool bAnyEOS = false;
     
    189194      for(Int iBaseViewIdx=0; iBaseViewIdx < m_iNumberOfInputViews; iBaseViewIdx++ )
    190195      {
    191         m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->read( apcPicYuvBaseVideo[iBaseViewIdx], aiPad  ) ;
     196        m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->read( apcPicYuvBaseVideo[iBaseViewIdx],pcNewOrg, IPCOLOURSPACE_UNCHANGED, aiPad, CHROMA_420  ) ;
    192197
    193198        apcPicYuvBaseVideo[iBaseViewIdx]->extendPicBorder();
     
    195200        bAnyEOS |= m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->isEof();
    196201
    197         m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->read( apcPicYuvBaseDepth[iBaseViewIdx], aiPad  ) ;
     202        m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->read( apcPicYuvBaseDepth[iBaseViewIdx],pcNewOrg, IPCOLOURSPACE_UNCHANGED, aiPad, CHROMA_420  ) ;
    198203        apcPicYuvBaseDepth[iBaseViewIdx]->extendPicBorder();
    199204        bAnyEOS |= m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->isEof();
     
    428433      // Write Output
    429434
    430       m_apcTVideoIOYuvSynthOutput[m_bSweep ? 0 : iSynthViewIdx]->write( pcPicYuvSynthOut, 0, 0, 0, 0 );
     435      m_apcTVideoIOYuvSynthOutput[m_bSweep ? 0 : iSynthViewIdx]->write( pcPicYuvSynthOut, IPCOLOURSPACE_UNCHANGED, 0, 0, 0, 0, CHROMA_420 );
    431436    }
    432437    iFrame++;
     
    435440
    436441  // Delete Buffers
     442  pcNewOrg->destroy();
     443  delete pcNewOrg;
     444
    437445  for ( UInt uiBaseView = 0; uiBaseView < m_iNumberOfInputViews; uiBaseView++ )
    438446  {
     
    468476    render();
    469477    break;
    470 #if H_3D_VSO
     478#if NH_3D_VSO
    471479  case 1:
    472480    renderModel();
     
    490498}
    491499
    492 #if H_3D_VSO
     500#if NH_3D_VSO
    493501Void TAppRendererTop::renderModel()
    494502{
     
    520528      TComPicYuv* pcNewDepthPic = new TComPicYuv;
    521529
    522       pcNewVideoPic->create( m_iSourceWidth, m_iSourceHeight, 1, 1, 1 );
     530      pcNewVideoPic->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true );
    523531      apcPicYuvBaseVideo.push_back(pcNewVideoPic);
    524532
    525       pcNewDepthPic->create( m_iSourceWidth, m_iSourceHeight, 1, 1, 1 );
     533      pcNewDepthPic->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true );
    526534      apcPicYuvBaseDepth.push_back(pcNewDepthPic);
    527535    }
    528536
    529537    Int aiPad[2] = { 0, 0 };
     538    TComPicYuv* pcNewOrg = new TComPicYuv;
     539    pcNewOrg->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true );
    530540
    531541    // Init Model
     
    550560        m_cRenModStrParser.getSingleModelData  ( iViewIdx, 1, iCurModel, iModelNum, iBlendMode, iLeftViewNum, iRightViewNum, iOrgRefNum, iDump ) ;
    551561        cCurModel         .createSingleModel   ( iViewIdx, 1, iModelNum, iLeftViewNum, iRightViewNum, false, iBlendMode );
    552 
    553562      }
    554563    }
     
    556565    // Create Buffer for synthesized View
    557566    TComPicYuv* pcPicYuvSynthOut = new TComPicYuv;
    558     pcPicYuvSynthOut->create( m_iSourceWidth, m_iSourceHeight, 1, 1, 1 );
     567    pcPicYuvSynthOut->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true );
    559568
    560569    Bool bAnyEOS = false;
     
    571580        for(Int iBaseViewIdx=0; iBaseViewIdx < m_iNumberOfInputViews; iBaseViewIdx++ )
    572581        {
    573           m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->read( apcPicYuvBaseVideo[iBaseViewIdx], aiPad  ) ;
     582          m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->read( apcPicYuvBaseVideo[iBaseViewIdx], pcNewOrg, IPCOLOURSPACE_UNCHANGED, aiPad, CHROMA_420  ) ;
    574583          bAnyEOS |= m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->isEof();
    575584
    576           m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->read( apcPicYuvBaseDepth[iBaseViewIdx], aiPad  ) ;
     585          m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->read( apcPicYuvBaseDepth[iBaseViewIdx], pcNewOrg, IPCOLOURSPACE_UNCHANGED, aiPad, CHROMA_420  ) ;
    577586          bAnyEOS |= m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->isEof();
    578587        }
     
    672681
    673682          // Write Output
    674           m_apcTVideoIOYuvSynthOutput[m_bSweep ? 0 : iModelNum]->write( pcPicYuvSynthOut, 0 ,0 ,0, 0 );
     683          m_apcTVideoIOYuvSynthOutput[m_bSweep ? 0 : iModelNum]->write( pcPicYuvSynthOut, IPCOLOURSPACE_UNCHANGED,  0 ,0 ,0, 0, CHROMA_420 );
    675684        }
    676685      }
     
    706715
    707716  Int aiPad[2] = { 0, 0 };
     717  TComPicYuv* pcNewOrg = new TComPicYuv;
     718  pcNewOrg->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true );
     719
    708720
    709721  // Init Model
     
    711723
    712724  AOT( m_iLog2SamplingFactor != 0 );
    713   cCurModel.setupPart( 0, m_iSourceHeight  );
     725
    714726#if H_3D_VSO_EARLY_SKIP
    715727  cCurModel.create( m_iNumberOfInputViews, m_iNumberOfOutputViews, m_iSourceWidth, m_iSourceHeight, m_iShiftPrecision, m_iBlendHoleMargin, false );
     
    717729  cCurModel.create( m_iNumberOfInputViews, m_iNumberOfOutputViews, m_iSourceWidth, m_iSourceHeight, m_iShiftPrecision, m_iBlendHoleMargin );
    718730#endif
     731  cCurModel.setupPart( 0, m_iSourceHeight  );
    719732
    720733  for ( UInt uiBaseView = 0; uiBaseView < m_iNumberOfInputViews; uiBaseView++ )
     
    723736    TComPicYuv* pcNewDepthPic = new TComPicYuv;
    724737
    725     pcNewVideoPic->create( m_iSourceWidth, m_iSourceHeight, 1, 1, 1 );
     738    pcNewVideoPic->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true );
    726739    apcPicYuvBaseVideo.push_back(pcNewVideoPic);
    727740
    728     pcNewDepthPic->create( m_iSourceWidth, m_iSourceHeight, 1, 1, 1 );
     741    pcNewDepthPic->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true );
    729742    apcPicYuvBaseDepth.push_back(pcNewDepthPic);
    730743  }
     
    768781  // Create Buffer for synthesized View
    769782  TComPicYuv* pcPicYuvSynthOut = new TComPicYuv;
    770   pcPicYuvSynthOut->create( m_iSourceWidth, m_iSourceHeight, 1, 1, 1 );
     783  pcPicYuvSynthOut->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true );
    771784
    772785  Bool bAnyEOS = false;
     
    783796      for(Int iBaseViewIdx=0; iBaseViewIdx < m_iNumberOfInputViews; iBaseViewIdx++ )
    784797      {
    785         m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->read( apcPicYuvBaseVideo[iBaseViewIdx], aiPad  ) ;
     798        m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->read( apcPicYuvBaseVideo[iBaseViewIdx], pcNewOrg, IPCOLOURSPACE_UNCHANGED, aiPad, CHROMA_420  ) ;
    786799        bAnyEOS |= m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->isEof();
    787800
    788         m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->read( apcPicYuvBaseDepth[iBaseViewIdx], aiPad  ) ;
     801        m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->read( apcPicYuvBaseDepth[iBaseViewIdx], pcNewOrg, IPCOLOURSPACE_UNCHANGED, aiPad, CHROMA_420  ) ;
    789802        bAnyEOS |= m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->isEof();
    790803
     
    871884
    872885      // Write Output
    873       m_apcTVideoIOYuvSynthOutput[m_bSweep ? 0 : iSynthViewIdx]->write( pcPicYuvSynthOut, 0, 0, 0, 0 );
     886      m_apcTVideoIOYuvSynthOutput[m_bSweep ? 0 : iSynthViewIdx]->write( pcPicYuvSynthOut, IPCOLOURSPACE_UNCHANGED,  0 ,0 ,0, 0, CHROMA_420 );
    874887    }
    875888    iFrame++;
     
    909922  Int aiPad[2] = { 0, 0 };
    910923
     924  TComPicYuv* pcNewOrg = new TComPicYuv;
     925  pcNewOrg->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true );
     926
    911927  for ( UInt uiBaseView = 0; uiBaseView < m_iNumberOfInputViews; uiBaseView++ )
    912928  {
     
    914930    TComPicYuv* pcNewDepthPic = new TComPicYuv;
    915931
    916     pcNewVideoPic->create( m_iSourceWidth, m_iSourceHeight, 1, 1, 1 );
     932    pcNewVideoPic->create( m_iSourceWidth, m_iSourceHeight,CHROMA_420, 1, 1, 1, true );
    917933    apcPicYuvBaseVideo.push_back(pcNewVideoPic);
    918934
    919     pcNewDepthPic->create( m_iSourceWidth, m_iSourceHeight, 1, 1, 1 );
     935    pcNewDepthPic->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true );
    920936    apcPicYuvBaseDepth.push_back(pcNewDepthPic);
     937
    921938
    922939    //Temporal improvement Filter
     
    926943      pcNewDepthPic = new TComPicYuv;
    927944
    928       pcNewVideoPic->create( m_iSourceWidth, m_iSourceHeight, 1, 1, 1 );
     945      pcNewVideoPic->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1 , true);
    929946      apcPicYuvLastBaseVideo.push_back(pcNewVideoPic);
    930947
    931       pcNewDepthPic->create( m_iSourceWidth, m_iSourceHeight, 1, 1, 1 );
     948      pcNewDepthPic->create( m_iSourceWidth, m_iSourceHeight,CHROMA_420, 1, 1, 1 , true);
    932949      apcPicYuvLastBaseDepth.push_back(pcNewDepthPic);
    933950    }
     
    936953  // Create Buffer for synthesized View
    937954  TComPicYuv* pcPicYuvSynthOut = new TComPicYuv;
    938   pcPicYuvSynthOut->create( m_iSourceWidth, m_iSourceHeight, 1, 1, 1 );
     955  pcPicYuvSynthOut->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1 ,1, true);
    939956
    940957  Bool bAnyEOS = false;
     
    950967      for(Int iBaseViewIdx=0; iBaseViewIdx < m_iNumberOfInputViews; iBaseViewIdx++ )
    951968      {
    952         m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->read( apcPicYuvBaseVideo[iBaseViewIdx], aiPad  ) ;
     969        m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->read( apcPicYuvBaseVideo[iBaseViewIdx], pcNewOrg, IPCOLOURSPACE_UNCHANGED,  aiPad, CHROMA_420  ) ;
    953970        apcPicYuvBaseVideo[iBaseViewIdx]->extendPicBorder();
    954971        bAnyEOS |= m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->isEof();
    955972
    956         m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->read( apcPicYuvBaseDepth[iBaseViewIdx], aiPad  ) ;
     973        m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->read( apcPicYuvBaseDepth[iBaseViewIdx], pcNewOrg, IPCOLOURSPACE_UNCHANGED,  aiPad, CHROMA_420  ) ;
    957974        apcPicYuvBaseDepth[iBaseViewIdx]->extendPicBorder();
    958975        bAnyEOS |= m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->isEof();
     
    9971014
    9981015      // Write Output
    999       m_apcTVideoIOYuvSynthOutput[iViewIdx-1]->write( pcPicYuvSynthOut, 0, 0, 0 );
     1016      m_apcTVideoIOYuvSynthOutput[iViewIdx-1]->write( pcPicYuvSynthOut,  IPCOLOURSPACE_UNCHANGED, 0, 0, 0, 0, CHROMA_420 );
    10001017
    10011018    }
     
    10051022
    10061023  // Delete Buffers
     1024
     1025  pcNewOrg->destroy();
     1026  delete pcNewOrg;
     1027
    10071028  for ( UInt uiBaseView = 0; uiBaseView < m_iNumberOfInputViews; uiBaseView++ )
    10081029  {
Note: See TracChangeset for help on using the changeset viewer.