Changeset 66 in 3DVCSoftware


Ignore:
Timestamp:
22 May 2012, 00:18:14 (12 years ago)
Author:
qualcomm
Message:

Integration of Qualcomm's m24938

Location:
branches/HTM-3.0-Qualcomm/source/Lib
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-3.0-Qualcomm/source/Lib/TLibCommon/TComDataCU.cpp

    r62 r66  
    59525952#if HHI_INTER_VIEW_RESIDUAL_PRED
    59535953Bool
    5954 TComDataCU::getResidualSamples( UInt uiPartIdx, TComYuv* pcYuv )
     5954TComDataCU::getResidualSamples( UInt uiPartIdx,
     5955#if QC_SIMPLIFIEDIVRP_M24938
     5956  Bool bRecon ,
     5957#endif
     5958  TComYuv* pcYuv )
    59555959{
    59565960  TComResidualGenerator*  pcResidualGenerator = m_pcSlice->getSPS()->getResidualGenerator();
    59575961  ROFRS( pcResidualGenerator, false );
    5958   return pcResidualGenerator->getResidualSamples( this, uiPartIdx, pcYuv );
     5962  return pcResidualGenerator->getResidualSamples( this, uiPartIdx, pcYuv
     5963#if QC_SIMPLIFIEDIVRP_M24938
     5964    , bRecon
     5965#endif
     5966    );
    59595967}
    59605968#endif
  • branches/HTM-3.0-Qualcomm/source/Lib/TLibCommon/TComDataCU.h

    r62 r66  
    521521#endif
    522522#if HHI_INTER_VIEW_RESIDUAL_PRED
    523   Bool          getResidualSamples( UInt uiPartIdx, TComYuv* pcYuv = 0 );
     523  Bool          getResidualSamples( UInt uiPartIdx,
     524#if QC_SIMPLIFIEDIVRP_M24938
     525    Bool bRecon ,
     526#endif
     527    TComYuv* pcYuv = 0 );
    524528#endif
    525529  // -------------------------------------------------------------------------------------------------------------------
  • branches/HTM-3.0-Qualcomm/source/Lib/TLibCommon/TComResidualGenerator.cpp

    r62 r66  
    221221
    222222Bool
    223 TComResidualGenerator::getResidualSamples( TComDataCU* pcCU, UInt uiPUIdx, TComYuv* pcYuv )
     223TComResidualGenerator::getResidualSamples( TComDataCU* pcCU, UInt uiPUIdx, TComYuv* pcYuv
     224#if QC_SIMPLIFIEDIVRP_M24938
     225  , Bool bRecon
     226#endif
     227  )
    224228{
    225229  AOF(  pcCU );
     
    231235  iBlkHeight  = pcCU->getHeight ( 0 );
    232236  pcCU->getPic()->getPicYuvRec()->getTopLeftSamplePos( pcCU->getAddr(), pcCU->getZorderIdxInCU() + uiPartAddr, iXPos, iYPos );
    233   return getResidualSamples( pcCU->getPic(), (UInt)iXPos, (UInt)iYPos, (UInt)iBlkWidth, (UInt)iBlkHeight, pcYuv );
     237  return getResidualSamples( pcCU->getPic(), (UInt)iXPos, (UInt)iYPos, (UInt)iBlkWidth, (UInt)iBlkHeight, pcYuv
     238#if QC_SIMPLIFIEDIVRP_M24938
     239    , bRecon
     240#endif
     241    );
    234242}
    235243 
    236244Bool
    237 TComResidualGenerator::getResidualSamples( TComPic* pcPic, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv )
     245TComResidualGenerator::getResidualSamples( TComPic* pcPic, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv
     246#if QC_SIMPLIFIEDIVRP_M24938
     247  , Bool bRecon
     248#endif
     249  )
    238250{
    239251  UInt  uiBaseViewId  = m_pcDepthMapGenerator->getBaseViewId( 0 );
     
    243255    pcYuv = m_ppcYuvTmp[1];
    244256  }
    245   xSetPredResidualBlock( pcPic, uiBaseViewId, uiXPos, uiYPos, uiBlkWidth, uiBlkHeight, pcYuv );
     257#if QC_SIMPLIFIEDIVRP_M24938
     258  UInt uiXPosInRefView = uiXPos , uiYPosInRefView = uiYPos;
     259#endif
     260  xSetPredResidualBlock( pcPic, uiBaseViewId, uiXPos, uiYPos, uiBlkWidth, uiBlkHeight, pcYuv
     261#if QC_SIMPLIFIEDIVRP_M24938
     262    , &uiXPosInRefView , &uiYPosInRefView , bRecon
     263#endif
     264    );
     265
     266#if QC_SIMPLIFIEDIVRP_M24938
     267  return xIsNonZeroByCBF( uiBaseViewId , uiXPosInRefView , uiYPosInRefView , uiBlkWidth , uiBlkHeight );
     268#else
    246269  return xIsNonZero( pcYuv, uiBlkWidth, uiBlkHeight );
    247 }
     270#endif
     271}
     272
     273#if QC_SIMPLIFIEDIVRP_M24938
     274Bool TComResidualGenerator::xIsNonZeroByCBF( UInt uiBaseViewId , UInt uiXPos , UInt uiYPos, UInt uiBlkWidth , UInt uiBlkHeight )
     275{
     276  TComPic* pcBasePic   = m_pcAUPicAccess->getPic( uiBaseViewId );
     277  const Int nMaxPicX = pcBasePic->getSPS()->getPicWidthInLumaSamples() - 1;
     278  const Int nMaxPicY = pcBasePic->getSPS()->getPicHeightInLumaSamples() - 1;
     279  for( UInt y = 0 ; y < uiBlkHeight ; y +=4 )
     280  {
     281    for( UInt x = 0 ; x <= uiBlkWidth ; x += 4 )
     282    {      // to cover both the mapped CU and the 1-pixel-right-shifted mapped CU
     283      Int iCuAddr = 0, iAbsZorderIdx = 0;
     284      pcBasePic->getPicYuvRec()->getCUAddrAndPartIdx( Min( uiXPos + x , nMaxPicX ) , Min( uiYPos + y , nMaxPicY ) , iCuAddr , iAbsZorderIdx );
     285      TComDataCU *pCUInRefView = pcBasePic->getCU( iCuAddr );
     286      if( pCUInRefView->isIntra( iAbsZorderIdx ) )
     287        // no inter-view residual pred from a intra CU
     288        continue;
     289      UInt uiTempTrDepth = pCUInRefView->getTransformIdx( iAbsZorderIdx );
     290      if( pCUInRefView->getCbf( iAbsZorderIdx , TEXT_LUMA , uiTempTrDepth )
     291        || pCUInRefView->getCbf( iAbsZorderIdx , TEXT_CHROMA_U , uiTempTrDepth )
     292        || pCUInRefView->getCbf( iAbsZorderIdx , TEXT_CHROMA_V , uiTempTrDepth ) )
     293        return( true );
     294    }
     295  }
     296
     297  return( false );
     298}
     299#endif
    248300
    249301
     
    364416  {
    365417    AOF( pcCU->getResPredAvail( 0 ) );
    366     Bool bOK = pcCU->getResidualSamples( 0, m_ppcYuvTmp[0] );
     418    Bool bOK = pcCU->getResidualSamples( 0,
     419#if QC_SIMPLIFIEDIVRP_M24938
     420      true,
     421#endif
     422      m_ppcYuvTmp[0] );
    367423    AOF( bOK );
    368424#if LG_RESTRICTEDRESPRED_M24766
     
    431487
    432488Void 
    433 TComResidualGenerator::xSetPredResidualBlock( TComPic* pcPic, UInt uiBaseViewId, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv )
     489TComResidualGenerator::xSetPredResidualBlock( TComPic* pcPic, UInt uiBaseViewId, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv
     490#if QC_SIMPLIFIEDIVRP_M24938
     491  , UInt * puiXPosInRefView , UInt * puiYPosInRefView , Bool bRecon
     492#endif
     493  )
    434494{
    435495  //===== set and check some basic variables =====
     
    464524  Pel*          pSrcSamplesY= pcBaseRes->getLumaAddr ( 0 ) + uiYPos * iSrcStrideY;
    465525  Pel*          pDesSamplesY= pcYuv    ->getLumaAddr ();
     526
     527#if QC_SIMPLIFIEDIVRP_M24938
     528  if( puiXPosInRefView != NULL )
     529    *puiXPosInRefView = Max( 0, Min( iYMaxPosX, iYRefPosX0 ) );
     530  if( puiYPosInRefView != NULL )
     531    *puiYPosInRefView = uiYPos;
     532  if( bRecon == false )
     533    return;
     534#endif
     535
    466536  for(   Int iY = 0; iY < iYHeight; iY++, pSrcSamplesY += iSrcStrideY, pDesSamplesY += iDesStrideY )
    467537  {
  • branches/HTM-3.0-Qualcomm/source/Lib/TLibCommon/TComResidualGenerator.h

    r5 r66  
    6969  Void  setRecResidualPic     ( TComPic*      pcPic );
    7070
    71   Bool  getResidualSamples    ( TComDataCU*   pcCU,  UInt uiPUIdx, TComYuv* pcYuv );
    72   Bool  getResidualSamples    ( TComPic* pcPic, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv );
     71  Bool  getResidualSamples    ( TComDataCU*   pcCU,  UInt uiPUIdx, TComYuv* pcYuv
     72#if QC_SIMPLIFIEDIVRP_M24938
     73    , Bool bRecon
     74#endif
     75    );
     76  Bool  getResidualSamples    ( TComPic* pcPic, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv
     77#if QC_SIMPLIFIEDIVRP_M24938
     78    , Bool bRecon
     79#endif
     80    );
    7381
    7482private:
     
    8088  Void  xClearResidual        (                      TComYuv* pcCUResidual, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight );
    8189
    82   Void  xSetPredResidualBlock ( TComPic*      pcPic, UInt uiBaseViewId, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv );
     90  Void  xSetPredResidualBlock ( TComPic*      pcPic, UInt uiBaseViewId, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv
     91#if QC_SIMPLIFIEDIVRP_M24938
     92    , UInt * puiXPosInRefView , UInt * puiYPosInRefView , Bool bRecon
     93#endif
     94    );
    8395  Bool  xIsNonZero            ( TComYuv*      pcYuv, UInt uiBlkWidth, UInt uiBlkHeight );
     96#if QC_SIMPLIFIEDIVRP_M24938
     97  Bool  xIsNonZeroByCBF       ( UInt uiBaseViewId , UInt uiXPos , UInt uiYPos, UInt uiBlkWidth , UInt uiBlkHeight );
     98#endif
    8499
    85100  Void  xDumpResidual         ( TComPic*      pcPic, char* pFilenameBase );
  • branches/HTM-3.0-Qualcomm/source/Lib/TLibCommon/TComRom.cpp

    r56 r66  
    11881188  assert( uiWidth == uiHeight );
    11891189
    1190   UChar    uhStartX,    uhStartY,    uhEndX,    uhEndY;
    1191   Int   iStepStartX, iStepStartY, iStepEndX, iStepEndY;
     1190  UChar    uhStartX = 0,    uhStartY = 0,    uhEndX = 0,    uhEndY = 0;
     1191  Int   iStepStartX = 0, iStepStartY = 0, iStepEndX = 0, iStepEndY = 0;
    11921192
    11931193  UInt uiBlockSize = 0;
  • branches/HTM-3.0-Qualcomm/source/Lib/TLibCommon/TypeDef.h

    r62 r66  
    7070#if HHI_INTER_VIEW_RESIDUAL_PRED
    7171#define LG_RESTRICTEDRESPRED_M24766     1   // restricted inter-view residual prediction
     72#define QC_SIMPLIFIEDIVRP_M24938        1
    7273#else
    7374#define LG_RESTRICTEDRESPRED_M24766     0
     75#define QC_SIMPLIFIEDIVRP_M24938        0
    7476#endif
    7577
     
    755757};
    756758
    757 
    758759//! \}
    759760
  • branches/HTM-3.0-Qualcomm/source/Lib/TLibDecoder/TDecCu.cpp

    r62 r66  
    636636  {
    637637    AOF( pcCU->getResPredAvail( 0 ) );
    638     Bool bOK = pcCU->getResidualSamples( 0, m_ppcYuvResPred[uiDepth] );
     638    Bool bOK = pcCU->getResidualSamples( 0,
     639#if QC_SIMPLIFIEDIVRP_M24938
     640      true,
     641#endif
     642      m_ppcYuvResPred[uiDepth] );
    639643    AOF( bOK );
    640644#if LG_RESTRICTEDRESPRED_M24766
  • branches/HTM-3.0-Qualcomm/source/Lib/TLibDecoder/TDecEntropy.cpp

    r62 r66  
    9898  if( bResPredAllowed )
    9999  {
    100     bResPredAvailable       = pcSubCU->getResidualSamples( uiPUIdx );
     100    bResPredAvailable       = pcSubCU->getResidualSamples( uiPUIdx
     101#if QC_SIMPLIFIEDIVRP_M24938
     102      , false
     103#endif
     104      );
    101105  }
    102106
  • branches/HTM-3.0-Qualcomm/source/Lib/TLibEncoder/TEncCu.cpp

    r65 r66  
    604604        if( bResPredAllowed )
    605605        {
    606           bResPredAvailable       = rpcBestCU->getResidualSamples( 0, m_ppcResPredTmp[uiDepth] );
     606          bResPredAvailable       = rpcBestCU->getResidualSamples( 0,
     607#if QC_SIMPLIFIEDIVRP_M24938
     608            true ,
     609#endif
     610            m_ppcResPredTmp[uiDepth] );
    607611        }
    608612
     
    698702        if( bResPredAllowed )
    699703        {
    700           bResPredAvailable       = rpcBestCU->getResidualSamples( 0, m_ppcResPredTmp[uiDepth] );
     704          bResPredAvailable       = rpcBestCU->getResidualSamples( 0,
     705#if QC_SIMPLIFIEDIVRP_M24938
     706            true,
     707#endif
     708            m_ppcResPredTmp[uiDepth] );
    701709        }
    702710
Note: See TracChangeset for help on using the changeset viewer.