Ignore:
Timestamp:
11 Oct 2013, 05:54:02 (11 years ago)
Author:
seregin
Message:

initial porting of HM12

File:
1 edited

Legend:

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

    r424 r431  
    5757  g_nSymbolCounter = 0;
    5858#endif
     59  m_associatedIRAPType = NAL_UNIT_INVALID;
    5960  m_pocCRA = 0;
    60   m_prevRAPisBLA = false;
    6161  m_pocRandomAccess = MAX_INT;         
    6262#if !SVC_EXTENSION
     
    7777  m_pBLSyntaxFile = NULL;
    7878#endif
    79 #if HM12_RANDOM_ACCESS
    8079  m_prevSliceSkipped = false;
    8180  m_skippedPOC = 0;
    82 #endif
    8381}
    8482
     
    700698#endif
    701699
    702 #if HM12_RANDOM_ACCESS
    703700  // set POC for dependent slices in skipped pictures
    704701  if(m_apcSlicePilot->getDependentSliceSegmentFlag() && m_prevSliceSkipped)
     
    706703    m_apcSlicePilot->setPOC(m_skippedPOC);
    707704  }
    708 #endif
     705
     706  m_apcSlicePilot->setAssociatedIRAPPOC(m_pocCRA);
     707  m_apcSlicePilot->setAssociatedIRAPType(m_associatedIRAPType);
    709708
    710709  // Skip pictures due to random access
    711710  if (isRandomAccessSkipPicture(iSkipFrame, iPOCLastDisplay))
    712711  {
    713 #if HM12_RANDOM_ACCESS
    714712    m_prevSliceSkipped = true;
    715713    m_skippedPOC = m_apcSlicePilot->getPOC();
    716 #endif
    717714    return false;
    718715  }
     
    720717  if (isSkipPictureForBLA(iPOCLastDisplay))
    721718  {
    722 #if HM12_RANDOM_ACCESS
    723719    m_prevSliceSkipped = true;
    724720    m_skippedPOC = m_apcSlicePilot->getPOC();
    725 #endif
    726721    return false;
    727722  }
    728723
    729 #if HM12_RANDOM_ACCESS
    730724  // clear previous slice skipped flag
    731725  m_prevSliceSkipped = false;
    732 #endif
    733726
    734727  // exit when a new picture is found
     
    913906    xGetNewPicBuffer (m_apcSlicePilot, pcPic);
    914907
     908    Bool isField = false;
     909    Bool isTff = false;
     910   
     911    if(!m_SEIs.empty())
     912    {
     913      // Check if any new Picture Timing SEI has arrived
     914      SEIMessages pictureTimingSEIs = extractSeisByType (m_SEIs, SEI::PICTURE_TIMING);
     915      if (pictureTimingSEIs.size()>0)
     916      {
     917        SEIPictureTiming* pictureTiming = (SEIPictureTiming*) *(pictureTimingSEIs.begin());
     918        isField = (pictureTiming->m_picStruct == 1) || (pictureTiming->m_picStruct == 2);
     919        isTff =  (pictureTiming->m_picStruct == 1);
     920      }
     921    }
     922   
     923    //Set Field/Frame coding mode
     924    m_pcPic->setField(isField);
     925    m_pcPic->setTopField(isTff);
     926
    915927    // transfer any SEI messages that have been received to the picture
    916928    pcPic->setSEIs(m_SEIs);
     
    10521064  if (bNextSlice)
    10531065  {
    1054     pcSlice->checkCRA(pcSlice->getRPS(), m_pocCRA, m_prevRAPisBLA, m_cListPic );
     1066    pcSlice->checkCRA(pcSlice->getRPS(), m_pocCRA, m_associatedIRAPType, m_cListPic );
    10551067    // Set reference list
    10561068#if SVC_EXTENSION
     
    12511263      pcSlice->setScalingList ( pcSlice->getPPS()->getScalingList()  );
    12521264    }
    1253     pcSlice->getScalingList()->setUseTransformSkip(pcSlice->getPPS()->getUseTransformSkip());
    12541265    if(!pcSlice->getPPS()->getScalingListPresentFlag() && !pcSlice->getSPS()->getScalingListPresentFlag())
    12551266    {
     
    14971508    case NAL_UNIT_CODED_SLICE_TRAIL_R:
    14981509    case NAL_UNIT_CODED_SLICE_TRAIL_N:
    1499     case NAL_UNIT_CODED_SLICE_TSA_R:
     1510    case NAL_UNIT_CODED_SLICE_TLA_R:
    15001511    case NAL_UNIT_CODED_SLICE_TSA_N:
    15011512    case NAL_UNIT_CODED_SLICE_STSA_R:
     
    15321543Bool TDecTop::isSkipPictureForBLA(Int& iPOCLastDisplay)
    15331544{
    1534   if (m_prevRAPisBLA && m_apcSlicePilot->getPOC() < m_pocCRA && (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_R || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_N))
     1545  if ((m_associatedIRAPType == NAL_UNIT_CODED_SLICE_BLA_N_LP || m_associatedIRAPType == NAL_UNIT_CODED_SLICE_BLA_W_LP || m_associatedIRAPType == NAL_UNIT_CODED_SLICE_BLA_W_RADL) &&
     1546       m_apcSlicePilot->getPOC() < m_pocCRA && (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_R || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_N))
    15351547  {
    15361548    iPOCLastDisplay++;
Note: See TracChangeset for help on using the changeset viewer.