diff --git a/source/Lib/TLibEncoder/TEncCavlc.cpp b/source/Lib/TLibEncoder/TEncCavlc.cpp
index ccd9007..1bb6679 100644
a
|
b
|
|
266 | 266 | |
267 | 267 | if (pcPPS->getUseTransformSkip()) |
268 | 268 | { |
269 | | WRITE_UVLC( pcPPS->getTransformSkipLog2MaxSize()-2, "log2_transform_skip_max_size_minus2"); |
| 269 | WRITE_UVLC( pcPPS->getTransformSkipLog2MaxSize()-2, "log2_max_transform_skip_block_size_minus2"); |
270 | 270 | } |
271 | 271 | |
272 | | WRITE_FLAG((pcPPS->getUseCrossComponentPrediction() ? 1 : 0), "cross_component_prediction_flag" ); |
| 272 | WRITE_FLAG((pcPPS->getUseCrossComponentPrediction() ? 1 : 0), "cross_component_prediction_enabled_flag" ); |
273 | 273 | |
274 | | WRITE_FLAG(UInt(pcPPS->getChromaQpAdjTableSize() > 0), "chroma_qp_adjustment_enabled_flag" ); |
| 274 | WRITE_FLAG(UInt(pcPPS->getChromaQpAdjTableSize() > 0), "chroma_qp_offset_list_enabled_flag " ); |
275 | 275 | if (pcPPS->getChromaQpAdjTableSize() > 0) |
276 | 276 | { |
277 | | WRITE_UVLC(pcPPS->getMaxCuChromaQpAdjDepth(), "diff_cu_chroma_qp_adjustment_depth"); |
278 | | WRITE_UVLC(pcPPS->getChromaQpAdjTableSize() - 1, "chroma_qp_adjustment_table_size_minus1"); |
| 277 | WRITE_UVLC(pcPPS->getMaxCuChromaQpAdjDepth(), "diff_cu_chroma_qp_offset_depth"); |
| 278 | WRITE_UVLC(pcPPS->getChromaQpAdjTableSize() - 1, "chroma_qp_offset_list_len_minus1"); |
279 | 279 | /* skip zero index */ |
280 | 280 | for (Int chromaQpAdjustmentIndex = 1; chromaQpAdjustmentIndex <= pcPPS->getChromaQpAdjTableSize(); chromaQpAdjustmentIndex++) |
281 | 281 | { |
282 | | WRITE_SVLC(pcPPS->getChromaQpAdjTableAt(chromaQpAdjustmentIndex).u.comp.CbOffset, "cb_qp_adjustnemt[i]"); |
283 | | WRITE_SVLC(pcPPS->getChromaQpAdjTableAt(chromaQpAdjustmentIndex).u.comp.CrOffset, "cr_qp_adjustnemt[i]"); |
| 282 | WRITE_SVLC(pcPPS->getChromaQpAdjTableAt(chromaQpAdjustmentIndex).u.comp.CbOffset, "cb_qp_offset_list[i]"); |
| 283 | WRITE_SVLC(pcPPS->getChromaQpAdjTableAt(chromaQpAdjustmentIndex).u.comp.CrOffset, "cr_qp_offset_list[i]"); |
284 | 284 | } |
285 | 285 | } |
286 | 286 | |
287 | | WRITE_UVLC( pcPPS->getSaoOffsetBitShift(CHANNEL_TYPE_LUMA), "sao_luma_bit_shift" ); |
288 | | WRITE_UVLC( pcPPS->getSaoOffsetBitShift(CHANNEL_TYPE_CHROMA), "sao_chroma_bit_shift" ); |
| 287 | WRITE_UVLC( pcPPS->getSaoOffsetBitShift(CHANNEL_TYPE_LUMA), "log2_sao_offset_scale_luma" ); |
| 288 | WRITE_UVLC( pcPPS->getSaoOffsetBitShift(CHANNEL_TYPE_CHROMA), "log2_sao_offset_scale_chroma" ); |
289 | 289 | break; |
290 | 290 | default: |
291 | 291 | assert(pps_extension_flags[i]==false); // Should never get here with an active PPS extension flag. |
… |
… |
|
326 | 326 | { |
327 | 327 | WRITE_CODE(pcVUI->getColourPrimaries(), 8, "colour_primaries"); |
328 | 328 | WRITE_CODE(pcVUI->getTransferCharacteristics(), 8, "transfer_characteristics"); |
329 | | WRITE_CODE(pcVUI->getMatrixCoefficients(), 8, "matrix_coefficients"); |
| 329 | WRITE_CODE(pcVUI->getMatrixCoefficients(), 8, "matrix_coeffs"); |
330 | 330 | } |
331 | 331 | } |
332 | 332 | |
… |
… |
|
376 | 376 | WRITE_FLAG(pcVUI->getRestrictedRefPicListsFlag(), "restricted_ref_pic_lists_flag"); |
377 | 377 | WRITE_UVLC(pcVUI->getMinSpatialSegmentationIdc(), "min_spatial_segmentation_idc"); |
378 | 378 | WRITE_UVLC(pcVUI->getMaxBytesPerPicDenom(), "max_bytes_per_pic_denom"); |
379 | | WRITE_UVLC(pcVUI->getMaxBitsPerMinCuDenom(), "max_bits_per_mincu_denom"); |
| 379 | WRITE_UVLC(pcVUI->getMaxBitsPerMinCuDenom(), "max_bits_per_min_cu_denom"); |
380 | 380 | WRITE_UVLC(pcVUI->getLog2MaxMvLengthHorizontal(), "log2_max_mv_length_horizontal"); |
381 | 381 | WRITE_UVLC(pcVUI->getLog2MaxMvLengthVertical(), "log2_max_mv_length_vertical"); |
382 | 382 | } |
… |
… |
|
390 | 390 | WRITE_FLAG( hrd->getVclHrdParametersPresentFlag() ? 1 : 0 , "vcl_hrd_parameters_present_flag" ); |
391 | 391 | if( hrd->getNalHrdParametersPresentFlag() || hrd->getVclHrdParametersPresentFlag() ) |
392 | 392 | { |
393 | | WRITE_FLAG( hrd->getSubPicCpbParamsPresentFlag() ? 1 : 0, "sub_pic_cpb_params_present_flag" ); |
| 393 | WRITE_FLAG( hrd->getSubPicCpbParamsPresentFlag() ? 1 : 0, "sub_pic_hrd_params_present_flag" ); |
394 | 394 | if( hrd->getSubPicCpbParamsPresentFlag() ) |
395 | 395 | { |
396 | 396 | WRITE_CODE( hrd->getTickDivisorMinus2(), 8, "tick_divisor_minus2" ); |
… |
… |
|
497 | 497 | for(UInt i=0; i <= pcSPS->getMaxTLayers()-1; i++) |
498 | 498 | { |
499 | 499 | WRITE_UVLC( pcSPS->getMaxDecPicBuffering(i) - 1, "sps_max_dec_pic_buffering_minus1[i]" ); |
500 | | WRITE_UVLC( pcSPS->getNumReorderPics(i), "sps_num_reorder_pics[i]" ); |
| 500 | WRITE_UVLC( pcSPS->getNumReorderPics(i), "sps_max_num_reorder_pics[i]" ); |
501 | 501 | WRITE_UVLC( pcSPS->getMaxLatencyIncrease(i), "sps_max_latency_increase_plus1[i]" ); |
502 | 502 | if (!subLayerOrderingInfoPresentFlag) |
503 | 503 | { |
… |
… |
|
506 | 506 | } |
507 | 507 | assert( pcSPS->getMaxCUWidth() == pcSPS->getMaxCUHeight() ); |
508 | 508 | |
509 | | WRITE_UVLC( pcSPS->getLog2MinCodingBlockSize() - 3, "log2_min_coding_block_size_minus3" ); |
510 | | WRITE_UVLC( pcSPS->getLog2DiffMaxMinCodingBlockSize(), "log2_diff_max_min_coding_block_size" ); |
511 | | WRITE_UVLC( pcSPS->getQuadtreeTULog2MinSize() - 2, "log2_min_transform_block_size_minus2" ); |
512 | | WRITE_UVLC( pcSPS->getQuadtreeTULog2MaxSize() - pcSPS->getQuadtreeTULog2MinSize(), "log2_diff_max_min_transform_block_size" ); |
| 509 | WRITE_UVLC( pcSPS->getLog2MinCodingBlockSize() - 3, "log2_min_luma_coding_block_size_minus3" ); |
| 510 | WRITE_UVLC( pcSPS->getLog2DiffMaxMinCodingBlockSize(), "log2_diff_max_min_luma_coding_block_size " ); |
| 511 | WRITE_UVLC( pcSPS->getQuadtreeTULog2MinSize() - 2, "log2_min_luma_transform_block_size_minus2" ); |
| 512 | WRITE_UVLC( pcSPS->getQuadtreeTULog2MaxSize() - pcSPS->getQuadtreeTULog2MinSize(), "log2_diff_max_min_luma_transform_block_size " ); |
513 | 513 | WRITE_UVLC( pcSPS->getQuadtreeTUMaxDepthInter() - 1, "max_transform_hierarchy_depth_inter" ); |
514 | 514 | WRITE_UVLC( pcSPS->getQuadtreeTUMaxDepthIntra() - 1, "max_transform_hierarchy_depth_intra" ); |
515 | 515 | WRITE_FLAG( pcSPS->getScalingListFlag() ? 1 : 0, "scaling_list_enabled_flag" ); |
… |
… |
|
547 | 547 | WRITE_FLAG( pcSPS->getLongTermRefsPresent() ? 1 : 0, "long_term_ref_pics_present_flag" ); |
548 | 548 | if (pcSPS->getLongTermRefsPresent()) |
549 | 549 | { |
550 | | WRITE_UVLC(pcSPS->getNumLongTermRefPicSPS(), "num_long_term_ref_pic_sps" ); |
| 550 | WRITE_UVLC(pcSPS->getNumLongTermRefPicSPS(), "num_long_term_ref_pics_sps" ); |
551 | 551 | for (UInt k = 0; k < pcSPS->getNumLongTermRefPicSPS(); k++) |
552 | 552 | { |
553 | 553 | WRITE_CODE( pcSPS->getLtRefPicPocLsbSps(k), pcSPS->getBitsForPOC(), "lt_ref_pic_poc_lsb_sps"); |
… |
… |
|
605 | 605 | |
606 | 606 | WRITE_FLAG( (pcSPS->getUseResidualRotation() ? 1 : 0), "transform_skip_rotation_enabled_flag"); |
607 | 607 | WRITE_FLAG( (pcSPS->getUseSingleSignificanceMapContext() ? 1 : 0), "transform_skip_context_enabled_flag"); |
608 | | WRITE_FLAG( (pcSPS->getUseResidualDPCM(RDPCM_SIGNAL_IMPLICIT) ? 1 : 0), "residual_dpcm_implicit_enabled_flag" ); |
609 | | WRITE_FLAG( (pcSPS->getUseResidualDPCM(RDPCM_SIGNAL_EXPLICIT) ? 1 : 0), "residual_dpcm_explicit_enabled_flag" ); |
| 608 | WRITE_FLAG( (pcSPS->getUseResidualDPCM(RDPCM_SIGNAL_IMPLICIT) ? 1 : 0), "implicit_rdpcm_enabled_flag" ); |
| 609 | WRITE_FLAG( (pcSPS->getUseResidualDPCM(RDPCM_SIGNAL_EXPLICIT) ? 1 : 0), "explicit_rdpcm_enabled_flag" ); |
610 | 610 | WRITE_FLAG( (pcSPS->getUseExtendedPrecision() ? 1 : 0), "extended_precision_processing_flag" ); |
611 | 611 | WRITE_FLAG( (pcSPS->getDisableIntraReferenceSmoothing() ? 1 : 0), "intra_smoothing_disabled_flag" ); |
612 | | WRITE_FLAG( (pcSPS->getUseHighPrecisionPredictionWeighting() ? 1 : 0), "high_precision_prediction_weighting_flag" ); |
613 | | WRITE_FLAG( (pcSPS->getUseGolombRiceParameterAdaptation() ? 1 : 0), "golomb_rice_parameter_adaptation_flag" ); |
| 612 | WRITE_FLAG( (pcSPS->getUseHighPrecisionPredictionWeighting() ? 1 : 0), "high_precision_offsets_enabled_flag" ); |
| 613 | WRITE_FLAG( (pcSPS->getUseGolombRiceParameterAdaptation() ? 1 : 0), "persistent_rice_adaptation_enabled_flag" ); |
614 | 614 | WRITE_FLAG( (pcSPS->getAlignCABACBeforeBypass() ? 1 : 0), "cabac_bypass_alignment_enabled_flag" ); |
615 | 615 | break; |
616 | 616 | default: |
… |
… |
|
630 | 630 | WRITE_CODE( pcVPS->getMaxTLayers() - 1, 3, "vps_max_sub_layers_minus1" ); |
631 | 631 | WRITE_FLAG( pcVPS->getTemporalNestingFlag(), "vps_temporal_id_nesting_flag" ); |
632 | 632 | assert (pcVPS->getMaxTLayers()>1||pcVPS->getTemporalNestingFlag()); |
633 | | WRITE_CODE( 0xffff, 16, "vps_reserved_ffff_16bits" ); |
| 633 | WRITE_CODE( 0xffff, 16, "vps_reserved_0xffff_16bits" ); |
634 | 634 | codePTL( pcVPS->getPTL(), true, pcVPS->getMaxTLayers() - 1 ); |
635 | 635 | const Bool subLayerOrderingInfoPresentFlag = 1; |
636 | 636 | WRITE_FLAG(subLayerOrderingInfoPresentFlag, "vps_sub_layer_ordering_info_present_flag"); |
637 | 637 | for(UInt i=0; i <= pcVPS->getMaxTLayers()-1; i++) |
638 | 638 | { |
639 | 639 | WRITE_UVLC( pcVPS->getMaxDecPicBuffering(i) - 1, "vps_max_dec_pic_buffering_minus1[i]" ); |
640 | | WRITE_UVLC( pcVPS->getNumReorderPics(i), "vps_num_reorder_pics[i]" ); |
| 640 | WRITE_UVLC( pcVPS->getNumReorderPics(i), "vps_max_num_reorder_pics[i]" ); |
641 | 641 | WRITE_UVLC( pcVPS->getMaxLatencyIncrease(i), "vps_max_latency_increase_plus1[i]" ); |
642 | 642 | if (!subLayerOrderingInfoPresentFlag) |
643 | 643 | { |
… |
… |
|
647 | 647 | |
648 | 648 | assert( pcVPS->getNumHrdParameters() <= MAX_VPS_NUM_HRD_PARAMETERS ); |
649 | 649 | assert( pcVPS->getMaxNuhReservedZeroLayerId() < MAX_VPS_NUH_RESERVED_ZERO_LAYER_ID_PLUS1 ); |
650 | | WRITE_CODE( pcVPS->getMaxNuhReservedZeroLayerId(), 6, "vps_max_nuh_reserved_zero_layer_id" ); |
651 | | WRITE_UVLC( pcVPS->getMaxOpSets() - 1, "vps_max_op_sets_minus1" ); |
| 650 | WRITE_CODE( pcVPS->getMaxNuhReservedZeroLayerId(), 6, "vps_max_layer_id" ); |
| 651 | WRITE_UVLC( pcVPS->getMaxOpSets() - 1, "vps_num_layer_sets_minus1" ); |
652 | 652 | for( UInt opsIdx = 1; opsIdx <= ( pcVPS->getMaxOpSets() - 1 ); opsIdx ++ ) |
653 | 653 | { |
654 | 654 | // Operation point set |
… |
… |
|
677 | 677 | for( UInt i = 0; i < pcVPS->getNumHrdParameters(); i ++ ) |
678 | 678 | { |
679 | 679 | // Only applicable for version 1 |
680 | | WRITE_UVLC( pcVPS->getHrdOpSetIdx( i ), "hrd_op_set_idx" ); |
| 680 | WRITE_UVLC( pcVPS->getHrdOpSetIdx( i ), "hrd_layer_set_idx" ); |
681 | 681 | if( i > 0 ) |
682 | 682 | { |
683 | 683 | WRITE_FLAG( pcVPS->getCprmsPresentFlag( i ) ? 1 : 0, "cprms_present_flag[i]" ); |
… |
… |
|
733 | 733 | { |
734 | 734 | for (Int i = 0; i < pcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++) |
735 | 735 | { |
736 | | assert(!!"slice_reserved_undetermined_flag[]"); |
737 | | WRITE_FLAG(0, "slice_reserved_undetermined_flag[]"); |
| 736 | assert(!!"slice_reserved_flag[]"); |
| 737 | WRITE_FLAG(0, "slice_reserved_flag[]"); |
738 | 738 | } |
739 | 739 | |
740 | 740 | WRITE_UVLC( pcSlice->getSliceType(), "slice_type" ); |
… |
… |
|
866 | 866 | } |
867 | 867 | if (pcSlice->getSPS()->getTMVPFlagsPresent()) |
868 | 868 | { |
869 | | WRITE_FLAG( pcSlice->getEnableTMVPFlag() ? 1 : 0, "slice_temporal_mvp_enable_flag" ); |
| 869 | WRITE_FLAG( pcSlice->getEnableTMVPFlag() ? 1 : 0, "slice_temporal_mvp_enabled_flag" ); |
870 | 870 | } |
871 | 871 | } |
872 | 872 | if(pcSlice->getSPS()->getUseSAO()) |
… |
… |
|
996 | 996 | { |
997 | 997 | if (numberValidComponents > COMPONENT_Cb) |
998 | 998 | { |
999 | | WRITE_SVLC( pcSlice->getSliceChromaQpDelta(COMPONENT_Cb), "slice_qp_delta_cb" ); |
| 999 | WRITE_SVLC( pcSlice->getSliceChromaQpDelta(COMPONENT_Cb), "slice_cb_qp_offset" ); |
1000 | 1000 | } |
1001 | 1001 | if (numberValidComponents > COMPONENT_Cr) |
1002 | 1002 | { |
1003 | | WRITE_SVLC( pcSlice->getSliceChromaQpDelta(COMPONENT_Cr), "slice_qp_delta_cr" ); |
| 1003 | WRITE_SVLC( pcSlice->getSliceChromaQpDelta(COMPONENT_Cr), "slice_cr_qp_offset" ); |
1004 | 1004 | } |
1005 | 1005 | assert(numberValidComponents <= COMPONENT_Cr+1); |
1006 | 1006 | } |
1007 | 1007 | |
1008 | 1008 | if (pcSlice->getPPS()->getChromaQpAdjTableSize() > 0) |
1009 | 1009 | { |
1010 | | WRITE_FLAG(pcSlice->getUseChromaQpAdj(), "slice_chroma_qp_adjustment_enabled_flag"); |
| 1010 | WRITE_FLAG(pcSlice->getUseChromaQpAdj(), "slice_chroma_qp_offset_list_enabled_flag "); |
1011 | 1011 | } |
1012 | 1012 | |
1013 | 1013 | if (pcSlice->getPPS()->getDeblockingFilterControlPresentFlag()) |
… |
… |
|
1037 | 1037 | } |
1038 | 1038 | if(pcSlice->getPPS()->getSliceHeaderExtensionPresentFlag()) |
1039 | 1039 | { |
1040 | | WRITE_UVLC(0,"slice_header_extension_length"); |
| 1040 | WRITE_UVLC(0,"slice_segment_header_extension_length"); |
1041 | 1041 | } |
1042 | 1042 | } |
1043 | 1043 | |
… |
… |
|
1081 | 1081 | } |
1082 | 1082 | Void TEncCavlc::codeProfileTier( const ProfileTierLevel* ptl ) |
1083 | 1083 | { |
1084 | | WRITE_CODE( ptl->getProfileSpace(), 2 , "XXX_profile_space[]"); |
1085 | | WRITE_FLAG( ptl->getTierFlag()==Level::HIGH, "XXX_tier_flag[]" ); |
1086 | | WRITE_CODE( Int(ptl->getProfileIdc()), 5 , "XXX_profile_idc[]" ); |
| 1084 | WRITE_CODE( ptl->getProfileSpace(), 2 , "general_profile_space[]"); |
| 1085 | WRITE_FLAG( ptl->getTierFlag()==Level::HIGH, "general_tier_flag[]" ); |
| 1086 | WRITE_CODE( Int(ptl->getProfileIdc()), 5 , "general_profile_idc[]" ); |
1087 | 1087 | for(Int j = 0; j < 32; j++) |
1088 | 1088 | { |
1089 | 1089 | WRITE_FLAG( ptl->getProfileCompatibilityFlag(j), "XXX_profile_compatibility_flag[][j]"); |
… |
… |
|
1107 | 1107 | WRITE_FLAG(ptl->getIntraConstraintFlag(), "general_intra_constraint_flag"); |
1108 | 1108 | WRITE_FLAG(0, "general_one_picture_only_constraint_flag"); |
1109 | 1109 | WRITE_FLAG(ptl->getLowerBitRateConstraintFlag(), "general_lower_bit_rate_constraint_flag"); |
1110 | | WRITE_CODE(0 , 16, "XXX_reserved_zero_35bits[0..15]"); |
1111 | | WRITE_CODE(0 , 16, "XXX_reserved_zero_35bits[16..31]"); |
1112 | | WRITE_CODE(0 , 3, "XXX_reserved_zero_35bits[32..34]"); |
| 1110 | WRITE_CODE(0 , 16, "general_reserved_zero_35bits[0..15]"); |
| 1111 | WRITE_CODE(0 , 16, "general_reserved_zero_35bits[16..31]"); |
| 1112 | WRITE_CODE(0 , 3, "general_reserved_zero_35bits[32..34]"); |
1113 | 1113 | } |
1114 | 1114 | else |
1115 | 1115 | { |
1116 | | WRITE_CODE(0x0000 , 16, "XXX_reserved_zero_44bits[0..15]"); |
1117 | | WRITE_CODE(0x0000 , 16, "XXX_reserved_zero_44bits[16..31]"); |
1118 | | WRITE_CODE(0x000 , 12, "XXX_reserved_zero_44bits[32..43]"); |
| 1116 | WRITE_CODE(0x0000 , 16, "general_reserved_zero_44bits[0..15]"); |
| 1117 | WRITE_CODE(0x0000 , 16, "general_reserved_zero_44bits[16..31]"); |
| 1118 | WRITE_CODE(0x000 , 12, "general_reserved_zero_44bits[32..43]"); |
1119 | 1119 | } |
1120 | 1120 | } |
1121 | 1121 | |
… |
… |
|
1357 | 1357 | } |
1358 | 1358 | bDenomCoded = true; |
1359 | 1359 | } |
1360 | | WRITE_FLAG( wp[COMPONENT_Y].bPresentFlag, "luma_weight_lX_flag" ); // u(1): luma_weight_lX_flag |
| 1360 | WRITE_FLAG( wp[COMPONENT_Y].bPresentFlag, "luma_weight_l0_flag" ); // u(1): luma_weight_l0_flag |
1361 | 1361 | uiTotalSignalledWeightFlags += wp[COMPONENT_Y].bPresentFlag; |
1362 | 1362 | } |
1363 | 1363 | if (bChroma) |
… |
… |
|
1366 | 1366 | { |
1367 | 1367 | pcSlice->getWpScaling(eRefPicList, iRefIdx, wp); |
1368 | 1368 | assert(wp[COMPONENT_Cb].bPresentFlag == wp[COMPONENT_Cr].bPresentFlag); // check the channel-type settings are consistent across components. |
1369 | | WRITE_FLAG( wp[COMPONENT_Cb].bPresentFlag, "chroma_weight_lX_flag" ); // u(1): chroma_weight_lX_flag |
| 1369 | WRITE_FLAG( wp[COMPONENT_Cb].bPresentFlag, "chroma_weight_l0_flag" ); // u(1): chroma_weight_l0_flag |
1370 | 1370 | uiTotalSignalledWeightFlags += 2*wp[COMPONENT_Cb].bPresentFlag; |
1371 | 1371 | } |
1372 | 1372 | } |
… |
… |
|
1377 | 1377 | if ( wp[COMPONENT_Y].bPresentFlag ) |
1378 | 1378 | { |
1379 | 1379 | Int iDeltaWeight = (wp[COMPONENT_Y].iWeight - (1<<wp[COMPONENT_Y].uiLog2WeightDenom)); |
1380 | | WRITE_SVLC( iDeltaWeight, "delta_luma_weight_lX" ); // se(v): delta_luma_weight_lX |
1381 | | WRITE_SVLC( wp[COMPONENT_Y].iOffset, "luma_offset_lX" ); // se(v): luma_offset_lX |
| 1380 | WRITE_SVLC( iDeltaWeight, "delta_luma_weight_l0" ); // se(v): delta_luma_weight_l0 |
| 1381 | WRITE_SVLC( wp[COMPONENT_Y].iOffset, "luma_offset_l0" ); // se(v): luma_offset_l0 |
1382 | 1382 | } |
1383 | 1383 | |
1384 | 1384 | if ( bChroma ) |
… |
… |
|
1389 | 1389 | { |
1390 | 1390 | assert(wp[COMPONENT_Cb].uiLog2WeightDenom == wp[COMPONENT_Cr].uiLog2WeightDenom); |
1391 | 1391 | Int iDeltaWeight = (wp[j].iWeight - (1<<wp[COMPONENT_Cb].uiLog2WeightDenom)); |
1392 | | WRITE_SVLC( iDeltaWeight, "delta_chroma_weight_lX" ); // se(v): delta_chroma_weight_lX |
| 1392 | WRITE_SVLC( iDeltaWeight, "delta_chroma_weight_l0" ); // se(v): delta_chroma_weight_l0 |
1393 | 1393 | |
1394 | 1394 | Int range=pcSlice->getSPS()->getUseHighPrecisionPredictionWeighting() ? (1<<g_bitDepth[CHANNEL_TYPE_CHROMA])/2 : 128; |
1395 | 1395 | Int pred = ( range - ( ( range*wp[j].iWeight)>>(wp[j].uiLog2WeightDenom) ) ); |
1396 | 1396 | Int iDeltaChroma = (wp[j].iOffset - pred); |
1397 | | WRITE_SVLC( iDeltaChroma, "delta_chroma_offset_lX" ); // se(v): delta_chroma_offset_lX |
| 1397 | WRITE_SVLC( iDeltaChroma, "delta_chroma_offset_l0" ); // se(v): delta_chroma_offset_l0 |
1398 | 1398 | } |
1399 | 1399 | } |
1400 | 1400 | } |