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

Reactive IVMV by Mediatek

Location:
branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibCommon
Files:
11 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
Note: See TracChangeset for help on using the changeset viewer.