Changeset 12 in 3DVCSoftware for branches/0.2-poznan-univ/source/App/TAppDecoder


Ignore:
Timestamp:
6 Feb 2012, 00:52:17 (13 years ago)
Author:
poznan-univ
Message:

Poznan Tools

  • Depth base motion vector prediction
Location:
branches/0.2-poznan-univ/source/App/TAppDecoder
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/0.2-poznan-univ/source/App/TAppDecoder/TAppDecTop.cpp

    r11 r12  
    6464//  m_iPOCLastDisplay  = -1;
    6565  m_pScaleOffsetFile  = 0;
     66
     67#if POZNAN_MP
     68  m_pcMP = NULL;
     69#endif
    6670}
    6771
     
    7175 
    7276  m_apcBitstream->create( BITS_BUF_SIZE );
     77
     78#if POZNAN_MP
     79  m_pcMP = new TComMP();
     80#endif
    7381}
    7482
     
    8997    free(m_pchReconFile);
    9098  }
     99
     100#if POZNAN_MP
     101  if(m_pcMP) { delete m_pcMP; m_pcMP = NULL; };
     102#endif
    91103}
    92104
     
    163175    if( eNalUnitType == NAL_UNIT_SPS )
    164176    {
    165 #if POZNAN_SYNTH
     177#if POZNAN_CU_SKIP||POZNAN_CU_SYNTH
    166178      if(cComSPS.getViewId()==0 && !cComSPS.isDepth()) // it should be called at first view at the begining of the stream
    167179        initRenderer(cComSPS);
     
    416428        if ( m_pchReconFile )
    417429        {
     430
     431#if POZNAN_NONLINEAR_DEPTH
     432          TComSPS* pcSPS = pcPic->getSlice(0)->getSPS();
     433          TComPicYuv cPicPower;
     434
     435          //pcPic->getPicYuvRec()
     436          cPicPower.create(pcSPS->getWidth(), pcSPS->getHeight(), pcSPS->getMaxCUWidth(), pcSPS->getMaxCUHeight(), pcSPS->getMaxCUDepth() );
     437
     438          pcPic->getPicYuvRec()->power(&cPicPower, 1.0f/pcSPS->getDepthPower());
     439
     440          m_acTVideoIOYuvDepthReconFileList[iViewIdx]->write(&cPicPower, pcSPS->getPad());
     441          cPicPower.destroy();           
     442#else
    418443          m_acTVideoIOYuvDepthReconFileList[iViewIdx]->write( pcPic->getPicYuvRec(), pcPic->getSlice(0)->getSPS()->getPad() );
     444#endif
    419445        }
    420446
     
    544570}
    545571
    546 #if POZNAN_SYNTH
     572#if POZNAN_CU_SYNTH || POZNAN_CU_SKIP
    547573Void TAppDecTop::initRenderer(TComSPS &cComSPS)
    548574{
     
    566592  iNearestViewIdx = 0;
    567593  bRenderFromLeft = iCoddedViewOrderIdx>0?true:false;
    568   //m_cCamParsCollector.getNearestBaseView(iCoddedViewIdx, iNearestViewIdx, iRelDistToLeft, bRenderFromLeft);
    569594
    570595  m_cAvailabilityRenderer.setShiftLUTs(
     
    592617    pcPicYuvAvailView = pcPic->getPicYuvAvail();
    593618  }
     619#if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH
     620  TComPicYuv* pcPicYuvSynthDepthView = pcPic->getPicYuvSynthDepth();
     621  if(!pcPicYuvSynthDepthView)
     622  {
     623    pcPic->addSynthesisDepthBuffer();
     624    pcPicYuvSynthDepthView = pcPic->getPicYuvSynthDepth();
     625  }
     626  m_cAvailabilityRenderer.extrapolateAvailabilityView( getPicFromView( iNearestViewIdx, iCurPoc, true )->getPicYuvRec(), getPicFromView( iNearestViewIdx, iCurPoc, true )->getPicYuvRec(), pcPicYuvSynthDepthView, pcPicYuvAvailView, bRenderFromLeft );
     627 
     628#if POZNAN_OUTPUT_SYNTH
     629      Char acFilenameBaseD[1024];
     630      ::sprintf( acFilenameBaseD,  "SynthDepth_%s_V%d.yuv", ( true ? "Dec" : "Enc" ),iCoddedViewIdx );
     631      pcPicYuvSynthDepthView->dump(acFilenameBaseD, iCurPoc!=0);
     632#endif
     633#endif
    594634
    595635  //m_cAvailabilityRenderer.extrapolateAvailabilityView( xGetPicFromView( iNearestViewIdx, iCurPoc, false )->getPicYuvRec(), xGetPicFromView( iNearestViewIdx, iCurPoc, true )->getPicYuvRec(), pcPicYuvERView, pcPicYuvAvailView, bRenderFromLeft );
    596636  m_cAvailabilityRenderer.extrapolateAvailabilityView( getPicFromView( iNearestViewIdx, iCurPoc, false )->getPicYuvRec(), getPicFromView( iNearestViewIdx, iCurPoc, true )->getPicYuvRec(), pcPicYuvSynthView, pcPicYuvAvailView, bRenderFromLeft );
    597 
     637     
    598638  pcPicYuvAvailView->setBorderExtension( false );//Needed??
    599639  pcPicYuvAvailView->extendPicBorder();//Needed??
     
    613653  }
    614654#endif
    615  
    616 }
    617 #endif
     655
     656}//*/
     657#endif
  • branches/0.2-poznan-univ/source/App/TAppDecoder/TAppDecTop.h

    r11 r12  
    5252#include "../../Lib/TLibCommon/TComDepthMapGenerator.h"
    5353#include "../../Lib/TLibDecoder/TDecTop.h"
    54 #if POZNAN_SYNTH
     54#if POZNAN_CU_SKIP || POZNAN_CU_SYNTH
    5555#include "../../Lib/TLibRenderer/TRenTop.h"
    5656#endif
    5757#include "TAppDecCfg.h"
     58
     59#if POZNAN_MP
     60#include "../../Lib/TLibCommon/TComMP.h"
     61#endif
    5862
    5963// ====================================================================================================================
     
    9094#endif
    9195
    92 #if POZNAN_SYNTH
     96#if POZNAN_CU_SKIP || POZNAN_CU_SYNTH
    9397  TRenTop                         m_cAvailabilityRenderer;
    9498#endif
    9599
     100#if POZNAN_MP
     101  TComMP*                                                 m_pcMP;
     102#endif
    96103
    97104public:
     
    105112  Void  startUsingDepth() ;
    106113
    107 #if POZNAN_SYNTH
     114#if POZNAN_CU_SKIP || POZNAN_CU_SYNTH
    108115  Void  initRenderer(TComSPS &cComSPS);
    109116  Void  storeSynthPicsInBuffer(Int iCoddedViewIdx,Int iCoddedViewOrderIdx,Int iCurPoc,Bool bDepth);
     
    120127#endif
    121128
     129#if POZNAN_MP
     130  TComMP* getMP() { return m_pcMP; }
     131#endif
     132
    122133protected:
    123134  Void  xCreateDecLib     (); ///< create internal classes
Note: See TracChangeset for help on using the changeset viewer.