FFmpeg
evc_ps.c
Go to the documentation of this file.
1 /*
2  * This file is part of FFmpeg.
3  *
4  * FFmpeg is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * FFmpeg is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with FFmpeg; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
19 #include "get_bits.h"
20 #include "golomb.h"
21 #include "evc.h"
22 #include "evc_ps.h"
23 
24 #define EXTENDED_SAR 255
25 
26 // @see ISO_IEC_23094-1 (7.3.7 Reference picture list structure syntax)
28 {
29  uint32_t delta_poc_st, strp_entry_sign_flag = 0;
31 
32  if ((unsigned)rpl->ref_pic_num > sps->sps_max_dec_pic_buffering_minus1)
33  return AVERROR_INVALIDDATA;
34 
35  if (rpl->ref_pic_num > 0) {
36  delta_poc_st = get_ue_golomb_long(gb);
37 
38  rpl->ref_pics[0] = delta_poc_st;
39  if (rpl->ref_pics[0] != 0) {
40  strp_entry_sign_flag = get_bits(gb, 1);
41 
42  rpl->ref_pics[0] *= 1 - (strp_entry_sign_flag << 1);
43  }
44  }
45 
46  for (int i = 1; i < rpl->ref_pic_num; ++i) {
47  delta_poc_st = get_ue_golomb_long(gb);
48  if (delta_poc_st != 0)
49  strp_entry_sign_flag = get_bits(gb, 1);
50  rpl->ref_pics[i] = rpl->ref_pics[i - 1] + delta_poc_st * (1 - (strp_entry_sign_flag << 1));
51  }
52 
53  return 0;
54 }
55 
56 // @see ISO_IEC_23094-1 (E.2.2 HRD parameters syntax)
58 {
61  return AVERROR_INVALIDDATA;
62 
63  hrd->bit_rate_scale = get_bits(gb, 4);
64  hrd->cpb_size_scale = get_bits(gb, 4);
65  for (int SchedSelIdx = 0; SchedSelIdx <= hrd->cpb_cnt_minus1; SchedSelIdx++) {
66  hrd->bit_rate_value_minus1[SchedSelIdx] = get_ue_golomb_long(gb);
67  hrd->cpb_size_value_minus1[SchedSelIdx] = get_ue_golomb_long(gb);
68  hrd->cbr_flag[SchedSelIdx] = get_bits(gb, 1);
69  }
73  hrd->time_offset_length = get_bits(gb, 5);
74 
75  return 0;
76 }
77 
78 // @see ISO_IEC_23094-1 (E.2.1 VUI parameters syntax)
80 {
81  int ret;
82 
85  vui->aspect_ratio_idc = get_bits(gb, 8);
86  if (vui->aspect_ratio_idc == EXTENDED_SAR) {
87  vui->sar_width = get_bits(gb, 16);
88  vui->sar_height = get_bits(gb, 16);
89  }
90  }
93  vui->overscan_appropriate_flag = get_bits(gb, 1);
96  vui->video_format = get_bits(gb, 3);
97  vui->video_full_range_flag = get_bits(gb, 1);
100  vui->colour_primaries = get_bits(gb, 8);
101  vui->transfer_characteristics = get_bits(gb, 8);
102  vui->matrix_coefficients = get_bits(gb, 8);
103  }
104  }
106  if (vui->chroma_loc_info_present_flag) {
109  }
111 
112  vui->field_seq_flag = get_bits(gb, 1);
113 
114  vui->timing_info_present_flag = get_bits(gb, 1);
115  if (vui->timing_info_present_flag) {
116  vui->num_units_in_tick = get_bits_long(gb, 32);
117  vui->time_scale = get_bits_long(gb, 32);
118  vui->fixed_pic_rate_flag = get_bits(gb, 1);
119  }
122  ret = hrd_parameters(gb, &vui->hrd_parameters);
123  if (ret < 0)
124  return ret;
125  }
126 
129  ret = hrd_parameters(gb, &vui->hrd_parameters);
130  if (ret < 0)
131  return ret;
132  }
134  vui->low_delay_hrd_flag = get_bits(gb, 1);
135  vui->pic_struct_present_flag = get_bits(gb, 1);
136  vui->bitstream_restriction_flag = get_bits(gb, 1);
137  if (vui->bitstream_restriction_flag) {
145  }
146 
147  return 0;
148 }
149 
150 // @see ISO_IEC_23094-1 (7.3.2.1 SPS RBSP syntax)
152 {
153  EVCParserSPS *sps;
154  unsigned sps_seq_parameter_set_id;
155  int ret;
156 
157  sps_seq_parameter_set_id = get_ue_golomb(gb);
158 
159  if (sps_seq_parameter_set_id >= EVC_MAX_SPS_COUNT)
160  return AVERROR_INVALIDDATA;
161 
162  sps = av_mallocz(sizeof(*sps));
163  if (!sps)
164  return AVERROR(ENOMEM);
165 
166  sps->sps_seq_parameter_set_id = sps_seq_parameter_set_id;
167 
168  // the Baseline profile is indicated by profile_idc eqal to 0
169  // the Main profile is indicated by profile_idc eqal to 1
170  sps->profile_idc = get_bits(gb, 8);
171 
172  sps->level_idc = get_bits(gb, 8);
173 
174  skip_bits_long(gb, 32); /* skip toolset_idc_h */
175  skip_bits_long(gb, 32); /* skip toolset_idc_l */
176 
177  // 0 - monochrome
178  // 1 - 4:2:0
179  // 2 - 4:2:2
180  // 3 - 4:4:4
181  sps->chroma_format_idc = get_ue_golomb_31(gb);
182  if (sps->chroma_format_idc > 3) {
184  goto fail;
185  }
186 
187  sps->pic_width_in_luma_samples = get_ue_golomb_long(gb);
188  sps->pic_height_in_luma_samples = get_ue_golomb_long(gb);
189 
190  sps->bit_depth_luma_minus8 = get_ue_golomb_31(gb);
191  sps->bit_depth_chroma_minus8 = get_ue_golomb_31(gb);
192 
193  sps->sps_btt_flag = get_bits1(gb);
194  if (sps->sps_btt_flag) {
195  sps->log2_ctu_size_minus2 = get_ue_golomb_long(gb);
196  sps->log2_min_cb_size_minus2 = get_ue_golomb_long(gb);
197  sps->log2_diff_ctu_max_14_cb_size = get_ue_golomb_long(gb);
198  sps->log2_diff_ctu_max_tt_cb_size = get_ue_golomb_long(gb);
199  sps->log2_diff_min_cb_min_tt_cb_size_minus2 = get_ue_golomb_long(gb);
200  }
201 
202  sps->sps_suco_flag = get_bits1(gb);
203  if (sps->sps_suco_flag) {
204  sps->log2_diff_ctu_size_max_suco_cb_size = get_ue_golomb_long(gb);
205  sps->log2_diff_max_suco_min_suco_cb_size = get_ue_golomb_long(gb);
206  }
207 
208  sps->sps_admvp_flag = get_bits1(gb);
209  if (sps->sps_admvp_flag) {
210  sps->sps_affine_flag = get_bits1(gb);
211  sps->sps_amvr_flag = get_bits1(gb);
212  sps->sps_dmvr_flag = get_bits1(gb);
213  sps->sps_mmvd_flag = get_bits1(gb);
214  sps->sps_hmvp_flag = get_bits1(gb);
215  }
216 
217  sps->sps_eipd_flag = get_bits1(gb);
218  if (sps->sps_eipd_flag) {
219  sps->sps_ibc_flag = get_bits1(gb);
220  if (sps->sps_ibc_flag)
221  sps->log2_max_ibc_cand_size_minus2 = get_ue_golomb(gb);
222  }
223 
224  sps->sps_cm_init_flag = get_bits1(gb);
225  if (sps->sps_cm_init_flag)
226  sps->sps_adcc_flag = get_bits1(gb);
227 
228  sps->sps_iqt_flag = get_bits1(gb);
229  if (sps->sps_iqt_flag)
230  sps->sps_ats_flag = get_bits1(gb);
231 
232  sps->sps_addb_flag = get_bits1(gb);
233  sps->sps_alf_flag = get_bits1(gb);
234  sps->sps_htdf_flag = get_bits1(gb);
235  sps->sps_rpl_flag = get_bits1(gb);
236  sps->sps_pocs_flag = get_bits1(gb);
237  sps->sps_dquant_flag = get_bits1(gb);
238  sps->sps_dra_flag = get_bits1(gb);
239 
240  if (sps->sps_pocs_flag) {
241  sps->log2_max_pic_order_cnt_lsb_minus4 = get_ue_golomb(gb);
242  if (sps->log2_max_pic_order_cnt_lsb_minus4 > 12U) {
244  goto fail;
245  }
246  }
247 
248  if (!sps->sps_pocs_flag || !sps->sps_rpl_flag) {
249  sps->log2_sub_gop_length = get_ue_golomb(gb);
250  if (sps->log2_sub_gop_length > 5U) {
252  goto fail;
253  }
254  if (sps->log2_sub_gop_length == 0)
255  sps->log2_ref_pic_gap_length = get_ue_golomb(gb);
256  }
257 
258  if (!sps->sps_rpl_flag)
259  sps->max_num_tid0_ref_pics = get_ue_golomb_31(gb);
260  else {
261  sps->sps_max_dec_pic_buffering_minus1 = get_ue_golomb_long(gb);
262  if ((unsigned)sps->sps_max_dec_pic_buffering_minus1 > 16 - 1) {
264  goto fail;
265  }
266  sps->long_term_ref_pic_flag = get_bits1(gb);
267  sps->rpl1_same_as_rpl0_flag = get_bits1(gb);
268  sps->num_ref_pic_list_in_sps[0] = get_ue_golomb(gb);
269 
270  if ((unsigned)sps->num_ref_pic_list_in_sps[0] >= EVC_MAX_NUM_RPLS) {
272  goto fail;
273  }
274 
275  for (int i = 0; i < sps->num_ref_pic_list_in_sps[0]; ++i) {
276  ret = ref_pic_list_struct(sps, gb, &sps->rpls[0][i]);
277  if (ret < 0)
278  goto fail;
279  }
280 
281  if (!sps->rpl1_same_as_rpl0_flag) {
282  sps->num_ref_pic_list_in_sps[1] = get_ue_golomb(gb);
283  if ((unsigned)sps->num_ref_pic_list_in_sps[1] >= EVC_MAX_NUM_RPLS) {
285  goto fail;
286  }
287  for (int i = 0; i < sps->num_ref_pic_list_in_sps[1]; ++i) {
288  ret = ref_pic_list_struct(sps, gb, &sps->rpls[1][i]);
289  if (ret < 0)
290  goto fail;
291  }
292  }
293  }
294 
295  sps->picture_cropping_flag = get_bits1(gb);
296 
297  if (sps->picture_cropping_flag) {
298  sps->picture_crop_left_offset = get_ue_golomb_long(gb);
299  sps->picture_crop_right_offset = get_ue_golomb_long(gb);
300  sps->picture_crop_top_offset = get_ue_golomb_long(gb);
301  sps->picture_crop_bottom_offset = get_ue_golomb_long(gb);
302  }
303 
304  if (sps->chroma_format_idc != 0) {
305  sps->chroma_qp_table_struct.chroma_qp_table_present_flag = get_bits1(gb);
306 
307  if (sps->chroma_qp_table_struct.chroma_qp_table_present_flag) {
308  sps->chroma_qp_table_struct.same_qp_table_for_chroma = get_bits1(gb);
309  sps->chroma_qp_table_struct.global_offset_flag = get_bits1(gb);
310  for (int i = 0; i < (sps->chroma_qp_table_struct.same_qp_table_for_chroma ? 1 : 2); i++) {
311  sps->chroma_qp_table_struct.num_points_in_qp_table_minus1[i] = get_ue_golomb(gb);
312  if (sps->chroma_qp_table_struct.num_points_in_qp_table_minus1[i] >= EVC_MAX_QP_TABLE_SIZE) {
314  goto fail;
315  }
316  for (int j = 0; j <= sps->chroma_qp_table_struct.num_points_in_qp_table_minus1[i]; j++) {
317  sps->chroma_qp_table_struct.delta_qp_in_val_minus1[i][j] = get_bits(gb, 6);
318  sps->chroma_qp_table_struct.delta_qp_out_val[i][j] = get_se_golomb_long(gb);
319  }
320  }
321  }
322  }
323 
324  sps->vui_parameters_present_flag = get_bits1(gb);
325  if (sps->vui_parameters_present_flag) {
326  ret = vui_parameters(gb, &(sps->vui_parameters));
327  if (ret < 0)
328  goto fail;
329  }
330 
331  // @note
332  // If necessary, add the missing fields to the EVCParserSPS structure
333  // and then extend parser implementation
334 
335  av_freep(&ps->sps[sps_seq_parameter_set_id]);
336  ps->sps[sps_seq_parameter_set_id] = sps;
337 
338  return 0;
339 fail:
340  av_free(sps);
341  return ret;
342 }
343 
344 // @see ISO_IEC_23094-1 (7.3.2.2 SPS RBSP syntax)
345 //
346 // @note
347 // The current implementation of parse_sps function doesn't handle VUI parameters parsing.
348 // If it will be needed, parse_sps function could be extended to handle VUI parameters parsing
349 // to initialize fields of the AVCodecContex i.e. color_primaries, color_trc,color_range
350 //
352 {
353  EVCParserPPS *pps;
354  unsigned pps_pic_parameter_set_id;
355  int ret;
356 
357  pps_pic_parameter_set_id = get_ue_golomb(gb);
358  if (pps_pic_parameter_set_id >= EVC_MAX_PPS_COUNT)
359  return AVERROR_INVALIDDATA;
360 
361  pps = av_mallocz(sizeof(*pps));
362  if (!pps)
363  return AVERROR(ENOMEM);
364 
365  pps->pps_pic_parameter_set_id = pps_pic_parameter_set_id;
366 
367  pps->pps_seq_parameter_set_id = get_ue_golomb(gb);
368  if (pps->pps_seq_parameter_set_id >= EVC_MAX_SPS_COUNT) {
370  goto fail;
371  }
372 
373  pps->num_ref_idx_default_active_minus1[0] = get_ue_golomb(gb);
374  pps->num_ref_idx_default_active_minus1[1] = get_ue_golomb(gb);
375  pps->additional_lt_poc_lsb_len = get_ue_golomb(gb);
376  pps->rpl1_idx_present_flag = get_bits1(gb);
377  pps->single_tile_in_pic_flag = get_bits1(gb);
378 
379  if (!pps->single_tile_in_pic_flag) {
380  pps->num_tile_columns_minus1 = get_ue_golomb(gb);
381  pps->num_tile_rows_minus1 = get_ue_golomb(gb);
382  if (pps->num_tile_columns_minus1 >= EVC_MAX_TILE_COLUMNS ||
383  pps->num_tile_rows_minus1 >= EVC_MAX_TILE_ROWS) {
385  goto fail;
386  }
387  pps->uniform_tile_spacing_flag = get_bits1(gb);
388 
389  if (!pps->uniform_tile_spacing_flag) {
390  for (int i = 0; i < pps->num_tile_columns_minus1; i++)
391  pps->tile_column_width_minus1[i] = get_ue_golomb(gb);
392 
393  for (int i = 0; i < pps->num_tile_rows_minus1; i++)
394  pps->tile_row_height_minus1[i] = get_ue_golomb(gb);
395  }
396  pps->loop_filter_across_tiles_enabled_flag = get_bits1(gb);
397  pps->tile_offset_len_minus1 = get_ue_golomb(gb);
398  }
399 
400  pps->tile_id_len_minus1 = get_ue_golomb(gb);
401  if (pps->tile_id_len_minus1 > 15U) {
403  goto fail;
404  }
405  pps->explicit_tile_id_flag = get_bits1(gb);
406 
407  if (pps->explicit_tile_id_flag) {
408  for (int i = 0; i <= pps->num_tile_rows_minus1; i++) {
409  for (int j = 0; j <= pps->num_tile_columns_minus1; j++)
410  pps->tile_id_val[i][j] = get_bits(gb, pps->tile_id_len_minus1 + 1);
411  }
412  }
413 
414  pps->pic_dra_enabled_flag = 0;
415  pps->pic_dra_enabled_flag = get_bits1(gb);
416 
417  if (pps->pic_dra_enabled_flag)
418  pps->pic_dra_aps_id = get_bits(gb, 5);
419 
420  pps->arbitrary_slice_present_flag = get_bits1(gb);
421  pps->constrained_intra_pred_flag = get_bits1(gb);
422  pps->cu_qp_delta_enabled_flag = get_bits1(gb);
423 
424  if (pps->cu_qp_delta_enabled_flag)
425  pps->log2_cu_qp_delta_area_minus6 = get_ue_golomb(gb);
426 
427  av_freep(&ps->pps[pps_pic_parameter_set_id]);
428  ps->pps[pps_pic_parameter_set_id] = pps;
429 
430  return 0;
431 fail:
432  av_free(pps);
433  return ret;
434 }
435 
437  for (int i = 0; i < EVC_MAX_SPS_COUNT; i++)
438  av_freep(&ps->sps[i]);
439 
440  for (int i = 0; i < EVC_MAX_PPS_COUNT; i++)
441  av_freep(&ps->pps[i]);
442 }
VUIParameters::aspect_ratio_info_present_flag
uint8_t aspect_ratio_info_present_flag
Definition: evc_ps.h:67
VUIParameters::chroma_sample_loc_type_top_field
uint8_t chroma_sample_loc_type_top_field
Definition: evc_ps.h:81
skip_bits_long
static void skip_bits_long(GetBitContext *s, int n)
Skips the specified number of bits.
Definition: get_bits.h:278
ff_evc_parse_pps
int ff_evc_parse_pps(GetBitContext *gb, EVCParamSets *ps)
Definition: evc_ps.c:351
HRDParameters
Definition: evc_ps.h:52
VUIParameters::aspect_ratio_idc
uint8_t aspect_ratio_idc
Definition: evc_ps.h:68
AVERROR
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
VUIParameters::max_dec_pic_buffering
uint32_t max_dec_pic_buffering
Definition: evc_ps.h:100
VUIParameters::num_reorder_pics
uint32_t num_reorder_pics
Definition: evc_ps.h:99
get_se_golomb_long
static int get_se_golomb_long(GetBitContext *gb)
Definition: golomb.h:294
get_bits_long
static unsigned int get_bits_long(GetBitContext *s, int n)
Read 0-32 bits.
Definition: get_bits.h:421
get_ue_golomb
static int get_ue_golomb(GetBitContext *gb)
Read an unsigned Exp-Golomb code in the range 0 to 8190.
Definition: golomb.h:53
EVCParamSets
Definition: evc_ps.h:211
VUIParameters::pic_struct_present_flag
uint8_t pic_struct_present_flag
Definition: evc_ps.h:92
HRDParameters::cpb_removal_delay_length_minus1
uint8_t cpb_removal_delay_length_minus1
Definition: evc_ps.h:60
HRDParameters::bit_rate_scale
uint8_t bit_rate_scale
Definition: evc_ps.h:54
VUIParameters::chroma_loc_info_present_flag
uint8_t chroma_loc_info_present_flag
Definition: evc_ps.h:80
HRDParameters::cpb_cnt_minus1
uint8_t cpb_cnt_minus1
Definition: evc_ps.h:53
VUIParameters::bitstream_restriction_flag
uint8_t bitstream_restriction_flag
Definition: evc_ps.h:93
VUIParameters::log2_max_mv_length_vertical
uint8_t log2_max_mv_length_vertical
Definition: evc_ps.h:98
evc_ps.h
EVCParamSets::pps
EVCParserPPS * pps[EVC_MAX_PPS_COUNT]
Definition: evc_ps.h:213
golomb.h
exp golomb vlc stuff
get_bits
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
Definition: get_bits.h:335
HRDParameters::bit_rate_value_minus1
uint32_t bit_rate_value_minus1[NUM_CPB]
Definition: evc_ps.h:56
VUIParameters::vcl_hrd_parameters_present_flag
uint8_t vcl_hrd_parameters_present_flag
Definition: evc_ps.h:90
fail
#define fail()
Definition: checkasm.h:138
GetBitContext
Definition: get_bits.h:108
HRDParameters::time_offset_length
uint8_t time_offset_length
Definition: evc_ps.h:62
HRDParameters::cpb_size_scale
uint8_t cpb_size_scale
Definition: evc_ps.h:55
ff_evc_ps_free
void ff_evc_ps_free(EVCParamSets *ps)
Definition: evc_ps.c:436
FF_ARRAY_ELEMS
#define FF_ARRAY_ELEMS(a)
Definition: sinewin_tablegen.c:29
ff_evc_parse_sps
int ff_evc_parse_sps(GetBitContext *gb, EVCParamSets *ps)
Definition: evc_ps.c:151
vui_parameters
static int vui_parameters(GetBitContext *gb, VUIParameters *vui)
Definition: evc_ps.c:79
EVC_MAX_QP_TABLE_SIZE
#define EVC_MAX_QP_TABLE_SIZE
Definition: evc_ps.h:32
VUIParameters::sar_width
uint16_t sar_width
Definition: evc_ps.h:69
VUIParameters::chroma_sample_loc_type_bottom_field
uint8_t chroma_sample_loc_type_bottom_field
Definition: evc_ps.h:82
EVC_MAX_TILE_COLUMNS
@ EVC_MAX_TILE_COLUMNS
Definition: evc.h:140
HRDParameters::cpb_size_value_minus1
uint32_t cpb_size_value_minus1[NUM_CPB]
Definition: evc_ps.h:57
EVC_MAX_NUM_RPLS
@ EVC_MAX_NUM_RPLS
Definition: evc.h:129
get_bits.h
VUIParameters::nal_hrd_parameters_present_flag
uint8_t nal_hrd_parameters_present_flag
Definition: evc_ps.h:89
VUIParameters::overscan_appropriate_flag
uint8_t overscan_appropriate_flag
Definition: evc_ps.h:72
VUIParameters::motion_vectors_over_pic_boundaries_flag
uint8_t motion_vectors_over_pic_boundaries_flag
Definition: evc_ps.h:94
get_bits1
static unsigned int get_bits1(GetBitContext *s)
Definition: get_bits.h:388
EVC_MAX_PPS_COUNT
@ EVC_MAX_PPS_COUNT
Definition: evc.h:116
EVCParamSets::sps
EVCParserSPS * sps[EVC_MAX_SPS_COUNT]
Definition: evc_ps.h:212
VUIParameters::matrix_coefficients
uint8_t matrix_coefficients
Definition: evc_ps.h:79
pps
static int FUNC() pps(CodedBitstreamContext *ctx, RWContext *rw, H264RawPPS *current)
Definition: cbs_h264_syntax_template.c:404
VUIParameters::num_units_in_tick
uint32_t num_units_in_tick
Definition: evc_ps.h:86
VUIParameters::hrd_parameters
HRDParameters hrd_parameters
Definition: evc_ps.h:102
RefPicListStruct::ref_pics
uint32_t ref_pics[EVC_MAX_NUM_REF_PICS]
Definition: evc_ps.h:38
VUIParameters::video_full_range_flag
uint8_t video_full_range_flag
Definition: evc_ps.h:75
VUIParameters::time_scale
uint32_t time_scale
Definition: evc_ps.h:87
EXTENDED_SAR
#define EXTENDED_SAR
Definition: evc_ps.c:24
VUIParameters::neutral_chroma_indication_flag
uint8_t neutral_chroma_indication_flag
Definition: evc_ps.h:83
VUIParameters::video_format
uint8_t video_format
Definition: evc_ps.h:74
EVC_MAX_SPS_COUNT
@ EVC_MAX_SPS_COUNT
Definition: evc.h:113
VUIParameters::max_bytes_per_pic_denom
uint8_t max_bytes_per_pic_denom
Definition: evc_ps.h:95
RefPicListStruct::ref_pic_num
uint32_t ref_pic_num
Definition: evc_ps.h:37
VUIParameters::low_delay_hrd_flag
uint8_t low_delay_hrd_flag
Definition: evc_ps.h:91
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:255
VUIParameters::fixed_pic_rate_flag
uint8_t fixed_pic_rate_flag
Definition: evc_ps.h:88
HRDParameters::initial_cpb_removal_delay_length_minus1
uint8_t initial_cpb_removal_delay_length_minus1
Definition: evc_ps.h:59
VUIParameters::overscan_info_present_flag
uint8_t overscan_info_present_flag
Definition: evc_ps.h:71
HRDParameters::cbr_flag
uint8_t cbr_flag[NUM_CPB]
Definition: evc_ps.h:58
VUIParameters::sar_height
uint16_t sar_height
Definition: evc_ps.h:70
av_mallocz
void * av_mallocz(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
Definition: mem.c:254
hrd_parameters
static int hrd_parameters(GetBitContext *gb, HRDParameters *hrd)
Definition: evc_ps.c:57
VUIParameters::colour_primaries
uint8_t colour_primaries
Definition: evc_ps.h:77
VUIParameters
Definition: evc_ps.h:66
ret
ret
Definition: filter_design.txt:187
VUIParameters::log2_max_mv_length_horizontal
uint8_t log2_max_mv_length_horizontal
Definition: evc_ps.h:97
VUIParameters::max_bits_per_mb_denom
uint8_t max_bits_per_mb_denom
Definition: evc_ps.h:96
sps
static int FUNC() sps(CodedBitstreamContext *ctx, RWContext *rw, H264RawSPS *current)
Definition: cbs_h264_syntax_template.c:260
U
#define U(x)
Definition: vpx_arith.h:37
get_ue_golomb_31
static int get_ue_golomb_31(GetBitContext *gb)
read unsigned exp golomb code, constraint to a max of 31.
Definition: golomb.h:120
VUIParameters::timing_info_present_flag
uint8_t timing_info_present_flag
Definition: evc_ps.h:85
VUIParameters::transfer_characteristics
uint8_t transfer_characteristics
Definition: evc_ps.h:78
ref_pic_list_struct
static int ref_pic_list_struct(const EVCParserSPS *sps, GetBitContext *gb, RefPicListStruct *rpl)
Definition: evc_ps.c:27
VUIParameters::colour_description_present_flag
uint8_t colour_description_present_flag
Definition: evc_ps.h:76
EVC_MAX_TILE_ROWS
@ EVC_MAX_TILE_ROWS
Definition: evc.h:138
EVCParserSPS
Definition: evc_ps.h:111
EVCParserPPS
Definition: evc_ps.h:185
get_ue_golomb_long
static unsigned get_ue_golomb_long(GetBitContext *gb)
Read an unsigned Exp-Golomb code in the range 0 to UINT32_MAX-1.
Definition: golomb.h:104
evc.h
av_free
#define av_free(p)
Definition: tableprint_vlc.h:33
av_freep
#define av_freep(p)
Definition: tableprint_vlc.h:34
AVERROR_INVALIDDATA
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
Definition: error.h:61
VUIParameters::field_seq_flag
uint8_t field_seq_flag
Definition: evc_ps.h:84
RefPicListStruct
Definition: evc_ps.h:36
VUIParameters::video_signal_type_present_flag
uint8_t video_signal_type_present_flag
Definition: evc_ps.h:73