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


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

initial porting of HM12

Location:
branches/SHM-3.1-dev/source/Lib/TLibDecoder
Files:
7 edited

Legend:

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

    r412 r431  
    126126  else
    127127  {
    128     assert( nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_TSA_R
     128    assert( nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_TLA_R
    129129         && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_TSA_N
    130130         && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_STSA_R
  • branches/SHM-3.1-dev/source/Lib/TLibDecoder/SEIread.cpp

    r313 r431  
    349349
    350350  /* restore primary bitstream for sei_message */
     351  getBitstream()->deleteFifo();
    351352  delete getBitstream();
    352353  setBitstream(bs);
  • branches/SHM-3.1-dev/source/Lib/TLibDecoder/SyntaxElementParser.cpp

    r313 r431  
    5252  if (length < 10)
    5353  {
    54     fprintf( g_hTrace, "%-50s u(%d)  : %d\n", pSymbolName, length, rValue );
     54    fprintf( g_hTrace, "%-50s u(%d)  : %u\n", pSymbolName, length, rValue );
    5555  }
    5656  else
    5757  {
    58     fprintf( g_hTrace, "%-50s u(%d) : %d\n", pSymbolName, length, rValue );
     58    fprintf( g_hTrace, "%-50s u(%d) : %u\n", pSymbolName, length, rValue );
    5959  }
    6060  fflush ( g_hTrace );
     
    6565  xReadUvlc (rValue);
    6666  fprintf( g_hTrace, "%8lld  ", g_nSymbolCounter++ );
    67   fprintf( g_hTrace, "%-50s ue(v) : %d\n", pSymbolName, rValue );
     67  fprintf( g_hTrace, "%-50s ue(v) : %u\n", pSymbolName, rValue );
    6868  fflush ( g_hTrace );
    6969}
  • branches/SHM-3.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r427 r431  
    16141614      READ_CODE(sps->getBitsForPOC(), uiCode, "pic_order_cnt_lsb");
    16151615      Int iPOClsb = uiCode;
    1616       Int iPrevPOC = rpcSlice->getPrevPOC();
     1616      Int iPrevPOC = rpcSlice->getPrevTid0POC();
    16171617      Int iMaxPOClsb = 1<< sps->getBitsForPOC();
    1618       Int iPrevPOClsb = iPrevPOC%iMaxPOClsb;
     1618      Int iPrevPOClsb = iPrevPOC & (iMaxPOClsb - 1);
    16191619      Int iPrevPOCmsb = iPrevPOC-iPrevPOClsb;
    16201620      Int iPOCmsb;
     
    17381738            rps->setDeltaPOC(j, - rpcSlice->getPOC() + pocLsbLt);
    17391739            rps->setCheckLTMSBPresent(j,false);
     1740           
     1741            // reset deltaPocMSBCycleLT for first LTRP from slice header if MSB not present
     1742            if( j == offset+(numOfLtrp-numLtrpInSPS)-1 )
     1743            {
     1744              deltaPocMSBCycleLT = 0;
     1745            }
    17401746          }
    17411747          prevDeltaMSB = deltaPocMSBCycleLT;
  • branches/SHM-3.1-dev/source/Lib/TLibDecoder/TDecSlice.h

    r313 r431  
    6565  TDecEntropy*    m_pcEntropyDecoder;
    6666  TDecCu*         m_pcCuDecoder;
    67   UInt            m_uiCurrSliceIdx;
    6867
    6968  TDecSbac*       m_pcBufferSbacDecoders;   ///< line to store temporary contexts, one per column of tiles.
  • 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++;
  • branches/SHM-3.1-dev/source/Lib/TLibDecoder/TDecTop.h

    r414 r431  
    6767  Int                     m_iMaxRefPicNum;
    6868 
     69  NalUnitType             m_associatedIRAPType; ///< NAL unit type of the associated IRAP picture
    6970  Int                     m_pocCRA;            ///< POC number of the latest CRA picture
    70   Bool                    m_prevRAPisBLA;      ///< true if the previous RAP (CRA/CRANT/BLA/BLANT/IDR) picture is a BLA/BLANT picture
    7171  Int                     m_pocRandomAccess;   ///< POC number of the random access point (the first IDR or CRA picture)
    7272
     
    107107  Bool                    m_bFirstSliceInSequence;
    108108#endif
    109 #if HM12_RANDOM_ACCESS
    110109  Bool                    m_prevSliceSkipped;
    111110  Int                     m_skippedPOC;
    112 #endif
    113111
    114112#if SVC_EXTENSION
     
    122120  fstream*                m_pBLReconFile;
    123121  Int                     m_iBLSourceWidth;
    124   Int                     m_iBLSourceHeight;
     122  Int                     m_iBLSourceHeight; 
    125123#endif
    126124#if VPS_EXTN_DIRECT_REF_LAYERS && M0457_PREDICTION_INDICATIONS
     
    159157
    160158  Void executeLoopFilters(Int& poc, TComList<TComPic*>*& rpcListPic);
     159#if SVC_EXTENSION
    161160#if EARLY_REF_PIC_MARKING
    162161  Void earlyPicMarking(Int maxTemporalLayer, std::vector<Int>& targetDecLayerIdList);
    163162#endif
    164 
    165 #if SVC_EXTENSION
    166163  UInt      getLayerId            () { return m_layerId;              }
    167164  Void      setLayerId            (UInt layer) { m_layerId = layer; }
Note: See TracChangeset for help on using the changeset viewer.