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/TLibDecoder
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.