Changeset 133 in SHVCSoftware for branches/SHM-2.0-dev/source/Lib/TLibDecoder


Ignore:
Timestamp:
28 Apr 2013, 08:49:16 (12 years ago)
Author:
seregin
Message:

update to HM10.1

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

Legend:

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

    r125 r133  
    5050//! \ingroup TLibDecoder
    5151//! \{
    52 static void convertPayloadToRBSP(vector<uint8_t>& nalUnitBuf, Bool isVclNalUnit)
     52static void convertPayloadToRBSP(vector<uint8_t>& nalUnitBuf, TComInputBitstream *bitstream, Bool isVclNalUnit)
    5353{
    5454  UInt zeroCount = 0;
    5555  vector<uint8_t>::iterator it_read, it_write;
    5656
    57   for (it_read = it_write = nalUnitBuf.begin(); it_read != nalUnitBuf.end(); it_read++, it_write++)
     57  UInt pos = 0;
     58  bitstream->clearEmulationPreventionByteLocation();
     59  for (it_read = it_write = nalUnitBuf.begin(); it_read != nalUnitBuf.end(); it_read++, it_write++, pos++)
    5860  {
    5961    assert(zeroCount < 2 || *it_read >= 0x03);
    6062    if (zeroCount == 2 && *it_read == 0x03)
    6163    {
     64      bitstream->pushEmulationPreventionByteLocation( pos );
     65      pos++;
    6266      it_read++;
    6367      zeroCount = 0;
     
    109113  if ( nalu.m_temporalId )
    110114  {
    111     assert( nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_BLA
    112          && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_BLANT
     115    assert( nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_BLA_W_LP
     116         && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_BLA_W_RADL
    113117         && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_BLA_N_LP
    114          && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_IDR
     118         && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_IDR_W_RADL
    115119         && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_IDR_N_LP
    116120         && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_CRA
     
    122126  else
    123127  {
    124     assert( nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_TLA
     128    assert( nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_TLA_R
    125129         && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_TSA_N
    126130         && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_STSA_R
     
    136140  /* perform anti-emulation prevention */
    137141  TComInputBitstream *pcBitstream = new TComInputBitstream(NULL);
    138   convertPayloadToRBSP(nalUnitBuf, (nalUnitBuf[0] & 64) == 0);
     142  convertPayloadToRBSP(nalUnitBuf, pcBitstream, (nalUnitBuf[0] & 64) == 0);
    139143 
    140144  nalu.m_Bitstream = new TComInputBitstream(&nalUnitBuf);
     145  nalu.m_Bitstream->setEmulationPreventionByteLocation(pcBitstream->getEmulationPreventionByteLocation());
    141146  delete pcBitstream;
    142147  readNalUnitHeader(nalu);
  • branches/SHM-2.0-dev/source/Lib/TLibDecoder/SEIread.cpp

    r125 r133  
    9090    fprintf( g_hTrace, "=========== Decoding Unit Information SEI message ===========\n");
    9191    break;
     92#if J0149_TONE_MAPPING_SEI
     93  case SEI::TONE_MAPPING_INFO:
     94    fprintf( g_hTrace, "===========Tone Mapping Info SEI message ===========\n");
     95    break;
     96#endif
     97#if L0208_SOP_DESCRIPTION_SEI
     98  case SEI::SOP_DESCRIPTION:
     99    fprintf( g_hTrace, "=========== SOP Description SEI message ===========\n");
     100    break;
     101#endif
     102#if K0180_SCALABLE_NESTING_SEI
     103  case SEI::SCALABLE_NESTING:
     104    fprintf( g_hTrace, "=========== Scalable Nesting SEI message ===========\n");
     105    break;
     106#endif
    92107  default:
    93108    fprintf( g_hTrace, "=========== Unknown SEI message ===========\n");
     
    154169  SEI *sei = NULL;
    155170
    156   if(nalUnitType == NAL_UNIT_SEI)
     171  if(nalUnitType == NAL_UNIT_PREFIX_SEI)
    157172  {
    158173    switch (payloadType)
     
    219234      xParseSEIGradualDecodingRefreshInfo((SEIGradualDecodingRefreshInfo&) *sei, payloadSize);
    220235      break;
     236#if J0149_TONE_MAPPING_SEI
     237    case SEI::TONE_MAPPING_INFO:
     238      sei = new SEIToneMappingInfo;
     239      xParseSEIToneMappingInfo((SEIToneMappingInfo&) *sei, payloadSize);
     240      break;
     241#endif
     242#if L0208_SOP_DESCRIPTION_SEI
     243    case SEI::SOP_DESCRIPTION:
     244      sei = new SEISOPDescription;
     245      xParseSEISOPDescription((SEISOPDescription&) *sei, payloadSize);
     246      break;
     247#endif
     248#if K0180_SCALABLE_NESTING_SEI
     249    case SEI::SCALABLE_NESTING:
     250      sei = new SEIScalableNesting;
     251      xParseSEIScalableNesting((SEIScalableNesting&) *sei, nalUnitType, payloadSize, sps);
     252      break;
     253#endif
    221254    default:
    222255      for (UInt i = 0; i < payloadSize; i++)
     
    284317    {
    285318      UInt reservedPayloadExtensionData;
    286       READ_CODE (1, reservedPayloadExtensionData, "reserved_payload_extension_data");
     319      READ_FLAG (reservedPayloadExtensionData, "reserved_payload_extension_data");
    287320    }
    288321
    289322    UInt dummy;
    290     READ_CODE (1, dummy, "payload_bit_equal_to_one");
    291     READ_CODE (payloadBitsRemaining-1, dummy, "payload_bit_equal_to_zero");
     323    READ_FLAG (dummy, "payload_bit_equal_to_one"); payloadBitsRemaining--;
     324    while (payloadBitsRemaining)
     325    {
     326      READ_FLAG (dummy, "payload_bit_equal_to_zero"); payloadBitsRemaining--;
     327    }
    292328  }
    293329
     
    632668}
    633669
     670#if J0149_TONE_MAPPING_SEI
     671Void SEIReader::xParseSEIToneMappingInfo(SEIToneMappingInfo& sei, UInt /*payloadSize*/)
     672{
     673  Int i;
     674  UInt val;
     675  READ_UVLC( val, "tone_map_id" );                         sei.m_toneMapId = val;
     676  READ_FLAG( val, "tone_map_cancel_flag" );                sei.m_toneMapCancelFlag = val;
     677
     678  if ( !sei.m_toneMapCancelFlag )
     679  {
     680    READ_FLAG( val, "tone_map_persistence_flag" );         sei.m_toneMapPersistenceFlag = val;
     681    READ_CODE( 8, val, "coded_data_bit_depth" );           sei.m_codedDataBitDepth = val;
     682    READ_CODE( 8, val, "target_bit_depth" );               sei.m_targetBitDepth = val;
     683    READ_UVLC( val, "model_id" );                          sei.m_modelId = val;
     684    switch(sei.m_modelId)
     685    {
     686    case 0:
     687      {
     688        READ_CODE( 32, val, "min_value" );                 sei.m_minValue = val;
     689        READ_CODE( 32, val, "max_value" );                 sei.m_maxValue = val;
     690        break;
     691      }
     692    case 1:
     693      {
     694        READ_CODE( 32, val, "sigmoid_midpoint" );          sei.m_sigmoidMidpoint = val;
     695        READ_CODE( 32, val, "sigmoid_width" );             sei.m_sigmoidWidth = val;
     696        break;
     697      }
     698    case 2:
     699      {
     700        UInt num = 1u << sei.m_targetBitDepth;
     701        sei.m_startOfCodedInterval.resize(num+1);
     702        for(i = 0; i < num; i++)
     703        {
     704          READ_CODE( ((( sei.m_codedDataBitDepth + 7 ) >> 3 ) << 3), val, "start_of_coded_interval" );
     705          sei.m_startOfCodedInterval[i] = val;
     706        }
     707        sei.m_startOfCodedInterval[num] = 1u << sei.m_codedDataBitDepth;
     708        break;
     709      }
     710    case 3:
     711      {
     712        READ_CODE( 16, val,  "num_pivots" );                       sei.m_numPivots = val;
     713        sei.m_codedPivotValue.resize(sei.m_numPivots);
     714        sei.m_targetPivotValue.resize(sei.m_numPivots);
     715        for(i = 0; i < sei.m_numPivots; i++ )
     716        {
     717          READ_CODE( ((( sei.m_codedDataBitDepth + 7 ) >> 3 ) << 3), val, "coded_pivot_value" );
     718          sei.m_codedPivotValue[i] = val;
     719          READ_CODE( ((( sei.m_targetBitDepth + 7 ) >> 3 ) << 3),    val, "target_pivot_value" );
     720          sei.m_targetPivotValue[i] = val;
     721        }
     722        break;
     723      }
     724    case 4:
     725      {
     726        READ_CODE( 8, val, "camera_iso_speed_idc" );                     sei.m_cameraIsoSpeedValue = val;
     727        if( sei.m_cameraIsoSpeedValue == 255) //Extended_ISO
     728        {
     729          READ_CODE( 32,   val,   "camera_iso_speed_value" );            sei.m_cameraIsoSpeedValue = val;
     730        }
     731        READ_FLAG( val, "exposure_compensation_value_sign_flag" );       sei.m_exposureCompensationValueSignFlag = val;
     732        READ_CODE( 16, val, "exposure_compensation_value_numerator" );   sei.m_exposureCompensationValueNumerator = val;
     733        READ_CODE( 16, val, "exposure_compensation_value_denom_idc" );   sei.m_exposureCompensationValueDenomIdc = val;
     734        READ_CODE( 32, val, "ref_screen_luminance_white" );              sei.m_refScreenLuminanceWhite = val;
     735        READ_CODE( 32, val, "extended_range_white_level" );              sei.m_extendedRangeWhiteLevel = val;
     736        READ_CODE( 16, val, "nominal_black_level_luma_code_value" );     sei.m_nominalBlackLevelLumaCodeValue = val;
     737        READ_CODE( 16, val, "nominal_white_level_luma_code_value" );     sei.m_nominalWhiteLevelLumaCodeValue= val;
     738        READ_CODE( 16, val, "extended_white_level_luma_code_value" );    sei.m_extendedWhiteLevelLumaCodeValue = val;
     739        break;
     740      }
     741    default:
     742      {
     743        assert(!"Undefined SEIToneMapModelId");
     744        break;
     745      }
     746    }//switch model id
     747  }// if(!sei.m_toneMapCancelFlag)
     748
     749  xParseByteAlign();
     750}
     751#endif
     752
     753#if L0208_SOP_DESCRIPTION_SEI
     754Void SEIReader::xParseSEISOPDescription(SEISOPDescription &sei, UInt payloadSize)
     755{
     756  Int iCode;
     757  UInt uiCode;
     758
     759  READ_UVLC( uiCode,           "sop_seq_parameter_set_id"            ); sei.m_sopSeqParameterSetId = uiCode;
     760  READ_UVLC( uiCode,           "num_pics_in_sop_minus1"              ); sei.m_numPicsInSopMinus1 = uiCode;
     761  for (UInt i = 0; i <= sei.m_numPicsInSopMinus1; i++)
     762  {
     763    READ_CODE( 6, uiCode,                     "sop_desc_vcl_nalu_type" );  sei.m_sopDescVclNaluType[i] = uiCode;
     764    READ_CODE( 3, sei.m_sopDescTemporalId[i], "sop_desc_temporal_id"   );  sei.m_sopDescTemporalId[i] = uiCode;
     765    if (sei.m_sopDescVclNaluType[i] != NAL_UNIT_CODED_SLICE_IDR_W_RADL && sei.m_sopDescVclNaluType[i] != NAL_UNIT_CODED_SLICE_IDR_N_LP)
     766    {
     767      READ_UVLC( sei.m_sopDescStRpsIdx[i],    "sop_desc_st_rps_idx"    ); sei.m_sopDescStRpsIdx[i] = uiCode;
     768    }
     769    if (i > 0)
     770    {
     771      READ_SVLC( iCode,                       "sop_desc_poc_delta"     ); sei.m_sopDescPocDelta[i] = iCode;
     772    }
     773  }
     774
     775  xParseByteAlign();
     776}
     777#endif
     778
     779#if K0180_SCALABLE_NESTING_SEI
     780Void SEIReader::xParseSEIScalableNesting(SEIScalableNesting& sei, const NalUnitType nalUnitType, UInt payloadSize, TComSPS *sps)
     781{
     782  UInt uiCode;
     783  SEIMessages seis;
     784
     785  READ_FLAG( uiCode,            "bitstream_subset_flag"         ); sei.m_bitStreamSubsetFlag = uiCode;
     786  READ_FLAG( uiCode,            "nesting_op_flag"               ); sei.m_nestingOpFlag = uiCode;
     787  if (sei.m_nestingOpFlag)
     788  {
     789    READ_FLAG( uiCode,            "default_op_flag"               ); sei.m_defaultOpFlag = uiCode;
     790    READ_UVLC( uiCode,            "nesting_num_ops_minus1"        ); sei.m_nestingNumOpsMinus1 = uiCode;
     791    for (UInt i = sei.m_defaultOpFlag; i <= sei.m_nestingNumOpsMinus1; i++)
     792    {
     793      READ_CODE( 3,        uiCode,  "nesting_max_temporal_id_plus1"   ); sei.m_nestingMaxTemporalIdPlus1[i] = uiCode;
     794      READ_UVLC( uiCode,            "nesting_op_idx"                  ); sei.m_nestingOpIdx[i] = uiCode;
     795    }
     796  }
     797  else
     798  {
     799    READ_FLAG( uiCode,            "all_layers_flag"               ); sei.m_allLayersFlag       = uiCode;
     800    if (!sei.m_allLayersFlag)
     801    {
     802      READ_CODE( 3,        uiCode,  "nesting_no_op_max_temporal_id_plus1"  ); sei.m_nestingNoOpMaxTemporalIdPlus1 = uiCode;
     803      READ_UVLC( uiCode,            "nesting_num_layers_minus1"            ); sei.m_nestingNumLayersMinus1        = uiCode;
     804      for (UInt i = 0; i <= sei.m_nestingNumLayersMinus1; i++)
     805      {
     806        READ_CODE( 6,           uiCode,     "nesting_layer_id"      ); sei.m_nestingLayerId[i]   = uiCode;
     807      }
     808    }
     809  }
     810
     811  // byte alignment
     812  while ( m_pcBitstream->getNumBitsRead() % 8 != 0 )
     813  {
     814    UInt code;
     815    READ_FLAG( code, "nesting_zero_bit" );
     816  }
     817
     818  sei.m_callerOwnsSEIs = false;
     819
     820  // read nested SEI messages
     821  do {
     822    xReadSEImessage(sei.m_nestedSEIs, nalUnitType, sps);
     823  } while (m_pcBitstream->getNumBitsLeft() > 8);
     824
     825}
     826#endif
     827
    634828Void SEIReader::xParseByteAlign()
    635829{
  • branches/SHM-2.0-dev/source/Lib/TLibDecoder/SEIread.h

    r125 r133  
    7070  Void xParseSEITemporalLevel0Index   (SEITemporalLevel0Index &sei, UInt payloadSize);
    7171  Void xParseSEIGradualDecodingRefreshInfo (SEIGradualDecodingRefreshInfo &sei, UInt payloadSize);
     72#if J0149_TONE_MAPPING_SEI
     73  Void xParseSEIToneMappingInfo       (SEIToneMappingInfo& sei, UInt payloadSize);
     74#endif
     75#if L0208_SOP_DESCRIPTION_SEI
     76  Void xParseSEISOPDescription        (SEISOPDescription &sei, UInt payloadSize);
     77#endif
     78#if K0180_SCALABLE_NESTING_SEI
     79  Void xParseSEIScalableNesting       (SEIScalableNesting& sei, const NalUnitType nalUnitType, UInt payloadSize, TComSPS *sps);
     80#endif
    7281  Void xParseByteAlign();
    7382};
  • branches/SHM-2.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r125 r133  
    593593
    594594  READ_UVLC(     uiCode, "bit_depth_luma_minus8" );
    595   g_bitDepthY = 8 + uiCode;
    596   pcSPS->setBitDepthY(g_bitDepthY);
     595  pcSPS->setBitDepthY( uiCode + 8 );
    597596  pcSPS->setQpBDOffsetY( (Int) (6*uiCode) );
    598597
    599598  READ_UVLC( uiCode,    "bit_depth_chroma_minus8" );
    600   g_bitDepthC = 8 + uiCode;
    601   pcSPS->setBitDepthC(g_bitDepthC);
     599  pcSPS->setBitDepthC( uiCode + 8 );
    602600  pcSPS->setQpBDOffsetC( (Int) (6*uiCode) );
    603601
     
    608606  for(UInt i=0; i <= pcSPS->getMaxTLayers()-1; i++)
    609607  {
     608#if L0323_DPB
     609    READ_UVLC ( uiCode, "sps_max_dec_pic_buffering_minus1");
     610    pcSPS->setMaxDecPicBuffering( uiCode + 1, i);
     611#else
    610612    READ_UVLC ( uiCode, "sps_max_dec_pic_buffering");
    611613    pcSPS->setMaxDecPicBuffering( uiCode, i);
     614#endif
    612615    READ_UVLC ( uiCode, "sps_num_reorder_pics" );
    613616    pcSPS->setNumReorderPics(uiCode, i);
     
    628631
    629632  READ_UVLC( uiCode, "log2_min_coding_block_size_minus3" );
    630   UInt log2MinCUSize = uiCode + 3;
     633  Int log2MinCUSize = uiCode + 3;
     634  pcSPS->setLog2MinCodingBlockSize(log2MinCUSize);
    631635  READ_UVLC( uiCode, "log2_diff_max_min_coding_block_size" );
    632   UInt uiMaxCUDepthCorrect = uiCode;
    633   pcSPS->setMaxCUWidth  ( 1<<(log2MinCUSize + uiMaxCUDepthCorrect) ); g_uiMaxCUWidth  = 1<<(log2MinCUSize + uiMaxCUDepthCorrect);
    634   pcSPS->setMaxCUHeight ( 1<<(log2MinCUSize + uiMaxCUDepthCorrect) ); g_uiMaxCUHeight = 1<<(log2MinCUSize + uiMaxCUDepthCorrect);
     636  pcSPS->setLog2DiffMaxMinCodingBlockSize(uiCode);
     637  Int maxCUDepthDelta = uiCode;
     638  pcSPS->setMaxCUWidth  ( 1<<(log2MinCUSize + maxCUDepthDelta) );
     639  pcSPS->setMaxCUHeight ( 1<<(log2MinCUSize + maxCUDepthDelta) );
    635640  READ_UVLC( uiCode, "log2_min_transform_block_size_minus2" );   pcSPS->setQuadtreeTULog2MinSize( uiCode + 2 );
    636641
     
    640645  READ_UVLC( uiCode, "max_transform_hierarchy_depth_inter" );    pcSPS->setQuadtreeTUMaxDepthInter( uiCode+1 );
    641646  READ_UVLC( uiCode, "max_transform_hierarchy_depth_intra" );    pcSPS->setQuadtreeTUMaxDepthIntra( uiCode+1 );
    642   g_uiAddCUDepth = 0;
    643   while( ( pcSPS->getMaxCUWidth() >> uiMaxCUDepthCorrect ) > ( 1 << ( pcSPS->getQuadtreeTULog2MinSize() + g_uiAddCUDepth )  ) )
    644   {
    645     g_uiAddCUDepth++;
    646   }
    647   pcSPS->setMaxCUDepth( uiMaxCUDepthCorrect+g_uiAddCUDepth  );
    648   g_uiMaxCUDepth  = uiMaxCUDepthCorrect+g_uiAddCUDepth;
    649   // BB: these parameters may be removed completly and replaced by the fixed values
    650   pcSPS->setMinTrDepth( 0 );
    651   pcSPS->setMaxTrDepth( 1 );
     647
     648  Int addCuDepth = max (0, log2MinCUSize - (Int)pcSPS->getQuadtreeTULog2MinSize() );
     649  pcSPS->setMaxCUDepth( maxCUDepthDelta + addCuDepth );
     650
    652651  READ_FLAG( uiCode, "scaling_list_enabled_flag" );                 pcSPS->setScalingListFlag ( uiCode );
    653652  if(pcSPS->getScalingListFlag())
     
    746745  for(UInt i = 0; i <= pcVPS->getMaxTLayers()-1; i++)
    747746  {
     747#if L0323_DPB
     748    READ_UVLC( uiCode,  "vps_max_dec_pic_buffering_minus1[i]" );     pcVPS->setMaxDecPicBuffering( uiCode + 1, i );
     749#else
    748750    READ_UVLC( uiCode,  "vps_max_dec_pic_buffering[i]" );     pcVPS->setMaxDecPicBuffering( uiCode, i );
     751#endif
    749752    READ_UVLC( uiCode,  "vps_num_reorder_pics[i]" );          pcVPS->setNumReorderPics( uiCode, i );
    750753    READ_UVLC( uiCode,  "vps_max_latency_increase[i]" );      pcVPS->setMaxLatencyIncrease( uiCode, i );
     
    10741077        iPOCmsb = iPrevPOCmsb;
    10751078      }
    1076       if ( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA
    1077         || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLANT
     1079      if ( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP
     1080        || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL
    10781081        || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP )
    10791082      {
     
    10841087
    10851088      TComReferencePictureSet* rps;
     1089      rps = rpcSlice->getLocalRPS();
     1090      rpcSlice->setRPS(rps);
    10861091      READ_FLAG( uiCode, "short_term_ref_pic_set_sps_flag" );
    10871092      if(uiCode == 0) // use short-term reference picture set explicitly signalled in slice header
    10881093      {
    1089         rps = rpcSlice->getLocalRPS();
    10901094        parseShortTermRefPicSet(sps,rps, sps->getRPSList()->getNumberOfReferencePictureSets());
    1091         rpcSlice->setRPS(rps);
    10921095      }
    10931096      else // use reference to short-term reference picture set in PPS
     
    11061109          uiCode = 0;
    11071110        }
    1108         rpcSlice->setRPS(sps->getRPSList()->getReferencePictureSet(uiCode));
    1109 
    1110         rps = rpcSlice->getRPS();
     1111        memcpy(rps,sps->getRPSList()->getReferencePictureSet(uiCode),sizeof(TComReferencePictureSet));
    11111112      }
    11121113      if(sps->getLongTermRefsPresent())
     
    11311132        rps->setNumberOfLongtermPictures(numOfLtrp);
    11321133        Int maxPicOrderCntLSB = 1 << rpcSlice->getSPS()->getBitsForPOC();
    1133         Int prevLSB = 0, prevDeltaMSB = 0, deltaPocMSBCycleLT = 0;;
     1134        Int prevDeltaMSB = 0, deltaPocMSBCycleLT = 0;;
    11341135        for(Int j=offset+rps->getNumberOfLongtermPictures()-1, k = 0; k < numOfLtrp; j--, k++)
    11351136        {
     
    11581159            READ_UVLC( uiCode, "delta_poc_msb_cycle_lt[i]" );
    11591160            Bool deltaFlag = false;
    1160             //            First LTRP                               || First LTRP from SH           || curr LSB    != prev LSB
    1161             if( (j == offset+rps->getNumberOfLongtermPictures()-1) || (j == offset+(numOfLtrp-numLtrpInSPS)-1) || (pocLsbLt != prevLSB) )
     1161            //            First LTRP                               || First LTRP from SH
     1162            if( (j == offset+rps->getNumberOfLongtermPictures()-1) || (j == offset+(numOfLtrp-numLtrpInSPS)-1) )
    11621163            {
    11631164              deltaFlag = true;
     
    11841185            rps->setCheckLTMSBPresent(j,false); 
    11851186          }
    1186           prevLSB = pocLsbLt;
    11871187          prevDeltaMSB = deltaPocMSBCycleLT;
    11881188        }
     
    11901190        rps->setNumberOfPictures(offset);       
    11911191      } 
    1192       if ( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA
    1193         || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLANT
     1192      if ( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP
     1193        || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL
    11941194        || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP )
    11951195      {
     
    14231423        if(!rpcSlice->getDeblockingFilterDisable())
    14241424        {
    1425           READ_SVLC( iCode, "beta_offset_div2" );                       rpcSlice->setDeblockingFilterBetaOffsetDiv2(iCode);
    1426           READ_SVLC( iCode, "tc_offset_div2" );                         rpcSlice->setDeblockingFilterTcOffsetDiv2(iCode);
     1425          READ_SVLC( iCode, "slice_beta_offset_div2" );                       rpcSlice->setDeblockingFilterBetaOffsetDiv2(iCode);
     1426          assert(rpcSlice->getDeblockingFilterBetaOffsetDiv2() >= -6 &&
     1427                 rpcSlice->getDeblockingFilterBetaOffsetDiv2() <=  6);
     1428          READ_SVLC( iCode, "slice_tc_offset_div2" );                         rpcSlice->setDeblockingFilterTcOffsetDiv2(iCode);
     1429          assert(rpcSlice->getDeblockingFilterTcOffsetDiv2() >= -6 &&
     1430                 rpcSlice->getDeblockingFilterTcOffsetDiv2() <=  6);
    14271431        }
    14281432      }
     
    14561460  }
    14571461 
    1458   if( pps->getTilesEnabledFlag() || pps->getEntropyCodingSyncEnabledFlag() )
    1459   {
    14601462    UInt *entryPointOffset          = NULL;
    14611463    UInt numEntryPointOffsets, offsetLenMinus1;
    1462 
     1464  if( pps->getTilesEnabledFlag() || pps->getEntropyCodingSyncEnabledFlag() )
     1465  {
    14631466    READ_UVLC(numEntryPointOffsets, "num_entry_point_offsets"); rpcSlice->setNumEntryPointOffsets ( numEntryPointOffsets );
    14641467    if (numEntryPointOffsets>0)
     
    14771480#endif
    14781481    }
     1482  }
     1483  else
     1484  {
     1485    rpcSlice->setNumEntryPointOffsets ( 0 );
     1486  }
     1487
     1488  if(pps->getSliceHeaderExtensionPresentFlag())
     1489  {
     1490    READ_UVLC(uiCode,"slice_header_extension_length");
     1491    for(Int i=0; i<uiCode; i++)
     1492    {
     1493      UInt ignore;
     1494      READ_CODE(8,ignore,"slice_header_extension_data_byte");
     1495    }
     1496  }
     1497  m_pcBitstream->readByteAlignment();
     1498
     1499  if( pps->getTilesEnabledFlag() || pps->getEntropyCodingSyncEnabledFlag() )
     1500  {
     1501    Int endOfSliceHeaderLocation = m_pcBitstream->getByteLocation();
     1502    Int  curEntryPointOffset     = 0;
     1503    Int  prevEntryPointOffset    = 0;
     1504    for (UInt idx=0; idx<numEntryPointOffsets; idx++)
     1505    {
     1506      curEntryPointOffset += entryPointOffset[ idx ];
     1507
     1508      Int emulationPreventionByteCount = 0;
     1509      for ( UInt curByteIdx  = 0; curByteIdx<m_pcBitstream->numEmulationPreventionBytesRead(); curByteIdx++ )
     1510      {
     1511        if ( m_pcBitstream->getEmulationPreventionByteLocation( curByteIdx ) >= ( prevEntryPointOffset + endOfSliceHeaderLocation ) &&
     1512             m_pcBitstream->getEmulationPreventionByteLocation( curByteIdx ) <  ( curEntryPointOffset  + endOfSliceHeaderLocation ) )
     1513        {
     1514          emulationPreventionByteCount++;
     1515        }
     1516      }
     1517
     1518      entryPointOffset[ idx ] -= emulationPreventionByteCount;
     1519      prevEntryPointOffset = curEntryPointOffset;
     1520    }
    14791521
    14801522    if ( pps->getTilesEnabledFlag() )
     
    15121554    }
    15131555  }
    1514   else
    1515   {
    1516     rpcSlice->setNumEntryPointOffsets ( 0 );
    1517   }
    1518 
    1519   if(pps->getSliceHeaderExtensionPresentFlag())
    1520   {
    1521     READ_UVLC(uiCode,"slice_header_extension_length");
    1522     for(Int i=0; i<uiCode; i++)
    1523     {
    1524       UInt ignore;
    1525       READ_CODE(8,ignore,"slice_header_extension_data_byte");
    1526     }
    1527   }
    1528   m_pcBitstream->readByteAlignment();
     1556
    15291557  return;
    15301558}
     
    17711799// ====================================================================================================================
    17721800
    1773 
    1774 /** Parse PCM alignment zero bits.
    1775 * \returns Void
    1776 */
    1777 Void TDecCavlc::xReadPCMAlignZero( )
    1778 {
    1779   UInt uiNumberOfBits = m_pcBitstream->getNumBitsUntilByteAligned();
    1780 
    1781   if(uiNumberOfBits)
    1782   {
    1783     UInt uiBits;
    1784     UInt uiSymbol;
    1785 
    1786     for(uiBits = 0; uiBits < uiNumberOfBits; uiBits++)
    1787     {
    1788       xReadFlag( uiSymbol );
    1789       assert( uiSymbol == 0 );
    1790     }
    1791   }
    1792 }
    1793 
    1794 Void TDecCavlc::xReadUnaryMaxSymbol( UInt& ruiSymbol, UInt uiMaxSymbol )
    1795 {
    1796   if (uiMaxSymbol == 0)
    1797   {
    1798     ruiSymbol = 0;
    1799     return;
    1800   }
    1801 
    1802   xReadFlag( ruiSymbol );
    1803 
    1804   if (ruiSymbol == 0 || uiMaxSymbol == 1)
    1805   {
    1806     return;
    1807   }
    1808 
    1809   UInt uiSymbol = 0;
    1810   UInt uiCont;
    1811 
    1812   do
    1813   {
    1814     xReadFlag( uiCont );
    1815     uiSymbol++;
    1816   }
    1817   while( uiCont && (uiSymbol < uiMaxSymbol-1) );
    1818 
    1819   if( uiCont && (uiSymbol == uiMaxSymbol-1) )
    1820   {
    1821     uiSymbol++;
    1822   }
    1823 
    1824   ruiSymbol = uiSymbol;
    1825 }
    1826 
    1827 Void TDecCavlc::xReadExGolombLevel( UInt& ruiSymbol )
    1828 {
    1829   UInt uiSymbol ;
    1830   UInt uiCount = 0;
    1831   do
    1832   {
    1833     xReadFlag( uiSymbol );
    1834     uiCount++;
    1835   }
    1836   while( uiSymbol && (uiCount != 13));
    1837 
    1838   ruiSymbol = uiCount-1;
    1839 
    1840   if( uiSymbol )
    1841   {
    1842     xReadEpExGolomb( uiSymbol, 0 );
    1843     ruiSymbol += uiSymbol+1;
    1844   }
    1845 
    1846   return;
    1847 }
    1848 
    1849 Void TDecCavlc::xReadEpExGolomb( UInt& ruiSymbol, UInt uiCount )
    1850 {
    1851   UInt uiSymbol = 0;
    1852   UInt uiBit = 1;
    1853 
    1854 
    1855   while( uiBit )
    1856   {
    1857     xReadFlag( uiBit );
    1858     uiSymbol += uiBit << uiCount++;
    1859   }
    1860 
    1861   uiCount--;
    1862   while( uiCount-- )
    1863   {
    1864     xReadFlag( uiBit );
    1865     uiSymbol += uiBit << uiCount;
    1866   }
    1867 
    1868   ruiSymbol = uiSymbol;
    1869 
    1870   return;
    1871 }
    1872 
    1873 UInt TDecCavlc::xGetBit()
    1874 {
    1875   UInt ruiCode;
    1876   m_pcBitstream->read( 1, ruiCode );
    1877   return ruiCode;
    1878 }
    1879 
    1880 
    18811801/** parse explicit wp tables
    18821802* \param TComSlice* pcSlice
     
    18951815  // decode delta_luma_log2_weight_denom :
    18961816  READ_UVLC( uiLog2WeightDenomLuma, "luma_log2_weight_denom" );     // ue(v): luma_log2_weight_denom
     1817  assert( uiLog2WeightDenomLuma <= 7 );
    18971818  if( bChroma )
    18981819  {
    18991820    READ_SVLC( iDeltaDenom, "delta_chroma_log2_weight_denom" );     // se(v): delta_chroma_log2_weight_denom
    19001821    assert((iDeltaDenom + (Int)uiLog2WeightDenomLuma)>=0);
     1822    assert((iDeltaDenom + (Int)uiLog2WeightDenomLuma)<=7);
    19011823    uiLog2WeightDenomChroma = (UInt)(iDeltaDenom + uiLog2WeightDenomLuma);
    19021824  }
     
    19371859        Int iDeltaWeight;
    19381860        READ_SVLC( iDeltaWeight, "delta_luma_weight_lX" );  // se(v): delta_luma_weight_l0[i]
     1861        assert( iDeltaWeight >= -128 );
     1862        assert( iDeltaWeight <=  127 );
    19391863        wp[0].iWeight = (iDeltaWeight + (1<<wp[0].uiLog2WeightDenom));
    19401864        READ_SVLC( wp[0].iOffset, "luma_offset_lX" );       // se(v): luma_offset_l0[i]
     1865        assert( wp[0].iOffset >= -128 );
     1866        assert( wp[0].iOffset <=  127 );
    19411867      }
    19421868      else
     
    19531879            Int iDeltaWeight;
    19541880            READ_SVLC( iDeltaWeight, "delta_chroma_weight_lX" );  // se(v): chroma_weight_l0[i][j]
     1881            assert( iDeltaWeight >= -128 );
     1882            assert( iDeltaWeight <=  127 );
    19551883            wp[j].iWeight = (iDeltaWeight + (1<<wp[1].uiLog2WeightDenom));
    19561884
    19571885            Int iDeltaChroma;
    19581886            READ_SVLC( iDeltaChroma, "delta_chroma_offset_lX" );  // se(v): delta_chroma_offset_l0[i][j]
     1887            assert( iDeltaChroma >= -512 );
     1888            assert( iDeltaChroma <=  511 );
    19591889            Int pred = ( 128 - ( ( 128*wp[j].iWeight)>>(wp[j].uiLog2WeightDenom) ) );
    19601890            wp[j].iOffset = Clip3(-128, 127, (iDeltaChroma + pred) );
  • branches/SHM-2.0-dev/source/Lib/TLibDecoder/TDecCAVLC.h

    r125 r133  
    6161 
    6262protected:
    63   Void  xReadEpExGolomb       ( UInt& ruiSymbol, UInt uiCount );
    64   Void  xReadExGolombLevel    ( UInt& ruiSymbol );
    65   Void  xReadUnaryMaxSymbol   ( UInt& ruiSymbol, UInt uiMaxSymbol );
    66  
    67   Void  xReadPCMAlignZero     ();
    68 
    69   UInt  xGetBit             ();
    70  
    7163  void  parseShortTermRefPicSet            (TComSPS* pcSPS, TComReferencePictureSet* pcRPS, Int idx);
    72 private:
    7364 
    7465public:
  • branches/SHM-2.0-dev/source/Lib/TLibDecoder/TDecSlice.h

    r125 r133  
    9191  Void      initCtxMem(  UInt i );
    9292  Void      setCtxMem( TDecSbac* sb, Int b )   { CTXMem[b] = sb; }
     93  Int       getCtxMemSize( )                   { return (Int)CTXMem.size(); }
    9394#if SVC_EXTENSION
    9495  TDecTop*  getLayerDec   ( UInt LayerId )  { return m_ppcTDecTop[LayerId]; } 
  • branches/SHM-2.0-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r125 r133  
    231231  }
    232232
     233#if L0323_DPB
     234  m_iMaxRefPicNum = pcSlice->getSPS()->getMaxDecPicBuffering(pcSlice->getTLayer())+pcSlice->getSPS()->getNumReorderPics(pcSlice->getTLayer());     // m_uiMaxDecPicBuffering has the space for the picture currently being decoded
     235#else
    233236  m_iMaxRefPicNum = pcSlice->getSPS()->getMaxDecPicBuffering(pcSlice->getTLayer())+pcSlice->getSPS()->getNumReorderPics(pcSlice->getTLayer()) + 1; // +1 to have space for the picture currently being decoded
     237#endif
    234238  if (m_cListPic.size() < (UInt)m_iMaxRefPicNum)
    235239  {
     
    405409  assert (sps != 0);
    406410
    407   if( false == m_parameterSetManagerDecoder[m_layerId].activatePPS(m_apcSlicePilot->getPPSId(), m_apcSlicePilot->getIdrPicFlag()) )
     411  if( false == m_parameterSetManagerDecoder[m_layerId].activatePPS(m_apcSlicePilot->getPPSId(), m_apcSlicePilot->isIRAP()) )
    408412#else
    409413  m_parameterSetManagerDecoder.applyPrefetchedPS();
     
    415419  assert (sps != 0);
    416420
    417   if (false == m_parameterSetManagerDecoder.activatePPS(m_apcSlicePilot->getPPSId(),m_apcSlicePilot->getIdrPicFlag()))
     421  if (false == m_parameterSetManagerDecoder.activatePPS(m_apcSlicePilot->getPPSId(),m_apcSlicePilot->isIRAP()))
    418422#endif
    419423  {
    420424    printf ("Parameter set activation failed!");
    421425    assert (0);
     426  }
     427
     428  if( pps->getDependentSliceSegmentsEnabledFlag() )
     429  {
     430    Int NumCtx = pps->getEntropyCodingSyncEnabledFlag()?2:1;
     431
     432    if (m_cSliceDecoder.getCtxMemSize() != NumCtx)
     433    {
     434      m_cSliceDecoder.initCtxMem(NumCtx);
     435      for ( UInt st = 0; st < NumCtx; st++ )
     436      {
     437        TDecSbac* ctx = NULL;
     438        ctx = new TDecSbac;
     439        ctx->init( &m_cBinCABAC );
     440        m_cSliceDecoder.setCtxMem( ctx, st );
     441      }
     442    }
    422443  }
    423444
     
    428449  pps->setMinCuDQPSize( sps->getMaxCUWidth() >> ( pps->getMaxCuDQPDepth()) );
    429450
    430   for (Int i = 0; i < sps->getMaxCUDepth() - g_uiAddCUDepth; i++)
     451  g_bitDepthY     = sps->getBitDepthY();
     452  g_bitDepthC     = sps->getBitDepthC();
     453  g_uiMaxCUWidth  = sps->getMaxCUWidth();
     454  g_uiMaxCUHeight = sps->getMaxCUHeight();
     455  g_uiMaxCUDepth  = sps->getMaxCUDepth();
     456  g_uiAddCUDepth  = max (0, sps->getLog2MinCodingBlockSize() - (Int)sps->getQuadtreeTULog2MinSize() );
     457
     458  for (Int i = 0; i < sps->getLog2DiffMaxMinCodingBlockSize(); i++)
    431459  {
    432460    sps->setAMPAcc( i, sps->getUseAMP() );
    433461  }
    434462
    435   for (Int i = sps->getMaxCUDepth() - g_uiAddCUDepth; i < sps->getMaxCUDepth(); i++)
     463  for (Int i = sps->getLog2DiffMaxMinCodingBlockSize(); i < sps->getMaxCUDepth(); i++)
    436464  {
    437465    sps->setAMPAcc( i, 0 );
     
    439467
    440468  m_cSAO.destroy();
    441   m_cSAO.create( sps->getPicWidthInLumaSamples(), sps->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight );
    442   m_cLoopFilter.        create( g_uiMaxCUDepth );
     469  m_cSAO.create( sps->getPicWidthInLumaSamples(), sps->getPicHeightInLumaSamples(), sps->getMaxCUWidth(), sps->getMaxCUHeight() );
     470  m_cLoopFilter.create( sps->getMaxCUDepth() );
    443471}
    444472
     
    467495
    468496  m_apcSlicePilot->setNalUnitType(nalu.m_nalUnitType);
    469   if((m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_TRAIL_N) ||
    470      (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_TSA_N) ||
    471      (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_STSA_N))
    472   {
    473     m_apcSlicePilot->setTemporalLayerNonReferenceFlag(true);
    474   }
     497  Bool nonReferenceFlag = (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_TRAIL_N ||
     498                           m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_TSA_N   ||
     499                           m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_STSA_N  ||
     500                           m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RADL_N  ||
     501                           m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_N);
     502  m_apcSlicePilot->setTemporalLayerNonReferenceFlag(nonReferenceFlag);
     503 
    475504  m_apcSlicePilot->setReferenced(true); // Putting this as true ensures that picture is referenced the first time it is in an RPS
    476505  m_apcSlicePilot->setTLayerInfo(nalu.m_temporalId);
     
    482511#endif
    483512  if (m_apcSlicePilot->isNextSlice())
    484   {
    485513    // Skip pictures due to random access
    486514    if (isRandomAccessSkipPicture(iSkipFrame, iPOCLastDisplay))
     
    493521      return false;
    494522    }
    495   }
    496523
    497524  // exit when a new picture is found
     
    506533  }
    507534#else
    508   if (m_apcSlicePilot->isNextSlice() && m_apcSlicePilot->getPOC()!=m_prevPOC && !m_bFirstSliceInSequence)
     535  //we should only get a different poc for a new picture (with CTU address==0)
     536  if (m_apcSlicePilot->isNextSlice() && m_apcSlicePilot->getPOC()!=m_prevPOC && !m_bFirstSliceInSequence && (!m_apcSlicePilot->getSliceCurStartCUAddr()==0))
     537  {
     538    printf ("Warning, the first slice of a picture might have been lost!\n");
     539  }
     540  // exit when a new picture is found
     541  if (m_apcSlicePilot->isNextSlice() && (m_apcSlicePilot->getSliceCurStartCUAddr() == 0 && !m_bFirstSliceInPicture) && !m_bFirstSliceInSequence )
    509542  {
    510543    if (m_prevPOC >= m_pocRandomAccess)
     
    732765  if (bNextSlice)
    733766  {
    734     pcSlice->checkCRA(pcSlice->getRPS(), m_pocCRA, m_prevRAPisBLA );
     767    pcSlice->checkCRA(pcSlice->getRPS(), m_pocCRA, m_prevRAPisBLA, m_cListPic );
    735768    // Set reference list
    736769#if REF_LIST_BUGFIX
    737770    if (m_layerId == 0)
    738     {
    739       pcSlice->setRefPicList( m_cListPic );
    740     }
     771#endif
     772#if FIX1071
     773    pcSlice->setRefPicList( m_cListPic, true );
    741774#else
    742775    pcSlice->setRefPicList( m_cListPic );
     
    839872    //---------------
    840873    pcSlice->setRefPOCList();
     874#if !L0034_COMBINED_LIST_CLEANUP
    841875    pcSlice->setNoBackPredFlag( false );
    842876    if ( pcSlice->getSliceType() == B_SLICE )
     
    855889      }
    856890    }
     891#endif
    857892  }
    858893
     
    947982{
    948983#if SVC_EXTENSION
    949   if(nalUnitType == NAL_UNIT_SEI_SUFFIX)
     984  if(nalUnitType == NAL_UNIT_SUFFIX_SEI)
    950985  {
    951986    m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder[m_layerId].getActiveSPS() );
     
    9671002  }
    9681003#else
    969   if(nalUnitType == NAL_UNIT_SEI_SUFFIX)
     1004  if(nalUnitType == NAL_UNIT_SUFFIX_SEI)
    9701005  {
    9711006    m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder.getActiveSPS() );
     
    10351070      return false;
    10361071     
    1037     case NAL_UNIT_SEI:
    1038     case NAL_UNIT_SEI_SUFFIX:
     1072    case NAL_UNIT_PREFIX_SEI:
     1073    case NAL_UNIT_SUFFIX_SEI:
    10391074      xDecodeSEI( nalu.m_Bitstream, nalu.m_nalUnitType );
    10401075      return false;
     
    10421077    case NAL_UNIT_CODED_SLICE_TRAIL_R:
    10431078    case NAL_UNIT_CODED_SLICE_TRAIL_N:
    1044     case NAL_UNIT_CODED_SLICE_TLA:
     1079    case NAL_UNIT_CODED_SLICE_TLA_R:
    10451080    case NAL_UNIT_CODED_SLICE_TSA_N:
    10461081    case NAL_UNIT_CODED_SLICE_STSA_R:
    10471082    case NAL_UNIT_CODED_SLICE_STSA_N:
    1048     case NAL_UNIT_CODED_SLICE_BLA:
    1049     case NAL_UNIT_CODED_SLICE_BLANT:
     1083    case NAL_UNIT_CODED_SLICE_BLA_W_LP:
     1084    case NAL_UNIT_CODED_SLICE_BLA_W_RADL:
    10501085    case NAL_UNIT_CODED_SLICE_BLA_N_LP:
    1051     case NAL_UNIT_CODED_SLICE_IDR:
     1086    case NAL_UNIT_CODED_SLICE_IDR_W_RADL:
    10521087    case NAL_UNIT_CODED_SLICE_IDR_N_LP:
    10531088    case NAL_UNIT_CODED_SLICE_CRA:
    10541089    case NAL_UNIT_CODED_SLICE_RADL_N:
    1055     case NAL_UNIT_CODED_SLICE_DLP:
     1090    case NAL_UNIT_CODED_SLICE_RADL_R:
    10561091    case NAL_UNIT_CODED_SLICE_RASL_N:
    1057     case NAL_UNIT_CODED_SLICE_TFD:
     1092    case NAL_UNIT_CODED_SLICE_RASL_R:
    10581093#if SVC_EXTENSION
    10591094      return xDecodeSlice(nalu, iSkipFrame, iPOCLastDisplay, curLayerId, bNewPOC);
     
    10771112Bool TDecTop::isSkipPictureForBLA(Int& iPOCLastDisplay)
    10781113{
    1079   if (m_prevRAPisBLA && m_apcSlicePilot->getPOC() < m_pocCRA && (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_TFD || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_N))
     1114  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))
    10801115  {
    10811116    iPOCLastDisplay++;
     
    11081143  {
    11091144    if (   m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA
    1110         || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA
     1145        || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP
    11111146        || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP
    1112         || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLANT )
     1147        || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL )
    11131148    {
    11141149      // set the POC random access since we need to skip the reordered pictures in the case of CRA/CRANT/BLA/BLANT.
    11151150      m_pocRandomAccess = m_apcSlicePilot->getPOC();
    11161151    }
    1117     else if ( m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP )
     1152    else if ( m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP )
    11181153    {
    11191154      m_pocRandomAccess = -MAX_INT; // no need to skip the reordered pictures in IDR, they are decodable.
     
    11311166  }
    11321167  // skip the reordered pictures, if necessary
    1133   else if (m_apcSlicePilot->getPOC() < m_pocRandomAccess && (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_TFD || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_N))
     1168  else if (m_apcSlicePilot->getPOC() < m_pocRandomAccess && (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_R || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_N))
    11341169  {
    11351170    iPOCLastDisplay++;
Note: See TracChangeset for help on using the changeset viewer.