From 41dd50ad0dbbdec2225a6793758d40f0281978d9 Mon Sep 17 00:00:00 2001 From: James Almer Date: Thu, 27 Apr 2023 16:36:29 -0300 Subject: avcodec/hevc_ps: use get_{ue,se}_golomb() for some PPS Range extension fields Signed-off-by: James Almer --- libavcodec/hevc_ps.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'libavcodec/hevc_ps.c') diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c index 289b8f7d95..585b095073 100644 --- a/libavcodec/hevc_ps.c +++ b/libavcodec/hevc_ps.c @@ -1478,33 +1478,33 @@ static int pps_range_extensions(GetBitContext *gb, AVCodecContext *avctx, HEVCPPS *pps, HEVCSPS *sps) { if (pps->transform_skip_enabled_flag) { - pps->log2_max_transform_skip_block_size = get_ue_golomb_long(gb) + 2; + pps->log2_max_transform_skip_block_size = get_ue_golomb_31(gb) + 2; } pps->cross_component_prediction_enabled_flag = get_bits1(gb); pps->chroma_qp_offset_list_enabled_flag = get_bits1(gb); if (pps->chroma_qp_offset_list_enabled_flag) { - pps->diff_cu_chroma_qp_offset_depth = get_ue_golomb_long(gb); - pps->chroma_qp_offset_list_len_minus1 = get_ue_golomb_long(gb); + pps->diff_cu_chroma_qp_offset_depth = get_ue_golomb_31(gb); + pps->chroma_qp_offset_list_len_minus1 = get_ue_golomb_31(gb); if (pps->chroma_qp_offset_list_len_minus1 > 5) { av_log(avctx, AV_LOG_ERROR, "chroma_qp_offset_list_len_minus1 shall be in the range [0, 5].\n"); return AVERROR_INVALIDDATA; } for (int i = 0; i <= pps->chroma_qp_offset_list_len_minus1; i++) { - pps->cb_qp_offset_list[i] = get_se_golomb_long(gb); + pps->cb_qp_offset_list[i] = get_se_golomb(gb); if (pps->cb_qp_offset_list[i]) { av_log(avctx, AV_LOG_WARNING, "cb_qp_offset_list not tested yet.\n"); } - pps->cr_qp_offset_list[i] = get_se_golomb_long(gb); + pps->cr_qp_offset_list[i] = get_se_golomb(gb); if (pps->cr_qp_offset_list[i]) { av_log(avctx, AV_LOG_WARNING, "cb_qp_offset_list not tested yet.\n"); } } } - pps->log2_sao_offset_scale_luma = get_ue_golomb_long(gb); - pps->log2_sao_offset_scale_chroma = get_ue_golomb_long(gb); + pps->log2_sao_offset_scale_luma = get_ue_golomb_31(gb); + pps->log2_sao_offset_scale_chroma = get_ue_golomb_31(gb); if ( pps->log2_sao_offset_scale_luma > FFMAX(sps->bit_depth - 10, 0) || pps->log2_sao_offset_scale_chroma > FFMAX(sps->bit_depth_chroma - 10, 0) -- cgit v1.2.1