Ticket #1101: SVN_HEVCSoftware_10.0_dev_multiple_cvs_fix.patch

File SVN_HEVCSoftware_10.0_dev_multiple_cvs_fix.patch, 4.0 KB (added by jackh, 11 years ago)
  • source/Lib/TLibDecoder/TDecTop.cpp

     
    7070  m_cGopDecoder.create();
    7171  m_apcSlicePilot = new TComSlice;
    7272  m_uiSliceIdx = 0;
     73  m_lastNALSkipped = false;
    7374}
    7475
    7576Void TDecTop::destroy()
     
    320321    m_uiSliceIdx     = 0;
    321322  }
    322323  m_apcSlicePilot->setSliceIdx(m_uiSliceIdx);
    323   if (!m_bFirstSliceInPicture)
     324  if (!m_bFirstSliceInPicture && !m_lastNALSkipped)
    324325  {
    325326    m_apcSlicePilot->copySliceInfo( pcPic->getPicSym()->getSlice(m_uiSliceIdx-1) );
    326327  }
     
    338339
    339340  m_cEntropyDecoder.decodeSliceHeader (m_apcSlicePilot, &m_parameterSetManagerDecoder);
    340341
     342  if (m_apcSlicePilot->getSliceCurStartCUAddr() == 0 &&
     343          m_apcSlicePilot->getSliceSegmentCurStartCUAddr() == 0 &&
     344          (nalu.m_nalUnitType==NAL_UNIT_CODED_SLICE_BLA_W_LP ||
     345          nalu.m_nalUnitType==NAL_UNIT_CODED_SLICE_BLA_W_RADL ||
     346          nalu.m_nalUnitType==NAL_UNIT_CODED_SLICE_BLA_N_LP ||
     347          nalu.m_nalUnitType==NAL_UNIT_CODED_SLICE_IDR_W_RADL ||
     348          nalu.m_nalUnitType==NAL_UNIT_CODED_SLICE_IDR_N_LP)) {
     349                  m_pocRandomAccess=MAX_INT;
     350  }
     351
    341352  // Skip pictures due to random access
    342   if (isRandomAccessSkipPicture(iSkipFrame, iPOCLastDisplay))
    343   {
    344     return false;
    345   }
    346353  // Skip TFD pictures associated with BLA/BLANT pictures
    347   if (isSkipPictureForBLA(iPOCLastDisplay))
     354  if (isRandomAccessSkipPicture(iSkipFrame, iPOCLastDisplay) || isSkipPictureForBLA(iPOCLastDisplay))
    348355  {
     356        m_lastNALSkipped=true;
    349357    return false;
    350358  }
     359  else m_lastNALSkipped=false;
    351360
    352361  //we should only get a different poc for a new picture (with CTU address==0)
    353362  if (m_apcSlicePilot->isNextSlice() && m_apcSlicePilot->getPOC()!=m_prevPOC && !m_bFirstSliceInSequence && (!m_apcSlicePilot->getSliceCurStartCUAddr()==0))
     
    357366  // exit when a new picture is found
    358367  if (m_apcSlicePilot->isNextSlice() && (m_apcSlicePilot->getSliceCurStartCUAddr() == 0 && !m_bFirstSliceInPicture) && !m_bFirstSliceInSequence )
    359368  {
    360     if (m_prevPOC >= m_pocRandomAccess)
     369        if (m_prevPOC >= m_pocRandomAccess || m_apcSlicePilot->getPOC()==m_pocRandomAccess)
    361370    {
    362371      m_prevPOC = m_apcSlicePilot->getPOC();
    363372      return true;
     
    642651{
    643652  if(nalUnitType == NAL_UNIT_SUFFIX_SEI)
    644653  {
    645     m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder.getActiveSPS() );
     654        if (!m_lastNALSkipped)
     655          m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder.getActiveSPS() );
    646656  }
    647657  else
    648658  {
     
    686696      xDecodeSEI( nalu.m_Bitstream, nalu.m_nalUnitType );
    687697      return false;
    688698
     699        case NAL_UNIT_EOS:
     700                m_pocRandomAccess=MAX_INT;
     701                break;
    689702    case NAL_UNIT_CODED_SLICE_TRAIL_R:
    690703    case NAL_UNIT_CODED_SLICE_TRAIL_N:
    691704    case NAL_UNIT_CODED_SLICE_TLA_R:
    692705    case NAL_UNIT_CODED_SLICE_TSA_N:
    693706    case NAL_UNIT_CODED_SLICE_STSA_R:
    694707    case NAL_UNIT_CODED_SLICE_STSA_N:
    695     case NAL_UNIT_CODED_SLICE_BLA_W_LP:
     708        case NAL_UNIT_CODED_SLICE_BLA_W_LP:
    696709    case NAL_UNIT_CODED_SLICE_BLA_W_RADL:
    697710    case NAL_UNIT_CODED_SLICE_BLA_N_LP:
    698711    case NAL_UNIT_CODED_SLICE_IDR_W_RADL:
     
    701714    case NAL_UNIT_CODED_SLICE_RADL_N:
    702715    case NAL_UNIT_CODED_SLICE_RADL_R:
    703716    case NAL_UNIT_CODED_SLICE_RASL_N:
    704     case NAL_UNIT_CODED_SLICE_RASL_R:
     717        case NAL_UNIT_CODED_SLICE_RASL_R:
    705718      return xDecodeSlice(nalu, iSkipFrame, iPOCLastDisplay);
    706719      break;
    707720    default:
  • source/Lib/TLibDecoder/TDecTop.h

     
    9494  Bool isRandomAccessSkipPicture(Int& iSkipFrame,  Int& iPOCLastDisplay);
    9595  TComPic*                m_pcPic;
    9696  UInt                    m_uiSliceIdx;
     97  Bool                    m_lastNALSkipped;
    9798  Int                     m_prevPOC;
    9899  Bool                    m_bFirstSliceInPicture;
    99100  Bool                    m_bFirstSliceInSequence;