Ignore:
Timestamp:
12 Apr 2018, 11:12:21 (7 years ago)
Author:
tech
Message:
  • Update HM-16.18
  • Cleanups
  • Encoder Extension

-- Representation formats
-- Parameter set sharing
-- GOP configuration

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-16.2-dev/source/Lib/TLibCommon/TComDataCU.cpp

    r1405 r1412  
    44 * granted under this license.
    55 *
    6  * Copyright (c) 2010-2016, ITU/ISO/IEC
     6 * Copyright (c) 2010-2017, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    5555
    5656  m_skipFlag           = NULL;
    57 #if NH_3D_DIS
     57#if NH_3D
    5858  m_bDISFlag           = NULL;
    5959  m_ucDISType          = NULL;
     
    9999  for(UInt i=0; i<NUM_REF_PIC_LIST_01; i++)
    100100  {
    101     m_apcCUColocated[i]  = NULL;
    102101    m_apiMVPIdx[i]       = NULL;
    103102    m_apiMVPNum[i]       = NULL;
    104103  }
    105104
    106 #if NH_3D_DMM
     105#if NH_3D
    107106  for( Int i = 0; i < NUM_DMM; i++ )
    108107  {
     
    111110  }
    112111  m_dmm1WedgeTabIdx = NULL;
    113 #endif
    114 #if NH_3D_SDC_INTRA
     112
    115113  m_pbSDCFlag             = NULL;
    116114  m_apSegmentDCOffset[0]  = NULL;
     
    120118  m_bDecSubCu          = false;
    121119
    122 #if NH_3D_NBDV
     120#if NH_3D
    123121  m_pDvInfo              = NULL;
    124 #endif
    125 #if NH_3D_VSP
    126122  m_piVSPFlag            = NULL;
    127 #endif
    128 #if NH_3D_SPIVMP
    129123  m_pbSPIVMPFlag         = NULL;
    130 #endif
    131 #if NH_3D_ARP
    132124  m_puhARPW              = NULL;
    133 #endif
    134 #if NH_3D_IC
    135125  m_pbICFlag             = NULL;
    136 #endif
    137 #if NH_3D_DBBP
    138126  m_pbDBBPFlag         = NULL;
    139127#endif
     
    167155    m_ChromaQpAdj        = new UChar[ uiNumPartition ];
    168156    m_skipFlag           = new Bool[ uiNumPartition ];
    169 #if NH_3D_DIS
     157#if NH_3D
    170158    m_bDISFlag           = new Bool[ uiNumPartition ];
    171159    m_ucDISType          = (UChar*)xMalloc(UChar, uiNumPartition);
     
    178166    m_pbMergeFlag        = (Bool*  )xMalloc(Bool,   uiNumPartition);
    179167    m_puhMergeIndex      = (UChar* )xMalloc(UChar,  uiNumPartition);
    180 #if NH_3D_VSP
     168#if NH_3D
    181169    m_piVSPFlag          = (SChar* )xMalloc(SChar, uiNumPartition);
    182 #endif
    183 #if NH_3D_SPIVMP
    184170    m_pbSPIVMPFlag       = (Bool*  )xMalloc(Bool,   uiNumPartition);
    185171#endif
     
    201187    }
    202188
    203 #if NH_3D_NBDV
     189#if NH_3D
    204190    m_pDvInfo            = (DisInfo* )xMalloc(DisInfo,  uiNumPartition);
    205191#endif
     
    242228    }
    243229
    244 #if NH_3D_ARP
     230#if NH_3D
    245231    m_puhARPW            = (UChar*  )xMalloc(UChar,   uiNumPartition);
    246 #endif
    247 #if NH_3D_IC
    248232    m_pbICFlag           = (Bool* )xMalloc(Bool,   uiNumPartition);
    249 #endif
    250 #if NH_3D_DMM
    251233    for( Int i = 0; i < NUM_DMM; i++ )
    252234    {
     
    255237    }
    256238    m_dmm1WedgeTabIdx    = (UInt*)xMalloc(UInt, uiNumPartition);
    257 #endif
    258 #if NH_3D_SDC_INTRA
    259239    m_pbSDCFlag             = (Bool*)xMalloc(Bool, uiNumPartition);
    260240    m_apSegmentDCOffset[0]  = (Pel*)xMalloc(Pel, uiNumPartition);
    261241    m_apSegmentDCOffset[1]  = (Pel*)xMalloc(Pel, uiNumPartition);
    262 #endif
    263 #if NH_3D_DBBP
    264242    m_pbDBBPFlag         = (Bool*  )xMalloc(Bool,   uiNumPartition);
    265243#endif
     
    280258  m_pCtuAbove          = NULL;
    281259  m_pCtuLeft           = NULL;
    282 
    283   for(UInt i=0; i<NUM_REF_PIC_LIST_01; i++)
    284   {
    285     m_apcCUColocated[i]  = NULL;
    286   }
    287260}
    288261
     
    319292    }
    320293
    321 #if NH_3D_DIS
     294#if NH_3D
    322295    if ( m_bDISFlag           ) { delete[] m_bDISFlag;   m_bDISFlag     = NULL; }
    323296    if ( m_ucDISType         ) { xFree(m_ucDISType);  m_ucDISType    = NULL; }
     
    360333    }
    361334
    362 #if NH_3D_VSP
     335#if NH_3D
    363336    if ( m_piVSPFlag )
    364337    {
     
    366339      m_piVSPFlag = NULL;
    367340    }
    368 #endif
    369 #if NH_3D_SPIVMP
    370341    if ( m_pbSPIVMPFlag       ) { xFree(m_pbSPIVMPFlag);           m_pbSPIVMPFlag         = NULL; }
    371342#endif
     
    455426      m_acCUMvField[rpl].destroy();
    456427    }
    457 #if NH_3D_NBDV
     428#if NH_3D
    458429    if ( m_pDvInfo            ) { xFree(m_pDvInfo);             m_pDvInfo           = NULL; }
    459 #endif
    460 
    461 
    462 #if NH_3D_ARP
    463430    if ( m_puhARPW            ) { xFree(m_puhARPW);             m_puhARPW           = NULL; }
    464 #endif
    465 #if NH_3D_IC
    466431    if ( m_pbICFlag           ) { xFree(m_pbICFlag);            m_pbICFlag          = NULL; }
    467 #endif
    468 
    469 #if NH_3D_DMM
    470432    for( Int i = 0; i < NUM_DMM; i++ )
    471433    {
     
    474436    }
    475437    if ( m_dmm1WedgeTabIdx    ) { xFree( m_dmm1WedgeTabIdx );  m_dmm1WedgeTabIdx = NULL;  }
    476 #endif
    477 #if NH_3D_SDC_INTRA
    478438    if ( m_pbSDCFlag            ) { xFree(m_pbSDCFlag);             m_pbSDCFlag             = NULL; }
    479439    if ( m_apSegmentDCOffset[0] ) { xFree(m_apSegmentDCOffset[0]);  m_apSegmentDCOffset[0]  = NULL; }
    480440    if ( m_apSegmentDCOffset[1] ) { xFree(m_apSegmentDCOffset[1]);  m_apSegmentDCOffset[1]  = NULL; }
    481 #endif   
    482 #if NH_3D_DBBP
    483     if ( m_pbDBBPFlag         ) { xFree(m_pbDBBPFlag);          m_pbDBBPFlag        = NULL; }
     441    if ( m_pbDBBPFlag           ) { xFree(m_pbDBBPFlag);          m_pbDBBPFlag        = NULL; }
    484442#endif
    485443
     
    493451  m_pCtuAbove          = NULL;
    494452  m_pCtuLeft           = NULL;
    495 
    496 
    497   for(UInt i=0; i<NUM_REF_PIC_LIST_01; i++)
    498   {
    499     m_apcCUColocated[i]  = NULL;
    500   }
    501453
    502454}
     
    572524  memset( m_skipFlag          , false,                      m_uiNumPartition * sizeof( *m_skipFlag ) );
    573525
    574 #if NH_3D_DIS
     526#if NH_3D
    575527    memset( m_bDISFlag        , false,                      m_uiNumPartition * sizeof( *m_bDISFlag ) );
    576528    memset( m_ucDISType       , false,                      m_uiNumPartition * sizeof( *m_ucDISType ) );
     
    585537  memset( m_puhHeight         , maxCUHeight,                m_uiNumPartition * sizeof( *m_puhHeight ) );
    586538
    587 #if NH_3D_IC
     539#if NH_3D
    588540  memset( m_pbICFlag          , false,                      m_uiNumPartition * sizeof( *m_pbICFlag ) );
    589541#endif
     
    606558  memset( m_puhMergeIndex     , 0,                        m_uiNumPartition * sizeof( *m_puhMergeIndex ) );
    607559
    608 #if NH_3D_VSP
     560#if NH_3D
    609561  memset( m_piVSPFlag         , 0,                        m_uiNumPartition * sizeof( *m_piVSPFlag ) );
    610 #endif
    611 #if NH_3D_SPIVMP
    612562  memset( m_pbSPIVMPFlag      , 0,                     m_uiNumPartition * sizeof( *m_pbSPIVMPFlag ) );   
    613 #endif
    614 #if NH_3D_SDC_INTRA
    615563  memset( m_pbSDCFlag, false, m_uiNumPartition * sizeof( *m_pbSDCFlag ) );
    616 #endif
    617 #if NH_3D_DBBP
    618564  memset( m_pbDBBPFlag , false, m_uiNumPartition * sizeof( *m_pbDBBPFlag ));
    619565#endif
     
    624570  }
    625571
    626 #if NH_3D_ARP
     572#if NH_3D
    627573  memset( m_puhARPW      ,      0,        m_uiNumPartition * sizeof( *m_puhARPW )         );
    628 #endif
    629 
    630 
    631 #if NH_3D_DMM
    632574  for( Int i = 0; i < NUM_DMM; i++ )
    633575  {
     
    635577    memset( m_dmmDeltaDC[i][1], 0,                        m_uiNumPartition * sizeof( *m_dmmDeltaDC[i][1] ) );
    636578  }
    637   memset( m_dmm1WedgeTabIdx,    0,                        m_uiNumPartition * sizeof( *m_dmm1WedgeTabIdx   ) );
    638 #endif
    639 #if NH_3D_SDC_INTRA
    640     memset( m_pbSDCFlag,     false,                m_uiNumPartition * sizeof( *m_pbSDCFlag ) );
     579    memset( m_dmm1WedgeTabIdx,    0,                        m_uiNumPartition * sizeof( *m_dmm1WedgeTabIdx   ) );
     580    memset( m_pbSDCFlag      ,     false,                m_uiNumPartition * sizeof( *m_pbSDCFlag ) );
    641581    memset( m_apSegmentDCOffset[0],     0,                m_uiNumPartition * sizeof( *m_apSegmentDCOffset[0] ) );
    642582    memset( m_apSegmentDCOffset[1],     0,                m_uiNumPartition * sizeof( *m_apSegmentDCOffset[1] ) );
     
    667607  m_pCtuAboveRight  = NULL;
    668608
    669 
    670   for(UInt i=0; i<NUM_REF_PIC_LIST_01; i++)
    671   {
    672     m_apcCUColocated[i]  = NULL;
    673   }
    674 
    675609  UInt frameWidthInCtus = pcPic->getFrameWidthInCtus();
    676610  if ( m_ctuRsAddr % frameWidthInCtus )
     
    692626  {
    693627    m_pCtuAboveRight = pcPic->getCtu( m_ctuRsAddr - frameWidthInCtus + 1 );
    694   }
    695 
    696   for(UInt i=0; i<NUM_REF_PIC_LIST_01; i++)
    697   {
    698     const RefPicList rpl=RefPicList(i);
    699     if ( getSlice()->getNumRefIdx( rpl ) > 0 )
    700     {
    701       m_apcCUColocated[rpl] = getSlice()->getRefPic( rpl, 0)->getCtu( m_ctuRsAddr );
    702     }
    703628  }
    704629}
     
    743668    }
    744669    m_skipFlag[ui]      = false;
    745 #if NH_3D_DIS
     670#if NH_3D
    746671    m_bDISFlag[ui]      = false;
    747672    m_ucDISType[ui]     = 0;
     
    755680    m_pbMergeFlag[ui]   = 0;
    756681    m_puhMergeIndex[ui] = 0;
    757 #if NH_3D_VSP
     682#if NH_3D
    758683    m_piVSPFlag[ui]     = 0;
    759 #endif
    760 #if NH_3D_SPIVMP
    761684    m_pbSPIVMPFlag[ui] = 0;
    762685#endif
     
    772695      m_puhCbf[comp][ui] = 0;
    773696    }
    774 #if NH_3D_ARP
    775       m_puhARPW[ui] = 0;
    776 #endif
    777 #if NH_3D_IC
    778       m_pbICFlag[ui]  = false;
    779 #endif
    780 
    781 
    782 #if NH_3D_DMM
     697#if NH_3D
     698    m_puhARPW[ui] = 0;
     699    m_pbICFlag[ui]  = false;
    783700    for( Int i = 0; i < NUM_DMM; i++ )
    784701    {
    785       m_dmmDeltaDC[i][0] [ui] = 0;
    786       m_dmmDeltaDC[i][1] [ui] = 0;
    787     }
    788     m_dmm1WedgeTabIdx    [ui] = 0;
    789 #endif
    790 #if NH_3D_SDC_INTRA
    791       m_pbSDCFlag           [ui] = false;
    792       m_apSegmentDCOffset[0][ui] = 0;
    793       m_apSegmentDCOffset[1][ui] = 0;
    794 #endif
    795 #if NH_3D_DBBP
    796       m_pbDBBPFlag[ui] = false;
     702      m_dmmDeltaDC[i][0]  [ui] = 0;
     703      m_dmmDeltaDC[i][1]  [ui] = 0;
     704    }
     705    m_dmm1WedgeTabIdx     [ui] = 0;
     706    m_pbSDCFlag           [ui] = false;
     707    m_apSegmentDCOffset[0][ui] = 0;
     708    m_apSegmentDCOffset[1][ui] = 0;
     709    m_pbDBBPFlag          [ui] = false;
    797710#endif
    798711  }
     
    849762  memset( m_pbMergeFlag,        0, iSizeInBool  );
    850763  memset( m_puhMergeIndex,      0, iSizeInUchar );
    851 #if NH_3D_VSP
     764#if NH_3D
    852765  memset( m_piVSPFlag,          0, sizeof( SChar ) * m_uiNumPartition );
    853 #endif
    854 #if NH_3D_SPIVMP
    855766  memset( m_pbSPIVMPFlag,       0, sizeof( Bool  ) * m_uiNumPartition );
    856767#endif
     
    876787  memset( m_puhHeight,         uhHeight, iSizeInUchar );
    877788  memset( m_pbIPCMFlag,        0, iSizeInBool  );
    878 #if NH_3D_ARP
     789#if NH_3D
    879790  memset( m_puhARPW,           0, iSizeInUchar  );
    880 #endif
    881 #if NH_3D_IC
    882791  memset( m_pbICFlag,          0, iSizeInBool  );
    883 #endif
    884 #if NH_3D_DMM
    885792  for( Int i = 0; i < NUM_DMM; i++ )
    886793  {
     
    889796  }
    890797  memset( m_dmm1WedgeTabIdx,    0, sizeof(UInt) * m_uiNumPartition );
    891 #endif
    892 #if NH_3D_SDC_INTRA
    893798  memset( m_pbSDCFlag,            0, sizeof(Bool) * m_uiNumPartition  );
    894799  memset( m_apSegmentDCOffset[0], 0, sizeof(Pel) * m_uiNumPartition   );
    895800  memset( m_apSegmentDCOffset[1], 0, sizeof(Pel) * m_uiNumPartition   );
    896 #endif
    897 #if NH_3D_DBBP
    898801  memset( m_pbDBBPFlag,         0, sizeof(Bool) * m_uiNumPartition  );
    899802#endif
     
    902805  {
    903806    m_skipFlag[ui]   = false;
    904 #if NH_3D_DIS
     807#if NH_3D
    905808    m_bDISFlag[ui]   = false;
    906809    m_ucDISType[ui]  = 0;
     
    918821      m_apiMVPNum[rpl][ui] = -1;
    919822    }
    920 #if NH_3D_DIS
    921       m_bDISFlag[ui]    = pcCU->getDISFlag(uiPartOffset+ui);
    922       m_ucDISType[ui]   = pcCU->getDISType(uiPartOffset+ui);
    923 #endif
    924 #if NH_3D_VSP
    925     m_piVSPFlag[ui] = pcCU->m_piVSPFlag[uiPartOffset+ui];
    926     m_pDvInfo[ ui ] = pcCU->m_pDvInfo[uiPartOffset+ui];
    927 #endif
    928 #if NH_3D_SPIVMP
    929     m_pbSPIVMPFlag[ui]=pcCU->m_pbSPIVMPFlag[uiPartOffset+ui];
    930 #endif
    931 #if NH_3D_ARP
    932       m_puhARPW           [ui] = pcCU->getARPW( uiPartOffset+ui );
    933 #endif
    934 #if NH_3D_IC
    935       m_pbICFlag          [ui] = pcCU->m_pbICFlag[uiPartOffset+ui];
    936 #endif
    937 #if NH_3D_DMM
    938   for( Int i = 0; i < NUM_DMM; i++ )
    939   {
    940     m_dmmDeltaDC[i][0] [ui] = pcCU->m_dmmDeltaDC[i][0] [uiPartOffset+ui];
    941     m_dmmDeltaDC[i][1] [ui] = pcCU->m_dmmDeltaDC[i][1] [uiPartOffset+ui];
    942   }
    943   m_dmm1WedgeTabIdx    [ui] = pcCU->m_dmm1WedgeTabIdx  [uiPartOffset+ui];
    944 #endif
    945 #if NH_3D_SDC_INTRA
     823#if NH_3D
     824    m_bDISFlag    [ui] = pcCU->getDISFlag(uiPartOffset+ui);
     825    m_ucDISType   [ui] = pcCU->getDISType(uiPartOffset+ui);
     826    m_piVSPFlag   [ui] = pcCU->m_piVSPFlag[uiPartOffset+ui];
     827    m_pDvInfo     [ui] = pcCU->m_pDvInfo[uiPartOffset+ui];
     828    m_pbSPIVMPFlag[ui] = pcCU->m_pbSPIVMPFlag[uiPartOffset+ui];
     829    m_puhARPW     [ui] = pcCU->getARPW( uiPartOffset+ui );
     830    m_pbICFlag    [ui] = pcCU->m_pbICFlag[uiPartOffset+ui];
     831    for( Int i = 0; i < NUM_DMM; i++ )
     832    {
     833      m_dmmDeltaDC[i][0] [ui] = pcCU->m_dmmDeltaDC[i][0] [uiPartOffset+ui];
     834      m_dmmDeltaDC[i][1] [ui] = pcCU->m_dmmDeltaDC[i][1] [uiPartOffset+ui];
     835    }
     836    m_dmm1WedgeTabIdx    [ui] = pcCU->m_dmm1WedgeTabIdx  [uiPartOffset+ui];
    946837    m_pbSDCFlag           [ui] = pcCU->m_pbSDCFlag            [ uiPartOffset + ui ];
    947838    m_apSegmentDCOffset[0][ui] = pcCU->m_apSegmentDCOffset[0] [ uiPartOffset + ui ];
    948839    m_apSegmentDCOffset[1][ui] = pcCU->m_apSegmentDCOffset[1] [ uiPartOffset + ui ];
    949 #endif
    950 #if NH_3D_DBBP
    951       m_pbDBBPFlag[ui]=pcCU->m_pbDBBPFlag[uiPartOffset+ui];
     840    m_pbDBBPFlag[ui]=pcCU->m_pbDBBPFlag[uiPartOffset+ui];
    952841#endif
    953842  }
     
    973862  m_pCtuAboveLeft   = pcCU->getCtuAboveLeft();
    974863  m_pCtuAboveRight  = pcCU->getCtuAboveRight();
    975 
    976   for(UInt i=0; i<NUM_REF_PIC_LIST_01; i++)
    977   {
    978     m_apcCUColocated[i] = pcCU->getCUColocated(RefPicList(i));
    979   }
    980864}
    981865
     
    1009893
    1010894  m_skipFlag=pcCU->getSkipFlag()          + uiPart;
    1011 #if NH_3D_DIS
     895#if NH_3D
    1012896  m_bDISFlag     = pcCU->getDISFlag()     + uiPart;
    1013897  m_ucDISType    = pcCU->getDISType()     + uiPart;
     
    1019903  m_pePredMode=pcCU->getPredictionMode()  + uiPart;
    1020904  m_CUTransquantBypass  = pcCU->getCUTransquantBypass()+uiPart;
    1021 #if NH_3D_NBDV
     905#if NH_3D
    1022906  m_pDvInfo             = pcCU->getDvInfo()           + uiPart;
    1023907#endif
    1024 
    1025908  m_pbMergeFlag         = pcCU->getMergeFlag()        + uiPart;
    1026909  m_puhMergeIndex       = pcCU->getMergeIndex()       + uiPart;
    1027 #if NH_3D_VSP
     910#if NH_3D
    1028911  m_piVSPFlag           = pcCU->getVSPFlag()          + uiPart;
    1029 #endif
    1030 #if NH_3D_SPIVMP
    1031   m_pbSPIVMPFlag        = pcCU->getSPIVMPFlag()          + uiPart;
    1032 #endif
    1033 #if NH_3D_ARP
     912  m_pbSPIVMPFlag        = pcCU->getSPIVMPFlag()       + uiPart;
    1034913  m_puhARPW             = pcCU->getARPW()             + uiPart;
    1035 #endif
    1036 #if NH_3D_IC
    1037914  m_pbICFlag            = pcCU->getICFlag()           + uiPart;
    1038915#endif
     
    1053930    m_explicitRdpcmMode[comp]             = pcCU->getExplicitRdpcmMode(ComponentID(comp))             + uiPart;
    1054931  }
    1055 #if NH_3D_DMM
     932#if NH_3D
    1056933  for( Int i = 0; i < NUM_DMM; i++ )
    1057934  {
     
    1060937  }
    1061938  m_dmm1WedgeTabIdx    = pcCU->getDmm1WedgeTabIdx()  + uiPart;
    1062 #endif
    1063 #if NH_3D_SDC_INTRA
    1064939  m_pbSDCFlag               = pcCU->getSDCFlag()              + uiPart;
    1065940  m_apSegmentDCOffset[0]    = pcCU->getSDCSegmentDCOffset(0)  + uiPart;
    1066941  m_apSegmentDCOffset[1]    = pcCU->getSDCSegmentDCOffset(1)  + uiPart;
    1067 #endif 
    1068 #if NH_3D_DBBP
    1069942  m_pbDBBPFlag              = pcCU->getDBBPFlag()         + uiPart;
    1070943#endif
     
    1084957  {
    1085958    const RefPicList rpl=RefPicList(i);
    1086     m_apcCUColocated[rpl] = pcCU->getCUColocated(rpl);
    1087959    m_apiMVPIdx[rpl]=pcCU->getMVPIdx(rpl)  + uiPart;
    1088960    m_apiMVPNum[rpl]=pcCU->getMVPNum(rpl)  + uiPart;
     
    1113985}
    1114986
    1115 #if NH_3D_NBDV
     987#if NH_3D
    1116988Void TComDataCU::copyDVInfoFrom (TComDataCU* pcCU, UInt uiAbsPartIdx)
    1117989{
     
    1121993
    1122994// Copy inter prediction info from the biggest CU
    1123 #if NH_3D_NBDV
     995#if NH_3D
    1124996Void TComDataCU::copyInterPredInfoFrom    ( TComDataCU* pcCU, UInt uiAbsPartIdx, RefPicList eRefPicList   , Bool bNBDV )
    1125997#else
     
    11411013  m_pCtuLeft           = pcCU->getCtuLeft();
    11421014
    1143   for(UInt i=0; i<NUM_REF_PIC_LIST_01; i++)
    1144   {
    1145     m_apcCUColocated[i]  = pcCU->getCUColocated(RefPicList(i));
    1146   }
    11471015
    11481016  m_skipFlag           = pcCU->getSkipFlag ()             + uiAbsPartIdx;
    1149 #if NH_3D_DIS
     1017#if NH_3D
    11501018  m_bDISFlag           = pcCU->getDISFlag ()              + uiAbsPartIdx;
    11511019  m_ucDISType          = pcCU->getDISType()               + uiAbsPartIdx;
     
    11531021
    11541022  m_pePartSize         = pcCU->getPartitionSize ()        + uiAbsPartIdx;
    1155 #if NH_3D_NBDV
     1023#if NH_3D
    11561024  if(bNBDV == true)
    11571025  {
     
    11631031  {
    11641032#endif
    1165   m_pePredMode         = pcCU->getPredictionMode()        + uiAbsPartIdx;
    1166   m_ChromaQpAdj        = pcCU->getChromaQpAdj()           + uiAbsPartIdx;
    1167   m_CUTransquantBypass = pcCU->getCUTransquantBypass()    + uiAbsPartIdx;
    1168   m_puhInterDir        = pcCU->getInterDir      ()        + uiAbsPartIdx;
    1169 
    1170   m_puhDepth           = pcCU->getDepth ()                + uiAbsPartIdx;
    1171   m_puhWidth           = pcCU->getWidth ()                + uiAbsPartIdx;
    1172   m_puhHeight          = pcCU->getHeight()                + uiAbsPartIdx;
    1173 
    1174   m_pbMergeFlag        = pcCU->getMergeFlag()             + uiAbsPartIdx;
    1175   m_puhMergeIndex      = pcCU->getMergeIndex()            + uiAbsPartIdx;
    1176 #if NH_3D_VSP
    1177   m_piVSPFlag          = pcCU->getVSPFlag()               + uiAbsPartIdx;
    1178   m_pDvInfo            = pcCU->getDvInfo()                + uiAbsPartIdx;
    1179 #endif
    1180 #if NH_3D_SPIVMP
    1181   m_pbSPIVMPFlag       = pcCU->getSPIVMPFlag()            + uiAbsPartIdx;
    1182 #endif
    1183 
    1184   m_apiMVPIdx[eRefPicList] = pcCU->getMVPIdx(eRefPicList) + uiAbsPartIdx;
    1185   m_apiMVPNum[eRefPicList] = pcCU->getMVPNum(eRefPicList) + uiAbsPartIdx;
    1186 #if NH_3D_ARP
    1187   m_puhARPW            = pcCU->getARPW()                  + uiAbsPartIdx;
    1188 #endif   
    1189 #if NH_3D_DBBP
    1190   m_pbDBBPFlag       = pcCU->getDBBPFlag()              + uiAbsPartIdx;
    1191 #endif
    1192 
    1193   m_acCUMvField[ eRefPicList ].linkToWithOffset( pcCU->getCUMvField(eRefPicList), uiAbsPartIdx );
    1194 #if NH_3D_NBDV
    1195   }
    1196 #endif
    1197 #if NH_3D_IC
     1033    m_pePredMode         = pcCU->getPredictionMode()        + uiAbsPartIdx;
     1034    m_ChromaQpAdj        = pcCU->getChromaQpAdj()           + uiAbsPartIdx;
     1035    m_CUTransquantBypass = pcCU->getCUTransquantBypass()    + uiAbsPartIdx;
     1036    m_puhInterDir        = pcCU->getInterDir      ()        + uiAbsPartIdx;
     1037
     1038    m_puhDepth           = pcCU->getDepth ()                + uiAbsPartIdx;
     1039    m_puhWidth           = pcCU->getWidth ()                + uiAbsPartIdx;
     1040    m_puhHeight          = pcCU->getHeight()                + uiAbsPartIdx;
     1041
     1042    m_pbMergeFlag        = pcCU->getMergeFlag()             + uiAbsPartIdx;
     1043    m_puhMergeIndex      = pcCU->getMergeIndex()            + uiAbsPartIdx;
     1044#if NH_3D
     1045    m_piVSPFlag          = pcCU->getVSPFlag()               + uiAbsPartIdx;
     1046    m_pDvInfo            = pcCU->getDvInfo()                + uiAbsPartIdx;
     1047    m_pbSPIVMPFlag       = pcCU->getSPIVMPFlag()            + uiAbsPartIdx;
     1048#endif
     1049    m_apiMVPIdx[eRefPicList] = pcCU->getMVPIdx(eRefPicList) + uiAbsPartIdx;
     1050    m_apiMVPNum[eRefPicList] = pcCU->getMVPNum(eRefPicList) + uiAbsPartIdx;
     1051#if NH_3D
     1052    m_puhARPW            = pcCU->getARPW()                  + uiAbsPartIdx;
     1053    m_pbDBBPFlag       = pcCU->getDBBPFlag()              + uiAbsPartIdx;
     1054#endif
     1055
     1056    m_acCUMvField[ eRefPicList ].linkToWithOffset( pcCU->getCUMvField(eRefPicList), uiAbsPartIdx );
     1057#if NH_3D
     1058  }
    11981059  m_pbICFlag           = pcCU->getICFlag()                + uiAbsPartIdx;
    11991060#endif
     
    12211082  Int sizeInChar  = sizeof( SChar ) * uiNumPartition;
    12221083  memcpy( m_skipFlag   + uiOffset, pcCU->getSkipFlag(),       sizeof( *m_skipFlag )   * uiNumPartition );
    1223 #if NH_3D_DIS
     1084#if NH_3D
    12241085  memcpy( m_bDISFlag   + uiOffset, pcCU->getDISFlag(),        sizeof( *m_bDISFlag )   * uiNumPartition );
    12251086  memcpy( m_ucDISType  + uiOffset, pcCU->getDISType(),        sizeof( *m_ucDISType )  * uiNumPartition);
     
    12321093  memcpy( m_pbMergeFlag         + uiOffset, pcCU->getMergeFlag(),         iSizeInBool  );
    12331094  memcpy( m_puhMergeIndex       + uiOffset, pcCU->getMergeIndex(),        iSizeInUchar );
    1234 #if NH_3D_VSP
     1095#if NH_3D
    12351096  memcpy( m_piVSPFlag           + uiOffset, pcCU->getVSPFlag(),           sizeof( SChar ) * uiNumPartition );
    12361097  memcpy( m_pDvInfo             + uiOffset, pcCU->getDvInfo(),            sizeof( *m_pDvInfo ) * uiNumPartition );
    1237 #endif
    1238 #if NH_3D_SPIVMP  || NH_3D_DBBP
    12391098  memcpy( m_pbSPIVMPFlag        + uiOffset, pcCU->getSPIVMPFlag(),        sizeof( Bool ) * uiNumPartition );
    12401099#endif
     
    12551114    memcpy( m_explicitRdpcmMode[comp]             + uiOffset, pcCU->getExplicitRdpcmMode(ComponentID(comp))            , iSizeInUchar );
    12561115  }
    1257 #if NH_3D_DMM
     1116#if NH_3D
    12581117  for( Int i = 0; i < NUM_DMM; i++ )
    12591118  {
     
    12621121  }
    12631122  memcpy( m_dmm1WedgeTabIdx    + uiOffset, pcCU->getDmm1WedgeTabIdx(),         sizeof(UInt) * uiNumPartition );
    1264 #endif
    1265 #if NH_3D_SDC_INTRA
    12661123  memcpy( m_pbSDCFlag             + uiOffset, pcCU->getSDCFlag(), sizeof( *m_pbSDCFlag ) * uiNumPartition  );
    12671124  memcpy( m_apSegmentDCOffset[0]  + uiOffset, pcCU->getSDCSegmentDCOffset(0), sizeof( Pel ) * uiNumPartition);
    12681125  memcpy( m_apSegmentDCOffset[1]  + uiOffset, pcCU->getSDCSegmentDCOffset(1), sizeof( Pel ) * uiNumPartition);
    1269 #endif
    1270 #if NH_3D_DBBP
    12711126  memcpy( m_pbDBBPFlag          + uiOffset, pcCU->getDBBPFlag(),          iSizeInBool  );
    1272 #endif
    1273 #if NH_3D_ARP
    12741127  memcpy( m_puhARPW             + uiOffset, pcCU->getARPW(),              iSizeInUchar );
    12751128#endif
     
    12911144    memcpy( m_apiMVPIdx[rpl] + uiOffset, pcCU->getMVPIdx(rpl), iSizeInUchar );
    12921145    memcpy( m_apiMVPNum[rpl] + uiOffset, pcCU->getMVPNum(rpl), iSizeInUchar );
    1293     m_apcCUColocated[rpl] = pcCU->getCUColocated(rpl);
    12941146  }
    12951147
     
    13141166  }
    13151167
    1316 #if NH_3D_IC
     1168#if NH_3D
    13171169  memcpy( m_pbICFlag            + uiOffset, pcCU->getICFlag(),            iSizeInBool );
    13181170#endif
     
    13381190
    13391191  memcpy( pCtu->getSkipFlag() + m_absZIdxInCtu, m_skipFlag, sizeof( *m_skipFlag ) * m_uiNumPartition );
    1340 #if NH_3D_DIS
     1192#if NH_3D
    13411193  memcpy( pCtu->getDISFlag()  + m_absZIdxInCtu, m_bDISFlag, sizeof( *m_bDISFlag )  * m_uiNumPartition );
    13421194  memcpy( pCtu->getDISType()  + m_absZIdxInCtu, m_ucDISType, sizeof( *m_ucDISType ) * m_uiNumPartition );
     
    13441196
    13451197  memcpy( pCtu->getQP() + m_absZIdxInCtu, m_phQP, sizeInChar  );
    1346 #if NH_3D_NBDV
     1198#if NH_3D
    13471199  memcpy( pCtu->getDvInfo() + m_absZIdxInCtu, m_pDvInfo, sizeof(* m_pDvInfo) * m_uiNumPartition );
    13481200#endif
     
    13541206  memcpy( pCtu->getMergeFlag()         + m_absZIdxInCtu, m_pbMergeFlag,         iSizeInBool  );
    13551207  memcpy( pCtu->getMergeIndex()        + m_absZIdxInCtu, m_puhMergeIndex,       iSizeInUchar );
    1356 #if NH_3D_VSP
     1208#if NH_3D
    13571209  memcpy( pCtu->getVSPFlag()           + m_absZIdxInCtu, m_piVSPFlag,           sizeof( SChar ) * m_uiNumPartition );
    1358 #endif
    1359 #if NH_3D_DBBP
    13601210  memcpy( pCtu->getDvInfo()            + m_absZIdxInCtu, m_pDvInfo,             sizeof( *m_pDvInfo ) * m_uiNumPartition );
    1361 #endif
    1362 #if NH_3D_SPIVMP
    13631211  memcpy( pCtu->getSPIVMPFlag()        + m_absZIdxInCtu, m_pbSPIVMPFlag,        sizeof( Bool ) * m_uiNumPartition );
    13641212#endif
    13651213
    1366 for (UInt ch=0; ch<numValidChan; ch++)
     1214  for (UInt ch=0; ch<numValidChan; ch++)
    13671215  {
    13681216    memcpy( pCtu->getIntraDir(ChannelType(ch)) + m_absZIdxInCtu, m_puhIntraDir[ch], iSizeInUchar);
     
    13801228  }
    13811229
    1382 #if NH_3D_DMM
     1230#if NH_3D
    13831231  for( Int i = 0; i < NUM_DMM; i++ )
    13841232  {
     
    13861234    memcpy( pCtu->getDmmDeltaDC( (DmmID)i, 1 ) + m_absZIdxInCtu, m_dmmDeltaDC[i][1], sizeof(Pel ) * m_uiNumPartition );
    13871235  }
     1236
    13881237  memcpy( pCtu->getDmm1WedgeTabIdx()           + m_absZIdxInCtu, m_dmm1WedgeTabIdx,  sizeof(UInt) * m_uiNumPartition );
    1389 #endif
    1390 #if NH_3D_SDC_INTRA
    13911238  memcpy( pCtu->getSDCFlag()             + m_absZIdxInCtu, m_pbSDCFlag, sizeof(Bool) * m_uiNumPartition );
    13921239  memcpy( pCtu->getSDCSegmentDCOffset(0) + m_absZIdxInCtu, m_apSegmentDCOffset[0], sizeof( Pel ) * m_uiNumPartition);
    13931240  memcpy( pCtu->getSDCSegmentDCOffset(1) + m_absZIdxInCtu, m_apSegmentDCOffset[1], sizeof( Pel ) * m_uiNumPartition);
    1394 #endif
    1395 #if NH_3D_DBBP
    13961241  memcpy( pCtu->getDBBPFlag()          + m_absZIdxInCtu, m_pbDBBPFlag,          iSizeInBool  );
    1397 #endif
    1398 #if NH_3D_ARP
    13991242  memcpy( pCtu->getARPW()              + m_absZIdxInCtu, m_puhARPW,             iSizeInUchar );
    14001243#endif
     
    14321275  }
    14331276
    1434 #if NH_3D_IC
     1277#if NH_3D
    14351278  memcpy( pCtu->getICFlag() + m_absZIdxInCtu, m_pbICFlag, sizeof( *m_pbICFlag ) * m_uiNumPartition );
    14361279#endif
    14371280  pCtu->getTotalBins() = m_uiTotalBins;
    14381281}
    1439 #if H_3D_SPIVMP
    1440   memcpy( rpcCU->getSPIVMPFlag()        + uiPartOffset, m_pbSPIVMPFlag,        sizeof(Bool) * uiQNumPart );
    1441 #endif
    1442 
    1443 
    14441282
    14451283// --------------------------------------------------------------------------------------------------------------------
     
    17861624Bool TComDataCU::isLosslessCoded(UInt absPartIdx) const
    17871625{
    1788   return (getSlice()->getPPS()->getTransquantBypassEnableFlag() && getCUTransquantBypass (absPartIdx));
     1626  return (getSlice()->getPPS()->getTransquantBypassEnabledFlag() && getCUTransquantBypass (absPartIdx));
    17891627}
    17901628
     
    18421680  }
    18431681  iLeftIntraDir  = pcCULeft ? ( pcCULeft->isIntra( LeftPartIdx ) ? pcCULeft->getIntraDir( chType, LeftPartIdx ) : DC_IDX ) : DC_IDX;
    1844 #if NH_3D_DMM
     1682#if NH_3D
    18451683  mapDmmToIntraDir( iLeftIntraDir );
    18461684#endif
     
    18541692  }
    18551693  iAboveIntraDir = pcCUAbove ? ( pcCUAbove->isIntra( AbovePartIdx ) ? pcCUAbove->getIntraDir( chType, AbovePartIdx ) : DC_IDX ) : DC_IDX;
    1856 #if NH_3D_DMM
     1694#if NH_3D
    18571695  mapDmmToIntraDir( iAboveIntraDir );
    18581696#endif
     
    19901828  return uiCtx;
    19911829}
    1992 #if NH_3D_ARP
     1830#if NH_3D
    19931831UInt TComDataCU::getCTXARPWFlag( UInt uiAbsPartIdx )
    19941832{
     
    20011839  return uiCtx;
    20021840}
    2003 #endif
    2004 #if NH_3D_DBBP
     1841
    20051842Pel* TComDataCU::getVirtualDepthBlock(UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, UInt& uiDepthStride)
    20061843{
     
    20161853  assert( !getSlice()->getIsDepth() );
    20171854 
    2018 #if H_3D_FCO
    2019   TComPic* depthPic = getSlice()->getIvPic(true, getSlice()->getViewIndex() );
    2020  
    2021   if( depthPic && depthPic->getPicYuvRec() != NULL && depthPic->getIsDepth() )  // depth first
    2022   {
    2023     depthPicYuv = depthPic->getPicYuvRec();
    2024     depthPicYuv->extendPicBorder();
    2025    
    2026     // get collocated depth block for current CU
    2027     uiDepthStride = depthPicYuv->getStride();
    2028     pDepthPels    = depthPicYuv->getLumaAddr( getAddr(), uiAbsPartIdx );
    2029   }
    2030   else  // texture first
    2031 #else
    20321855  {
    20331856    DisInfo DvInfo = getDvInfo(uiAbsPartIdx);
     
    20521875   
    20531876    Bool depthRefineFlag = false;
    2054 #if NH_3D_NBDV_REF
    20551877    depthRefineFlag = m_pcSlice->getDepthRefinementFlag();
    2056 #endif // NH_3D_NBDV_REF
    20571878   
    20581879    TComMv cDv = depthRefineFlag ? DvInfo.m_acDoNBDV : DvInfo.m_acNBDV;
     
    20671888    pDepthPels = depthPicYuv->getAddr(COMPONENT_Y) + depthPosX + depthPosY * uiDepthStride;
    20681889  }
    2069 #endif
    20701890 
    20711891  AOF( depthPicYuv != NULL );
     
    20751895  return pDepthPels;
    20761896}
    2077 #endif
    2078 
    2079 #if NH_3D_DBBP
     1897
    20801898Void TComDataCU::setDBBPFlagSubParts ( Bool bDBBPFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth )
    20811899{
     
    21701988}
    21711989
    2172 #if NH_3D_DIS
     1990#if NH_3D
    21731991Void TComDataCU::setDISFlagSubParts( Bool bDIS, UInt uiAbsPartIdx, UInt uiDepth )
    21741992{
     
    23362154}
    23372155
    2338 #if NH_3D_SDC_INTRA
     2156#if NH_3D
    23392157Void TComDataCU::setSDCFlagSubParts ( Bool bSDCFlag, UInt absPartIdx, UInt depth )
    23402158{
     
    23492167    UInt lumaPredMode = getIntraDir( CHANNEL_TYPE_LUMA, uiAbsPartIdx );
    23502168    if( lumaPredMode < NUM_INTRA_MODE ) { return true; }
    2351 #if NH_3D_DMM
    23522169    if( isDmmMode( lumaPredMode )     ) { return true; }
    2353 #endif
    23542170  }
    23552171  return false;
     
    23672183}
    23682184
    2369 #if NH_3D_SPIVMP
     2185#if NH_3D
    23702186Void TComDataCU::setSPIVMPFlagSubParts( Bool bSPIVMPFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth )
    23712187{
    23722188  setSubPart<Bool>( bSPIVMPFlag, m_pbSPIVMPFlag, uiAbsPartIdx, uiDepth, uiPartIdx );
    23732189}
    2374 #endif
    2375 
    2376 #if NH_3D_VSP
     2190
    23772191Void TComDataCU::setVSPFlagSubParts( SChar iVSPFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth )
    23782192{
     
    25992413
    26002414// This is for use by a leaf/sub CU object only, with no additional AbsPartIdx
    2601 #if NH_3D_IC || NH_3D_VSP
     2415#if NH_3D
    26022416Void TComDataCU::getPartIndexAndSize( UInt uiPartIdx, UInt& ruiPartAddr, Int& riWidth, Int& riHeight, UInt uiAbsPartIdx, Bool bLCU) const
    26032417{
     
    29412755    );
    29422756}
    2943 #endif
    2944 
    2945 #if NH_3D_VSP
     2757
    29462758/** Add a VSP merging candidate
    29472759 * \Inputs
     
    29972809        predFlag[iRefListIdX] = 1;
    29982810        mvVSP[0+iRefListIdX].setMvField( pDInfo->m_acNBDV, i );
    2999 #if NH_3D_NBDV
    30002811        mvVSP[0+iRefListIdX].getMv().setIDVFlag (false);
    3001 #endif
    30022812      }
    30032813    }
     
    30052815
    30062816  dirVSP = (predFlag[0] | (predFlag[1] << 1));
    3007   m_mergCands[MRG_VSP].setCand( mvVSP, dirVSP, true
    3008 #if NH_3D_SPIVMP
    3009     , false
    3010 #endif
    3011     );
     2817  m_mergCands[MRG_VSP].setCand( mvVSP, dirVSP, true    , false);
    30122818  if ( mrgCandIdx == iCount )
    30132819  {
     
    30192825  return false;
    30202826}
    3021 #endif
    3022 
    3023 #if NH_3D_IV_MERGE
     2827
    30242828inline Bool TComDataCU::xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Int* ivCandDir, TComMv* ivCandMv, Int* ivCandRefIdx )
    30252829{
     
    30522856      if(!bRemove)
    30532857      {
    3054 #if NH_3D_NBDV
    30552858        if(iLoop) // For IvMcShift candidate
    30562859        {
     
    30582861          tmpMV[1].getMv().setIDVFlag (false);
    30592862        }
    3060 #endif
    30612863        m_mergCands[MRG_IVSHIFT].setCand(tmpMV, tmpDir, false, false);
    30622864        if( mrgCandIdx == iCount )
     
    30722874}
    30732875
    3074 #endif
    3075 #if NH_3D_MLC
    30762876/** Construct a extended list of merging candidates
    30772877 * \param pcMvFieldNeighbours
     
    30812881 * \param numValidMergeCand
    30822882 */
    3083 Void TComDataCU::buildMCL(TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours
    3084 #if NH_3D_VSP
    3085   , Int* vspFlag
    3086 #endif
    3087 #if NH_3D_SPIVMP
    3088   , Bool* pbSPIVMPFlag
    3089 #endif
    3090   , Int& numValidMergeCand
    3091   )
     2883Void TComDataCU::buildMCL(TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* vspFlag  , Bool* pbSPIVMPFlag  , Int& numValidMergeCand  )
    30922884{
    30932885  if (!( getSlice()->getIsDepth() || getSlice()->getViewIndex()>0))
     
    30952887    return;
    30962888  }
    3097 
    30982889
    30992890#if ENC_DEC_TRACE && NH_MV_ENC_DEC_TRAC
     
    31192910    extMergeCandList[ui<<1].setMvField(cZeroMv, NOT_VALID);
    31202911    extMergeCandList[(ui<<1)+1].setMvField(cZeroMv, NOT_VALID);
    3121 #if NH_3D_VSP
    31222912    vspFlag[ui] = 0;
    3123 #endif
    31242913  }
    31252914
     
    31292918    if (m_mergCands[i].m_bAvailable)
    31302919    {
    3131       m_mergCands[i].getCand(iCount, extMergeCandList, uhInterDirNeighboursExt
    3132 #if NH_3D_VSP
    3133         , vspFlag
    3134 #endif
    3135 #if NH_3D_SPIVMP
    3136         , pbSPIVMPFlag
    3137 #endif
    3138         );
     2920      m_mergCands[i].getCand(iCount, extMergeCandList, uhInterDirNeighboursExt, vspFlag, pbSPIVMPFlag );
    31392921      iCount++;
    31402922      if (iCount >= getSlice()->getMaxNumMergeCand())
     
    32293011 * \param numValidMergeCand
    32303012 */
    3231 Void TComDataCU::xGetInterMergeCandidates( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours
    3232 #if NH_3D_SPIVMP
    3233       , TComMvField* pcMvFieldSP, UChar* puhInterDirSP
    3234 #endif
    3235       , Int& numValidMergeCand, Int mrgCandIdx
    3236 )
    3237 {
    3238 #if NH_3D_IV_MERGE
     3013
     3014Void TComDataCU::xGetInterMergeCandidates( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours, TComMvField* pcMvFieldSP, UChar* puhInterDirSP, Int& numValidMergeCand, Int mrgCandIdx )
     3015{
    32393016  TComMv cZeroMv;
    32403017  TComMvField tmpMV[2]; 
    3241 #endif
    32423018
    32433019  //////////////////////////////////
    32443020  //////// GET DISPARITIES  ////////
    32453021  //////////////////////////////////
    3246 #if NH_3D_IV_MERGE
    32473022  DisInfo cDisInfo = getDvInfo(uiAbsPartIdx);
    32483023  m_cDefaultDisInfo = cDisInfo;
    3249 #elif NH_3D_VSP
    3250   // for xAddVspCand()
    3251   DisInfo cDisInfo = getDvInfo(uiAbsPartIdx);
    3252 #endif
    32533024
    32543025  if (!( getSlice()->getIsDepth() || getSlice()->getViewIndex()>0))
     
    32683039  deriveLeftRightTopIdxGeneral( uiAbsPartIdx, uiPUIdx, uiPartIdxLT, uiPartIdxRT );
    32693040  deriveLeftBottomIdxGeneral  ( uiAbsPartIdx, uiPUIdx, uiPartIdxLB );
    3270 #if NH_3D_TEXT_MERGE
    32713041  Bool bMPIFlag   = getSlice()->getMpiFlag();
    32723042  Int  tmpDir;
    3273 #endif
    3274 #if NH_3D_IV_MERGE || NH_3D_TEXT_MERGE
    32753043  Bool bIsDepth = getSlice()->getIsDepth();
    3276 #endif
    3277 
    3278 #if NH_3D_IC
     3044
    32793045  Bool bICFlag = getICFlag(uiAbsPartIdx);
    3280 #endif
    3281 #if NH_3D_ARP
    32823046  Bool bARPFlag = getARPW(uiAbsPartIdx) > 0;
    3283 #endif
    3284 #if NH_3D_DBBP
    32853047  Bool bDBBPFlag = getDBBPFlag(uiAbsPartIdx);
    32863048  assert(bDBBPFlag == getDBBPFlag(0)); 
    3287 #endif
    3288 
    3289 #if NH_3D_NBDV
     3049
    32903050  for(Int i = 0; i < MRG_MAX_NUM_CANDS_MEM; i++) 
    32913051  {
     
    32933053    pcMFieldNeighbours[(i<<1)+1].getMv().setIDVFlag (false);
    32943054  }
    3295 #endif
    32963055  // init containers
    32973056  for (Int i = 0; i<MRG_IVSHIFT+1; i++)
     
    33103069  if (getAvailableFlagA1())
    33113070  {
    3312     m_mergCands[MRG_A1].setCand( &pcMFieldNeighbours[m_numSpatialCands<<1], puhInterDirNeighbours[m_numSpatialCands]
    3313 #if NH_3D_VSP
    3314     , (pcCULeft->getVSPFlag(uiLeftPartIdx) != 0
    3315 #if NH_3D_IC
    3316       && !bICFlag
    3317 #endif
    3318 #if NH_3D_ARP
    3319       && !bARPFlag
    3320 #endif
    3321 #if NH_3D_DBBP
    3322       && !bDBBPFlag
    3323 #endif
    3324       )
    3325 #endif
    3326 #if NH_3D_SPIVMP
    3327       , false
    3328 #endif
    3329       );
     3071    m_mergCands[MRG_A1].setCand( &pcMFieldNeighbours[m_numSpatialCands<<1], puhInterDirNeighbours[m_numSpatialCands], (pcCULeft->getVSPFlag(uiLeftPartIdx) != 0 && !bICFlag && !bARPFlag&& !bDBBPFlag), false );
    33303072    m_numSpatialCands++;
    33313073  }
     
    33343076  if (getAvailableFlagB1())
    33353077  {
    3336     m_mergCands[MRG_B1].setCand( &pcMFieldNeighbours[m_numSpatialCands<<1], puhInterDirNeighbours[m_numSpatialCands]
    3337 #if NH_3D_VSP
    3338     , false
    3339 #endif
    3340 #if NH_3D_SPIVMP
    3341       , false
    3342 #endif
    3343       );
     3078    m_mergCands[MRG_B1].setCand( &pcMFieldNeighbours[m_numSpatialCands<<1], puhInterDirNeighbours[m_numSpatialCands], false, false );
    33443079    m_numSpatialCands++;
    33453080  }
     
    33483083  if (getAvailableFlagB0())
    33493084  {
    3350     m_mergCands[MRG_B0].setCand( &pcMFieldNeighbours[m_numSpatialCands<<1], puhInterDirNeighbours[m_numSpatialCands]
    3351 #if NH_3D_VSP
    3352     , false
    3353 #endif
    3354 #if NH_3D_SPIVMP
    3355       , false
    3356 #endif
    3357       );
     3085    m_mergCands[MRG_B0].setCand( &pcMFieldNeighbours[m_numSpatialCands<<1], puhInterDirNeighbours[m_numSpatialCands], false, false );
    33583086    m_numSpatialCands++;
    33593087  }
     
    33623090  if (getAvailableFlagA0())
    33633091  {
    3364     m_mergCands[MRG_A0].setCand( &pcMFieldNeighbours[m_numSpatialCands<<1], puhInterDirNeighbours[m_numSpatialCands]
    3365 #if NH_3D_VSP
    3366     , false
    3367 #endif
    3368 #if NH_3D_SPIVMP
    3369       , false
    3370 #endif
    3371       );
     3092    m_mergCands[MRG_A0].setCand( &pcMFieldNeighbours[m_numSpatialCands<<1], puhInterDirNeighbours[m_numSpatialCands], false, false );
    33723093    m_numSpatialCands++;
    33733094  }
     
    33763097  if (getAvailableFlagB2())
    33773098  {
    3378     m_mergCands[MRG_B2].setCand( &pcMFieldNeighbours[m_numSpatialCands<<1], puhInterDirNeighbours[m_numSpatialCands]
    3379 #if NH_3D_VSP
    3380     , false
    3381 #endif
    3382 #if NH_3D_SPIVMP
    3383       , false
    3384 #endif
    3385       );
     3099    m_mergCands[MRG_B2].setCand( &pcMFieldNeighbours[m_numSpatialCands<<1], puhInterDirNeighbours[m_numSpatialCands], false, false );
    33863100    m_numSpatialCands++;
    33873101  }
    33883102
    3389 
    3390 #if NH_3D_TEXT_MERGE
    33913103
    33923104  /////////////////////////////////////////////
     
    34043116
    34053117    TComPic * pcTexPic = m_pcSlice->getTexturePic();
    3406 #if H_3D_FCO
    3407     if (pcTexPic && pcTexPic->getReconMark())
    3408     {
    3409 #endif   
    34103118      TComPicYuv*   pcTexRec = pcTexPic->getPicYuvRec  ();
    34113119      UInt          uiPartAddr;
     
    34393147
    34403148      Int         iTexPosX, iTexPosY;
    3441 #if NH_3D_INTEGER_MV_DEPTH
    34423149      const TComMv cMvRounding( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) );
    3443 #endif
     3150
    34443151      Int         iCenterPosX = iCurrPosX + ( ( iWidth /  iPUWidth ) >> 1 )  * iPUWidth + ( iPUWidth >> 1 );
    34453152      Int         iCenterPosY = iCurrPosY + ( ( iHeight /  iPUHeight ) >> 1 )  * iPUHeight + (iPUHeight >> 1);
     
    34743181              {
    34753182                bSPIVMPFlag = true;
    3476 #if NH_3D_INTEGER_MV_DEPTH
    34773183                TComMv cMv = cDefaultMvField.getMv() + cMvRounding;
    34783184                cMv >>= 2;
    3479 #else
    3480                 TComMv cMv = cDefaultMvField.getMv();
    3481 #endif
    34823185                cMvFieldSaved[eCurrRefPicList].setMvField(cMv, iRefPicList) ;
    34833186                break;
     
    35163219                if( (cTexMvField.getRefIdx()>=0) && ( iValidDepRef >= 0 ) )
    35173220                {
    3518 #if NH_3D_INTEGER_MV_DEPTH
    35193221                  TComMv cMv = cTexMvField.getMv() + cMvRounding;
    35203222                  cMv >>=2;         
    3521 #else
    3522                   TComMv cMv = cTexMvField.getMv();
    3523 #endif         
    35243223                  pcMvFieldSP[2*iPartition + uiCurrRefListId].setMvField(cMv, iValidDepRef);
    35253224                }
     
    35413240        }
    35423241      }
    3543 #if H_3D_FCO
    3544     }
    3545 #endif
     3242
    35463243    if( tmpDir != 0 )
    35473244    {
     
    35683265    }
    35693266  }
    3570 #endif
    3571 
    3572 #if NH_3D_IV_MERGE
     3267
    35733268  /////////////////////////////////////////////////////////////////
    35743269  //////// DERIVE IvMC, IvMCShift,IvDCShift, IvDC  Candidates /////
     
    35883283  if ( ivMvPredFlag && cDisInfo.m_aVIdxCan!=-1)
    35893284  {
    3590 #if NH_3D_IC
    35913285    getInterViewMergeCands(uiPUIdx, ivCandRefIdx, ivCandMv, &cDisInfo, ivCandDir , bIsDepth, pcMvFieldSP, puhInterDirSP, bICFlag );
    3592 #else
    3593     getInterViewMergeCands(uiPUIdx, ivCandRefIdx, ivCandMv, &cDisInfo, ivCandDir , bIsDepth, pcMvFieldSP, puhInterDirSP, false );
    3594 #endif
    35953286  } 
    35963287
     
    36483339        spiMvpFlag = true;
    36493340      }
    3650 #if NH_3D_DBBP
    36513341      spiMvpFlag &= !bDBBPFlag;
    3652 #endif
    36533342
    36543343      m_mergCands[MRG_IVMC].setCand( tmpMV, ivCandDir[0], false, spiMvpFlag);
     
    36673356    return;
    36683357  }
    3669 #endif
     3358
    36703359
    36713360  iCount += m_mergCands[MRG_A1].m_bAvailable + m_mergCands[MRG_B1].m_bAvailable;
    36723361
    3673 #if NH_3D_VSP
    36743362  /////////////////////////////////////////////////
    36753363  //////// VIEW SYNTHESIS PREDICTION (VSP) ////////
     
    36773365  if (iCount<getSlice()->getMaxNumMergeCand())
    36783366  {
    3679     if (
    3680       (!getAvailableFlagA1() || !(pcCULeft->getVSPFlag(uiLeftPartIdx) != 0)) &&
    3681 #if NH_3D_IC
    3682       !bICFlag &&
    3683 #endif
    3684 #if NH_3D_ARP
    3685       !bARPFlag &&
    3686 #endif
    3687 #if NH_3D
     3367    if ( ( !getAvailableFlagA1() || !(pcCULeft->getVSPFlag(uiLeftPartIdx) != 0) ) &&
     3368      !bICFlag           &&
     3369      !bARPFlag          &&
    36883370      (nPSW + nPSH > 12) &&
    3689 #endif
    3690 #if NH_3D_DBBP
    3691       !bDBBPFlag &&
    3692 #endif
     3371      !bDBBPFlag         &&
    36933372      xAddVspCand( mrgCandIdx, &cDisInfo, iCount ) )
    36943373    {
     
    37023381    }
    37033382  }
    3704 #endif
    37053383
    37063384  iCount += m_mergCands[MRG_B0].m_bAvailable;
    37073385
    3708 #if NH_3D_IV_MERGE
    37093386  /////////////////////////////////////////////
    37103387  //////// INTER VIEW DISP COMP (IvDC) ////////
     
    37403417    if(!bRemoveSpa)
    37413418    {
    3742 #if NH_3D_NBDV
    37433419      tmpMV[0].getMv().setIDVFlag (false);
    37443420      tmpMV[1].getMv().setIDVFlag (false);
    3745 #endif
    37463421      m_mergCands[MRG_IVDC].setCand( tmpMV, ivCandDir[1], false, false);
    37473422
     
    37573432    }
    37583433  }
    3759 #endif // H_3D_IV_MERGE
     3434
    37603435
    37613436  iCount += m_mergCands[MRG_A0].m_bAvailable + m_mergCands[MRG_B2].m_bAvailable;
    37623437
    3763 #if NH_3D_IV_MERGE
    37643438  ////////////////////////////////////////////////////
    37653439  //////// SHIFTED IV (IvMCShift + IvDCShift) ////////
     
    37773451    }
    37783452  }
    3779 #endif
    37803453}
    37813454#endif
    37823455
    37833456//! Construct a list of merging candidates
    3784 #if NH_3D
     3457
     3458
     3459#if MCTS_ENC_CHECK
     3460Void TComDataCU::getInterMergeCandidates( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int& numValidMergeCand, UInt &numSpatialMergeCandidates, Int mrgCandIdx )
     3461#else
    37853462Void TComDataCU::getInterMergeCandidates( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int& numValidMergeCand, Int mrgCandIdx )
    3786 #else
    3787 Void TComDataCU::getInterMergeCandidates( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int& numValidMergeCand, Int mrgCandIdx ) const
     3463#endif
     3464#if !NH_3D 
     3465  const
    37883466#endif
    37893467{
    37903468  UInt uiAbsPartAddr = m_absZIdxInCtu + uiAbsPartIdx;
    3791 #if NH_3D_MLC
     3469#if NH_3D
    37923470  Bool abCandIsInter[ MRG_MAX_NUM_CANDS_MEM ];
    37933471#else
     
    38233501  if ( isAvailableA1 )
    38243502  {
    3825 #if NH_3D_MLC
     3503#if NH_3D
    38263504    m_bAvailableFlagA1 = 1;
    38273505#endif
     
    38373515    if ( mrgCandIdx == iCount )
    38383516    {
     3517#if MCTS_ENC_CHECK
     3518      numSpatialMergeCandidates = iCount + 1;
     3519#endif
    38393520      return;
    38403521    }
     
    38453526  if (iCount == getSlice()->getMaxNumMergeCand())
    38463527  {
     3528#if MCTS_ENC_CHECK
     3529    numSpatialMergeCandidates = iCount;
     3530#endif
    38473531    return;
    38483532  }
     
    38583542  if ( isAvailableB1 && (!isAvailableA1 || !pcCULeft->hasEqualMotion( uiLeftPartIdx, pcCUAbove, uiAbovePartIdx ) ) )
    38593543  {
    3860 #if NH_3D_MLC
     3544#if NH_3D
    38613545    m_bAvailableFlagB1 = 1;
    38623546#endif
     
    38723556    if ( mrgCandIdx == iCount )
    38733557    {
     3558#if MCTS_ENC_CHECK
     3559      numSpatialMergeCandidates = iCount + 1;
     3560#endif
    38743561      return;
    38753562    }
     
    38793566  if (iCount == getSlice()->getMaxNumMergeCand())
    38803567  {
     3568#if MCTS_ENC_CHECK
     3569    numSpatialMergeCandidates = iCount;
     3570#endif
    38813571    return;
    38823572  }
     
    38923582  if ( isAvailableB0 && ( !isAvailableB1 || !pcCUAbove->hasEqualMotion( uiAbovePartIdx, pcCUAboveRight, uiAboveRightPartIdx ) ) )
    38933583  {
    3894 #if NH_3D_MLC
     3584#if NH_3D
    38953585    m_bAvailableFlagB0 = 1;
    38963586#endif
     
    39063596    if ( mrgCandIdx == iCount )
    39073597    {
     3598#if MCTS_ENC_CHECK
     3599      numSpatialMergeCandidates = iCount + 1;
     3600#endif
    39083601      return;
    39093602    }
     
    39133606  if (iCount == getSlice()->getMaxNumMergeCand())
    39143607  {
     3608#if MCTS_ENC_CHECK
     3609    numSpatialMergeCandidates = iCount;
     3610#endif
    39153611    return;
    39163612  }
     
    39263622  if ( isAvailableA0 && ( !isAvailableA1 || !pcCULeft->hasEqualMotion( uiLeftPartIdx, pcCULeftBottom, uiLeftBottomPartIdx ) ) )
    39273623  {
    3928 #if NH_3D_MLC
     3624#if NH_3D
    39293625    m_bAvailableFlagA0 = 1;
    39303626#endif
     
    39403636    if ( mrgCandIdx == iCount )
    39413637    {
     3638#if MCTS_ENC_CHECK
     3639      numSpatialMergeCandidates = iCount + 1;
     3640#endif
    39423641      return;
    39433642    }
     
    39473646  if (iCount == getSlice()->getMaxNumMergeCand())
    39483647  {
     3648#if MCTS_ENC_CHECK
     3649    numSpatialMergeCandidates = iCount;
     3650#endif
    39493651    return;
    39503652  }
     
    39633665        && ( !isAvailableB1 || !pcCUAbove->hasEqualMotion( uiAbovePartIdx, pcCUAboveLeft, uiAboveLeftPartIdx ) ) )
    39643666    {
    3965 #if NH_3D_MLC
     3667#if NH_3D
    39663668      m_bAvailableFlagB2 = 1;
    39673669#endif
     
    39773679      if ( mrgCandIdx == iCount )
    39783680      {
     3681#if MCTS_ENC_CHECK
     3682        numSpatialMergeCandidates = iCount + 1;
     3683#endif
    39793684        return;
    39803685      }
     
    39853690  if (iCount == getSlice()->getMaxNumMergeCand())
    39863691  {
     3692#if MCTS_ENC_CHECK
     3693    numSpatialMergeCandidates = iCount;
     3694#endif
    39873695    return;
    39883696  }
    39893697
     3698#if MCTS_ENC_CHECK
     3699  numSpatialMergeCandidates = iCount;
     3700#endif
    39903701  if ( getSlice()->getEnableTMVPFlag() )
    39913702  {
     
    40473758    if ( getSlice()->isInterB() )
    40483759    {
    4049 #if NH_3D_TMVP
     3760#if NH_3D
    40503761      iRefIdx = 0;
    40513762#endif
     
    40663777      puhInterDirNeighbours[uiArrayAddr] = dir;
    40673778      abCandIsInter[uiArrayAddr] = true;
    4068 #if NH_3D_NBDV
     3779#if NH_3D
    40693780      pcMvFieldNeighbours[iCount<<1    ].getMv().setIDVFlag (false);
    40703781      pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false);
     
    40873798  UInt uiCutoff = uiArrayAddr;
    40883799
    4089 #if NH_3D_MLC
     3800#if NH_3D
    40903801  if ( getSlice()->isInterB() && iCount<5)
    40913802#else
     
    42573968  if (refIdx < 0)
    42583969  {
     3970#if MCTS_ENC_CHECK
     3971    pInfo->numSpatialMVPCandidates = 0;
     3972#endif
    42593973    return;
    42603974  }
     
    43294043  }
    43304044
     4045#if MCTS_ENC_CHECK
     4046  pInfo->numSpatialMVPCandidates = pInfo->iN;
     4047#endif
    43314048  if (pInfo->iN < AMVP_MAX_NUM_CANDS && getSlice()->getEnableTMVPFlag() )
    43324049  {
     
    43344051    const UInt numPartInCtuWidth  = m_pcPic->getNumPartInCtuWidth();
    43354052    const UInt numPartInCtuHeight = m_pcPic->getNumPartInCtuHeight();
    4336 #if NH_3D_TMVP
     4053#if NH_3D
    43374054    Int refIdx_Col = refIdx;
    43384055#else
     
    43724089      }
    43734090    }
    4374 #if NH_3D_TMVP
     4091#if NH_3D
    43754092        if ( ctuRsAddr >= 0 && xGetColMVP( eRefPicList, ctuRsAddr, absPartAddr, cColMv, refIdx_Col  , 0 ) )
    43764093#else
     
    43844101      UInt uiPartIdxCenter;
    43854102      xDeriveCenterIdx( partIdx, uiPartIdxCenter );
    4386 #if NH_3D_TMVP
     4103#if NH_3D
    43874104      if (xGetColMVP( eRefPicList, getCtuRsAddr(), uiPartIdxCenter,  cColMv, refIdx_Col , 0 ))
    43884105#else
     
    44114128  UInt partAddr;
    44124129
    4413 #if NH_3D_DBBP
     4130#if NH_3D
    44144131  if( getDBBPFlag(0) )
    44154132  {
     
    44314148  const TComSPS &sps=*(m_pcSlice->getSPS());
    44324149  Int  iMvShift = 2;
    4433 #if NH_3D_INTEGER_MV_DEPTH
     4150#if NH_3D
    44344151  if( getSlice()->getIsDepth() )
    44354152    iMvShift = 0;
     
    46634380}
    46644381
    4665 #if NH_3D_TMVP
     4382#if NH_3D
    46664383Bool TComDataCU::xGetColMVP( const RefPicList eRefPicList, const Int ctuRsAddr, const Int partUnitIdx, TComMv& rcMv, Int& refIdx, Bool bMRG  ) const
    46674384#else
     
    46734390  // use coldir.
    46744391  const TComPic    * const pColPic = getSlice()->getRefPic( RefPicList(getSlice()->isInterB() ? 1-getSlice()->getColFromL0Flag() : 0), getSlice()->getColRefIdx());
     4392#if REDUCED_ENCODER_MEMORY
     4393  if (!pColPic->getPicSym()->hasDPBPerCtuData())
     4394  {
     4395    return false;
     4396  }
     4397  const TComPicSym::DPBPerCtuData * const pColDpbCtu = &(pColPic->getPicSym()->getDPBPerCtuData(ctuRsAddr));
     4398  const TComSlice * const pColSlice = pColDpbCtu->getSlice();
     4399  if(pColDpbCtu->getPartitionSize(partUnitIdx)==NUMBER_OF_PART_SIZES)
     4400#else
    46754401  const TComDataCU * const pColCtu = pColPic->getCtu( ctuRsAddr );
    46764402  if(pColCtu->getPic()==0 || pColCtu->getPartitionSize(partUnitIdx)==NUMBER_OF_PART_SIZES)
     4403#endif
    46774404  {
    46784405    return false;
    46794406  }
    46804407
     4408#if REDUCED_ENCODER_MEMORY
     4409  if (!pColDpbCtu->isInter(absPartAddr))
     4410#else
    46814411  if (!pColCtu->isInter(absPartAddr))
     4412#endif
    46824413  {
    46834414    return false;
     
    46854416
    46864417  RefPicList eColRefPicList = getSlice()->getCheckLDC() ? eRefPicList : RefPicList(getSlice()->getColFromL0Flag());
     4418#if REDUCED_ENCODER_MEMORY
     4419  Int iColRefIdx            = pColDpbCtu->getCUMvField(RefPicList(eColRefPicList))->getRefIdx(absPartAddr);
     4420#else
    46874421  Int iColRefIdx            = pColCtu->getCUMvField(RefPicList(eColRefPicList))->getRefIdx(absPartAddr);
     4422#endif
    46884423
    46894424  if (iColRefIdx < 0 )
    46904425  {
    46914426    eColRefPicList = RefPicList(1 - eColRefPicList);
     4427#if REDUCED_ENCODER_MEMORY
     4428    iColRefIdx = pColDpbCtu->getCUMvField(RefPicList(eColRefPicList))->getRefIdx(absPartAddr);
     4429#else
    46924430    iColRefIdx = pColCtu->getCUMvField(RefPicList(eColRefPicList))->getRefIdx(absPartAddr);
     4431#endif
    46934432
    46944433    if (iColRefIdx < 0 )
     
    46984437  }
    46994438
    4700 #if NH_3D_TMVP
     4439#if NH_3D
    47014440  Bool bIsCurrRefLongTerm = m_pcSlice->getRefPic(eRefPicList, refIdx)->getIsLongTerm();
    47024441#else
    47034442  const Bool bIsCurrRefLongTerm = m_pcSlice->getRefPic(eRefPicList, refIdx)->getIsLongTerm();
    47044443#endif
     4444#if REDUCED_ENCODER_MEMORY
     4445  const Bool bIsColRefLongTerm  = pColSlice->getIsUsedAsLongTerm(eColRefPicList, iColRefIdx);
     4446#else
    47054447  const Bool bIsColRefLongTerm  = pColCtu->getSlice()->getIsUsedAsLongTerm(eColRefPicList, iColRefIdx);
    4706 
     4448#endif
    47074449  if ( bIsCurrRefLongTerm != bIsColRefLongTerm )
    47084450  {
    4709 #if NH_3D_TMVP
     4451#if NH_3D
    47104452    Int iAlterRefIdx  = m_pcSlice->getAlterRefIdx(eRefPicList);
    47114453    if(bMRG && iAlterRefIdx > 0)
     
    47194461#endif
    47204462      return false;
    4721 #if NH_3D_TMVP
     4463#if NH_3D
    47224464    }
    47234465#endif
    47244466  }
    47254467  // Scale the vector.
     4468#if REDUCED_ENCODER_MEMORY
     4469  const TComMv &cColMv = pColDpbCtu->getCUMvField(eColRefPicList)->getMv(absPartAddr);
     4470#else
    47264471  const TComMv &cColMv = pColCtu->getCUMvField(eColRefPicList)->getMv(absPartAddr);
    4727 
    4728 #if NH_3D_TMVP
     4472#endif
     4473
     4474#if NH_3D
    47294475  if ( bIsCurrRefLongTerm || bIsColRefLongTerm )
    47304476#else
     
    47324478#endif
    47334479  {
    4734 #if NH_3D_TMVP
     4480#if NH_3D
    47354481    const Int iCurrViewId    = m_pcSlice->getViewId ();
    47364482    const Int iCurrRefViewId = m_pcSlice->getRefPic(eRefPicList, refIdx)->getViewId ();
     
    47504496#endif
    47514497      rcMv = cColMv;
    4752 #if NH_3D_TMVP
     4498#if NH_3D
    47534499    }
    47544500#endif
     
    47574503  {
    47584504    const Int currPOC    = m_pcSlice->getPOC();
     4505#if REDUCED_ENCODER_MEMORY
     4506    const Int colPOC     = pColSlice->getPOC();
     4507    const Int colRefPOC  = pColSlice->getRefPOC(eColRefPicList, iColRefIdx);
     4508#else
    47594509    const Int colPOC     = pColCtu->getSlice()->getPOC();
    47604510    const Int colRefPOC  = pColCtu->getSlice()->getRefPOC(eColRefPicList, iColRefIdx);
     4511#endif
    47614512    const Int currRefPOC = m_pcSlice->getRefPic(eRefPicList, refIdx)->getPOC();
    47624513    const Int scale      = xGetDistScaleFactor(currPOC, currRefPOC, colPOC, colRefPOC);
     
    48114562{
    48124563   Int scaleFactor = (4 / scale ) * AMVP_DECIMATION_FACTOR / m_unitSize;
     4564  if (scaleFactor > 0)
     4565  {
     4566    for(UInt i=0; i<NUM_REF_PIC_LIST_01; i++)
     4567    {
     4568      m_acCUMvField[i].compress(m_pePredMode, scaleFactor);
     4569    }
     4570  }
    48134571#else
    48144572Void TComDataCU::compressMV()
    48154573{
     4574#if REDUCED_ENCODER_MEMORY
     4575  const Int scaleFactor = std::max<Int>(1,4 * AMVP_DECIMATION_FACTOR / m_unitSize);
     4576  TComPicSym &picSym=*(getPic()->getPicSym());
     4577  TComPicSym::DPBPerCtuData &dpbForCtu=picSym.getDPBPerCtuData(getCtuRsAddr());
     4578
     4579  for(UInt i=0; i<NUM_REF_PIC_LIST_01; i++)
     4580  {
     4581    dpbForCtu.m_CUMvField[i].compress(dpbForCtu.m_pePredMode, m_pePredMode, scaleFactor,m_acCUMvField[i]);
     4582    memcpy(dpbForCtu.m_pePartSize, m_pePartSize, sizeof(*m_pePartSize)*m_uiNumPartition);
     4583    dpbForCtu.m_pSlice = getSlice();
     4584  }
     4585#else
    48164586  Int scaleFactor = 4 * AMVP_DECIMATION_FACTOR / m_unitSize;
    4817 #endif
    48184587  if (scaleFactor > 0)
    48194588  {
     
    48234592    }
    48244593  }
     4594#endif
     4595#endif
    48254596}
    48264597#if NH_3D
     
    48674638
    48684639  UInt uiDirMode  = getIntraDir(toChannelType(compID), uiAbsPartIdx);
    4869 #if NH_3D_DMM
     4640#if NH_3D
    48704641  mapDmmToIntraDir( uiDirMode );
    48714642#endif
     
    48764647    const UInt partsPerMinCU = 1<<(2*(sps->getMaxTotalCUDepth() - sps->getLog2DiffMaxMinCodingBlockSize()));
    48774648    uiDirMode = getIntraDir(CHANNEL_TYPE_LUMA, getChromasCorrespondingPULumaIdx(uiAbsPartIdx, getPic()->getChromaFormat(), partsPerMinCU));
    4878 #if NH_3D_DMM
     4649#if NH_3D
    48794650    mapDmmToIntraDir( uiDirMode );
    48804651#endif
     
    49014672  }
    49024673}
     4674
     4675#if MCTS_ENC_CHECK
     4676Bool TComDataCU::isLastColumnCTUInTile() const
     4677{
     4678  UInt      currentTileIdx               = this->getPic()->getPicSym()->getTileIdxMap(this->getCtuRsAddr());
     4679  TComTile *pCurrentTile                 = m_pcPic->getPicSym()->getTComTile(currentTileIdx);
     4680  UInt      frameWidthInCtus             = m_pcPic->getPicSym()->getFrameWidthInCtus();
     4681  UInt      rightEdgeCTUPosInCurrentTile = pCurrentTile->getRightEdgePosInCtus();
     4682  UInt      ctuXPosInCtus                = this->getCtuRsAddr() % frameWidthInCtus;
     4683 
     4684  return (rightEdgeCTUPosInCurrentTile == ctuXPosInCtus);
     4685}
     4686#endif
    49034687
    49044688#if NH_3D_VSO
     
    49104694#endif
    49114695
    4912 #if NH_3D_IV_MERGE
     4696#if NH_3D
    49134697Void TComDataCU::getDispforDepth (UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDisp)
    49144698{
     
    49284712  }
    49294713}
    4930 #endif
    4931 
    4932 #if NH_3D_DIS
     4714
    49334715Bool TComDataCU::getNeighDepth ( UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index )
    49344716{
     
    49884770  return bDepAvail;
    49894771}
    4990 #endif
    4991 #if NH_3D_NBDV
    4992 //Notes from QC:
    4993 //TBD#1: DoNBDV related contributions are just partially integrated under the marco of NH_3D_NBDV_REF, remove this comment once DoNBDV and BVSP are done
    4994 //TBD#2: set of DvMCP values need to be done as part of inter-view motion prediction process. Remove this comment once merge related integration is done
    4995 //To be checked: Parallel Merge features for NBDV, related to DV_DERIVATION_PARALLEL_B0096 and LGE_IVMP_PARALLEL_MERGE_B0136 are not integrated. The need of these features due to the adoption of CU-based NBDV is not clear. We need confirmation on this, especially by proponents
    4996 Void TComDataCU::getDisMvpCandNBDV( DisInfo* pDInfo
    4997 #if NH_3D_NBDV_REF
    4998 , Bool bDepthRefine
    4999 #endif
    5000 )
     4772
     4773Void TComDataCU::getDisMvpCandNBDV( DisInfo* pDInfo, Bool bDepthRefine )
    50014774{
    50024775  //// ******* Init variables ******* /////
     
    50184791    }
    50194792  }
    5020 #if NH_3D_NBDV_REF
     4793
    50214794  if( !m_pcSlice->getDepthRefinementFlag( ) )
    50224795  {
    50234796    bDepthRefine = false;
    50244797  }
    5025 #endif
     4798
    50264799  // Get Positions 
    50274800  PartSize eCUMode    = getPartitionSize( uiPartAddr );   
     
    50684841        pDInfo->m_aVIdxCan  = iTargetViewIdx;
    50694842
    5070 #if NH_3D_NBDV_REF
    50714843        TComPic* picDepth = NULL;   
    5072 #if H_3D_FCO
    5073         picDepth  = getSlice()->getIvPic(true, getSlice()->getViewIndex() );
    5074         if ( picDepth->getPicYuvRec() != NULL  ) 
    5075         {
    5076           cColMv.setZero();
    5077         }
    5078         else // Go back with virtual depth
    5079         {
    5080           picDepth = getSlice()->getIvPic( true, iTargetViewIdx );
    5081         }
    5082 
    5083         assert(picDepth != NULL);
    5084 #else
    50854844        picDepth = getSlice()->getIvPic( true, iTargetViewIdx );
    5086 #endif
    50874845        if (picDepth && bDepthRefine)
    50884846        {
     
    50904848        }
    50914849        pDInfo->m_acDoNBDV  = cColMv;
    5092 #endif //NH_3D_NBDV_REF
    50934850        return;
    50944851      }
     
    51034860    pcTmpCU = getPULeft(uiIdx, uiPartIdxLB);
    51044861  bCheckMcpDv = true;
    5105   if ( xCheckSpatialNBDV( pcTmpCU, uiIdx, pDInfo, bCheckMcpDv, &cIDVInfo, DVFROM_LEFT
    5106 #if NH_3D_NBDV_REF
    5107     , bDepthRefine
    5108 #endif
    5109     ) )
     4862  if ( xCheckSpatialNBDV( pcTmpCU, uiIdx, pDInfo, bCheckMcpDv, &cIDVInfo, DVFROM_LEFT, bDepthRefine ) )
    51104863    return;
    51114864
     
    51154868  {
    51164869    bCheckMcpDv = ( ( getCtuRsAddr() - pcTmpCU->getCtuRsAddr() ) == 0);
    5117     if ( xCheckSpatialNBDV( pcTmpCU, uiIdx, pDInfo, bCheckMcpDv, &cIDVInfo, DVFROM_ABOVE
    5118 #if NH_3D_NBDV_REF
    5119       , bDepthRefine
    5120 #endif
    5121       ) )
     4870    if ( xCheckSpatialNBDV( pcTmpCU, uiIdx, pDInfo, bCheckMcpDv, &cIDVInfo, DVFROM_ABOVE , bDepthRefine ) )
    51224871      return;
    51234872  }
     
    51354884          pDInfo->m_acNBDV = cDispVec;
    51364885          pDInfo->m_aVIdxCan = cIDVInfo.m_aVIdxCan[iList][ curPos ];
    5137 #if NH_3D_NBDV_REF
    5138 #if H_3D_FCO
    5139           TComPic* picDepth  = NULL;
    5140 
    5141           picDepth  = getSlice()->getIvPic(true, getSlice()->getViewIndex() );
    5142           if ( picDepth->getPicYuvRec() != NULL ) 
    5143           {
    5144             cDispVec.setZero();
    5145           }
    5146           else // Go back with virtual depth
    5147           {
    5148             picDepth = getSlice()->getIvPic( true, pDInfo->m_aVIdxCan );
    5149           }
    5150 
    5151           assert(picDepth != NULL);
    5152 #else
    51534886          TComPic* picDepth = getSlice()->getIvPic( true, pDInfo->m_aVIdxCan );
    5154 #endif
    51554887
    51564888          if (picDepth && bDepthRefine)
     
    51594891          }
    51604892          pDInfo->m_acDoNBDV = cDispVec;
    5161 #endif
    51624893          return;
    51634894        }
     
    51734904    pDInfo->m_aVIdxCan = getSlice()->getDefaultRefViewIdx();
    51744905
    5175 #if NH_3D_NBDV_REF
    51764906    TComPic* picDepth = NULL;
    5177 #if H_3D_FCO
    5178     picDepth  = getSlice()->getIvPic(true, getSlice()->getViewIndex() );
    5179     if ( picDepth->getPicYuvRec() != NULL ) 
    5180     {
    5181       defaultDV.setZero();
    5182     }
    5183     else // Go back with virtual depth
    5184     {
    5185       picDepth = getSlice()->getIvPic( true, getSlice()->getDefaultRefViewIdx());
    5186     }
    5187 
    5188     assert(picDepth != NULL);
    5189 #else
    51904907    picDepth = getSlice()->getIvPic( true, getSlice()->getDefaultRefViewIdx());
    5191 #endif
    51924908    if (picDepth && bDepthRefine)
    51934909    {
     
    51954911    }
    51964912    pDInfo->m_acDoNBDV = defaultDV;
    5197 #endif
    5198   }
    5199 }
    5200 
    5201 #if NH_3D_NBDV_REF
     4913  }
     4914}
     4915
    52024916Pel TComDataCU::getMcpFromDM(TComPicYuv* pcBaseViewDepthPicYuv, TComMv* mv, Int iBlkX, Int iBlkY, Int iBlkWidth, Int iBlkHeight, Int* aiShiftLUT )
    52034917{
     
    52414955  }
    52424956}
    5243 #endif //NH_3D_NBDV_REF
    5244 
    5245 
    5246 Bool TComDataCU::xCheckSpatialNBDV( const TComDataCU* pcTmpCU, UInt uiIdx, DisInfo* pNbDvInfo, Bool bSearchForMvpDv, IDVInfo* paIDVInfo, UInt uiMvpDvPos
    5247 #if NH_3D_NBDV_REF
    5248 , Bool bDepthRefine
    5249 #endif
    5250 )
     4957
     4958
     4959
     4960Bool TComDataCU::xCheckSpatialNBDV( const TComDataCU* pcTmpCU, UInt uiIdx, DisInfo* pNbDvInfo, Bool bSearchForMvpDv, IDVInfo* paIDVInfo, UInt uiMvpDvPos, Bool bDepthRefine )
    52514961{
    52524962  if( pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ) )
     
    52664976          pNbDvInfo->m_acNBDV = cMvPred;
    52674977          pNbDvInfo->m_aVIdxCan = refViewIdx;
    5268 #if NH_3D_NBDV_REF
     4978
    52694979          TComPic* picDepth = NULL;
    52704980          assert(getSlice()->getRefPic(eRefPicList, refId)->getPOC() == getSlice()->getPOC());           
    5271 #if H_3D_FCO
    5272           picDepth  = getSlice()->getIvPic(true, getSlice()->getViewIndex() );
    5273           if ( picDepth->getPicYuvRec() != NULL ) 
    5274           {
    5275             cMvPred.setZero();
    5276           }
    5277           else// Go back with virtual depth
    5278           {
    5279             picDepth = getSlice()->getIvPic (true, refViewIdx );
    5280           }
    5281           assert(picDepth != NULL);
    5282 #else
    52834981          picDepth   = getSlice()->getIvPic (true, refViewIdx );
    5284 #endif
    52854982          UInt uiPartIdx = 0;   //Notes from MTK: Please confirm that using 0 as partition index and partition address is correct for CU-level DoNBDV
    52864983          UInt uiPartAddr = 0;  //QC: confirmed
     
    52914988          }
    52924989          pNbDvInfo->m_acDoNBDV = cMvPred;
    5293 #endif
    52944990          return true;
    52954991        }
     
    53555051}
    53565052
    5357 
    53585053Void TComDataCU::setDvInfoSubParts( DisInfo cDvInfo, UInt uiAbsPartIdx, UInt uiDepth )
    53595054{
    5360 #if NH_3D_VSP // bug fix
    53615055  UInt uiCurrPartNumb = m_pcPic->getNumPartitionsInCtu() >> (uiDepth << 1);
    53625056  assert(m_pcPic->getNumPartitionsInCtu() ==m_pcPic->getNumPartInCtuWidth()*m_pcPic->getNumPartInCtuHeight());
    53635057
    5364 #else
    5365   UInt uiCurrPartNumb = m_pcPic->getNumPartInCtuWidth() >> (uiDepth << 1);
    5366 #endif
    53675058  for (UInt ui = 0; ui < uiCurrPartNumb; ui++ )
    53685059  {
     
    53705061  }
    53715062}
    5372 #if NH_3D_VSP  || NH_3D_DBBP
     5063
    53735064Void TComDataCU::setDvInfoSubParts( DisInfo cDvInfo, UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth )
    53745065{
    53755066  setSubPartT<DisInfo>( cDvInfo, m_pDvInfo, uiAbsPartIdx, uiDepth, uiPUIdx );
    53765067}
    5377 #endif
    53785068
    53795069Bool TComDataCU::xGetColDisMV( Int currCandPic, RefPicList eRefPicList, Int refidx, Int uiCUAddr, Int uiPartUnitIdx, TComMv& rcMv , Int & iTargetViewIdx, Int & iStartViewIdx )
     
    54495139  iCurrPosY  += ( ( iHeight - 1 ) >> 1 );
    54505140
    5451   Bool depthRefineFlag = false;
    5452 #if NH_3D_NBDV_REF
    5453   depthRefineFlag = m_pcSlice->getDepthRefinementFlag( );
    5454 #endif // NH_3D_NBDV_REF
     5141  Bool depthRefineFlag = m_pcSlice->getDepthRefinementFlag( );
    54555142
    54565143  TComMv      cDv = depthRefineFlag ? pDInfo->m_acDoNBDV : pDInfo->m_acNBDV;
     
    55065193#endif
    55075194
    5508 #if NH_3D_SPIVMP
     5195#if NH_3D
    55095196Void TComDataCU::getSPPara(Int iPUWidth, Int iPUHeight, Int& iNumSP, Int& iNumSPInOneLine, Int& iSPWidth, Int& iSPHeight)
    55105197{
     
    55555242  }
    55565243}
    5557 #endif
    5558 
    5559 #if NH_3D_IV_MERGE
    5560 Bool
    5561 TComDataCU::getInterViewMergeCands(UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* availableMcDc , Bool bIsDepth           
    5562 #if NH_3D_SPIVMP
    5563 , TComMvField* pcMvFieldSP, UChar* puhInterDirSP
    5564 #endif
    5565 , Bool bICFlag
    5566 )
     5244
     5245Bool TComDataCU::getInterViewMergeCands(UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* availableMcDc , Bool bIsDepth , TComMvField* pcMvFieldSP, UChar* puhInterDirSP, Bool bICFlag )
    55675246{
    55685247  TComSlice*    pcSlice = getSlice (); 
     
    55815260  pcBaseRec->getTopLeftSamplePos( getCtuRsAddr(), getZorderIdxInCtu() + uiPartAddr, iCurrPosX, iCurrPosY );
    55825261
    5583 #if !NH_3D_SPIVMP
    5584   iCurrPosX  += ( iWidth  >> 1 );
    5585   iCurrPosY  += ( iHeight >> 1 );
    5586 #endif
    5587 
    5588   Bool depthRefineFlag = false;
    5589 #if NH_3D_NBDV_REF
    5590   depthRefineFlag = m_pcSlice->getDepthRefinementFlag( );
    5591 #endif // NH_3D_NBDV_REF
     5262  Bool depthRefineFlag =  m_pcSlice->getDepthRefinementFlag( );
    55925263
    55935264  TComMv      cDv = depthRefineFlag ? pDInfo->m_acDoNBDV : pDInfo->m_acNBDV;
     
    55985269
    55995270  Bool abPdmAvailable[8] =  {false, false, false, false, false, false, false, false};
    5600 #if NH_3D_NBDV
     5271
    56015272  for( Int i = 0; i < 8; i++)
    56025273  {
    56035274    pacPdmMv[i].setIDVFlag   (false);
    56045275  }
    5605 #endif
    56065276
    56075277  if(!bICFlag)
    56085278  {
    5609 
    5610 #if NH_3D_SPIVMP
    56115279    ////////////////////////////////
    56125280    //////////sub-PU IvMC///////////
     
    56145282    if(!m_pcSlice->getIsDepth())
    56155283    {
    5616 #if NH_3D_DBBP
    56175284      if (!getDBBPFlag(0))
    5618 #else
    5619       if (1)
    5620 #endif
    56215285      {
    56225286        Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight;
     
    56785342                      abPdmAvailable[ uiCurrRefListId ] = true;
    56795343                      TComMv cMv(cDefaultMvField.getHor(), cDefaultMvField.getVer());
    5680 #if NH_3D_NBDV
    5681 #if NH_3D_IV_MERGE
    56825344                      if( !bIsDepth )
    56835345                      {
    5684 #endif
    56855346                        cMv.setIDVFlag   (true);
    56865347                        cMv.setIDVHor    (cDv.getHor());                 
    56875348                        cMv.setIDVVer    (cDv.getVer()); 
    56885349                        cMv.setIDVVId    (iViewIndex);
    5689 #if NH_3D_IV_MERGE
    56905350                      }
    5691 #endif
    5692 #endif
    56935351                      paiPdmRefIdx  [ uiCurrRefListId ] = iPdmRefIdx;
    56945352                      pacPdmMv      [ uiCurrRefListId ] = cMv;
     
    57785436      iCurrPosY  += ( iHeight >> 1 );
    57795437    }
    5780 #endif
     5438
    57815439
    57825440    ////////////////////////////////
     
    57845442    ////////////////////////////////
    57855443
    5786 #if NH_3D_SPIVMP
    57875444    if(m_pcSlice->getIsDepth())
    57885445    {
     
    57905447      iCurrPosY  += ( iHeight >> 1 );
    57915448    }
    5792 #if NH_3D_DBBP
     5449
    57935450    for(Int iLoopCan = ( (m_pcSlice->getIsDepth() || getDBBPFlag(0)) ? 0 : 1 ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++)
    5794 #else
    5795     for(Int iLoopCan = ( m_pcSlice->getIsDepth() ? 0 : 1 ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++)
    5796 #endif
    5797 #else
    5798     for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++)
    5799 #endif
    58005451    {
    58015452      // iLoopCan == 0 --> IvMC
     
    58395490                    abPdmAvailable[ (uiCurrRefListId + (iLoopCan<<2)) ] = true;
    58405491                    TComMv cMv(cBaseMvField.getHor(), cBaseMvField.getVer());
    5841 #if NH_3D_NBDV
    5842 #if NH_3D_IV_MERGE
    58435492                    if( !bIsDepth )
    58445493                    {
    5845 #endif
    58465494                      cMv.setIDVFlag   (true);
    58475495                      cMv.setIDVHor    (cDv.getHor());                 
    58485496                      cMv.setIDVVer    (cDv.getVer()); 
    58495497                      cMv.setIDVVId    (iViewIndex);
    5850 #if NH_3D_IV_MERGE
    58515498                    }
    5852 #endif
    5853 #endif
    58545499                    paiPdmRefIdx  [ (uiCurrRefListId + (iLoopCan<<2)) ] = iPdmRefIdx;
    58555500                    pacPdmMv      [ (uiCurrRefListId + (iLoopCan<<2)) ] = cMv;
     
    58645509      }
    58655510    }
    5866 #if NH_3D_SPIVMP
    5867 #if NH_3D_DBBP
    58685511    for(Int iLoopCan = ( (m_pcSlice->getIsDepth() || getDBBPFlag(0)) ? 0 : 1 ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++)
    5869 #else
    5870     for(Int iLoopCan = ( m_pcSlice->getIsDepth()  ? 0 : 1 ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++)
    5871 #endif
    5872 #else
    5873     for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++)
    5874 #endif
    58755512    {
    58765513      availableMcDc[(iLoopCan << 1)] = ( abPdmAvailable[(iLoopCan<<2)] ? 1 : 0 ) + ( abPdmAvailable[1 + (iLoopCan<<2)] ? 2 : 0);
     
    58985535            abPdmAvailable[ iRefListId + 2 + (iLoopCan<<2) ] = true;
    58995536            paiPdmRefIdx  [ iRefListId + 2 + (iLoopCan<<2) ] = iPdmRefIdx;
    5900 #if NH_3D_NBDV_REF
    59015537            TComMv cMv = depthRefineFlag ? pDInfo->m_acDoNBDV : pDInfo->m_acNBDV;
    5902 #endif
    59035538            cMv.setHor( cMv.getHor() + ioffsetDV );
    5904 #if NH_3D_IV_MERGE
    59055539            if( bIsDepth )
    59065540            {
    59075541              cMv.setHor((cMv.getHor()+2)>>2);
    59085542            }
    5909 #endif
    59105543            cMv.setVer( 0 );
    59115544            pacPdmMv      [iRefListId + 2 + (iLoopCan<<2)] = cMv;
     
    59225555  return false;
    59235556}
    5924 #endif
    5925 #if NH_3D_ARP
     5557
    59265558Void TComDataCU::setARPWSubParts ( UChar w, UInt uiAbsPartIdx, UInt uiDepth )
    59275559{
    59285560  setSubPart<UChar>( w, m_puhARPW, uiAbsPartIdx, uiDepth, 0 );
    59295561}
    5930 #endif
    5931 
    5932 #if NH_3D_IC
     5562
    59335563Void TComDataCU::setICFlagSubParts( Bool bICFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth )
    59345564{
     
    59835613  return false;
    59845614}
    5985 #endif
    5986 #if NH_3D_DMM
     5615
    59875616Void TComDataCU::setDmm1WedgeTabIdxSubParts( UInt tabIdx, UInt uiAbsPartIdx, UInt uiDepth )
    59885617{
     
    59905619  for( UInt ui = 0; ui < uiCurrPartNumb; ui++ ) { m_dmm1WedgeTabIdx[uiAbsPartIdx+ui] = tabIdx; }
    59915620}
    5992 #endif
    5993 
    5994 #if NH_3D_VSP
     5621
    59955622Void TComDataCU::setMvFieldPUForVSP( TComDataCU* pcCU, UInt partAddr, Int width, Int height, RefPicList eRefPicList, Int iRefIdx, Int &vspSize )
    59965623{
     
    59985625  Int depthRefViewIdx = pcCU->getDvInfo(partAddr).m_aVIdxCan;
    59995626 
    6000 #if H_3D_FCO
    6001   TComPic* pRefPicBaseDepth = 0;
    6002   Bool     bIsCurrDepthCoded = false;
    6003   pRefPicBaseDepth  = pcCU->getSlice()->getIvPic( true, pcCU->getSlice()->getViewIndex() );
    6004   if ( pRefPicBaseDepth->getPicYuvRec() != NULL  )
    6005   {
    6006     bIsCurrDepthCoded = true;
    6007   }
    6008   else
    6009   {
    6010     pRefPicBaseDepth = pcCU->getSlice()->getIvPic (true, depthRefViewIdx );
    6011   }
    6012 #else
    60135627  TComPic* pRefPicBaseDepth = pcCU->getSlice()->getIvPic (true, depthRefViewIdx );
    6014 #endif
    60155628  assert(pRefPicBaseDepth != NULL);
    60165629  TComPicYuv* pcBaseViewDepthPicYuv = pRefPicBaseDepth->getPicYuvRec();
     
    60325645  TComMv cDv  = pcCU->getDvInfo(partAddr).m_acNBDV;
    60335646  pcCU->clipMv(cDv);
    6034 
    6035 #if H_3D_FCO
    6036   if ( bIsCurrDepthCoded )
    6037   {
    6038       cDv.setZero();
    6039   }
    6040 #endif
    60415647
    60425648  // fetch virtual depth map & convert depth to motion vector, which are stored in the motion memory
Note: See TracChangeset for help on using the changeset viewer.