Changeset 210 in 3DVCSoftware for trunk/source/Lib/TLibDecoder/TDecTop.cpp


Ignore:
Timestamp:
11 Dec 2012, 18:52:43 (11 years ago)
Author:
tech
Message:

Reintegrated /branches/HTM-5.0-dev0 rev. 207.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/Lib/TLibDecoder/TDecTop.cpp

    r77 r210  
    5050  m_aaiCodedScale          = new Int* [ MAX_VIEW_NUM ];
    5151  m_aiViewOrderIndex       = new Int  [ MAX_VIEW_NUM ];
     52#if QC_MVHEVC_B0046
     53  m_aiViewId               = new Int  [ MAX_VIEW_NUM ];
     54#endif
    5255  m_aiViewReceived         = new Int  [ MAX_VIEW_NUM ];
    5356  for( UInt uiId = 0; uiId < MAX_VIEW_NUM; uiId++ )
     
    266269  m_bFirstSliceInSequence   = true;
    267270  m_pcCamParsCollector = 0;
     271#if QC_MVHEVC_B0046
     272  m_bFirstNal                  = false;
     273#endif
    268274}
    269275
     
    578584  TComVPS *vps = m_parameterSetManagerDecoder.getVPS(sps->getVPSId());
    579585  assert (vps != 0);
     586#if !QC_REM_IDV_B0046
    580587  if( m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA )
     588#else
     589  if( (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA) && !sps->getViewId() )
     590#endif
    581591    // VPS can only be activated on IDR or CRA...
    582592    getTAppDecTop()->getVPSAccess()->setActiveVPSId( sps->getVPSId() );
     
    584594  m_apcSlicePilot->setPPS(pps);
    585595  m_apcSlicePilot->setSPS(sps);
    586 #if VIDYO_VPS_INTEGRATION
     596#if QC_MVHEVC_B0046
     597  TComVPS *vps = m_parameterSetManagerDecoder.getVPS(sps->getVPSId());
     598#endif
     599#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    587600  m_apcSlicePilot->setVPS(vps);
    588601#endif
     
    626639  m_apcSlicePilot->setPPS(m_parameterSetManagerDecoder.getPrefetchedPPS(0));
    627640  m_apcSlicePilot->setSPS(m_parameterSetManagerDecoder.getPrefetchedSPS(0));
    628 #if VIDYO_VPS_INTEGRATION
     641#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
     642#if QC_MVHEVC_B0046
     643  m_apcSlicePilot->setIsDepth(false);
     644#endif
    629645  m_apcSlicePilot->setVPS(m_parameterSetManagerDecoder.getPrefetchedVPS(0));
    630646#endif
    631647  m_apcSlicePilot->initTiles();
    632 
     648#if QC_MVHEVC_B0046
     649  m_apcSlicePilot->setViewId( nalu.m_layerId );
     650  m_apcSlicePilot->setViewId( nalu.m_layerId );
     651  m_apcSlicePilot->setViewOrderIdx(m_apcSlicePilot->getVPS()->getViewId(nalu.m_layerId), nalu.m_layerId);
     652  Int iNumDirectRef = m_apcSlicePilot->getVPS()->getNumDirectRefLayer(nalu.m_layerId);
     653  m_apcSlicePilot->getSPS()->setNumberOfUsableInterViewRefs(iNumDirectRef);
     654  for(Int iNumIvRef = 0; iNumIvRef < iNumDirectRef; iNumIvRef ++)
     655  {
     656    Int iDeltaLayerId = m_apcSlicePilot->getVPS()->getDirectRefLayerId( nalu.m_layerId, iNumIvRef);
     657    m_apcSlicePilot->getSPS()->setUsableInterViewRef(iNumIvRef, (iDeltaLayerId-nalu.m_layerId));
     658  }
     659#endif
    633660  if (m_bFirstSliceInPicture)
    634661  {
     
    645672  if( m_bFirstSliceInPicture )
    646673  {
     674#if QC_MVHEVC_B0046
     675    if( nalu.m_layerId == 0 ) { m_nalUnitTypeBaseView = nalu.m_nalUnitType; }
     676    else                     { m_nalUnitTypeBaseView = m_tAppDecTop->getTDecTop( 0, 0 )->getNalUnitTypeBaseView(); }
     677#else
    647678#if VIDYO_VPS_INTEGRATION
    648679    if( m_apcSlicePilot->getVPS()->getViewId(nalu.m_layerId) == 0 ) { m_nalUnitTypeBaseView = nalu.m_nalUnitType; }
     
    652683    else                     { m_nalUnitTypeBaseView = m_tAppDecTop->getTDecTop( 0, nalu.m_isDepth )->getNalUnitTypeBaseView(); }
    653684#endif
    654    
     685#endif
    655686    m_apcSlicePilot->setNalUnitTypeBaseViewMvc( m_nalUnitTypeBaseView );
    656687  }
     
    951982
    952983    // Set reference list
     984#if !QC_MVHEVC_B0046
    953985#if VIDYO_VPS_INTEGRATION
    954986    pcSlice->setViewId( pcSlice->getVPS()->getViewId(nalu.m_layerId) );
     
    958990    pcSlice->setIsDepth(m_isDepth);
    959991#endif
     992#endif
    960993
    961994#if SONY_COLPIC_AVAILABILITY
     
    9691002    assert( m_tAppDecTop != NULL );
    9701003    TComPic * const pcTexturePic = m_isDepth ? m_tAppDecTop->getPicFromView(  m_viewId, pcSlice->getPOC(), false ) : NULL;
     1004
     1005#if FLEX_CODING_ORDER_M23723
     1006    if (pcTexturePic != NULL)
     1007    {
     1008      assert( !m_isDepth || pcTexturePic != NULL );
     1009      pcSlice->setTexturePic( pcTexturePic );
     1010    }
     1011#else
    9711012    assert( !m_isDepth || pcTexturePic != NULL );
    9721013    pcSlice->setTexturePic( pcTexturePic );
     1014#endif
     1015
    9731016
    9741017    std::vector<TComPic*> apcInterViewRefPics = m_tAppDecTop->getInterViewRefPics( m_viewId, pcSlice->getPOC(), m_isDepth, pcSlice->getSPS() );
     
    10711114  m_cGopDecoder.decompressGop(nalu.m_Bitstream, pcPic, false);
    10721115
     1116#if QC_IV_AS_LT_B0046
     1117  std::vector<TComPic*> apcInterViewRefPics = m_tAppDecTop->getInterViewRefPics( m_viewId, pcSlice->getPOC(), m_isDepth, pcSlice->getSPS() );
     1118  for( Int k = 0; k < apcInterViewRefPics.size(); k++ )
     1119  {
     1120    TComPic*  pcPicIv = apcInterViewRefPics[k];
     1121    pcPicIv->setIsLongTerm( 0 );
     1122  }
     1123#endif
    10731124  if( m_pcCamParsCollector )
    10741125  {
     
    10821133}
    10831134
    1084 #if VIDYO_VPS_INTEGRATION
     1135#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    10851136Void TDecTop::xDecodeVPS()
    10861137{
     
    10891140  m_cEntropyDecoder.decodeVPS( vps );
    10901141  m_parameterSetManagerDecoder.storePrefetchedVPS(vps); 
     1142#if !QC_MVHEVC_B0046
    10911143  getTAppDecTop()->getVPSAccess()->addVPS( vps );
     1144#endif
    10921145}
    10931146#endif
     
    11551208  switch (nalu.m_nalUnitType)
    11561209  {
    1157 #if VIDYO_VPS_INTEGRATION
     1210#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    11581211    case NAL_UNIT_VPS:
    11591212      xDecodeVPS();
     
    11781231    case NAL_UNIT_CODED_SLICE_IDR:
    11791232#if H0566_TLA
     1233#if !QC_REM_IDV_B0046
    11801234    case NAL_UNIT_CODED_SLICE_IDV:
     1235#endif
    11811236    case NAL_UNIT_CODED_SLICE_CRA:
    11821237    case NAL_UNIT_CODED_SLICE_TLA:
     
    11931248}
    11941249
     1250#if QC_MVHEVC_B0046
     1251Void TDecTop::xCopyVPS( TComVPS* pVPSV0 )
     1252{
     1253  m_parameterSetManagerDecoder.storePrefetchedVPS(pVPSV0); 
     1254}
     1255
     1256Void TDecTop::xCopySPS( TComSPS* pSPSV0 )
     1257{
     1258  TComSPS* sps = new TComSPS();
     1259  sps = pSPSV0;
     1260  m_parameterSetManagerDecoder.storePrefetchedSPS(sps);
     1261#if LCU_SYNTAX_ALF
     1262  m_cAdaptiveLoopFilter.create( sps->getPicWidthInLumaSamples(), sps->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
     1263#endif
     1264}
     1265
     1266Void TDecTop::xCopyPPS(TComPPS* pPPSV0 )
     1267{
     1268  m_parameterSetManagerDecoder.storePrefetchedPPS( pPPSV0 );
     1269
     1270  //!!!KS: Activate parameter sets for parsing APS (unless dependency is resolved)
     1271  m_apcSlicePilot->setPPSId(pPPSV0->getPPSId());
     1272  xActivateParameterSets();
     1273  m_apcSlicePilot->initTiles();
     1274}
     1275#endif
    11951276/** Function for checking if picture should be skipped because of random access
    11961277 * \param iSkipFrame skip frame counter
Note: See TracChangeset for help on using the changeset viewer.