Ignore:
Timestamp:
31 Dec 2012, 18:33:14 (12 years ago)
Author:
mitsubishi-htm
Message:

A final release, as planned

  • Migrate to HTM 5.1
  • For VC project files, only VC9 file is updated
  • To be used as an additional anchor for CE1.h for 3rd JCTVC meeting at Geneva
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibRenderer/TRenModel.cpp

    r193 r213  
    3535#include "TRenFilter.h"
    3636#include "TRenModel.h"
    37 
     37#if !QC_MVHEVC_B0046
    3838///////////  TRENMODEL //////////////////////
    3939TRenModel::TRenModel()
     
    4242  m_iWidth             = -1;
    4343  m_iHeight            = -1;
    44 #if FIX_VSO_SETUP
    4544  m_iUsedHeight        = -1;
    46 #endif
    4745  m_iNumOfBaseViews    = -1;
    4846  m_iSampledWidth      = -1;
     
    437435{
    438436  AOT( iViewNum < 0 || iViewNum > m_iNumOfBaseViews );
    439 #if FIX_VSO_SETUP
    440437  AOF( pcPicYuvVideoData->getHeight() >= m_iUsedHeight + m_uiHorOff && pcPicYuvVideoData->getWidth() == m_iWidth );
    441438  AOF( pcPicYuvDepthData->getHeight() >= m_iUsedHeight + m_uiHorOff && pcPicYuvDepthData->getWidth() == m_iWidth );
    442 #else
    443   AOF( pcPicYuvVideoData->getHeight() <= m_iHeight + m_uiHorOff || pcPicYuvVideoData->getWidth() == m_iWidth );
    444   AOF( pcPicYuvDepthData->getHeight() <= m_iHeight + m_uiHorOff || pcPicYuvDepthData->getWidth() == m_iWidth );
    445 #endif
    446439
    447440  pcPicYuvVideoData->extendPicBorder();
    448441
    449 #if FIX_VSO_SETUP
    450442  TRenFilter::sampleHorUp   ( m_iShiftPrec, pcPicYuvVideoData->getLumaAddr() +  m_uiHorOff        * pcPicYuvVideoData->getStride () , pcPicYuvVideoData->getStride() , m_iWidth,      m_iUsedHeight,      m_aapiCurVideoPel[ iViewNum ][0], m_aaiCurVideoStrides[iViewNum][0] );
    451443  TRenFilter::sampleCUpHorUp( m_iShiftPrec, pcPicYuvVideoData->getCbAddr()   + (m_uiHorOff >> 1 ) * pcPicYuvVideoData->getCStride() , pcPicYuvVideoData->getCStride(), m_iWidth >> 1, m_iUsedHeight >> 1, m_aapiCurVideoPel[ iViewNum ][1], m_aaiCurVideoStrides[iViewNum][1] );
    452444  TRenFilter::sampleCUpHorUp( m_iShiftPrec, pcPicYuvVideoData->getCrAddr()   + (m_uiHorOff >> 1 ) * pcPicYuvVideoData->getCStride() , pcPicYuvVideoData->getCStride(), m_iWidth >> 1, m_iUsedHeight >> 1, m_aapiCurVideoPel[ iViewNum ][2], m_aaiCurVideoStrides[iViewNum][2] );
    453445  TRenFilter::copy          (               pcPicYuvDepthData->getLumaAddr() +  m_uiHorOff        * pcPicYuvDepthData->getStride () , pcPicYuvDepthData->getStride(),  m_iWidth,      m_iUsedHeight,      m_apiCurDepthPel [ iViewNum],     m_aiCurDepthStrides [iViewNum]    );
    454 #else
    455   TRenFilter::sampleHorUp   ( m_iShiftPrec, pcPicYuvVideoData->getLumaAddr() +  m_uiHorOff        * pcPicYuvVideoData->getStride () , pcPicYuvVideoData->getStride() , m_iWidth,      m_iHeight,      m_aapiCurVideoPel[ iViewNum ][0], m_aaiCurVideoStrides[iViewNum][0] );
    456   TRenFilter::sampleCUpHorUp( m_iShiftPrec, pcPicYuvVideoData->getCbAddr()   + (m_uiHorOff >> 1 ) * pcPicYuvVideoData->getCStride() , pcPicYuvVideoData->getCStride(), m_iWidth >> 1, m_iHeight >> 1, m_aapiCurVideoPel[ iViewNum ][1], m_aaiCurVideoStrides[iViewNum][1] );
    457   TRenFilter::sampleCUpHorUp( m_iShiftPrec, pcPicYuvVideoData->getCrAddr()   + (m_uiHorOff >> 1 ) * pcPicYuvVideoData->getCStride() , pcPicYuvVideoData->getCStride(), m_iWidth >> 1, m_iHeight >> 1, m_aapiCurVideoPel[ iViewNum ][2], m_aaiCurVideoStrides[iViewNum][2] );
    458   TRenFilter::copy          (               pcPicYuvDepthData->getLumaAddr() +  m_uiHorOff        * pcPicYuvDepthData->getStride () , pcPicYuvDepthData->getStride(),  m_iWidth,      m_iHeight,      m_apiCurDepthPel [ iViewNum],     m_aiCurDepthStrides [iViewNum]    );
    459 #endif
    460446
    461447  // Used for rendering reference pic from original video data
     
    465451  if ( m_abSetupVideoFromOrgForView[iViewNum] )
    466452  {
    467 #if FIX_VSO_SETUP
    468453    AOF( pcPicYuvOrgVideoData->getHeight() >= m_iUsedHeight + m_uiHorOff && pcPicYuvOrgVideoData->getWidth() == m_iWidth );
    469454    pcPicYuvOrgVideoData->extendPicBorder();
     
    471456    TRenFilter::sampleCUpHorUp( m_iShiftPrec, pcPicYuvOrgVideoData->getCbAddr()   + (m_uiHorOff >> 1 ) * pcPicYuvOrgVideoData->getCStride(), pcPicYuvOrgVideoData->getCStride(), m_iWidth >> 1, m_iUsedHeight >> 1, m_aapiOrgVideoPel[ iViewNum ][1], m_aaiOrgVideoStrides[iViewNum][1] );
    472457    TRenFilter::sampleCUpHorUp( m_iShiftPrec, pcPicYuvOrgVideoData->getCrAddr()   + (m_uiHorOff >> 1 ) * pcPicYuvOrgVideoData->getCStride(), pcPicYuvOrgVideoData->getCStride(), m_iWidth >> 1, m_iUsedHeight >> 1, m_aapiOrgVideoPel[ iViewNum ][2], m_aaiOrgVideoStrides[iViewNum][2] );
    473 #else
    474     AOF( pcPicYuvOrgVideoData->getHeight() <= m_iHeight + m_uiHorOff || pcPicYuvOrgVideoData->getWidth() == m_iWidth );
    475     pcPicYuvOrgVideoData->extendPicBorder();
    476     TRenFilter::sampleHorUp   ( m_iShiftPrec, pcPicYuvOrgVideoData->getLumaAddr() +  m_uiHorOff        * pcPicYuvOrgVideoData->getStride() , pcPicYuvOrgVideoData->getStride() , m_iWidth,      m_iHeight,      m_aapiOrgVideoPel[ iViewNum ][0], m_aaiOrgVideoStrides[iViewNum][0] );
    477     TRenFilter::sampleCUpHorUp( m_iShiftPrec, pcPicYuvOrgVideoData->getCbAddr()   + (m_uiHorOff >> 1 ) * pcPicYuvOrgVideoData->getCStride(), pcPicYuvOrgVideoData->getCStride(), m_iWidth >> 1, m_iHeight >> 1, m_aapiOrgVideoPel[ iViewNum ][1], m_aaiOrgVideoStrides[iViewNum][1] );
    478     TRenFilter::sampleCUpHorUp( m_iShiftPrec, pcPicYuvOrgVideoData->getCrAddr()   + (m_uiHorOff >> 1 ) * pcPicYuvOrgVideoData->getCStride(), pcPicYuvOrgVideoData->getCStride(), m_iWidth >> 1, m_iHeight >> 1, m_aapiOrgVideoPel[ iViewNum ][2], m_aaiOrgVideoStrides[iViewNum][2] );
    479 #endif
    480458  }
    481459
    482460  if ( m_abSetupDepthFromOrgForView[iViewNum] )
    483461  {
    484 #if FIX_VSO_SETUP
    485462    AOF( pcPicYuvOrgDepthData->getHeight() >= m_iUsedHeight + m_uiHorOff && pcPicYuvOrgDepthData->getWidth() == m_iWidth );
    486463    TRenFilter::copy          (               pcPicYuvOrgDepthData->getLumaAddr() +  m_uiHorOff        * pcPicYuvOrgDepthData->getStride() , pcPicYuvOrgDepthData->getStride(),  m_iWidth,     m_iUsedHeight,      m_apiOrgDepthPel [ iViewNum],     m_aiOrgDepthStrides [iViewNum]    );
    487 #else
    488     AOF( pcPicYuvOrgDepthData->getHeight() <= m_iHeight + m_uiHorOff || pcPicYuvOrgDepthData->getWidth() == m_iWidth );
    489     TRenFilter::copy          (               pcPicYuvOrgDepthData->getLumaAddr() +  m_uiHorOff        * pcPicYuvOrgDepthData->getStride() , pcPicYuvOrgDepthData->getStride(),  m_iWidth,     m_iHeight,      m_apiOrgDepthPel [ iViewNum],     m_aiOrgDepthStrides [iViewNum]    );
    490 #endif
    491464  }
    492465}
     
    497470  AOT( iModelNum < 0 || iModelNum > m_iNumOfRenModels );
    498471
    499 #if FIX_VSO_SETUP
    500472  m_apcRenModels[iModelNum]->setupPart( m_uiHorOff, m_iUsedHeight );
    501 #endif
    502473
    503474  // Switch model  to original data for setup if given to render reference
     
    520491  }
    521492
    522 #if FIX_VSO_SETUP
    523493  m_apcRenModels[iModelNum]->setup     ( pcPicYuvRefView, ppiShiftLutLeft, ppiBaseShiftLutLeft, ppiShiftLutRight, ppiBaseShiftLutRight, iDistToLeft, false );
    524 #else
    525   m_apcRenModels[iModelNum]->setup     ( pcPicYuvRefView, ppiShiftLutLeft, ppiBaseShiftLutLeft, ppiShiftLutRight, ppiBaseShiftLutRight, iDistToLeft, false, m_uiHorOff );
    526 #endif
    527494
    528495  // Setup to Org
     
    545512
    546513    // setup keeping reference rendered from original data
    547 #if FIX_VSO_SETUP
    548514    m_apcRenModels[iModelNum]->setup     ( pcPicYuvRefView, ppiShiftLutLeft, ppiBaseShiftLutLeft, ppiShiftLutRight, ppiBaseShiftLutRight, iDistToLeft, true );
    549 #else
    550     m_apcRenModels[iModelNum]->setup     ( pcPicYuvRefView, ppiShiftLutLeft, ppiBaseShiftLutLeft, ppiShiftLutRight, ppiBaseShiftLutRight, iDistToLeft, true, m_uiHorOff);
    551 #endif
    552515  }
    553516}
     
    579542
    580543
    581 #if FIX_VSO_SETUP
    582544Void
    583545TRenModel::setupPart ( UInt uiHorOff, Int iUsedHeight )
     
    587549  m_iUsedHeight = iUsedHeight;
    588550}
    589 #else
    590 Void
    591 TRenModel::setHorOffset     ( UInt uiHorOff )
    592 {
    593   m_uiHorOff = uiHorOff;
    594 }
    595 #endif
    596551
    597552#if LGE_VSO_EARLY_SKIP_A0093
     
    606561
    607562  AOT( iWidth  + iStartPosX > m_iWidth  );
    608 #if FIX_VSO_SETUP
    609563  AOT( iHeight + iStartPosY > m_iUsedHeight );
    610 #else
    611   AOT( iHeight + iStartPosY > m_iHeight );
    612 #endif
    613564
    614565  AOT( iStartPosX < 0);
     
    644595
    645596  iWidth  = min(iWidth , m_iWidth  - iStartPosX );
    646 #if FIX_VSO_SETUP
    647597  iHeight = min(iHeight, m_iUsedHeight - iStartPosY );
    648 #else
    649   iHeight = min(iHeight, m_iHeight - iStartPosY );
    650 #endif
    651598
    652599  AOT( iStartPosX < 0);
     
    684631TRenModel::getSynthVideo( Int iModelNum, Int iViewNum, TComPicYuv* pcPicYuv )
    685632{
    686 #if FIX_VSO_SETUP
    687633  m_apcRenModels[iModelNum]->getSynthVideo(iViewNum, pcPicYuv );
    688 #else
    689   m_apcRenModels[iModelNum]->getSynthVideo(iViewNum, pcPicYuv, m_uiHorOff );
    690 #endif
    691634}
    692635
     
    694637TRenModel::getSynthDepth( Int iModelNum, Int iViewNum, TComPicYuv* pcPicYuv )
    695638{
    696 #if HHI_VSO_SPEEDUP_A0033 && !FIX_VSO_SETUP
    697   m_apcRenModels[iModelNum]->getSynthDepth(iViewNum, pcPicYuv, m_uiHorOff );
    698 #else
    699639  m_apcRenModels[iModelNum]->getSynthDepth(iViewNum, pcPicYuv );
    700 #endif
    701640}
    702641
     
    705644{
    706645  TComPicYuv cPicYuvSynth;
    707 #if FIX_VSO_SETUP
    708646  cPicYuvSynth.create( m_iWidth, m_iUsedHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
    709 #else
    710   cPicYuvSynth.create( m_iWidth, m_iHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
    711 #endif
    712647
    713648  TComPicYuv cPicYuvTempRef;
    714 #if FIX_VSO_SETUP
    715649  cPicYuvTempRef.create( m_iWidth, m_iUsedHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth);
    716 #else
    717   cPicYuvTempRef.create( m_iWidth, m_iHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth);
    718 #endif
    719650
    720651  Int64 iSSEY = 0;
     
    724655  for (Int iCurModel = 0; iCurModel < m_iNumOfCurRenModels; iCurModel++)
    725656  {
    726 #if FIX_VSO_SETUP
    727657    m_apcCurRenModels[iCurModel]->getSynthVideo( m_aiCurPosInModels[iCurModel], &cPicYuvSynth );   
    728658    m_apcCurRenModels[iCurModel]->getRefVideo  ( m_aiCurPosInModels[iCurModel], &cPicYuvTempRef   );
     
    731661    iSSEU += TRenFilter::SSE( cPicYuvSynth.getCbAddr()  , cPicYuvSynth.getCStride(), m_iWidth >> 1, m_iUsedHeight >> 1, cPicYuvTempRef.getCbAddr()  , cPicYuvTempRef.getCStride());
    732662    iSSEV += TRenFilter::SSE( cPicYuvSynth.getCrAddr()  , cPicYuvSynth.getCStride(), m_iWidth >> 1, m_iUsedHeight >> 1, cPicYuvTempRef.getCrAddr()  , cPicYuvTempRef.getCStride());
    733 #else
    734     m_apcCurRenModels[iCurModel]->getSynthVideo( m_aiCurPosInModels[iCurModel], &cPicYuvSynth, 0 );
    735     TComPicYuv* pcPicYuvRef = &cPicYuvTempRef;
    736     m_apcCurRenModels[iCurModel]->getRefVideo  ( m_aiCurPosInModels[iCurModel], pcPicYuvRef  , 0 );
    737 
    738     iSSEY += TRenFilter::SSE( cPicYuvSynth.getLumaAddr(), cPicYuvSynth.getStride(),  m_iWidth,      m_iHeight     , pcPicYuvRef->getLumaAddr(), pcPicYuvRef->getStride() );
    739     iSSEU += TRenFilter::SSE( cPicYuvSynth.getCbAddr()  , cPicYuvSynth.getCStride(), m_iWidth >> 1, m_iHeight >> 1, pcPicYuvRef->getCbAddr()  , pcPicYuvRef->getCStride());
    740     iSSEV += TRenFilter::SSE( cPicYuvSynth.getCrAddr()  , cPicYuvSynth.getCStride(), m_iWidth >> 1, m_iHeight >> 1, pcPicYuvRef->getCrAddr()  , pcPicYuvRef->getCStride());
    741 #endif
    742663  }
    743664
     
    776697  }
    777698}
     699#endif
     700
Note: See TracChangeset for help on using the changeset viewer.