FFmpeg
cbs_sei_syntax_template.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 
20  SEIRawFillerPayload *current,
22 {
23  int err, i;
24 
25  HEADER("Filler Payload");
26 
27 #ifdef READ
28  current->payload_size = state->payload_size;
29 #endif
30 
31  for (i = 0; i < current->payload_size; i++)
32  fixed(8, ff_byte, 0xff);
33 
34  return 0;
35 }
36 
37 SEI_FUNC(user_data_registered, (CodedBitstreamContext *ctx, RWContext *rw,
38  SEIRawUserDataRegistered *current,
40 {
41  int err, i, j;
42 
43  HEADER("User Data Registered ITU-T T.35");
44 
45  u(8, itu_t_t35_country_code, 0x00, 0xff);
46  if (current->itu_t_t35_country_code != 0xff)
47  i = 1;
48  else {
49  u(8, itu_t_t35_country_code_extension_byte, 0x00, 0xff);
50  i = 2;
51  }
52 
53 #ifdef READ
54  if (state->payload_size < i) {
55  av_log(ctx->log_ctx, AV_LOG_ERROR,
56  "Invalid SEI user data registered payload.\n");
57  return AVERROR_INVALIDDATA;
58  }
59  current->data_length = state->payload_size - i;
60 
61  allocate(current->data_ref, state->payload_size);
62  current->data = current->data_ref;
63 
64  *current->data++ = current->itu_t_t35_country_code;
65  if (current->itu_t_t35_country_code == 0xff)
66  *current->data++ = current->itu_t_t35_country_code_extension_byte;
67 #else
68  allocate(current->data, current->data_length);
69 #endif
70  for (j = 0; j < current->data_length; j++)
71  xu(8, itu_t_t35_payload_byte[], current->data[j], 0x00, 0xff, 1, i + j);
72 
73  return 0;
74 }
75 
76 SEI_FUNC(user_data_unregistered, (CodedBitstreamContext *ctx, RWContext *rw,
79 {
80  int err, i;
81 
82  HEADER("User Data Unregistered");
83 
84 #ifdef READ
85  if (state->payload_size < 16) {
86  av_log(ctx->log_ctx, AV_LOG_ERROR,
87  "Invalid SEI user data unregistered payload.\n");
88  return AVERROR_INVALIDDATA;
89  }
90  current->data_length = state->payload_size - 16;
91 #endif
92 
93  for (i = 0; i < 16; i++)
94  us(8, uuid_iso_iec_11578[i], 0x00, 0xff, 1, i);
95 
96 #ifdef READ
97  allocate(current->data_ref, state->payload_size);
98  memcpy(current->data_ref, current->uuid_iso_iec_11578, sizeof(current->uuid_iso_iec_11578));
99  current->data = current->data_ref + 16;
100 #else
101  allocate(current->data, current->data_length);
102 #endif
103 
104  for (i = 0; i < current->data_length; i++)
105  xu(8, user_data_payload_byte[i], current->data[i], 0x00, 0xff, 1, i);
106 
107  return 0;
108 }
109 
110 SEI_FUNC(frame_packing_arrangement, (CodedBitstreamContext *ctx, RWContext *rw,
112  SEIMessageState *unused))
113 {
114  int err;
115 
116  HEADER("Frame Packing Arrangement");
117 
118  ue(fp_arrangement_id, 0, MAX_UINT_BITS(31));
119  flag(fp_arrangement_cancel_flag);
120  if (!current->fp_arrangement_cancel_flag) {
121  u(7, fp_arrangement_type, 3, 5);
122  flag(fp_quincunx_sampling_flag);
123  u(6, fp_content_interpretation_type, 0, 2);
124  flag(fp_spatial_flipping_flag);
125  flag(fp_frame0_flipped_flag);
126  flag(fp_field_views_flag);
127  flag(fp_current_frame_is_frame0_flag);
128  flag(fp_frame0_self_contained_flag);
129  flag(fp_frame1_self_contained_flag);
130  if (!current->fp_quincunx_sampling_flag && current->fp_arrangement_type != 5) {
131  ub(4, fp_frame0_grid_position_x);
132  ub(4, fp_frame0_grid_position_y);
133  ub(4, fp_frame1_grid_position_x);
134  ub(4, fp_frame1_grid_position_y);
135  }
136  fixed(8, fp_arrangement_reserved_byte, 0);
137  flag(fp_arrangement_persistence_flag);
138  }
139  flag(fp_upsampled_aspect_ratio_flag);
140 
141  return 0;
142 }
143 
144 SEI_FUNC(decoded_picture_hash, (CodedBitstreamContext *ctx,
145  RWContext *rw,
146  SEIRawDecodedPictureHash *current,
147  SEIMessageState *unused))
148 {
149  int err, c_idx, i;
150 
151  HEADER("Decoded Picture Hash");
152 
153  u(8, dph_sei_hash_type, 0, 2);
154  flag(dph_sei_single_component_flag);
155  ub(7, dph_sei_reserved_zero_7bits);
156 
157  for (c_idx = 0; c_idx < (current->dph_sei_single_component_flag ? 1 : 3);
158  c_idx++) {
159  if (current->dph_sei_hash_type == 0) {
160  for (i = 0; i < 16; i++)
161  us(8, dph_sei_picture_md5[c_idx][i], 0x00, 0xff, 2, c_idx, i);
162  } else if (current->dph_sei_hash_type == 1) {
163  us(16, dph_sei_picture_crc[c_idx], 0x0000, 0xffff, 1, c_idx);
164  } else if (current->dph_sei_hash_type == 2) {
165  us(32, dph_sei_picture_checksum[c_idx], 0x00000000, 0xffffffff, 1,
166  c_idx);
167  }
168  }
169  return 0;
170 }
171 
172 SEI_FUNC(mastering_display_colour_volume,
176 {
177  int err, c;
178 
179  HEADER("Mastering Display Colour Volume");
180 
181  for (c = 0; c < 3; c++) {
182  ubs(16, display_primaries_x[c], 1, c);
183  ubs(16, display_primaries_y[c], 1, c);
184  }
185 
186  ub(16, white_point_x);
187  ub(16, white_point_y);
188 
189  ub(32, max_display_mastering_luminance);
190  ub(32, min_display_mastering_luminance);
191 
192  return 0;
193 }
194 
195 SEI_FUNC(content_light_level_info, (CodedBitstreamContext *ctx, RWContext *rw,
198 {
199  int err;
200 
201  HEADER("Content Light Level Information");
202 
203  ub(16, max_content_light_level);
204  ub(16, max_pic_average_light_level);
205 
206  return 0;
207 }
208 
209 SEI_FUNC(alternative_transfer_characteristics,
213 {
214  int err;
215 
216  HEADER("Alternative Transfer Characteristics");
217 
218  ub(8, preferred_transfer_characteristics);
219 
220  return 0;
221 }
222 
223 SEI_FUNC(ambient_viewing_environment,
227 {
228  static const uint16_t max_ambient_light_value = 50000;
229  int err;
230 
231  HEADER("Ambient Viewing Environment");
232 
233  u(32, ambient_illuminance, 1, MAX_UINT_BITS(32));
234  u(16, ambient_light_x, 0, max_ambient_light_value);
235  u(16, ambient_light_y, 0, max_ambient_light_value);
236 
237  return 0;
238 }
239 
240 SEI_FUNC(film_grain_characteristics,
244 {
245  int err, c, i, j;
246 
247  HEADER("Film Grain Characteristics");
248 
249  flag(fg_characteristics_cancel_flag);
250  if (!current->fg_characteristics_cancel_flag) {
251  int filmGrainBitDepth[3];
252 
253  u(2, fg_model_id, 0, 1);
254  flag(fg_separate_colour_description_present_flag);
256  ub(3, fg_bit_depth_luma_minus8);
257  ub(3, fg_bit_depth_chroma_minus8);
258  flag(fg_full_range_flag);
259  ub(8, fg_colour_primaries);
260  ub(8, fg_transfer_characteristics);
261  ub(8, fg_matrix_coeffs);
262  }
263 
264  filmGrainBitDepth[0] = current->fg_bit_depth_luma_minus8 + 8;
265  filmGrainBitDepth[1] =
266  filmGrainBitDepth[2] = current->fg_bit_depth_chroma_minus8 + 8;
267 
268  u(2, fg_blending_mode_id, 0, 1);
269  ub(4, fg_log2_scale_factor);
270  for (c = 0; c < 3; c++)
271  flags(fg_comp_model_present_flag[c], 1, c);
272 
273  for (c = 0; c < 3; c++) {
274  if (current->fg_comp_model_present_flag[c]) {
275  ubs(8, fg_num_intensity_intervals_minus1[c], 1, c);
276  us(3, fg_num_model_values_minus1[c], 0, 5, 1, c);
277  for (i = 0; i <= current->fg_num_intensity_intervals_minus1[c]; i++) {
278  ubs(8, fg_intensity_interval_lower_bound[c][i], 2, c, i);
279  ubs(8, fg_intensity_interval_upper_bound[c][i], 2, c, i);
280  for (j = 0; j <= current->fg_num_model_values_minus1[c]; j++)
281  ses(fg_comp_model_value[c][i][j], 0 - current->fg_model_id * (1 << (filmGrainBitDepth[c] - 1)),
282  ((1 << filmGrainBitDepth[c]) - 1) - current->fg_model_id * (1 << (filmGrainBitDepth[c] - 1)),
283  3, c, i, j);
284  }
285  }
286  }
287  flag(fg_characteristics_persistence_flag);
288  }
289 
290  return 0;
291 }
292 
293 SEI_FUNC(display_orientation, (CodedBitstreamContext *ctx, RWContext *rw,
294  SEIRawDisplayOrientation *current,
296 {
297  int err;
298 
299  HEADER("Display Orientation");
300 
301  flag(display_orientation_cancel_flag);
302  if (!current->display_orientation_cancel_flag) {
303  flag(display_orientation_persistence_flag);
304  u(3, display_orientation_transform_type, 0, 7);
305  ub(3, display_orientation_reserved_zero_3bits);
306  }
307 
308  return 0;
309 }
310 
311 SEI_FUNC(frame_field_information, (CodedBitstreamContext *ctx, RWContext *rw,
314 {
315  int err;
316 
317  HEADER("Frame-field information");
318 
319  flag(ffi_field_pic_flag);
320  if (current->ffi_field_pic_flag) {
321  flag(ffi_bottom_field_flag);
322  flag(ffi_pairing_indicated_flag);
323  if (current->ffi_pairing_indicated_flag)
324  flag(ffi_paired_with_next_field_flag);
325  } else {
326  flag(ffi_display_fields_from_frame_flag);
328  flag(ffi_top_field_first_flag);
329  u(8, ffi_display_elemental_periods_minus1, 0, 0xff);
330  }
331  u(2, ffi_source_scan_type, 0, 3);
332  flag(ffi_duplicate_flag);
333 
334  return 0;
335 }
336 
338  SEIRawMessage *current)
339 {
341  int err, i;
342 
343  desc = ff_cbs_sei_find_type(ctx, current->payload_type);
344  if (desc) {
346  .payload_type = current->payload_type,
347  .payload_size = current->payload_size,
348  .extension_present = current->extension_bit_length > 0,
349  };
350  int start_position, current_position, bits_written;
351 
352 #ifdef READ
354 #endif
355 
356  start_position = bit_position(rw);
357 
358  CHECK(desc->READWRITE(ctx, rw, current->payload, &state));
359 
360  current_position = bit_position(rw);
361  bits_written = current_position - start_position;
362 
363  if (byte_alignment(rw) || state.extension_present ||
364  bits_written < 8 * current->payload_size) {
365  size_t bits_left;
366 
367 #ifdef READ
368  GetBitContext tmp = *rw;
369  int trailing_bits, trailing_zero_bits;
370 
371  bits_left = 8 * current->payload_size - bits_written;
372  if (bits_left > 8)
375  if (trailing_bits == 0) {
376  // The trailing bits must contain a bit_equal_to_one, so
377  // they can't all be zero.
378  return AVERROR_INVALIDDATA;
379  }
380  trailing_zero_bits = ff_ctz(trailing_bits);
381  current->extension_bit_length =
382  bits_left - 1 - trailing_zero_bits;
383 #endif
384 
385  if (current->extension_bit_length > 0) {
386  allocate(current->extension_data,
387  (current->extension_bit_length + 7) / 8);
388 
389  bits_left = current->extension_bit_length;
390  for (i = 0; bits_left > 0; i++) {
391  int length = FFMIN(bits_left, 8);
392  xu(length, reserved_payload_extension_data,
393  current->extension_data[i],
394  0, MAX_UINT_BITS(length), 0);
395  bits_left -= length;
396  }
397  }
398 
399  fixed(1, bit_equal_to_one, 1);
400  while (byte_alignment(rw))
401  fixed(1, bit_equal_to_zero, 0);
402  }
403 
404 #ifdef WRITE
405  current->payload_size = (put_bits_count(rw) - start_position) / 8;
406 #endif
407  } else {
408  uint8_t *data;
409 
410 #ifdef READ
411  allocate(current->payload_ref, current->payload_size);
412  current->payload = current->payload_ref;
413 #else
414  allocate(current->payload, current->payload_size);
415 #endif
416  data = current->payload;
417 
418  for (i = 0; i < current->payload_size; i++)
419  xu(8, payload_byte[i], data[i], 0, 255, 1, i);
420  }
421 
422  return 0;
423 }
424 
426  SEIRawMessageList *current, int prefix)
427 {
429  int err, k;
430 
431 #ifdef READ
432  for (k = 0;; k++) {
433  uint32_t payload_type = 0;
434  uint32_t payload_size = 0;
435  uint32_t tmp;
436  GetBitContext payload_gbc;
437 
438  while (show_bits(rw, 8) == 0xff) {
439  fixed(8, ff_byte, 0xff);
440  payload_type += 255;
441  }
442  xu(8, last_payload_type_byte, tmp, 0, 254, 0);
443  payload_type += tmp;
444 
445  while (show_bits(rw, 8) == 0xff) {
446  fixed(8, ff_byte, 0xff);
447  payload_size += 255;
448  }
449  xu(8, last_payload_size_byte, tmp, 0, 254, 0);
450  payload_size += tmp;
451 
452  // There must be space remaining for both the payload and
453  // the trailing bits on the SEI NAL unit.
454  if (payload_size + 1 > get_bits_left(rw) / 8) {
455  av_log(ctx->log_ctx, AV_LOG_ERROR,
456  "Invalid SEI message: payload_size too large "
457  "(%"PRIu32" bytes).\n", payload_size);
458  return AVERROR_INVALIDDATA;
459  }
460  CHECK(init_get_bits(&payload_gbc, rw->buffer,
461  get_bits_count(rw) + 8 * payload_size));
462  skip_bits_long(&payload_gbc, get_bits_count(rw));
463 
464  CHECK(ff_cbs_sei_list_add(current));
465  message = &current->messages[k];
466 
467  message->payload_type = payload_type;
468  message->payload_size = payload_size;
469 
470  CHECK(FUNC(message)(ctx, &payload_gbc, message));
471 
472  skip_bits_long(rw, 8 * payload_size);
473 
475  break;
476  }
477 #else
478  for (k = 0; k < current->nb_messages; k++) {
479  PutBitContext start_state;
480  uint32_t tmp;
481  int trace, i;
482 
483  message = &current->messages[k];
484 
485  // We write the payload twice in order to find the size. Trace
486  // output is switched off for the first write.
487  trace = ctx->trace_enable;
488  ctx->trace_enable = 0;
489 
490  start_state = *rw;
491  for (i = 0; i < 2; i++) {
492  *rw = start_state;
493 
494  tmp = message->payload_type;
495  while (tmp >= 255) {
496  fixed(8, ff_byte, 0xff);
497  tmp -= 255;
498  }
499  xu(8, last_payload_type_byte, tmp, 0, 254, 0);
500 
501  tmp = message->payload_size;
502  while (tmp >= 255) {
503  fixed(8, ff_byte, 0xff);
504  tmp -= 255;
505  }
506  xu(8, last_payload_size_byte, tmp, 0, 254, 0);
507 
508  err = FUNC(message)(ctx, rw, message);
509  ctx->trace_enable = trace;
510  if (err < 0)
511  return err;
512  }
513  }
514 #endif
515 
516  return 0;
517 }
bit_position
#define bit_position(rw)
Definition: cbs_h2645.c:443
flags
const SwsFlags flags[]
Definition: swscale.c:61
SEIRawFilmGrainCharacteristics::fg_num_intensity_intervals_minus1
uint8_t fg_num_intensity_intervals_minus1[3]
Definition: cbs_sei.h:115
SEIRawFramePackingArrangement::fp_arrangement_type
uint8_t fp_arrangement_type
Definition: cbs_sei.h:51
skip_bits_long
static void skip_bits_long(GetBitContext *s, int n)
Skips the specified number of bits.
Definition: get_bits.h:280
get_bits_left
static int get_bits_left(GetBitContext *gb)
Definition: get_bits.h:694
SEIRawUserDataRegistered
Definition: cbs_sei.h:33
SEIRawDecodedPictureHash::dph_sei_hash_type
uint8_t dph_sei_hash_type
Definition: cbs_sei.h:69
ff_ctz
#define ff_ctz
Definition: intmath.h:105
SEIRawAmbientViewingEnvironment
Definition: cbs_sei.h:96
message
Definition: api-threadmessage-test.c:47
SEIRawFrameFieldInformation
Definition: cbs_sei.h:130
SEIRawMessage
Definition: cbs_sei.h:142
get_bits_count
static int get_bits_count(const GetBitContext *s)
Definition: get_bits.h:254
u
#define u(width, name, range_min, range_max)
Definition: cbs_apv.c:68
CodedBitstreamContext
Context structure for coded bitstream operations.
Definition: cbs.h:226
data
const char data[16]
Definition: mxf.c:149
SEIRawAlternativeTransferCharacteristics
Definition: cbs_sei.h:92
allocate
#define allocate(name, size)
Definition: cbs_h2645.c:446
SEIRawFilmGrainCharacteristics::fg_comp_model_present_flag
uint8_t fg_comp_model_present_flag[3]
Definition: cbs_sei.h:114
ses
#define ses(name, range_min, range_max, subs,...)
Definition: cbs_h2645.c:275
init_get_bits
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
Definition: get_bits.h:517
SEIRawUserDataRegistered::data_ref
uint8_t * data_ref
RefStruct reference.
Definition: cbs_sei.h:37
SEIRawDecodedPictureHash::dph_sei_single_component_flag
uint8_t dph_sei_single_component_flag
Definition: cbs_sei.h:70
SEIRawContentLightLevelInfo
Definition: cbs_sei.h:87
get_bits
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
Definition: get_bits.h:337
ub
#define ub(width, name)
Definition: cbs_apv.c:125
SEIRawFramePackingArrangement::fp_quincunx_sampling_flag
uint8_t fp_quincunx_sampling_flag
Definition: cbs_sei.h:52
CHECK
CHECK(-1) CHECK(-2) }} }} CHECK(1) CHECK(2) }} }} } if(diff0+diff1 > 0) temp -
SEIRawUserDataUnregistered::data
uint8_t * data
Definition: cbs_sei.h:43
GetBitContext
Definition: get_bits.h:109
ubs
#define ubs(width, name, subs,...)
Definition: cbs_apv.c:72
SEIRawFilmGrainCharacteristics::fg_characteristics_cancel_flag
uint8_t fg_characteristics_cancel_flag
Definition: cbs_sei.h:103
SEIRawUserDataUnregistered
Definition: cbs_sei.h:41
ue
#define ue(name, range_min, range_max)
Definition: cbs_h2645.c:254
xu
#define xu(width, name, var, range_min, range_max, subs,...)
Definition: cbs_apv.c:130
message_list
static int FUNC() message_list(CodedBitstreamContext *ctx, RWContext *rw, SEIRawMessageList *current, int prefix)
Definition: cbs_sei_syntax_template.c:425
SEIRawFilmGrainCharacteristics::fg_num_model_values_minus1
uint8_t fg_num_model_values_minus1[3]
Definition: cbs_sei.h:116
SEIRawUserDataRegistered::itu_t_t35_country_code
uint8_t itu_t_t35_country_code
Definition: cbs_sei.h:34
AV_LOG_ERROR
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:210
SEIRawFilmGrainCharacteristics::fg_bit_depth_luma_minus8
uint8_t fg_bit_depth_luma_minus8
Definition: cbs_sei.h:106
SEIRawFillerPayload
Definition: cbs_sei.h:29
HEADER
#define HEADER(name)
Definition: cbs_apv.c:55
SEIRawMessageList
Definition: cbs_sei.h:151
SEIRawUserDataUnregistered::data_length
size_t data_length
Definition: cbs_sei.h:45
ctx
AVFormatContext * ctx
Definition: movenc.c:49
SEIRawFrameFieldInformation::ffi_display_fields_from_frame_flag
uint8_t ffi_display_fields_from_frame_flag
Definition: cbs_sei.h:135
ff_cbs_sei_alloc_message_payload
int ff_cbs_sei_alloc_message_payload(SEIRawMessage *message, const SEIMessageTypeDescriptor *desc)
Allocate a new payload for the given SEI message.
Definition: cbs_sei.c:40
MAX_UINT_BITS
#define MAX_UINT_BITS(length)
Definition: cbs_internal.h:235
PutBitContext
Definition: put_bits.h:50
tmp
static uint8_t tmp[40]
Definition: aes_ctr.c:52
SEIRawFilmGrainCharacteristics::fg_model_id
uint8_t fg_model_id
Definition: cbs_sei.h:104
GetBitContext::buffer
const uint8_t * buffer
Definition: get_bits.h:110
bits_left
#define bits_left
Definition: bitstream.h:116
SEIMessageTypeDescriptor
Definition: cbs_sei.h:186
SEIRawFilmGrainCharacteristics::fg_bit_depth_chroma_minus8
uint8_t fg_bit_depth_chroma_minus8
Definition: cbs_sei.h:107
SEIRawMasteringDisplayColourVolume
Definition: cbs_sei.h:78
SEIRawFrameFieldInformation::ffi_pairing_indicated_flag
uint8_t ffi_pairing_indicated_flag
Definition: cbs_sei.h:133
SEIRawFilmGrainCharacteristics::fg_separate_colour_description_present_flag
uint8_t fg_separate_colour_description_present_flag
Definition: cbs_sei.h:105
c
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
Definition: undefined.txt:32
SEIRawFillerPayload::payload_size
uint32_t payload_size
Definition: cbs_sei.h:30
SEIRawFrameFieldInformation::ffi_field_pic_flag
uint8_t ffi_field_pic_flag
Definition: cbs_sei.h:131
SEIRawUserDataRegistered::data
uint8_t * data
Definition: cbs_sei.h:36
state
static struct @546 state
SEIRawUserDataRegistered::data_length
size_t data_length
Definition: cbs_sei.h:38
fixed
#define fixed(width, name, value)
Definition: cbs_apv.c:75
ff_cbs_sei_find_type
const SEIMessageTypeDescriptor * ff_cbs_sei_find_type(CodedBitstreamContext *ctx, int payload_type)
Find the type descriptor for the given payload type.
Definition: cbs_h2645.c:2353
SEI_FUNC
SEI_FUNC(filler_payload,(CodedBitstreamContext *ctx, RWContext *rw, SEIRawFillerPayload *current, SEIMessageState *state))
Definition: cbs_sei_syntax_template.c:19
SEIRawUserDataRegistered::itu_t_t35_country_code_extension_byte
uint8_t itu_t_t35_country_code_extension_byte
Definition: cbs_sei.h:35
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:256
put_bits_count
static int put_bits_count(PutBitContext *s)
Definition: put_bits.h:90
show_bits
static unsigned int show_bits(GetBitContext *s, int n)
Show 1-25 bits.
Definition: get_bits.h:373
FFMIN
#define FFMIN(a, b)
Definition: macros.h:49
flag
#define flag(name)
Definition: cbs_av1.c:496
byte_alignment
#define byte_alignment(rw)
Definition: cbs_apv.c:147
SEIMessageState
Definition: cbs_sei.h:158
RWContext
#define RWContext
Definition: cbs_apv.c:122
FUNC
#define FUNC(a)
Definition: bit_depth_template.c:104
SEIRawDisplayOrientation
Definition: cbs_sei.h:123
SEIRawDecodedPictureHash
Definition: cbs_sei.h:68
SEIRawUserDataUnregistered::data_ref
uint8_t * data_ref
RefStruct reference.
Definition: cbs_sei.h:44
SEIRawFramePackingArrangement
Definition: cbs_sei.h:48
trailing_bits
static int FUNC() trailing_bits(CodedBitstreamContext *ctx, RWContext *rw, int nb_bits)
Definition: cbs_av1_syntax_template.c:50
desc
const char * desc
Definition: libsvtav1.c:78
us
#define us(width, name, range_min, range_max, subs,...)
Definition: cbs_apv.c:70
message
static int FUNC() message(CodedBitstreamContext *ctx, RWContext *rw, SEIRawMessage *current)
Definition: cbs_sei_syntax_template.c:337
ff_cbs_sei_list_add
int ff_cbs_sei_list_add(SEIRawMessageList *list)
Allocate a new empty SEI message in a message list.
Definition: cbs_sei.c:66
SEIRawFramePackingArrangement::fp_arrangement_cancel_flag
uint8_t fp_arrangement_cancel_flag
Definition: cbs_sei.h:50
av_log
#define av_log(a,...)
Definition: tableprint_vlc.h:27
AVERROR_INVALIDDATA
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
Definition: error.h:61
SEIRawDisplayOrientation::display_orientation_cancel_flag
uint8_t display_orientation_cancel_flag
Definition: cbs_sei.h:124
SEIRawUserDataUnregistered::uuid_iso_iec_11578
uint8_t uuid_iso_iec_11578[16]
Definition: cbs_sei.h:42
SEIRawFilmGrainCharacteristics
Definition: cbs_sei.h:102
cbs_h2645_read_more_rbsp_data
static int cbs_h2645_read_more_rbsp_data(GetBitContext *gbc)
Definition: cbs_h2645.c:328