Changeset 1255 in 3DVCSoftware


Ignore:
Timestamp:
11 Jun 2015, 01:07:43 (9 years ago)
Author:
ntt
Message:

Reactivation of VSP

Location:
branches/HTM-14.1-update-dev3-NTT
Files:
2 added
11 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-14.1-update-dev3-NTT/source/Lib/TLibCommon/TComDataCU.cpp

    r1233 r1255  
    128128  m_pDvInfo              = NULL;
    129129#endif
    130 #if H_3D_VSP
     130#if NH_3D_VSP
    131131  m_piVSPFlag            = NULL;
    132132#endif
     
    185185    m_pbMergeFlag        = (Bool*  )xMalloc(Bool,   uiNumPartition);
    186186    m_puhMergeIndex      = (UChar* )xMalloc(UChar,  uiNumPartition);
    187 #if H_3D_VSP
     187#if NH_3D_VSP
    188188    m_piVSPFlag          = (Char*  )xMalloc(Char,   uiNumPartition);
    189189#endif
     
    372372    }
    373373
    374 #if H_3D_VSP
    375     if ( m_piVSPFlag          ) { xFree(m_piVSPFlag);           m_piVSPFlag         = NULL; }
     374#if NH_3D_VSP
     375    if ( m_piVSPFlag )
     376    {
     377      xFree(m_piVSPFlag);
     378      m_piVSPFlag = NULL;
     379    }
    376380#endif
    377381#if H_3D_SPIVMP
     
    623627  memset( m_puhMergeIndex     , 0,                        m_uiNumPartition * sizeof( *m_puhMergeIndex ) );
    624628
    625 #if H_3D_VSP
    626     m_piVSPFlag[ui] = pcFrom->m_piVSPFlag[ui];
     629#if NH_3D_VSP
     630  memset( m_piVSPFlag         , 0,                        m_uiNumPartition * sizeof( *m_piVSPFlag ) );
    627631#endif
    628632#if H_3D_SPIVMP
     
    638642    memset( m_bDISFlag          + firstElement, false,                    numElements * sizeof( *m_bDISFlag ) );
    639643    memset( m_uiDISType         + firstElement,     0,                    numElements * sizeof( *m_uiDISType) );
    640 #endif
    641 #if H_3D_VSP
    642     memset( m_piVSPFlag         + firstElement, 0,                        numElements * sizeof( *m_piVSPFlag ) );
    643644#endif
    644645#if H_3D_SPIVMP
     
    795796    m_pbMergeFlag[ui]   = 0;
    796797    m_puhMergeIndex[ui] = 0;
    797 #if H_3D_VSP
    798       m_piVSPFlag[ui] = 0;
     798#if NH_3D_VSP
     799    m_piVSPFlag[ui]    = 0;
    799800#endif
    800801#if H_3D_SPIVMP
     
    896897  memset( m_pbMergeFlag,        0, iSizeInBool  );
    897898  memset( m_puhMergeIndex,      0, iSizeInUchar );
    898 #if H_3D_VSP
     899#if NH_3D_VSP
    899900  memset( m_piVSPFlag,          0, sizeof( Char  ) * m_uiNumPartition );
    900901#endif
     
    976977      m_uiDISType[ui]   = pcCU->getDISType(uiPartOffset+ui);
    977978#endif
    978 #if H_3D_VSP
    979       m_piVSPFlag[ui]=pcCU->m_piVSPFlag[uiPartOffset+ui];
    980       m_pDvInfo[ ui ] = pcCU->m_pDvInfo[uiPartOffset+ui];
     979#if NH_3D_VSP
     980    m_piVSPFlag[ui] = pcCU->m_piVSPFlag[uiPartOffset+ui];
     981    m_pDvInfo[ ui ] = pcCU->m_pDvInfo[uiPartOffset+ui];
    981982#endif
    982983#if H_3D_SPIVMP
     
    10841085  m_pbMergeFlag         = pcCU->getMergeFlag()        + uiPart;
    10851086  m_puhMergeIndex       = pcCU->getMergeIndex()       + uiPart;
    1086 #if H_3D_VSP
     1087#if NH_3D_VSP
    10871088  m_piVSPFlag           = pcCU->getVSPFlag()          + uiPart;
    10881089#endif
     
    12381239  m_pbMergeFlag        = pcCU->getMergeFlag()             + uiAbsPartIdx;
    12391240  m_puhMergeIndex      = pcCU->getMergeIndex()            + uiAbsPartIdx;
    1240 #if H_3D_VSP
     1241#if NH_3D_VSP
    12411242  m_piVSPFlag          = pcCU->getVSPFlag()               + uiAbsPartIdx;
    12421243  m_pDvInfo            = pcCU->getDvInfo()                + uiAbsPartIdx;
     
    12961297  memcpy( m_pbMergeFlag         + uiOffset, pcCU->getMergeFlag(),         iSizeInBool  );
    12971298  memcpy( m_puhMergeIndex       + uiOffset, pcCU->getMergeIndex(),        iSizeInUchar );
    1298 #if H_3D_VSP
     1299#if NH_3D_VSP
    12991300  memcpy( m_piVSPFlag           + uiOffset, pcCU->getVSPFlag(),           sizeof( Char ) * uiNumPartition );
    13001301  memcpy( m_pDvInfo             + uiOffset, pcCU->getDvInfo(),            sizeof( *m_pDvInfo ) * uiNumPartition );
     
    14231424  memcpy( pCtu->getMergeFlag()         + m_absZIdxInCtu, m_pbMergeFlag,         iSizeInBool  );
    14241425  memcpy( pCtu->getMergeIndex()        + m_absZIdxInCtu, m_puhMergeIndex,       iSizeInUchar );
    1425   #if H_3D_VSP
    1426   memcpy( rpcCU->getVSPFlag()           + m_uiAbsIdxInLCU, m_piVSPFlag,           sizeof( Char ) * m_uiNumPartition );
    1427   memcpy( rpcCU->getDvInfo()            + m_uiAbsIdxInLCU, m_pDvInfo,             sizeof( *m_pDvInfo ) * m_uiNumPartition );
     1426#if NH_3D_VSP
     1427  memcpy( pCtu->getVSPFlag()           + m_absZIdxInCtu, m_piVSPFlag,           sizeof( Char ) * m_uiNumPartition );
    14281428#endif
    14291429#if H_3D_SPIVMP
     
    15161516#endif
    15171517
    1518 #if H_3D_VSP
    1519   memcpy( rpcCU->getVSPFlag()           + uiPartOffset, m_piVSPFlag,           sizeof(Char) * uiQNumPart );
    1520 #endif
    15211518#if H_3D_SPIVMP
    15221519  memcpy( rpcCU->getSPIVMPFlag()        + uiPartOffset, m_pbSPIVMPFlag,        sizeof(Bool) * uiQNumPart );
     
    25042501#endif
    25052502
    2506 #if H_3D_VSP
     2503#if NH_3D_VSP
    25072504Void TComDataCU::setVSPFlagSubParts( Char iVSPFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth )
    25082505{
    25092506  setSubPart<Char>( iVSPFlag, m_piVSPFlag, uiAbsPartIdx, uiDepth, uiPartIdx );
    25102507}
    2511 #if H_3D_VSP
    25122508template<typename T>
    25132509Void TComDataCU::setSubPartT( T uiParameter, T* puhBaseLCU, UInt uiCUAddr, UInt uiCUDepth, UInt uiPUIdx )
    25142510{
    2515   UInt uiCurrPartNumQ = (m_pcPic->getNumPartInCU() >> (2 * uiCUDepth)) >> 2;
     2511  UInt uiCurrPartNumQ = (m_pcPic->getNumPartitionsInCtu() >> (2 * uiCUDepth)) >> 2;
    25162512  switch ( m_pePartSize[ uiCUAddr ] )
    25172513  {
     
    26452641}
    26462642#endif
    2647 #endif
    26482643
    26492644Void TComDataCU::setInterDirSubParts( UInt uiDir, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth )
     
    27312726
    27322727// This is for use by a leaf/sub CU object only, with no additional AbsPartIdx
    2733 #if H_3D_IC
     2728#if H_3D_IC | NH_3D_VSP
    27342729Void TComDataCU::getPartIndexAndSize( UInt uiPartIdx, UInt& ruiPartAddr, Int& riWidth, Int& riHeight, UInt uiAbsPartIdx, Bool bLCU)
    27352730{
     
    30653060}
    30663061
    3067 #if H_3D_VSP
    3068 
     3062#if NH_3D_VSP
    30693063/** Add a VSP merging candidate
    30703064 * \Inputs
     
    31283122
    31293123  dirVSP = (predFlag[0] | (predFlag[1] << 1));
    3130   m_mergCands[MRG_VSP].setCand( mvVSP, dirVSP, true, false);
     3124  m_mergCands[MRG_VSP].setCand( mvVSP, dirVSP, true
     3125#if H_3D_SPIVMP
     3126    , false
     3127#endif
     3128    );
    31313129  if ( mrgCandIdx == iCount )
    31323130  {
     
    31383136  return false;
    31393137}
    3140 
    31413138#endif
    31423139
     
    32023199 */
    32033200Void TComDataCU::buildMCL(TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours
    3204 #if H_3D_VSP
     3201#if NH_3D_VSP
    32053202  , Int* vspFlag
    32063203#endif
     
    32273224    extMergeCandList[ui<<1].setMvField(cZeroMv, NOT_VALID);
    32283225    extMergeCandList[(ui<<1)+1].setMvField(cZeroMv, NOT_VALID);
    3229 #if H_3D_VSP
     3226#if NH_3D_VSP
    32303227    vspFlag[ui] = 0;
    32313228#endif
     
    32383235    {
    32393236      m_mergCands[i].getCand(iCount, extMergeCandList, uhInterDirNeighboursExt
    3240 #if H_3D_VSP
     3237#if NH_3D_VSP
    32413238        , vspFlag
    32423239#endif
     
    33133310  DisInfo cDisInfo = getDvInfo(uiAbsPartIdx);
    33143311  m_cDefaultDisInfo = cDisInfo;
     3312#elif NH_3D_VSP
     3313  // for xAddVspCand()
     3314  DisInfo cDisInfo = getDvInfo(uiAbsPartIdx);
    33153315#endif
    33163316
     
    33713371  {
    33723372    m_mergCands[MRG_A1].setCand( &pcMFieldNeighbours[m_numSpatialCands<<1], puhInterDirNeighbours[m_numSpatialCands]
    3373 #if H_3D_VSP
     3373#if NH_3D_VSP
    33743374    , (pcCULeft->getVSPFlag(uiLeftPartIdx) != 0
    33753375#if H_3D_IC
     
    33953395  {
    33963396    m_mergCands[MRG_B1].setCand( &pcMFieldNeighbours[m_numSpatialCands<<1], puhInterDirNeighbours[m_numSpatialCands]
    3397 #if H_3D_VSP
     3397#if NH_3D_VSP
    33983398    , false
    33993399#endif
     
    34093409  {
    34103410    m_mergCands[MRG_B0].setCand( &pcMFieldNeighbours[m_numSpatialCands<<1], puhInterDirNeighbours[m_numSpatialCands]
    3411 #if H_3D_VSP
    3412     ,
    3413       false
     3411#if NH_3D_VSP
     3412    , false
    34143413#endif
    34153414#if H_3D_SPIVMP
     
    34243423  {
    34253424    m_mergCands[MRG_A0].setCand( &pcMFieldNeighbours[m_numSpatialCands<<1], puhInterDirNeighbours[m_numSpatialCands]
    3426 #if H_3D_VSP
     3425#if NH_3D_VSP
    34273426    , false
    34283427#endif
     
    34383437  {
    34393438    m_mergCands[MRG_B2].setCand( &pcMFieldNeighbours[m_numSpatialCands<<1], puhInterDirNeighbours[m_numSpatialCands]
    3440 #if H_3D_VSP
     3439#if NH_3D_VSP
    34413440    , false
    34423441#endif
     
    37183717  iCount += m_mergCands[MRG_A1].m_bAvailable + m_mergCands[MRG_B1].m_bAvailable;
    37193718
    3720 #if H_3D_VSP
     3719#if NH_3D_VSP
    37213720  /////////////////////////////////////////////////
    37223721  //////// VIEW SYNTHESIS PREDICTION (VSP) ////////
     
    37483747      return;
    37493748    }
    3750 #endif
    3751 #if H_3D_VSP
    37523749  }
    37533750#endif
     
    54675464Void TComDataCU::setDvInfoSubParts( DisInfo cDvInfo, UInt uiAbsPartIdx, UInt uiDepth )
    54685465{
     5466#if NH_3D_VSP // bug fix
     5467  UInt uiCurrPartNumb = m_pcPic->getNumPartitionsInCtu() >> (uiDepth << 1);
     5468#else
    54695469  UInt uiCurrPartNumb = m_pcPic->getNumPartInCtuWidth() >> (uiDepth << 1);
     5470#endif
    54705471  for (UInt ui = 0; ui < uiCurrPartNumb; ui++ )
    54715472  {
     
    54735474  }
    54745475}
    5475 #if H_3D_VSP
     5476#if NH_3D_VSP
    54765477Void TComDataCU::setDvInfoSubParts( DisInfo cDvInfo, UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth )
    54775478{
     
    60846085#endif
    60856086
    6086 #if H_3D_VSP
     6087#if NH_3D_VSP
    60876088Void TComDataCU::setMvFieldPUForVSP( TComDataCU* pcCU, UInt partAddr, Int width, Int height, RefPicList eRefPicList, Int iRefIdx, Int &vspSize )
    60886089{
     
    61406141  TComCUMvField *cuMvField = cu->getCUMvField( refPicList );
    61416142  Int partAddrRasterSubPULine  = g_auiZscanToRaster[ partAddr ];
    6142   Int numPartsLine    = cu->getPic()->getNumPartInWidth();
     6143  Int numPartsLine    = cu->getPic()->getNumPartInCtuWidth();
    61436144
    61446145  Int nTxtPerMvInfoX = 4; // cu->getPic()->getMinCUWidth();
    61456146  Int nTxtPerMvInfoY = 4; // cu->getPic()->getMinCUHeight();
    61466147
    6147   Int refDepStride = picRefDepth->getStride();
     6148  Int refDepStride = picRefDepth->getStride( COMPONENT_Y );
    61486149
    61496150  TComMv tmpMv(0, 0);
     
    61516152
    61526153  Int refDepOffset  = ( (dv->getHor()+2) >> 2 ) + ( (dv->getVer()+2) >> 2 ) * refDepStride;
    6153   Pel *refDepth     = picRefDepth->getLumaAddr( cu->getAddr(), cu->getZorderIdxInCU() + partAddr ) + refDepOffset;
     6154  Pel *refDepth     = picRefDepth->getAddr( COMPONENT_Y, cu->getCtuRsAddr(), cu->getZorderIdxInCtu() + partAddr ) + refDepOffset;
    61546155
    61556156  if ((height % 8))
  • branches/HTM-14.1-update-dev3-NTT/source/Lib/TLibCommon/TComDataCU.h

    r1233 r1255  
    170170  DisInfo*      m_pDvInfo;
    171171#endif
    172 #if H_3D_VSP
     172#if NH_3D_VSP
    173173  Char*         m_piVSPFlag;          ///< array of VSP flags to indicate whehter a block uses VSP or not  ///< 0: non-VSP; 1: VSP
    174174#endif
     
    233233  Bool          xAddMVPCand           ( AMVPInfo* pInfo, RefPicList eRefPicList, Int iRefIdx, UInt uiPartUnitIdx, MVP_DIR eDir );
    234234  Bool          xAddMVPCandOrder      ( AMVPInfo* pInfo, RefPicList eRefPicList, Int iRefIdx, UInt uiPartUnitIdx, MVP_DIR eDir );
    235 #if H_3D_VSP
     235#if NH_3D_VSP
    236236  Bool          xAddVspCand( Int mrgCandIdx, DisInfo* pDInfo, Int& iCount);
    237237#endif
     
    255255  Void xDeriveCenterIdx( UInt uiPartIdx, UInt& ruiPartIdxCenter );
    256256
    257 #if H_3D_VSP
     257#if NH_3D_VSP
    258258  Void xSetMvFieldForVSP  ( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *dv, UInt partAddr, Int width, Int height, Int *shiftLUT, RefPicList refPicList, Int refIdx, Bool isDepth, Int &vspSize );
    259259#endif
     
    452452  template <typename T>
    453453  Void          setSubPart            ( T bParameter, T* pbBaseCtu, UInt uiCUAddr, UInt uiCUDepth, UInt uiPUIdx );
    454 #if H_3D_VSP
     454#if NH_3D_VSP
    455455  template<typename T>
    456456  Void          setSubPartT           ( T uiParameter, T* puhBaseLCU, UInt uiCUAddr, UInt uiCUDepth, UInt uiPUIdx );
     
    541541  Bool          isICFlagRequired   ( UInt uiAbsPartIdx );
    542542  Void          getPartIndexAndSize( UInt uiPartIdx, UInt& ruiPartAddr, Int& riWidth, Int& riHeight, UInt uiAbsPartIdx = 0, Bool bLCU = false);
     543#elif NH_3D_VSP
     544  Void          getPartIndexAndSize( UInt uiPartIdx, UInt& ruiPartAddr, Int& riWidth, Int& riHeight, UInt uiAbsPartIdx = 0, Bool bLCU = false);
    543545#else
    544546  // -------------------------------------------------------------------------------------------------------------------
     
    660662  Void          initAvailableFlags() { m_bAvailableFlagA1 = m_bAvailableFlagB1 = m_bAvailableFlagB0 = m_bAvailableFlagA0 = m_bAvailableFlagB2 = 0;  }
    661663  Void          buildMCL(TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours
    662 #if H_3D_VSP
     664#if NH_3D_VSP
    663665    , Int* vspFlag
    664666#endif
     
    676678  Void          getInterMergeCandidates       ( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours, Int& numValidMergeCand, Int mrgCandIdx = -1 );
    677679
    678 #if H_3D_VSP
     680#if NH_3D_VSP
    679681#if H_3D_SPIVMP
    680682  Bool*         getSPIVMPFlag        ()                        { return m_pbSPIVMPFlag;          }
  • branches/HTM-14.1-update-dev3-NTT/source/Lib/TLibCommon/TComMotionInfo.h

    r1233 r1255  
    170170  Void    setMvFieldSP ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComMvField cMvField, Int iWidth, Int iHeight  );
    171171#endif
    172 #if H_3D_VSP
     172#if NH_3D_VSP
    173173  Void    setMv         ( Int iIdx, TComMv const & rcMv ) { m_pcMv[iIdx] = rcMv; }
    174174  Void    setRefIdx     ( Int iIdx, Int iRefIdx )         { m_piRefIdx[iIdx] = iRefIdx; }
     
    200200  TComMvField           m_cMvField[2];
    201201  UChar                 m_uDir;
    202 #if H_3D_VSP
     202#if NH_3D_VSP
    203203  Int                   m_iVspFlag;
    204 #endif 
     204#endif
    205205#if H_3D_SPIVMP
    206206  Bool                  m_bSPIVMPFlag;
     
    212212    m_bAvailable = false;
    213213    m_uDir = 0;
    214 #if H_3D_VSP
     214#if NH_3D_VSP
    215215    m_iVspFlag = 0;
    216216#endif
     
    231231    m_bAvailable = false;
    232232    m_uDir = 0;
    233 #if H_3D_VSP
     233#if NH_3D_VSP
    234234    m_iVspFlag = 0;
    235235#endif
     
    242242
    243243  Void setCand(TComMvField* pcMvFieldNeighbours, UChar uhInterDirNeighbours
    244 #if H_3D_VSP
     244#if NH_3D_VSP
    245245    , Int vspFlag
    246246#endif
     
    254254    m_cMvField[1] = pcMvFieldNeighbours[1];
    255255    m_uDir = uhInterDirNeighbours;
    256 #if H_3D_VSP
     256#if NH_3D_VSP
    257257    m_iVspFlag = vspFlag;
    258258#endif
     
    263263 
    264264  Void getCand(Int iCount, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours
    265 #if H_3D_VSP
     265#if NH_3D_VSP
    266266    , Int* vspFlag
    267267#endif
     
    274274    pcMvFieldNeighbours[(iCount<<1) + 1] = m_cMvField[1];
    275275    puhInterDirNeighbours[iCount] = m_uDir;
    276 #if H_3D_VSP
     276#if NH_3D_VSP
    277277    vspFlag[iCount] = m_iVspFlag;
    278278#endif
  • branches/HTM-14.1-update-dev3-NTT/source/Lib/TLibCommon/TComPrediction.cpp

    r1210 r1255  
    8282    }
    8383  }
    84 #if H_3D_VSP
    85   m_pDepthBlock = (Int*) malloc(MAX_NUM_SPU_W*MAX_NUM_SPU_W*sizeof(Int));
     84#if NH_3D_VSP
     85  m_pDepthBlock = (Int*) malloc(MAX_NUM_PART_IDXS_IN_CTU_WIDTH*MAX_NUM_PART_IDXS_IN_CTU_WIDTH*sizeof(Int));
    8686  if (m_pDepthBlock == NULL)
    8787  {
     
    9494TComPrediction::~TComPrediction()
    9595{
    96 #if H_3D_VSP
     96#if NH_3D_VSP
    9797  if (m_pDepthBlock != NULL)
    9898  {
     
    186186    m_acYuvPredBase[1] .create( g_uiMaxCUWidth, g_uiMaxCUHeight );
    187187#endif
    188 #if H_3D_VSP
    189     m_cYuvDepthOnVsp.create( g_uiMaxCUWidth, g_uiMaxCUHeight );
     188#if NH_3D_VSP
     189    m_cYuvDepthOnVsp.create( MAX_CU_SIZE, MAX_CU_SIZE, chromaFormatIDC );
    190190#endif
    191191
     
    12051205  {
    12061206    pcCU->getPartIndexAndSize( iPartIdx, uiPartAddr, iWidth, iHeight );
    1207 #if H_3D_VSP
     1207#if NH_3D_VSP
    12081208    if ( pcCU->getVSPFlag(uiPartAddr) == 0)
    12091209    {
     
    12701270#endif
    12711271    }
    1272 #if H_3D_VSP
     1272#if NH_3D_VSP
    12731273    }
    12741274    else
     
    12911291    pcCU->getPartIndexAndSize( iPartIdx, uiPartAddr, iWidth, iHeight );
    12921292
    1293 #if H_3D_VSP
     1293#if NH_3D_VSP
    12941294    if ( pcCU->getVSPFlag(uiPartAddr) == 0 )
    12951295    {
     
    13551355#endif
    13561356    }
    1357 #if H_3D_VSP
     1357#if NH_3D_VSP
    13581358    }
    13591359    else
     
    14251425}
    14261426
    1427 #if H_3D_VSP
     1427#if NH_3D_VSP
    14281428Void TComPrediction::xPredInterUniVSP( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi )
    14291429{
     
    14461446Void TComPrediction::xPredInterUniSubPU( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, Int widthSubPU, Int heightSubPU )
    14471447{
    1448   UInt numPartsInLine       = pcCU->getPic()->getNumPartInWidth();
     1448  UInt numPartsInLine       = pcCU->getPic()->getNumPartInCtuWidth();
    14491449  UInt horiNumPartsInSubPU  = widthSubPU >> 2;
    14501450  UInt vertNumPartsInSubPU  = (heightSubPU >> 2) * numPartsInLine;
     
    14621462      pcCU->clipMv(cMv);
    14631463
    1464       xPredInterLumaBlk  ( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, refIdx )->getPicYuvRec(), partAddrSubPU, &cMv, widthSubPU, heightSubPU, rpcYuvPred, bi );
    1465       xPredInterChromaBlk( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, refIdx )->getPicYuvRec(), partAddrSubPU, &cMv, widthSubPU, heightSubPU, rpcYuvPred, bi );
    1466 
    1467     }
    1468   }
    1469 }
    1470 
     1464      xPredInterBlk( COMPONENT_Y,  pcCU, pcCU->getSlice()->getRefPic( eRefPicList, refIdx )->getPicYuvRec(), partAddrSubPU, &cMv, widthSubPU, heightSubPU, rpcYuvPred, bi, pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) );
     1465      xPredInterBlk( COMPONENT_Cb, pcCU, pcCU->getSlice()->getRefPic( eRefPicList, refIdx )->getPicYuvRec(), partAddrSubPU, &cMv, widthSubPU, heightSubPU, rpcYuvPred, bi, pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA) );
     1466      xPredInterBlk( COMPONENT_Cr, pcCU, pcCU->getSlice()->getRefPic( eRefPicList, refIdx )->getPicYuvRec(), partAddrSubPU, &cMv, widthSubPU, heightSubPU, rpcYuvPred, bi, pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA) );
     1467    }
     1468  }
     1469}
    14711470#endif
    14721471
     
    18541853}
    18551854
    1856 #if H_3D_VSP
    1857 
     1855#if NH_3D_VSP
    18581856Void TComPrediction::xPredInterBiVSP( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, TComYuv*& rpcYuvPred )
    18591857{
     
    18771875  }
    18781876
    1879   xWeightedAverage( &m_acYuvPred[0], &m_acYuvPred[1], iRefIdx[0], iRefIdx[1], uiPartAddr, iWidth, iHeight, rpcYuvPred );
    1880 }
    1881 
     1877  xWeightedAverage( &m_acYuvPred[0], &m_acYuvPred[1], iRefIdx[0], iRefIdx[1], uiPartAddr, iWidth, iHeight, rpcYuvPred, pcCU->getSlice()->getSPS()->getBitDepths() );
     1878}
    18821879#endif
    18831880
  • branches/HTM-14.1-update-dev3-NTT/source/Lib/TLibCommon/TComPrediction.h

    r1200 r1255  
    9191#endif
    9292
    93 #if H_3D_VSP
     93#if NH_3D_VSP
    9494  Int*    m_pDepthBlock;         ///< Store a depth block, local variable, to prevent memory allocation every time
    9595  TComYuv m_cYuvDepthOnVsp;
     
    108108  Void xPredInterUni            ( TComDataCU* pcCU,                          UInt uiPartAddr,               Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv* pcYuvPred, Bool bi=false          );
    109109  Void xPredInterBi             ( TComDataCU* pcCU,                          UInt uiPartAddr,               Int iWidth, Int iHeight,                         TComYuv* pcYuvPred          );
    110 #if H_3D_VSP
     110#if NH_3D_VSP
    111111  Void xPredInterUniVSP         ( TComDataCU* pcCU,                          UInt uiPartAddr,               Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi=false          );
    112112  Void xPredInterBiVSP          ( TComDataCU* pcCU,                          UInt uiPartAddr,               Int iWidth, Int iHeight,                         TComYuv*& rpcYuvPred );
     
    128128    , Bool bICFlag    = false
    129129#endif
    130 #if H_3D_VSP
     130#if NH_3D_VSP
    131131  Void xPredInterUniSubPU        ( TComDataCU *cu, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, Int widthSubPU=4, Int heightSubPU=4 );
    132132#endif
  • branches/HTM-14.1-update-dev3-NTT/source/Lib/TLibCommon/TypeDef.h

    r1233 r1255  
    7272#define NH_3D_NBDV_REF                    1
    7373#define NH_3D_MLC                         1
     74#define NH_3D_VSP                         1
    7475#endif
    7576
     
    312313/// GT: Move values which are not flags to CommonDef.h and convert to static int !!
    313314///////////////////////////////////////////////////////////////////////////////////
    314 ///// ***** VIEW SYNTHESIS PREDICTION *********
    315 #if H_3D_VSP
    316 #define H_3D_VSP_BLOCKSIZE                4   // Supported values: 1, 2, and 4
    317 #if H_3D_VSP_BLOCKSIZE == 1
    318 #define H_3D_VSP_CONSTRAINED              1   // Constrained VSP @ 1x1
    319 #else
    320 #define H_3D_VSP_CONSTRAINED              0
    321 #endif
    322 #endif
    323315///// ***** ILLUMATION COMPENSATION *********
    324316#if H_3D_IC
  • branches/HTM-14.1-update-dev3-NTT/source/Lib/TLibDecoder/TDecCu.cpp

    r1233 r1255  
    152152    setIsChromaQpAdjCoded(true);
    153153  }
    154 
     154 
    155155  // start from the top level CU
    156156  xDecodeCU( pCtu, 0, 0, isLastCtuOfSliceSegment);
     
    293293if(!pcCU->getSlice()->isIntra())
    294294  {
    295 #if H_3D_ARP && H_3D_IV_MERGE
    296     if( pcCU->getSlice()->getIvResPredFlag() || pcCU->getSlice()->getIvMvPredFlag() )
     295#if NH_3D_ARP && NH_3D_IV_MERGE && NH_3D_VSP
     296    if( pcCU->getSlice()->getIvResPredFlag() || pcCU->getSlice()->getIvMvPredFlag() || pcCU->getSlice()->getViewSynthesisPredFlag() )
    297297#else
     298#if NH_3D_IV_MERGE && NH_3D_VSP
     299    if( pcCU->getSlice()->getIvMvPredFlag() || pcCU->getSlice()->getViewSynthesisPredFlag() )
     300#else
     301#if NH_3D_ARP && NH_3D_VSP
     302    if( pcCU->getSlice()->getIvResPredFlag() || pcCU->getSlice()->getViewSynthesisPredFlag() )
     303#else
     304#if NH_3D_VSP
     305    if( pcCU->getSlice()->getViewSynthesisPredFlag() )
     306#else
    298307#if H_3D_ARP
    299308    if( pcCU->getSlice()->getVPS()->getUseAdvRP(pcCU->getSlice()->getLayerId()) )
     
    303312#else
    304313    if (0)
     314#endif
     315#endif
     316#endif
    305317#endif
    306318#endif
     
    408420
    409421
    410 #if H_3D_VSP
     422#if NH_3D_VSP
    411423    Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
    412424    memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
     
    433445
    434446    m_ppcCU[uiDepth]->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours
    435 #if H_3D_VSP
     447#if NH_3D_VSP
    436448      , vspFlag
    437449#endif
     
    441453      , numValidMergeCand );
    442454#endif
    443 #if H_3D_VSP
     455#if NH_3D_VSP
    444456    pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiAbsPartIdx, 0, uiDepth );
    445457#endif
     
    456468        pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvd( cTmpMv, SIZE_2Nx2N, uiAbsPartIdx, uiDepth );
    457469        pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvField( cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ], SIZE_2Nx2N, uiAbsPartIdx, uiDepth );
    458 #if H_3D_VSP
     470#if NH_3D_VSP
    459471        if( pcCU->getVSPFlag( uiAbsPartIdx ) != 0 )
    460472        {
  • branches/HTM-14.1-update-dev3-NTT/source/Lib/TLibDecoder/TDecEntropy.cpp

    r1233 r1255  
    318318        if ( !isMerged )
    319319        {
    320 #if H_3D_VSP
     320#if NH_3D_VSP
    321321          Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
    322322          memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
     
    337337            , numValidMergeCand );
    338338          pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
    339 
    340339#else
    341340#if H_3D
     
    355354      {
    356355        uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx);
    357 #if H_3D_VSP
     356#if NH_3D_VSP
    358357        Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
    359358        memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
     
    395394          pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvd( cTmpMv, ePartSize, uiSubPartIdx, uiDepth, uiPartIdx );
    396395          pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvField( cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ], ePartSize, uiSubPartIdx, uiDepth, uiPartIdx );
    397 #if H_3D_VSP
     396#if NH_3D_VSP
    398397#if H_3D_DBBP
    399398          if( pcCU->getVSPFlag( uiSubPartIdx ) != 0 && !pcCU->getDBBPFlag( uiAbsPartIdx ) )
     
    486485
    487486#if NH_3D_MLC
    488 #if H_3D_VSP
     487#if NH_3D_VSP
    489488          Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
    490489          memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
     
    503502            , numValidMergeCand );
    504503          pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours
    505 #if H_3D_VSP
     504#if NH_3D_VSP
    506505            , vspFlag
    507506#endif
     
    510509#endif
    511510            , numValidMergeCand );
    512 #if H_3D_VSP
     511#if NH_3D_VSP
    513512          pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
    514513#endif
     
    523522
    524523#if NH_3D_MLC
    525 #if H_3D_VSP
     524#if NH_3D_VSP
    526525        Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
    527526        memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
     
    540539          ,numValidMergeCand, uiMergeIndex );
    541540        pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours
    542 #if H_3D_VSP
     541#if NH_3D_VSP
    543542          , vspFlag
    544543#endif
     
    547546#endif
    548547          ,numValidMergeCand );
    549 #if H_3D_VSP
     548#if NH_3D_VSP
    550549        pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
    551550#endif
     
    564563          pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvd( cTmpMv, ePartSize, uiSubPartIdx, uiDepth, uiPartIdx );
    565564          pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvField( cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ], ePartSize, uiSubPartIdx, uiDepth, uiPartIdx );
    566 
     565#if NH_3D_VSP
     566          if( pcCU->getVSPFlag( uiSubPartIdx ) != 0 )
     567          {
     568            if ( uhInterDirNeighbours[ uiMergeIndex ] & (1<<uiRefListIdx) )
     569            {
     570              UInt dummy;
     571              Int vspSize;
     572              Int width, height;
     573              pcCU->getPartIndexAndSize( uiPartIdx, dummy, width, height, uiSubPartIdx, pcCU->getTotalNumPart()==256 );
     574              pcCU->setMvFieldPUForVSP( pcCU, uiSubPartIdx, width, height, RefPicList( uiRefListIdx ), cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ].getRefIdx(), vspSize );
     575              pcCU->setVSPFlag( uiSubPartIdx, vspSize );
     576            }
     577          }
     578#endif
    567579        }
    568580      }
  • branches/HTM-14.1-update-dev3-NTT/source/Lib/TLibEncoder/TEncCu.cpp

    r1233 r1255  
    587587      if( rpcTempCU->getSlice()->getSliceType() != I_SLICE )
    588588      {
    589 #if H_3D_ARP && H_3D_IV_MERGE
    590         if( rpcTempCU->getSlice()->getIvResPredFlag() || rpcTempCU->getSlice()->getIvMvPredFlag() )
     589#if NH_3D_ARP && NH_3D_IV_MERGE && NH_3D_VSP
     590        if( rpcTempCU->getSlice()->getIvResPredFlag() || rpcTempCU->getSlice()->getIvMvPredFlag() || rpcTempCU->getSlice()->getViewSynthesisPredFlag() )
    591591#else
     592#if NH_3D_IV_MERGE && NH_3D_VSP
     593        if( rpcTempCU->getSlice()->getIvMvPredFlag() || rpcTempCU->getSlice()->getViewSynthesisPredFlag() )
     594#else
     595#if NH_3D_ARP && NH_3D_VSP
     596        if( rpcTempCU->getSlice()->getIvResPredFlag() || rpcTempCU->getSlice()->getViewSynthesisPredFlag() )
     597#else
     598#if NH_3D_VSP
     599        if( rpcTempCU->getSlice()->getViewSynthesisPredFlag() )
     600#else
    592601#if H_3D_ARP
    593602        if( rpcTempCU->getSlice()->getVPS()->getUseAdvRP(rpcTempCU->getSlice()->getLayerId()) )
     
    597606#else
    598607        if (0)
     608#endif
     609#endif
     610#endif
    599611#endif
    600612#endif
     
    659671          rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );//by Competition for inter_2Nx2N
    660672#endif
    661 #if H_3D_VSP
    662             rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
     673#if NH_3D_VSP
     674          rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
    663675#endif
    664676        }
     
    673685
    674686        rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );
    675 #if H_3D_VSP
    676           rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
     687#if NH_3D_VSP
     688        rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
    677689#endif
    678690
     
    690702          rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );
    691703#endif
    692 #if H_3D_VSP
    693             rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
     704#if NH_3D_VSP
     705          rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
    694706#endif
    695707#if H_3D_DBBP
     
    698710              xCheckRDCostInterDBBP( rpcBestCU, rpcTempCU, false );
    699711              rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode  );
    700 #if H_3D_VSP
     712#if NH_3D_VSP
    701713              rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
    702714#endif
     
    780792#endif
    781793              rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );
    782 #if H_3D_VSP
    783                 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
     794#if NH_3D_VSP
     795              rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
    784796#endif
    785797
     
    799811#endif
    800812            rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );
    801 #if H_3D_VSP
     813#if NH_3D_VSP
    802814            rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
    803815#endif
     
    822834
    823835            rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );
    824 #if H_3D_VSP
     836#if NH_3D_VSP
    825837            rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
    826838#endif
     
    861873#endif
    862874                rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );
    863 #if H_3D_VSP
     875#if NH_3D_VSP
    864876                rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
    865877#endif
     
    882894
    883895                rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );
    884 #if H_3D_VSP
     896#if NH_3D_VSP
    885897                rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
    886898#endif
     
    909921
    910922                rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );
    911 #if H_3D_VSP
     923#if NH_3D_VSP
    912924                rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
    913925#endif
     
    929941#endif
    930942                rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );
    931 #if H_3D_VSP
     943#if NH_3D_VSP
    932944                rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
    933945#endif
     
    957969
    958970                rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );
    959 #if H_3D_VSP
     971#if NH_3D_VSP
    960972                rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
    961973#endif
     
    977989#endif
    978990                rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );
    979 #if H_3D_VSP
     991#if NH_3D_VSP
    980992                rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
    981993#endif
     
    9971009#endif
    9981010                rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );
    999 #if H_3D_VSP
     1011#if NH_3D_VSP
    10001012                rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
    10011013#endif
     
    10181030#endif
    10191031                rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );
    1020 #if H_3D_VSP
     1032#if NH_3D_VSP
    10211033                rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
    10221034#endif
     
    10341046            xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU );
    10351047            rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );
    1036 #if H_3D_VSP
    1037               rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
     1048#if NH_3D_VSP
     1049            rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
    10381050#endif
    10391051            xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD );
    10401052            rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );
    1041 #if H_3D_VSP
    1042               rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
     1053#if NH_3D_VSP
     1054            rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
    10431055#endif
    10441056#if H_3D_QTLPC
     
    10491061            xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N );
    10501062            rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );
    1051 #if H_3D_VSP
    1052               rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
     1063#if NH_3D_VSP
     1064            rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
    10531065#endif
    10541066            xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N );
    10551067            rpcTempCU->initEstData( uiDepth, iQP, bIsLosslessMode );
    1056 #if H_3D_VSP
    1057               rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
     1068#if NH_3D_VSP
     1069            rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
    10581070#endif
    10591071#if H_3D_QTLPC
     
    17981810  rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uhDepth ); // interprets depth relative to CTU level
    17991811
    1800 #if H_3D_VSP
     1812#if NH_3D_VSP
    18011813#if !H_3D_ARP
    18021814  Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
    18031815  memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
    1804   InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM];
    18051816#if NH_3D_MLC
    18061817  rpcTempCU->initAvailableFlags();
     
    19211932
    19221933    rpcTempCU->buildMCL( cMvFieldNeighbours,uhInterDirNeighbours
    1923 #if H_3D_VSP
     1934#if NH_3D_VSP
    19241935      , vspFlag
    19251936#endif
     
    19691980          rpcTempCU->setMergeFlagSubParts( true, 0, 0, uhDepth ); // interprets depth relative to CTU level
    19701981          rpcTempCU->setMergeIndexSubParts( uiMergeCand, 0, 0, uhDepth ); // interprets depth relative to CTU level
    1971 #if H_3D_VSP
     1982#if NH_3D_VSP
    19721983          rpcTempCU->setVSPFlagSubParts( vspFlag[uiMergeCand], 0, 0, uhDepth );
    19731984#endif
     
    19912002          else
    19922003#endif
    1993 #if H_3D_VSP
    19942004          {
     2005#if NH_3D_VSP
    19952006            if ( vspFlag[uiMergeCand] )
    19962007            {
     
    20222033            {
    20232034#endif
    2024           rpcTempCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeCand], 0, 0, uhDepth ); // interprets depth relative to CTU level
    2025           rpcTempCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( cMvFieldNeighbours[0 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level
    2026           rpcTempCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level
    2027 #if H_3D_VSP
     2035            rpcTempCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeCand], 0, 0, uhDepth ); // interprets depth relative to CTU level
     2036            rpcTempCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( cMvFieldNeighbours[0 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level
     2037            rpcTempCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level
     2038#if NH_3D_VSP
    20282039            }
    2029           }
    2030 #endif
     2040#endif
     2041          }
    20312042          // do MC
    20322043          m_pcPredSearch->motionCompensation ( rpcTempCU, m_ppcPredYuvTemp[uhDepth] );
     
    20622073          rpcTempCU->setDISFlagSubParts( false, 0, uhDepth );
    20632074#endif
    2064 #if H_3D_VSP // possible bug fix
     2075#if NH_3D_VSP
    20652076          if( rpcTempCU->getSkipFlag(0) )
    20662077          {
     
    23162327
    23172328  m_pcPredSearch->encodeResAndCalcRdInterCU( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcResiYuvBest[uhDepth], m_ppcRecoYuvTemp[uhDepth], false DEBUG_STRING_PASS_INTO(sTest) );
    2318 #if H_3D_VSP // possible bug fix
    2319       if( rpcTempCU->getQtRootCbf(0)==0 )
    2320       {
    2321         rpcTempCU->setTrIdxSubParts(0, 0, uhDepth);
    2322       }
     2329#if NH_3D_VSP
     2330  if( rpcTempCU->getQtRootCbf(0)==0 )
     2331  {
     2332    rpcTempCU->setTrIdxSubParts(0, 0, uhDepth);
     2333  }
    23232334#endif
    23242335#if NH_3D_VSO // M4
  • branches/HTM-14.1-update-dev3-NTT/source/Lib/TLibEncoder/TEncSearch.cpp

    r1233 r1255  
    38693869//! estimation of best merge coding
    38703870Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, Distortion& ruiCost, TComMvField* cMvFieldNeighbours, UChar* uhInterDirNeighbours, Int& numValidMergeCand
    3871 #if H_3D_VSP
     3871#if NH_3D_VSP
    38723872                                 , Int* vspFlag
    38733873#endif
     
    39363936
    39373937      pcCU->buildMCL( cMvFieldNeighbours,uhInterDirNeighbours
    3938 #if H_3D_VSP
     3938#if NH_3D_VSP
    39393939        , vspFlag
    39403940#endif
     
    39633963
    39643964    pcCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours
    3965 #if H_3D_VSP
     3965#if NH_3D_VSP
    39663966      , vspFlag
    39673967#endif
     
    40014001
    40024002    PartSize ePartSize = pcCU->getPartitionSize( 0 );
    4003 #if H_3D_VSP
     4003#if NH_3D_VSP
    40044004    pcCU->setVSPFlagSubParts( vspFlag[uiMergeCand], uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) );
    40054005#endif
     
    40244024    else
    40254025#endif
    4026 #if H_3D_VSP
     4026#if NH_3D_VSP
    40274027#if H_3D_DBBP
    40284028      if ( vspFlag[uiMergeCand] && !pcCU->getDBBPFlag(0) )
     
    40614061    pcCU->getCUMvField(REF_PIC_LIST_0)->setAllMvField( cMvFieldNeighbours[0 + 2*uiMergeCand], ePartSize, uiAbsPartIdx, 0, iPUIdx );
    40624062    pcCU->getCUMvField(REF_PIC_LIST_1)->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand], ePartSize, uiAbsPartIdx, 0, iPUIdx );
    4063 #if H_3D_VSP
     4063#if NH_3D_VSP
    40644064      }
    40654065#endif
     
    42074207
    42084208    pcCU->getPartIndexAndSize( iPartIdx, uiPartAddr, iRoiWidth, iRoiHeight );
    4209 #if H_3D_VSP
     4209#if NH_3D_VSP
    42104210    pcCU->setVSPFlagSubParts( 0, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr) );
    42114211#endif
     
    45904590      Distortion uiMRGCost = std::numeric_limits<Distortion>::max();
    45914591
    4592 #if H_3D_VSP
     4592#if NH_3D_VSP
    45934593      Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
    45944594      memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
     
    46074607      puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartition()];
    46084608#endif
    4609       xMergeEstimation( pcCU, pcOrgYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost, cMvFieldNeighbours, uhInterDirNeighbours
    4610 
    4611 #if H_3D_VSP
     4609      xMergeEstimation( pcCU, pcOrgYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand
     4610#if NH_3D_VSP
    46124611                      , vspFlag
    46134612#endif
     
    46154614                      , bSPIVMPFlag, pcMvFieldSP, puhInterDirSP
    46164615#endif
    4617 , numValidMergeCand);
     4616                      );
    46184617
    46194618      if ( uiMRGCost < uiMECost )
     
    46224621        pcCU->setMergeFlagSubParts ( true,          uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
    46234622        pcCU->setMergeIndexSubParts( uiMRGIndex,    uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
    4624 #if H_3D_VSP
     4623#if NH_3D_VSP
    46254624        pcCU->setVSPFlagSubParts( vspFlag[uiMRGIndex], uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
    46264625#endif
     
    46484647        else
    46494648#endif
    4650 #if H_3D_VSP
     4649#if NH_3D_VSP
    46514650#if H_3D_DBBP
    46524651        if ( vspFlag[uiMRGIndex] && !pcCU->getDBBPFlag(uiPartAddr) )
     
    46854684        pcCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( cMRGMvField[0], ePartSize, uiPartAddr, 0, iPartIdx );
    46864685        pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMRGMvField[1], ePartSize, uiPartAddr, 0, iPartIdx );
     4686#if NH_3D_VSP
     4687          }
     4688#endif
    46874689#if H_3D
    46884690          }
     
    47044706        pcCU->setMergeFlagSubParts( false,        uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
    47054707        pcCU->setInterDirSubParts ( uiMEInterDir, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
    4706 #if H_3D_VSP
     4708#if NH_3D_VSP
    47074709        pcCU->setVSPFlagSubParts ( 0,             uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
    47084710        pcCU->setDvInfoSubParts(OriginalDvInfo, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
  • branches/HTM-14.1-update-dev3-NTT/source/Lib/TLibEncoder/TEncSearch.h

    r1200 r1255  
    409409                                    TComMvField* cMvFieldNeighbours,
    410410                                    UChar*       uhInterDirNeighbours,
    411 #if H_3D_VSP
     411                                    Int&         numValidMergeCand
     412#if NH_3D_VSP
    412413                                  , Int* vspFlag
    413414#endif
     
    415416                                  , Bool* pbSPIVMPFlag, TComMvField* pcMvFieldSP, UChar* puhInterDirSP
    416417#endif
    417                                     Int&         numValidMergeCand
    418418                                   );
    419419
Note: See TracChangeset for help on using the changeset viewer.