Ignore:
Timestamp:
9 Aug 2013, 07:59:16 (11 years ago)
Author:
mediatek-htm
Message:

Integration of JCT3V-E0173, fast texture encoding algorithm for dependent views
The MACRO is "MTK_FAST_TEXTURE_ENCODING_E0173"

by Na Zhang (Na.Zhang@…)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-DEV-2.0-dev2-MediaTek/source/Lib/TLibCommon/TComDataCU.cpp

    r542 r559  
    52565256}
    52575257#endif
     5258#if  MTK_FAST_TEXTURE_ENCODING_E0173
     5259Void
     5260TComDataCU::getIVNStatus       ( UInt uiPartIdx,  DisInfo* pDInfo, Bool& bIVFMerge, Int& iIVFMaxD)
     5261{
     5262  TComSlice*    pcSlice         = getSlice (); 
     5263  Int iViewIndex = pDInfo->m_aVIdxCan;
     5264  //--- get base CU/PU and check prediction mode ---
     5265  TComPic*    pcBasePic   = pcSlice->getIvPic( false, iViewIndex );
     5266  TComPicYuv* pcBaseRec   = pcBasePic->getPicYuvRec   ();
     5267
     5268  UInt          uiPartAddr;
     5269  Int           iWidth;
     5270  Int           iHeight;
     5271  getPartIndexAndSize( uiPartIdx, uiPartAddr, iWidth, iHeight );
     5272
     5273  Int  iCurrPosX, iCurrPosY;
     5274  pcBaseRec->getTopLeftSamplePos( getAddr(), getZorderIdxInCU() + uiPartAddr, iCurrPosX, iCurrPosY );
     5275
     5276  iCurrPosX  += ( ( iWidth  - 1 ) >> 1 );
     5277  iCurrPosY  += ( ( iHeight - 1 ) >> 1 );
     5278
     5279  Bool depthRefineFlag = false;
     5280#if H_3D_NBDV_REF
     5281  depthRefineFlag = m_pcSlice->getVPS()->getDepthRefinementFlag( m_pcSlice->getLayerIdInVps() );
     5282#endif // H_3D_NBDV_REF
     5283
     5284  TComMv      cDv = depthRefineFlag ? pDInfo->m_acDoNBDV : pDInfo->m_acNBDV;
     5285
     5286  Int         iBasePosX   = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + ( (cDv.getHor() + 2 ) >> 2 ) );
     5287  Int         iBasePosY   = Clip3( 0, pcBaseRec->getHeight() - 1, iCurrPosY + ( (cDv.getVer() + 2 ) >> 2 ));
     5288  Int         iBaseLPosX   = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX - (iWidth >> 1) + ( (cDv.getHor() + 2 ) >> 2 ) );
     5289  Int         iBaseLPosY   = Clip3( 0, pcBaseRec->getHeight() - 1, iCurrPosY + ( (cDv.getVer() + 2 ) >> 2 ));
     5290  Int         iBaseRPosX   = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + (iWidth >> 1) + 1 + ( (cDv.getHor() + 2 ) >> 2 ) );
     5291  Int         iBaseRPosY   = Clip3( 0, pcBaseRec->getHeight() - 1, iCurrPosY + ( (cDv.getVer() + 2 ) >> 2 ));
     5292  Int         iBaseUPosX   = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + ( (cDv.getHor() + 2 ) >> 2 ) );
     5293  Int         iBaseUPosY   = Clip3( 0, pcBaseRec->getHeight() - 1, iCurrPosY - (iHeight >> 1) + ( (cDv.getVer() + 2 ) >> 2 ));
     5294  Int         iBaseDPosX   = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + ( (cDv.getHor() + 2 ) >> 2 ) );
     5295  Int         iBaseDPosY   = Clip3( 0, pcBaseRec->getHeight() - 1, iCurrPosY + (iHeight >> 1) + 1 + ( (cDv.getVer() + 2 ) >> 2 ));
     5296
     5297  Int         iBaseCUAddr;
     5298  Int         iBaseAbsPartIdx;
     5299  Int         iBaseLCUAddr;
     5300  Int         iBaseLAbsPartIdx;
     5301  Int         iBaseRCUAddr;
     5302  Int         iBaseRAbsPartIdx;
     5303  Int         iBaseUCUAddr;
     5304  Int         iBaseUAbsPartIdx;
     5305  Int         iBaseDCUAddr;
     5306  Int         iBaseDAbsPartIdx;
     5307  pcBaseRec->getCUAddrAndPartIdx( iBasePosX , iBasePosY , iBaseCUAddr, iBaseAbsPartIdx );
     5308  pcBaseRec->getCUAddrAndPartIdx( iBaseLPosX , iBaseLPosY , iBaseLCUAddr, iBaseLAbsPartIdx );
     5309  pcBaseRec->getCUAddrAndPartIdx( iBaseRPosX , iBaseRPosY , iBaseRCUAddr, iBaseRAbsPartIdx );
     5310  pcBaseRec->getCUAddrAndPartIdx( iBaseUPosX , iBaseUPosY , iBaseUCUAddr, iBaseUAbsPartIdx );
     5311  pcBaseRec->getCUAddrAndPartIdx( iBaseDPosX , iBaseDPosY , iBaseDCUAddr, iBaseDAbsPartIdx );
     5312  TComDataCU* pcBaseCU    = pcBasePic->getCU( iBaseCUAddr );
     5313  TComDataCU* pcBaseLCU    = pcBasePic->getCU( iBaseLCUAddr );
     5314  TComDataCU* pcBaseRCU    = pcBasePic->getCU( iBaseRCUAddr );
     5315  TComDataCU* pcBaseUCU    = pcBasePic->getCU( iBaseUCUAddr );
     5316  TComDataCU* pcBaseDCU    = pcBasePic->getCU( iBaseDCUAddr );
     5317  bIVFMerge = pcBaseLCU->getMergeFlag( iBaseLAbsPartIdx ) && pcBaseCU->getMergeFlag( iBaseAbsPartIdx ) && pcBaseRCU->getMergeFlag( iBaseRAbsPartIdx ) && pcBaseUCU->getMergeFlag( iBaseUAbsPartIdx ) && pcBaseDCU->getMergeFlag( iBaseDAbsPartIdx );
     5318  Int aiDepthL[5]; //depth level
     5319  aiDepthL[0] = pcBaseCU->getDepth(iBaseAbsPartIdx);
     5320  aiDepthL[1] = pcBaseLCU->getDepth(iBaseLAbsPartIdx);
     5321  aiDepthL[2] = pcBaseRCU->getDepth(iBaseRAbsPartIdx);
     5322  aiDepthL[3] = pcBaseUCU->getDepth(iBaseUAbsPartIdx);
     5323  aiDepthL[4] = pcBaseDCU->getDepth(iBaseDAbsPartIdx);
     5324  for (Int i = 0; i < 5; i++)
     5325  {
     5326    if (iIVFMaxD < aiDepthL[i])
     5327      iIVFMaxD = aiDepthL[i];
     5328  }
     5329}
     5330#endif
    52585331#if H_3D_IV_MERGE
    52595332Bool
Note: See TracChangeset for help on using the changeset viewer.