Ignore:
Timestamp:
31 Jan 2013, 03:48:51 (12 years ago)
Author:
mediatek-htm
Message:

Implementation of C0138
Added macro "MTK_MDIVRP_C0138"

Location:
branches/HTM-5.1-dev2-Mediatek/source/Lib/TLibCommon
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-5.1-dev2-Mediatek/source/Lib/TLibCommon/TComDataCU.cpp

    r243 r244  
    32723272#endif
    32733273
    3274 #if LG_RESTRICTEDRESPRED_M24766
     3274#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    32753275Int TComDataCU::getResiPredMode(UInt uiPartAddr)
    32763276{
     
    36763676#endif
    36773677
     3678#if MTK_MDIVRP_C0138
     3679  Bool bDVAvail = true;
     3680#endif
     3681
    36783682#if QC_MULTI_DIS_CAN_A0097
    36793683  DisInfo cDisInfo;
     
    37023706    cDisInfo.m_acMvCand[0].setVer(0);
    37033707    cDisInfo.m_aVIdxCan[0] = 0;
     3708#if MTK_MDIVRP_C0138
     3709    bDVAvail = false;
     3710#endif
    37043711  }
    37053712#if QC_MRG_CANS_B0048
     
    37193726  Int     iPdmInterDir      = getPdmMergeCandidate( uiPUIdx, aiPdmRefIdx, acPdmMv );
    37203727#endif
     3728#if MTK_MDIVRP_C0138
     3729  if (m_pcSlice->getSPS()->getMultiviewResPredMode()==1 && iPdmDir[0] && !bNoPdmMerge && cCurPS == SIZE_2Nx2N && bDVAvail)
     3730  {
     3731    setResPredAvailSubParts(true, 0, 0, uiDepth);
     3732  }
     3733#endif
     3734
    37213735#if QC_MRG_CANS_B0048
    37223736  if( iPdmDir[0] && !bNoPdmMerge && PDM_MERGE_POS == 0 )
  • branches/HTM-5.1-dev2-Mediatek/source/Lib/TLibCommon/TComDataCU.h

    r237 r244  
    607607  Void          getPartIndexAndSize   ( UInt uiPartIdx, UInt& ruiPartAddr, Int& riWidth, Int& riHeight );
    608608#endif
    609 #if LG_RESTRICTEDRESPRED_M24766
     609#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    610610  Int           getResiPredMode(UInt uiPartAddr);
    611611  Void          getPUResiPredShift (Int *iPUPredResiShift, UInt uiAbsPartIndex);
  • branches/HTM-5.1-dev2-Mediatek/source/Lib/TLibCommon/TComPrediction.cpp

    r210 r244  
    754754}
    755755
    756 
     756#if MTK_MDIVRP_C0138
     757Void TComPrediction::residualPrediction(TComDataCU* pcCU, TComYuv* pcYuvPred, TComYuv* pcYuvResPred)
     758{
     759  Int         iWidth;
     760  Int         iHeight;
     761  UInt        uiPartAddr;
     762
     763  pcCU->getPartIndexAndSize( 0, uiPartAddr, iWidth, iHeight );
     764
     765  Bool bResAvail = false;
     766
     767  bResAvail = pcCU->getResidualSamples( 0,
     768#if QC_SIMPLIFIEDIVRP_M24938
     769    true,
     770#endif
     771    pcYuvResPred );
     772
     773  assert (bResAvail);
     774
     775  pcYuvPred->add(pcYuvResPred, iWidth, iHeight);
     776}
     777#endif
    757778
    758779#if DEPTH_MAP_GENERATION
  • branches/HTM-5.1-dev2-Mediatek/source/Lib/TLibCommon/TComPrediction.h

    r210 r244  
    151151#endif
    152152 
     153#if MTK_MDIVRP_C0138
     154  Void residualPrediction         (TComDataCU* pcCU, TComYuv* pcYuvPred, TComYuv* pcYuvResPred);
     155#endif
     156
    153157  // motion vector prediction
    154158  Void getMvPredAMVP              ( TComDataCU* pcCU, UInt uiPartIdx, UInt uiPartAddr, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMvPred );
  • branches/HTM-5.1-dev2-Mediatek/source/Lib/TLibCommon/TComResidualGenerator.cpp

    r189 r244  
    184184  AOF  ( pcPic );
    185185
     186#if MTK_MDIVRP_C0138
     187  if (pcPic->getSPS()->getViewId() != 0)
     188  {
     189    return;
     190  }
     191#endif
     192
    186193  if( pcPic->getPOC() == 0 )
    187194  {
     
    296303    );
    297304#endif
     305#if MTK_MDIVRP_C0138
     306  return true;
     307#else
    298308#if QC_SIMPLIFIEDIVRP_M24938
    299309  return xIsNonZeroByCBF( uiBaseViewId , uiXPosInRefView , uiYPosInRefView , uiBlkWidth , uiBlkHeight );
    300310#else
    301311  return xIsNonZero( pcYuv, uiBlkWidth, uiBlkHeight );
     312#endif
    302313#endif
    303314}
     
    419430  Pel*    pRes      = pcCUResidual->getLumaAddr();
    420431  UInt    uiLumaTrMode, uiChromaTrMode;
    421 #if LG_RESTRICTEDRESPRED_M24766
     432#if LG_RESTRICTEDRESPRED_M24766  && !MTK_MDIVRP_C0138
    422433  Int     iPUPredResiShift[4];
    423434#endif
     
    445456  m_pcTrQuant->invRecurTransformNxN ( pcCU, 0, TEXT_CHROMA_V, pRes, 0, pcCUResidual->getCStride(), uiWidth, uiHeight, uiChromaTrMode, 0, piCoeff );
    446457
     458#if !MTK_MDIVRP_C0138
    447459  if( pcCU->getResPredFlag( 0 ) )
    448460  {
     
    461473#endif
    462474  }
     475#endif
    463476
    464477  //===== clear inter-view predicted parts =====
  • branches/HTM-5.1-dev2-Mediatek/source/Lib/TLibCommon/TComYuv.cpp

    r189 r244  
    392392}
    393393
    394 #if LG_RESTRICTEDRESPRED_M24766
     394#if LG_RESTRICTEDRESPRED_M24766  && !MTK_MDIVRP_C0138
    395395Void
    396396TComYuv::add(Int *iPUResiPredShift, PartSize uhPartitionSize,  TComYuv* pcYuvAdd, Int iWidth, Int iHeight, Bool bSubtract )
     
    408408#endif
    409409
    410 #if LG_RESTRICTEDRESPRED_M24766
     410#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    411411Void
    412412TComYuv::getPUXYOffset(PartSize uhPartitionSize, Int iWidth, Int iHeight, Int &iXOffset, Int &iYOffset)
     
    435435#endif
    436436
    437 #if LG_RESTRICTEDRESPRED_M24766
     437#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    438438Void
    439439TComYuv::addLuma(Int *iPUResiPredShift, PartSize uhPartitionSize, TComYuv* pcYuvAdd, Int iWidth, Int iHeight, Bool bSubtract )
     
    449449  Pel*  pDstSamples = getLumaAddr();
    450450
    451 #if LG_RESTRICTEDRESPRED_M24766
     451#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    452452  Int iXOffset, iYOffset;
    453453
     
    502502}
    503503
    504 #if LG_RESTRICTEDRESPRED_M24766
     504#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    505505Void
    506506TComYuv::addChroma(Int *iPUResiPredShift, PartSize uhPartitionSize, TComYuv* pcYuvAdd, Int iWidth, Int iHeight, Bool bSubtract )
     
    518518  Pel*  pDstSamplesCr = getCrAddr();
    519519
    520 #if LG_RESTRICTEDRESPRED_M24766
     520#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    521521  Int iXOffset, iYOffset;
    522522 
     
    676676}
    677677
    678 #if LG_RESTRICTEDRESPRED_M24766
     678#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    679679Void TComYuv::subtract(Int *iPUResiPredShift, PartSize uhPartitionSize, TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize )
    680680{
     
    690690#endif
    691691
    692 #if LG_RESTRICTEDRESPRED_M24766
     692#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    693693Void TComYuv::subtractLuma(Int *iPUResiPredShift, PartSize uhPartitionSize, TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize )
    694694#else
     
    706706  Int  iDstStride  = getStride();
    707707
    708 #if LG_RESTRICTEDRESPRED_M24766
     708#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    709709  Int iXOffset, iYOffset;
    710710
     
    814814}
    815815
    816 #if LG_RESTRICTEDRESPRED_M24766
     816#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    817817Void TComYuv::subtractChroma(Int *iPUResiPredShift, PartSize uhPartitionSize, TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize )
    818818#else
     
    832832  Int  iSrc1Stride = pcYuvSrc1->getCStride();
    833833  Int  iDstStride  = getCStride();
    834 #if LG_RESTRICTEDRESPRED_M24766
     834#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    835835  Int iXOffset, iYOffset;
    836836 
  • branches/HTM-5.1-dev2-Mediatek/source/Lib/TLibCommon/TComYuv.h

    r100 r244  
    146146  Void    addClipPartLuma   ( TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize ); //GT
    147147
    148 #if LG_RESTRICTEDRESPRED_M24766
     148#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    149149  //  pcYuvSrc0 - pcYuvSrc1 -> m_apiBuf
    150150  Void    subtract          (Int *iPUResiPredShift, PartSize uhPartitionSize, TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, UInt uiTrUnitIdx, UInt uiPartSize );
     
    166166  //   Remove High frequency
    167167  Void    removeHighFreq    ( TComYuv* pcYuvSrc, UInt uiPartIdx, UInt uiWidht, UInt uiHeight );
    168 #if LG_RESTRICTEDRESPRED_M24766
     168#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    169169  Void    getPUXYOffset     (PartSize uhPartitionSize, Int iWidth, Int iHeight, Int &iXOffset, Int &iYOffset);
    170170  Void    add               (Int *iPUResiPredShift, PartSize uhPartitionSize, TComYuv* pcYuvAdd, Int iWidth, Int iHeight, Bool bSubtract = false );
  • branches/HTM-5.1-dev2-Mediatek/source/Lib/TLibCommon/TypeDef.h

    r243 r244  
    9999#define HHI_INTER_VIEW_RESIDUAL_PRED      1   // inter-view residual prediction
    100100#if HHI_INTER_VIEW_RESIDUAL_PRED       
     101#define MTK_MDIVRP_C0138                  1   // mode-dependent inter-view residual prediction
    101102#define LG_RESTRICTEDRESPRED_M24766       1   // restricted inter-view residual prediction
    102103#define QC_SIMPLIFIEDIVRP_M24938          1
Note: See TracChangeset for help on using the changeset viewer.