Ignore:
Timestamp:
4 Jul 2013, 02:34:03 (11 years ago)
Author:
mitsubishi-htm
Message:

-intermediate version. equivalent as previous.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComPrediction.cpp

    r512 r519  
    437437  Int         iHeight;
    438438  UInt        uiPartAddr;
    439 #if H_3D_VSP
    440   UInt        uiAbsPartIdx = pcCU->getZorderIdxInCU();
    441 #endif
    442439
    443440  if ( iPartIdx >= 0 )
     
    479476    {
    480477      if ( xCheckIdenticalMotion( pcCU, uiPartAddr ) )
    481         xPredInterUniVSP( pcCU, uiPartAddr, uiAbsPartIdx, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred );
     478        xPredInterUniVSP( pcCU, uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred );
    482479      else
    483         xPredInterBiVSP ( pcCU, uiPartAddr, uiAbsPartIdx, iWidth, iHeight, pcYuvPred );
     480        xPredInterBiVSP ( pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred );
    484481    }
    485482#endif
     
    526523    {
    527524      if ( xCheckIdenticalMotion( pcCU, uiPartAddr ) )
    528         xPredInterUniVSP( pcCU, uiPartAddr, uiAbsPartIdx, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred );
     525        xPredInterUniVSP( pcCU, uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred );
    529526      else
    530         xPredInterBiVSP ( pcCU, uiPartAddr, uiAbsPartIdx, iWidth, iHeight, pcYuvPred );
     527        xPredInterBiVSP ( pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred );
    531528    }
    532529#endif
     
    573570
    574571#if H_3D_VSP
    575 Void TComPrediction::xPredInterUniVSP( TComDataCU* pcCU, UInt uiPartAddr, UInt uiAbsPartIdx, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi )
    576 {
     572Void TComPrediction::xPredInterUniVSP( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi )
     573{
     574  UInt uiAbsPartIdx = pcCU->getZorderIdxInCU();
     575
    577576  // Step 1: get depth reference
    578577  Int depthRefViewIdx = pcCU->getDvInfo(uiPartAddr).m_aVIdxCan;
     
    592591  Int txtRefViewIdx = pRefPicBaseTxt->getViewIndex();
    593592  Int* pShiftLUT    = pcCU->getSlice()->getDepthToDisparityB( txtRefViewIdx );
     593  assert( txtRefViewIdx < pcCU->getSlice()->getViewIndex() );
    594594
    595595  // Step 4: Do compensation
    596   TComMv cMv  = pcCU->getCUMvField( eRefPicList )->getMv( uiPartAddr ); // cMv is the disparity vector derived from the neighbors
    597   pcCU->clipMv(cMv);
     596  TComMv cDv  = pcCU->getCUMvField( eRefPicList )->getMv( uiPartAddr ); // cDv is the disparity vector derived from the neighbors
     597  pcCU->clipMv(cDv);
    598598  Int iBlkX = ( pcCU->getAddr() % pRefPicBaseDepth->getFrameWidthInCU() ) * g_uiMaxCUWidth  + g_auiRasterToPelX[ g_auiZscanToRaster[ uiAbsPartIdx ] ];
    599599  Int iBlkY = ( pcCU->getAddr() / pRefPicBaseDepth->getFrameWidthInCU() ) * g_uiMaxCUHeight + g_auiRasterToPelY[ g_auiZscanToRaster[ uiAbsPartIdx ] ];
    600   xPredInterLumaBlkFromDM  ( pcBaseViewTxtPicYuv, pcBaseViewDepthPicYuv, pShiftLUT, &cMv, uiPartAddr, iBlkX,    iBlkY,    iWidth,    iHeight,    pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi );
    601   xPredInterChromaBlkFromDM( pcBaseViewTxtPicYuv, pcBaseViewDepthPicYuv, pShiftLUT, &cMv, uiPartAddr, iBlkX>>1, iBlkY>>1, iWidth>>1, iHeight>>1, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi );
     600  xPredInterLumaBlkFromDM  ( pcBaseViewTxtPicYuv, pcBaseViewDepthPicYuv, pShiftLUT, &cDv, uiPartAddr, iBlkX,    iBlkY,    iWidth,    iHeight,    pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi );
     601  xPredInterChromaBlkFromDM( pcBaseViewTxtPicYuv, pcBaseViewDepthPicYuv, pShiftLUT, &cDv, uiPartAddr, iBlkX>>1, iBlkY>>1, iWidth>>1, iHeight>>1, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi );
    602602}
    603603#endif
     
    748748#if H_3D_VSP
    749749
    750 Void TComPrediction::xPredInterBiVSP( TComDataCU* pcCU, UInt uiPartAddr, UInt uiAbsPartIdx, Int iWidth, Int iHeight, TComYuv*& rpcYuvPred )
     750Void TComPrediction::xPredInterBiVSP( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, TComYuv*& rpcYuvPred )
    751751{
    752752  TComYuv* pcMbYuv;
     
    765765    pcMbYuv = &m_acYuvPred[iRefList];
    766766    if( pcCU->getCUMvField( REF_PIC_LIST_0 )->getRefIdx( uiPartAddr ) >= 0 && pcCU->getCUMvField( REF_PIC_LIST_1 )->getRefIdx( uiPartAddr ) >= 0 )
    767       xPredInterUniVSP ( pcCU, uiPartAddr, uiAbsPartIdx, iWidth, iHeight, eRefPicList, pcMbYuv, true );
     767      xPredInterUniVSP ( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcMbYuv, true );
    768768    else
    769       xPredInterUniVSP ( pcCU, uiPartAddr, uiAbsPartIdx, iWidth, iHeight, eRefPicList, pcMbYuv );
     769      xPredInterUniVSP ( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcMbYuv );
    770770  }
    771771
     
    13901390// sizeX, sizeY: PU size
    13911391// partAddr: z-order index
    1392 // mv: disparity vector. derived from neighboring blocks
     1392// dv: disparity vector. derived from neighboring blocks
    13931393//
    13941394// Output: dstPic, PU predictor 64x64
    1395 Void TComPrediction::xPredInterLumaBlkFromDM( TComPicYuv *refPic, TComPicYuv *pPicBaseDepth, Int* pShiftLUT, TComMv* mv, UInt partAddr,Int posX, Int posY
     1395Void TComPrediction::xPredInterLumaBlkFromDM( TComPicYuv *refPic, TComPicYuv *pPicBaseDepth, Int* pShiftLUT, TComMv* dv, UInt partAddr,Int posX, Int posY
    13961396                                            , Int sizeX, Int sizeY, Bool isDepth, TComYuv *&dstPic, Bool bi )
    13971397{
     
    14261426  Int dstStride = dstPic->getStride();
    14271427  Int depStride =  pPicBaseDepth->getStride();
    1428   Int depthPosX = Clip3(0,   widthLuma - sizeX,  (posX/nTxtPerDepthX) + ((mv->getHor()+2)>>2));
    1429   Int depthPosY = Clip3(0,   heightLuma- sizeY,  (posY/nTxtPerDepthY) + ((mv->getVer()+2)>>2));
     1428  Int depthPosX = Clip3(0,   widthLuma - sizeX,  (posX/nTxtPerDepthX) + ((dv->getHor()+2)>>2));
     1429  Int depthPosY = Clip3(0,   heightLuma- sizeY,  (posY/nTxtPerDepthY) + ((dv->getVer()+2)>>2));
    14301430  Pel *ref    = refPic->getLumaAddr() + posX + posY * refStride;
    14311431  Pel *dst    = dstPic->getLumaAddr(partAddr);
     
    15951595}
    15961596
    1597 Void TComPrediction::xPredInterChromaBlkFromDM ( TComPicYuv *refPic, TComPicYuv *pPicBaseDepth, Int* pShiftLUT, TComMv*mv, UInt partAddr, Int posX, Int posY
     1597Void TComPrediction::xPredInterChromaBlkFromDM ( TComPicYuv *refPic, TComPicYuv *pPicBaseDepth, Int* pShiftLUT, TComMv*dv, UInt partAddr, Int posX, Int posY
    15981598                                               , Int sizeX, Int sizeY, Bool isDepth, TComYuv *&dstPic, Bool bi)
    15991599{
     
    16291629    nTxtPerDepthX = widthChroma / widthDepth;
    16301630    nDepthPerTxtX = 1;
    1631     depthPosX = posX / nTxtPerDepthX + ((mv->getHor()+2)>>2);
     1631    depthPosX = posX / nTxtPerDepthX + ((dv->getHor()+2)>>2);
    16321632  }
    16331633  else
     
    16351635    nTxtPerDepthX = 1;
    16361636    nDepthPerTxtX = widthDepth / widthChroma;
    1637     depthPosX = posX * nDepthPerTxtX + ((mv->getHor()+2)>>2);
     1637    depthPosX = posX * nDepthPerTxtX + ((dv->getHor()+2)>>2);
    16381638  }
    16391639  depthPosX = Clip3(0, widthDepth - (sizeX<<1), depthPosX);
     
    16421642    nTxtPerDepthY = heightChroma / heightDepth;
    16431643    nDepthPerTxtY = 1;
    1644     depthPosY = posY / nTxtPerDepthY + ((mv->getVer()+2)>>2);
     1644    depthPosY = posY / nTxtPerDepthY + ((dv->getVer()+2)>>2);
    16451645  }
    16461646  else
     
    16481648    nTxtPerDepthY = 1;
    16491649    nDepthPerTxtY = heightDepth / heightChroma;
    1650     depthPosY = posY * nDepthPerTxtY + ((mv->getVer()+2)>>2);
     1650    depthPosY = posY * nDepthPerTxtY + ((dv->getVer()+2)>>2);
    16511651  }
    16521652  depthPosY = Clip3(0, heightDepth - (sizeY<<1), depthPosY);
Note: See TracChangeset for help on using the changeset viewer.