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 "libavutil/mem.h"
20 #include "get_bits.h"
21 #include "golomb.h"
22 #include "evc.h"
23 #include "evc_ps.h"
24 
25 #define EXTENDED_SAR 255
26 
27 // @see ISO_IEC_23094-1 (7.3.7 Reference picture list structure syntax)
29 {
30  uint32_t delta_poc_st, strp_entry_sign_flag = 0;
32 
33  if ((unsigned)rpl->ref_pic_num > sps->sps_max_dec_pic_buffering_minus1)
34  return AVERROR_INVALIDDATA;
35 
36  if (rpl->ref_pic_num > 0) {
38 
39  rpl->ref_pics[0] = delta_poc_st;
40  if (rpl->ref_pics[0] != 0) {
41  strp_entry_sign_flag = get_bits(gb, 1);
42 
43  rpl->ref_pics[0] *= 1 - (strp_entry_sign_flag << 1);
44  }
45  }
46 
47  for (int i = 1; i < rpl->ref_pic_num; ++i) {
49  if (delta_poc_st != 0)
50  strp_entry_sign_flag = get_bits(gb, 1);
51  rpl->ref_pics[i] = rpl->ref_pics[i - 1] + delta_poc_st * (1 - (strp_entry_sign_flag << 1));
52  }
53 
54  return 0;
55 }
56 
57 // @see ISO_IEC_23094-1 (E.2.2 HRD parameters syntax)
59 {
62  return AVERROR_INVALIDDATA;
63 
64  hrd->bit_rate_scale = get_bits(gb, 4);
65  hrd->cpb_size_scale = get_bits(gb, 4);
66  for (int SchedSelIdx = 0; SchedSelIdx <= hrd->cpb_cnt_minus1; SchedSelIdx++) {
67  hrd->bit_rate_value_minus1[SchedSelIdx] = get_ue_golomb_long(gb);
68  hrd->cpb_size_value_minus1[SchedSelIdx] = get_ue_golomb_long(gb);
69  hrd->cbr_flag[SchedSelIdx] = get_bits(gb, 1);
70  }
74  hrd->time_offset_length = get_bits(gb, 5);
75 
76  return 0;
77 }
78 
79 // @see ISO_IEC_23094-1 (E.2.1 VUI parameters syntax)
81 {
82  int ret;
83 
86  vui->aspect_ratio_idc = get_bits(gb, 8);
87  if (vui->aspect_ratio_idc == EXTENDED_SAR) {
88  vui->sar_width = get_bits(gb, 16);
89  vui->sar_height = get_bits(gb, 16);
90  }
91  }
94  vui->overscan_appropriate_flag = get_bits(gb, 1);
97  vui->video_format = get_bits(gb, 3);
98  vui->video_full_range_flag = get_bits(gb, 1);
101  vui->colour_primaries = get_bits(gb, 8);
102  vui->transfer_characteristics = get_bits(gb, 8);
103  vui->matrix_coefficients = get_bits(gb, 8);
104  }
105  }
107  if (vui->chroma_loc_info_present_flag) {
110  }
112 
113  vui->field_seq_flag = get_bits(gb, 1);
114 
115  vui->timing_info_present_flag = get_bits(gb, 1);
116  if (vui->timing_info_present_flag) {
117  vui->num_units_in_tick = get_bits_long(gb, 32);
118  vui->time_scale = get_bits_long(gb, 32);
119  vui->fixed_pic_rate_flag = get_bits(gb, 1);
120  }
123  ret = hrd_parameters(gb, &vui->hrd_parameters);
124  if (ret < 0)
125  return ret;
126  }
127 
130  ret = hrd_parameters(gb, &vui->hrd_parameters);
131  if (ret < 0)
132  return ret;
133  }
135  vui->low_delay_hrd_flag = get_bits(gb, 1);
136  vui->pic_struct_present_flag = get_bits(gb, 1);
137  vui->bitstream_restriction_flag = get_bits(gb, 1);
138  if (vui->bitstream_restriction_flag) {
146  }
147 
148  return 0;
149 }
150 
151 // @see ISO_IEC_23094-1 (7.3.2.1 SPS RBSP syntax)
153 {
154  EVCParserSPS *sps;
155  unsigned sps_seq_parameter_set_id;
156  int ret;
157 
158  sps_seq_parameter_set_id = get_ue_golomb(gb);
159 
160  if (sps_seq_parameter_set_id >= EVC_MAX_SPS_COUNT)
161  return AVERROR_INVALIDDATA;
162 
163  sps = av_mallocz(sizeof(*sps));
164  if (!sps)
165  return AVERROR(ENOMEM);
166 
167  sps->sps_seq_parameter_set_id = sps_seq_parameter_set_id;
168 
169  // the Baseline profile is indicated by profile_idc eqal to 0
170  // the Main profile is indicated by profile_idc eqal to 1
171  sps->profile_idc = get_bits(gb, 8);
172 
173  sps->level_idc = get_bits(gb, 8);
174 
175  skip_bits_long(gb, 32); /* skip toolset_idc_h */
176  skip_bits_long(gb, 32); /* skip toolset_idc_l */
177 
178  // 0 - monochrome
179  // 1 - 4:2:0
180  // 2 - 4:2:2
181  // 3 - 4:4:4
182  sps->chroma_format_idc = get_ue_golomb_31(gb);
183  if (sps->chroma_format_idc > 3) {
185  goto fail;
186  }
187 
188  sps->pic_width_in_luma_samples = get_ue_golomb_long(gb);
189  sps->pic_height_in_luma_samples = get_ue_golomb_long(gb);
190 
191  sps->bit_depth_luma_minus8 = get_ue_golomb_31(gb);
192  sps->bit_depth_chroma_minus8 = get_ue_golomb_31(gb);
193 
194  sps->sps_btt_flag = get_bits1(gb);
195  if (sps->sps_btt_flag) {
196  sps->log2_ctu_size_minus2 = get_ue_golomb_long(gb);
197  sps->log2_min_cb_size_minus2 = get_ue_golomb_long(gb);
198  sps->log2_diff_ctu_max_14_cb_size = get_ue_golomb_long(gb);
199  sps->log2_diff_ctu_max_tt_cb_size = get_ue_golomb_long(gb);
200  sps->log2_diff_min_cb_min_tt_cb_size_minus2 = get_ue_golomb_long(gb);
201  }
202 
203  sps->sps_suco_flag = get_bits1(gb);
204  if (sps->sps_suco_flag) {
205  sps->log2_diff_ctu_size_max_suco_cb_size = get_ue_golomb_long(gb);
206  sps->log2_diff_max_suco_min_suco_cb_size = get_ue_golomb_long(gb);
207  }
208 
209  sps->sps_admvp_flag = get_bits1(gb);
210  if (sps->sps_admvp_flag) {
211  sps->sps_affine_flag = get_bits1(gb);
212  sps->sps_amvr_flag = get_bits1(gb);
213  sps->sps_dmvr_flag = get_bits1(gb);
214  sps->sps_mmvd_flag = get_bits1(gb);
215  sps->sps_hmvp_flag = get_bits1(gb);
216  }
217 
218  sps->sps_eipd_flag = get_bits1(gb);
219  if (sps->sps_eipd_flag) {
220  sps->sps_ibc_flag = get_bits1(gb);
221  if (sps->sps_ibc_flag)
222  sps->log2_max_ibc_cand_size_minus2 = get_ue_golomb(gb);
223  }
224 
225  sps->sps_cm_init_flag = get_bits1(gb);
226  if (sps->sps_cm_init_flag)
227  sps->sps_adcc_flag = get_bits1(gb);
228 
229  sps->sps_iqt_flag = get_bits1(gb);
230  if (sps->sps_iqt_flag)
231  sps->sps_ats_flag = get_bits1(gb);
232 
233  sps->sps_addb_flag = get_bits1(gb);
234  sps->sps_alf_flag = get_bits1(gb);
235  sps->sps_htdf_flag = get_bits1(gb);
236  sps->sps_rpl_flag = get_bits1(gb);
237  sps->sps_pocs_flag = get_bits1(gb);
238  sps->sps_dquant_flag = get_bits1(gb);
239  sps->sps_dra_flag = get_bits1(gb);
240 
241  if (sps->sps_pocs_flag) {
242  sps->log2_max_pic_order_cnt_lsb_minus4 = get_ue_golomb(gb);
243  if (sps->log2_max_pic_order_cnt_lsb_minus4 > 12U) {
245  goto fail;
246  }
247  }
248 
249  if (!sps->sps_pocs_flag || !sps->sps_rpl_flag) {
250  sps->log2_sub_gop_length = get_ue_golomb(gb);
251  if (sps->log2_sub_gop_length > 5U) {
253  goto fail;
254  }
255  if (sps->log2_sub_gop_length == 0)
256  sps->log2_ref_pic_gap_length = get_ue_golomb(gb);
257  }
258 
259  if (!sps->sps_rpl_flag)
260  sps->max_num_tid0_ref_pics = get_ue_golomb_31(gb);
261  else {
262  sps->sps_max_dec_pic_buffering_minus1 = get_ue_golomb_long(gb);
263  if ((unsigned)sps->sps_max_dec_pic_buffering_minus1 > 16 - 1) {
265  goto fail;
266  }
267  sps->long_term_ref_pic_flag = get_bits1(gb);
268  sps->rpl1_same_as_rpl0_flag = get_bits1(gb);
269  sps->num_ref_pic_list_in_sps[0] = get_ue_golomb(gb);
270 
271  if ((unsigned)sps->num_ref_pic_list_in_sps[0] >= EVC_MAX_NUM_RPLS) {
273  goto fail;
274  }
275 
276  for (int i = 0; i < sps->num_ref_pic_list_in_sps[0]; ++i) {
277  ret = ref_pic_list_struct(sps, gb, &sps->rpls[0][i]);
278  if (ret < 0)
279  goto fail;
280  }
281 
282  if (!sps->rpl1_same_as_rpl0_flag) {
283  sps->num_ref_pic_list_in_sps[1] = get_ue_golomb(gb);
284  if ((unsigned)sps->num_ref_pic_list_in_sps[1] >= EVC_MAX_NUM_RPLS) {
286  goto fail;
287  }
288  for (int i = 0; i < sps->num_ref_pic_list_in_sps[1]; ++i) {
289  ret = ref_pic_list_struct(sps, gb, &sps->rpls[1][i]);
290  if (ret < 0)
291  goto fail;
292  }
293  }
294  }
295 
296  sps->picture_cropping_flag = get_bits1(gb);
297 
298  if (sps->picture_cropping_flag) {
299  sps->picture_crop_left_offset = get_ue_golomb_long(gb);
300  sps->picture_crop_right_offset = get_ue_golomb_long(gb);
301  sps->picture_crop_top_offset = get_ue_golomb_long(gb);
302  sps->picture_crop_bottom_offset = get_ue_golomb_long(gb);
303  }
304 
305  if (sps->chroma_format_idc != 0) {
306  sps->chroma_qp_table_struct.chroma_qp_table_present_flag = get_bits1(gb);
307 
308  if (sps->chroma_qp_table_struct.chroma_qp_table_present_flag) {
309  sps->chroma_qp_table_struct.same_qp_table_for_chroma = get_bits1(gb);
310  sps->chroma_qp_table_struct.global_offset_flag = get_bits1(gb);
311  for (int i = 0; i < (sps->chroma_qp_table_struct.same_qp_table_for_chroma ? 1 : 2); i++) {
312  sps->chroma_qp_table_struct.num_points_in_qp_table_minus1[i] = get_ue_golomb(gb);
313  if (sps->chroma_qp_table_struct.num_points_in_qp_table_minus1[i] >= EVC_MAX_QP_TABLE_SIZE) {
315  goto fail;
316  }
317  for (int j = 0; j <= sps->chroma_qp_table_struct.num_points_in_qp_table_minus1[i]; j++) {
318  sps->chroma_qp_table_struct.delta_qp_in_val_minus1[i][j] = get_bits(gb, 6);
319  sps->chroma_qp_table_struct.delta_qp_out_val[i][j] = get_se_golomb_long(gb);
320  }
321  }
322  }
323  }
324 
325  sps->vui_parameters_present_flag = get_bits1(gb);
326  if (sps->vui_parameters_present_flag) {
327  ret = vui_parameters(gb, &(sps->vui_parameters));
328  if (ret < 0)
329  goto fail;
330  }
331 
332  // @note
333  // If necessary, add the missing fields to the EVCParserSPS structure
334  // and then extend parser implementation
335 
336  av_freep(&ps->sps[sps_seq_parameter_set_id]);
337  ps->sps[sps_seq_parameter_set_id] = sps;
338 
339  return 0;
340 fail:
341  av_free(sps);
342  return ret;
343 }
344 
345 // @see ISO_IEC_23094-1 (7.3.2.2 SPS RBSP syntax)
346 //
347 // @note
348 // The current implementation of parse_sps function doesn't handle VUI parameters parsing.
349 // If it will be needed, parse_sps function could be extended to handle VUI parameters parsing
350 // to initialize fields of the AVCodecContex i.e. color_primaries, color_trc,color_range
351 //
353 {
354  EVCParserPPS *pps;
355  unsigned pps_pic_parameter_set_id;
356  int ret;
357 
358  pps_pic_parameter_set_id = get_ue_golomb(gb);
359  if (pps_pic_parameter_set_id >= EVC_MAX_PPS_COUNT)
360  return AVERROR_INVALIDDATA;
361 
362  pps = av_mallocz(sizeof(*pps));
363  if (!pps)
364  return AVERROR(ENOMEM);
365 
366  pps->pps_pic_parameter_set_id = pps_pic_parameter_set_id;
367 
368  pps->pps_seq_parameter_set_id = get_ue_golomb(gb);
369  if (pps->pps_seq_parameter_set_id >= EVC_MAX_SPS_COUNT) {
371  goto fail;
372  }
373 
374  pps->num_ref_idx_default_active_minus1[0] = get_ue_golomb(gb);
375  pps->num_ref_idx_default_active_minus1[1] = get_ue_golomb(gb);
376  pps->additional_lt_poc_lsb_len = get_ue_golomb(gb);
377  pps->rpl1_idx_present_flag = get_bits1(gb);
378  pps->single_tile_in_pic_flag = get_bits1(gb);
379 
380  if (!pps->single_tile_in_pic_flag) {
381  pps->num_tile_columns_minus1 = get_ue_golomb(gb);
382  pps->num_tile_rows_minus1 = get_ue_golomb(gb);
383  if (pps->num_tile_columns_minus1 >= EVC_MAX_TILE_COLUMNS ||
384  pps->num_tile_rows_minus1 >= EVC_MAX_TILE_ROWS) {
386  goto fail;
387  }
388  pps->uniform_tile_spacing_flag = get_bits1(gb);
389 
390  if (!pps->uniform_tile_spacing_flag) {
391  for (int i = 0; i < pps->num_tile_columns_minus1; i++)
392  pps->tile_column_width_minus1[i] = get_ue_golomb(gb);
393 
394  for (int i = 0; i < pps->num_tile_rows_minus1; i++)
395  pps->tile_row_height_minus1[i] = get_ue_golomb(gb);
396  }
397  pps->loop_filter_across_tiles_enabled_flag = get_bits1(gb);
398  pps->tile_offset_len_minus1 = get_ue_golomb(gb);
399  }
400 
401  pps->tile_id_len_minus1 = get_ue_golomb(gb);
402  if (pps->tile_id_len_minus1 > 15U) {
404  goto fail;
405  }
406  pps->explicit_tile_id_flag = get_bits1(gb);
407 
408  if (pps->explicit_tile_id_flag) {
409  for (int i = 0; i <= pps->num_tile_rows_minus1; i++) {
410  for (int j = 0; j <= pps->num_tile_columns_minus1; j++)
411  pps->tile_id_val[i][j] = get_bits(gb, pps->tile_id_len_minus1 + 1);
412  }
413  }
414 
415  pps->pic_dra_enabled_flag = 0;
416  pps->pic_dra_enabled_flag = get_bits1(gb);
417 
418  if (pps->pic_dra_enabled_flag)
419  pps->pic_dra_aps_id = get_bits(gb, 5);
420 
421  pps->arbitrary_slice_present_flag = get_bits1(gb);
422  pps->constrained_intra_pred_flag = get_bits1(gb);
423  pps->cu_qp_delta_enabled_flag = get_bits1(gb);
424 
425  if (pps->cu_qp_delta_enabled_flag)
426  pps->log2_cu_qp_delta_area_minus6 = get_ue_golomb(gb);
427 
428  av_freep(&ps->pps[pps_pic_parameter_set_id]);
429  ps->pps[pps_pic_parameter_set_id] = pps;
430 
431  return 0;
432 fail:
433  av_free(pps);
434  return ret;
435 }
436 
438  for (int i = 0; i < EVC_MAX_SPS_COUNT; i++)
439  av_freep(&ps->sps[i]);
440 
441  for (int i = 0; i < EVC_MAX_PPS_COUNT; i++)
442  av_freep(&ps->pps[i]);
443 }
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:352
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
EVC_MAX_TILE_COLUMNS
@ EVC_MAX_TILE_COLUMNS
Definition: evc.h:140
EVC_MAX_NUM_RPLS
@ EVC_MAX_NUM_RPLS
Definition: evc.h:129
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:179
GetBitContext
Definition: get_bits.h:108
EVC_MAX_SPS_COUNT
@ EVC_MAX_SPS_COUNT
Definition: evc.h:113
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:437
EVC_MAX_PPS_COUNT
@ EVC_MAX_PPS_COUNT
Definition: evc.h:116
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:152
vui_parameters
static int vui_parameters(GetBitContext *gb, VUIParameters *vui)
Definition: evc_ps.c:80
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
HRDParameters::cpb_size_value_minus1
uint32_t cpb_size_value_minus1[NUM_CPB]
Definition: evc_ps.h:57
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
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
delta_poc_st
static int delta_poc_st(const H266RefPicListStruct *rpls, const int lx, const int i, const VVCSPS *sps)
Definition: refs.c:393
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:25
EVC_MAX_TILE_ROWS
@ EVC_MAX_TILE_ROWS
Definition: evc.h:138
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
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:256
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:256
hrd_parameters
static int hrd_parameters(GetBitContext *gb, HRDParameters *hrd)
Definition: evc_ps.c:58
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
pps
uint64_t pps
Definition: dovi_rpuenc.c:35
ref_pic_list_struct
static int ref_pic_list_struct(const EVCParserSPS *sps, GetBitContext *gb, RefPicListStruct *rpl)
Definition: evc_ps.c:28
VUIParameters::colour_description_present_flag
uint8_t colour_description_present_flag
Definition: evc_ps.h:76
EVCParserSPS
Definition: evc_ps.h:111
mem.h
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