Changeset 1259 in 3DVCSoftware


Ignore:
Timestamp:
23 Jun 2015, 03:55:51 (9 years ago)
Author:
mediatek-htm
Message:

Reactive IVMV by Mediatek

Location:
branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib
Files:
22 edited

Legend:

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

    r1255 r1259  
    131131  m_piVSPFlag            = NULL;
    132132#endif
    133 #if H_3D_SPIVMP
     133#if NH_3D_SPIVMP
    134134  m_pbSPIVMPFlag         = NULL;
    135135#endif
     
    188188    m_piVSPFlag          = (Char*  )xMalloc(Char,   uiNumPartition);
    189189#endif
    190 #if H_3D_SPIVMP
     190#if NH_3D_SPIVMP
    191191    m_pbSPIVMPFlag       = (Bool*  )xMalloc(Bool,   uiNumPartition);
    192192#endif
     
    379379    }
    380380#endif
    381 #if H_3D_SPIVMP
     381#if NH_3D_SPIVMP
    382382    if ( m_pbSPIVMPFlag       ) { xFree(m_pbSPIVMPFlag);           m_pbSPIVMPFlag         = NULL; }
    383383#endif
     
    630630  memset( m_piVSPFlag         , 0,                        m_uiNumPartition * sizeof( *m_piVSPFlag ) );
    631631#endif
    632 #if H_3D_SPIVMP
    633     m_pbSPIVMPFlag[ui] = pcFrom->m_pbSPIVMPFlag[ui];
     632#if NH_3D_SPIVMP
     633  memset( m_pbSPIVMPFlag      , 0,                     m_uiNumPartition * sizeof( *m_pbSPIVMPFlag ) );   
    634634#endif
    635635#if H_3D_DIM_SDC
     
    642642    memset( m_bDISFlag          + firstElement, false,                    numElements * sizeof( *m_bDISFlag ) );
    643643    memset( m_uiDISType         + firstElement,     0,                    numElements * sizeof( *m_uiDISType) );
    644 #endif
    645 #if H_3D_SPIVMP
    646     memset( m_pbSPIVMPFlag      + firstElement, 0,                        numElements * sizeof( *m_pbSPIVMPFlag ) );
    647644#endif
    648645
     
    799796    m_piVSPFlag[ui]     = 0;
    800797#endif
    801 #if H_3D_SPIVMP
    802       m_pbSPIVMPFlag[ui] = 0;
     798#if NH_3D_SPIVMP
     799    m_pbSPIVMPFlag[ui] = 0;
    803800#endif
    804801
     
    900897  memset( m_piVSPFlag,          0, sizeof( Char  ) * m_uiNumPartition );
    901898#endif
    902 #if H_3D_SPIVMP
     899#if NH_3D_SPIVMP
    903900  memset( m_pbSPIVMPFlag,       0, sizeof( Bool  ) * m_uiNumPartition );
    904901#endif
     
    981978    m_pDvInfo[ ui ] = pcCU->m_pDvInfo[uiPartOffset+ui];
    982979#endif
    983 #if H_3D_SPIVMP
    984       m_pbSPIVMPFlag[ui]=pcCU->m_pbSPIVMPFlag[uiPartOffset+ui];
     980#if NH_3D_SPIVMP
     981    m_pbSPIVMPFlag[ui]=pcCU->m_pbSPIVMPFlag[uiPartOffset+ui];
    985982#endif
    986983#if H_3D_ARP
     
    10881085  m_piVSPFlag           = pcCU->getVSPFlag()          + uiPart;
    10891086#endif
    1090 #if H_3D_SPIVMP
     1087#if NH_3D_SPIVMP
    10911088  m_pbSPIVMPFlag        = pcCU->getSPIVMPFlag()          + uiPart;
    10921089#endif
     
    12431240  m_pDvInfo            = pcCU->getDvInfo()                + uiAbsPartIdx;
    12441241#endif
    1245 #if H_3D_SPIVMP
     1242#if NH_3D_SPIVMP
    12461243  m_pbSPIVMPFlag       = pcCU->getSPIVMPFlag()            + uiAbsPartIdx;
    12471244#endif
     
    13011298  memcpy( m_pDvInfo             + uiOffset, pcCU->getDvInfo(),            sizeof( *m_pDvInfo ) * uiNumPartition );
    13021299#endif
    1303 #if H_3D_SPIVMP
     1300#if NH_3D_SPIVMP
    13041301  memcpy( m_pbSPIVMPFlag        + uiOffset, pcCU->getSPIVMPFlag(),        sizeof( Bool ) * uiNumPartition );
    13051302#endif
     
    14271424  memcpy( pCtu->getVSPFlag()           + m_absZIdxInCtu, m_piVSPFlag,           sizeof( Char ) * m_uiNumPartition );
    14281425#endif
    1429 #if H_3D_SPIVMP
    1430   memcpy( rpcCU->getSPIVMPFlag()        + m_uiAbsIdxInLCU, m_pbSPIVMPFlag,        sizeof( Bool ) * m_uiNumPartition );
     1426#if NH_3D_SPIVMP
     1427  memcpy( pCtu->getSPIVMPFlag()        + m_absZIdxInCtu, m_pbSPIVMPFlag,        sizeof( Bool ) * m_uiNumPartition );
    14311428#endif
    14321429
     
    24942491}
    24952492
    2496 #if H_3D_SPIVMP
     2493#if NH_3D_SPIVMP
    24972494Void TComDataCU::setSPIVMPFlagSubParts( Bool bSPIVMPFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth )
    24982495{
     
    31233120  dirVSP = (predFlag[0] | (predFlag[1] << 1));
    31243121  m_mergCands[MRG_VSP].setCand( mvVSP, dirVSP, true
    3125 #if H_3D_SPIVMP
     3122#if NH_3D_SPIVMP
    31263123    , false
    31273124#endif
     
    31383135#endif
    31393136
    3140 #if H_3D_IV_MERGE
     3137#if NH_3D_IV_MERGE
    31413138inline Bool TComDataCU::xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Int* ivCandDir, TComMv* ivCandMv, Int* ivCandRefIdx )
    31423139{
     
    32023199  , Int* vspFlag
    32033200#endif
    3204 #if H_3D_SPIVMP
     3201#if NH_3D_SPIVMP
    32053202  , Bool* pbSPIVMPFlag
    32063203#endif
     
    32383235        , vspFlag
    32393236#endif
    3240 #if H_3D_SPIVMP
     3237#if NH_3D_SPIVMP
    32413238        , pbSPIVMPFlag
    32423239#endif
     
    32923289 */
    32933290Void TComDataCU::xGetInterMergeCandidates( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours
    3294 #if H_3D_SPIVMP
     3291#if NH_3D_SPIVMP
    32953292      , TComMvField* pcMvFieldSP, UChar* puhInterDirSP
    32963293#endif
     
    32983295)
    32993296{
    3300 #if H_3D_IV_MERGE
     3297#if NH_3D_IV_MERGE
    33013298  TComMv cZeroMv;
    33023299#endif
     
    33073304  //////// GET DISPARITIES  ////////
    33083305  //////////////////////////////////
    3309 #if H_3D_IV_MERGE
     3306#if NH_3D_IV_MERGE
    33103307  DisInfo cDisInfo = getDvInfo(uiAbsPartIdx);
    33113308  m_cDefaultDisInfo = cDisInfo;
     
    33353332  Bool bIsDepth = getSlice()->getIsDepth();
    33363333#endif
     3334#if NH_3D_IV_MERGE
     3335  Bool bIsDepth = getSlice()->getIsDepth();
     3336#endif
    33373337
    33383338#if H_3D_IC
     
    33843384      )
    33853385#endif
    3386 #if H_3D_SPIVMP
     3386#if NH_3D_SPIVMP
    33873387      , false
    33883388#endif
     
    33983398    , false
    33993399#endif
    3400 #if H_3D_SPIVMP
     3400#if NH_3D_SPIVMP
    34013401      , false
    34023402#endif
     
    34123412    , false
    34133413#endif
    3414 #if H_3D_SPIVMP
     3414#if NH_3D_SPIVMP
    34153415      , false
    34163416#endif
     
    34263426    , false
    34273427#endif
    3428 #if H_3D_SPIVMP
     3428#if NH_3D_SPIVMP
    34293429      , false
    34303430#endif
     
    34403440    , false
    34413441#endif
    3442 #if H_3D_SPIVMP
     3442#if NH_3D_SPIVMP
    34433443      , false
    34443444#endif
     
    36213621    }
    36223622  }
     3623#endif
     3624
     3625#if NH_3D_IV_MERGE
    36233626  /////////////////////////////////////////////////////////////////
    36243627  //////// DERIVE IvMC, IvMCShift,IvDCShift, IvDC  Candidates /////
     
    36383641  if ( ivMvPredFlag && cDisInfo.m_aVIdxCan!=-1)
    36393642  {
     3643#if H_3D_IC
    36403644    getInterViewMergeCands(uiPUIdx, ivCandRefIdx, ivCandMv, &cDisInfo, ivCandDir , bIsDepth, pcMvFieldSP, puhInterDirSP, bICFlag );
     3645#else
     3646    getInterViewMergeCands(uiPUIdx, ivCandRefIdx, ivCandMv, &cDisInfo, ivCandDir , bIsDepth, pcMvFieldSP, puhInterDirSP, false );
     3647#endif
    36413648  } 
    36423649
     
    37523759  iCount += m_mergCands[MRG_B0].m_bAvailable;
    37533760
    3754 #if H_3D_IV_MERGE
     3761#if NH_3D_IV_MERGE
    37553762  /////////////////////////////////////////////
    37563763  //////// INTER VIEW DISP COMP (IvDC) ////////
     
    38073814  iCount += m_mergCands[MRG_A0].m_bAvailable + m_mergCands[MRG_B2].m_bAvailable;
    38083815
    3809 #if H_3D_IV_MERGE
     3816#if NH_3D_IV_MERGE
    38103817  ////////////////////////////////////////////////////
    38113818  //////// SHIFTED IV (IvMCShift + IvDCShift) ////////
     
    50185025#endif
    50195026
    5020 #if H_3D_IV_MERGE
     5027#if NH_3D_IV_MERGE
    50215028Void TComDataCU::getDispforDepth (UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDisp)
    50225029{
     
    50285035    Int iViewIdx = getSlice()->getDefaultRefViewIdx();
    50295036    pDisp->m_aVIdxCan = iViewIdx;
    5030     Int iDisp     = getSlice()->getDepthToDisparityB( iViewIdx )[ (Int64) (1 << ( getSlice()->getSPS()->getBitDepthY() - 1 )) ];
     5037    Int iDisp     = getSlice()->getDepthToDisparityB( iViewIdx )[ (Int64) (1 << ( getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) - 1 )) ];
    50315038
    50325039    cMv.setHor(iDisp);
     
    56075614#endif
    56085615
    5609 #if H_3D_SPIVMP
     5616#if NH_3D_SPIVMP
    56105617Void TComDataCU::getSPPara(Int iPUWidth, Int iPUHeight, Int& iNumSP, Int& iNumSPInOneLine, Int& iSPWidth, Int& iSPHeight)
    56115618{
     
    56245631Void TComDataCU::getSPAbsPartIdx(UInt uiBaseAbsPartIdx, Int iWidth, Int iHeight, Int iPartIdx, Int iNumPartLine, UInt& ruiPartAddr )
    56255632{
    5626   uiBaseAbsPartIdx += m_uiAbsIdxInLCU;
     5633  uiBaseAbsPartIdx += m_absZIdxInCtu;
    56275634  Int iBasePelX = g_auiRasterToPelX[g_auiZscanToRaster[uiBaseAbsPartIdx]];
    56285635  Int iBasePelY = g_auiRasterToPelY[g_auiZscanToRaster[uiBaseAbsPartIdx]];
    56295636  Int iCurrPelX = iBasePelX + iPartIdx%iNumPartLine * iWidth;
    56305637  Int iCurrPelY = iBasePelY + iPartIdx/iNumPartLine * iHeight;
    5631   Int iCurrRaster = iCurrPelY / getPic()->getMinCUHeight() * getPic()->getNumPartInWidth() + iCurrPelX/getPic()->getMinCUWidth();
     5638  Int iCurrRaster = iCurrPelY / getPic()->getMinCUHeight() * getPic()->getNumPartInCtuWidth() + iCurrPelX/getPic()->getMinCUWidth();
    56325639  ruiPartAddr = g_auiRasterToZscan[iCurrRaster];
    5633   ruiPartAddr -= m_uiAbsIdxInLCU
     5640  ruiPartAddr -= m_absZIdxInCtu
    56345641}
    56355642
    56365643Void TComDataCU::setInterDirSP( UInt uiDir, UInt uiAbsPartIdx, Int iWidth, Int iHeight )
    56375644{
    5638   uiAbsPartIdx += getZorderIdxInCU();
     5645  uiAbsPartIdx += getZorderIdxInCtu();
    56395646  Int iStartPelX = g_auiRasterToPelX[g_auiZscanToRaster[uiAbsPartIdx]];
    56405647  Int iStartPelY = g_auiRasterToPelY[g_auiZscanToRaster[uiAbsPartIdx]];
     
    56485655    for (Int j=iStartPelX; j < iEndPelX; j += getPic()->getMinCUWidth())
    56495656    {
    5650       iCurrRaster = i / getPic()->getMinCUHeight() * getPic()->getNumPartInWidth() + j/getPic()->getMinCUWidth();
     5657      iCurrRaster = i / getPic()->getMinCUHeight() * getPic()->getNumPartInCtuWidth() + j/getPic()->getMinCUWidth();
    56515658      uiPartAddr = g_auiRasterToZscan[iCurrRaster];
    5652       uiPartAddr -= getZorderIdxInCU(); 
     5659      uiPartAddr -= getZorderIdxInCtu(); 
    56535660
    56545661      m_puhInterDir[uiPartAddr] = uiDir;
     
    56585665#endif
    56595666
    5660 #if H_3D_IV_MERGE
     5667#if NH_3D_IV_MERGE
    56615668Bool
    56625669TComDataCU::getInterViewMergeCands(UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* availableMcDc , Bool bIsDepth           
    5663 #if H_3D_SPIVMP
     5670#if NH_3D_SPIVMP
    56645671, TComMvField* pcMvFieldSP, UChar* puhInterDirSP
    56655672#endif
     
    56805687
    56815688  Int  iCurrPosX, iCurrPosY;
    5682   pcBaseRec->getTopLeftSamplePos( getAddr(), getZorderIdxInCU() + uiPartAddr, iCurrPosX, iCurrPosY );
    5683 
    5684 #if !H_3D_SPIVMP
     5689  pcBaseRec->getTopLeftSamplePos( getCtuRsAddr(), getZorderIdxInCtu() + uiPartAddr, iCurrPosX, iCurrPosY );
     5690
     5691#if !NH_3D_SPIVMP
    56855692  iCurrPosX  += ( iWidth  >> 1 );
    56865693  iCurrPosY  += ( iHeight >> 1 );
     
    57095716  {
    57105717
    5711 #if H_3D_SPIVMP
     5718#if NH_3D_SPIVMP
    57125719    ////////////////////////////////
    57135720    //////////sub-PU IvMC///////////
     
    57155722    if(!m_pcSlice->getIsDepth())
    57165723    {
     5724#if H_3D_DBBP
    57175725      if (!getDBBPFlag(0))
     5726#else
     5727      if (1)
     5728#endif
    57185729      {
    57195730        Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight;
     
    57475758        }
    57485759
    5749         Int iRefCenterPosX   = Clip3( 0, pcBaseRec->getWidth () - 1, iCenterPosX + ( (cDv.getHor() + 2 ) >> 2 ) );
    5750         Int iRefCenterPosY   = Clip3( 0, pcBaseRec->getHeight() - 1, iCenterPosY + ( (cDv.getVer() + 2 ) >> 2 ) );
     5760        Int iRefCenterPosX   = Clip3( 0, pcBaseRec->getWidth (COMPONENT_Y) - 1, iCenterPosX + ( (cDv.getHor() + 2 ) >> 2 ) );
     5761        Int iRefCenterPosY   = Clip3( 0, pcBaseRec->getHeight(COMPONENT_Y) - 1, iCenterPosY + ( (cDv.getVer() + 2 ) >> 2 ) );
    57515762
    57525763        pcBaseRec->getCUAddrAndPartIdx( iRefCenterPosX , iRefCenterPosY , iRefCenterCUAddr, iRefCenterAbsPartIdx );
    5753         TComDataCU* pcDefaultCU    = pcBasePic->getCU( iRefCenterCUAddr );
     5764        TComDataCU* pcDefaultCU    = pcBasePic->getCtu( iRefCenterCUAddr );
    57545765        if(!( pcDefaultCU->getPredictionMode( iRefCenterAbsPartIdx ) == MODE_INTRA ))
    57555766        {
     
    57765787                      TComMv cMv(cDefaultMvField.getHor(), cDefaultMvField.getVer());
    57775788#if NH_3D_NBDV
    5778 #if H_3D_IV_MERGE
     5789#if NH_3D_IV_MERGE
    57795790                      if( !bIsDepth )
    57805791                      {
     
    57845795                        cMv.setIDVVer    (cDv.getVer()); 
    57855796                        cMv.setIDVVId    (iViewIndex);
    5786 #if H_3D_IV_MERGE
     5797#if NH_3D_IV_MERGE
    57875798                      }
    57885799#endif
     
    58095820            for (Int j = iCurrPosX; j < iCurrPosX + iWidth; j += iSPWidth)
    58105821            {
    5811               iBasePosX   = Clip3( 0, pcBaseRec->getWidth () - 1, j + iDelX + ( (cDv.getHor() + 2 ) >> 2 ));
    5812               iBasePosY   = Clip3( 0, pcBaseRec->getHeight() - 1, i + iDelY + ( (cDv.getVer() + 2 ) >> 2 ));
     5822              iBasePosX   = Clip3( 0, pcBaseRec->getWidth (COMPONENT_Y) - 1, j + iDelX + ( (cDv.getHor() + 2 ) >> 2 ));
     5823              iBasePosY   = Clip3( 0, pcBaseRec->getHeight(COMPONENT_Y) - 1, i + iDelY + ( (cDv.getVer() + 2 ) >> 2 ));
    58135824
    58145825              pcBaseRec->getCUAddrAndPartIdx( iBasePosX , iBasePosY, iBaseCUAddr, iBaseAbsPartIdx );
    5815               pcBaseCU    = pcBasePic->getCU( iBaseCUAddr );
     5826              pcBaseCU    = pcBasePic->getCtu( iBaseCUAddr );
    58165827              if(!( pcBaseCU->getPredictionMode( iBaseAbsPartIdx ) == MODE_INTRA ))
    58175828              {
     
    58815892    ////////////////////////////////
    58825893
    5883 #if H_3D_SPIVMP
     5894#if NH_3D_SPIVMP
    58845895    if(m_pcSlice->getIsDepth())
    58855896    {
     
    58875898      iCurrPosY  += ( iHeight >> 1 );
    58885899    }
     5900#if H_3D_DBBP
    58895901    for(Int iLoopCan = ( (m_pcSlice->getIsDepth() || getDBBPFlag(0)) ? 0 : 1 ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++)
    58905902#else
     5903    for(Int iLoopCan = ( m_pcSlice->getIsDepth() ? 0 : 1 ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++)
     5904#endif
     5905#else
    58915906    for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++)
    58925907#endif
     
    58985913      Int         iBaseAbsPartIdx;
    58995914
    5900       Int offsetW = (iLoopCan == 0) ? 0 : ( iWidth  * 2 );
    5901       Int offsetH = (iLoopCan == 0) ? 0 : ( iHeight * 2 );
    5902 
    5903       Int         iBasePosX   = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + ( (cDv.getHor() + offsetW + 2 ) >> 2 ) );
    5904       Int         iBasePosY   = Clip3( 0, pcBaseRec->getHeight() - 1, iCurrPosY + ( (cDv.getVer() + offsetH + 2 ) >> 2 ) );
     5915      Int offsetW = (iLoopCan == 0) ? 0 : ( iWidth  * 2);
     5916      Int offsetH = (iLoopCan == 0) ? 0 : ( iHeight * 2);
     5917
     5918      Int         iBasePosX   = Clip3( 0, pcBaseRec->getWidth (COMPONENT_Y) - 1, iCurrPosX + ( (cDv.getHor() + offsetW + 2 ) >> 2 ) );
     5919      Int         iBasePosY   = Clip3( 0, pcBaseRec->getHeight(COMPONENT_Y) - 1, iCurrPosY + ( (cDv.getVer() + offsetH + 2 ) >> 2 ) );
    59055920      pcBaseRec->getCUAddrAndPartIdx( iBasePosX , iBasePosY , iBaseCUAddr, iBaseAbsPartIdx );
    59065921
    5907       TComDataCU* pcBaseCU    = pcBasePic->getCU( iBaseCUAddr );
     5922      TComDataCU* pcBaseCU    = pcBasePic->getCtu( iBaseCUAddr );
    59085923      if(!( pcBaseCU->getPredictionMode( iBaseAbsPartIdx ) == MODE_INTRA ))
    59095924      {
     
    59335948                    TComMv cMv(cBaseMvField.getHor(), cBaseMvField.getVer());
    59345949#if NH_3D_NBDV
    5935 #if H_3D_IV_MERGE
     5950#if NH_3D_IV_MERGE
    59365951                    if( !bIsDepth )
    59375952                    {
     
    59415956                      cMv.setIDVVer    (cDv.getVer()); 
    59425957                      cMv.setIDVVId    (iViewIndex);
    5943 #if H_3D_IV_MERGE
     5958#if NH_3D_IV_MERGE
    59445959                    }
    59455960#endif
     
    59575972      }
    59585973    }
    5959 #if H_3D_SPIVMP
     5974#if NH_3D_SPIVMP
     5975#if H_3D_DBBP
    59605976    for(Int iLoopCan = ( (m_pcSlice->getIsDepth() || getDBBPFlag(0)) ? 0 : 1 ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++)
     5977#else
     5978    for(Int iLoopCan = ( m_pcSlice->getIsDepth()  ? 0 : 1 ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++)
     5979#endif
    59615980#else
    59625981    for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++)
     
    59916010#endif
    59926011            cMv.setHor( cMv.getHor() + ioffsetDV );
    5993 #if H_3D_IV_MERGE
     6012#if NH_3D_IV_MERGE
    59946013            if( bIsDepth )
    59956014            {
  • branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibCommon/TComDataCU.h

    r1255 r1259  
    173173  Char*         m_piVSPFlag;          ///< array of VSP flags to indicate whehter a block uses VSP or not  ///< 0: non-VSP; 1: VSP
    174174#endif
    175 #if H_3D_SPIVMP
     175#if NH_3D_SPIVMP
    176176  Bool*         m_pbSPIVMPFlag;       ///< array of sub-PU IVMP flags to indicate whehter a block uses sub-PU IVMP ///< 0: non-SPIVMP; 1: SPIVMP
    177177#endif
     
    236236  Bool          xAddVspCand( Int mrgCandIdx, DisInfo* pDInfo, Int& iCount);
    237237#endif
    238 #if H_3D_IV_MERGE
     238#if NH_3D_IV_MERGE
    239239  Bool          xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Int*   ivCandDir, TComMv* ivCandMv, Int* ivCandRefIdx );
    240240#endif
     
    499499   );
    500500   
     501#if NH_3D_IV_MERGE
     502  Void          getDispforDepth  ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* cDisp);
     503#endif
     504
    501505#if H_3D
    502506  Void          getDispforDepth  ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* cDisp);
     
    513517  Void          getIVNStatus       ( UInt uiPartIdx,  DisInfo* pDInfo, Bool& bIVFMerge,  Int& iIVFMaxD);
    514518#endif
    515 #if H_3D_SPIVMP
     519#if NH_3D_SPIVMP
    516520  Void          getSPPara(Int iPUWidth, Int iPUHeight, Int& iNumSP, Int& iNumSPInOneLine, Int& iSPWidth, Int& iSPHeight);
    517521  Void          getSPAbsPartIdx(UInt uiBaseAbsPartIdx, Int iWidth, Int iHeight, Int iPartIdx, Int iNumPartLine, UInt& ruiPartAddr );
    518522  Void          setInterDirSP( UInt uiDir, UInt uiAbsPartIdx, Int iWidth, Int iHeight );
    519523#endif
    520 #if H_3D_IV_MERGE
     524#if NH_3D_IV_MERGE
    521525  Bool          getInterViewMergeCands          ( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* availableMcDc, Bool bIsDepth           
    522526
    523 #if H_3D_SPIVMP
     527#if NH_3D_SPIVMP
    524528    , TComMvField* pcMFieldSP, UChar* puhInterDirSP
    525529#endif   
     
    665669    , Int* vspFlag
    666670#endif
    667 #if H_3D_SPIVMP
     671#if NH_3D_SPIVMP
    668672    , Bool* pbSPIVMPFlag
    669673#endif
     
    671675    );
    672676  Void          xGetInterMergeCandidates      ( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours
    673 #if H_3D_SPIVMP
     677#if NH_3D_SPIVMP
    674678  , TComMvField* pcMvFieldSP, UChar* puhInterDirSP
    675679#endif
     
    679683
    680684#if NH_3D_VSP
    681 #if H_3D_SPIVMP
     685#if NH_3D_SPIVMP
    682686  Bool*         getSPIVMPFlag        ()                        { return m_pbSPIVMPFlag;          }
    683687  Bool          getSPIVMPFlag        ( UInt uiIdx )            { return m_pbSPIVMPFlag[uiIdx];   }
  • branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibCommon/TComMotionInfo.cpp

    r1200 r1259  
    4040#include "assert.h"
    4141#include <stdlib.h>
    42 #if H_3D_SPIVMP
     42#if NH_3D_SPIVMP
    4343#include "TComDataCU.h"
    4444#include "TComPic.h"
     
    328328}
    329329
    330 #if H_3D_SPIVMP
     330#if NH_3D_SPIVMP
    331331Void TComCUMvField::setMvFieldSP( TComDataCU* pcCU, UInt uiAbsPartIdx, TComMvField cMvField, Int iWidth, Int iHeight  )
    332332{
    333   uiAbsPartIdx += pcCU->getZorderIdxInCU();
     333  uiAbsPartIdx += pcCU->getZorderIdxInCtu();
    334334  Int iStartPelX = g_auiRasterToPelX[g_auiZscanToRaster[uiAbsPartIdx]];
    335335  Int iStartPelY = g_auiRasterToPelY[g_auiZscanToRaster[uiAbsPartIdx]];
     
    341341    for (Int j=iStartPelX; j < iEndPelX; j += pcCU->getPic()->getMinCUWidth())
    342342    {
    343       Int iCurrRaster = i / pcCU->getPic()->getMinCUHeight() * pcCU->getPic()->getNumPartInWidth() + j/pcCU->getPic()->getMinCUWidth();
     343      Int iCurrRaster = i / pcCU->getPic()->getMinCUHeight() * pcCU->getPic()->getNumPartInCtuWidth() + j/pcCU->getPic()->getMinCUWidth();
    344344      Int uiPartAddr = g_auiRasterToZscan[iCurrRaster];
    345       uiPartAddr -= pcCU->getZorderIdxInCU(); 
     345      uiPartAddr -= pcCU->getZorderIdxInCtu(); 
    346346
    347347      m_pcMv[uiPartAddr] = cMvField.getMv();
  • branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibCommon/TComMotionInfo.h

    r1255 r1259  
    5050// ====================================================================================================================
    5151
    52 #if H_3D_SPIVMP
     52#if NH_3D_SPIVMP
    5353class TComDataCU;
    5454#endif
     
    107107  Int getHor   () const { return  m_acMv.getHor(); }
    108108  Int getVer   () const { return  m_acMv.getVer(); }
    109 #if H_3D_IV_MERGE
     109#if NH_3D_IV_MERGE
    110110  Bool operator== ( const TComMvField& rcMv ) const
    111111  {
     
    167167  Void    setAllRefIdx ( Int iRefIdx,                 PartSize eMbMode, Int iPartAddr, UInt uiDepth, Int iPartIdx=0 );
    168168  Void    setAllMvField( TComMvField const & mvField, PartSize eMbMode, Int iPartAddr, UInt uiDepth, Int iPartIdx=0 );
    169 #if H_3D_SPIVMP
     169#if NH_3D_SPIVMP
    170170  Void    setMvFieldSP ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComMvField cMvField, Int iWidth, Int iHeight  );
    171171#endif
     
    203203  Int                   m_iVspFlag;
    204204#endif
    205 #if H_3D_SPIVMP
     205#if NH_3D_SPIVMP
    206206  Bool                  m_bSPIVMPFlag;
    207207#endif
     
    215215    m_iVspFlag = 0;
    216216#endif
    217 #if H_3D_SPIVMP
     217#if NH_3D_SPIVMP
    218218    m_bSPIVMPFlag = false;
    219219#endif
     
    234234    m_iVspFlag = 0;
    235235#endif
    236 #if H_3D_SPIVMP
     236#if NH_3D_SPIVMP
    237237    m_bSPIVMPFlag = false;
    238238#endif
     
    245245    , Int vspFlag
    246246#endif
    247 #if H_3D_SPIVMP
     247#if NH_3D_SPIVMP
    248248    , Bool bSPIVMPFlag
    249249#endif
     
    257257    m_iVspFlag = vspFlag;
    258258#endif
    259 #if H_3D_SPIVMP
     259#if NH_3D_SPIVMP
    260260    m_bSPIVMPFlag = bSPIVMPFlag;
    261261#endif
     
    266266    , Int* vspFlag
    267267#endif
    268 #if H_3D_SPIVMP
     268#if NH_3D_SPIVMP
    269269    , Bool* pbSPIVMPFlag
    270270#endif
     
    277277    vspFlag[iCount] = m_iVspFlag;
    278278#endif
    279 #if H_3D_SPIVMP
     279#if NH_3D_SPIVMP
    280280    pbSPIVMPFlag[iCount] = m_bSPIVMPFlag;
    281281#endif
  • branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibCommon/TComPicYuv.cpp

    r1200 r1259  
    9191  m_iPicHeight        = iPicHeight;
    9292
    93 #if H_3D_IV_MERGE
     93#if NH_3D_IV_MERGE
     94  m_iCuWidth        = uiMaxCUWidth;
     95  m_iCuHeight       = uiMaxCUHeight;
     96
    9497  m_iNumCuInWidth   = m_iPicWidth / m_iCuWidth;
    9598  m_iNumCuInWidth  += ( m_iPicWidth % m_iCuWidth ) ? 1 : 0;
     
    292295  fclose(pFile);
    293296}
    294 #if H_3D
    295 #if H_3D_IV_MERGE
     297#if NH_3D_IV_MERGE
    296298Void
    297299TComPicYuv::getTopLeftSamplePos( Int iCuAddr, Int iAbsZorderIdx, Int& riX, Int& riY )
     
    320322}
    321323#endif
     324
     325#if H_3D
    322326Void TComPicYuv::setLumaTo( Pel pVal )
    323327{
  • branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibCommon/TComPicYuv.h

    r1200 r1259  
    8080
    8181  Bool  m_bIsBorderExtended;
    82 #if H_3D_IV_MERGE
     82#if NH_3D_IV_MERGE
    8383  Int   m_iBaseUnitWidth;       ///< Width of Base Unit (with maximum depth or minimum size, m_iCuWidth >> Max. Depth)
    8484  Int   m_iBaseUnitHeight;      ///< Height of Base Unit (with maximum depth or minimum size, m_iCuHeight >> Max. Depth)
    8585  Int   m_iNumCuInWidth;
     86  Int   m_iCuWidth;             ///< Width of Coding Unit (CU)
     87  Int   m_iCuHeight;            ///< Height of Coding Unit (CU)
    8688#endif
    8789
     
    168170  Void  setLumaTo    ( Pel pVal ); 
    169171  Void  setChromaTo  ( Pel pVal ); 
    170 #if H_3D_IV_MERGE
     172#if NH_3D_IV_MERGE
    171173  // sample to block and block to sample conversion
    172174  Void  getTopLeftSamplePos( Int iCuAddr, Int iAbsZorderIdx, Int& riX, Int& riY );
  • branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibCommon/TComPrediction.cpp

    r1255 r1259  
    661661}
    662662
    663 #if H_3D_SPIVMP
     663#if NH_3D_SPIVMP
    664664Void TComPrediction::xGetSubPUAddrAndMerge(TComDataCU* pcCU, UInt uiPartAddr, Int iSPWidth, Int iSPHeight, Int iNumSPInOneLine, Int iNumSP, UInt* uiMergedSPW, UInt* uiMergedSPH, UInt* uiSPAddr )
    665665{
     
    670670    pcCU->getSPAbsPartIdx(uiPartAddr, iSPWidth, iSPHeight, i, iNumSPInOneLine, uiSPAddr[i]);
    671671  }
     672#if H_3D_ARP
    672673  if( pcCU->getARPW( uiPartAddr ) != 0 )
    673674  {
    674675    return;
    675676  }
     677#endif
    676678
    677679  // horizontal sub-PU merge
     
    12091211    {
    12101212#endif
    1211     if ( eRefPicList != REF_PIC_LIST_X )
    1212     {
    1213       if( pcCU->getSlice()->getPPS()->getUseWP())
    1214       {
    1215         xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, true );
     1213      if ( eRefPicList != REF_PIC_LIST_X )
     1214      {
     1215        if( pcCU->getSlice()->getPPS()->getUseWP())
     1216        {
     1217          xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, true );
     1218        }
     1219        else
     1220        {
     1221          xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred );
     1222        }
     1223        if ( pcCU->getSlice()->getPPS()->getUseWP() )
     1224        {
     1225          xWeightedPredictionUni( pcCU, pcYuvPred, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred );
     1226        }
    12161227      }
    12171228      else
    12181229      {
    1219         xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred );
    1220       }
    1221       if ( pcCU->getSlice()->getPPS()->getUseWP() )
    1222       {
    1223         xWeightedPredictionUni( pcCU, pcYuvPred, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred );
    1224       }
    1225     }
    1226     else
    1227     {
    1228 #if H_3D_SPIVMP
     1230#if NH_3D_SPIVMP
    12291231        if ( pcCU->getSPIVMPFlag(uiPartAddr)!=0) 
    12301232        {
     
    12581260        {
    12591261#endif
    1260       if ( xCheckIdenticalMotion( pcCU, uiPartAddr ) )
    1261       {
    1262         xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred );
    1263       }
    1264       else
    1265       {
    1266         xPredInterBi  (pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred );
    1267       }
    1268 #if H_3D_SPIVMP
    1269         }
    1270 #endif
    1271     }
     1262          if ( xCheckIdenticalMotion( pcCU, uiPartAddr ) )
     1263          {
     1264            xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred );
     1265          }
     1266          else
     1267          {
     1268            xPredInterBi  (pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred );
     1269          }
     1270#if NH_3D_SPIVMP
     1271        }
     1272#endif
     1273      }
    12721274#if NH_3D_VSP
    12731275    }
     
    13121314    else
    13131315    {
    1314 #if H_3D_SPIVMP
    1315        if (pcCU->getSPIVMPFlag(uiPartAddr)!=0) 
     1316#if NH_3D_SPIVMP
     1317      if (pcCU->getSPIVMPFlag(uiPartAddr)!=0) 
    13161318      {
    13171319        Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight;
     
    13431345      {
    13441346#endif
    1345       if ( xCheckIdenticalMotion( pcCU, uiPartAddr ) )
    1346       {
    1347         xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred );
    1348       }
    1349       else
    1350       {
    1351         xPredInterBi  (pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred );
    1352       }
    1353 #if H_3D_SPIVMP
    1354        }
     1347        if ( xCheckIdenticalMotion( pcCU, uiPartAddr ) )
     1348        {
     1349          xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred );
     1350        }
     1351        else
     1352        {
     1353          xPredInterBi  (pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred );
     1354        }
     1355#if NH_3D_SPIVMP
     1356      }
    13551357#endif
    13561358    }
  • branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibCommon/TComPrediction.h

    r1255 r1259  
    140140  Void xDCPredFiltering( const Pel* pSrc, Int iSrcStride, Pel* pDst, Int iDstStride, Int iWidth, Int iHeight, ChannelType channelType );
    141141  Bool xCheckIdenticalMotion    ( TComDataCU* pcCU, UInt PartAddr);
    142 #if H_3D_SPIVMP
     142#if NH_3D_SPIVMP
    143143  Bool xCheckTwoSPMotion ( TComDataCU* pcCU, UInt PartAddr0, UInt PartAddr1 );
    144144  Void xGetSubPUAddrAndMerge(TComDataCU* pcCU, UInt uiPartAddr, Int iSPWidth, Int iSPHeight, Int iNumSPInOneLine, Int iNumSP, UInt* uiMergedSPW, UInt* uiMergedSPH, UInt* uiSPAddr );
  • branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibCommon/TComSlice.cpp

    r1217 r1259  
    278278    m_iSliceChromaQpDelta[component] = 0;
    279279  }
    280 #if H_3D_IV_MERGE
     280#if NH_3D_IV_MERGE
    281281  m_maxNumMergeCand = MRG_MAX_NUM_CANDS_MEM;
    282282#else
     
    38543854#endif 
    38553855
    3856 #if H_3D_IV_MERGE
     3856#if NH_3D_IV_MERGE
    38573857  setupLUT = setupLUT || ( getIvMvPredFlag() && getIsDepth() );
    38583858#endif
  • branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibCommon/TComSlice.h

    r1210 r1259  
    27092709#if H_3D                                                                                                                                             
    27102710  TComPic*                    getTexturePic       ()                                 { return  m_ivPicsCurrPoc[0][ m_viewIndex ];                    }
    2711 #endif                                                                                                                                               
     2711#endif                           
     2712#if NH_3D_IV_MERGE
     2713  TComPic*                    getTexturePic       ()                                 { return  m_ivPicsCurrPoc[0][ m_viewIndex ];                    }
     2714#endif
    27122715#if H_3D_IC                                                                                                                                         
    27132716  Void                        setApplyIC( Bool b )                                   { m_bApplyIC = b;                                               }
  • branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibCommon/TypeDef.h

    r1255 r1259  
    7373#define NH_3D_MLC                         1
    7474#define NH_3D_VSP                         1
     75#define NH_3D_IV_MERGE                    1
     76#define NH_3D_SPIVMP                      1
    7577#endif
    7678
  • branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r1200 r1259  
    28052805    {
    28062806      READ_UVLC( uiCode, "five_minus_max_num_merge_cand");
    2807 #if H_3D_IV_MERGE
     2807#if NH_3D_IV_MERGE
    28082808      pcSlice->setMaxNumMergeCand(( ( pcSlice->getMpiFlag() || pcSlice->getIvMvPredFlag() || pcSlice->getViewSynthesisPredFlag() ) ? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS) - uiCode);
    28092809#else
  • branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibDecoder/TDecCu.cpp

    r1255 r1259  
    163163Void TDecCu::decompressCtu( TComDataCU* pCtu )
    164164{
    165 #if !H_3D_IV_MERGE
     165#if !NH_3D_IV_MERGE
    166166  xDecompressCU( pCtu, 0,  0 );
    167167#endif
     
    327327      m_ppcCU[uiDepth]->setHeight(0, pcCU->getSlice()->getSPS()->getMaxCUHeight() / (1 << uiDepth));
    328328      m_ppcCU[uiDepth]->setPartSizeSubParts(SIZE_2Nx2N, 0, uiDepth);     
    329 #if H_3D_IV_MERGE
     329#if NH_3D_IV_MERGE
    330330      if( pcCU->getSlice()->getIsDepth())
    331331      {
     
    345345        m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo);
    346346      }
    347 #if H_3D_IV_MERGE
     347#if NH_3D_IV_MERGE
    348348      }
    349349#endif
     
    392392    m_ppcCU[uiDepth]->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0 );
    393393    m_ppcCU[uiDepth]->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_1 );
    394 #if H_3D_IV_MERGE
     394#if NH_3D_IV_MERGE
    395395    m_ppcCU[uiDepth]->copyDVInfoFrom(pcCU, uiAbsPartIdx);
    396396    TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS_MEM << 1]; // double length for mv of both lists
     
    424424    memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
    425425#endif
    426 #if H_3D_SPIVMP
     426#if NH_3D_SPIVMP
    427427    Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM];
    428428    memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
    429429    TComMvField*  pcMvFieldSP;
    430430    UChar* puhInterDirSP;
    431     pcMvFieldSP = new TComMvField[pcCU->getPic()->getPicSym()->getNumPartition()*2];
    432     puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartition()];
     431    pcMvFieldSP = new TComMvField[pcCU->getPic()->getPicSym()->getNumPartitionsInCtu()*2];
     432    puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartitionsInCtu()];
    433433#endif
    434434
     
    439439#if NH_3D_MLC
    440440    m_ppcCU[uiDepth]->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours
    441 #if H_3D_SPIVMP
     441#if NH_3D_SPIVMP
    442442      , pcMvFieldSP, puhInterDirSP
    443443#endif
     
    448448      , vspFlag
    449449#endif
    450 #if H_3D_SPIVMP
     450#if NH_3D_SPIVMP
    451451      , bSPIVMPFlag
    452452#endif
     
    501501      }
    502502    }
    503 #if H_3D_SPIVMP
     503#if NH_3D_SPIVMP
    504504    pcCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeIndex], uiAbsPartIdx, 0, uiDepth );
    505505    if (bSPIVMPFlag[uiMergeIndex])
     
    526526
    527527    xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, isLastCtuOfSliceSegment );
    528 #if H_3D_IV_MERGE
     528#if NH_3D_IV_MERGE
    529529    xDecompressCU(pcCU, uiAbsPartIdx, uiDepth );
    530530#endif
     
    551551#endif
    552552      xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, isLastCtuOfSliceSegment );
    553 #if H_3D_IV_MERGE
     553#if NH_3D_IV_MERGE
    554554      xDecompressCU(pcCU, uiAbsPartIdx, uiDepth );
    555555#endif
     
    571571#endif
    572572  xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, isLastCtuOfSliceSegment );
    573 #if H_3D_IV_MERGE
     573#if NH_3D_IV_MERGE
    574574  xDecompressCU(pcCU, uiAbsPartIdx, uiDepth );
    575575#endif
     
    594594{
    595595  TComPic* pcPic = pCtu->getPic();
    596 #if !H_3D_IV_MERGE
     596#if !NH_3D_IV_MERGE
    597597  TComSlice * pcSlice = pCtu->getSlice();
    598598  const TComSPS &sps=*(pcSlice->getSPS());
  • branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibDecoder/TDecEntropy.cpp

    r1255 r1259  
    244244  UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS];
    245245#endif
    246 #if H_3D_SPIVMP
     246#if NH_3D_SPIVMP
    247247  Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM];     
    248   TComMvField*  pcMvFieldSP = new TComMvField[pcCU->getPic()->getPicSym()->getNumPartition()*2];
    249   UChar* puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartition()];
    250 #endif
    251 #if H_3D_IV_MERGE
     248  TComMvField*  pcMvFieldSP = new TComMvField[pcCU->getPic()->getPicSym()->getNumPartitionsInCtu()*2];
     249  UChar* puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartitionsInCtu()];
     250#endif
     251#if NH_3D_IV_MERGE
    252252  pcSubCU->copyDVInfoFrom( pcCU, uiAbsPartIdx);
    253253#endif
     
    489489          memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
    490490#endif
    491 #if H_3D_SPIVMP
     491#if NH_3D_SPIVMP
    492492          memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
    493493#endif
     
    497497#if NH_3D_MLC
    498498          pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours
    499 #if H_3D_SPIVMP
     499#if NH_3D_SPIVMP
    500500            , pcMvFieldSP, puhInterDirSP
    501501#endif
     
    505505            , vspFlag
    506506#endif
    507 #if H_3D_SPIVMP
     507#if NH_3D_SPIVMP
    508508            , bSPIVMPFlag
    509509#endif
     
    526526        memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
    527527#endif
    528 #if H_3D_SPIVMP
     528#if NH_3D_SPIVMP
    529529        memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
    530530#endif
     
    534534#if NH_3D_MLC
    535535        pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours
    536 #if H_3D_SPIVMP
     536#if NH_3D_SPIVMP
    537537          , pcMvFieldSP, puhInterDirSP
    538538#endif
     
    542542          , vspFlag
    543543#endif
    544 #if H_3D_SPIVMP
     544#if NH_3D_SPIVMP
    545545          , bSPIVMPFlag
    546546#endif
     
    579579        }
    580580      }
     581#if NH_3D_SPIVMP
     582      pcCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 
     583      if (bSPIVMPFlag[uiMergeIndex] != 0)
     584      {
     585        Int iWidth, iHeight;
     586        UInt uiIdx;
     587        pcCU->getPartIndexAndSize( uiPartIdx, uiIdx, iWidth, iHeight, uiSubPartIdx, true );
     588
     589        UInt uiSPAddr;
     590
     591        Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight;
     592
     593        pcCU->getSPPara(iWidth, iHeight, iNumSP, iNumSPInOneLine, iSPWidth, iSPHeight);
     594
     595        for (Int iPartitionIdx = 0; iPartitionIdx < iNumSP; iPartitionIdx++)
     596        {
     597          pcCU->getSPAbsPartIdx(uiSubPartIdx, iSPWidth, iSPHeight, iPartitionIdx, iNumSPInOneLine, uiSPAddr);
     598          pcCU->setInterDirSP(puhInterDirSP[iPartitionIdx], uiSPAddr, iSPWidth, iSPHeight);
     599          pcCU->getCUMvField( REF_PIC_LIST_0 )->setMvFieldSP(pcCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx], iSPWidth, iSPHeight);
     600          pcCU->getCUMvField( REF_PIC_LIST_1 )->setMvFieldSP(pcCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx + 1], iSPWidth, iSPHeight);
     601        }
     602      }
     603#endif
    581604    }
    582605    else
     
    612635  }
    613636#endif
    614 #if H_3D_SPIVMP
     637#if NH_3D_SPIVMP
    615638  delete[] pcMvFieldSP;
    616639  delete[] puhInterDirSP;
  • branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibDecoder/TDecTop.cpp

    r1210 r1259  
    292292
    293293
    294 #if H_3D_IV_MERGE
     294#if NH_3D_IV_MERGE
    295295Void
    296296CamParsCollector::copyCamParamForSlice( TComSlice* pcSlice )
     
    11671167#if NH_3D
    11681168    pcSlice->checkInCompPredRefLayers();
    1169 #if H_3D_IV_MERGE
     1169#if NH_3D_IV_MERGE
    11701170#if H_3D_FCO
    11711171    //assert( !getIsDepth() );
     
    12641264  }
    12651265
    1266 #if H_3D_IV_MERGE
     1266#if NH_3D_IV_MERGE
    12671267#if H_3D_FCO
    12681268  if( !pcSlice->getIsDepth() && m_pcCamParsCollector )
  • branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibDecoder/TDecTop.h

    r1200 r1259  
    8181  Int**** getBaseViewShiftLUTI()  { return m_aiBaseViewShiftLUT;   }
    8282
    83 #if H_3D_IV_MERGE
     83#if NH_3D_IV_MERGE
    8484  Void  copyCamParamForSlice( TComSlice* pcSlice );
    8585#endif
  • branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibEncoder/TEncCavlc.cpp

    r1200 r1259  
    21952195    }
    21962196#endif
    2197 #if H_3D_IV_MERGE
     2197#if NH_3D_IV_MERGE
    21982198    assert(pcSlice->getMaxNumMergeCand()<=MRG_MAX_NUM_CANDS_MEM);
    21992199#else
     
    22022202    if (!pcSlice->isIntra())
    22032203    {
    2204 #if H_3D_IV_MERGE
     2204#if NH_3D_IV_MERGE
    22052205      WRITE_UVLC( ( ( pcSlice->getMpiFlag( ) || pcSlice->getIvMvPredFlag( ) || pcSlice->getViewSynthesisPredFlag( ) ) ? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS ) - pcSlice->getMaxNumMergeCand(), "five_minus_max_num_merge_cand");
    22062206#else
  • branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibEncoder/TEncCu.cpp

    r1255 r1259  
    615615          PartSize ePartTemp = rpcTempCU->getPartitionSize(0);
    616616          rpcTempCU->setPartSizeSubParts(SIZE_2Nx2N, 0, uiDepth);
    617 #if H_3D_IV_MERGE
     617#if NH_3D_IV_MERGE
    618618          if (rpcTempCU->getSlice()->getIsDepth() )
    619619          {
     
    633633              rpcTempCU->getDisMvpCandNBDV(&DvInfo);
    634634            }
    635 #if H_3D_IV_MERGE
     635#if NH_3D_IV_MERGE
    636636          }
    637637#endif
     
    18101810  rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uhDepth ); // interprets depth relative to CTU level
    18111811
     1812#if NH_3D_SPIVMP
     1813  Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM];
     1814  memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
     1815  TComMvField*  pcMvFieldSP;
     1816  UChar* puhInterDirSP;
     1817  pcMvFieldSP = new TComMvField[rpcTempCU->getPic()->getPicSym()->getNumPartitionsInCtu()*2];
     1818  puhInterDirSP = new UChar[rpcTempCU->getPic()->getPicSym()->getNumPartitionsInCtu()];
     1819#endif
     1820
    18121821#if NH_3D_VSP
    18131822#if !H_3D_ARP
     
    18201829#if NH_3D_MLC
    18211830  rpcTempCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours
    1822 #if H_3D_SPIVMP
     1831#if NH_3D_SPIVMP
    18231832    , pcMvFieldSP, puhInterDirSP
    18241833#endif
     
    18271836
    18281837  rpcTempCU->buildMCL( cMvFieldNeighbours,uhInterDirNeighbours, vspFlag
    1829 #if H_3D_SPIVMP
     1838#if NH_3D_SPIVMP
    18301839    , bSPIVMPFlag
    18311840#endif
     
    18561865#endif
    18571866#endif
    1858 
    1859 
    1860 
    1861 
    1862 
    1863 
    1864 
    18651867
    18661868#if NH_3D_MLC
     
    19831985          rpcTempCU->setVSPFlagSubParts( vspFlag[uiMergeCand], 0, 0, uhDepth );
    19841986#endif
    1985 #if H_3D_SPIVMP
     1987#if NH_3D_SPIVMP
    19861988          rpcTempCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeCand], 0, 0, uhDepth);
    19871989          if (bSPIVMPFlag[uiMergeCand])
     
    22062208  }
    22072209  DEBUG_STRING_APPEND(sDebug, bestStr)
    2208 #if H_3D_SPIVMP
     2210#if NH_3D_SPIVMP
    22092211 delete[] pcMvFieldSP;
    22102212 delete[] puhInterDirSP;
  • branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibEncoder/TEncGOP.cpp

    r1210 r1259  
    14431443    }   
    14441444
    1445 #if H_3D_IV_MERGE
     1445#if NH_3D_IV_MERGE
    14461446    // This needs to be done after initialization of 3D tool parameters.
    14471447    pcSlice->setMaxNumMergeCand      ( m_pcCfg->getMaxNumMergeCand()   + ( ( pcSlice->getMpiFlag( ) || pcSlice->getIvMvPredFlag( ) || pcSlice->getViewSynthesisPredFlag( )   ) ? 1 : 0 ));
  • branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibEncoder/TEncSearch.cpp

    r1255 r1259  
    38723872                                 , Int* vspFlag
    38733873#endif
    3874 #if H_3D_SPIVMP
     3874#if NH_3D_SPIVMP
    38753875                                 , Bool* pbSPIVMPFlag, TComMvField* pcMvFieldSP, UChar* puhInterDirSP
    38763876#endif
     
    39293929      pcCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, numValidMergeCand );
    39303930      pcCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours
    3931 #if H_3D_SPIVMP
     3931#if NH_3D_SPIVMP
    39323932        , pcMvFieldSP, puhInterDirSP
    39333933#endif
     
    39393939        , vspFlag
    39403940#endif
    3941 #if H_3D_SPIVMP
     3941#if NH_3D_SPIVMP
    39423942        , pbSPIVMPFlag
    39433943#endif
     
    39563956    pcCU->getInterMergeCandidates( uiAbsPartIdx, iPUIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
    39573957    pcCU->xGetInterMergeCandidates( uiAbsPartIdx, iPUIdx, cMvFieldNeighbours, uhInterDirNeighbours
    3958 #if H_3D_SPIVMP
     3958#if NH_3D_SPIVMP
    39593959      , pcMvFieldSP, puhInterDirSP
    39603960#endif
     
    39663966      , vspFlag
    39673967#endif
    3968 #if H_3D_SPIVMP
     3968#if NH_3D_SPIVMP
    39693969      , pbSPIVMPFlag
    39703970#endif
     
    40054005#endif
    40064006
    4007 #if H_3D_SPIVMP
     4007#if NH_3D_SPIVMP
    40084008    pcCU->setSPIVMPFlagSubParts( pbSPIVMPFlag[uiMergeCand], uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ));
    40094009    if (pbSPIVMPFlag[uiMergeCand])
     
    41724172  Distortion   biPDistTemp = std::numeric_limits<Distortion>::max();
    41734173
    4174 #if H_3D_IV_MERGE
     4174#if NH_3D_IV_MERGE
    41754175  TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS_MEM << 1]; // double length for mv of both lists
    41764176  UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS_MEM];
     
    45994599      DisInfo OriginalDvInfo = pcCU->getDvInfo(uiAbsPartIdx);
    46004600#endif
    4601 #if H_3D_SPIVMP
     4601#if NH_3D_SPIVMP
    46024602      Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM];
    46034603      memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
    46044604      TComMvField*  pcMvFieldSP;
    46054605      UChar* puhInterDirSP;
    4606       pcMvFieldSP = new TComMvField[pcCU->getPic()->getPicSym()->getNumPartition()*2];
    4607       puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartition()];
     4606      pcMvFieldSP = new TComMvField[pcCU->getPic()->getPicSym()->getNumPartitionsInCtu()*2];
     4607      puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartitionsInCtu()];
    46084608#endif
    46094609      xMergeEstimation( pcCU, pcOrgYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand
     
    46114611                      , vspFlag
    46124612#endif
    4613 #if H_3D_SPIVMP
     4613#if NH_3D_SPIVMP
    46144614                      , bSPIVMPFlag, pcMvFieldSP, puhInterDirSP
    46154615#endif
     
    46244624        pcCU->setVSPFlagSubParts( vspFlag[uiMRGIndex], uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
    46254625#endif
    4626 #if H_3D_SPIVMP
     4626#if NH_3D_SPIVMP
    46274627        pcCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMRGIndex], uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 
    46284628        if (bSPIVMPFlag[uiMRGIndex]!=0)
     
    47004700      else
    47014701      {
    4702 #if H_3D_SPIVMP       
     4702#if NH_3D_SPIVMP       
    47034703        pcCU->setSPIVMPFlagSubParts(0, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
    47044704#endif
     
    47134713        pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMEMvField[1], ePartSize, uiPartAddr, 0, iPartIdx );
    47144714      }
    4715 #if H_3D_SPIVMP
     4715#if NH_3D_SPIVMP
    47164716      delete[] pcMvFieldSP;
    47174717      delete[] puhInterDirSP;
     
    58795879  const Double zeroCost     = (pcCU->isLosslessCoded( 0 )) ? (nonZeroCost+1) : (m_pcRdCost->calcRdCost( zeroResiBits, zeroDistortion ));
    58805880#endif
    5881 #if H_3D_SPIVMP
    5882     if ( dZeroCost < dCost || pcCU->getQtRootCbf(0)==0)
     5881#if NH_3D_SPIVMP
     5882    if ( zeroCost < nonZeroCost || pcCU->getQtRootCbf(0)==0)
    58835883#else
    58845884  if ( zeroCost < nonZeroCost || !pcCU->getQtRootCbf(0) )
  • branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibEncoder/TEncSearch.h

    r1255 r1259  
    413413                                  , Int* vspFlag
    414414#endif
    415 #if H_3D_SPIVMP
     415#if NH_3D_SPIVMP
    416416                                  , Bool* pbSPIVMPFlag, TComMvField* pcMvFieldSP, UChar* puhInterDirSP
    417417#endif
  • branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibEncoder/TEncSlice.cpp

    r1200 r1259  
    567567  rpcSlice->setSliceSegmentMode     ( m_pcCfg->getSliceSegmentMode()     );
    568568  rpcSlice->setSliceSegmentArgument ( m_pcCfg->getSliceSegmentArgument() );
    569 #if H_3D_IV_MERGE
     569#if NH_3D_IV_MERGE
    570570#else
    571571  rpcSlice->setMaxNumMergeCand        ( m_pcCfg->getMaxNumMergeCand()        );
Note: See TracChangeset for help on using the changeset viewer.