Changeset 1257 in SHVCSoftware


Ignore:
Timestamp:
14 Jul 2015, 02:49:33 (9 years ago)
Author:
seregin
Message:

port rev 4252

Location:
branches/SHM-dev/source/Lib
Files:
4 edited

Legend:

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

    r1254 r1257  
    301301    }
    302302  }
    303   READ_FLAG( uiCode, "loop_filter_across_slices_enabled_flag" );       pcPPS->setLoopFilterAcrossSlicesEnabledFlag( uiCode ? true : false );
     303  READ_FLAG( uiCode, "pps_loop_filter_across_slices_enabled_flag" );   pcPPS->setLoopFilterAcrossSlicesEnabledFlag( uiCode ? true : false );
    304304  READ_FLAG( uiCode, "deblocking_filter_control_present_flag" );       pcPPS->setDeblockingFilterControlPresentFlag( uiCode ? true : false );
    305305  if(pcPPS->getDeblockingFilterControlPresentFlag())
     
    337337#endif
    338338  {
     339#if ENC_DEC_TRACE || RExt__DECODER_DEBUG_BIT_STATISTICS
     340    static const char *syntaxStrings[]={ "pps_range_extension_flag",
     341                                         "pps_multilayer_extension_flag",
     342                                         "pps_extension_6bits[0]",
     343                                         "pps_extension_6bits[1]",
     344                                         "pps_extension_6bits[2]",
     345                                         "pps_extension_6bits[3]",
     346                                         "pps_extension_6bits[4]",
     347                                         "pps_extension_6bits[5]" };
     348#endif
     349
    339350    Bool pps_extension_flags[NUM_PPS_EXTENSION_FLAGS];
    340351    for(Int i=0; i<NUM_PPS_EXTENSION_FLAGS; i++)
    341352    {
    342       READ_FLAG( uiCode, "pps_extension_flag[]" );
     353      READ_FLAG( uiCode, syntaxStrings[i] );
    343354      pps_extension_flags[i] = uiCode!=0;
    344355    }
     
    356367            if (pcPPS->getUseTransformSkip())
    357368            {
    358               READ_UVLC( uiCode, "log2_transform_skip_max_size_minus2");
     369              READ_UVLC( uiCode, "log2_max_transform_skip_block_size_minus2");
    359370              pcPPS->setTransformSkipLog2MaxSize(uiCode+2);
    360371            }
    361372
    362             READ_FLAG( uiCode, "cross_component_prediction_flag");
     373            READ_FLAG( uiCode, "cross_component_prediction_enabled_flag");
    363374            pcPPS->setUseCrossComponentPrediction(uiCode != 0);
    364375
    365             READ_FLAG( uiCode, "chroma_qp_adjustment_enabled_flag");
     376            READ_FLAG( uiCode, "chroma_qp_offset_list_enabled_flag");
    366377            if (uiCode == 0)
    367378            {
     
    371382            else
    372383            {
    373               READ_UVLC(uiCode, "diff_cu_chroma_qp_adjustment_depth"); pcPPS->setMaxCuChromaQpAdjDepth(uiCode);
     384              READ_UVLC(uiCode, "diff_cu_chroma_qp_offset_depth"); pcPPS->setMaxCuChromaQpAdjDepth(uiCode);
    374385              UInt tableSizeMinus1 = 0;
    375               READ_UVLC(tableSizeMinus1, "chroma_qp_adjustment_table_size_minus1");
     386              READ_UVLC(tableSizeMinus1, "chroma_qp_offset_list_len_minus1");
    376387              /* skip zero index */
    377388              for (Int chromaQpAdjustmentIndex = 1; chromaQpAdjustmentIndex <= (tableSizeMinus1 + 1); chromaQpAdjustmentIndex++)
     
    379390                Int cbOffset;
    380391                Int crOffset;
    381                 READ_SVLC(cbOffset, "cb_qp_adjustment[i]");
    382                 READ_SVLC(crOffset, "cr_qp_adjustment[i]");
     392                READ_SVLC(cbOffset, "cb_qp_offset_list[i]");
     393                READ_SVLC(crOffset, "cr_qp_offset_list[i]");
    383394                pcPPS->setChromaQpAdjTableAt(chromaQpAdjustmentIndex, cbOffset, crOffset);
    384395              }
     
    386397            }
    387398
    388             READ_UVLC( uiCode, "sao_luma_bit_shift");
     399            READ_UVLC( uiCode, "log2_sao_offset_scale_luma");
    389400            pcPPS->setSaoOffsetBitShift(CHANNEL_TYPE_LUMA, uiCode);
    390             READ_UVLC( uiCode, "sao_chroma_bit_shift");
     401            READ_UVLC( uiCode, "log2_sao_offset_scale_chroma");
    391402            pcPPS->setSaoOffsetBitShift(CHANNEL_TYPE_CHROMA, uiCode);
    392403            break;
     
    505516      READ_CODE(8, uiCode, "colour_primaries");                       pcVUI->setColourPrimaries(uiCode);
    506517      READ_CODE(8, uiCode, "transfer_characteristics");               pcVUI->setTransferCharacteristics(uiCode);
    507       READ_CODE(8, uiCode, "matrix_coefficients");                    pcVUI->setMatrixCoefficients(uiCode);
     518      READ_CODE(8, uiCode, "matrix_coeffs");                          pcVUI->setMatrixCoefficients(uiCode);
    508519    }
    509520  }
     
    550561    }
    551562
    552     READ_FLAG(     uiCode, "hrd_parameters_present_flag");              pcVUI->setHrdParametersPresentFlag(uiCode);
     563    READ_FLAG(     uiCode, "vui_hrd_parameters_present_flag");        pcVUI->setHrdParametersPresentFlag(uiCode);
    553564    if( pcVUI->getHrdParametersPresentFlag() )
    554565    {
     
    563574    READ_FLAG(   uiCode, "motion_vectors_over_pic_boundaries_flag");  pcVUI->setMotionVectorsOverPicBoundariesFlag(uiCode);
    564575    READ_FLAG(   uiCode, "restricted_ref_pic_lists_flag");            pcVUI->setRestrictedRefPicListsFlag(uiCode);
    565     READ_UVLC( uiCode, "min_spatial_segmentation_idc");            pcVUI->setMinSpatialSegmentationIdc(uiCode);
     576    READ_UVLC(   uiCode, "min_spatial_segmentation_idc");             pcVUI->setMinSpatialSegmentationIdc(uiCode);
    566577    assert(uiCode < 4096);
    567578    READ_UVLC(   uiCode, "max_bytes_per_pic_denom" );                 pcVUI->setMaxBytesPerPicDenom(uiCode);
    568     READ_UVLC(   uiCode, "max_bits_per_mincu_denom" );                pcVUI->setMaxBitsPerMinCuDenom(uiCode);
     579    READ_UVLC(   uiCode, "max_bits_per_min_cu_denom" );               pcVUI->setMaxBitsPerMinCuDenom(uiCode);
    569580    READ_UVLC(   uiCode, "log2_max_mv_length_horizontal" );           pcVUI->setLog2MaxMvLengthHorizontal(uiCode);
    570581    READ_UVLC(   uiCode, "log2_max_mv_length_vertical" );             pcVUI->setLog2MaxMvLengthVertical(uiCode);
     
    581592    if( hrd->getNalHrdParametersPresentFlag() || hrd->getVclHrdParametersPresentFlag() )
    582593    {
    583       READ_FLAG( uiCode, "sub_pic_cpb_params_present_flag" );         hrd->setSubPicCpbParamsPresentFlag( uiCode == 1 ? true : false );
     594      READ_FLAG( uiCode, "sub_pic_hrd_params_present_flag" );         hrd->setSubPicCpbParamsPresentFlag( uiCode == 1 ? true : false );
    584595      if( hrd->getSubPicCpbParamsPresentFlag() )
    585596      {
    586597        READ_CODE( 8, uiCode, "tick_divisor_minus2" );                hrd->setTickDivisorMinus2( uiCode );
    587         READ_CODE( 5, uiCode, "du_cpb_removal_delay_length_minus1" ); hrd->setDuCpbRemovalDelayLengthMinus1( uiCode );
     598        READ_CODE( 5, uiCode, "du_cpb_removal_delay_increment_length_minus1" ); hrd->setDuCpbRemovalDelayLengthMinus1( uiCode );
    588599        READ_FLAG( uiCode, "sub_pic_cpb_params_in_pic_timing_sei_flag" ); hrd->setSubPicCpbParamsInPicTimingSEIFlag( uiCode == 1 ? true : false );
    589600        READ_CODE( 5, uiCode, "dpb_output_delay_du_length_minus1"  ); hrd->setDpbOutputDelayDuLengthMinus1( uiCode );
     
    802813    READ_UVLC ( uiCode, "sps_max_dec_pic_buffering_minus1[i]");
    803814    pcSPS->setMaxDecPicBuffering( uiCode + 1, i);
    804     READ_UVLC ( uiCode, "sps_num_reorder_pics[i]" );
     815    READ_UVLC ( uiCode, "sps_max_num_reorder_pics[i]" );
    805816    pcSPS->setNumReorderPics(uiCode, i);
    806817    READ_UVLC ( uiCode, "sps_max_latency_increase_plus1[i]");
     
    830841  }
    831842#endif
    832   READ_UVLC( uiCode, "log2_min_coding_block_size_minus3" );
     843  READ_UVLC( uiCode, "log2_min_luma_coding_block_size_minus3" );
    833844  Int log2MinCUSize = uiCode + 3;
    834845  pcSPS->setLog2MinCodingBlockSize(log2MinCUSize);
    835   READ_UVLC( uiCode, "log2_diff_max_min_coding_block_size" );
     846  READ_UVLC( uiCode, "log2_diff_max_min_luma_coding_block_size" );
    836847  pcSPS->setLog2DiffMaxMinCodingBlockSize(uiCode);
    837848 
     
    844855  pcSPS->setMaxCUWidth  ( 1<<(log2MinCUSize + maxCUDepthDelta) );
    845856  pcSPS->setMaxCUHeight ( 1<<(log2MinCUSize + maxCUDepthDelta) );
    846   READ_UVLC( uiCode, "log2_min_transform_block_size_minus2" );   pcSPS->setQuadtreeTULog2MinSize( uiCode + 2 );
    847 
    848   READ_UVLC( uiCode, "log2_diff_max_min_transform_block_size" ); pcSPS->setQuadtreeTULog2MaxSize( uiCode + pcSPS->getQuadtreeTULog2MinSize() );
     857  READ_UVLC( uiCode, "log2_min_luma_transform_block_size_minus2" );   pcSPS->setQuadtreeTULog2MinSize( uiCode + 2 );
     858
     859  READ_UVLC( uiCode, "log2_diff_max_min_luma_transform_block_size" ); pcSPS->setQuadtreeTULog2MaxSize( uiCode + pcSPS->getQuadtreeTULog2MinSize() );
    849860  pcSPS->setMaxTrSize( 1<<(uiCode + pcSPS->getQuadtreeTULog2MinSize()) );
    850861
     
    913924  if (pcSPS->getLongTermRefsPresent())
    914925  {
    915     READ_UVLC( uiCode, "num_long_term_ref_pic_sps" );
     926    READ_UVLC( uiCode, "num_long_term_ref_pics_sps" );
    916927    pcSPS->setNumLongTermRefPicSPS(uiCode);
    917928    for (UInt k = 0; k < pcSPS->getNumLongTermRefPicSPS(); k++)
     
    944955#endif
    945956  {
     957#if ENC_DEC_TRACE || RExt__DECODER_DEBUG_BIT_STATISTICS
     958    static const char *syntaxStrings[]={ "sps_range_extension_flag",
     959                                         "sps_multilayer_extension_flag",
     960                                         "sps_extension_6bits[0]",
     961                                         "sps_extension_6bits[1]",
     962                                         "sps_extension_6bits[2]",
     963                                         "sps_extension_6bits[3]",
     964                                         "sps_extension_6bits[4]",
     965                                         "sps_extension_6bits[5]" };
     966#endif
    946967    Bool sps_extension_flags[NUM_SPS_EXTENSION_FLAGS];
     968
    947969    for(Int i=0; i<NUM_SPS_EXTENSION_FLAGS; i++)
    948970    {
    949       READ_FLAG( uiCode, "sps_extension_flag[]" );
     971      READ_FLAG( uiCode, syntaxStrings[i] );
    950972      sps_extension_flags[i] = uiCode!=0;
    951973    }
     
    963985            READ_FLAG( uiCode, "transform_skip_rotation_enabled_flag");     pcSPS->setUseResidualRotation                    (uiCode != 0);
    964986            READ_FLAG( uiCode, "transform_skip_context_enabled_flag");      pcSPS->setUseSingleSignificanceMapContext        (uiCode != 0);
    965             READ_FLAG( uiCode, "residual_dpcm_implicit_enabled_flag");      pcSPS->setUseResidualDPCM(RDPCM_SIGNAL_IMPLICIT, (uiCode != 0));
    966             READ_FLAG( uiCode, "residual_dpcm_explicit_enabled_flag");      pcSPS->setUseResidualDPCM(RDPCM_SIGNAL_EXPLICIT, (uiCode != 0));
     987            READ_FLAG( uiCode, "implicit_rdpcm_enabled_flag");              pcSPS->setUseResidualDPCM(RDPCM_SIGNAL_IMPLICIT, (uiCode != 0));
     988            READ_FLAG( uiCode, "explicit_rdpcm_enabled_flag");              pcSPS->setUseResidualDPCM(RDPCM_SIGNAL_EXPLICIT, (uiCode != 0));
    967989            READ_FLAG( uiCode, "extended_precision_processing_flag");       pcSPS->setUseExtendedPrecision                   (uiCode != 0);
    968990            READ_FLAG( uiCode, "intra_smoothing_disabled_flag");            pcSPS->setDisableIntraReferenceSmoothing         (uiCode != 0);
    969             READ_FLAG( uiCode, "high_precision_prediction_weighting_flag"); pcSPS->setUseHighPrecisionPredictionWeighting    (uiCode != 0);
    970             READ_FLAG( uiCode, "golomb_rice_parameter_adaptation_flag");    pcSPS->setUseGolombRiceParameterAdaptation       (uiCode != 0);
     991            READ_FLAG( uiCode, "high_precision_offsets_enabled_flag");      pcSPS->setUseHighPrecisionPredictionWeighting    (uiCode != 0);
     992            READ_FLAG( uiCode, "persistent_rice_adaptation_enabled_flag");  pcSPS->setUseGolombRiceParameterAdaptation       (uiCode != 0);
    971993            READ_FLAG( uiCode, "cabac_bypass_alignment_enabled_flag");      pcSPS->setAlignCABACBeforeBypass                 (uiCode != 0);
    972994            break;
     
    10051027  assert( pcVPS->getBaseLayerInternalFlag() || pcVPS->getMaxLayers() > 1 );
    10061028#else
    1007   READ_CODE( 2,  uiCode,  "vps_reserved_three_2bits" );           assert(uiCode == 3);
     1029  READ_FLAG( uiCode,      "vps_base_layer_internal_flag" );       assert(uiCode == 1);
     1030  READ_FLAG( uiCode,      "vps_base_layer_available_flag" );      assert(uiCode == 1);
    10081031  READ_CODE( 6,  uiCode,  "vps_max_layers_minus1" );
    10091032#endif
     
    10111034  READ_FLAG(     uiCode,  "vps_temporal_id_nesting_flag" );       pcVPS->setTemporalNestingFlag( uiCode ? true:false );
    10121035  assert (pcVPS->getMaxTLayers()>1||pcVPS->getTemporalNestingFlag());
    1013   READ_CODE( 16, uiCode,  "vps_reserved_ffff_16bits" );           assert(uiCode == 0xffff);
     1036  READ_CODE( 16, uiCode,  "vps_reserved_0xffff_16bits" );         assert(uiCode == 0xffff);
    10141037  parsePTL ( pcVPS->getPTL(), true, pcVPS->getMaxTLayers()-1);
    10151038  UInt subLayerOrderingInfoPresentFlag;
     
    10171040  for(UInt i = 0; i <= pcVPS->getMaxTLayers()-1; i++)
    10181041  {
    1019     READ_UVLC( uiCode,  "vps_max_dec_pic_buffering_minus1[i]" );     pcVPS->setMaxDecPicBuffering( uiCode + 1, i );
    1020     READ_UVLC( uiCode,  "vps_num_reorder_pics[i]" );          pcVPS->setNumReorderPics( uiCode, i );
     1042    READ_UVLC( uiCode,  "vps_max_dec_pic_buffering_minus1[i]" );    pcVPS->setMaxDecPicBuffering( uiCode + 1, i );
     1043    READ_UVLC( uiCode,  "vps_max_num_reorder_pics[i]" );            pcVPS->setNumReorderPics( uiCode, i );
    10211044    READ_UVLC( uiCode,  "vps_max_latency_increase_plus1[i]" );      pcVPS->setMaxLatencyIncrease( uiCode, i );
    10221045
     
    10471070  assert( pcVPS->getNumHrdParameters() < MAX_VPS_OP_SETS_PLUS1 );
    10481071  assert( pcVPS->getMaxNuhReservedZeroLayerId() < MAX_VPS_NUH_RESERVED_ZERO_LAYER_ID_PLUS1 );
    1049   READ_CODE( 6, uiCode, "vps_max_nuh_reserved_zero_layer_id" );   pcVPS->setMaxNuhReservedZeroLayerId( uiCode );
    1050   READ_UVLC(    uiCode, "vps_max_op_sets_minus1" );               pcVPS->setMaxOpSets( uiCode + 1 );
     1072  READ_CODE( 6, uiCode, "vps_max_layer_id" );                        pcVPS->setMaxNuhReservedZeroLayerId( uiCode );
     1073  READ_UVLC(    uiCode, "vps_num_layer_sets_minus1" );               pcVPS->setMaxOpSets( uiCode + 1 );
    10511074  for( UInt opsIdx = 1; opsIdx <= ( pcVPS->getMaxOpSets() - 1 ); opsIdx ++ )
    10521075  {
     
    10831106    for( UInt i = 0; i < pcVPS->getNumHrdParameters(); i ++ )
    10841107    {
    1085       READ_UVLC( uiCode, "hrd_op_set_idx" );                       pcVPS->setHrdOpSetIdx( uiCode, i );
     1108      READ_UVLC( uiCode, "hrd_layer_set_idx[i]" );                  pcVPS->setHrdOpSetIdx( uiCode, i );
    10861109      if( i > 0 )
    10871110      {
     
    11711194  //!KS: need to add error handling code here, if SPS is not available
    11721195  assert(sps!=0);
     1196
     1197#if SVC_EXTENSION
    11731198  pcSlice->setSPS(sps);
    11741199  pcSlice->setPPS(pps);
    11751200
    1176 #if SVC_EXTENSION
    11771201  TComVPS* vps = parameterSetManager->getVPS(sps->getVPSId());
    11781202  pcSlice->setVPS(vps);
     
    12531277    for (Int i = 0; i < pps->getNumExtraSliceHeaderBits(); i++)
    12541278    {
    1255       READ_FLAG(uiCode, "slice_reserved_undetermined_flag[]"); // ignored
     1279      READ_FLAG(uiCode, "slice_reserved_flag[]"); // ignored
    12561280    }
    12571281#endif //SVC_EXTENSION
     
    12661290      pcSlice->setPicOutputFlag( true );
    12671291    }
     1292
     1293    // if (separate_colour_plane_flag == 1)
     1294    //   read colour_plane_id
     1295    //   (separate_colour_plane_flag == 1) is not supported in this version of the standard.
    12681296
    12691297    if( pcSlice->getIdrPicFlag() )
     
    12841312#endif
    12851313    {
    1286       READ_CODE(sps->getBitsForPOC(), uiCode, "pic_order_cnt_lsb");
     1314      READ_CODE(sps->getBitsForPOC(), uiCode, "slice_pic_order_cnt_lsb");
    12871315#if SVC_EXTENSION
    12881316      pcSlice->setPicOrderCntLsb( uiCode );
     
    14881516      if (sps->getTMVPFlagsPresent())
    14891517      {
    1490         READ_FLAG( uiCode, "slice_temporal_mvp_enable_flag" );
     1518        READ_FLAG( uiCode, "slice_temporal_mvp_enabled_flag" );
    14911519        pcSlice->setEnableTMVPFlag( uiCode == 1 ? true : false );
    14921520      }
     
    18021830      if (numValidComp>COMPONENT_Cb)
    18031831      {
    1804         READ_SVLC( iCode, "slice_qp_delta_cb" );
     1832        READ_SVLC( iCode, "slice_cb_qp_offset" );
    18051833        pcSlice->setSliceChromaQpDelta(COMPONENT_Cb, iCode );
    18061834        assert( pcSlice->getSliceChromaQpDelta(COMPONENT_Cb) >= -12 );
     
    18121840      if (numValidComp>COMPONENT_Cr)
    18131841      {
    1814         READ_SVLC( iCode, "slice_qp_delta_cr" );
     1842        READ_SVLC( iCode, "slice_cr_qp_offset" );
    18151843        pcSlice->setSliceChromaQpDelta(COMPONENT_Cr, iCode );
    18161844        assert( pcSlice->getSliceChromaQpDelta(COMPONENT_Cr) >= -12 );
     
    18231851    if (pps->getChromaQpAdjTableSize() > 0)
    18241852    {
    1825       READ_FLAG(uiCode, "slice_chroma_qp_adjustment_enabled_flag"); pcSlice->setUseChromaQpAdj(uiCode != 0);
     1853      READ_FLAG(uiCode, "cu_chroma_qp_offset_enabled_flag"); pcSlice->setUseChromaQpAdj(uiCode != 0);
    18261854    }
    18271855    else
     
    19041932  if(pps->getSliceHeaderExtensionPresentFlag())
    19051933  {
    1906     READ_UVLC( uiCode, "slice_header_extension_length"); sliceHeaderExtensionLength = uiCode;
     1934    READ_UVLC( uiCode, "slice_segment_header_extension_length"); sliceHeaderExtensionLength = uiCode;
    19071935  }
    19081936  else
     
    20122040  if(pps->getSliceHeaderExtensionPresentFlag())
    20132041  {
    2014     READ_UVLC(uiCode,"slice_header_extension_length");
     2042    READ_UVLC(uiCode,"slice_segment_header_extension_length");
    20152043    for(Int i=0; i<uiCode; i++)
    20162044    {
    20172045      UInt ignore;
    2018       READ_CODE(8,ignore,"slice_header_extension_data_byte");
     2046      READ_CODE(8,ignore,"slice_segment_header_extension_data_byte");
    20192047    }
    20202048  }
     
    20712099  if(profilePresentFlag)
    20722100  {
    2073     parseProfileTier(rpcPTL->getGeneralPTL());
     2101    parseProfileTier(rpcPTL->getGeneralPTL(), false);
    20742102  }
    20752103  READ_CODE( 8, uiCode, "general_level_idc" );    rpcPTL->getGeneralPTL()->setLevelIdc(Level::Name(uiCode));
     
    20942122    if( rpcPTL->getSubLayerProfilePresentFlag(i) )
    20952123    {
    2096       parseProfileTier(rpcPTL->getSubLayerPTL(i));
     2124      parseProfileTier(rpcPTL->getSubLayerPTL(i), true);
    20972125    }
    20982126    if(rpcPTL->getSubLayerLevelPresentFlag(i))
     
    21032131}
    21042132
    2105 Void TDecCavlc::parseProfileTier(ProfileTierLevel *ptl)
     2133#if ENC_DEC_TRACE || RExt__DECODER_DEBUG_BIT_STATISTICS
     2134Void TDecCavlc::parseProfileTier(ProfileTierLevel *ptl, const Bool bIsSubLayer)
     2135#define PTL_TRACE_TEXT(txt) bIsSubLayer?("sub_layer_" txt) : ("general_" txt)
     2136#else
     2137Void TDecCavlc::parseProfileTier(ProfileTierLevel *ptl, const Bool /*bIsSubLayer*/)
     2138#define PTL_TRACE_TEXT(txt) txt
     2139#endif
    21062140{
    21072141  UInt uiCode;
    2108   READ_CODE(2 , uiCode, "XXX_profile_space[]");  ptl->setProfileSpace(uiCode);
    2109   READ_FLAG(    uiCode, "XXX_tier_flag[]"    );  ptl->setTierFlag    (uiCode ? Level::HIGH : Level::MAIN);
    2110   READ_CODE(5 , uiCode, "XXX_profile_idc[]"  );  ptl->setProfileIdc  (Profile::Name(uiCode));
     2142  READ_CODE(2 , uiCode,   PTL_TRACE_TEXT("profile_space"                   )); ptl->setProfileSpace(uiCode);
     2143  READ_FLAG(    uiCode,   PTL_TRACE_TEXT("tier_flag"                       )); ptl->setTierFlag    (uiCode ? Level::HIGH : Level::MAIN);
     2144  READ_CODE(5 , uiCode,   PTL_TRACE_TEXT("profile_idc"                     )); ptl->setProfileIdc  (Profile::Name(uiCode));
    21112145  for(Int j = 0; j < 32; j++)
    21122146  {
    2113     READ_FLAG(  uiCode, "XXX_profile_compatibility_flag[][j]");   ptl->setProfileCompatibilityFlag(j, uiCode ? 1 : 0);
    2114   }
    2115   READ_FLAG(uiCode, "general_progressive_source_flag");
    2116   ptl->setProgressiveSourceFlag(uiCode ? true : false);
    2117 
    2118   READ_FLAG(uiCode, "general_interlaced_source_flag");
    2119   ptl->setInterlacedSourceFlag(uiCode ? true : false);
    2120 
    2121   READ_FLAG(uiCode, "general_non_packed_constraint_flag");
    2122   ptl->setNonPackedConstraintFlag(uiCode ? true : false);
    2123 
    2124   READ_FLAG(uiCode, "general_frame_only_constraint_flag");
    2125   ptl->setFrameOnlyConstraintFlag(uiCode ? true : false);
    2126 
    2127   if (ptl->getProfileIdc() == Profile::MAINREXT || ptl->getProfileIdc() == Profile::HIGHTHROUGHPUTREXT )
     2147    READ_FLAG(  uiCode,   PTL_TRACE_TEXT("profile_compatibility_flag[][j]" )); ptl->setProfileCompatibilityFlag(j, uiCode ? 1 : 0);
     2148  }
     2149  READ_FLAG(uiCode,       PTL_TRACE_TEXT("progressive_source_flag"         )); ptl->setProgressiveSourceFlag(uiCode ? true : false);
     2150
     2151  READ_FLAG(uiCode,       PTL_TRACE_TEXT("interlaced_source_flag"          )); ptl->setInterlacedSourceFlag(uiCode ? true : false);
     2152
     2153  READ_FLAG(uiCode,       PTL_TRACE_TEXT("non_packed_constraint_flag"      )); ptl->setNonPackedConstraintFlag(uiCode ? true : false);
     2154
     2155  READ_FLAG(uiCode,       PTL_TRACE_TEXT("frame_only_constraint_flag"      )); ptl->setFrameOnlyConstraintFlag(uiCode ? true : false);
     2156
     2157  if (ptl->getProfileIdc() == Profile::MAINREXT           || ptl->getProfileCompatibilityFlag(Profile::MAINREXT) ||
     2158      ptl->getProfileIdc() == Profile::HIGHTHROUGHPUTREXT || ptl->getProfileCompatibilityFlag(Profile::HIGHTHROUGHPUTREXT))
    21282159  {
    21292160    UInt maxBitDepth=16;
    2130     READ_FLAG(    uiCode, "general_max_12bit_constraint_flag" ); if (uiCode) maxBitDepth=12;
    2131     READ_FLAG(    uiCode, "general_max_10bit_constraint_flag" ); if (uiCode) maxBitDepth=10;
    2132     READ_FLAG(    uiCode, "general_max_8bit_constraint_flag"  ); if (uiCode) maxBitDepth=8;
     2161    READ_FLAG(    uiCode, PTL_TRACE_TEXT("max_12bit_constraint_flag"       )); if (uiCode) maxBitDepth=12;
     2162    READ_FLAG(    uiCode, PTL_TRACE_TEXT("max_10bit_constraint_flag"       )); if (uiCode) maxBitDepth=10;
     2163    READ_FLAG(    uiCode, PTL_TRACE_TEXT("max_8bit_constraint_flag"        )); if (uiCode) maxBitDepth=8;
    21332164    ptl->setBitDepthConstraint(maxBitDepth);
    21342165    ChromaFormat chromaFmtConstraint=CHROMA_444;
    2135     READ_FLAG(    uiCode, "general_max_422chroma_constraint_flag"  ); if (uiCode) chromaFmtConstraint=CHROMA_422;
    2136     READ_FLAG(    uiCode, "general_max_420chroma_constraint_flag"  ); if (uiCode) chromaFmtConstraint=CHROMA_420;
    2137     READ_FLAG(    uiCode, "general_max_monochrome_constraint_flag" ); if (uiCode) chromaFmtConstraint=CHROMA_400;
     2166    READ_FLAG(    uiCode, PTL_TRACE_TEXT("max_422chroma_constraint_flag"   )); if (uiCode) chromaFmtConstraint=CHROMA_422;
     2167    READ_FLAG(    uiCode, PTL_TRACE_TEXT("max_420chroma_constraint_flag"   )); if (uiCode) chromaFmtConstraint=CHROMA_420;
     2168    READ_FLAG(    uiCode, PTL_TRACE_TEXT("max_monochrome_constraint_flag"  )); if (uiCode) chromaFmtConstraint=CHROMA_400;
    21382169    ptl->setChromaFormatConstraint(chromaFmtConstraint);
    2139     READ_FLAG(    uiCode, "general_intra_constraint_flag");          ptl->setIntraConstraintFlag(uiCode != 0);
    2140     READ_FLAG(    uiCode, "general_one_picture_only_constraint_flag");
    2141     READ_FLAG(    uiCode, "general_lower_bit_rate_constraint_flag"); ptl->setLowerBitRateConstraintFlag(uiCode != 0);
     2170    READ_FLAG(    uiCode, PTL_TRACE_TEXT("intra_constraint_flag"           )); ptl->setIntraConstraintFlag(uiCode != 0);
     2171    READ_FLAG(    uiCode, PTL_TRACE_TEXT("one_picture_only_constraint_flag"));
     2172    READ_FLAG(    uiCode, PTL_TRACE_TEXT("lower_bit_rate_constraint_flag"  )); ptl->setLowerBitRateConstraintFlag(uiCode != 0);
    21422173#if SVC_EXTENSION
    21432174    READ_CODE(32, uiCode, "general_reserved_zero_34bits");  READ_CODE(2, uiCode, "general_reserved_zero_34bits");
     
    21642195    READ_CODE(32,  uiCode, "general_reserved_zero_43bits");  READ_CODE(11,  uiCode, "general_reserved_zero_43bits");
    21652196  }
    2166 
    2167   if( ( ptl->getProfileIdc() >= 1 && ptl->getProfileIdc() <= 5 ) ||
    2168       ptl->getProfileCompatibilityFlag(1) || ptl->getProfileCompatibilityFlag(2) ||
    2169       ptl->getProfileCompatibilityFlag(3) || ptl->getProfileCompatibilityFlag(4) ||
    2170       ptl->getProfileCompatibilityFlag(5)                                           )
    2171   {
    2172     READ_FLAG(uiCode, "general_inbld_flag");
    2173   }
    2174   else
    2175   {
    2176     READ_FLAG(uiCode, "general_reserved_zero_bit");
    2177   }
    21782197#else
    2179     READ_CODE(16, uiCode, "XXX_reserved_zero_35bits[0..15]");
    2180     READ_CODE(16, uiCode, "XXX_reserved_zero_35bits[16..31]");
    2181     READ_CODE(3,  uiCode, "XXX_reserved_zero_35bits[32..34]");
     2198    READ_CODE(16, uiCode, PTL_TRACE_TEXT("reserved_zero_34bits[0..15]"     ));
     2199    READ_CODE(16, uiCode, PTL_TRACE_TEXT("reserved_zero_34bits[16..31]"    ));
     2200    READ_CODE(2,  uiCode, PTL_TRACE_TEXT("reserved_zero_34bits[32..33]"    ));
    21822201  }
    21832202  else
     
    21872206    ptl->setIntraConstraintFlag(false);
    21882207    ptl->setLowerBitRateConstraintFlag(true);
    2189     READ_CODE(16, uiCode, "XXX_reserved_zero_44bits[0..15]");
    2190     READ_CODE(16, uiCode, "XXX_reserved_zero_44bits[16..31]");
    2191     READ_CODE(12, uiCode, "XXX_reserved_zero_44bits[32..43]");
    2192   }
    2193 #endif
     2208    READ_CODE(16, uiCode, PTL_TRACE_TEXT("reserved_zero_43bits[0..15]"     ));
     2209    READ_CODE(16, uiCode, PTL_TRACE_TEXT("reserved_zero_43bits[16..31]"    ));
     2210    READ_CODE(11, uiCode, PTL_TRACE_TEXT("reserved_zero_43bits[32..42]"    ));
     2211  }
     2212#endif
     2213
     2214  if ((ptl->getProfileIdc() >= Profile::MAIN && ptl->getProfileIdc() <= Profile::HIGHTHROUGHPUTREXT) ||
     2215       ptl->getProfileCompatibilityFlag(Profile::MAIN) ||
     2216       ptl->getProfileCompatibilityFlag(Profile::MAIN10) ||
     2217       ptl->getProfileCompatibilityFlag(Profile::MAINSTILLPICTURE) ||
     2218       ptl->getProfileCompatibilityFlag(Profile::MAINREXT) ||
     2219       ptl->getProfileCompatibilityFlag(Profile::HIGHTHROUGHPUTREXT) )
     2220  {
     2221#if SVC_EXTENSION
     2222    READ_FLAG(    uiCode, PTL_TRACE_TEXT("inbld_flag"                      ));
     2223#else
     2224    READ_FLAG(    uiCode, PTL_TRACE_TEXT("inbld_flag"                      )); assert(uiCode == 0);
     2225#endif
     2226  }
     2227  else
     2228  {
     2229    READ_FLAG(    uiCode, PTL_TRACE_TEXT("reserved_zero_bit"               ));
     2230  }
     2231#undef PTL_TRACE_TEXT
    21942232}
    21952233
     
    23872425  Int iDeltaDenom;
    23882426  // decode delta_luma_log2_weight_denom :
    2389   READ_UVLC( uiLog2WeightDenomLuma, "luma_log2_weight_denom" );     // ue(v): luma_log2_weight_denom
     2427  READ_UVLC( uiLog2WeightDenomLuma, "luma_log2_weight_denom" );
    23902428  assert( uiLog2WeightDenomLuma <= 7 );
    23912429  if( bChroma )
    23922430  {
    2393     READ_SVLC( iDeltaDenom, "delta_chroma_log2_weight_denom" );     // se(v): delta_chroma_log2_weight_denom
     2431    READ_SVLC( iDeltaDenom, "delta_chroma_log2_weight_denom" );
    23942432    assert((iDeltaDenom + (Int)uiLog2WeightDenomLuma)>=0);
    23952433    assert((iDeltaDenom + (Int)uiLog2WeightDenomLuma)<=7);
     
    23972435  }
    23982436
    2399   for ( Int iNumRef=0 ; iNumRef<iNbRef ; iNumRef++ )
     2437  for ( Int iNumRef=0 ; iNumRef<iNbRef ; iNumRef++ ) // loop over l0 and l1 syntax elements
    24002438  {
    24012439    RefPicList  eRefPicList = ( iNumRef ? REF_PIC_LIST_1 : REF_PIC_LIST_0 );
     
    24112449
    24122450      UInt  uiCode;
    2413       READ_FLAG( uiCode, "luma_weight_lX_flag" );           // u(1): luma_weight_l0_flag
     2451      READ_FLAG( uiCode, iNumRef==0?"luma_weight_l0_flag[i]":"luma_weight_l1_flag[i]" );
    24142452      wp[COMPONENT_Y].bPresentFlag = ( uiCode == 1 );
    24152453      uiTotalSignalledWeightFlags += wp[COMPONENT_Y].bPresentFlag;
     
    24212459      {
    24222460        pcSlice->getWpScaling(eRefPicList, iRefIdx, wp);
    2423         READ_FLAG( uiCode, "chroma_weight_lX_flag" );      // u(1): chroma_weight_l0_flag
     2461        READ_FLAG( uiCode, iNumRef==0?"chroma_weight_l0_flag[i]":"chroma_weight_l1_flag[i]" );
    24242462        for(Int j=1; j<numValidComp; j++)
    24252463        {
     
    24352473      {
    24362474        Int iDeltaWeight;
    2437         READ_SVLC( iDeltaWeight, "delta_luma_weight_lX" );  // se(v): delta_luma_weight_l0[i]
     2475        READ_SVLC( iDeltaWeight, iNumRef==0?"delta_luma_weight_l0[i]":"delta_luma_weight_l1[i]" );
    24382476        assert( iDeltaWeight >= -128 );
    24392477        assert( iDeltaWeight <=  127 );
    24402478        wp[COMPONENT_Y].iWeight = (iDeltaWeight + (1<<wp[COMPONENT_Y].uiLog2WeightDenom));
    2441         READ_SVLC( wp[COMPONENT_Y].iOffset, "luma_offset_lX" );       // se(v): luma_offset_l0[i]
     2479        READ_SVLC( wp[COMPONENT_Y].iOffset, iNumRef==0?"luma_offset_l0[i]":"luma_offset_l1[i]" );
    24422480        Int range=sps->getUseHighPrecisionPredictionWeighting() ? (1<<g_bitDepth[CHANNEL_TYPE_LUMA])/2 : 128;
    24432481        assert( wp[0].iOffset >= -range );
     
    24572495          {
    24582496            Int iDeltaWeight;
    2459             READ_SVLC( iDeltaWeight, "delta_chroma_weight_lX" );  // se(v): chroma_weight_l0[i][j]
     2497            READ_SVLC( iDeltaWeight, iNumRef==0?"delta_chroma_weight_l0[i]":"delta_chroma_weight_l1[i]" );
    24602498            assert( iDeltaWeight >= -128 );
    24612499            assert( iDeltaWeight <=  127 );
     
    24632501
    24642502            Int iDeltaChroma;
    2465             READ_SVLC( iDeltaChroma, "delta_chroma_offset_lX" );  // se(v): delta_chroma_offset_l0[i][j]
     2503            READ_SVLC( iDeltaChroma, iNumRef==0?"delta_chroma_offset_l0[i]":"delta_chroma_offset_l1[i]" );
    24662504            assert( iDeltaChroma >= -4*range);
    24672505            assert( iDeltaChroma <   4*range);
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.h

    r1235 r1257  
    8383  Void  parseSEI            ( SEIMessages& );
    8484  Void  parsePTL            ( TComPTL *rpcPTL, Bool profilePresentFlag, Int maxNumSubLayersMinus1 );
    85   Void  parseProfileTier    (ProfileTierLevel *ptl);
     85  Void  parseProfileTier    (ProfileTierLevel *ptl, const Bool bIsSubLayer);
    8686  Void  parseHrdParameters  (TComHRD *hrd, Bool cprms_present_flag, UInt tempLevelHigh);
    8787  Void  parseSliceHeader    ( TComSlice* pcSlice, ParameterSetManager *parameterSetManager);
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r1254 r1257  
    213213    }
    214214  }
    215   WRITE_FLAG( pcPPS->getLoopFilterAcrossSlicesEnabledFlag()?1 : 0,        "loop_filter_across_slices_enabled_flag");
     215  WRITE_FLAG( pcPPS->getLoopFilterAcrossSlicesEnabledFlag()?1 : 0,        "pps_loop_filter_across_slices_enabled_flag");
    216216  WRITE_FLAG( pcPPS->getDeblockingFilterControlPresentFlag()?1 : 0,       "deblocking_filter_control_present_flag");
    217217  if(pcPPS->getDeblockingFilterControlPresentFlag())
     
    263263  if (pps_extension_present_flag)
    264264  {
     265#if ENC_DEC_TRACE || RExt__DECODER_DEBUG_BIT_STATISTICS
     266    static const char *syntaxStrings[]={ "pps_range_extension_flag",
     267                                         "pps_multilayer_extension_flag",
     268                                         "pps_extension_6bits[0]",
     269                                         "pps_extension_6bits[1]",
     270                                         "pps_extension_6bits[2]",
     271                                         "pps_extension_6bits[3]",
     272                                         "pps_extension_6bits[4]",
     273                                         "pps_extension_6bits[5]" };
     274#endif
     275
    265276    for(Int i=0; i<NUM_PPS_EXTENSION_FLAGS; i++)
    266277    {
    267       WRITE_FLAG( pps_extension_flags[i]?1:0, "pps_extension_flag[]" );
     278      WRITE_FLAG( pps_extension_flags[i]?1:0, syntaxStrings[i] );
    268279    }
    269280
     
    278289            if (pcPPS->getUseTransformSkip())
    279290            {
    280               WRITE_UVLC( pcPPS->getTransformSkipLog2MaxSize()-2,                 "log2_transform_skip_max_size_minus2");
     291              WRITE_UVLC( pcPPS->getTransformSkipLog2MaxSize()-2,                 "log2_max_transform_skip_block_size_minus2");
    281292            }
    282293
    283             WRITE_FLAG((pcPPS->getUseCrossComponentPrediction() ? 1 : 0),         "cross_component_prediction_flag" );
    284 
    285             WRITE_FLAG(UInt(pcPPS->getChromaQpAdjTableSize() > 0),                "chroma_qp_adjustment_enabled_flag" );
     294            WRITE_FLAG((pcPPS->getUseCrossComponentPrediction() ? 1 : 0),         "cross_component_prediction_enabled_flag" );
     295
     296            WRITE_FLAG(UInt(pcPPS->getChromaQpAdjTableSize() > 0),                "chroma_qp_offset_list_enabled_flag" );
    286297            if (pcPPS->getChromaQpAdjTableSize() > 0)
    287298            {
    288               WRITE_UVLC(pcPPS->getMaxCuChromaQpAdjDepth(),                       "diff_cu_chroma_qp_adjustment_depth");
    289               WRITE_UVLC(pcPPS->getChromaQpAdjTableSize() - 1,                    "chroma_qp_adjustment_table_size_minus1");
     299              WRITE_UVLC(pcPPS->getMaxCuChromaQpAdjDepth(),                       "diff_cu_chroma_qp_offset_depth");
     300              WRITE_UVLC(pcPPS->getChromaQpAdjTableSize() - 1,                    "chroma_qp_offset_list_len_minus1");
    290301              /* skip zero index */
    291302              for (Int chromaQpAdjustmentIndex = 1; chromaQpAdjustmentIndex <= pcPPS->getChromaQpAdjTableSize(); chromaQpAdjustmentIndex++)
    292303              {
    293                 WRITE_SVLC(pcPPS->getChromaQpAdjTableAt(chromaQpAdjustmentIndex).u.comp.CbOffset,     "cb_qp_adjustment[i]");
    294                 WRITE_SVLC(pcPPS->getChromaQpAdjTableAt(chromaQpAdjustmentIndex).u.comp.CrOffset,     "cr_qp_adjustment[i]");
     304                WRITE_SVLC(pcPPS->getChromaQpAdjTableAt(chromaQpAdjustmentIndex).u.comp.CbOffset,     "cb_qp_offset_list[i]");
     305                WRITE_SVLC(pcPPS->getChromaQpAdjTableAt(chromaQpAdjustmentIndex).u.comp.CrOffset,     "cr_qp_offset_list[i]");
    295306              }
    296307            }
    297308
    298             WRITE_UVLC( pcPPS->getSaoOffsetBitShift(CHANNEL_TYPE_LUMA),           "sao_luma_bit_shift"   );
    299             WRITE_UVLC( pcPPS->getSaoOffsetBitShift(CHANNEL_TYPE_CHROMA),         "sao_chroma_bit_shift" );
     309            WRITE_UVLC( pcPPS->getSaoOffsetBitShift(CHANNEL_TYPE_LUMA),           "log2_sao_offset_scale_luma"   );
     310            WRITE_UVLC( pcPPS->getSaoOffsetBitShift(CHANNEL_TYPE_CHROMA),         "log2_sao_offset_scale_chroma" );
    300311            break;
    301312#if SVC_EXTENSION
     
    397408      WRITE_CODE(pcVUI->getColourPrimaries(), 8,                "colour_primaries");
    398409      WRITE_CODE(pcVUI->getTransferCharacteristics(), 8,        "transfer_characteristics");
    399       WRITE_CODE(pcVUI->getMatrixCoefficients(), 8,             "matrix_coefficients");
     410      WRITE_CODE(pcVUI->getMatrixCoefficients(), 8,             "matrix_coeffs");
    400411    }
    401412  }
     
    432443      WRITE_UVLC(timingInfo->getNumTicksPocDiffOneMinus1(),   "vui_num_ticks_poc_diff_one_minus1");
    433444    }
    434     WRITE_FLAG(pcVUI->getHrdParametersPresentFlag(),              "hrd_parameters_present_flag");
     445    WRITE_FLAG(pcVUI->getHrdParametersPresentFlag(),              "vui_hrd_parameters_present_flag");
    435446    if( pcVUI->getHrdParametersPresentFlag() )
    436447    {
     
    447458    WRITE_UVLC(pcVUI->getMinSpatialSegmentationIdc(),           "min_spatial_segmentation_idc");
    448459    WRITE_UVLC(pcVUI->getMaxBytesPerPicDenom(),                 "max_bytes_per_pic_denom");
    449     WRITE_UVLC(pcVUI->getMaxBitsPerMinCuDenom(),                "max_bits_per_mincu_denom");
     460    WRITE_UVLC(pcVUI->getMaxBitsPerMinCuDenom(),                "max_bits_per_min_cu_denom");
    450461    WRITE_UVLC(pcVUI->getLog2MaxMvLengthHorizontal(),           "log2_max_mv_length_horizontal");
    451462    WRITE_UVLC(pcVUI->getLog2MaxMvLengthVertical(),             "log2_max_mv_length_vertical");
     
    461472    if( hrd->getNalHrdParametersPresentFlag() || hrd->getVclHrdParametersPresentFlag() )
    462473    {
    463       WRITE_FLAG( hrd->getSubPicCpbParamsPresentFlag() ? 1 : 0,  "sub_pic_cpb_params_present_flag" );
     474      WRITE_FLAG( hrd->getSubPicCpbParamsPresentFlag() ? 1 : 0,  "sub_pic_hrd_params_present_flag" );
    464475      if( hrd->getSubPicCpbParamsPresentFlag() )
    465476      {
    466477        WRITE_CODE( hrd->getTickDivisorMinus2(), 8,              "tick_divisor_minus2" );
    467         WRITE_CODE( hrd->getDuCpbRemovalDelayLengthMinus1(), 5,  "du_cpb_removal_delay_length_minus1" );
     478        WRITE_CODE( hrd->getDuCpbRemovalDelayLengthMinus1(), 5,  "du_cpb_removal_delay_increment_length_minus1" );
    468479        WRITE_FLAG( hrd->getSubPicCpbParamsInPicTimingSEIFlag() ? 1 : 0, "sub_pic_cpb_params_in_pic_timing_sei_flag" );
    469480        WRITE_CODE( hrd->getDpbOutputDelayDuLengthMinus1(), 5,   "dpb_output_delay_du_length_minus1"  );
     
    552563  {
    553564#endif
    554   WRITE_FLAG( pcSPS->getTemporalIdNestingFlag() ? 1 : 0,                             "sps_temporal_id_nesting_flag" );
     565  WRITE_FLAG( pcSPS->getTemporalIdNestingFlag() ? 1 : 0, "sps_temporal_id_nesting_flag" );
    555566  codePTL(pcSPS->getPTL(), 1, pcSPS->getMaxTLayers() - 1);
    556567#if SVC_EXTENSION
     
    620631  {
    621632    WRITE_UVLC( pcSPS->getMaxDecPicBuffering(i) - 1,       "sps_max_dec_pic_buffering_minus1[i]" );
    622     WRITE_UVLC( pcSPS->getNumReorderPics(i),               "sps_num_reorder_pics[i]" );
     633    WRITE_UVLC( pcSPS->getNumReorderPics(i),               "sps_max_num_reorder_pics[i]" );
    623634    WRITE_UVLC( pcSPS->getMaxLatencyIncrease(i),           "sps_max_latency_increase_plus1[i]" );
    624635    if (!subLayerOrderingInfoPresentFlag)
     
    632643  assert( pcSPS->getMaxCUWidth() == pcSPS->getMaxCUHeight() );
    633644
    634   WRITE_UVLC( pcSPS->getLog2MinCodingBlockSize() - 3,                                "log2_min_coding_block_size_minus3" );
    635   WRITE_UVLC( pcSPS->getLog2DiffMaxMinCodingBlockSize(),                             "log2_diff_max_min_coding_block_size" );
    636   WRITE_UVLC( pcSPS->getQuadtreeTULog2MinSize() - 2,                                 "log2_min_transform_block_size_minus2" );
    637   WRITE_UVLC( pcSPS->getQuadtreeTULog2MaxSize() - pcSPS->getQuadtreeTULog2MinSize(), "log2_diff_max_min_transform_block_size" );
     645  WRITE_UVLC( pcSPS->getLog2MinCodingBlockSize() - 3,                                "log2_min_luma_coding_block_size_minus3" );
     646  WRITE_UVLC( pcSPS->getLog2DiffMaxMinCodingBlockSize(),                             "log2_diff_max_min_luma_coding_block_size" );
     647  WRITE_UVLC( pcSPS->getQuadtreeTULog2MinSize() - 2,                                 "log2_min_luma_transform_block_size_minus2" );
     648  WRITE_UVLC( pcSPS->getQuadtreeTULog2MaxSize() - pcSPS->getQuadtreeTULog2MinSize(), "log2_diff_max_min_luma_transform_block_size" );
    638649  WRITE_UVLC( pcSPS->getQuadtreeTUMaxDepthInter() - 1,                               "max_transform_hierarchy_depth_inter" );
    639650  WRITE_UVLC( pcSPS->getQuadtreeTUMaxDepthIntra() - 1,                               "max_transform_hierarchy_depth_intra" );
     
    692703  if (pcSPS->getLongTermRefsPresent())
    693704  {
    694     WRITE_UVLC(pcSPS->getNumLongTermRefPicSPS(), "num_long_term_ref_pic_sps" );
     705    WRITE_UVLC(pcSPS->getNumLongTermRefPicSPS(), "num_long_term_ref_pics_sps" );
    695706    for (UInt k = 0; k < pcSPS->getNumLongTermRefPicSPS(); k++)
    696707    {
    697708      WRITE_CODE( pcSPS->getLtRefPicPocLsbSps(k), pcSPS->getBitsForPOC(), "lt_ref_pic_poc_lsb_sps");
    698       WRITE_FLAG( pcSPS->getUsedByCurrPicLtSPSFlag(k), "used_by_curr_pic_lt_sps_flag");
     709      WRITE_FLAG( pcSPS->getUsedByCurrPicLtSPSFlag(k), "used_by_curr_pic_lt_sps_flag[i]");
    699710    }
    700711  }
     
    738749  if (sps_extension_present_flag)
    739750  {
     751#if ENC_DEC_TRACE || RExt__DECODER_DEBUG_BIT_STATISTICS
     752    static const char *syntaxStrings[]={ "sps_range_extension_flag",
     753                                         "sps_multilayer_extension_flag",
     754                                         "sps_extension_6bits[0]",
     755                                         "sps_extension_6bits[1]",
     756                                         "sps_extension_6bits[2]",
     757                                         "sps_extension_6bits[3]",
     758                                         "sps_extension_6bits[4]",
     759                                         "sps_extension_6bits[5]" };
     760#endif
     761
    740762    for(Int i=0; i<NUM_SPS_EXTENSION_FLAGS; i++)
    741763    {
    742       WRITE_FLAG( sps_extension_flags[i]?1:0, "sps_extension_flag[]" );
     764      WRITE_FLAG( sps_extension_flags[i]?1:0, syntaxStrings[i] );
    743765    }
    744766
     
    753775            WRITE_FLAG( (pcSPS->getUseResidualRotation() ? 1 : 0),                  "transform_skip_rotation_enabled_flag");
    754776            WRITE_FLAG( (pcSPS->getUseSingleSignificanceMapContext() ? 1 : 0),      "transform_skip_context_enabled_flag");
    755             WRITE_FLAG( (pcSPS->getUseResidualDPCM(RDPCM_SIGNAL_IMPLICIT) ? 1 : 0), "residual_dpcm_implicit_enabled_flag" );
    756             WRITE_FLAG( (pcSPS->getUseResidualDPCM(RDPCM_SIGNAL_EXPLICIT) ? 1 : 0), "residual_dpcm_explicit_enabled_flag" );
     777            WRITE_FLAG( (pcSPS->getUseResidualDPCM(RDPCM_SIGNAL_IMPLICIT) ? 1 : 0), "implicit_rdpcm_enabled_flag" );
     778            WRITE_FLAG( (pcSPS->getUseResidualDPCM(RDPCM_SIGNAL_EXPLICIT) ? 1 : 0), "explicit_rdpcm_enabled_flag" );
    757779            WRITE_FLAG( (pcSPS->getUseExtendedPrecision() ? 1 : 0),                 "extended_precision_processing_flag" );
    758780            WRITE_FLAG( (pcSPS->getDisableIntraReferenceSmoothing() ? 1 : 0),       "intra_smoothing_disabled_flag" );
    759             WRITE_FLAG( (pcSPS->getUseHighPrecisionPredictionWeighting() ? 1 : 0),  "high_precision_prediction_weighting_flag" );
    760             WRITE_FLAG( (pcSPS->getUseGolombRiceParameterAdaptation() ? 1 : 0),     "golomb_rice_parameter_adaptation_flag" );
     781            WRITE_FLAG( (pcSPS->getUseHighPrecisionPredictionWeighting() ? 1 : 0),  "high_precision_offsets_enabled_flag" );
     782            WRITE_FLAG( (pcSPS->getUseGolombRiceParameterAdaptation() ? 1 : 0),     "persistent_rice_adaptation_enabled_flag" );
    761783            WRITE_FLAG( (pcSPS->getAlignCABACBeforeBypass() ? 1 : 0),               "cabac_bypass_alignment_enabled_flag" );
    762784            break;
     
    784806  assert( pcVPS->getBaseLayerInternalFlag() || pcVPS->getMaxLayers() > 1 );
    785807#else
    786   WRITE_CODE( 3,                                    2,        "vps_reserved_three_2bits" );
     808  WRITE_FLAG(                                       1,        "vps_base_layer_internal_flag" );
     809  WRITE_FLAG(                                       1,        "vps_base_layer_available_flag" );
    787810  WRITE_CODE( 0,                                    6,        "vps_max_layers_minus1" );
    788811#endif
     
    790813  WRITE_FLAG( pcVPS->getTemporalNestingFlag(),                "vps_temporal_id_nesting_flag" );
    791814  assert (pcVPS->getMaxTLayers()>1||pcVPS->getTemporalNestingFlag());
    792   WRITE_CODE( 0xffff,                              16,        "vps_reserved_ffff_16bits" );
     815  WRITE_CODE( 0xffff,                              16,        "vps_reserved_0xffff_16bits" );
    793816  codePTL( pcVPS->getPTL(), true, pcVPS->getMaxTLayers() - 1 );
    794817  const Bool subLayerOrderingInfoPresentFlag = 1;
     
    797820  {
    798821    WRITE_UVLC( pcVPS->getMaxDecPicBuffering(i) - 1,       "vps_max_dec_pic_buffering_minus1[i]" );
    799     WRITE_UVLC( pcVPS->getNumReorderPics(i),               "vps_num_reorder_pics[i]" );
     822    WRITE_UVLC( pcVPS->getNumReorderPics(i),               "vps_max_num_reorder_pics[i]" );
    800823    WRITE_UVLC( pcVPS->getMaxLatencyIncrease(i),           "vps_max_latency_increase_plus1[i]" );
    801824    if (!subLayerOrderingInfoPresentFlag)
     
    820843  assert( pcVPS->getNumHrdParameters() <= MAX_VPS_NUM_HRD_PARAMETERS );
    821844  assert( pcVPS->getMaxNuhReservedZeroLayerId() < MAX_VPS_NUH_RESERVED_ZERO_LAYER_ID_PLUS1 );
    822   WRITE_CODE( pcVPS->getMaxNuhReservedZeroLayerId(), 6,     "vps_max_nuh_reserved_zero_layer_id" );
    823   WRITE_UVLC( pcVPS->getMaxOpSets() - 1,                    "vps_max_op_sets_minus1" );
     845  WRITE_CODE( pcVPS->getMaxNuhReservedZeroLayerId(), 6,     "vps_max_layer_id" );
     846  WRITE_UVLC( pcVPS->getMaxOpSets() - 1,                    "vps_num_layer_sets_minus1" );
    824847  for( UInt opsIdx = 1; opsIdx <= ( pcVPS->getMaxOpSets() - 1 ); opsIdx ++ )
    825848  {
     
    851874      {
    852875        // Only applicable for version 1
    853         WRITE_UVLC( pcVPS->getHrdOpSetIdx( i ),                "hrd_op_set_idx" );
     876        WRITE_UVLC( pcVPS->getHrdOpSetIdx( i ),                "hrd_layer_set_idx" );
    854877        if( i > 0 )
    855878        {
     
    958981    for (Int i = 0; i < pcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++)
    959982    {
    960       assert(!!"slice_reserved_undetermined_flag[]");
    961       WRITE_FLAG(0, "slice_reserved_undetermined_flag[]");
     983      WRITE_FLAG(0, "slice_reserved_flag[]");
    962984    }
    963985#endif //SVC_EXTENSION
     
    9891011      Int picOrderCntLSB = (pcSlice->getPOC()-pcSlice->getLastIDR()+(1<<pcSlice->getSPS()->getBitsForPOC())) & ((1<<pcSlice->getSPS()->getBitsForPOC())-1);
    9901012#endif
    991       WRITE_CODE( picOrderCntLSB, pcSlice->getSPS()->getBitsForPOC(), "pic_order_cnt_lsb");
     1013      WRITE_CODE( picOrderCntLSB, pcSlice->getSPS()->getBitsForPOC(), "slice_pic_order_cnt_lsb");
    9921014
    9931015#if SVC_EXTENSION
     
    11171139      if (pcSlice->getSPS()->getTMVPFlagsPresent())
    11181140      {
    1119         WRITE_FLAG( pcSlice->getEnableTMVPFlag() ? 1 : 0, "slice_temporal_mvp_enable_flag" );
     1141        WRITE_FLAG( pcSlice->getEnableTMVPFlag() ? 1 : 0, "slice_temporal_mvp_enabled_flag" );
    11201142      }
    11211143    }
     
    12781300      if (numberValidComponents > COMPONENT_Cb)
    12791301      {
    1280         WRITE_SVLC( pcSlice->getSliceChromaQpDelta(COMPONENT_Cb), "slice_qp_delta_cb" );
     1302        WRITE_SVLC( pcSlice->getSliceChromaQpDelta(COMPONENT_Cb), "slice_cb_qp_offset" );
    12811303      }
    12821304      if (numberValidComponents > COMPONENT_Cr)
    12831305      {
    1284         WRITE_SVLC( pcSlice->getSliceChromaQpDelta(COMPONENT_Cr), "slice_qp_delta_cr" );
     1306        WRITE_SVLC( pcSlice->getSliceChromaQpDelta(COMPONENT_Cr), "slice_cr_qp_offset" );
    12851307      }
    12861308      assert(numberValidComponents <= COMPONENT_Cr+1);
     
    12891311    if (pcSlice->getPPS()->getChromaQpAdjTableSize() > 0)
    12901312    {
    1291       WRITE_FLAG(pcSlice->getUseChromaQpAdj(), "slice_chroma_qp_adjustment_enabled_flag");
     1313      WRITE_FLAG(pcSlice->getUseChromaQpAdj(), "cu_chroma_qp_offset_enabled_flag");
    12921314    }
    12931315
     
    13201342  if(pcSlice->getPPS()->getSliceHeaderExtensionPresentFlag())
    13211343  {
    1322     WRITE_UVLC(0,"slice_header_extension_length");
     1344    WRITE_UVLC(0,"slice_segment_header_extension_length");
    13231345  }
    13241346#endif
     
    13291351  if(profilePresentFlag)
    13301352  {
    1331     codeProfileTier(pcPTL->getGeneralPTL());    // general_...
     1353    codeProfileTier(pcPTL->getGeneralPTL(), false);    // general_...
    13321354  }
    13331355  WRITE_CODE( Int(pcPTL->getGeneralPTL()->getLevelIdc()), 8, "general_level_idc" );
     
    13511373    if( pcPTL->getSubLayerProfilePresentFlag(i) )
    13521374    {
    1353       codeProfileTier(pcPTL->getSubLayerPTL(i));  // sub_layer_...
     1375      codeProfileTier(pcPTL->getSubLayerPTL(i), true);  // sub_layer_...
    13541376    }
    13551377    if( pcPTL->getSubLayerLevelPresentFlag(i) )
     
    13591381  }
    13601382}
    1361 Void TEncCavlc::codeProfileTier( const ProfileTierLevel* ptl )
    1362 {
    1363   WRITE_CODE( ptl->getProfileSpace(), 2 ,     "XXX_profile_space[]");
    1364   WRITE_FLAG( ptl->getTierFlag()==Level::HIGH, "XXX_tier_flag[]"    );
     1383
     1384#if ENC_DEC_TRACE || RExt__DECODER_DEBUG_BIT_STATISTICS
     1385Void TEncCavlc::codeProfileTier( const ProfileTierLevel* ptl, const Bool bIsSubLayer )
     1386#define PTL_TRACE_TEXT(txt) bIsSubLayer?("sub_layer_" txt) : ("general_" txt)
     1387#else
     1388Void TEncCavlc::codeProfileTier( const ProfileTierLevel* ptl, const Bool /*bIsSubLayer*/ )
     1389#define PTL_TRACE_TEXT(txt) txt
     1390#endif
     1391{
     1392  WRITE_CODE( ptl->getProfileSpace(), 2 ,      PTL_TRACE_TEXT("profile_space"                   ));
     1393  WRITE_FLAG( ptl->getTierFlag()==Level::HIGH, PTL_TRACE_TEXT("tier_flag"                       ));
    13651394#if SVC_EXTENSION
    1366   WRITE_CODE( (ptl->getProfileIdc() == Profile::SCALABLEMAIN || ptl->getProfileIdc() == Profile::SCALABLEMAIN10) ? 7 : Int(ptl->getProfileIdc()), 5 ,  "XXX_profile_idc[]"  );
     1395  WRITE_CODE( (ptl->getProfileIdc() == Profile::SCALABLEMAIN || ptl->getProfileIdc() == Profile::SCALABLEMAIN10) ? 7 : Int(ptl->getProfileIdc()), 5 ,  PTL_TRACE_TEXT("profile_idc")  );
    13671396#else
    1368   WRITE_CODE( Int(ptl->getProfileIdc()), 5 ,  "XXX_profile_idc[]"  );
     1397  WRITE_CODE( Int(ptl->getProfileIdc()), 5 ,   PTL_TRACE_TEXT("profile_idc"                     ));
    13691398#endif
    13701399  for(Int j = 0; j < 32; j++)
    13711400  {
    1372     WRITE_FLAG( ptl->getProfileCompatibilityFlag(j), "XXX_profile_compatibility_flag[][j]");
    1373   }
    1374 
    1375   WRITE_FLAG(ptl->getProgressiveSourceFlag(),   "general_progressive_source_flag");
    1376   WRITE_FLAG(ptl->getInterlacedSourceFlag(),    "general_interlaced_source_flag");
    1377   WRITE_FLAG(ptl->getNonPackedConstraintFlag(), "general_non_packed_constraint_flag");
    1378   WRITE_FLAG(ptl->getFrameOnlyConstraintFlag(), "general_frame_only_constraint_flag");
     1401    WRITE_FLAG( ptl->getProfileCompatibilityFlag(j), PTL_TRACE_TEXT("profile_compatibility_flag[][j]" ));
     1402  }
     1403
     1404  WRITE_FLAG(ptl->getProgressiveSourceFlag(),   PTL_TRACE_TEXT("progressive_source_flag"         ));
     1405  WRITE_FLAG(ptl->getInterlacedSourceFlag(),    PTL_TRACE_TEXT("interlaced_source_flag"          ));
     1406  WRITE_FLAG(ptl->getNonPackedConstraintFlag(), PTL_TRACE_TEXT("non_packed_constraint_flag"      ));
     1407  WRITE_FLAG(ptl->getFrameOnlyConstraintFlag(), PTL_TRACE_TEXT("frame_only_constraint_flag"      ));
    13791408
    13801409  if (ptl->getProfileIdc() == Profile::MAINREXT || ptl->getProfileIdc() == Profile::HIGHTHROUGHPUTREXT )
    13811410  {
    13821411    const UInt         bitDepthConstraint=ptl->getBitDepthConstraint();
    1383     WRITE_FLAG(bitDepthConstraint<=12, "general_max_12bit_constraint_flag");
    1384     WRITE_FLAG(bitDepthConstraint<=10, "general_max_10bit_constraint_flag");
    1385     WRITE_FLAG(bitDepthConstraint<= 8, "general_max_8bit_constraint_flag");
     1412    WRITE_FLAG(bitDepthConstraint<=12,          PTL_TRACE_TEXT("max_12bit_constraint_flag"       ));
     1413    WRITE_FLAG(bitDepthConstraint<=10,          PTL_TRACE_TEXT("max_10bit_constraint_flag"       ));
     1414    WRITE_FLAG(bitDepthConstraint<= 8,          PTL_TRACE_TEXT("max_8bit_constraint_flag"        ));
    13861415    const ChromaFormat chromaFmtConstraint=ptl->getChromaFormatConstraint();
    1387     WRITE_FLAG(chromaFmtConstraint==CHROMA_422||chromaFmtConstraint==CHROMA_420||chromaFmtConstraint==CHROMA_400, "general_max_422chroma_constraint_flag");
    1388     WRITE_FLAG(chromaFmtConstraint==CHROMA_420||chromaFmtConstraint==CHROMA_400,                                  "general_max_420chroma_constraint_flag");
    1389     WRITE_FLAG(chromaFmtConstraint==CHROMA_400,                                                                   "general_max_monochrome_constraint_flag");
    1390     WRITE_FLAG(ptl->getIntraConstraintFlag(),        "general_intra_constraint_flag");
    1391     WRITE_FLAG(0,                                    "general_one_picture_only_constraint_flag");
    1392     WRITE_FLAG(ptl->getLowerBitRateConstraintFlag(), "general_lower_bit_rate_constraint_flag");
     1416    WRITE_FLAG(chromaFmtConstraint==CHROMA_422||chromaFmtConstraint==CHROMA_420||chromaFmtConstraint==CHROMA_400, PTL_TRACE_TEXT("max_422chroma_constraint_flag" ));
     1417    WRITE_FLAG(chromaFmtConstraint==CHROMA_420||chromaFmtConstraint==CHROMA_400,                                  PTL_TRACE_TEXT("max_420chroma_constraint_flag" ));
     1418    WRITE_FLAG(chromaFmtConstraint==CHROMA_400,                                                                   PTL_TRACE_TEXT("max_monochrome_constraint_flag"));
     1419    WRITE_FLAG(ptl->getIntraConstraintFlag(),        PTL_TRACE_TEXT("intra_constraint_flag"           ));
     1420    WRITE_FLAG(0,                                    PTL_TRACE_TEXT("one_picture_only_constraint_flag"));
     1421    WRITE_FLAG(ptl->getLowerBitRateConstraintFlag(), PTL_TRACE_TEXT("lower_bit_rate_constraint_flag"  ));
    13931422#if SVC_EXTENSION
    13941423    WRITE_CODE(0, 32,  "general_reserved_zero_34bits");  WRITE_CODE(0, 2,  "general_reserved_zero_34bits");
     
    14111440    WRITE_CODE(0, 32,  "general_reserved_zero_43bits");  WRITE_CODE(0, 11,  "general_reserved_zero_43bits");
    14121441  }
    1413 
    1414   if( ( ptl->getProfileIdc() >= 1 && ptl->getProfileIdc() <= 5 ) ||
    1415       ptl->getProfileCompatibilityFlag(1) || ptl->getProfileCompatibilityFlag(2) ||
    1416       ptl->getProfileCompatibilityFlag(3) || ptl->getProfileCompatibilityFlag(4) ||
    1417       ptl->getProfileCompatibilityFlag(5)                                           )
    1418   {
    1419     WRITE_FLAG(false, "general_inbld_flag");
     1442#else
     1443    WRITE_CODE(0 , 16, PTL_TRACE_TEXT("reserved_zero_34bits[0..15]"     ));
     1444    WRITE_CODE(0 , 16, PTL_TRACE_TEXT("reserved_zero_34bits[16..31]"    ));
     1445    WRITE_CODE(0 ,  2, PTL_TRACE_TEXT("reserved_zero_34bits[32..33]"    ));
    14201446  }
    14211447  else
    14221448  {
    1423     WRITE_FLAG(false, "general_reserved_zero_bit");
    1424   }
    1425 #else
    1426     WRITE_CODE(0 , 16, "XXX_reserved_zero_35bits[0..15]");
    1427     WRITE_CODE(0 , 16, "XXX_reserved_zero_35bits[16..31]");
    1428     WRITE_CODE(0 ,  3, "XXX_reserved_zero_35bits[32..34]");
    1429   }
    1430   else
    1431   {
    1432     WRITE_CODE(0x0000 , 16, "XXX_reserved_zero_44bits[0..15]");
    1433     WRITE_CODE(0x0000 , 16, "XXX_reserved_zero_44bits[16..31]");
    1434     WRITE_CODE(0x000  , 12, "XXX_reserved_zero_44bits[32..43]");
    1435   }
    1436 #endif
     1449    WRITE_CODE(0x0000 , 16, PTL_TRACE_TEXT("reserved_zero_43bits[0..15]"     ));
     1450    WRITE_CODE(0x0000 , 16, PTL_TRACE_TEXT("reserved_zero_43bits[16..31]"    ));
     1451    WRITE_CODE(0x000  , 12, PTL_TRACE_TEXT("reserved_zero_43bits[32..42]"    ));
     1452  }
     1453#endif
     1454  WRITE_FLAG(false,   PTL_TRACE_TEXT("inbld_flag" ));
     1455#undef PTL_TRACE_TEXT
    14371456}
    14381457
     
    16571676  if(uiMode == 1)
    16581677  {
    1659     for ( Int iNumRef=0 ; iNumRef<iNbRef ; iNumRef++ )
     1678    for ( Int iNumRef=0 ; iNumRef<iNbRef ; iNumRef++ ) // loop over l0 and l1 syntax elements
    16601679    {
    16611680      RefPicList  eRefPicList = ( iNumRef ? REF_PIC_LIST_1 : REF_PIC_LIST_0 );
     
    16691688        {
    16701689          Int iDeltaDenom;
    1671           WRITE_UVLC( wp[COMPONENT_Y].uiLog2WeightDenom, "luma_log2_weight_denom" );     // ue(v): luma_log2_weight_denom
     1690          WRITE_UVLC( wp[COMPONENT_Y].uiLog2WeightDenom, "luma_log2_weight_denom" );
    16721691
    16731692          if( bChroma )
     
    16751694            assert(wp[COMPONENT_Cb].uiLog2WeightDenom == wp[COMPONENT_Cr].uiLog2WeightDenom); // check the channel-type settings are consistent across components.
    16761695            iDeltaDenom = (wp[COMPONENT_Cb].uiLog2WeightDenom - wp[COMPONENT_Y].uiLog2WeightDenom);
    1677             WRITE_SVLC( iDeltaDenom, "delta_chroma_log2_weight_denom" );       // se(v): delta_chroma_log2_weight_denom
     1696            WRITE_SVLC( iDeltaDenom, "delta_chroma_log2_weight_denom" );
    16781697          }
    16791698          bDenomCoded = true;
    16801699        }
    1681         WRITE_FLAG( wp[COMPONENT_Y].bPresentFlag, "luma_weight_lX_flag" );               // u(1): luma_weight_lX_flag
     1700        WRITE_FLAG( wp[COMPONENT_Y].bPresentFlag, iNumRef==0?"luma_weight_l0_flag[i]":"luma_weight_l1_flag[i]" );
    16821701        uiTotalSignalledWeightFlags += wp[COMPONENT_Y].bPresentFlag;
    16831702      }
     
    16881707          pcSlice->getWpScaling(eRefPicList, iRefIdx, wp);
    16891708          assert(wp[COMPONENT_Cb].bPresentFlag == wp[COMPONENT_Cr].bPresentFlag); // check the channel-type settings are consistent across components.
    1690           WRITE_FLAG( wp[COMPONENT_Cb].bPresentFlag, "chroma_weight_lX_flag" );           // u(1): chroma_weight_lX_flag
     1709          WRITE_FLAG( wp[COMPONENT_Cb].bPresentFlag, iNumRef==0?"chroma_weight_l0_flag[i]":"chroma_weight_l1_flag[i]" );
    16911710          uiTotalSignalledWeightFlags += 2*wp[COMPONENT_Cb].bPresentFlag;
    16921711        }
     
    16991718        {
    17001719          Int iDeltaWeight = (wp[COMPONENT_Y].iWeight - (1<<wp[COMPONENT_Y].uiLog2WeightDenom));
    1701           WRITE_SVLC( iDeltaWeight, "delta_luma_weight_lX" );                            // se(v): delta_luma_weight_lX
    1702           WRITE_SVLC( wp[COMPONENT_Y].iOffset, "luma_offset_lX" );                       // se(v): luma_offset_lX
     1720          WRITE_SVLC( iDeltaWeight, iNumRef==0?"delta_luma_weight_l0[i]":"delta_luma_weight_l1[i]" );
     1721          WRITE_SVLC( wp[COMPONENT_Y].iOffset, iNumRef==0?"luma_offset_l0[i]":"luma_offset_l1[i]" );
    17031722        }
    17041723
     
    17111730              assert(wp[COMPONENT_Cb].uiLog2WeightDenom == wp[COMPONENT_Cr].uiLog2WeightDenom);
    17121731              Int iDeltaWeight = (wp[j].iWeight - (1<<wp[COMPONENT_Cb].uiLog2WeightDenom));
    1713               WRITE_SVLC( iDeltaWeight, "delta_chroma_weight_lX" );            // se(v): delta_chroma_weight_lX
     1732              WRITE_SVLC( iDeltaWeight, iNumRef==0?"delta_chroma_weight_l0[i]":"delta_chroma_weight_l1[i]" );
    17141733
    17151734              Int range=pcSlice->getSPS()->getUseHighPrecisionPredictionWeighting() ? (1<<g_bitDepth[CHANNEL_TYPE_CHROMA])/2 : 128;
    17161735              Int pred = ( range - ( ( range*wp[j].iWeight)>>(wp[j].uiLog2WeightDenom) ) );
    17171736              Int iDeltaChroma = (wp[j].iOffset - pred);
    1718               WRITE_SVLC( iDeltaChroma, "delta_chroma_offset_lX" );            // se(v): delta_chroma_offset_lX
     1737              WRITE_SVLC( iDeltaChroma, iNumRef==0?"delta_chroma_offset_l0[i]":"delta_chroma_offset_l1[i]" );
    17191738            }
    17201739          }
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.h

    r1235 r1257  
    9797  Void  codeSliceHeader         ( TComSlice* pcSlice );
    9898  Void  codePTL                 ( const TComPTL* pcPTL, Bool profilePresentFlag, Int maxNumSubLayersMinus1);
    99   Void  codeProfileTier         ( const ProfileTierLevel* ptl );
     99  Void  codeProfileTier         ( const ProfileTierLevel* ptl, const Bool bIsSubLayer );
    100100  Void  codeHrdParameters       ( const TComHRD *hrd, Bool commonInfPresentFlag, UInt maxNumSubLayersMinus1 );
    101101  Void  codeTilesWPPEntryPoint( TComSlice* pSlice );
Note: See TracChangeset for help on using the changeset viewer.