Ticket #1059: TempNoRef.patch

File TempNoRef.patch, 1.6 KB (added by geertv, 11 years ago)

patch

  • Lib/TLibCommon/TypeDef.h

     
    3838#ifndef _TYPEDEF__
    3939#define _TYPEDEF__
    4040
     41#define TEMPNOREFFLAG_FIX  1
     42
    4143//! \ingroup TLibCommon
    4244//! \{
    4345
  • Lib/TLibDecoder/TDecTop.cpp

     
    305305  }
    306306
    307307  m_apcSlicePilot->setNalUnitType(nalu.m_nalUnitType);
     308#if TEMPNOREFFLAG_FIX
    308309  if((m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_TRAIL_N) ||
    309310     (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_TSA_N) ||
     311     (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_STSA_N) ||
     312         (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RADL_N) ||
     313         (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_N) )
     314  {
     315    m_apcSlicePilot->setTemporalLayerNonReferenceFlag(true);
     316  }
     317  else
     318  {
     319    m_apcSlicePilot->setTemporalLayerNonReferenceFlag(false);
     320  }
     321#else
     322  if((m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_TRAIL_N) ||
     323     (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_TSA_N) ||
    310324     (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_STSA_N))
    311325  {
    312326    m_apcSlicePilot->setTemporalLayerNonReferenceFlag(true);
    313327  }
     328#endif
    314329  m_apcSlicePilot->setReferenced(true); // Putting this as true ensures that picture is referenced the first time it is in an RPS
    315330  m_apcSlicePilot->setTLayerInfo(nalu.m_temporalId);
    316331