Changeset 809 in 3DVCSoftware


Ignore:
Timestamp:
29 Jan 2014, 03:07:07 (11 years ago)
Author:
ntt
Message:

Integration of G0148

Location:
branches/HTM-9.3-dev1-NTT
Files:
3 added
11 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-9.3-dev1-NTT/source/Lib/TLibCommon/TComDataCU.cpp

    r801 r809  
    35393539  for ( Int currListPos = (ivCandDir[0] ? 1 : 0); currListPos < iCount; currListPos++ )
    35403540  {
     3541#if NTT_STORE_SPDV_VSP_G0148
     3542    if ( ( currListPos == posIvDC ) || ( vspFlag[ currListPos ] != 0 ) )
     3543#else
    35413544    if ( ( currListPos == posIvDC ) || ( vspFlag[ currListPos ] == 1 ) )
     3545#endif
    35423546    {
    35433547      continue;
     
    40524056    iPosLeftAbove[0] = numA1B1B0;
    40534057#if H_3D_VSP
     4058#if NTT_STORE_SPDV_VSP_G0148
     4059    if (pcCULeft->getVSPFlag(uiLeftPartIdx) != 0
     4060#else
    40544061    if (pcCULeft->getVSPFlag(uiLeftPartIdx) == 1
     4062#endif
    40554063#if H_3D_IC
    40564064      && !bICFlag
     
    40754083    iPosLeftAbove[1] = numA1B1B0;
    40764084#if H_3D_VSP
     4085#if NTT_STORE_SPDV_VSP_G0148
     4086    if ( ( ( getAddr() - pcCUAbove->getAddr() ) == 0) && (pcCUAbove->getVSPFlag(uiAbovePartIdx) != 0)
     4087#else
    40774088    if ( ( ( getAddr() - pcCUAbove->getAddr() ) == 0) && (pcCUAbove->getVSPFlag(uiAbovePartIdx) == 1)
     4089#endif
    40784090#if H_3D_IC
    40794091      && !bICFlag
     
    40984110  {
    40994111#if H_3D_VSP
     4112#if NTT_STORE_SPDV_VSP_G0148
     4113    if ( ( ( getAddr() - pcCUAboveRight->getAddr() ) == 0) && (pcCUAboveRight->getVSPFlag(uiAboveRightPartIdx) != 0)
     4114#else
    41004115    if ( ( ( getAddr() - pcCUAboveRight->getAddr() ) == 0) && (pcCUAboveRight->getVSPFlag(uiAboveRightPartIdx) == 1)
     4116#endif
    41014117#if H_3D_IC
    41024118      && !bICFlag
     
    41194135  {
    41204136#if H_3D_VSP
     4137#if NTT_STORE_SPDV_VSP_G0148
     4138    if (pcCULeftBottom->getVSPFlag(uiLeftBottomPartIdx) != 0
     4139#else
    41214140    if (pcCULeftBottom->getVSPFlag(uiLeftBottomPartIdx) == 1
     4141#endif
    41224142#if H_3D_IC
    41234143      && !bICFlag
     
    41424162  {
    41434163#if H_3D_VSP
     4164#if NTT_STORE_SPDV_VSP_G0148
     4165    if ( ( ( getAddr() - pcCUAboveLeft->getAddr() ) == 0) && (pcCUAboveLeft->getVSPFlag(uiAboveLeftPartIdx) != 0)
     4166#else
    41444167    if ( ( ( getAddr() - pcCUAboveLeft->getAddr() ) == 0) && (pcCUAboveLeft->getVSPFlag(uiAboveLeftPartIdx) == 1)
     4168#endif
    41454169#if H_3D_IC
    41464170      && !bICFlag
     
    78697893#endif
    78707894
     7895#if NTT_STORE_SPDV_VSP_G0148
     7896Void TComDataCU::setMvFieldPUForVSP( TComDataCU* pcCU, UInt partAddr, Int width, Int height, RefPicList eRefPicList, Int iRefIdx, Int &vspSize )
     7897{
     7898  // Get depth reference
     7899  Int depthRefViewIdx = pcCU->getDvInfo(partAddr).m_aVIdxCan;
     7900 
     7901#if H_3D_FCO_VSP_DONBDV_E0163
     7902  TComPic* pRefPicBaseDepth = 0;
     7903  Bool     bIsCurrDepthCoded = false;
     7904  pRefPicBaseDepth  = pcCU->getSlice()->getIvPic( true, pcCU->getSlice()->getViewIndex() );
     7905  if ( pRefPicBaseDepth->getPicYuvRec() != NULL  )
     7906  {
     7907    bIsCurrDepthCoded = true;
     7908  }
     7909  else
     7910  {
     7911    pRefPicBaseDepth = pcCU->getSlice()->getIvPic (true, depthRefViewIdx );
     7912  }
     7913#else
     7914  TComPic* pRefPicBaseDepth = pcCU->getSlice()->getIvPic (true, depthRefViewIdx );
     7915#endif
     7916  assert(pRefPicBaseDepth != NULL);
     7917  TComPicYuv* pcBaseViewDepthPicYuv = pRefPicBaseDepth->getPicYuvRec();
     7918  assert(pcBaseViewDepthPicYuv != NULL);
     7919  pcBaseViewDepthPicYuv->extendPicBorder();
     7920
     7921  // Get texture reference
     7922  assert(iRefIdx >= 0);
     7923  TComPic* pRefPicBaseTxt = pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx );
     7924  TComPicYuv* pcBaseViewTxtPicYuv = pRefPicBaseTxt->getPicYuvRec();
     7925  assert(pcBaseViewTxtPicYuv != NULL);
     7926
     7927  // Initialize LUT according to the reference viewIdx
     7928  Int txtRefViewIdx = pRefPicBaseTxt->getViewIndex();
     7929  Int* pShiftLUT    = pcCU->getSlice()->getDepthToDisparityB( txtRefViewIdx );
     7930  assert( txtRefViewIdx < pcCU->getSlice()->getViewIndex() );
     7931
     7932  // prepare Dv to access depth map or reference view
     7933  TComMv cDv  = pcCU->getDvInfo(partAddr).m_acNBDV;
     7934  pcCU->clipMv(cDv);
     7935
     7936#if H_3D_FCO_VSP_DONBDV_E0163
     7937  if ( bIsCurrDepthCoded )
     7938  {
     7939      cDv.setZero();
     7940  }
     7941#endif
     7942
     7943  // fetch virtual depth map & convert depth to motion vector, which are stored in the motion memory
     7944  xSetMvFieldForVSP( pcCU, pcBaseViewDepthPicYuv, &cDv, partAddr, width, height, pShiftLUT, eRefPicList, iRefIdx, pcCU->getSlice()->getIsDepth(), vspSize );
     7945}
     7946
     7947Void TComDataCU::xSetMvFieldForVSP( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *dv, UInt partAddr, Int width, Int height, Int *shiftLUT, RefPicList refPicList, Int refIdx, Bool isDepth, Int &vspSize )
     7948{
     7949  TComCUMvField *cuMvField = cu->getCUMvField( refPicList );
     7950  Int partAddrRasterSubPULine  = g_auiZscanToRaster[ partAddr ];
     7951  Int numPartsLine    = cu->getPic()->getNumPartInWidth();
     7952
     7953  Int nTxtPerMvInfoX = 4; // cu->getPic()->getMinCUWidth();
     7954  Int nTxtPerMvInfoY = 4; // cu->getPic()->getMinCUHeight();
     7955
     7956  Int refDepStride = picRefDepth->getStride();
     7957
     7958  TComMv tmpMv(0, 0);
     7959  tmpMv.setIDVFlag(false);
     7960
     7961  Int refDepOffset  = ( (dv->getHor()+2) >> 2 ) + ( (dv->getVer()+2) >> 2 ) * refDepStride;
     7962  Pel *refDepth     = picRefDepth->getLumaAddr( cu->getAddr(), cu->getZorderIdxInCU() + partAddr ) + refDepOffset;
     7963
     7964  if ((height % 8))
     7965  {
     7966    vspSize = 1; // 8x4
     7967  }
     7968  else if ((width % 8))
     7969  {
     7970    vspSize = 0; // 4x8
     7971  }
     7972  else
     7973  {
     7974    Bool ULvsBR, URvsBL;
     7975    ULvsBR = refDepth[0]       < refDepth[refDepStride * (height-1) + width-1];
     7976    URvsBL = refDepth[width-1] < refDepth[refDepStride * (height-1)];
     7977    vspSize = ( ULvsBR ^ URvsBL ) ? 0 : 1;
     7978  }
     7979 
     7980  Int subBlockW, subBlockH;
     7981  if (vspSize)
     7982  {
     7983    subBlockW = 8;
     7984    subBlockH = 4;
     7985  }
     7986  else
     7987  {
     7988    subBlockW = 4;
     7989    subBlockH = 8;
     7990  }
     7991 
     7992  Int numPartsInSubPUW = subBlockW / nTxtPerMvInfoX;
     7993  Int numPartsInSubPUH = subBlockH / nTxtPerMvInfoY * numPartsLine;
     7994
     7995  for( Int y=0; y<height; y+=subBlockH, partAddrRasterSubPULine+=numPartsInSubPUH )
     7996  {
     7997    Pel *refDepthTmp[4];
     7998    refDepthTmp[0] = refDepth + refDepStride * y;
     7999    refDepthTmp[1] = refDepthTmp[0] + subBlockW - 1;
     8000    refDepthTmp[2] = refDepthTmp[0] + refDepStride * (subBlockH - 1);
     8001    refDepthTmp[3] = refDepthTmp[2] + subBlockW - 1;
     8002
     8003    Int partAddrRasterSubPU = partAddrRasterSubPULine;
     8004    for( Int x=0; x<width; x+=subBlockW, partAddrRasterSubPU+=numPartsInSubPUW )
     8005    {
     8006      Pel  maxDepthVal;
     8007      maxDepthVal = refDepthTmp[0][x];
     8008      maxDepthVal = std::max( maxDepthVal, refDepthTmp[1][x]);
     8009      maxDepthVal = std::max( maxDepthVal, refDepthTmp[2][x]);
     8010      maxDepthVal = std::max( maxDepthVal, refDepthTmp[3][x]);
     8011      tmpMv.setHor( (Short) shiftLUT[ maxDepthVal ] );
     8012
     8013      Int partAddrRasterPartLine = partAddrRasterSubPU;
     8014      for( Int sY=0; sY<numPartsInSubPUH; sY+=numPartsLine, partAddrRasterPartLine += numPartsLine )
     8015      {
     8016        Int partAddrRasterPart = partAddrRasterPartLine;
     8017        for( Int sX=0; sX<numPartsInSubPUW; sX+=1, partAddrRasterPart++ )
     8018        {
     8019          cuMvField->setMv    ( g_auiRasterToZscan[ partAddrRasterPart ], tmpMv );
     8020          cuMvField->setRefIdx( g_auiRasterToZscan[ partAddrRasterPart ], refIdx );
     8021        }
     8022      }
     8023    }
     8024  }
     8025
     8026  vspSize = (vspSize<<2)+1;
     8027
     8028}
     8029#endif // NTT_STORE_SPDV_VSP_G0148
    78718030
    78728031//! \}
  • branches/HTM-9.3-dev1-NTT/source/Lib/TLibCommon/TComDataCU.h

    r795 r809  
    291291  Void xDeriveCenterIdx( UInt uiPartIdx, UInt& ruiPartIdxCenter );
    292292
     293#if NTT_STORE_SPDV_VSP_G0148
     294  Void xSetMvFieldForVSP  ( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *dv, UInt partAddr, Int width, Int height, Int *shiftLUT, RefPicList refPicList, Int refIdx, Bool isDepth, Int &vspSize );
     295#endif
     296
    293297public:
    294298  TComDataCU();
     
    702706  Void          setVSPFlag        ( UInt uiIdx, Int n )     { m_piVSPFlag[uiIdx] = n;      }
    703707  Void          setVSPFlagSubParts( Char iVSPFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth );
     708#if NTT_STORE_SPDV_VSP_G0148
     709  Void          setMvFieldPUForVSP    ( TComDataCU* cu, UInt partAddr, Int width, Int height, RefPicList refPicList, Int refIdx, Int &vspSize );
     710#endif
    704711#endif
    705712  Void          deriveLeftRightTopIdxGeneral  ( UInt uiAbsPartIdx, UInt uiPartIdx, UInt& ruiPartIdxLT, UInt& ruiPartIdxRT );
  • branches/HTM-9.3-dev1-NTT/source/Lib/TLibCommon/TComMotionInfo.h

    r773 r809  
    176176  Void    setMvFieldSP ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComMvField cMvField, Int iWidth, Int iHeight  );
    177177#endif
     178#if NTT_STORE_SPDV_VSP_G0148
     179  Void    setMv         ( Int iIdx, TComMv const & rcMv ) { m_pcMv[iIdx] = rcMv; }
     180  Void    setRefIdx     ( Int iIdx, Int iRefIdx )         { m_piRefIdx[iIdx] = iRefIdx; }
     181#endif
    178182
    179183  Void setNumPartition( Int iNumPart )
  • branches/HTM-9.3-dev1-NTT/source/Lib/TLibCommon/TComPrediction.cpp

    r795 r809  
    863863Void TComPrediction::xPredInterUniVSP( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi )
    864864{
     865#if NTT_STORE_SPDV_VSP_G0148
     866  Int vspSize = pcCU->getVSPFlag( uiPartAddr ) >> 1;
     867
     868  Int widthSubPU, heightSubPU;
     869  if (vspSize)
     870  {
     871    widthSubPU  = 8;
     872    heightSubPU = 4;
     873  }
     874  else
     875  {
     876    widthSubPU  = 4;
     877    heightSubPU = 8;
     878  }
     879  xPredInterUniSubPU( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, rpcYuvPred, bi, widthSubPU, heightSubPU );
     880
     881#else // NTT_STORE_SPDV_VSP_G0148
    865882  // Get depth reference
    866883  Int       depthRefViewIdx = pcCU->getDvInfo(uiPartAddr).m_aVIdxCan;
     
    914931  xPredInterLumaBlkFromDM   ( pcCU, pcBaseViewTxtPicYuv, &m_cYuvDepthOnVsp, pShiftLUT, &cDv, uiPartAddr, iWidth, iHeight, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi, vspSize);
    915932  xPredInterChromaBlkFromDM ( pcCU, pcBaseViewTxtPicYuv, &m_cYuvDepthOnVsp, pShiftLUT, &cDv, uiPartAddr, iWidth, iHeight, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi, vspSize);
    916 }
     933#endif // NTT_STORE_SPDV_VSP_G0148
     934}
     935
     936#if NTT_STORE_SPDV_VSP_G0148
     937Void TComPrediction::xPredInterUniSubPU( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, Int widthSubPU, Int heightSubPU )
     938{
     939  UInt numPartsInLine       = pcCU->getPic()->getNumPartInWidth();
     940  UInt horiNumPartsInSubPU  = widthSubPU >> 2;
     941  UInt vertNumPartsInSubPU  = (heightSubPU >> 2) * numPartsInLine;
     942
     943  UInt partAddrRasterLine = g_auiZscanToRaster[ uiPartAddr ];
     944
     945  for( Int posY=0; posY<iHeight; posY+=heightSubPU, partAddrRasterLine+=vertNumPartsInSubPU )
     946  {
     947    UInt partAddrRasterSubPU = partAddrRasterLine;
     948    for( Int posX=0; posX<iWidth; posX+=widthSubPU, partAddrRasterSubPU+=horiNumPartsInSubPU )
     949    {
     950      UInt    partAddrSubPU = g_auiRasterToZscan[ partAddrRasterSubPU ];
     951      Int     refIdx        = pcCU->getCUMvField( eRefPicList )->getRefIdx( partAddrSubPU );           assert (refIdx >= 0);
     952      TComMv  cMv           = pcCU->getCUMvField( eRefPicList )->getMv( partAddrSubPU );
     953      pcCU->clipMv(cMv);
     954
     955      xPredInterLumaBlk  ( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, refIdx )->getPicYuvRec(), partAddrSubPU, &cMv, widthSubPU, heightSubPU, rpcYuvPred, bi );
     956      xPredInterChromaBlk( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, refIdx )->getPicYuvRec(), partAddrSubPU, &cMv, widthSubPU, heightSubPU, rpcYuvPred, bi );
     957
     958    }
     959  }
     960}
     961#endif // NTT_STORE_SPDV_VSP_G0148
     962
    917963#endif
    918964
     
    17691815
    17701816#if H_3D_VSP
     1817#if !(NTT_STORE_SPDV_VSP_G0148)
    17711818// not fully support iRatioTxtPerDepth* != 1
    17721819Void TComPrediction::xGetVirtualDepth( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *mv, UInt partAddr, Int width, Int height, TComYuv *yuvDepth, Int &vspSize, Int ratioTxtPerDepthX, Int ratioTxtPerDepthY )
     
    20812128  }
    20822129}
    2083 
     2130#endif
    20842131
    20852132#if H_3D_VSP_CONSTRAINED
  • branches/HTM-9.3-dev1-NTT/source/Lib/TLibCommon/TComPrediction.h

    r773 r809  
    121121
    122122#if H_3D_VSP
     123#if NTT_STORE_SPDV_VSP_G0148
     124  Void xPredInterUniSubPU        ( TComDataCU *cu, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, Int widthSubPU=4, Int heightSubPU=4 );
     125#else
    123126  Void xGetVirtualDepth           ( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *dv, UInt partAddr, Int width, Int height, TComYuv *yuvDepth, Int &vspSize, Int txtPerDepthX=1, Int txtPerDepthY=1 );
    124127  Void xPredInterLumaBlkFromDM    ( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&pcYuvDst, Bool isBi, Int vspSize);
    125128  Void xPredInterChromaBlkFromDM  ( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&pcYuvDst, Bool isBi, Int vspSize);
     129#endif
    126130#endif
    127131
  • branches/HTM-9.3-dev1-NTT/source/Lib/TLibCommon/TypeDef.h

    r800 r809  
    259259#endif
    260260#define MTK_RBIP_VSP_G0069                1   // Restricted bi-prediction for VSP
     261#define NTT_STORE_SPDV_VSP_G0148          1   // Storing Sub-PU based DV for VSP
    261262#endif
    262263
  • branches/HTM-9.3-dev1-NTT/source/Lib/TLibDecoder/TDecCu.cpp

    r795 r809  
    462462        pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvd( cTmpMv, SIZE_2Nx2N, uiAbsPartIdx, uiDepth );
    463463        pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvField( cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ], SIZE_2Nx2N, uiAbsPartIdx, uiDepth );
     464#if NTT_STORE_SPDV_VSP_G0148
     465        if( pcCU->getVSPFlag( uiAbsPartIdx ) != 0 )
     466        {
     467          if ( uhInterDirNeighbours[ uiMergeIndex ] & (1<<uiRefListIdx) )
     468          {
     469            UInt dummy;
     470            Int vspSize;
     471            Int width, height;
     472            m_ppcCU[uiDepth]->getPartIndexAndSize( uiAbsPartIdx, dummy, width, height );
     473            m_ppcCU[uiDepth]->setMvFieldPUForVSP( pcCU, uiAbsPartIdx, width, height, RefPicList( uiRefListIdx ), cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ].getRefIdx(), vspSize );
     474            pcCU->setVSPFlag( uiAbsPartIdx, vspSize );
     475          }
     476        }
     477#endif
    464478#if ENC_DEC_TRACE && H_MV_ENC_DEC_TRAC   
    465479        if ( g_decTraceMvFromMerge )
  • branches/HTM-9.3-dev1-NTT/source/Lib/TLibDecoder/TDecEntropy.cpp

    r795 r809  
    342342          pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvd( cTmpMv, ePartSize, uiSubPartIdx, uiDepth, uiPartIdx );
    343343          pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvField( cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ], ePartSize, uiSubPartIdx, uiDepth, uiPartIdx );
     344#if NTT_STORE_SPDV_VSP_G0148
     345          if( pcCU->getVSPFlag( uiSubPartIdx ) != 0 )
     346          {
     347            if ( uhInterDirNeighbours[ uiMergeIndex ] & (1<<uiRefListIdx) )
     348            {
     349              UInt dummy;
     350              Int vspSize;
     351              Int width, height;
     352              pcCU->getPartIndexAndSize( uiPartIdx, dummy, width, height, uiSubPartIdx, pcCU->getTotalNumPart()==256 );
     353              pcCU->setMvFieldPUForVSP( pcCU, uiSubPartIdx, width, height, RefPicList( uiRefListIdx ), cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ].getRefIdx(), vspSize );
     354              pcCU->setVSPFlag( uiSubPartIdx, vspSize );
     355            }
     356          }
     357#endif
    344358        }
    345359      }
     
    388402    }
    389403#if H_3D_VSP
     404#if NTT_STORE_SPDV_VSP_G0148
     405    if ( (pcCU->getInterDir(uiSubPartIdx) == 3) && pcSubCU->isBipredRestriction(uiPartIdx) && (pcCU->getVSPFlag(uiSubPartIdx) == 0))
     406#else
    390407    if ( (pcCU->getInterDir(uiSubPartIdx) == 3) && pcSubCU->isBipredRestriction(uiPartIdx) && (pcCU->getVSPFlag(uiSubPartIdx) == false))
     408#endif
    391409#else
    392410    if ( (pcCU->getInterDir(uiSubPartIdx) == 3) && pcSubCU->isBipredRestriction(uiPartIdx) )
  • branches/HTM-9.3-dev1-NTT/source/Lib/TLibEncoder/TEncCu.cpp

    r795 r809  
    19551955          }
    19561956          else
     1957#endif
     1958#if NTT_STORE_SPDV_VSP_G0148
     1959          if ( vspFlag[uiMergeCand] )
    19571960          {
    1958 #endif
     1961            UInt partAddr;
     1962            Int vspSize;
     1963            Int width, height;
     1964            rpcTempCU->getPartIndexAndSize( 0, partAddr, width, height );
     1965
     1966            if( uhInterDirNeighbours[ uiMergeCand ] & 0x01 )
     1967            {
     1968              rpcTempCU->setMvFieldPUForVSP( rpcTempCU, partAddr, width, height, REF_PIC_LIST_0, cMvFieldNeighbours[ 2*uiMergeCand + 0 ].getRefIdx(), vspSize );
     1969              rpcTempCU->setVSPFlag( partAddr, vspSize );
     1970            }
     1971            else
     1972            {
     1973              rpcTempCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( cMvFieldNeighbours[0 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level
     1974            }
     1975            if( uhInterDirNeighbours[ uiMergeCand ] & 0x02 )
     1976            {
     1977              rpcTempCU->setMvFieldPUForVSP( rpcTempCU, partAddr, width, height, REF_PIC_LIST_1 , cMvFieldNeighbours[ 2*uiMergeCand + 1 ].getRefIdx(), vspSize );
     1978              rpcTempCU->setVSPFlag( partAddr, vspSize );
     1979            }
     1980            else
     1981            {
     1982              rpcTempCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level
     1983            }
     1984
     1985            rpcTempCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeCand], 0, 0, uhDepth ); // interprets depth relative to LCU level
     1986          }
     1987          else
     1988#endif
     1989          {
    19591990            rpcTempCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeCand], 0, 0, uhDepth ); // interprets depth relative to LCU level
    19601991            rpcTempCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( cMvFieldNeighbours[0 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level
    19611992            rpcTempCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level
    1962 #if H_3D_SPIVMP
    19631993          }
    1964 #endif
    19651994       // do MC
    19661995       m_pcPredSearch->motionCompensation ( rpcTempCU, m_ppcPredYuvTemp[uhDepth] );
     
    19922021
    19932022          rpcTempCU->setSkipFlagSubParts( rpcTempCU->getQtRootCbf(0) == 0, 0, uhDepth );
     2023#if NTT_STORE_SPDV_VSP_G0148 // possible bug fix
     2024          if( rpcTempCU->getSkipFlag(0) )
     2025          {
     2026            rpcTempCU->setTrIdxSubParts(0, 0, uhDepth);
     2027          }
     2028#endif
    19942029#if H_3D_INTER_SDC
    19952030          TComDataCU *rpcTempCUPre = rpcTempCU;
     
    22142249
    22152250  m_pcPredSearch->encodeResAndCalcRdInterCU( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcResiYuvBest[uhDepth], m_ppcRecoYuvTemp[uhDepth], false );
    2216 
     2251 
     2252#if NTT_STORE_SPDV_VSP_G0148 // possible bug fix
     2253  if( rpcTempCU->getQtRootCbf(0)==0 )
     2254  {
     2255    rpcTempCU->setTrIdxSubParts(0, 0, uhDepth);
     2256  }
     2257#endif
    22172258
    22182259#if H_3D_VSO // M4
  • branches/HTM-9.3-dev1-NTT/source/Lib/TLibEncoder/TEncSearch.cpp

    r795 r809  
    36433643     
    36443644      PartSize ePartSize = pcCU->getPartitionSize( 0 );
     3645     
     3646#if H_3D_VSP && NTT_STORE_SPDV_VSP_G0148
     3647      pcCU->setVSPFlagSubParts( vspFlag[uiMergeCand], uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) );
     3648      pcCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeCand].m_acDvInfo, uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) );
     3649#endif
    36453650
    36463651#if H_3D_SPIVMP
     
    36623667      }
    36633668      else
    3664       {
    3665 #endif
     3669#endif
     3670#if NTT_STORE_SPDV_VSP_G0148
     3671      if ( vspFlag[uiMergeCand] )
     3672      {
     3673        UInt partAddr;
     3674        Int vspSize;
     3675        Int width, height;
     3676        pcCU->getPartIndexAndSize( iPUIdx, partAddr, width, height );
     3677
     3678        if( uhInterDirNeighbours[ uiMergeCand ] & 0x01 )
     3679        {
     3680          pcCU->setMvFieldPUForVSP( pcCU, partAddr, width, height, REF_PIC_LIST_0, cMvFieldNeighbours[ 2*uiMergeCand + 0 ].getRefIdx(), vspSize );
     3681          pcCU->setVSPFlag( partAddr, vspSize );
     3682        }
     3683        else
     3684        {
     3685          pcCU->getCUMvField(REF_PIC_LIST_0)->setAllMvField( cMvFieldNeighbours[0 + 2*uiMergeCand], ePartSize, uiAbsPartIdx, 0, iPUIdx );
     3686        }
     3687        if( uhInterDirNeighbours[ uiMergeCand ] & 0x02 )
     3688        {
     3689          pcCU->setMvFieldPUForVSP( pcCU, partAddr, width, height, REF_PIC_LIST_1, cMvFieldNeighbours[ 2*uiMergeCand + 1 ].getRefIdx(), vspSize );
     3690          pcCU->setVSPFlag( partAddr, vspSize );
     3691        }
     3692        else
     3693        {
     3694          pcCU->getCUMvField(REF_PIC_LIST_1)->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand], ePartSize, uiAbsPartIdx, 0, iPUIdx );
     3695        }
     3696      }
     3697      else
     3698#endif
     3699      {
    36663700        pcCU->getCUMvField(REF_PIC_LIST_0)->setAllMvField( cMvFieldNeighbours[0 + 2*uiMergeCand], ePartSize, uiAbsPartIdx, 0, iPUIdx );
    36673701        pcCU->getCUMvField(REF_PIC_LIST_1)->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand], ePartSize, uiAbsPartIdx, 0, iPUIdx );
    3668 #if H_3D_SPIVMP
    3669       }
    3670 #endif
    3671 
    3672 #if H_3D_VSP
     3702      }
     3703
     3704#if H_3D_VSP && !NTT_STORE_SPDV_VSP_G0148
    36733705      pcCU->setVSPFlagSubParts( vspFlag[uiMergeCand], uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) );
    36743706      pcCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeCand].m_acDvInfo, uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) );
     
    44264458        }
    44274459        else
    4428         {
    4429 #endif
     4460#endif
     4461#if NTT_STORE_SPDV_VSP_G0148
     4462        if ( vspFlag[uiMRGIndex] )
     4463        {
     4464          UInt partAddrTemp;
     4465          Int vspSize;
     4466          Int width, height;
     4467          pcCU->getPartIndexAndSize( iPartIdx, partAddrTemp, width, height ); // true or pcCU->getTotalNumPart()==256
     4468
     4469          if( uiMRGInterDir & 0x01 )
     4470          {
     4471            pcCU->setMvFieldPUForVSP( pcCU, partAddrTemp, width, height, REF_PIC_LIST_0, cMRGMvField[0].getRefIdx(), vspSize );
     4472            pcCU->setVSPFlag( partAddrTemp, vspSize );
     4473          }
     4474          else
     4475          {
     4476            pcCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( cMRGMvField[0], ePartSize, uiPartAddr, 0, iPartIdx );
     4477          }
     4478          if( uiMRGInterDir & 0x02 )
     4479          {
     4480            pcCU->setMvFieldPUForVSP( pcCU, partAddrTemp, width, height, REF_PIC_LIST_1, cMRGMvField[1].getRefIdx(), vspSize );
     4481            pcCU->setVSPFlag( partAddrTemp, vspSize );
     4482          }
     4483          else
     4484          {
     4485            pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMRGMvField[1], ePartSize, uiPartAddr, 0, iPartIdx );
     4486          }
     4487          pcCU->setInterDirSubParts  ( uiMRGInterDir, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
     4488        }
     4489        else
     4490#endif
     4491        {
    44304492          pcCU->setInterDirSubParts  ( uiMRGInterDir, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
    44314493          {
     
    44334495            pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMRGMvField[1], ePartSize, uiPartAddr, 0, iPartIdx );
    44344496          }
    4435 #if H_3D_SPIVMP
    4436         }
    4437 #endif
     4497        }
    44384498
    44394499        pcCU->getCUMvField(REF_PIC_LIST_0)->setAllMvd    ( cMvZero,            ePartSize, uiPartAddr, 0, iPartIdx );
Note: See TracChangeset for help on using the changeset viewer.