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
75 sh->slice_pic_parameter_set_id = slice_pic_parameter_set_id;75 sh->slice_pic_parameter_set_id = slice_pic_parameter_set_id;
76 76
77 if (!pps->single_tile_in_pic_flag) {77 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);
79 sh->first_tile_id = get_bits(&gb, pps->tile_id_len_minus1 + 1);79 sh->first_tile_id = get_bits(&gb, pps->tile_id_len_minus1 + 1);
80 } else80 } else
81 sh->single_tile_in_slice_flag = 1;81 sh->single_tile_in_slice_flag = 1;
82 82
83 if (!sh->single_tile_in_slice_flag) {83 if (!sh->single_tile_in_slice_flag) {
84 if (pps->arbitrary_slice_present_flag)84 if (pps->arbitrary_slice_present_flag)
85 sh->arbitrary_slice_flag = get_bits(&gb, 1);85 sh->arbitrary_slice_flag = get_bits1(&gb);
86 86
87 if (!sh->arbitrary_slice_flag)87 if (!sh->arbitrary_slice_flag)
88 sh->last_tile_id = get_bits(&gb, pps->tile_id_len_minus1 + 1);88 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
97 sh->slice_type = get_ue_golomb(&gb);97 sh->slice_type = get_ue_golomb(&gb);
98 98
99 if (nalu_type == EVC_IDR_NUT)99 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);
101 101
102 if (sps->sps_mmvd_flag && ((sh->slice_type == EVC_SLICE_TYPE_B) || (sh->slice_type == EVC_SLICE_TYPE_P)))102 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);
104 else104 else
105 sh->mmvd_group_enable_flag = 0;105 sh->mmvd_group_enable_flag = 0;
106 106
107 if (sps->sps_alf_flag) {107 if (sps->sps_alf_flag) {
108 int ChromaArrayType = sps->chroma_format_idc;108 int ChromaArrayType = sps->chroma_format_idc;
109 109
110 sh->slice_alf_enabled_flag = get_bits(&gb, 1);110 sh->slice_alf_enabled_flag = get_bits1(&gb);
111 111
112 if (sh->slice_alf_enabled_flag) {112 if (sh->slice_alf_enabled_flag) {
113 sh->slice_alf_luma_aps_id = get_bits(&gb, 5);113 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);
115 sh->slice_alf_chroma_idc = get_bits(&gb, 2);115 sh->slice_alf_chroma_idc = get_bits(&gb, 2);
116 116
117 if ((ChromaArrayType == 1 || ChromaArrayType == 2) && sh->slice_alf_chroma_idc > 0)117 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
140 140
141 if (sliceChromaAlfEnabledFlag) {141 if (sliceChromaAlfEnabledFlag) {
142 sh->slice_alf_chroma_aps_id = get_bits(&gb, 5);142 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);
144 }144 }
145 145
146 if (sliceChroma2AlfEnabledFlag) {146 if (sliceChroma2AlfEnabledFlag) {
147 sh->slice_alf_chroma2_aps_id = get_bits(&gb, 5);147 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);
149 }149 }
150 }150 }
151 }151 }

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