Ticket #1244: FixCRAPocWhenNoRaslOutputFlagIsTrue.patch

File FixCRAPocWhenNoRaslOutputFlagIsTrue.patch, 1.1 KB (added by hendry, 11 years ago)

Patch that may address the reported issue

  • source/Lib/TLibCommon/TypeDef.h

     
    5353#define FIX_WRITING_OUTPUT          1
    5454#define FIX_OUTPUT_EOS              1
    5555
     56#define FIX_POC_CRA_NORASL_OUTPUT   1
     57
    5658#define MAX_NUM_PICS_IN_SOP           1024
    5759
    5860#define MAX_NESTING_NUM_OPS         1024
  • source/Lib/TLibDecoder/TDecTop.cpp

     
    411411  }
    412412#endif
    413413
     414#if FIX_POC_CRA_NORASL_OUTPUT
     415  if (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA && m_craNoRaslOutputFlag) //Reset POC MSB when CRA has NoRaslOutputFlag equal to 1
     416  {
     417    Int iMaxPOClsb = 1 << m_apcSlicePilot->getSPS()->getBitsForPOC();
     418    m_apcSlicePilot->setPOC( m_apcSlicePilot->getPOC() & (iMaxPOClsb - 1) );
     419  }
     420#endif
     421
    414422  // Skip pictures due to random access
    415423  if (isRandomAccessSkipPicture(iSkipFrame, iPOCLastDisplay))
    416424  {