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/TLibEncoder
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • 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.