Ignore:
Timestamp:
16 May 2013, 16:05:31 (12 years ago)
Author:
mitsubishi-htm
Message:

-D0166 part 1, set refView selection for NBDV.

Location:
branches/HTM-6.2-dev2-MERL/source/Lib/TLibEncoder
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-6.2-dev2-MERL/source/Lib/TLibEncoder/TEncCu.cpp

    r399 r412  
    623623          rpcTempCU->setPartSizeSubParts( ePartTemp, 0, uiDepth );
    624624        }
     625
    625626        if(DvInfo.bDV==false)
    626627        {
     
    17141715  UInt uiTPelY   = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiAbsPartIdx] ];
    17151716  UInt uiBPelY   = uiTPelY + (g_uiMaxCUHeight>>uiDepth) - 1;
    1716  
     1717
    17171718  if( getCheckBurstIPCMFlag() )
    17181719  {
     
    18261827  {
    18271828    m_pcEntropyCoder->encodeMergeIndex( pcCU, uiAbsPartIdx, 0 );
     1829
    18281830#if LGE_ILLUCOMP_B0045
    18291831    m_pcEntropyCoder->encodeICFlag  ( pcCU, uiAbsPartIdx
     
    18441846#endif
    18451847  m_pcEntropyCoder->encodePredMode( pcCU, uiAbsPartIdx );
    1846  
     1848
    18471849  m_pcEntropyCoder->encodePartSize( pcCU, uiAbsPartIdx, uiDepth );
    1848  
     1850
    18491851  if (pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N )
    18501852  {
     
    18611863  // prediction Info ( Intra : direction mode, Inter : Mv, reference idx )
    18621864  m_pcEntropyCoder->encodePredInfo( pcCU, uiAbsPartIdx );
     1865
    18631866#if LGE_ILLUCOMP_B0045
    18641867    m_pcEntropyCoder->encodeICFlag  ( pcCU, uiAbsPartIdx
     
    19341937#if MERL_VSP_C0152
    19351938  Int iVSPIndexTrue[3] = {-1, -1, -1};
     1939#if MERL_VSP_NBDV_RefVId_Fix_D0166
     1940  Int iVSPDirTrue[3]   = {-1, -1, -1};
     1941  rpcTempCU->getInterMergeCandidates( 0, 0, uhDepth, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, iVSPIndexTrue, iVSPDirTrue );
     1942#else
    19361943  rpcTempCU->getInterMergeCandidates( 0, 0, uhDepth, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, iVSPIndexTrue );
     1944#endif
    19371945#else
    19381946  rpcTempCU->getInterMergeCandidates( 0, 0, uhDepth, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
     
    20032011            }
    20042012            rpcTempCU->setVSPIndexSubParts( iVSPIdx, 0, 0, uhDepth );
     2013#if MERL_VSP_NBDV_RefVId_Fix_D0166
     2014            rpcTempCU->setVSPDirSubParts( iVSPDirTrue[iVSPIdx-1], 0, 0, uhDepth ); // interprets depth relative to LCU level
     2015#endif
    20052016          }
    20062017#endif
     
    29382949      assert( rpcTempCU->getPredictionMode( ui ) != MODE_NONE );
    29392950#if MERL_VSP_C0152
    2940       Int vspIdx = pcTextureCU->getVSPIndex( rpcTempCU->getZorderIdxInCU() + ui);
     2951      Int vspIdx = pcTextureCU->getVSPIndex( rpcTempCU->getZorderIdxInCU() + ui );
    29412952      rpcTempCU->setVSPIndex( ui , vspIdx);
     2953#if MERL_VSP_NBDV_RefVId_Fix_D0166
     2954      Int vspDir = pcTextureCU->getVSPDir  ( rpcTempCU->getZorderIdxInCU() + ui );
     2955      rpcTempCU->setVSPDir( ui, vspDir);
     2956#endif
    29422957#endif
    29432958    }
  • branches/HTM-6.2-dev2-MERL/source/Lib/TLibEncoder/TEncSearch.cpp

    r373 r412  
    29212921                                 , Int* iVSPIndexTrue
    29222922#endif
     2923#if MERL_VSP_NBDV_RefVId_Fix_D0166
     2924                                 , Int* iVSPDirTrue
     2925#endif
    29232926                                 )
    29242927{
     
    29622965  }
    29632966#else
     2967
    29642968#if MERL_VSP_C0152
    2965   pcCU->getInterMergeCandidates( uiAbsPartIdx, iPUIdx, uiDepth, cMvFieldNeighbours,uhInterDirNeighbours, numValidMergeCand, iVSPIndexTrue );
     2969  pcCU->getInterMergeCandidates( uiAbsPartIdx, iPUIdx, uiDepth, cMvFieldNeighbours,uhInterDirNeighbours, numValidMergeCand, iVSPIndexTrue
     2970#if MERL_VSP_NBDV_RefVId_Fix_D0166
     2971                               , iVSPDirTrue
     2972#endif
     2973  );
     2974
    29662975#else
    2967   pcCU->getInterMergeCandidates( uiAbsPartIdx, iPUIdx, uiDepth, cMvFieldNeighbours,uhInterDirNeighbours, numValidMergeCand );
    2968 #endif
    2969 #endif
    2970 
     2976  pcCU->getInterMergeCandidates( uiAbsPartIdx, iPUIdx, uiDepth, cMvFieldNeighbours,uhInterDirNeighbours, numValidMergeCand
     2977#if MERL_VSP_NBDV_RefVId_Fix_D0166
     2978                               , iVSPDirTrue
     2979#endif
     2980  );
     2981#endif
     2982
     2983#endif
    29712984
    29722985#if H3D_IVMP
     
    29983011        }
    29993012        pcCU->setVSPIndexSubParts( iVSPIdx, uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) );
     3013#if MERL_VSP_NBDV_RefVId_Fix_D0166
     3014        pcCU->setVSPDirSubParts( iVSPDirTrue[iVSPIdx-1], uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) );
     3015#endif
    30003016      }
    30013017#endif
     
    31383154    //reset the VSP flag to be 0
    31393155    pcCU->setVSPIndexSubParts( 0, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr) );
     3156#endif
     3157#if MERL_VSP_NBDV_RefVId_Fix_D0166
     3158    pcCU->setVSPDirSubParts( 0, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr) );
    31403159#endif
    31413160#if AMP_MRG
     
    33773396        iNumIter = 1;
    33783397      }
    3379      
     3398
    33803399      for ( Int iIter = 0; iIter < iNumIter; iIter++ )
    33813400      {
     
    36583677#if MERL_VSP_C0152
    36593678      Int iVSPIndexTrue[3] = {-1, -1, -1};
     3679#if MERL_VSP_NBDV_RefVId_Fix_D0166
     3680      Int iVSPDirTrue[3]   = {-1, -1, -1};
     3681#endif
    36603682#endif
    36613683      UInt uiMEInterDir = 0;
     
    36883710
    36893711
    3690 xMergeEstimation( pcCU, pcOrgYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost
     3712      xMergeEstimation( pcCU, pcOrgYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost
    36913713#if CU_BASED_MRG_CAND_LIST
    36923714                 , cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand,
     
    36943716#if MERL_VSP_C0152
    36953717                 , iVSPIndexTrue
     3718#endif
     3719#if MERL_VSP_NBDV_RefVId_Fix_D0166
     3720                 , iVSPDirTrue
    36963721#endif
    36973722        );
     
    37163741          }
    37173742          pcCU->setVSPIndexSubParts( iVSPIdx, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
     3743#if MERL_VSP_NBDV_RefVId_Fix_D0166
     3744          pcCU->setVSPDirSubParts( iVSPDirTrue[iVSPIdx-1], uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
     3745#endif
    37183746        }
    37193747#endif
     
    37383766        pcCU->setInterDirSubParts ( uiMEInterDir, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
    37393767#if MERL_VSP_C0152
    3740         pcCU->setVSPIndexSubParts ( 0 ,           uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
     3768        pcCU->setVSPIndexSubParts ( 0,            uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
     3769#endif
     3770#if MERL_VSP_NBDV_RefVId_Fix_D0166
     3771        pcCU->setVSPDirSubParts   ( 0,            uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
    37413772#endif
    37423773        {
  • branches/HTM-6.2-dev2-MERL/source/Lib/TLibEncoder/TEncSearch.h

    r332 r412  
    511511                                  , Int* iVSPIndexTrue
    512512#endif
     513#if MERL_VSP_NBDV_RefVId_Fix_D0166
     514                                  , Int* iVSPDirTrue
     515#endif
    513516                                   );
    514517  // -------------------------------------------------------------------------------------------------------------------
  • branches/HTM-6.2-dev2-MERL/source/Lib/TLibEncoder/TEncSlice.cpp

    r332 r412  
    6060  m_pcBufferLowLatSbacCoders    = NULL;
    6161  m_pcBufferLowLatBinCoderCABACs  = NULL;
     62#if MERL_VSP_NBDV_RefVId_Fix_D0166
     63  for(Int iNumCount = 0; iNumCount < MAX_VIEW_NUM; iNumCount++)
     64    m_pcListDepthPic[iNumCount] =NULL;
     65#endif
    6266#if FCO_DVP_REFINE_C0132_C0170
    6367  m_pPicBaseTxt = NULL;
     
    148152  m_pdRdPicQp         = (Double*)xMalloc( Double, m_pcCfg->getDeltaQpRD() * 2 + 1 );
    149153  m_piRdPicQp         = (Int*   )xMalloc( Int,    m_pcCfg->getDeltaQpRD() * 2 + 1 );
     154
     155#if MERL_VSP_NBDV_RefVId_Fix_D0166
     156  for(Int iNumCount = 0; iNumCount < MAX_VIEW_NUM; iNumCount++)
     157    m_pcListDepthPic[iNumCount] =NULL;
     158#endif
    150159}
    151160
     
    819828#if MERL_VSP_C0152
    820829  // Send Depth/Texture pointers to slice level
     830#if !MERL_VSP_NBDV_RefVId_Fix_D0166
    821831  pcSlice->setBWVSPLUTParam(m_aiShiftLUT, m_iShiftPrec);
     832#endif
    822833  pcSlice->setRefPicBaseTxt(m_pPicBaseTxt);
    823834  pcSlice->setRefPicBaseDepth(m_pPicBaseDepth);
     835#if MERL_VSP_NBDV_RefVId_Fix_D0166
     836  for (Int refviewId=0; refviewId < pcSlice->getViewId(); refviewId++)
     837  {
     838    assert( m_pcListDepthPic[refviewId] );
     839    pcSlice->setListDepthPic(m_pcListDepthPic[refviewId], refviewId);
     840    pcSlice->setBWVSPLUTParam(m_aiShiftLUT[refviewId], m_iShiftPrec, refviewId);
     841  }
     842#endif
    824843#endif
    825844
  • branches/HTM-6.2-dev2-MERL/source/Lib/TLibEncoder/TEncSlice.h

    r296 r412  
    106106  TComPic* m_pPicBaseTxt;
    107107  TComPic* m_pPicBaseDepth;
     108#if MERL_VSP_NBDV_RefVId_Fix_D0166
     109  Int*     m_aiShiftLUT[2]; ///< For reference views from LIST0 and LIST1
     110#else
    108111  Int*     m_aiShiftLUT;
     112#endif
    109113  Int      m_iShiftPrec;
    110114#endif
    111 
     115#if MERL_VSP_NBDV_RefVId_Fix_D0166
     116  TComList<TComPic*>*  m_pcListDepthPic[MAX_VIEW_NUM]; ///< For three views in total, indexed as viewId = 0, 1, 2
     117#endif
    112118public:
    113119  TEncSlice();
     
    143149
    144150#if MERL_VSP_C0152
    145    Void     setBWVSPLUTParam    ( Int *pShiftLUT, Int iLoG2LUTPrec ) { m_aiShiftLUT = pShiftLUT; m_iShiftPrec = 2-iLoG2LUTPrec; }
     151#if MERL_VSP_NBDV_RefVId_Fix_D0166
     152  Void     setBWVSPLUTParam  ( Int *pShiftLUT, Int iLoG2LUTPrec, Int iNeighborViewId ) { m_aiShiftLUT[iNeighborViewId] = pShiftLUT; m_iShiftPrec = 2-iLoG2LUTPrec; }
     153#else
     154  Void     setBWVSPLUTParam    ( Int *pShiftLUT, Int iLoG2LUTPrec ) { m_aiShiftLUT = pShiftLUT; m_iShiftPrec = 2-iLoG2LUTPrec; }
     155#endif
    146156   Void     setRefPicBaseTxt    ( TComPic*pPicTxt   ) { m_pPicBaseTxt = pPicTxt;    }
    147157   Void     setRefPicBaseDepth  ( TComPic*pPicDepth ) { m_pPicBaseDepth = pPicDepth;}
     158#if MERL_VSP_NBDV_RefVId_Fix_D0166
     159   Void     getBWVSPLUTParam  ( Int*& pShiftLUT, Int& iShiftPrec, Int iNeighborViewId ) { pShiftLUT = m_aiShiftLUT[iNeighborViewId]; iShiftPrec = m_iShiftPrec; }
     160#else
    148161   Void     getBWVSPLUTParam    ( Int*& pShiftLUT, Int& iShiftPrec ) { pShiftLUT = m_aiShiftLUT; iShiftPrec = m_iShiftPrec; }
     162#endif
    149163   TComPic* getRefPicBaseTxt    () { return m_pPicBaseTxt;   }
    150164   TComPic* getRefPicBaseDepth  () { return m_pPicBaseDepth; }
     165#if MERL_VSP_NBDV_RefVId_Fix_D0166
     166   Void     setListDepthPic     ( TComList<TComPic*>* pListDepthPic, Int viewId ) { m_pcListDepthPic[viewId] = pListDepthPic; }
     167   TComList<TComPic*>* getListDepthPic(Int viewId)  { return m_pcListDepthPic[viewId]; }
     168#endif
    151169#endif
    152170};
Note: See TracChangeset for help on using the changeset viewer.