History

avcodec/hevc_ps: use get_{ue,se}_golomb() for some PPS Range extension fields

James Almer committed 3 years ago

Commit 41dd50a1 parent df3fd3a1 file · +7 −7Browse files

Unified · Split

libavcodec/hevc_ps.c+7−7
@@ -1478,33 +1478,33 @@ static int pps_range_extensions(GetBitContext *gb, AVCodecContext *avctx, · 1477 unmodified lines
14781478 HEVCPPS *pps, HEVCSPS *sps)
14791479 {
14801480 if (pps->transform_skip_enabled_flag) {
1481− pps->log2_max_transform_skip_block_size = get_ue_golomb_long(gb) + 2;
1481+ pps->log2_max_transform_skip_block_size = get_ue_golomb_31(gb) + 2;
14821482 }
14831483 pps->cross_component_prediction_enabled_flag = get_bits1(gb);
14841484 pps->chroma_qp_offset_list_enabled_flag = get_bits1(gb);
14851485 if (pps->chroma_qp_offset_list_enabled_flag) {
1486− pps->diff_cu_chroma_qp_offset_depth = get_ue_golomb_long(gb);
1487− pps->chroma_qp_offset_list_len_minus1 = get_ue_golomb_long(gb);
1486+ pps->diff_cu_chroma_qp_offset_depth = get_ue_golomb_31(gb);
1487+ pps->chroma_qp_offset_list_len_minus1 = get_ue_golomb_31(gb);
14881488 if (pps->chroma_qp_offset_list_len_minus1 > 5) {
14891489 av_log(avctx, AV_LOG_ERROR,
14901490 "chroma_qp_offset_list_len_minus1 shall be in the range [0, 5].\n");
14911491 return AVERROR_INVALIDDATA;
14921492 }
14931493 for (int i = 0; i <= pps->chroma_qp_offset_list_len_minus1; i++) {
1494− pps->cb_qp_offset_list[i] = get_se_golomb_long(gb);
1494+ pps->cb_qp_offset_list[i] = get_se_golomb(gb);
14951495 if (pps->cb_qp_offset_list[i]) {
14961496 av_log(avctx, AV_LOG_WARNING,
14971497 "cb_qp_offset_list not tested yet.\n");
14981498 }
1499− pps->cr_qp_offset_list[i] = get_se_golomb_long(gb);
1499+ pps->cr_qp_offset_list[i] = get_se_golomb(gb);
15001500 if (pps->cr_qp_offset_list[i]) {
15011501 av_log(avctx, AV_LOG_WARNING,
15021502 "cb_qp_offset_list not tested yet.\n");
15031503 }
15041504 }
15051505 }
1506− pps->log2_sao_offset_scale_luma = get_ue_golomb_long(gb);
1507− pps->log2_sao_offset_scale_chroma = get_ue_golomb_long(gb);
1506+ pps->log2_sao_offset_scale_luma = get_ue_golomb_31(gb);
1507+ pps->log2_sao_offset_scale_chroma = get_ue_golomb_31(gb);
15081508
15091509 if ( pps->log2_sao_offset_scale_luma > FFMAX(sps->bit_depth - 10, 0)
15101510 || pps->log2_sao_offset_scale_chroma > FFMAX(sps->bit_depth_chroma - 10, 0)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t