Changeset 434 in SHVCSoftware for branches/SHM-3.1-dev/source/Lib/TLibDecoder


Ignore:
Timestamp:
11 Oct 2013, 20:27:16 (11 years ago)
Author:
qualcomm
Message:

Improvements to r413: ALIGN_TSA_STSA_PICS

Fixed code for aligning TSA and STSA pictures only for dependent layers, and added check at the decoder.

From: Adarsh K. Ramasubramonian <aramasub@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-3.1-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r431 r434  
    842842  }
    843843#endif
     844#if ALIGN_TSA_STSA_PICS
     845  if( m_apcSlicePilot->getLayerId() > 0 )
     846  {
     847    // Check for TSA alignment
     848    if( m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_TSA_N ||
     849        m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_TLA_R
     850         )
     851    {
     852      for(Int dependentLayerIdx = 0; dependentLayerIdx < m_apcSlicePilot->getVPS()->getNumDirectRefLayers(m_layerId); dependentLayerIdx++)
     853      {
     854        TComList<TComPic*> *cListPic = getRefLayerDec( dependentLayerIdx )->getListPic();
     855        TComPic* refpicLayer = m_apcSlicePilot->getRefPic(*cListPic, m_apcSlicePilot->getPOC() );
     856        if( refpicLayer )
     857        {
     858          assert( m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_TSA_N ||
     859                    m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_TLA_R );    // TSA pictures should be aligned among depenedent layers
     860        }
     861      }
     862    }
     863    // Check for STSA alignment
     864    if( m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_STSA_N ||
     865         m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_STSA_R
     866         )
     867    {
     868      for(Int dependentLayerIdx = 0; dependentLayerIdx < m_apcSlicePilot->getVPS()->getNumDirectRefLayers(m_layerId); dependentLayerIdx++)
     869      {
     870        TComList<TComPic*> *cListPic = getRefLayerDec( dependentLayerIdx )->getListPic();
     871        TComPic* refpicLayer = m_apcSlicePilot->getRefPic(*cListPic, m_apcSlicePilot->getPOC() ); // STSA pictures should be aligned among dependent layers
     872        if( refpicLayer )
     873
     874        {
     875          assert( m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_STSA_N ||
     876                    m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_STSA_R );
     877        }
     878      }
     879    }
     880  }
     881#endif
    844882  //detect lost reference picture and insert copy of earlier frame.
    845883  Int lostPoc;
Note: See TracChangeset for help on using the changeset viewer.