Ignore:
Timestamp:
18 Jun 2013, 05:16:27 (12 years ago)
Author:
mediatek-htm
Message:

Integration of 3D-HEVC merge related coding tools:
Inter-view motion merge candidate
HHI_INTER_VIEW_MOTION_PRED
SAIT_IMPROV_MOTION_PRED_M24829, improved inter-view motion vector prediction
QC_MRG_CANS_B0048 , JCT3V-B0048, B0086, B0069
OL_DISMV_POS_B0069 , different pos for disparity MV candidate, B0069
MTK_INTERVIEW_MERGE_A0049 , second part
QC_AMVP_MRG_UNIFY_IVCAN_C0051
TEXTURE MERGING CANDIDATE , JCT3V-C0137

Notes: Two configurations are added:
PredDepthMapGen : 1
MultiviewMvPred : 7

From: yiwen.chen@… (MediaTek)

Location:
branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r446 r476  
    759759    }
    760760#endif // !H_MV
     761
     762#if H_3D_IV_MERGE
     763    READ_FLAG( uiCode, "base_view_flag" );
     764    if( uiCode )
     765    { // baseview SPS -> set standard values
     766      pcSPS->initCamParaSPS         ( 0 );
     767      pcSPS->setPredDepthMapGeneration( 0, false );
     768    }
     769    else
     770    {
     771      READ_FLAG( uiCode, "depth_flag" );
     772      if( uiCode )
     773      {
     774        READ_UVLC( uiCode, "view_idx" );
     775        pcSPS->initCamParaSPSDepth    ( uiCode );
     776        pcSPS->setPredDepthMapGeneration( uiCode, true );
     777      }
     778      else
     779      {
     780        UInt  uiViewIndex;
     781        READ_UVLC( uiViewIndex, "view_idx" );  uiViewIndex++;
     782        UInt uiPredDepthMapGeneration = 0;
     783        UInt uiMultiviewMvPredMode = 0;
     784
     785        READ_UVLC( uiPredDepthMapGeneration, "Pdm_generation" );
     786        if( uiPredDepthMapGeneration )
     787        {
     788          READ_UVLC( uiMultiviewMvPredMode, "multi_view_mv_pred_mode" );
     789        }
     790
     791        pcSPS->setPredDepthMapGeneration( uiViewIndex, false, uiPredDepthMapGeneration, uiMultiviewMvPredMode);
     792
     793      }
     794    }
     795#endif
    761796  }
    762797}
     
    14141449    {
    14151450      READ_UVLC( uiCode, "five_minus_max_num_merge_cand");
     1451#if H_3D_IV_MERGE
     1452      rpcSlice->setMaxNumMergeCand(((rpcSlice->getSPS()->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE) == PDM_USE_FOR_MERGE ? MRG_MAX_NUM_CANDS_MEM: MRG_MAX_NUM_CANDS) - uiCode);
     1453#else
    14161454      rpcSlice->setMaxNumMergeCand(MRG_MAX_NUM_CANDS - uiCode);
     1455#endif
    14171456    }
    14181457
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecCu.cpp

    r455 r476  
    320320    m_ppcCU[uiDepth]->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0 );
    321321    m_ppcCU[uiDepth]->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_1 );
     322    m_ppcCU[uiDepth]->copyDVInfoFrom(pcCU, uiAbsPartIdx);
     323#if H_3D_IV_MERGE
     324    TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS_MEM << 1]; // double length for mv of both lists
     325    UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS_MEM];
     326#else
    322327    TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS << 1]; // double length for mv of both lists
    323328    UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS];
     329#endif
    324330    Int numValidMergeCand = 0;
    325331    for( UInt ui = 0; ui < m_ppcCU[uiDepth]->getSlice()->getMaxNumMergeCand(); ++ui )
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecEntropy.cpp

    r324 r476  
    156156  UInt uiPUOffset = ( g_auiPUOffset[UInt( ePartSize )] << ( ( pcCU->getSlice()->getSPS()->getMaxCUDepth() - uiDepth ) << 1 ) ) >> 4;
    157157
     158#if H_3D_IV_MERGE
     159  TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS_MEM << 1]; // double length for mv of both lists
     160  UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS_MEM];
     161#else
    158162  TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS << 1]; // double length for mv of both lists
    159163  UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS];
     164#endif
    160165
    161166  for ( UInt ui = 0; ui < pcCU->getSlice()->getMaxNumMergeCand(); ui++ )
     
    168173  pcSubCU->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0 );
    169174  pcSubCU->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_1 );
     175#if H_3D_IV_MERGE
     176  pcSubCU->copyDVInfoFrom( pcCU, uiAbsPartIdx);
     177#endif
    170178  for ( UInt uiPartIdx = 0, uiSubPartIdx = uiAbsPartIdx; uiPartIdx < uiNumPU; uiPartIdx++, uiSubPartIdx += uiPUOffset )
    171179  {
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecGop.cpp

    r455 r476  
    8484                   TComLoopFilter*         pcLoopFilter,
    8585                   TComSampleAdaptiveOffset* pcSAO
     86#if H_3D_IV_MERGE
     87                    ,TComDepthMapGenerator*  pcDepthMapGenerator
     88#endif
    8689                   )
    8790{
     
    9396  m_pcLoopFilter          = pcLoopFilter;
    9497  m_pcSAO  = pcSAO;
     98#if H_3D_IV_MERGE
     99  m_pcDepthMapGenerator   = pcDepthMapGenerator;
     100#endif
    95101}
    96102
     
    152158    m_LFCrossSliceBoundaryFlag.push_back( pcSlice->getLFCrossSliceBoundaryFlag());
    153159  }
     160
     161#if H_3D_IV_MERGE
     162  if( uiStartCUAddr == 0 )
     163  {
     164    m_pcDepthMapGenerator->initViewComponent( rpcPic );
     165  }
     166#endif
     167
    154168#if H_3D_NBDV
    155169  if(pcSlice->getViewIndex() && !pcSlice->getIsDepth()) //Notes from QC: this condition shall be changed once the configuration is completed, e.g. in pcSlice->getSPS()->getMultiviewMvPredMode() || ARP in prev. HTM. Remove this comment once it is done.
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecGop.h

    r324 r476  
    5151#include "TLibCommon/TComSampleAdaptiveOffset.h"
    5252
     53#if H_3D_IV_MERGE
     54#include "TLibCommon/TComDepthMapGenerator.h"
     55#endif
     56
    5357#include "TDecEntropy.h"
    5458#include "TDecSlice.h"
     
    7983  TComLoopFilter*       m_pcLoopFilter;
    8084 
     85#if H_3D_IV_MERGE
     86  TComDepthMapGenerator*  m_pcDepthMapGenerator;
     87#endif
     88
    8189  TComSampleAdaptiveOffset*     m_pcSAO;
    8290  Double                m_dDecTime;
     
    98106                 TComLoopFilter*         pcLoopFilter,
    99107                 TComSampleAdaptiveOffset* pcSAO
     108#if H_3D_IV_MERGE
     109                 ,TComDepthMapGenerator* pcDepthMapGenerator
     110#endif
    100111                 );
    101112  Void  create  ();
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecTop.cpp

    r446 r476  
    3737
    3838#include "NALread.h"
     39#if H_3D_IV_MERGE
     40#include "../../App/TAppDecoder/TAppDecTop.h"
     41#endif
    3942#include "TDecTop.h"
    4043
     
    389392}
    390393
     394#if H_3D_IV_MERGE
     395Void TDecTop::init(TAppDecTop* pcTAppDecTop)
     396#else
    391397Void TDecTop::init()
     398#endif
    392399{
    393400  // initialize ROM
     
    395402  initROM();
    396403#endif
    397   m_cGopDecoder.init( &m_cEntropyDecoder, &m_cSbacDecoder, &m_cBinCABAC, &m_cCavlcDecoder, &m_cSliceDecoder, &m_cLoopFilter, &m_cSAO);
     404  m_cGopDecoder.init( &m_cEntropyDecoder, &m_cSbacDecoder, &m_cBinCABAC, &m_cCavlcDecoder, &m_cSliceDecoder, &m_cLoopFilter, &m_cSAO
     405#if H_3D_IV_MERGE
     406    , &m_cDepthMapGenerator
     407#endif
     408    );
    398409  m_cSliceDecoder.init( &m_cEntropyDecoder, &m_cCuDecoder );
    399410  m_cEntropyDecoder.init(&m_cPrediction);
     411
     412#if H_3D_IV_MERGE
     413  m_tAppDecTop = pcTAppDecTop;
     414  m_cDepthMapGenerator.init( &m_cPrediction, m_tAppDecTop->getVPSAccess(), m_tAppDecTop->getSPSAccess(), m_tAppDecTop->getAUPicAccess() );
     415#endif
    400416}
    401417
     
    754770
    755771    m_cSliceDecoder.create();
     772#if H_3D_IV_MERGE
     773    UInt uiPdm = ( m_apcSlicePilot->getSPS()->getViewIndex() ? m_apcSlicePilot->getSPS()->getPredDepthMapGeneration() : m_tAppDecTop->getSPSAccess()->getPdm() );
     774    m_cDepthMapGenerator.create( true, m_apcSlicePilot->getSPS()->getPicWidthInLumaSamples(), m_apcSlicePilot->getSPS()->getPicHeightInLumaSamples(), g_uiMaxCUDepth, g_uiMaxCUWidth, g_uiMaxCUHeight, g_bitDepthY, PDM_SUB_SAMP_EXP_X(uiPdm), PDM_SUB_SAMP_EXP_Y(uiPdm) );
     775    TComDepthMapGenerator* pcDMG0 = m_tAppDecTop->getDecTop0()->getDepthMapGenerator();
     776    if( m_apcSlicePilot->getSPS()->getViewIndex() == 1 && ( pcDMG0->getSubSampExpX() != PDM_SUB_SAMP_EXP_X(uiPdm) || pcDMG0->getSubSampExpY() != PDM_SUB_SAMP_EXP_Y(uiPdm) ) )
     777    {
     778      pcDMG0->create( true, m_apcSlicePilot->getSPS()->getPicWidthInLumaSamples(), m_apcSlicePilot->getSPS()->getPicHeightInLumaSamples(), g_uiMaxCUDepth, g_uiMaxCUWidth, g_uiMaxCUHeight, g_bitDepthY, PDM_SUB_SAMP_EXP_X(uiPdm), PDM_SUB_SAMP_EXP_Y(uiPdm) );
     779    }
     780#endif
    756781  }
    757782  else
     
    893918#endif
    894919
     920#endif
     921
     922#if H_3D_IV_MERGE
     923    TComPic * const pcTexturePic = m_isDepth ? m_tAppDecTop->getPicFromView(  m_viewIndex, pcSlice->getPOC(), false ) : NULL;
     924    assert( !m_isDepth || pcTexturePic != NULL );
     925    pcSlice->setTexturePic( pcTexturePic );
    895926#endif
    896927    // For generalized B
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecTop.h

    r446 r476  
    4545#include "TLibCommon/TComTrQuant.h"
    4646#include "TLibCommon/SEI.h"
     47#if H_3D_IV_MERGE
     48#include "TLibCommon/TComDepthMapGenerator.h"
     49#endif
    4750
    4851#include "TDecGop.h"
     
    222225  Bool                    m_isDepth;
    223226  CamParsCollector*       m_pcCamParsCollector;
     227#if H_3D_IV_MERGE
     228  TComDepthMapGenerator   m_cDepthMapGenerator;
     229  TAppDecTop*             m_tAppDecTop;
     230#endif
    224231#endif
    225232#endif
     
    234241  void setDecodedPictureHashSEIEnabled(Int enabled) { m_cGopDecoder.setDecodedPictureHashSEIEnabled(enabled); }
    235242
     243#if H_3D_IV_MERGE
     244  Void  init(TAppDecTop* pcTAppDecTop);
     245#else
    236246  Void  init();
     247#endif
    237248#if H_MV 
    238249  Bool  decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay, Bool newLayer );
     
    265276  Bool                    getIsDepth            ()               { return m_isDepth;    }
    266277  Void                    setCamParsCollector( CamParsCollector* pcCamParsCollector ) { m_pcCamParsCollector = pcCamParsCollector; }
     278#if H_3D_IV_MERGE
     279  TComDepthMapGenerator*  getDepthMapGenerator  () { return &m_cDepthMapGenerator; }
     280#endif
    267281#endif
    268282#endif
Note: See TracChangeset for help on using the changeset viewer.