Changeset 244 in 3DVCSoftware for branches/HTM-5.1-dev2-Mediatek/source/Lib


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
Files:
16 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
  • branches/HTM-5.1-dev2-Mediatek/source/Lib/TLibDecoder/TDecCu.cpp

    r189 r244  
    400400    }
    401401#endif
    402 #if HHI_INTER_VIEW_RESIDUAL_PRED
     402#if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138
    403403    m_pcEntropyDecoder->decodeResPredFlag( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth], 0 );
    404404#endif
     
    452452#endif
    453453
    454 #if HHI_INTER_VIEW_RESIDUAL_PRED
     454#if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138
    455455  if( !pcCU->isIntra( uiAbsPartIdx ) )
    456456  {
     
    660660  m_pcPrediction->motionCompensation( pcCU, m_ppcYuvReco[uiDepth] );
    661661 
     662#if MTK_MDIVRP_C0138
     663  if (pcCU->getMergeFlag(0) && pcCU->getMergeIndex(0)==0 && pcCU->getResPredAvail(0))
     664  {
     665    m_pcPrediction->residualPrediction(pcCU, m_ppcYuvReco[uiDepth], m_ppcYuvResPred[uiDepth]);
     666  }
     667#endif
     668
    662669#if HHI_MPI
    663670  if( pcCU->getTextureModeDepth( 0 ) != -1 )
     
    665672#endif
    666673
    667 #if HHI_INTER_VIEW_RESIDUAL_PRED
     674#if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138
    668675  if( pcCU->getResPredFlag( 0 ) )
    669676  {
     
    696703  {
    697704#if HHI_INTER_VIEW_RESIDUAL_PRED
     705#if MTK_MDIVRP_C0138
     706    if (pcCU->getMergeFlag(0) && pcCU->getMergeIndex(0)==0 && pcCU->getResPredAvail(0))
     707#else
    698708    if( pcCU->getResPredFlag( 0 ) )
     709#endif
    699710    {
    700711      m_ppcYuvReco[uiDepth]->clip( pcCU->getWidth( 0 ), pcCU->getHeight( 0 ) );
  • branches/HTM-5.1-dev2-Mediatek/source/Lib/TLibDecoder/TDecEntropy.cpp

    r189 r244  
    100100}
    101101
    102 #if HHI_INTER_VIEW_RESIDUAL_PRED
     102#if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138
    103103Void
    104104TDecEntropy::decodeResPredFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, TComDataCU* pcSubCU, UInt uiPUIdx )
  • branches/HTM-5.1-dev2-Mediatek/source/Lib/TLibDecoder/TDecEntropy.h

    r210 r244  
    210210  Void decodeMergeFlag         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx );
    211211  Void decodeMergeIndex        ( TComDataCU* pcSubCU, UInt uiPartIdx, UInt uiPartAddr, PartSize eCUMode, UChar* puhInterDirNeighbours, TComMvField* pcMvFieldNeighbours, UInt uiDepth );
    212 #if HHI_INTER_VIEW_RESIDUAL_PRED
     212#if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138
    213213  Void decodeResPredFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, TComDataCU* pcSubCU, UInt uiPUIdx );
    214214#endif
  • branches/HTM-5.1-dev2-Mediatek/source/Lib/TLibEncoder/TEncCu.cpp

    r189 r244  
    636636      {
    637637#if HHI_INTER_VIEW_RESIDUAL_PRED
     638#if MTK_MDIVRP_C0138
     639        Bool  bResPredAvailable   = false;
     640        UInt uiResPrdId = 0;
     641#else
    638642        // check availability of residual prediction
    639643        Bool  bResPredAvailable   = false;
     
    651655
    652656        for( UInt uiResPrdId = 0; uiResPrdId < ( bResPredAvailable ? 2 : 1 ); uiResPrdId++ )
     657#endif
    653658        {
    654659          Bool bResPredFlag  = ( uiResPrdId > 0 );
     
    764769      {
    765770#if HHI_INTER_VIEW_RESIDUAL_PRED
     771#if MTK_MDIVRP_C0138
     772        Bool  bResPredAvailable   = false;
     773        UInt uiResPrdId = 0;
     774#else
    766775        // check availability of residual prediction
    767776        Bool  bResPredAvailable   = false;
     
    779788
    780789        for( UInt uiResPrdId = 0; uiResPrdId < ( bResPredAvailable ? 2 : 1 ); uiResPrdId++ )
     790#endif
    781791        {
    782792          Bool bResPredFlag  = ( uiResPrdId > 0 );
     
    17891799    m_pcEntropyCoder->encodeICFlag  ( pcCU, uiAbsPartIdx );
    17901800#endif
    1791 #if HHI_INTER_VIEW_RESIDUAL_PRED
     1801#if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138
    17921802    m_pcEntropyCoder->encodeResPredFlag( pcCU, uiAbsPartIdx, 0 );
    17931803#endif
     
    18201830    m_pcEntropyCoder->encodeICFlag  ( pcCU, uiAbsPartIdx );
    18211831#endif
    1822 #if HHI_INTER_VIEW_RESIDUAL_PRED
     1832#if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138
    18231833    if( !pcCU->isIntra( uiAbsPartIdx ) )
    18241834    {
     
    18601870  Int numValidMergeCand = 0;
    18611871
    1862 #if HHI_INTER_VIEW_RESIDUAL_PRED
     1872#if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138
    18631873  Bool  bResPrdAvail  = rpcTempCU->getResPredAvail( 0 );
    18641874  Bool  bResPrdFlag   = rpcTempCU->getResPredFlag ( 0 );
     
    18911901  rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uhDepth ); // interprets depth relative to LCU level
    18921902  rpcTempCU->getInterMergeCandidates( 0, 0, uhDepth, cMvFieldNeighbours,uhInterDirNeighbours, numValidMergeCand );
     1903
     1904#if MTK_MDIVRP_C0138
     1905  Bool bResPredAvail = rpcTempCU->getResPredAvail(0);
     1906#endif
    18931907
    18941908#if FAST_DECISION_FOR_MRG_RD_COST
     
    19381952
    19391953#if HHI_INTER_VIEW_RESIDUAL_PRED
     1954#if MTK_MDIVRP_C0138
     1955          rpcTempCU->setResPredAvailSubParts(bResPredAvail, 0, 0, uhDepth);
     1956#else
    19401957          rpcTempCU->setResPredAvailSubParts( bResPrdAvail, 0, 0, uhDepth );
    19411958          rpcTempCU->setResPredFlagSubParts ( bResPrdFlag,  0, 0, uhDepth );
     1959#endif
    19421960#endif
    19431961#if LGE_ILLUCOMP_B0045
     
    19531971        {
    19541972            m_pcPredSearch->motionCompensation ( rpcTempCU, m_ppcPredYuvTemp[uhDepth] );
     1973#if MTK_MDIVRP_C0138
     1974            if (uiMergeCand == 0 && rpcTempCU->getResPredAvail(0))
     1975            {
     1976              m_pcPredSearch->residualPrediction(rpcTempCU, m_ppcPredYuvTemp[uhDepth], m_ppcResPredTmp [uhDepth]);
     1977            }
     1978#endif
    19551979            // save pred adress
    19561980            pcPredYuvTemp = m_ppcPredYuvTemp[uhDepth];
     
    19631987            {
    19641988              m_pcPredSearch->motionCompensation ( rpcTempCU, m_ppcPredYuvTemp[uhDepth] );
     1989#if MTK_MDIVRP_C0138
     1990              if (uiMergeCand == 0 && rpcTempCU->getResPredAvail(0))
     1991              {
     1992                m_pcPredSearch->residualPrediction(rpcTempCU, m_ppcPredYuvTemp[uhDepth], m_ppcResPredTmp [uhDepth]);
     1993              }
     1994#endif
    19651995              // save pred adress
    19661996              pcPredYuvTemp = m_ppcPredYuvTemp[uhDepth];
     
    20832113  rpcTempCU->setMergeAMP (true);
    20842114  #if HHI_INTERVIEW_SKIP
    2085 #if LG_RESTRICTEDRESPRED_M24766
     2115#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    20862116  m_pcPredSearch->predInterSearch ( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcResPredTmp[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcRecoYuvTemp[uhDepth], bSkipRes, bUseMRG  );
    20872117#else
  • branches/HTM-5.1-dev2-Mediatek/source/Lib/TLibEncoder/TEncEntropy.cpp

    r210 r244  
    489489}
    490490
    491 #if HHI_INTER_VIEW_RESIDUAL_PRED
     491#if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138
    492492Void
    493493TEncEntropy::encodeResPredFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiPUIdx, Bool bRD )
  • branches/HTM-5.1-dev2-Mediatek/source/Lib/TLibEncoder/TEncEntropy.h

    r210 r244  
    270270  Void encodeMergeFlag    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiPUIdx );
    271271  Void encodeMergeIndex   ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiPUIdx, Bool bRD = false );
    272 #if HHI_INTER_VIEW_RESIDUAL_PRED
     272#if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138
    273273  Void encodeResPredFlag  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiPUIdx, Bool bRD = false );
    274274#endif
  • branches/HTM-5.1-dev2-Mediatek/source/Lib/TLibEncoder/TEncSearch.cpp

    r210 r244  
    29422942#endif
    29432943#else
    2944 #if LG_RESTRICTEDRESPRED_M24766
     2944#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    29452945Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, TComYuv* rpcResiPredYuv, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, UInt& ruiCost )
    29462946#else
     
    29942994  const int maxNumMergeCand = MRG_MAX_NUM_CANDS_SIGNALED + ( pcCU->getSlice()->getSPS()->getMultiviewMvPredMode() ? 1 : 0 );
    29952995#endif
    2996 #if LG_RESTRICTEDRESPRED_M24766
     2996#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    29972997  Int iPUResiPredShift[4];
    29982998  Int iLastAddResiShift = -1000;
     
    30093009      pcCU->getCUMvField(REF_PIC_LIST_0)->setAllMvField( cMvFieldNeighbours[0 + 2*uiMergeCand], ePartSize, uiAbsPartIdx, 0, iPUIdx );
    30103010      pcCU->getCUMvField(REF_PIC_LIST_1)->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand], ePartSize, uiAbsPartIdx, 0, iPUIdx );
    3011 #if LG_RESTRICTEDRESPRED_M24766
     3011#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    30123012      Int iAddResiShift;
    30133013      UInt uiPartAddr;
     
    30593059    }
    30603060  }
    3061 #if LG_RESTRICTEDRESPRED_M24766
     3061#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    30623062  if( pcCU->getResPredFlag( 0 ) && iLastAddResiShift >= 0)
    30633063  {
     
    30783078 */
    30793079#if AMP_MRG
    3080 #if LG_RESTRICTEDRESPRED_M24766
     3080#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    30813081Void TEncSearch::predInterSearch( TComDataCU* pcCU, TComYuv* pcOrgYuv, TComYuv* rpcResiPredYuv, TComYuv*& rpcPredYuv, TComYuv*& rpcResiYuv, TComYuv*& rpcRecoYuv, Bool bUseRes, Bool bUseMRG )
    30823082#else
     
    31853185    for (Int iNumRef=0; iNumRef < MAX_NUM_REF; iNumRef++) uiCostTempL0[iNumRef] = MAX_UINT;
    31863186    UInt          uiBitsTempL0[MAX_NUM_REF];
    3187 #if LG_RESTRICTEDRESPRED_M24766
     3187#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    31883188    Int iPUResiPredShift[4] = {0, 0, 0, 0};
    31893189#endif
     
    32033203    {
    32043204#endif
    3205 #if LG_RESTRICTEDRESPRED_M24766
     3205#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    32063206      Bool bLastResiFlag = false;
    32073207#endif
     
    32133213      for ( Int iRefIdxTemp = 0; iRefIdxTemp < pcCU->getSlice()->getNumRefIdx(eRefPicList); iRefIdxTemp++ )
    32143214      {
    3215 #if LG_RESTRICTEDRESPRED_M24766
     3215#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    32163216        if( pcCU->getResPredFlag( 0 ))
    32173217        {
     
    33933393      }
    33943394    }
    3395 #if LG_RESTRICTEDRESPRED_M24766
     3395#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    33963396    if( pcCU->getResPredFlag( 0 ) && bLastResiFlag)
    33973397    { // subtract residual prediction from original in motion search
     
    34023402    if ( pcCU->getSlice()->isInterB() )
    34033403    {
    3404 #if LG_RESTRICTEDRESPRED_M24766
     3404#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    34053405      Int iLastAddResiShift = -1000;
    34063406#endif
     
    35073507          uiBitsTemp += m_auiMVPIdxCost[aaiMvpIdxBi[iRefList][iRefIdxTemp]][AMVP_MAX_NUM_CANDS];
    35083508#endif
    3509 #if LG_RESTRICTEDRESPRED_M24766
     3509#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    35103510          Int iAddResiShift = -1, iPredFrom = 0;
    35113511          Int iBestRefIdx = pcCU->getCUMvField(eRefPicList == REF_PIC_LIST_0 ? REF_PIC_LIST_1 : REF_PIC_LIST_0)->getRefIdx(uiPartAddr);
     
    35923592        }
    35933593      } // for loop-iter
    3594 #if LG_RESTRICTEDRESPRED_M24766
     3594#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    35953595      if( pcCU->getResPredFlag( 0 ) && iLastAddResiShift >= 0)
    35963596      {
     
    38053805      if (bTestNormalMC)
    38063806      {
    3807 #if LG_RESTRICTEDRESPRED_M24766
     3807#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    38083808        Int iAddResiShift = pcCU->getResiPredMode(uiPartAddr);
    38093809        iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = \
     
    38163816        xGetInterPredictionError( pcCU, pcOrgYuv, iPartIdx, uiMEError, m_pcEncCfg->getUseHADME() );
    38173817        uiMECost = uiMEError + m_pcRdCost->getCost( uiMEBits );
    3818 #if LG_RESTRICTEDRESPRED_M24766
     3818#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    38193819        if(pcCU->getResPredFlag(0) && iAddResiShift >= 0)
    38203820        {
     
    38433843#endif
    38443844#else
    3845 #if LG_RESTRICTEDRESPRED_M24766
     3845#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    38463846      xMergeEstimation( pcCU, pcOrgYuv, rpcResiPredYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost );
    38473847#else
     
    47544754  UInt      uiWidth      = pcCU->getWidth ( 0 );
    47554755  UInt      uiHeight     = pcCU->getHeight( 0 );
    4756 #if LG_RESTRICTEDRESPRED_M24766
     4756#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    47574757  Int       iPUResiPredShift[4];
    47584758#endif
     
    47644764    pcYuvPred->copyToPartYuv( rpcYuvRec, 0 );
    47654765   
     4766#if MTK_MDIVRP_C0138
     4767    if (pcCU->getMergeFlag(0) && pcCU->getMergeIndex(0)==0 && pcCU->getResPredAvail(0))
     4768    {
     4769      rpcYuvRec->clip( uiWidth, uiHeight );
     4770    }
     4771#else
    47664772#if HHI_INTER_VIEW_RESIDUAL_PRED
    47674773    // add residual prediction
     
    47764782      rpcYuvRec->clip( uiWidth, uiHeight );
    47774783    }
     4784#endif
    47784785#endif
    47794786
     
    48214828    m_pcEntropyCoder->encodeICFlag(pcCU, 0, true);
    48224829#endif
    4823 #if HHI_INTER_VIEW_RESIDUAL_PRED
     4830#if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138
    48244831    m_pcEntropyCoder->encodeResPredFlag( pcCU, 0, 0, true );
    48254832#endif
     
    48994906  else
    49004907  {
    4901 #if LG_RESTRICTEDRESPRED_M24766
     4908#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    49024909    iPUResiPredShift[0] = iPUResiPredShift[1] = iPUResiPredShift[2] = iPUResiPredShift[3] = 0;
    49034910    rpcYuvResi->subtract(iPUResiPredShift, pcCU->getPartitionSize(0), pcYuvOrg, pcYuvPred, 0, uiWidth );
     
    49054912  rpcYuvResi->subtract( pcYuvOrg, pcYuvPred, 0, uiWidth );
    49064913#endif
    4907 #if HHI_INTER_VIEW_RESIDUAL_PRED
     4914#if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138
    49084915    // subtract residual prediction
    49094916    if( pcCU->getResPredFlag( 0 ) )
     
    51275134#endif
    51285135  }
    5129 #if HHI_INTER_VIEW_RESIDUAL_PRED
     5136#if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138
    51305137  // add residual prediction
    51315138  if( pcCU->getResPredFlag( 0 ) )
     
    62046211    m_pcEntropyCoder->encodeICFlag(pcCU, 0, true);
    62056212#endif
    6206 #if HHI_INTER_VIEW_RESIDUAL_PRED
     6213#if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138
    62076214    m_pcEntropyCoder->encodeResPredFlag( pcCU, 0, 0, true );
    62086215#endif
     
    62276234    m_pcEntropyCoder->encodeICFlag(pcCU, 0, true);
    62286235#endif
    6229 #if HHI_INTER_VIEW_RESIDUAL_PRED
     6236#if HHI_INTER_VIEW_RESIDUAL_PRED && !MTK_MDIVRP_C0138
    62306237    m_pcEntropyCoder->encodeResPredFlag( pcCU, 0, 0, true );
    62316238#endif
  • branches/HTM-5.1-dev2-Mediatek/source/Lib/TLibEncoder/TEncSearch.h

    r210 r244  
    196196  Void predInterSearch          ( TComDataCU* pcCU,
    197197                                  TComYuv*    pcOrgYuv,
    198 #if LG_RESTRICTEDRESPRED_M24766
     198#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    199199                                  TComYuv*    rpcResiPredYuv,
    200200#endif
     
    500500  Void xMergeEstimation           ( TComDataCU*     pcCU,
    501501                                    TComYuv*        pcYuvOrg,
    502 #if LG_RESTRICTEDRESPRED_M24766
     502#if LG_RESTRICTEDRESPRED_M24766 && !MTK_MDIVRP_C0138
    503503                                    TComYuv*        rpcResiPredYuv,
    504504#endif
Note: See TracChangeset for help on using the changeset viewer.