History

avcodec/evc_parse: use get_bits1() where useful

James Almer committed 3 years ago

Commit 7ff3dce1 parent 5b372c71 file · +8 −8Browse files

Unified · Split

libavcodec/evc_parse.c+8−8
@@ -75,14 +75,14 @@ int ff_evc_parse_slice_header(EVCParserSliceHeader *sh, const EVCParamSets *ps, · 74 unmodified lines
7575 sh->slice_pic_parameter_set_id = slice_pic_parameter_set_id;
7676
7777 if (!pps->single_tile_in_pic_flag) {
78− sh->single_tile_in_slice_flag = get_bits(&gb, 1);
78+ sh->single_tile_in_slice_flag = get_bits1(&gb);
7979 sh->first_tile_id = get_bits(&gb, pps->tile_id_len_minus1 + 1);
8080 } else
8181 sh->single_tile_in_slice_flag = 1;
8282
8383 if (!sh->single_tile_in_slice_flag) {
8484 if (pps->arbitrary_slice_present_flag)
85− sh->arbitrary_slice_flag = get_bits(&gb, 1);
85+ sh->arbitrary_slice_flag = get_bits1(&gb);
8686
8787 if (!sh->arbitrary_slice_flag)
8888 sh->last_tile_id = get_bits(&gb, pps->tile_id_len_minus1 + 1);
@@ -97,21 +97,21 @@ int ff_evc_parse_slice_header(EVCParserSliceHeader *sh, const EVCParamSets *ps, · 8 unmodified lines
9797 sh->slice_type = get_ue_golomb(&gb);
9898
9999 if (nalu_type == EVC_IDR_NUT)
100− sh->no_output_of_prior_pics_flag = get_bits(&gb, 1);
100+ sh->no_output_of_prior_pics_flag = get_bits1(&gb);
101101
102102 if (sps->sps_mmvd_flag && ((sh->slice_type == EVC_SLICE_TYPE_B) || (sh->slice_type == EVC_SLICE_TYPE_P)))
103− sh->mmvd_group_enable_flag = get_bits(&gb, 1);
103+ sh->mmvd_group_enable_flag = get_bits1(&gb);
104104 else
105105 sh->mmvd_group_enable_flag = 0;
106106
107107 if (sps->sps_alf_flag) {
108108 int ChromaArrayType = sps->chroma_format_idc;
109109
110− sh->slice_alf_enabled_flag = get_bits(&gb, 1);
110+ sh->slice_alf_enabled_flag = get_bits1(&gb);
111111
112112 if (sh->slice_alf_enabled_flag) {
113113 sh->slice_alf_luma_aps_id = get_bits(&gb, 5);
114− sh->slice_alf_map_flag = get_bits(&gb, 1);
114+ sh->slice_alf_map_flag = get_bits1(&gb);
115115 sh->slice_alf_chroma_idc = get_bits(&gb, 2);
116116
117117 if ((ChromaArrayType == 1 || ChromaArrayType == 2) && sh->slice_alf_chroma_idc > 0)
@@ -140,12 +140,12 @@ int ff_evc_parse_slice_header(EVCParserSliceHeader *sh, const EVCParamSets *ps, · 22 unmodified lines
140140
141141 if (sliceChromaAlfEnabledFlag) {
142142 sh->slice_alf_chroma_aps_id = get_bits(&gb, 5);
143− sh->slice_alf_chroma_map_flag = get_bits(&gb, 1);
143+ sh->slice_alf_chroma_map_flag = get_bits1(&gb);
144144 }
145145
146146 if (sliceChroma2AlfEnabledFlag) {
147147 sh->slice_alf_chroma2_aps_id = get_bits(&gb, 5);
148− sh->slice_alf_chroma2_map_flag = get_bits(&gb, 1);
148+ sh->slice_alf_chroma2_map_flag = get_bits1(&gb);
149149 }
150150 }
151151 }

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