Changeset 1313 in 3DVCSoftware for trunk/source/App/TAppRenderer


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

Merged 14.1-update-dev1@1312.

Location:
trunk/source/App/TAppRenderer
Files:
5 edited

Legend:

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

    r1179 r1313  
    3434
    3535#include <time.h>
    36 #include "../../Lib/TLibCommon/TypeDef.h"
    37 #if H_3D
     36#include "../../Lib/TLibCommon/CommonDef.h"
     37#if NH_3D
    3838#include "TAppRendererTop.h"
    3939// ====================================================================================================================
     
    8989}
    9090
    91 #endif // H_3D
     91#endif // NH_3D
    9292
  • trunk/source/App/TAppRenderer/TAppRendererCfg.cpp

    r1179 r1313  
    4444#include "../../Lib/TAppCommon/program_options_lite.h"
    4545
    46 #if H_3D
     46#if NH_3D
    4747
    4848using namespace std;
     
    131131    ("SynthOutputFile_%d,s_%d", m_pchSynthOutputFileList,    (Char *) 0, MAX_OUTPUT_VIEW_NUM, "Synthesized Yuv output file name %d")
    132132
    133     ("InputBitDepth",           m_inputBitDepthY,                     8, "Bit-depth of input file")
    134     ("OutputBitDepth",          m_outputBitDepthY,                    0, "Bit-depth of output file (default:InternalBitDepth)")
    135     ("InternalBitDepth",        m_internalBitDepthY,                  0, "Bit-depth the renderer operates at. (default:InputBitDepth)"                                                                          "If different to InputBitDepth, source data will be converted")
    136 
    137     ("InputBitDepthC",        m_inputBitDepthC,    0, "As per InputBitDepth but for chroma component. (default:InputBitDepth)")
    138     ("OutputBitDepthC",       m_outputBitDepthC,   0, "As per OutputBitDepth but for chroma component. (default:InternalBitDepthC)")
    139     ("InternalBitDepthC",     m_internalBitDepthC, 0, "As per InternalBitDepth but for chroma component. (default:IntrenalBitDepth)")
     133    ("InputBitDepth",           m_inputBitDepth[0],                     8, "Bit-depth of input file")
     134    ("OutputBitDepth",          m_outputBitDepth[0],                    0, "Bit-depth of output file (default:InternalBitDepth)")
     135    ("InternalBitDepth",        m_internalBitDepth[0],                  0, "Bit-depth the renderer operates at. (default:InputBitDepth)"                                                                          "If different to InputBitDepth, source data will be converted")
     136
     137    ("InputBitDepthC",        m_inputBitDepth[1],    0, "As per InputBitDepth but for chroma component. (default:InputBitDepth)")
     138    ("OutputBitDepthC",       m_outputBitDepth[1],   0, "As per OutputBitDepth but for chroma component. (default:InternalBitDepthC)")
     139    ("InternalBitDepthC",     m_internalBitDepth[1], 0, "As per InternalBitDepth but for chroma component. (default:IntrenalBitDepth)")
    140140
    141141    /* Source Specification */
     
    186186
    187187  /* rules for input, output and internal bitdepths as per help text */
    188   if (!m_internalBitDepthY) { m_internalBitDepthY = m_inputBitDepthY; }
    189   if (!m_internalBitDepthC) { m_internalBitDepthC = m_internalBitDepthY; }
    190   if (!m_inputBitDepthC)    { m_inputBitDepthC    = m_inputBitDepthY; }
    191   if (!m_outputBitDepthY)   { m_outputBitDepthY   = m_internalBitDepthY; }
    192   if (!m_outputBitDepthC)   { m_outputBitDepthC   = m_internalBitDepthC; }
    193 
    194   xSetGlobal();
     188  if (!m_internalBitDepth[0]) { m_internalBitDepth[0] = m_inputBitDepth[0]; }
     189  if (!m_internalBitDepth[1]) { m_internalBitDepth[1] = m_internalBitDepth[0]; }
     190  if (!m_inputBitDepth[1])    { m_inputBitDepth[1]    = m_inputBitDepth[0]; }
     191  if (!m_outputBitDepth[0])   { m_outputBitDepth[0]   = m_internalBitDepth[0]; }
     192  if (!m_outputBitDepth[1])   { m_outputBitDepth[1]   = m_internalBitDepth[1]; }
    195193
    196194  UInt  uiInputBitDepth   = 8;
     
    275273
    276274  // bit depth
    277   xConfirmPara( m_internalBitDepthC != m_internalBitDepthY,  "InternalBitDepth for luma and chroma must be equal. ");
    278   xConfirmPara( m_inputBitDepthY < 8,                        "InputBitDepth must be at least 8" );
    279   xConfirmPara( m_inputBitDepthC < 8,                        "InputBitDepthC must be at least 8" );
     275  xConfirmPara( m_internalBitDepth[0] != m_internalBitDepth[1],  "InternalBitDepth for luma and chroma must be equal. ");
     276  xConfirmPara( m_inputBitDepth[0] < 8,                        "InputBitDepth must be at least 8" );
     277  xConfirmPara( m_inputBitDepth[1] < 8,                        "InputBitDepthC must be at least 8" );
    280278
    281279  // camera specification
     
    308306
    309307  Int iNumNonNULL;
    310   for (iNumNonNULL = 0; (iNumNonNULL < m_iNumberOfInputViews)  && m_pchDepthInputFileList[iNumNonNULL]; iNumNonNULL++);  xConfirmPara( iNumNonNULL < m_iNumberOfInputViews,  "Number of DepthInputFiles  must be greater than or equal to number of BaseViewNumbers" );
    311   for (iNumNonNULL = 0; (iNumNonNULL < m_iNumberOfInputViews)  && m_pchVideoInputFileList[iNumNonNULL]; iNumNonNULL++);  xConfirmPara( iNumNonNULL < m_iNumberOfInputViews,  "Number of DepthInputFiles  must be greater than or equal to number of BaseViewNumbers" );
     308  for (iNumNonNULL = 0; (iNumNonNULL < m_iNumberOfInputViews)  && m_pchDepthInputFileList[iNumNonNULL]; iNumNonNULL++) {};  xConfirmPara( iNumNonNULL < m_iNumberOfInputViews,  "Number of DepthInputFiles  must be greater than or equal to number of BaseViewNumbers" );
     309  for (iNumNonNULL = 0; (iNumNonNULL < m_iNumberOfInputViews)  && m_pchVideoInputFileList[iNumNonNULL]; iNumNonNULL++) {};  xConfirmPara( iNumNonNULL < m_iNumberOfInputViews,  "Number of DepthInputFiles  must be greater than or equal to number of BaseViewNumbers" );
    312310
    313311
    314312  if ( !m_bSweep )
    315313  {
    316   for (iNumNonNULL = 0; (iNumNonNULL < m_iNumberOfOutputViews) && m_pchSynthOutputFileList[iNumNonNULL]; iNumNonNULL++); xConfirmPara( iNumNonNULL < m_iNumberOfOutputViews, "Number of SynthOutputFiles must be greater than or equal to number of SynthViewNumbers" );
     314    for (iNumNonNULL = 0; (iNumNonNULL < m_iNumberOfOutputViews) && m_pchSynthOutputFileList[iNumNonNULL]; iNumNonNULL++) {}; xConfirmPara( iNumNonNULL < m_iNumberOfOutputViews, "Number of SynthOutputFiles must be greater than or equal to number of SynthViewNumbers" );
    317315  }
    318316  else
     
    504502}
    505503
    506 Void TAppRendererCfg::xGetMaxPrecision( std::vector< Int > aiIn, Int& iPrecBefore, Int& iPrecAfter )
     504Void TAppRendererCfg::xGetMaxPrecision( IntAry1d aiIn, Int& iPrecBefore, Int& iPrecAfter )
    507505{
    508506  iPrecBefore = 0;
     
    525523}
    526524
    527 Void TAppRendererCfg::xSetGlobal()
    528 {
    529   // set max CU width & height 
    530   g_uiMaxCUWidth   = 0;
    531   g_uiMaxCUHeight  = 0; 
    532 }
    533 
    534525#endif
  • trunk/source/App/TAppRenderer/TAppRendererCfg.h

    r1179 r1313  
    4747#include <vector>
    4848
    49 #if H_3D
     49#if NH_3D
    5050
    5151// ====================================================================================================================
     
    6666
    6767
    68   // bit-depth      ( Currently interal luma and chroma bit-depth are required to be equal. )
    69   Int                m_inputBitDepthY;                 ///< bit-depth of input file (luma component)
    70   Int                m_inputBitDepthC;                 ///< bit-depth of input file (chroma component)
    71   Int                m_outputBitDepthY;                ///< bit-depth of output file (luma component)
    72   Int                m_outputBitDepthC;                ///< bit-depth of output file (chroma component)
    73   Int                m_internalBitDepthY;              ///< bit-depth renderer operates at in luma (input/output files will be converted)
    74   Int                m_internalBitDepthC;              ///< bit-depth renderer operates at in chroma (input/output files will be converted)
     68  // bit-depth      ( Currently internal, output and input luma and chroma bit-depth are required to be equal to 8 )
     69  Int                m_inputBitDepth[2];               ///< bit-depth of input file (luma/chroma component) 
     70  Int                m_outputBitDepth[2];              ///< bit-depth of output file (luma/chroma component)   
     71  Int                m_internalBitDepth[2];            ///< bit-depth renderer operates at in luma/chroma (input/output files will be converted)
    7572
    7673
     
    123120  Void xPrintParameter ();                              ///< print configuration values
    124121  Void xPrintUsage     ();                              ///< print usage
    125   Void xSetGlobal();
    126122
    127123  Void xCreateFileNames();
    128   Void xGetMaxPrecision( std::vector< Int > adIn, Int& iPrecBefore, Int& iPrecAfter );
     124  Void xGetMaxPrecision( IntAry1d adIn, Int& iPrecBefore, Int& iPrecAfter );
    129125  Void xAddNumberToFileName( Char* pchSourceFileName, Char*& rpchTargetFileName, Int iNumberToAdd, UInt uiPrecBefore, UInt uiPrecAfter );
    130126public:
     
    142138
    143139#endif // __TAppRENDERERCFG__
    144 #endif // H_3D
     140#endif // NH_3D
  • 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  {
  • trunk/source/App/TAppRenderer/TAppRendererTop.h

    r1179 r1313  
    3939#ifndef __TAppRendererTOP__
    4040#define __TAppRendererTOP__
    41 #include "../../Lib/TLibCommon/TypeDef.h"
    42 #if H_3D
     41#include "../../Lib/TLibCommon/CommonDef.h"
     42#if NH_3D
    4343#include "../../Lib/TLibRenderer/TRenTop.h"
    4444#include "../../Lib/TLibVideoIO/TVideoIOYuv.h"
     
    6868  Void  xInitLib          ();                               ///< initialize renderer class
    6969  Void  xDestroyLib       ();                               ///< destroy renderer class and video io
    70 #if H_3D_VSO
     70#if NH_3D_VSO
    7171  Void  xRenderModelFromString();                           ///< render using model using setup string
    7272  Void  xRenderModelFromNums();                             ///< render using model using synth view numbers
     
    7878
    7979  Void  render      ();                               ///< main encoding function
    80 #if H_3D_VSO
     80#if NH_3D_VSO
    8181  Void  renderModel ();
    8282#endif
     
    8787
    8888
    89 #endif // H_3D
     89#endif // NH_3D
    9090#endif // __TAppRendererTOP__
Note: See TracChangeset for help on using the changeset viewer.