Ignore:
Timestamp:
1 Nov 2012, 19:22:41 (12 years ago)
Author:
mitsubishi-htm
Message:

Initial integration of VSP into HTM 4.0.1. The version used for JCT3V-B0102 at Shanghai meeting.

  • VC9 project/solution files updated. Other Visual C++ project/solution files are not updated.
  • Linux make file updated.

TODO

  • A second release is expected to include some bug fix and improvements on the interface, e.g. to move switches from macro definition to the configuration file.
  • A third release is expected after being integrated within HTM 5.x, which is to be used for CE1.h anchor.
Location:
branches/HTM-4.0.1-VSP-dev0/source/App/TAppDecoder
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-4.0.1-VSP-dev0/source/App/TAppDecoder/TAppDecTop.cpp

    r105 r166  
    262262    }
    263263  }
     264#if DEBUGIMGOUT
     265  for(Int viewDepthIdx=0; viewDepthIdx<m_tVideoIOYuvReconDbgFile.size() ; viewDepthIdx++)
     266  {
     267    if( m_tVideoIOYuvReconDbgFile[viewDepthIdx] )
     268    {
     269      m_tVideoIOYuvReconDbgFile[viewDepthIdx]->close();
     270      delete m_tVideoIOYuvReconDbgFile[viewDepthIdx];
     271      m_tVideoIOYuvReconDbgFile[viewDepthIdx] = NULL ;
     272    }
     273  }
     274#endif
    264275
    265276  for(Int viewDepthIdx=0; viewDepthIdx<m_tDecTop.size() ; viewDepthIdx++)
     
    330341#endif
    331342      }
     343#if DEBUGIMGOUT
     344#if PIC_CROPPING
     345      m_tVideoIOYuvReconDbgFile[viewDepthId]->write( pcPic->getPicYuvRecDbg(), sps->getPicCropLeftOffset(), sps->getPicCropRightOffset(), sps->getPicCropTopOffset(), sps->getPicCropBottomOffset() );
     346#else
     347      m_tVideoIOYuvReconDbgFile[viewDepthId]->write( pcPic->getPicYuvRecDbg(), pcPic->getSlice(0)->getSPS()->getPad() );
     348#endif
     349#endif   
    332350     
    333351      // update POC of display order
     
    388406#endif
    389407      }
     408#if DEBUGIMGOUT
     409#if PIC_CROPPING
     410      m_tVideoIOYuvReconDbgFile[viewDepthId]->write( pcPic->getPicYuvRecDbg(), sps->getPicCropLeftOffset(), sps->getPicCropRightOffset(), sps->getPicCropTopOffset(), sps->getPicCropBottomOffset() );
     411#else
     412      m_tVideoIOYuvReconDbgFile[viewDepthId]->write( pcPic->getPicYuvRecDbg(), pcPic->getSlice(0)->getSPS()->getPad() );
     413#endif
     414#endif
    390415     
    391416      // update POC of display order
     
    476501  }
    477502#endif
    478 
     503#if DEBUGIMGOUT
     504  while( m_tVideoIOYuvReconDbgFile.size() < newNumberOfViewDepth)
     505  {
     506    m_tVideoIOYuvReconDbgFile.push_back(new TVideoIOYuv);
     507    Char buffer[4];
     508    sprintf(buffer,"_%i", (Int)(m_tVideoIOYuvReconDbgFile.size()-1) / 2 );
     509    Char* nextFilename = NULL;
     510    if( (m_tVideoIOYuvReconDbgFile.size() % 2) == 0 )
     511    {
     512      Char* pchTempFilename = NULL;
     513      xAppendToFileNameEnd( "DebugImg.yuv", "_depth", pchTempFilename);
     514      xAppendToFileNameEnd( pchTempFilename, buffer, nextFilename);
     515      free ( pchTempFilename );
     516    }
     517    else
     518    {
     519      xAppendToFileNameEnd( "DebugImg.yuv", buffer, nextFilename);
     520    }
     521    if( isDepth || ( !isDepth && (m_tVideoIOYuvReconDbgFile.size() % 2) == 1 ) )
     522    {
     523      m_tVideoIOYuvReconDbgFile.back()->open( nextFilename, true, m_outputBitDepth, g_uiBitDepth + g_uiBitIncrement );
     524    }
     525    free ( nextFilename );
     526  }
     527#endif
    479528  while( m_pocLastDisplay.size() < newNumberOfViewDepth )
    480529  {
     
    533582  return pcPic;
    534583}
     584
     585#if VSP_N
     586Void TAppDecTop::storeVSPInBuffer(TComPic* pcPicVSP, TComPic* pcPicAvail, Int iCodedViewIdx, Int iCoddedViewOrderIdx, Int iCurPoc, Bool bDepth)
     587{
     588  //first view does not have VSP
     589#if VSP_TEXT_ONLY
     590  if((iCodedViewIdx == 0)||(bDepth))
     591#else
     592  if((iCodedViewIdx == 0))
     593#endif
     594    return;
     595  pcPicVSP->getSlice(0)->setPOC( iCurPoc );
     596  Int iNeighborViewId = 0;
     597  Bool bRenderFromLeft;
     598  //check if the neighboring view is situated to the left of the current view
     599  bRenderFromLeft = ((iCoddedViewOrderIdx)>0);
     600  //pointers to buffers   
     601  TComPicYuv* pcPicYuvVideo = getPicFromView(iNeighborViewId, iCurPoc, bDepth)->getPicYuvRec();
     602  TComPicYuv* pcPicYuvDepth = getPicFromView(iNeighborViewId, iCurPoc, true)->getPicYuvRec();
     603  TComPicYuv* pcPicYuvVSP   = pcPicVSP->getPicYuvRec();
     604  TComPicYuv* pcPicYuvAvail = pcPicAvail->getPicYuvRec();
     605  //verifying buffers
     606  AOF(pcPicYuvVideo);
     607  AOF(pcPicYuvDepth);
     608  AOF(pcPicYuvVSP);
     609  AOF(pcPicYuvAvail);
     610
     611  TComPic* pcPic = getPicFromView( iCodedViewIdx, iCurPoc, bDepth );
     612  pcPic->setPicYuvSynth( pcPicYuvVSP );
     613  pcPic->setPicYuvAvail( pcPicYuvAvail );
     614
     615  //setting look-up table
     616#if 0
     617  m_cVSPRendererTop.setShiftLUTs(
     618      m_cCamParsCollector.getBaseViewShiftLUTD()[iNeighborViewId][iCodedViewIdx],
     619      m_cCamParsCollector.getBaseViewShiftLUTI()[iNeighborViewId][iCodedViewIdx],
     620      m_cCamParsCollector.getBaseViewShiftLUTI()[iNeighborViewId][iCodedViewIdx],
     621      m_cCamParsCollector.getBaseViewShiftLUTD()[iNeighborViewId][iCodedViewIdx],
     622      m_cCamParsCollector.getBaseViewShiftLUTI()[iNeighborViewId][iCodedViewIdx],
     623      m_cCamParsCollector.getBaseViewShiftLUTI()[iNeighborViewId][iCodedViewIdx],
     624      -1
     625      );
     626#else
     627#if NTT_SUBPEL
     628  m_cVSPRendererTop.setShiftLUTs(
     629      m_cCamParsCollector.getBaseViewShiftLUTD()[iNeighborViewId][iCodedViewIdx],
     630      m_cCamParsCollector.getBaseViewIPelLUT  ()[iNeighborViewId][iCodedViewIdx],
     631      NULL,
     632      m_cCamParsCollector.getBaseViewShiftLUTD()[iNeighborViewId][iCodedViewIdx],
     633      m_cCamParsCollector.getBaseViewIPelLUT  ()[iNeighborViewId][iCodedViewIdx],
     634      NULL,
     635      -1
     636      );
     637  m_cVSPRendererTop.setFposLUTs(
     638      m_cCamParsCollector.getBaseViewFPosLUT()[iNeighborViewId][iCodedViewIdx],
     639      m_cCamParsCollector.getBaseViewFPosLUT()[iNeighborViewId][iCodedViewIdx]
     640      );
     641#else
     642  m_cVSPRendererTop.setShiftLUTs(
     643      m_cCamParsCollector.getBaseViewShiftLUTD()[iNeighborViewId][iCodedViewIdx],
     644      m_cCamParsCollector.getBaseViewShiftLUTI()[iNeighborViewId][iCodedViewIdx],
     645      NULL,
     646      m_cCamParsCollector.getBaseViewShiftLUTD()[iNeighborViewId][iCodedViewIdx],
     647      m_cCamParsCollector.getBaseViewShiftLUTI()[iNeighborViewId][iCodedViewIdx],
     648      NULL,
     649      -1
     650      );
     651#endif
     652#endif
     653
     654#if NTT_SUBPEL
     655  m_cVSPRendererTop.setInterpolationMode( (bDepth ? 0 : 5) );
     656#endif
     657
     658  //extrapolate from view iNeighborViewId to the current view, storing in the VSP buffer
     659  //m_cVSPRendererTop.extrapolateView(pcPicYuvVideo,pcPicYuvDepth, pcPicYuvVSP, bRenderFromLeft);
     660  m_cVSPRendererTop.extrapolateAvailabilityView(pcPicYuvVideo,pcPicYuvDepth, pcPicYuvVSP, pcPicYuvAvail, bRenderFromLeft);
     661
     662  // mark it should be extended
     663  pcPicVSP->getPicYuvRec()->setBorderExtension(false);
     664  pcPicVSP->getPicYuvRec()->extendPicBorder(); //will extend the border for prediction using pixels outside the frame
     665  pcPicAvail->getPicYuvRec()->setBorderExtension(false);
     666  pcPicAvail->getPicYuvRec()->extendPicBorder();
     667#if VSP_N_DUMP
     668  {
     669    Char acFilenameBase[1024];
     670    ::sprintf(acFilenameBase,"VSP_dec_%sv%d_%dx%d_%04d.yuv",(bDepth?"D":"T"),iCodedViewIdx,pcPicYuvVSP->getWidth(), pcPicYuvVSP->getHeight(), iCurPoc);
     671    pcPicYuvVSP->dump(acFilenameBase,0);
     672    //pcPicYuvAvail->dump(acFilenameBase,iCurPoc!=0);
     673  }
     674#endif
     675}
     676#endif
     677
    535678//! \}
  • branches/HTM-4.0.1-VSP-dev0/source/App/TAppDecoder/TAppDecTop.h

    r100 r166  
    4949#include "TLibDecoder/TDecTop.h"
    5050#include "TAppDecCfg.h"
     51#if VSP_N
     52#include "../../Lib/TLibRenderer/TRenTop.h"
     53#endif
    5154
    5255//! \ingroup TAppDecoder
     
    6568
    6669  std::vector<TVideoIOYuv*>       m_tVideoIOYuvReconFile;         ///< reconstruction YUV class
     70#if DEBUGIMGOUT
     71  std::vector<TVideoIOYuv*>       m_tVideoIOYuvReconDbgFile;      ///< debug YUV class
     72#endif
    6773
    6874  // for output control
     
    7985  TComSPSAccess                   m_cSPSAccess;
    8086  TComAUPicAccess                 m_cAUPicAccess;
     87#endif
     88
     89#if VSP_N
     90  TRenTop                         m_cVSPRendererTop;
    8191#endif
    8292
     
    107117#endif
    108118
     119#if VSP_N
     120  Bool              getUseDepth   () { return m_useDepth; }
     121  TRenTop*          getVSPRendererTop(){ return &m_cVSPRendererTop; }
     122  Void              storeVSPInBuffer(TComPic* pcPicVSP, TComPic* pcPicAvail, Int iCodedViewIdx, Int iCoddedViewOrderIdx, Int iCurPoc, Bool bDepth);
     123#endif
     124
    109125protected:
    110126//  Void  xCreateDecLib     (); ///< create internal classes
Note: See TracChangeset for help on using the changeset viewer.