diff options
author | James Almer <jamrial@gmail.com> | 2023-04-27 16:36:29 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2023-04-28 20:15:57 -0300 |
commit | 41dd50ad0dbbdec2225a6793758d40f0281978d9 (patch) | |
tree | 626c2b740ed370c299d89da78859a6c3c570a7c3 | |
parent | df3fd3accd84b12720312fc0b8ec262b3f44486b (diff) | |
download | ffmpeg-41dd50ad0dbbdec2225a6793758d40f0281978d9.tar.gz |
avcodec/hevc_ps: use get_{ue,se}_golomb() for some PPS Range extension fields
Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r-- | libavcodec/hevc_ps.c | 14 |
1 files changed, 7 insertions, 7 deletions
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) |