Ignore:
Timestamp:
3 May 2013, 15:34:11 (12 years ago)
Author:
tech
Message:

Update to HM-10.1.

Location:
branches/HTM-DEV-0.1-dev/source/Lib/TLibDecoder
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-DEV-0.1-dev/source/Lib/TLibDecoder/NALread.cpp

    r324 r362  
    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/HTM-DEV-0.1-dev/source/Lib/TLibDecoder/SEIread.cpp

    r324 r362  
    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/HTM-DEV-0.1-dev/source/Lib/TLibDecoder/SEIread.h

    r324 r362  
    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/HTM-DEV-0.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r331 r362  
    175175}
    176176
    177 /** copy SAO parameter
    178 * \param dst 
    179 * \param src
    180 */
    181 inline Void copySaoOneLcuParam(SaoLcuParam* dst,  SaoLcuParam* src)
    182 {
    183   Int i;
    184   dst->partIdx = src->partIdx;
    185   dst->typeIdx = src->typeIdx;
    186   if (dst->typeIdx != -1)
    187   {
    188     dst->subTypeIdx = src->subTypeIdx ;
    189     dst->length  = src->length;
    190     for (i=0;i<dst->length;i++)
    191     {
    192       dst->offset[i] = src->offset[i];
    193     }
    194   }
    195   else
    196   {
    197     dst->length  = 0;
    198     for (i=0;i<SAO_BO_LEN;i++)
    199     {
    200       dst->offset[i] = 0;
    201     }
    202   }
    203 }
    204 
    205177Void TDecCavlc::parsePPS(TComPPS* pcPPS)
    206178{
     
    400372
    401373  READ_FLAG(     uiCode, "field_seq_flag");                           pcVUI->setFieldSeqFlag(uiCode);
    402   assert(pcVUI->getFieldSeqFlag() == false);        // not supported yet
    403374
    404375  READ_FLAG(uiCode, "frame_field_info_present_flag");                 pcVUI->setFrameFieldInfoPresentFlag(uiCode);
     
    593564
    594565  READ_UVLC(     uiCode, "bit_depth_luma_minus8" );
    595   g_bitDepthY = 8 + uiCode;
    596   pcSPS->setBitDepthY(g_bitDepthY);
     566  pcSPS->setBitDepthY( uiCode + 8 );
    597567  pcSPS->setQpBDOffsetY( (Int) (6*uiCode) );
    598568
    599569  READ_UVLC( uiCode,    "bit_depth_chroma_minus8" );
    600   g_bitDepthC = 8 + uiCode;
    601   pcSPS->setBitDepthC(g_bitDepthC);
     570  pcSPS->setBitDepthC( uiCode + 8 );
    602571  pcSPS->setQpBDOffsetC( (Int) (6*uiCode) );
    603572
     
    608577  for(UInt i=0; i <= pcSPS->getMaxTLayers()-1; i++)
    609578  {
     579#if L0323_DPB
     580    READ_UVLC ( uiCode, "sps_max_dec_pic_buffering_minus1");
     581    pcSPS->setMaxDecPicBuffering( uiCode + 1, i);
     582#else
    610583    READ_UVLC ( uiCode, "sps_max_dec_pic_buffering");
    611584    pcSPS->setMaxDecPicBuffering( uiCode, i);
     585#endif
    612586    READ_UVLC ( uiCode, "sps_num_reorder_pics" );
    613587    pcSPS->setNumReorderPics(uiCode, i);
     
    628602
    629603  READ_UVLC( uiCode, "log2_min_coding_block_size_minus3" );
    630   UInt log2MinCUSize = uiCode + 3;
     604  Int log2MinCUSize = uiCode + 3;
     605  pcSPS->setLog2MinCodingBlockSize(log2MinCUSize);
    631606  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);
     607  pcSPS->setLog2DiffMaxMinCodingBlockSize(uiCode);
     608  Int maxCUDepthDelta = uiCode;
     609  pcSPS->setMaxCUWidth  ( 1<<(log2MinCUSize + maxCUDepthDelta) );
     610  pcSPS->setMaxCUHeight ( 1<<(log2MinCUSize + maxCUDepthDelta) );
    635611  READ_UVLC( uiCode, "log2_min_transform_block_size_minus2" );   pcSPS->setQuadtreeTULog2MinSize( uiCode + 2 );
    636612
     
    640616  READ_UVLC( uiCode, "max_transform_hierarchy_depth_inter" );    pcSPS->setQuadtreeTUMaxDepthInter( uiCode+1 );
    641617  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 );
     618
     619  Int addCuDepth = max (0, log2MinCUSize - (Int)pcSPS->getQuadtreeTULog2MinSize() );
     620  pcSPS->setMaxCUDepth( maxCUDepthDelta + addCuDepth );
     621
    652622  READ_FLAG( uiCode, "scaling_list_enabled_flag" );                 pcSPS->setScalingListFlag ( uiCode );
    653623  if(pcSPS->getScalingListFlag())
     
    748718  for(UInt i = 0; i <= pcVPS->getMaxTLayers()-1; i++)
    749719  {
     720#if L0323_DPB
     721    READ_UVLC( uiCode,  "vps_max_dec_pic_buffering_minus1[i]" );     pcVPS->setMaxDecPicBuffering( uiCode + 1, i );
     722#else
    750723    READ_UVLC( uiCode,  "vps_max_dec_pic_buffering[i]" );     pcVPS->setMaxDecPicBuffering( uiCode, i );
     724#endif
    751725    READ_UVLC( uiCode,  "vps_num_reorder_pics[i]" );          pcVPS->setNumReorderPics( uiCode, i );
    752726    READ_UVLC( uiCode,  "vps_max_latency_increase[i]" );      pcVPS->setMaxLatencyIncrease( uiCode, i );
     
    10561030        iPOCmsb = iPrevPOCmsb;
    10571031      }
    1058       if ( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA
    1059         || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLANT
     1032      if ( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP
     1033        || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL
    10601034        || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP )
    10611035      {
     
    10661040
    10671041      TComReferencePictureSet* rps;
     1042      rps = rpcSlice->getLocalRPS();
     1043      rpcSlice->setRPS(rps);
    10681044      READ_FLAG( uiCode, "short_term_ref_pic_set_sps_flag" );
    10691045      if(uiCode == 0) // use short-term reference picture set explicitly signalled in slice header
    10701046      {
    1071         rps = rpcSlice->getLocalRPS();
    10721047        parseShortTermRefPicSet(sps,rps, sps->getRPSList()->getNumberOfReferencePictureSets());
    1073         rpcSlice->setRPS(rps);
    10741048      }
    10751049      else // use reference to short-term reference picture set in PPS
     
    10881062          uiCode = 0;
    10891063        }
    1090         rpcSlice->setRPS(sps->getRPSList()->getReferencePictureSet(uiCode));
    1091 
    1092         rps = rpcSlice->getRPS();
     1064        memcpy(rps,sps->getRPSList()->getReferencePictureSet(uiCode),sizeof(TComReferencePictureSet));
    10931065      }
    10941066      if(sps->getLongTermRefsPresent())
     
    11131085        rps->setNumberOfLongtermPictures(numOfLtrp);
    11141086        Int maxPicOrderCntLSB = 1 << rpcSlice->getSPS()->getBitsForPOC();
    1115         Int prevLSB = 0, prevDeltaMSB = 0, deltaPocMSBCycleLT = 0;;
     1087        Int prevDeltaMSB = 0, deltaPocMSBCycleLT = 0;;
    11161088        for(Int j=offset+rps->getNumberOfLongtermPictures()-1, k = 0; k < numOfLtrp; j--, k++)
    11171089        {
     
    11401112            READ_UVLC( uiCode, "delta_poc_msb_cycle_lt[i]" );
    11411113            Bool deltaFlag = false;
    1142             //            First LTRP                               || First LTRP from SH           || curr LSB    != prev LSB
    1143             if( (j == offset+rps->getNumberOfLongtermPictures()-1) || (j == offset+(numOfLtrp-numLtrpInSPS)-1) || (pocLsbLt != prevLSB) )
     1114            //            First LTRP                               || First LTRP from SH
     1115            if( (j == offset+rps->getNumberOfLongtermPictures()-1) || (j == offset+(numOfLtrp-numLtrpInSPS)-1) )
    11441116            {
    11451117              deltaFlag = true;
     
    11661138            rps->setCheckLTMSBPresent(j,false); 
    11671139          }
    1168           prevLSB = pocLsbLt;
    11691140          prevDeltaMSB = deltaPocMSBCycleLT;
    11701141        }
     
    11721143        rps->setNumberOfPictures(offset);       
    11731144      } 
    1174       if ( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA
    1175         || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLANT
     1145      if ( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP
     1146        || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL
    11761147        || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP )
    11771148      {
     
    14051376        if(!rpcSlice->getDeblockingFilterDisable())
    14061377        {
    1407           READ_SVLC( iCode, "beta_offset_div2" );                       rpcSlice->setDeblockingFilterBetaOffsetDiv2(iCode);
    1408           READ_SVLC( iCode, "tc_offset_div2" );                         rpcSlice->setDeblockingFilterTcOffsetDiv2(iCode);
     1378          READ_SVLC( iCode, "slice_beta_offset_div2" );                       rpcSlice->setDeblockingFilterBetaOffsetDiv2(iCode);
     1379          assert(rpcSlice->getDeblockingFilterBetaOffsetDiv2() >= -6 &&
     1380                 rpcSlice->getDeblockingFilterBetaOffsetDiv2() <=  6);
     1381          READ_SVLC( iCode, "slice_tc_offset_div2" );                         rpcSlice->setDeblockingFilterTcOffsetDiv2(iCode);
     1382          assert(rpcSlice->getDeblockingFilterTcOffsetDiv2() >= -6 &&
     1383                 rpcSlice->getDeblockingFilterTcOffsetDiv2() <=  6);
    14091384        }
    14101385      }
     
    14381413  }
    14391414 
    1440   if( pps->getTilesEnabledFlag() || pps->getEntropyCodingSyncEnabledFlag() )
    1441   {
    14421415    UInt *entryPointOffset          = NULL;
    14431416    UInt numEntryPointOffsets, offsetLenMinus1;
    1444 
     1417  if( pps->getTilesEnabledFlag() || pps->getEntropyCodingSyncEnabledFlag() )
     1418  {
    14451419    READ_UVLC(numEntryPointOffsets, "num_entry_point_offsets"); rpcSlice->setNumEntryPointOffsets ( numEntryPointOffsets );
    14461420    if (numEntryPointOffsets>0)
     
    14591433#endif
    14601434    }
     1435  }
     1436  else
     1437  {
     1438    rpcSlice->setNumEntryPointOffsets ( 0 );
     1439  }
     1440
     1441  if(pps->getSliceHeaderExtensionPresentFlag())
     1442  {
     1443    READ_UVLC(uiCode,"slice_header_extension_length");
     1444    for(Int i=0; i<uiCode; i++)
     1445    {
     1446      UInt ignore;
     1447      READ_CODE(8,ignore,"slice_header_extension_data_byte");
     1448    }
     1449  }
     1450  m_pcBitstream->readByteAlignment();
     1451
     1452  if( pps->getTilesEnabledFlag() || pps->getEntropyCodingSyncEnabledFlag() )
     1453  {
     1454    Int endOfSliceHeaderLocation = m_pcBitstream->getByteLocation();
     1455    Int  curEntryPointOffset     = 0;
     1456    Int  prevEntryPointOffset    = 0;
     1457    for (UInt idx=0; idx<numEntryPointOffsets; idx++)
     1458    {
     1459      curEntryPointOffset += entryPointOffset[ idx ];
     1460
     1461      Int emulationPreventionByteCount = 0;
     1462      for ( UInt curByteIdx  = 0; curByteIdx<m_pcBitstream->numEmulationPreventionBytesRead(); curByteIdx++ )
     1463      {
     1464        if ( m_pcBitstream->getEmulationPreventionByteLocation( curByteIdx ) >= ( prevEntryPointOffset + endOfSliceHeaderLocation ) &&
     1465             m_pcBitstream->getEmulationPreventionByteLocation( curByteIdx ) <  ( curEntryPointOffset  + endOfSliceHeaderLocation ) )
     1466        {
     1467          emulationPreventionByteCount++;
     1468        }
     1469      }
     1470
     1471      entryPointOffset[ idx ] -= emulationPreventionByteCount;
     1472      prevEntryPointOffset = curEntryPointOffset;
     1473    }
    14611474
    14621475    if ( pps->getTilesEnabledFlag() )
     
    14941507    }
    14951508  }
    1496   else
    1497   {
    1498     rpcSlice->setNumEntryPointOffsets ( 0 );
    1499   }
    1500 
    1501   if(pps->getSliceHeaderExtensionPresentFlag())
    1502   {
    1503     READ_UVLC(uiCode,"slice_header_extension_length");
    1504     for(Int i=0; i<uiCode; i++)
    1505     {
    1506       UInt ignore;
    1507       READ_CODE(8,ignore,"slice_header_extension_data_byte");
    1508     }
    1509   }
    1510   m_pcBitstream->readByteAlignment();
     1509
    15111510  return;
    15121511}
     
    17591758// ====================================================================================================================
    17601759
    1761 
    1762 /** Parse PCM alignment zero bits.
    1763 * \returns Void
    1764 */
    1765 Void TDecCavlc::xReadPCMAlignZero( )
    1766 {
    1767   UInt uiNumberOfBits = m_pcBitstream->getNumBitsUntilByteAligned();
    1768 
    1769   if(uiNumberOfBits)
    1770   {
    1771     UInt uiBits;
    1772     UInt uiSymbol;
    1773 
    1774     for(uiBits = 0; uiBits < uiNumberOfBits; uiBits++)
    1775     {
    1776       xReadFlag( uiSymbol );
    1777       assert( uiSymbol == 0 );
    1778     }
    1779   }
    1780 }
    1781 
    1782 Void TDecCavlc::xReadUnaryMaxSymbol( UInt& ruiSymbol, UInt uiMaxSymbol )
    1783 {
    1784   if (uiMaxSymbol == 0)
    1785   {
    1786     ruiSymbol = 0;
    1787     return;
    1788   }
    1789 
    1790   xReadFlag( ruiSymbol );
    1791 
    1792   if (ruiSymbol == 0 || uiMaxSymbol == 1)
    1793   {
    1794     return;
    1795   }
    1796 
    1797   UInt uiSymbol = 0;
    1798   UInt uiCont;
    1799 
    1800   do
    1801   {
    1802     xReadFlag( uiCont );
    1803     uiSymbol++;
    1804   }
    1805   while( uiCont && (uiSymbol < uiMaxSymbol-1) );
    1806 
    1807   if( uiCont && (uiSymbol == uiMaxSymbol-1) )
    1808   {
    1809     uiSymbol++;
    1810   }
    1811 
    1812   ruiSymbol = uiSymbol;
    1813 }
    1814 
    1815 Void TDecCavlc::xReadExGolombLevel( UInt& ruiSymbol )
    1816 {
    1817   UInt uiSymbol ;
    1818   UInt uiCount = 0;
    1819   do
    1820   {
    1821     xReadFlag( uiSymbol );
    1822     uiCount++;
    1823   }
    1824   while( uiSymbol && (uiCount != 13));
    1825 
    1826   ruiSymbol = uiCount-1;
    1827 
    1828   if( uiSymbol )
    1829   {
    1830     xReadEpExGolomb( uiSymbol, 0 );
    1831     ruiSymbol += uiSymbol+1;
    1832   }
    1833 
    1834   return;
    1835 }
    1836 
    1837 Void TDecCavlc::xReadEpExGolomb( UInt& ruiSymbol, UInt uiCount )
    1838 {
    1839   UInt uiSymbol = 0;
    1840   UInt uiBit = 1;
    1841 
    1842 
    1843   while( uiBit )
    1844   {
    1845     xReadFlag( uiBit );
    1846     uiSymbol += uiBit << uiCount++;
    1847   }
    1848 
    1849   uiCount--;
    1850   while( uiCount-- )
    1851   {
    1852     xReadFlag( uiBit );
    1853     uiSymbol += uiBit << uiCount;
    1854   }
    1855 
    1856   ruiSymbol = uiSymbol;
    1857 
    1858   return;
    1859 }
    1860 
    1861 UInt TDecCavlc::xGetBit()
    1862 {
    1863   UInt ruiCode;
    1864   m_pcBitstream->read( 1, ruiCode );
    1865   return ruiCode;
    1866 }
    1867 
    1868 
    18691760/** parse explicit wp tables
    18701761* \param TComSlice* pcSlice
     
    18831774  // decode delta_luma_log2_weight_denom :
    18841775  READ_UVLC( uiLog2WeightDenomLuma, "luma_log2_weight_denom" );     // ue(v): luma_log2_weight_denom
     1776  assert( uiLog2WeightDenomLuma <= 7 );
    18851777  if( bChroma )
    18861778  {
    18871779    READ_SVLC( iDeltaDenom, "delta_chroma_log2_weight_denom" );     // se(v): delta_chroma_log2_weight_denom
    18881780    assert((iDeltaDenom + (Int)uiLog2WeightDenomLuma)>=0);
     1781    assert((iDeltaDenom + (Int)uiLog2WeightDenomLuma)<=7);
    18891782    uiLog2WeightDenomChroma = (UInt)(iDeltaDenom + uiLog2WeightDenomLuma);
    18901783  }
     
    19251818        Int iDeltaWeight;
    19261819        READ_SVLC( iDeltaWeight, "delta_luma_weight_lX" );  // se(v): delta_luma_weight_l0[i]
     1820        assert( iDeltaWeight >= -128 );
     1821        assert( iDeltaWeight <=  127 );
    19271822        wp[0].iWeight = (iDeltaWeight + (1<<wp[0].uiLog2WeightDenom));
    19281823        READ_SVLC( wp[0].iOffset, "luma_offset_lX" );       // se(v): luma_offset_l0[i]
     1824        assert( wp[0].iOffset >= -128 );
     1825        assert( wp[0].iOffset <=  127 );
    19291826      }
    19301827      else
     
    19411838            Int iDeltaWeight;
    19421839            READ_SVLC( iDeltaWeight, "delta_chroma_weight_lX" );  // se(v): chroma_weight_l0[i][j]
     1840            assert( iDeltaWeight >= -128 );
     1841            assert( iDeltaWeight <=  127 );
    19431842            wp[j].iWeight = (iDeltaWeight + (1<<wp[1].uiLog2WeightDenom));
    19441843
    19451844            Int iDeltaChroma;
    19461845            READ_SVLC( iDeltaChroma, "delta_chroma_offset_lX" );  // se(v): delta_chroma_offset_l0[i][j]
     1846            assert( iDeltaChroma >= -512 );
     1847            assert( iDeltaChroma <=  511 );
    19471848            Int pred = ( 128 - ( ( 128*wp[j].iWeight)>>(wp[j].uiLog2WeightDenom) ) );
    19481849            wp[j].iOffset = Clip3(-128, 127, (iDeltaChroma + pred) );
  • branches/HTM-DEV-0.1-dev/source/Lib/TLibDecoder/TDecCAVLC.h

    r324 r362  
    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/HTM-DEV-0.1-dev/source/Lib/TLibDecoder/TDecSlice.h

    r324 r362  
    8484  Void      initCtxMem(  UInt i );
    8585  Void      setCtxMem( TDecSbac* sb, Int b )   { CTXMem[b] = sb; }
     86  Int       getCtxMemSize( )                   { return (Int)CTXMem.size(); }
    8687};
    8788
  • branches/HTM-DEV-0.1-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r324 r362  
    4242ParameterSetManagerDecoder TDecTop::m_parameterSetManagerDecoder;
    4343#endif
    44 
    4544//! \ingroup TLibDecoder
    4645//! \{
     
    149148  }
    150149
     150#if L0323_DPB
     151  m_iMaxRefPicNum = pcSlice->getSPS()->getMaxDecPicBuffering(pcSlice->getTLayer())+pcSlice->getSPS()->getNumReorderPics(pcSlice->getTLayer());     // m_uiMaxDecPicBuffering has the space for the picture currently being decoded
     152#else
    151153  m_iMaxRefPicNum = pcSlice->getSPS()->getMaxDecPicBuffering(pcSlice->getTLayer())+pcSlice->getSPS()->getNumReorderPics(pcSlice->getTLayer()) + 1; // +1 to have space for the picture currently being decoded
     154#endif
    152155  if (m_cListPic.size() < (UInt)m_iMaxRefPicNum)
    153156  {
     
    290293  assert (sps != 0);
    291294
    292   if (false == m_parameterSetManagerDecoder.activatePPS(m_apcSlicePilot->getPPSId(),m_apcSlicePilot->getIdrPicFlag()))
     295  if (false == m_parameterSetManagerDecoder.activatePPS(m_apcSlicePilot->getPPSId(),m_apcSlicePilot->isIRAP()))
    293296  {
    294297    printf ("Parameter set activation failed!");
     
    296299  }
    297300
     301  if( pps->getDependentSliceSegmentsEnabledFlag() )
     302  {
     303    Int NumCtx = pps->getEntropyCodingSyncEnabledFlag()?2:1;
     304
     305    if (m_cSliceDecoder.getCtxMemSize() != NumCtx)
     306    {
     307      m_cSliceDecoder.initCtxMem(NumCtx);
     308      for ( UInt st = 0; st < NumCtx; st++ )
     309      {
     310        TDecSbac* ctx = NULL;
     311        ctx = new TDecSbac;
     312        ctx->init( &m_cBinCABAC );
     313        m_cSliceDecoder.setCtxMem( ctx, st );
     314      }
     315    }
     316  }
     317
    298318  m_apcSlicePilot->setPPS(pps);
    299319  m_apcSlicePilot->setSPS(sps);
    300 
    301 #if H_MV
    302   m_apcSlicePilot->setVPS( m_parameterSetManagerDecoder.getActiveVPS() );
    303 #endif
    304 
    305320  pps->setSPS(sps);
    306321  pps->setNumSubstreams(pps->getEntropyCodingSyncEnabledFlag() ? ((sps->getPicHeightInLumaSamples() + sps->getMaxCUHeight() - 1) / sps->getMaxCUHeight()) * (pps->getNumColumnsMinus1() + 1) : 1);
    307322  pps->setMinCuDQPSize( sps->getMaxCUWidth() >> ( pps->getMaxCuDQPDepth()) );
    308323
    309   for (Int i = 0; i < sps->getMaxCUDepth() - g_uiAddCUDepth; i++)
     324  g_bitDepthY     = sps->getBitDepthY();
     325  g_bitDepthC     = sps->getBitDepthC();
     326  g_uiMaxCUWidth  = sps->getMaxCUWidth();
     327  g_uiMaxCUHeight = sps->getMaxCUHeight();
     328  g_uiMaxCUDepth  = sps->getMaxCUDepth();
     329  g_uiAddCUDepth  = max (0, sps->getLog2MinCodingBlockSize() - (Int)sps->getQuadtreeTULog2MinSize() );
     330
     331  for (Int i = 0; i < sps->getLog2DiffMaxMinCodingBlockSize(); i++)
    310332  {
    311333    sps->setAMPAcc( i, sps->getUseAMP() );
    312334  }
    313335
    314   for (Int i = sps->getMaxCUDepth() - g_uiAddCUDepth; i < sps->getMaxCUDepth(); i++)
     336  for (Int i = sps->getLog2DiffMaxMinCodingBlockSize(); i < sps->getMaxCUDepth(); i++)
    315337  {
    316338    sps->setAMPAcc( i, 0 );
     
    318340
    319341  m_cSAO.destroy();
    320   m_cSAO.create( sps->getPicWidthInLumaSamples(), sps->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight );
    321   m_cLoopFilter.        create( g_uiMaxCUDepth );
     342  m_cSAO.create( sps->getPicWidthInLumaSamples(), sps->getPicHeightInLumaSamples(), sps->getMaxCUWidth(), sps->getMaxCUHeight() );
     343  m_cLoopFilter.create( sps->getMaxCUDepth() );
    322344}
    323345
     
    345367
    346368  m_apcSlicePilot->setNalUnitType(nalu.m_nalUnitType);
    347   if((m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_TRAIL_N) ||
    348      (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_TSA_N) ||
    349      (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_STSA_N))
    350   {
    351     m_apcSlicePilot->setTemporalLayerNonReferenceFlag(true);
    352   }
     369  Bool nonReferenceFlag = (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_TRAIL_N ||
     370                           m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_TSA_N   ||
     371                           m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_STSA_N  ||
     372                           m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RADL_N  ||
     373                           m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_N);
     374  m_apcSlicePilot->setTemporalLayerNonReferenceFlag(nonReferenceFlag);
     375 
    353376  m_apcSlicePilot->setReferenced(true); // Putting this as true ensures that picture is referenced the first time it is in an RPS
    354377  m_apcSlicePilot->setTLayerInfo(nalu.m_temporalId);
     
    371394#endif
    372395#endif
    373 
    374   if (m_apcSlicePilot->isNextSlice())
    375   {
    376396    // Skip pictures due to random access
    377397    if (isRandomAccessSkipPicture(iSkipFrame, iPOCLastDisplay))
     
    384404      return false;
    385405    }
    386   }
    387 
     406
     407  //we should only get a different poc for a new picture (with CTU address==0)
     408  if (m_apcSlicePilot->isNextSlice() && m_apcSlicePilot->getPOC()!=m_prevPOC && !m_bFirstSliceInSequence && (!m_apcSlicePilot->getSliceCurStartCUAddr()==0))
     409  {
     410    printf ("Warning, the first slice of a picture might have been lost!\n");
     411  }
    388412  // exit when a new picture is found
    389   if (m_apcSlicePilot->isNextSlice() && m_apcSlicePilot->getPOC()!=m_prevPOC && !m_bFirstSliceInSequence)
     413  if (m_apcSlicePilot->isNextSlice() && (m_apcSlicePilot->getSliceCurStartCUAddr() == 0 && !m_bFirstSliceInPicture) && !m_bFirstSliceInSequence )
    390414  {
    391415    if (m_prevPOC >= m_pocRandomAccess)
     
    396420    m_prevPOC = m_apcSlicePilot->getPOC();
    397421  }
    398 
    399422#if H_MV
    400423  if ( newLayerFlag )
     
    403426  }
    404427#endif
    405 
    406 
    407428  // actual decoding starts here
    408429  xActivateParameterSets();
     
    419440    xCreateLostPicture(lostPoc-1);
    420441  }
    421 
    422442  if (m_bFirstSliceInPicture)
    423443  {
     
    425445    m_cPrediction.initTempBuff();
    426446    m_apcSlicePilot->applyReferencePictureSet(m_cListPic, m_apcSlicePilot->getRPS());
    427    
    428447#if H_MV
    429448    m_apcSlicePilot->createAndApplyIvReferencePictureSet( m_ivPicLists, m_refPicSetInterLayer );
    430449#endif
    431 
    432 
    433450    //  Get a new picture buffer
    434451    xGetNewPicBuffer (m_apcSlicePilot, pcPic);
     
    569586#endif
    570587#endif
    571 
    572588  if (bNextSlice)
    573589  {
    574     pcSlice->checkCRA(pcSlice->getRPS(), m_pocCRA, m_prevRAPisBLA );
     590    pcSlice->checkCRA(pcSlice->getRPS(), m_pocCRA, m_prevRAPisBLA, m_cListPic );
    575591    // Set reference list
    576 
    577592#if H_MV   
    578     pcSlice->setRefPicList( m_cListPic, m_refPicSetInterLayer );   
     593    pcSlice->setRefPicList( m_cListPic, true, m_refPicSetInterLayer );   
     594#else
     595#if FIX1071
     596    pcSlice->setRefPicList( m_cListPic, true );
    579597#else
    580598    pcSlice->setRefPicList( m_cListPic );
    581599#endif
    582600
     601#endif
    583602    // For generalized B
    584603    // note: maybe not existed case (always L0 is copied to L1 if L1 is empty)
     
    622641    //---------------
    623642    pcSlice->setRefPOCList();
     643#if !L0034_COMBINED_LIST_CLEANUP
    624644    pcSlice->setNoBackPredFlag( false );
    625645    if ( pcSlice->getSliceType() == B_SLICE )
     
    638658      }
    639659    }
     660#endif
    640661  }
    641662
     
    691712  m_cEntropyDecoder.decodePPS( pps );
    692713  m_parameterSetManagerDecoder.storePrefetchedPPS( pps );
    693 
    694   if( pps->getDependentSliceSegmentsEnabledFlag() )
    695   {
    696     Int NumCtx = pps->getEntropyCodingSyncEnabledFlag()?2:1;
    697     m_cSliceDecoder.initCtxMem(NumCtx);
    698     for ( UInt st = 0; st < NumCtx; st++ )
    699     {
    700       TDecSbac* ctx = NULL;
    701       ctx = new TDecSbac;
    702       ctx->init( &m_cBinCABAC );
    703       m_cSliceDecoder.setCtxMem( ctx, st );
    704     }
    705   }
    706714}
    707715
    708716Void TDecTop::xDecodeSEI( TComInputBitstream* bs, const NalUnitType nalUnitType )
    709717{
    710   if(nalUnitType == NAL_UNIT_SEI_SUFFIX)
     718  if(nalUnitType == NAL_UNIT_SUFFIX_SEI)
    711719  {
    712720    m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder.getActiveSPS() );
     
    753761      return false;
    754762     
    755     case NAL_UNIT_SEI:
    756     case NAL_UNIT_SEI_SUFFIX:
     763    case NAL_UNIT_PREFIX_SEI:
     764    case NAL_UNIT_SUFFIX_SEI:
    757765      xDecodeSEI( nalu.m_Bitstream, nalu.m_nalUnitType );
    758766      return false;
     
    760768    case NAL_UNIT_CODED_SLICE_TRAIL_R:
    761769    case NAL_UNIT_CODED_SLICE_TRAIL_N:
    762     case NAL_UNIT_CODED_SLICE_TLA:
     770    case NAL_UNIT_CODED_SLICE_TLA_R:
    763771    case NAL_UNIT_CODED_SLICE_TSA_N:
    764772    case NAL_UNIT_CODED_SLICE_STSA_R:
    765773    case NAL_UNIT_CODED_SLICE_STSA_N:
    766     case NAL_UNIT_CODED_SLICE_BLA:
    767     case NAL_UNIT_CODED_SLICE_BLANT:
     774    case NAL_UNIT_CODED_SLICE_BLA_W_LP:
     775    case NAL_UNIT_CODED_SLICE_BLA_W_RADL:
    768776    case NAL_UNIT_CODED_SLICE_BLA_N_LP:
    769     case NAL_UNIT_CODED_SLICE_IDR:
     777    case NAL_UNIT_CODED_SLICE_IDR_W_RADL:
    770778    case NAL_UNIT_CODED_SLICE_IDR_N_LP:
    771779    case NAL_UNIT_CODED_SLICE_CRA:
    772780    case NAL_UNIT_CODED_SLICE_RADL_N:
    773     case NAL_UNIT_CODED_SLICE_DLP:
     781    case NAL_UNIT_CODED_SLICE_RADL_R:
    774782    case NAL_UNIT_CODED_SLICE_RASL_N:
    775     case NAL_UNIT_CODED_SLICE_TFD:
    776 #if H_MV
    777       return xDecodeSlice(nalu, iSkipFrame, iPOCLastDisplay, newLayerFlag);
    778 #else
     783    case NAL_UNIT_CODED_SLICE_RASL_R:
    779784      return xDecodeSlice(nalu, iSkipFrame, iPOCLastDisplay);
    780 #endif
    781785      break;
    782786    default:
     
    795799Bool TDecTop::isSkipPictureForBLA(Int& iPOCLastDisplay)
    796800{
    797   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))
     801  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))
    798802  {
    799803    iPOCLastDisplay++;
     
    826830  {
    827831    if (   m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA
    828         || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA
     832        || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP
    829833        || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP
    830         || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLANT )
     834        || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL )
    831835    {
    832836      // set the POC random access since we need to skip the reordered pictures in the case of CRA/CRANT/BLA/BLANT.
    833837      m_pocRandomAccess = m_apcSlicePilot->getPOC();
    834838    }
    835     else if ( m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP )
     839    else if ( m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP )
    836840    {
    837841      m_pocRandomAccess = -MAX_INT; // no need to skip the reordered pictures in IDR, they are decodable.
     
    849853  }
    850854  // skip the reordered pictures, if necessary
    851   else if (m_apcSlicePilot->getPOC() < m_pocRandomAccess && (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_TFD || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_N))
     855  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))
    852856  {
    853857    iPOCLastDisplay++;
     
    881885
    882886#endif
    883 
    884887//! \}
Note: See TracChangeset for help on using the changeset viewer.