Ignore:
Timestamp:
4 Feb 2013, 02:57:15 (12 years ago)
Author:
lg
Message:

Integration of JCT3V-C0046

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-5.1-dev1-LG/source/Lib/TLibCommon/TComPrediction.cpp

    r251 r253  
    786786    UInt uiRShift = ( bi ? 14-g_uiBitDepth-g_uiBitIncrement : 0 );
    787787    UInt uiOffset = bi ? IF_INTERNAL_OFFS : 0;
     788#if LGE_ILLUCOMP_DEPTH_C0046
     789    Bool bICFlag = pcCU->getICFlag(uiPartAddr) && (pcCU->getSlice()->getRefViewId( eRefPicList, iRefIdx ) != pcCU->getSlice()->getViewId());
     790#endif
    788791#if DEPTH_MAP_GENERATION
    789     xPredInterPrdDepthMap( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, 0, 0, rpcYuvPred, uiRShift, uiOffset );
     792    xPredInterPrdDepthMap( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, 0, 0, rpcYuvPred, uiRShift, uiOffset
     793#if LGE_ILLUCOMP_DEPTH_C0046
     794        , bICFlag
     795#endif
     796        );
    790797#else
    791798    xPredInterPrdDepthMap( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, uiRShift, uiOffset );
     
    889896Void
    890897#if DEPTH_MAP_GENERATION
    891 TComPrediction::xPredInterPrdDepthMap( TComDataCU* pcCU, TComPicYuv* pcPicYuvRef, UInt uiPartAddr, TComMv* pcMv, Int iWidth, Int iHeight, UInt uiSubSampExpX, UInt uiSubSampExpY, TComYuv*& rpcYuv, UInt uiRShift, UInt uiOffset )
     898TComPrediction::xPredInterPrdDepthMap( TComDataCU* pcCU, TComPicYuv* pcPicYuvRef, UInt uiPartAddr, TComMv* pcMv, Int iWidth, Int iHeight, UInt uiSubSampExpX, UInt uiSubSampExpY, TComYuv*& rpcYuv, UInt uiRShift, UInt uiOffset
     899#if LGE_ILLUCOMP_DEPTH_C0046
     900, Bool bICFlag
     901#endif
     902)
    892903#else
    893904TComPrediction::xPredInterPrdDepthMap( TComDataCU* pcCU, TComPicYuv* pcPicYuvRef, UInt uiPartAddr, TComMv* pcMv, Int iWidth, Int iHeight, TComYuv*& rpcYuv, UInt uiRShift, UInt uiOffset )
     
    941952    }
    942953  }
     954
     955#if LGE_ILLUCOMP_DEPTH_C0046
     956  if(bICFlag)
     957  {
     958    Int a, b, iShift;
     959    TComMv tTmpMV(pcMv->getHor()<<2, pcMv->getVer()<<2);
     960
     961    piRefY      = pcPicYuvRef->getLumaAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() + uiPartAddr ) + iRefOffset;
     962    piDstY      = rpcYuv->getLumaAddr( uiPartAddr );
     963
     964    xGetLLSICPrediction(pcCU, &tTmpMV, pcPicYuvRef, a, b, iShift);
     965
     966    for( Int y = 0; y < iHeight; y++, piDstY += iDstStride, piRefY += iRefStride )
     967    {
     968      for( Int x = 0; x < iWidth; x++ )
     969      {
     970        if(uiOffset)
     971        {
     972          Int iIFshift = IF_INTERNAL_PREC - ( g_uiBitDepth + g_uiBitIncrement );
     973          piDstY[ x ] = ( (a*piDstY[ x ]+a*IF_INTERNAL_OFFS) >> iShift ) + b*(1<<iIFshift) - IF_INTERNAL_OFFS;
     974        }
     975        else
     976          piDstY[ x ] = Clip( ( (a*piDstY[ x ]) >> iShift ) + b );
     977      }
     978    }
     979  }
     980#endif
    943981}
    944982
     
    17041742  iCUPelX = pcCU->getCUPelX() + g_auiRasterToPelX[g_auiZscanToRaster[pcCU->getZorderIdxInCU()]];
    17051743  iCUPelY = pcCU->getCUPelY() + g_auiRasterToPelY[g_auiZscanToRaster[pcCU->getZorderIdxInCU()]];
     1744#if FIX_LGE_ILLUCOMP_B0045
     1745  iRefX   = iCUPelX + (pMv->getHor() >> 2);
     1746  iRefY   = iCUPelY + (pMv->getVer() >> 2);
     1747#else
    17061748  iRefX   = iCUPelX + (pMv->getHor() >> 3);
    17071749  iRefY   = iCUPelY + (pMv->getVer() >> 3);
     1750#endif
    17081751  uiWidth = pcCU->getWidth(0) >> 1;
    17091752  uiHeight = pcCU->getHeight(0) >> 1;
Note: See TracChangeset for help on using the changeset viewer.