FFmpeg  4.4.9
hevc_sei.c
Go to the documentation of this file.
1 /*
2  * HEVC Supplementary Enhancement Information messages
3  *
4  * Copyright (C) 2012 - 2013 Guillaume Martres
5  * Copyright (C) 2012 - 2013 Gildas Cocherel
6  * Copyright (C) 2013 Vittorio Giovara
7  *
8  * This file is part of FFmpeg.
9  *
10  * FFmpeg is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Lesser General Public
12  * License as published by the Free Software Foundation; either
13  * version 2.1 of the License, or (at your option) any later version.
14  *
15  * FFmpeg is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  * Lesser General Public License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public
21  * License along with FFmpeg; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23  */
24 
25 #include "atsc_a53.h"
26 #include "dynamic_hdr10_plus.h"
27 #include "golomb.h"
28 #include "hevc_ps.h"
29 #include "hevc_sei.h"
30 
32 {
33  int cIdx, i;
34  uint8_t hash_type;
35  //uint16_t picture_crc;
36  //uint32_t picture_checksum;
37  hash_type = get_bits(gb, 8);
38 
39  for (cIdx = 0; cIdx < 3/*((s->sps->chroma_format_idc == 0) ? 1 : 3)*/; cIdx++) {
40  if (hash_type == 0) {
41  s->is_md5 = 1;
42  for (i = 0; i < 16; i++)
43  s->md5[cIdx][i] = get_bits(gb, 8);
44  } else if (hash_type == 1) {
45  // picture_crc = get_bits(gb, 16);
46  skip_bits(gb, 16);
47  } else if (hash_type == 2) {
48  // picture_checksum = get_bits_long(gb, 32);
49  skip_bits(gb, 32);
50  }
51  }
52  return 0;
53 }
54 
56 {
57  int i;
58 
59  if (size < 24)
60  return AVERROR_INVALIDDATA;
61 
62  // Mastering primaries
63  for (i = 0; i < 3; i++) {
64  s->display_primaries[i][0] = get_bits(gb, 16);
65  s->display_primaries[i][1] = get_bits(gb, 16);
66  }
67  // White point (x, y)
68  s->white_point[0] = get_bits(gb, 16);
69  s->white_point[1] = get_bits(gb, 16);
70 
71  // Max and min luminance of mastering display
72  s->max_luminance = get_bits_long(gb, 32);
73  s->min_luminance = get_bits_long(gb, 32);
74  size -= 24;
75 
76  // As this SEI message comes before the first frame that references it,
77  // initialize the flag to 2 and decrement on IRAP access unit so it
78  // persists for the coded video sequence (e.g., between two IRAPs)
79  s->present = 2;
80 
81  skip_bits_long(gb, 8 * size);
82  return 0;
83 }
84 
86 {
87  if (size < 4)
88  return AVERROR_INVALIDDATA;
89 
90  // Max and average light levels
91  s->max_content_light_level = get_bits(gb, 16);
92  s->max_pic_average_light_level = get_bits(gb, 16);
93  size -= 4;
94  // As this SEI message comes before the first frame that references it,
95  // initialize the flag to 2 and decrement on IRAP access unit so it
96  // persists for the coded video sequence (e.g., between two IRAPs)
97  s->present = 2;
98 
99  skip_bits_long(gb, 8 * size);
100  return 0;
101 }
102 
104 {
105  get_ue_golomb_long(gb); // frame_packing_arrangement_id
106  s->present = !get_bits1(gb);
107 
108  if (s->present) {
109  s->arrangement_type = get_bits(gb, 7);
110  s->quincunx_subsampling = get_bits1(gb);
111  s->content_interpretation_type = get_bits(gb, 6);
112 
113  // spatial_flipping_flag, frame0_flipped_flag, field_views_flag
114  skip_bits(gb, 3);
115  s->current_frame_is_frame0_flag = get_bits1(gb);
116  // frame0_self_contained_flag, frame1_self_contained_flag
117  skip_bits(gb, 2);
118 
119  if (!s->quincunx_subsampling && s->arrangement_type != 5)
120  skip_bits(gb, 16); // frame[01]_grid_position_[xy]
121  skip_bits(gb, 8); // frame_packing_arrangement_reserved_byte
122  skip_bits1(gb); // frame_packing_arrangement_persistence_flag
123  }
124  skip_bits1(gb); // upsampled_aspect_ratio_flag
125  return 0;
126 }
127 
129 {
130  s->present = !get_bits1(gb);
131 
132  if (s->present) {
133  s->hflip = get_bits1(gb); // hor_flip
134  s->vflip = get_bits1(gb); // ver_flip
135 
136  s->anticlockwise_rotation = get_bits(gb, 16);
137  skip_bits1(gb); // display_orientation_persistence_flag
138  }
139 
140  return 0;
141 }
142 
144  void *logctx, int size)
145 {
146  HEVCSEIPictureTiming *h = &s->picture_timing;
147  HEVCSPS *sps;
148 
149  if (!ps->sps_list[s->active_seq_parameter_set_id])
150  return(AVERROR(ENOMEM));
151  sps = (HEVCSPS*)ps->sps_list[s->active_seq_parameter_set_id]->data;
152 
153  if (sps->vui.frame_field_info_present_flag) {
154  int pic_struct = get_bits(gb, 4);
155  h->picture_struct = AV_PICTURE_STRUCTURE_UNKNOWN;
156  if (pic_struct == 2 || pic_struct == 10 || pic_struct == 12) {
157  av_log(logctx, AV_LOG_DEBUG, "BOTTOM Field\n");
158  h->picture_struct = AV_PICTURE_STRUCTURE_BOTTOM_FIELD;
159  } else if (pic_struct == 1 || pic_struct == 9 || pic_struct == 11) {
160  av_log(logctx, AV_LOG_DEBUG, "TOP Field\n");
161  h->picture_struct = AV_PICTURE_STRUCTURE_TOP_FIELD;
162  } else if (pic_struct == 7) {
163  av_log(logctx, AV_LOG_DEBUG, "Frame/Field Doubling\n");
164  h->picture_struct = HEVC_SEI_PIC_STRUCT_FRAME_DOUBLING;
165  } else if (pic_struct == 8) {
166  av_log(logctx, AV_LOG_DEBUG, "Frame/Field Tripling\n");
167  h->picture_struct = HEVC_SEI_PIC_STRUCT_FRAME_TRIPLING;
168  }
169  get_bits(gb, 2); // source_scan_type
170  get_bits(gb, 1); // duplicate_flag
171  skip_bits1(gb);
172  size--;
173  }
174  skip_bits_long(gb, 8 * size);
175 
176  return 0;
177 }
178 
180  int size)
181 {
182  int ret;
183 
184  if (size < 3)
185  return AVERROR_INVALIDDATA;
186 
187  ret = ff_parse_a53_cc(&s->buf_ref, gb->buffer + get_bits_count(gb) / 8, size);
188 
189  if (ret < 0)
190  return ret;
191 
192  skip_bits_long(gb, size * 8);
193 
194  return 0;
195 }
196 
198  int size)
199 {
200  AVBufferRef *buf_ref, **tmp;
201 
202  if (size < 16 || size >= INT_MAX - 1)
203  return AVERROR_INVALIDDATA;
204 
205  tmp = av_realloc_array(s->buf_ref, s->nb_buf_ref + 1, sizeof(*s->buf_ref));
206  if (!tmp)
207  return AVERROR(ENOMEM);
208  s->buf_ref = tmp;
209 
210  buf_ref = av_buffer_alloc(size + 1);
211  if (!buf_ref)
212  return AVERROR(ENOMEM);
213 
214  for (int i = 0; i < size; i++)
215  buf_ref->data[i] = get_bits(gb, 8);
216  buf_ref->data[size] = 0;
217  buf_ref->size = size;
218  s->buf_ref[s->nb_buf_ref++] = buf_ref;
219 
220  return 0;
221 }
222 
224  GetBitContext *gb, int size)
225 {
226  size_t meta_size;
227  int err;
228  AVDynamicHDRPlus *metadata = av_dynamic_hdr_plus_alloc(&meta_size);
229  if (!metadata)
230  return AVERROR(ENOMEM);
231 
233  gb->buffer + get_bits_count(gb) / 8, size);
234  if (err < 0) {
235  av_free(metadata);
236  return err;
237  }
238 
239  av_buffer_unref(&s->info);
240  s->info = av_buffer_create((uint8_t *)metadata, meta_size, NULL, NULL, 0);
241  if (!s->info) {
242  av_free(metadata);
243  return AVERROR(ENOMEM);
244  }
245 
246  skip_bits_long(gb, size * 8);
247 
248  return 0;
249 }
250 
252  void *logctx, int size)
253 {
254  int country_code, provider_code;
255 
256  if (size < 3)
257  return AVERROR_INVALIDDATA;
258  size -= 3;
259 
260  country_code = get_bits(gb, 8);
261  if (country_code == 0xFF) {
262  if (size < 1)
263  return AVERROR_INVALIDDATA;
264 
265  skip_bits(gb, 8);
266  size--;
267  }
268 
269  if (country_code != 0xB5) { // usa_country_code
270  av_log(logctx, AV_LOG_VERBOSE,
271  "Unsupported User Data Registered ITU-T T35 SEI message (country_code = %d)\n",
272  country_code);
273  goto end;
274  }
275 
276  provider_code = get_bits(gb, 16);
277 
278  switch (provider_code) {
279  case 0x3C: { // smpte_provider_code
280  // A/341 Amendment - 2094-40
281  const uint16_t smpte2094_40_provider_oriented_code = 0x0001;
282  const uint8_t smpte2094_40_application_identifier = 0x04;
283  uint16_t provider_oriented_code;
284  uint8_t application_identifier;
285 
286  if (size < 3)
287  return AVERROR_INVALIDDATA;
288  size -= 3;
289 
290  provider_oriented_code = get_bits(gb, 16);
291  application_identifier = get_bits(gb, 8);
292  if (provider_oriented_code == smpte2094_40_provider_oriented_code &&
293  application_identifier == smpte2094_40_application_identifier) {
294  return decode_registered_user_data_dynamic_hdr_plus(&s->dynamic_hdr_plus, gb, size);
295  }
296  break;
297  }
298  case 0x31: { // atsc_provider_code
299  uint32_t user_identifier;
300 
301  if (size < 4)
302  return AVERROR_INVALIDDATA;
303  size -= 4;
304 
305  user_identifier = get_bits_long(gb, 32);
306  switch (user_identifier) {
307  case MKBETAG('G', 'A', '9', '4'):
308  return decode_registered_user_data_closed_caption(&s->a53_caption, gb, size);
309  default:
310  av_log(logctx, AV_LOG_VERBOSE,
311  "Unsupported User Data Registered ITU-T T35 SEI message (atsc user_identifier = 0x%04x)\n",
312  user_identifier);
313  break;
314  }
315  break;
316  }
317  default:
318  av_log(logctx, AV_LOG_VERBOSE,
319  "Unsupported User Data Registered ITU-T T35 SEI message (provider_code = %d)\n",
320  provider_code);
321  break;
322  }
323 
324 end:
325  skip_bits_long(gb, size * 8);
326  return 0;
327 }
328 
330 {
331  int num_sps_ids_minus1;
332  int i;
333  unsigned active_seq_parameter_set_id;
334 
335  get_bits(gb, 4); // active_video_parameter_set_id
336  get_bits(gb, 1); // self_contained_cvs_flag
337  get_bits(gb, 1); // num_sps_ids_minus1
338  num_sps_ids_minus1 = get_ue_golomb_long(gb); // num_sps_ids_minus1
339 
340  if (num_sps_ids_minus1 < 0 || num_sps_ids_minus1 > 15) {
341  av_log(logctx, AV_LOG_ERROR, "num_sps_ids_minus1 %d invalid\n", num_sps_ids_minus1);
342  return AVERROR_INVALIDDATA;
343  }
344 
345  active_seq_parameter_set_id = get_ue_golomb_long(gb);
346  if (active_seq_parameter_set_id >= HEVC_MAX_SPS_COUNT) {
347  av_log(logctx, AV_LOG_ERROR, "active_parameter_set_id %d invalid\n", active_seq_parameter_set_id);
348  return AVERROR_INVALIDDATA;
349  }
350  s->active_seq_parameter_set_id = active_seq_parameter_set_id;
351 
352  for (i = 1; i <= num_sps_ids_minus1; i++)
353  get_ue_golomb_long(gb); // active_seq_parameter_set_id[i]
354 
355  return 0;
356 }
357 
359 {
360  if (size < 1)
361  return AVERROR_INVALIDDATA;
362 
363  s->present = 1;
364  s->preferred_transfer_characteristics = get_bits(gb, 8);
365  size--;
366 
367  skip_bits_long(gb, 8 * size);
368  return 0;
369 }
370 
372 {
373  s->num_clock_ts = get_bits(gb, 2);
374 
375  for (int i = 0; i < s->num_clock_ts; i++) {
376  s->clock_timestamp_flag[i] = get_bits(gb, 1);
377 
378  if (s->clock_timestamp_flag[i]) {
379  s->units_field_based_flag[i] = get_bits(gb, 1);
380  s->counting_type[i] = get_bits(gb, 5);
381  s->full_timestamp_flag[i] = get_bits(gb, 1);
382  s->discontinuity_flag[i] = get_bits(gb, 1);
383  s->cnt_dropped_flag[i] = get_bits(gb, 1);
384 
385  s->n_frames[i] = get_bits(gb, 9);
386 
387  if (s->full_timestamp_flag[i]) {
388  s->seconds_value[i] = av_clip(get_bits(gb, 6), 0, 59);
389  s->minutes_value[i] = av_clip(get_bits(gb, 6), 0, 59);
390  s->hours_value[i] = av_clip(get_bits(gb, 5), 0, 23);
391  } else {
392  s->seconds_flag[i] = get_bits(gb, 1);
393  if (s->seconds_flag[i]) {
394  s->seconds_value[i] = av_clip(get_bits(gb, 6), 0, 59);
395  s->minutes_flag[i] = get_bits(gb, 1);
396  if (s->minutes_flag[i]) {
397  s->minutes_value[i] = av_clip(get_bits(gb, 6), 0, 59);
398  s->hours_flag[i] = get_bits(gb, 1);
399  if (s->hours_flag[i]) {
400  s->hours_value[i] = av_clip(get_bits(gb, 5), 0, 23);
401  }
402  }
403  }
404  }
405 
406  s->time_offset_length[i] = get_bits(gb, 5);
407  if (s->time_offset_length[i] > 0) {
408  s->time_offset_value[i] = get_bits_long(gb, s->time_offset_length[i]);
409  }
410  }
411  }
412 
413  s->present = 1;
414  return 0;
415 }
416 
417 
418 static int decode_nal_sei_prefix(GetBitContext *gb, void *logctx, HEVCSEI *s,
419  const HEVCParamSets *ps, int type, int size)
420 {
421  switch (type) {
422  case 256: // Mismatched value from HM 8.1
423  return decode_nal_sei_decoded_picture_hash(&s->picture_hash, gb);
425  return decode_nal_sei_frame_packing_arrangement(&s->frame_packing, gb);
427  return decode_nal_sei_display_orientation(&s->display_orientation, gb);
428  case SEI_TYPE_PIC_TIMING:
429  return decode_nal_sei_pic_timing(s, gb, ps, logctx, size);
431  return decode_nal_sei_mastering_display_info(&s->mastering_display, gb, size);
433  return decode_nal_sei_content_light_info(&s->content_light, gb, size);
435  return decode_nal_sei_active_parameter_sets(s, gb, logctx);
439  return decode_nal_sei_user_data_unregistered(&s->unregistered, gb, size);
441  return decode_nal_sei_alternative_transfer(&s->alternative_transfer, gb, size);
442  case SEI_TYPE_TIME_CODE:
443  return decode_nal_sei_timecode(&s->timecode, gb);
444  default:
445  av_log(logctx, AV_LOG_DEBUG, "Skipped PREFIX SEI %d\n", type);
446  skip_bits_long(gb, 8 * size);
447  return 0;
448  }
449 }
450 
451 static int decode_nal_sei_suffix(GetBitContext *gb, void *logctx, HEVCSEI *s,
452  int type, int size)
453 {
454  switch (type) {
456  return decode_nal_sei_decoded_picture_hash(&s->picture_hash, gb);
457  default:
458  av_log(logctx, AV_LOG_DEBUG, "Skipped SUFFIX SEI %d\n", type);
459  skip_bits_long(gb, 8 * size);
460  return 0;
461  }
462 }
463 
464 static int decode_nal_sei_message(GetBitContext *gb, void *logctx, HEVCSEI *s,
465  const HEVCParamSets *ps, int nal_unit_type)
466 {
467  int payload_type = 0;
468  int payload_size = 0;
469  int byte = 0xFF;
470  av_log(logctx, AV_LOG_DEBUG, "Decoding SEI\n");
471 
472  while (byte == 0xFF) {
473  if (get_bits_left(gb) < 16 || payload_type > INT_MAX - 255)
474  return AVERROR_INVALIDDATA;
475  byte = get_bits(gb, 8);
476  payload_type += byte;
477  }
478  byte = 0xFF;
479  while (byte == 0xFF) {
480  if (get_bits_left(gb) < 8 + 8LL*payload_size)
481  return AVERROR_INVALIDDATA;
482  byte = get_bits(gb, 8);
483  payload_size += byte;
484  }
485  if (get_bits_left(gb) < 8LL*payload_size)
486  return AVERROR_INVALIDDATA;
487  if (nal_unit_type == HEVC_NAL_SEI_PREFIX) {
488  return decode_nal_sei_prefix(gb, logctx, s, ps, payload_type, payload_size);
489  } else { /* nal_unit_type == NAL_SEI_SUFFIX */
490  return decode_nal_sei_suffix(gb, logctx, s, payload_type, payload_size);
491  }
492 }
493 
495 {
496  return get_bits_left(gb) > 0 && show_bits(gb, 8) != 0x80;
497 }
498 
500  const HEVCParamSets *ps, int type)
501 {
502  int ret;
503 
504  do {
505  ret = decode_nal_sei_message(gb, logctx, s, ps, type);
506  if (ret < 0)
507  return ret;
508  } while (more_rbsp_data(gb));
509  return 1;
510 }
511 
513 {
514  av_buffer_unref(&s->a53_caption.buf_ref);
515 
516  for (int i = 0; i < s->unregistered.nb_buf_ref; i++)
517  av_buffer_unref(&s->unregistered.buf_ref[i]);
518  s->unregistered.nb_buf_ref = 0;
519  av_freep(&s->unregistered.buf_ref);
520  av_buffer_unref(&s->dynamic_hdr_plus.info);
521 }
int ff_parse_a53_cc(AVBufferRef **pbuf, const uint8_t *data, int size)
Parse a data array for ATSC A53 Part 4 Closed Captions and store them in an AVBufferRef.
Definition: atsc_a53.c:68
uint8_t
static int FUNC() sps(CodedBitstreamContext *ctx, RWContext *rw, H264RawSPS *current)
#define s(width, name)
Definition: cbs_vp9.c:257
#define MKBETAG(a, b, c, d)
Definition: common.h:479
#define av_clip
Definition: common.h:122
#define NULL
Definition: coverity.c:32
int ff_parse_itu_t_t35_to_dynamic_hdr10_plus(AVDynamicHDRPlus *s, const uint8_t *data, int size)
Parse the user data registered ITU-T T.35 to AVbuffer (AVDynamicHDRPlus).
static unsigned int get_bits_long(GetBitContext *s, int n)
Read 0-32 bits.
Definition: get_bits.h:546
static int get_bits_left(GetBitContext *gb)
Definition: get_bits.h:849
static void skip_bits_long(GetBitContext *s, int n)
Skips the specified number of bits.
Definition: get_bits.h:291
static unsigned int get_bits1(GetBitContext *s)
Definition: get_bits.h:498
static void skip_bits(GetBitContext *s, int n)
Definition: get_bits.h:467
static int get_bits_count(const GetBitContext *s)
Definition: get_bits.h:219
static void skip_bits1(GetBitContext *s)
Definition: get_bits.h:538
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
Definition: get_bits.h:379
static unsigned int show_bits(GetBitContext *s, int n)
Show 1-25 bits.
Definition: get_bits.h:446
exp golomb vlc stuff
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:106
@ AV_PICTURE_STRUCTURE_BOTTOM_FIELD
Definition: avcodec.h:3377
@ AV_PICTURE_STRUCTURE_TOP_FIELD
Definition: avcodec.h:3376
@ AV_PICTURE_STRUCTURE_UNKNOWN
Definition: avcodec.h:3375
void av_buffer_unref(AVBufferRef **buf)
Free a given reference and automatically free the buffer if there are no more references to it.
Definition: buffer.c:125
AVBufferRef * av_buffer_create(uint8_t *data, buffer_size_t size, void(*free)(void *opaque, uint8_t *data), void *opaque, int flags)
Create an AVBuffer from an existing array.
Definition: buffer.c:29
AVBufferRef * av_buffer_alloc(buffer_size_t size)
Allocate an AVBuffer of the given size using av_malloc().
Definition: buffer.c:67
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
Definition: error.h:59
#define AVERROR(e)
Definition: error.h:43
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
Definition: log.h:215
#define AV_LOG_VERBOSE
Detailed information.
Definition: log.h:210
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:194
void * av_realloc_array(void *ptr, size_t nmemb, size_t size)
Allocate, reallocate, or free an array.
Definition: mem.c:198
AVDynamicHDRPlus * av_dynamic_hdr_plus_alloc(size_t *size)
Copyright (c) 2018 Mohammad Izadi <moh.izadi at gmail.com>
static int decode_nal_sei_mastering_display_info(HEVCSEIMasteringDisplay *s, GetBitContext *gb, int size)
Definition: hevc_sei.c:55
static int more_rbsp_data(GetBitContext *gb)
Definition: hevc_sei.c:494
static int decode_nal_sei_user_data_unregistered(HEVCSEIUnregistered *s, GetBitContext *gb, int size)
Definition: hevc_sei.c:197
static int decode_nal_sei_alternative_transfer(HEVCSEIAlternativeTransfer *s, GetBitContext *gb, int size)
Definition: hevc_sei.c:358
static int decode_registered_user_data_closed_caption(HEVCSEIA53Caption *s, GetBitContext *gb, int size)
Definition: hevc_sei.c:179
static int decode_nal_sei_frame_packing_arrangement(HEVCSEIFramePacking *s, GetBitContext *gb)
Definition: hevc_sei.c:103
static int decode_nal_sei_suffix(GetBitContext *gb, void *logctx, HEVCSEI *s, int type, int size)
Definition: hevc_sei.c:451
static int decode_nal_sei_message(GetBitContext *gb, void *logctx, HEVCSEI *s, const HEVCParamSets *ps, int nal_unit_type)
Definition: hevc_sei.c:464
static int decode_nal_sei_timecode(HEVCSEITimeCode *s, GetBitContext *gb)
Definition: hevc_sei.c:371
int ff_hevc_decode_nal_sei(GetBitContext *gb, void *logctx, HEVCSEI *s, const HEVCParamSets *ps, int type)
Definition: hevc_sei.c:499
static int decode_nal_sei_user_data_registered_itu_t_t35(HEVCSEI *s, GetBitContext *gb, void *logctx, int size)
Definition: hevc_sei.c:251
static int decode_nal_sei_display_orientation(HEVCSEIDisplayOrientation *s, GetBitContext *gb)
Definition: hevc_sei.c:128
void ff_hevc_reset_sei(HEVCSEI *s)
Reset SEI values that are stored on the Context.
Definition: hevc_sei.c:512
static int decode_nal_sei_pic_timing(HEVCSEI *s, GetBitContext *gb, const HEVCParamSets *ps, void *logctx, int size)
Definition: hevc_sei.c:143
static int decode_nal_sei_decoded_picture_hash(HEVCSEIPictureHash *s, GetBitContext *gb)
Definition: hevc_sei.c:31
static int decode_nal_sei_active_parameter_sets(HEVCSEI *s, GetBitContext *gb, void *logctx)
Definition: hevc_sei.c:329
static int decode_nal_sei_content_light_info(HEVCSEIContentLight *s, GetBitContext *gb, int size)
Definition: hevc_sei.c:85
static int decode_nal_sei_prefix(GetBitContext *gb, void *logctx, HEVCSEI *s, const HEVCParamSets *ps, int type, int size)
Definition: hevc_sei.c:418
static int decode_registered_user_data_dynamic_hdr_plus(HEVCSEIDynamicHDRPlus *s, GetBitContext *gb, int size)
Definition: hevc_sei.c:223
@ HEVC_SEI_PIC_STRUCT_FRAME_DOUBLING
Definition: hevc_sei.h:31
@ HEVC_SEI_PIC_STRUCT_FRAME_TRIPLING
Definition: hevc_sei.h:32
cl_device_type type
int i
Definition: input.c:407
@ HEVC_NAL_SEI_PREFIX
Definition: hevc.h:68
@ HEVC_MAX_SPS_COUNT
Definition: hevc.h:112
@ SEI_TYPE_DECODED_PICTURE_HASH
Definition: sei.h:91
@ SEI_TYPE_PIC_TIMING
Definition: sei.h:31
@ SEI_TYPE_USER_DATA_REGISTERED_ITU_T_T35
Definition: sei.h:34
@ SEI_TYPE_ACTIVE_PARAMETER_SETS
Definition: sei.h:87
@ SEI_TYPE_DISPLAY_ORIENTATION
Definition: sei.h:77
@ SEI_TYPE_ALTERNATIVE_TRANSFER_CHARACTERISTICS
Definition: sei.h:106
@ SEI_TYPE_FRAME_PACKING_ARRANGEMENT
Definition: sei.h:75
@ SEI_TYPE_USER_DATA_UNREGISTERED
Definition: sei.h:35
@ SEI_TYPE_CONTENT_LIGHT_LEVEL_INFO
Definition: sei.h:103
@ SEI_TYPE_TIME_CODE
Definition: sei.h:95
@ SEI_TYPE_MASTERING_DISPLAY_COLOUR_VOLUME
Definition: sei.h:96
A reference to a data buffer.
Definition: buffer.h:84
int size
Size of data in bytes.
Definition: buffer.h:97
uint8_t * data
The data buffer.
Definition: buffer.h:92
This struct represents dynamic metadata for color volume transform - application 4 of SMPTE 2094-40:2...
const uint8_t * buffer
Definition: get_bits.h:62
AVBufferRef * sps_list[HEVC_MAX_SPS_COUNT]
Definition: hevc_ps.h:329
#define av_free(p)
#define av_freep(p)
#define av_log(a,...)
static uint8_t tmp[11]
Definition: aes_ctr.c:27
int size
if(ret< 0)
Definition: vf_mcdeint.c:282