Ignore:
Timestamp:
16 Jun 2013, 05:33:39 (11 years ago)
Author:
lg
Message:

1.IC and full pel depth coding are integrated and is guarded by Macro H_3D_IC.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-DEV-0.3-dev2a/source/Lib/TLibEncoder/TEncSearch.cpp

    r464 r468  
    317317 
    318318  piRefSrch = rcStruct.piRefY + iSearchY * rcStruct.iYStride + iSearchX;
    319  
     319#if H_3D_IC
     320  m_cDistParam.bUseIC = pcPatternKey->getICFlag();
     321#endif
    320322  //-- jclee for using the SAD function pointer
    321323  m_pcRdCost->setDistParam( pcPatternKey, piRefSrch, rcStruct.iYStride,  m_cDistParam );
     
    744746
    745747    setDistParamComp(0);  // Y component
    746 
     748#if H_3D_IC
     749    m_cDistParam.bUseIC = pcPatternKey->getICFlag();
     750#endif
    747751    m_cDistParam.pCur = piRefPos;
    748752    m_cDistParam.bitDepth = g_bitDepthY;
     
    31473151#else
    31483152                            iWidth, iHeight, m_pcEncCfg->getUseHADME() );
     3153#endif
     3154#if H_3D_IC
     3155  cDistParam.bUseIC = false;
    31493156#endif
    31503157  ruiErr = cDistParam.DistFunc( &cDistParam );
     
    42354242  pcCU->clipMv( cMvCand );
    42364243
     4244#if H_3D_IC
     4245  Bool bICFlag = pcCU->getICFlag( uiPartAddr ) && ( pcCU->getSlice()->getViewIndex() != pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getViewIndex() );
     4246#endif
     4247
    42374248  // prediction pattern
    42384249  if ( pcCU->getSlice()->getPPS()->getUseWP() && pcCU->getSlice()->getSliceType()==P_SLICE )
     
    42424253  else
    42434254  {
    4244     xPredInterLumaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cMvCand, iSizeX, iSizeY, pcTemplateCand, false );
     4255    xPredInterLumaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cMvCand, iSizeX, iSizeY, pcTemplateCand, false
     4256#if H_3D_IC
     4257    , bICFlag
     4258#endif
     4259      );
    42454260  }
    42464261
     
    42954310  pcCU->getPartIndexAndSize( iPartIdx, uiPartAddr, iRoiWidth, iRoiHeight );
    42964311 
     4312#if H_3D_IC
     4313  Bool bICFlag = pcCU->getICFlag( uiPartAddr ) && ( pcCU->getSlice()->getViewIndex() != pcCU->getSlice()->getRefPic( eRefPicList, iRefIdxPred )->getViewIndex() );
     4314  pcPatternKey->setICFlag( bICFlag );
     4315#endif
     4316
    42974317  if ( bBi )
    42984318  {
     
    43274347 
    43284348  m_pcRdCost->setPredictor  ( *pcMvPred );
     4349#if H_3D_IC
     4350  if( pcCU->getSlice()->getIsDepth() )
     4351    m_pcRdCost->setCostScale  ( 0 );
     4352  else
     4353#endif
    43294354  m_pcRdCost->setCostScale  ( 2 );
    43304355
     
    43424367 
    43434368  m_pcRdCost->getMotionCost( 1, 0 );
     4369#if H_3D_IC
     4370  if( ! pcCU->getSlice()->getIsDepth() )
     4371  {
     4372#endif
    43444373  m_pcRdCost->setCostScale ( 1 );
    43454374 
     
    43564385  rcMv += (cMvHalf <<= 1);
    43574386  rcMv +=  cMvQter;
     4387#if H_3D_IC
     4388  }
     4389#endif
    43584390 
    43594391  UInt uiMvBits = m_pcRdCost->getBits( rcMv.getHor(), rcMv.getVer() );
    4360  
     4392#if H_3D_IC
     4393  if( pcCU->getSlice()->getIsDepth() )
     4394    ruiCost += m_pcRdCost->getCost( uiMvBits );
     4395#endif
    43614396  ruiBits      += uiMvBits;
    43624397  ruiCost       = (UInt)( floor( fWeight * ( (Double)ruiCost - (Double)m_pcRdCost->getCost( uiMvBits ) ) ) + (Double)m_pcRdCost->getCost( ruiBits ) );
     
    43674402{
    43684403  Int  iMvShift = 2;
     4404#if H_3D_IC
     4405  if( pcCU->getSlice()->getIsDepth() )
     4406    iMvShift = 0;
     4407#endif
    43694408  TComMv cTmpMvPred = cMvPred;
    43704409  pcCU->clipMv( cTmpMvPred );
     
    44184457
    44194458      setDistParamComp(0);
    4420 
     4459#if H_3D_IC
     4460      m_cDistParam.bUseIC = pcPatternKey->getICFlag();
     4461#endif
    44214462      m_cDistParam.bitDepth = g_bitDepthY;
    44224463      uiSad = m_cDistParam.DistFunc( &m_cDistParam );
     
    44694510  UInt uiSearchRange = m_iSearchRange;
    44704511  pcCU->clipMv( rcMv );
     4512#if H_3D_IC
     4513  if( ! pcCU->getSlice()->getIsDepth() )
     4514#endif
    44714515  rcMv >>= 2;
    44724516  // init TZSearchStruct
     
    44864530      TComMv cMv = m_acMvPredictors[index];
    44874531      pcCU->clipMv( cMv );
     4532#if H_3D_IC
     4533      if( ! pcCU->getSlice()->getIsDepth() )
     4534#endif
    44884535      cMv >>= 2;
    44894536      xTZSearchHelp( pcPatternKey, cStruct, cMv.getHor(), cMv.getVer(), 0, 0 );
     
    47414788    m_pcEntropyCoder->encodeSkipFlag(pcCU, 0, true);
    47424789    m_pcEntropyCoder->encodeMergeIndex( pcCU, 0, true );
     4790#if H_3D_IC
     4791    m_pcEntropyCoder->encodeICFlag( pcCU, 0, true );
     4792#endif
    47434793#if H_3D_ARP
    47444794    m_pcEntropyCoder->encodeARPW( pcCU, 0 );
     
    61526202    m_pcEntropyCoder->encodeSkipFlag(pcCU, 0, true);
    61536203    m_pcEntropyCoder->encodeMergeIndex(pcCU, 0, true);
     6204#if H_3D_IC
     6205    m_pcEntropyCoder->encodeICFlag( pcCU, 0, true );
     6206#endif
    61546207#if H_3D_ARP
    61556208    m_pcEntropyCoder->encodeARPW( pcCU, 0 );
     
    61686221    m_pcEntropyCoder->encodePartSize( pcCU, 0, pcCU->getDepth(0), true );
    61696222    m_pcEntropyCoder->encodePredInfo( pcCU, 0, true );
     6223#if H_3D_IC
     6224    m_pcEntropyCoder->encodeICFlag( pcCU, 0, true );
     6225#endif
    61706226#if H_3D_ARP
    61716227    m_pcEntropyCoder->encodeARPW( pcCU , 0 );
Note: See TracChangeset for help on using the changeset viewer.