FFmpeg
itut35.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/buffer.h"
20 #include "libavutil/frame.h"
22 #include "libavutil/internal.h"
23 #include "libavutil/mem.h"
24 
25 #include "avcodec.h"
26 #include "atsc_a53.h"
27 #include "bytestream.h"
28 #include "decode.h"
29 #include "dynamic_hdr_vivid.h"
30 #include "dovi_rpu.h"
31 #include "itut35.h"
32 #include "version.h"
33 
34 int ff_itut_t35_parse_buffer(FFITUTT35 *const itut_t35, const uint8_t *buf,
35  size_t buf_size, int flags) {
36  GetByteContext gb;
37  int provider_code, country_code;
38  unsigned int provider_oriented_code = 0;
39 
40  bytestream2_init(&gb, buf, buf_size);
41 
43  country_code = itut_t35->country_code;
44  else {
45  country_code = bytestream2_get_byte(&gb);
46  if (country_code == 0xFF) {
47  if (bytestream2_get_bytes_left(&gb) < 1)
48  return AVERROR_INVALIDDATA;
49 
50  bytestream2_skipu(&gb, 1); // itu_t_t35_country_code_extension_byte
51  }
52  }
53 
54  switch (country_code) {
56  if (bytestream2_get_bytes_left(&gb) < 2)
57  return AVERROR_INVALIDDATA;
58  provider_code = bytestream2_get_be16u(&gb);
59 
60  switch (provider_code) {
62  if (bytestream2_get_bytes_left(&gb) < 4)
63  return AVERROR_INVALIDDATA;
64  provider_oriented_code = bytestream2_get_be32u(&gb);
65  switch (provider_oriented_code) {
66  case MKBETAG('D', 'T', 'G', '1'): // afd_data
67  if (bytestream2_get_bytes_left(&gb) < 2)
68  return AVERROR_INVALIDDATA;
69  if (!(bytestream2_get_byteu(&gb) & 0x40)) // active_format_flag
70  return 0; //ignore
71  break;
72  case MKBETAG('G', 'A', '9', '4'): // closed captions
73  break;
74  default: // ignore unsupported identifiers
75  return 0;
76  }
77  break;
79  if (bytestream2_get_bytes_left(&gb) < 1)
80  return AVERROR_INVALIDDATA;
81 
82  provider_oriented_code = bytestream2_get_byteu(&gb);
83  if (provider_oriented_code != 0x0001)
84  return 0; // ignore
85  break;
87  if (bytestream2_get_bytes_left(&gb) < 3)
88  return AVERROR_INVALIDDATA;
89  provider_oriented_code = bytestream2_get_be16u(&gb);
90  int application_identifier = bytestream2_get_byteu(&gb);
91 
92  if (provider_oriented_code != 1 || application_identifier != 4)
93  return 0; // ignore
94  break;
96  if (bytestream2_get_bytes_left(&gb) < 4)
97  return AVERROR_INVALIDDATA;
98  provider_oriented_code = bytestream2_get_be32u(&gb);
99  if (provider_oriented_code != 0x800)
100  return 0; // ignore
101  break;
103  if (bytestream2_get_bytes_left(&gb) < 2)
104  return AVERROR_INVALIDDATA;
105  provider_oriented_code = bytestream2_get_be16u(&gb);
106  if (provider_oriented_code != 1)
107  return 0; // ignore
108  break;
109  default: // ignore unsupported provider codes
110  return 0;
111  }
112  break;
114  if (bytestream2_get_bytes_left(&gb) < 3)
115  return AVERROR_INVALIDDATA;
116 
117  bytestream2_skipu(&gb, 1); // t35_uk_country_code_second_octet
118  provider_code = bytestream2_get_be16u(&gb);
119 
120  switch (provider_code) {
122  break;
123  default: // ignore unsupported provider codes
124  return 0;
125  }
126  break;
128  if (bytestream2_get_bytes_left(&gb) < 2)
129  return AVERROR_INVALIDDATA;
130  provider_code = bytestream2_get_be16u(&gb);
131 
132  switch (provider_code) {
134  if (bytestream2_get_bytes_left(&gb) < 2)
135  return AVERROR_INVALIDDATA;
136 
137  provider_oriented_code = bytestream2_get_be16u(&gb);
138  if (provider_oriented_code != 0x0005)
139  return 0; //ignore
140  break;
141  default: // ignore unsupported provider codes
142  return 0;
143  }
144  break;
145 
146  default: // ignore unsupported country codes
147  return 0;
148  }
149 
150  if (!bytestream2_get_bytes_left(&gb))
151  return AVERROR_INVALIDDATA;
152 
153  itut_t35->payload = gb.buffer;
154  itut_t35->payload_size = bytestream2_get_bytes_left(&gb);
155 
156  itut_t35->country_code = country_code;
157  itut_t35->provider_code = provider_code;
158  itut_t35->provider_oriented_code = provider_oriented_code;
159 
160  return 1;
161 }
162 
164  FFITUTT35Meta *metadata, int err_recognition)
165 {
166  int ret;
167 
168  switch (itut_t35->country_code) {
170  switch (itut_t35->provider_code) {
172  ff_aom_uninit_film_grain_params(&metadata->aom_film_grain);
173  ret = ff_aom_parse_film_grain_sets(&metadata->aom_film_grain,
174  itut_t35->payload, itut_t35->payload_size);
175  if (ret < 0)
176  return ret;
177  break;
179  switch (itut_t35->provider_oriented_code) {
180  case MKBETAG('D', 'T', 'G', '1'): // afd_data
181  av_buffer_unref(&metadata->afd);
182  metadata->afd = av_buffer_alloc(1);
183  if (!metadata->afd)
184  return AVERROR(ENOMEM);
185 
186  *metadata->afd->data = *itut_t35->payload & 0xf;
187 
188  break;
189  case MKBETAG('G', 'A', '9', '4'): // closed captions
190  ret = ff_parse_a53_cc(&metadata->a53_cc, itut_t35->payload, itut_t35->payload_size);
191  if (ret < 0)
192  return ret;
193 
194  break;
195  default: // ignore unsupported identifiers
196  break;
197  }
198  break;
200  size_t size;
202  if (!hdr_plus)
203  return AVERROR(ENOMEM);
204 
205  ret = av_dynamic_hdr_plus_from_t35(hdr_plus, itut_t35->payload,
206  itut_t35->payload_size);
207  if (ret < 0)
208  return ret;
209 
210  av_buffer_unref(&metadata->hdr_plus);
211  metadata->hdr_plus = av_buffer_create((uint8_t *)hdr_plus, size, NULL, NULL, 0);
212  if (!metadata->hdr_plus) {
213  av_free(hdr_plus);
214  return AVERROR(ENOMEM);
215  }
216 
217  break;
218  }
220  AVDOVIMetadata *dovi;
221 
222  if (!aux || !aux->dovi)
223  return 0; // ignore
224 
225  ret = ff_dovi_rpu_parse(aux->dovi, itut_t35->payload, itut_t35->payload_size,
226  err_recognition);
227  if (ret < 0)
228  return 0; // ignore
229 
230  ret = ff_dovi_get_metadata(aux->dovi, &dovi);
231  if (ret <= 0)
232  return ret;
233 
234  av_buffer_unref(&metadata->dovi);
235  metadata->dovi = av_buffer_create((uint8_t *)dovi, ret, NULL, NULL, 0);
236  if (!metadata->dovi) {
237  av_free(dovi);
238  return AVERROR(ENOMEM);
239  }
240 
241  break;
242  }
244  size_t size;
246  if (!hdr_smpte2094_app5)
247  return AVERROR(ENOMEM);
248 
249  ret = av_dynamic_hdr_smpte2094_app5_from_t35(hdr_smpte2094_app5, itut_t35->payload,
250  itut_t35->payload_size);
251  if (ret < 0)
252  return ret;
253 
254  av_buffer_unref(&metadata->hdr_smpte2094_app5);
255  metadata->hdr_smpte2094_app5 = av_buffer_create((uint8_t *)hdr_smpte2094_app5, size, NULL, NULL, 0);
256  if (!metadata->hdr_smpte2094_app5) {
257  av_free(hdr_smpte2094_app5);
258  return AVERROR(ENOMEM);
259  }
260 
261  break;
262  }
263  default:
264  break;
265  }
266  break;
268  switch (itut_t35->provider_code) {
270  av_buffer_unref(&metadata->lcevc);
271  metadata->lcevc = av_buffer_alloc(itut_t35->payload_size);
272  if (!metadata->lcevc)
273  return AVERROR(ENOMEM);
274 
275  memcpy(metadata->lcevc->data, itut_t35->payload, itut_t35->payload_size);
276 
277  break;
278  default:
279  break;
280  }
281  break;
283  switch (itut_t35->provider_code) {
285  size_t size;
287  if (!hdr_vivid)
288  return AVERROR(ENOMEM);
289 
290  ret = ff_parse_itu_t_t35_to_dynamic_hdr_vivid(hdr_vivid, itut_t35->payload,
291  itut_t35->payload_size);
292  if (ret < 0) {
293  av_free(hdr_vivid);
294  return ret;
295  }
296 
297  av_buffer_unref(&metadata->hdr_vivid);
298  metadata->hdr_vivid = av_buffer_create((uint8_t *)hdr_vivid, size, NULL, NULL, 0);
299  if (!metadata->hdr_vivid) {
300  av_free(hdr_vivid);
301  return AVERROR(ENOMEM);
302  }
303  break;
304  }
305  default:
306  break;
307  }
308  break;
309 
310  default:
311  // ignore unsupported provider codes
312  break;
313  }
314 
315  return 0;
316 }
317 
319  AVCodecContext *const avctx, AVFrame *const frame)
320 {
321  FFITUTT35Meta metadata = { 0 };
322  int ret;
323 
325  if (ret < 0)
326  return ret;
327 
328  if (metadata.afd) {
331  metadata.afd = NULL;
332  }
333 
334  if (metadata.a53_cc) {
336  if (ret < 0)
337  return ret;
338 
339 #if FF_API_CODEC_PROPS
343 #endif
344  }
345 
346  if (metadata.aom_film_grain.enable) {
347  ret = ff_aom_attach_film_grain_sets(&metadata.aom_film_grain, frame);
348  if (ret < 0)
349  return ret;
350  }
351 
352  if (metadata.hdr_plus) {
354  &metadata.hdr_plus);
355  if (ret < 0)
356  return ret;
357  }
358 
359  if (metadata.dovi) {
361  metadata.dovi);
362  if (!sd) {
363  av_buffer_unref(&metadata.dovi);
364  return AVERROR(ENOMEM);
365  }
366  metadata.dovi = NULL;
367  }
368 
369  if (metadata.hdr_smpte2094_app5) {
371  &metadata.hdr_smpte2094_app5);
372  if (ret < 0)
373  return ret;
374  }
375 
376  if (metadata.lcevc) {
378  &metadata.lcevc);
379  if (ret < 0)
380  return ret;
381  }
382 
383  if (metadata.hdr_vivid) {
385  &metadata.hdr_vivid);
386  if (ret < 0)
387  return ret;
388  }
389 
391 
392  return 0;
393 }
394 
396 {
397  ff_aom_uninit_film_grain_params(&metadata->aom_film_grain);
398  av_buffer_unref(&metadata->afd);
399  av_buffer_unref(&metadata->a53_cc);
400  av_buffer_unref(&metadata->hdr_plus);
401  av_buffer_unref(&metadata->hdr_smpte2094_app5);
402  av_buffer_unref(&metadata->lcevc);
403  av_buffer_unref(&metadata->dovi);
404  av_buffer_unref(&metadata->hdr_vivid);
405 }
flags
const SwsFlags flags[]
Definition: swscale.c:85
FF_ENABLE_DEPRECATION_WARNINGS
#define FF_ENABLE_DEPRECATION_WARNINGS
Definition: internal.h:73
FFITUTT35::country_code
int country_code
Definition: itut35.h:51
ITU_T_T35_PROVIDER_CODE_HDR_VIVID
#define ITU_T_T35_PROVIDER_CODE_HDR_VIVID
Definition: itut35.h:39
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
bytestream2_get_bytes_left
static av_always_inline int bytestream2_get_bytes_left(const GetByteContext *g)
Definition: bytestream.h:158
GetByteContext
Definition: bytestream.h:33
AV_FRAME_DATA_A53_CC
@ AV_FRAME_DATA_A53_CC
ATSC A53 Part 4 Closed Captions.
Definition: frame.h:59
ff_itut_t35_parse_payload_to_struct
int ff_itut_t35_parse_payload_to_struct(FFITUTT35 *const itut_t35, FFITUTT35Aux *const aux, FFITUTT35Meta *metadata, int err_recognition)
Parse a pre-processed ITU-T T35 payload to fill the metadata struct.
Definition: itut35.c:163
AVCodecContext::err_recognition
int err_recognition
Error recognition; may misdetect some more or less valid parts as errors.
Definition: avcodec.h:1416
AV_FRAME_DATA_DOVI_METADATA
@ AV_FRAME_DATA_DOVI_METADATA
Parsed Dolby Vision metadata, suitable for passing to a software implementation.
Definition: frame.h:208
ff_dovi_rpu_parse
int ff_dovi_rpu_parse(DOVIContext *s, const uint8_t *rpu, size_t rpu_size, int err_recognition)
Parse the contents of a Dolby Vision RPU and update the parsed values in the DOVIContext struct.
Definition: dovi_rpudec.c:343
bytestream2_skipu
static av_always_inline void bytestream2_skipu(GetByteContext *g, unsigned int size)
Definition: bytestream.h:174
FF_ITUT_T35_FLAG_COUNTRY_CODE
#define FF_ITUT_T35_FLAG_COUNTRY_CODE
country_code is assumed to not be the first byte of the buffer and must be set by the caller beforeha...
Definition: itut35.h:83
AVFrame
This structure describes decoded (raw) audio or video data.
Definition: frame.h:466
version.h
av_dynamic_hdr_smpte2094_app5_alloc
AVDynamicHDRSmpte2094App5 * av_dynamic_hdr_smpte2094_app5_alloc(size_t *size)
Allocate an AVDynamicHDRSmpte2094App5 structure and set its fields to default values.
Definition: hdr_dynamic_metadata.c:399
ITU_T_T35_COUNTRY_CODE_CN
#define ITU_T_T35_COUNTRY_CODE_CN
Definition: itut35.h:30
ITU_T_T35_PROVIDER_CODE_VNOVA
#define ITU_T_T35_PROVIDER_CODE_VNOVA
Definition: itut35.h:42
av_dynamic_hdr_vivid_alloc
AVDynamicHDRVivid * av_dynamic_hdr_vivid_alloc(size_t *size)
Copyright (c) 2021 Limin Wang <lance.lmwang at gmail.com>
Definition: hdr_dynamic_vivid_metadata.c:24
dovi_rpu.h
ITU_T_T35_PROVIDER_CODE_ATSC
#define ITU_T_T35_PROVIDER_CODE_ATSC
Definition: itut35.h:44
ff_frame_new_side_data_from_buf
int ff_frame_new_side_data_from_buf(const AVCodecContext *avctx, AVFrame *frame, enum AVFrameSideDataType type, AVBufferRef **buf)
Similar to ff_frame_new_side_data, but using an existing buffer ref.
Definition: decode.c:2214
FFITUTT35::provider_code
int provider_code
Definition: itut35.h:53
AVDOVIMetadata
Combined struct representing a combination of header, mapping and color metadata, for attaching to fr...
Definition: dovi_meta.h:345
GetByteContext::buffer
const uint8_t * buffer
Definition: bytestream.h:34
decode.h
AV_FRAME_DATA_DYNAMIC_HDR_SMPTE_2094_APP5
@ AV_FRAME_DATA_DYNAMIC_HDR_SMPTE_2094_APP5
HDR dynamic metadata associated with a video frame.
Definition: frame.h:270
FFITUTT35::payload
const uint8_t * payload
Definition: itut35.h:56
ff_aom_uninit_film_grain_params
void ff_aom_uninit_film_grain_params(AVFilmGrainAFGS1Params *s)
Definition: aom_film_grain.c:379
ff_itut_t35_unref
void ff_itut_t35_unref(FFITUTT35Meta *metadata)
Unref all references in metadata.
Definition: itut35.c:395
AV_FRAME_DATA_DYNAMIC_HDR_VIVID
@ AV_FRAME_DATA_DYNAMIC_HDR_VIVID
HDR Vivid dynamic metadata associated with a video frame.
Definition: frame.h:215
ff_parse_a53_cc
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:69
metadata
Stream codec metadata
Definition: ogg-flac-chained-meta.txt:2
NULL
#define NULL
Definition: coverity.c:32
av_buffer_unref
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:139
FFITUTT35
Definition: itut35.h:50
AVDynamicHDRSmpte2094App5
This struct represents dynamic metadata for color volume transform as specified in the SMPTE 2094-50 ...
Definition: hdr_dynamic_metadata.h:387
ff_itut_t35_parse_buffer
int ff_itut_t35_parse_buffer(FFITUTT35 *const itut_t35, const uint8_t *buf, size_t buf_size, int flags)
Parse a raw ITU-T T35 buffer to get the country code, provider code, and set them plus the pointer an...
Definition: itut35.c:34
AVDynamicHDRVivid
This struct represents dynamic metadata for color volume transform - CUVA 005.1:2021 standard.
Definition: hdr_dynamic_vivid_metadata.h:256
av_frame_new_side_data_from_buf
AVFrameSideData * av_frame_new_side_data_from_buf(AVFrame *frame, enum AVFrameSideDataType type, AVBufferRef *buf)
Add a new side data to a frame from an existing AVBufferRef.
Definition: frame.c:638
AV_FRAME_DATA_AFD
@ AV_FRAME_DATA_AFD
Active Format Description data consisting of a single byte as specified in ETSI TS 101 154 using AVAc...
Definition: frame.h:90
ff_aom_attach_film_grain_sets
int ff_aom_attach_film_grain_sets(const AVFilmGrainAFGS1Params *s, AVFrame *frame)
Definition: aom_film_grain.c:360
av_buffer_create
AVBufferRef * av_buffer_create(uint8_t *data, size_t size, void(*free)(void *opaque, uint8_t *data), void *opaque, int flags)
Create an AVBuffer from an existing array.
Definition: buffer.c:55
ff_itut_t35_parse_payload_to_frame
int ff_itut_t35_parse_payload_to_frame(FFITUTT35 *const itut_t35, FFITUTT35Aux *const aux, AVCodecContext *const avctx, AVFrame *const frame)
Parse a pre-processed ITU-T T35 payload to fill a frame's side data.
Definition: itut35.c:318
ITU_T_T35_PROVIDER_CODE_SMPTE
#define ITU_T_T35_PROVIDER_CODE_SMPTE
Definition: itut35.h:48
ITU_T_T35_PROVIDER_CODE_DOLBY
#define ITU_T_T35_PROVIDER_CODE_DOLBY
Definition: itut35.h:45
AV_FRAME_DATA_LCEVC
@ AV_FRAME_DATA_LCEVC
Raw LCEVC payload data, as a uint8_t array, with NAL emulation bytes intact.
Definition: frame.h:236
size
int size
Definition: twinvq_data.h:10344
MKBETAG
#define MKBETAG(a, b, c, d)
Definition: macros.h:56
frame.h
buffer.h
FFITUTT35Meta
Definition: itut35.h:60
av_buffer_alloc
AVBufferRef * av_buffer_alloc(size_t size)
Allocate an AVBuffer of the given size using av_malloc().
Definition: buffer.c:77
ff_aom_parse_film_grain_sets
int ff_aom_parse_film_grain_sets(AVFilmGrainAFGS1Params *s, const uint8_t *payload, int payload_size)
Definition: aom_film_grain.c:124
ff_parse_itu_t_t35_to_dynamic_hdr_vivid
int ff_parse_itu_t_t35_to_dynamic_hdr_vivid(AVDynamicHDRVivid *s, const uint8_t *data, int size)
Parse the user data registered ITU-T T.35 to AVbuffer (AVDynamicHDRVivid).
Definition: dynamic_hdr_vivid.c:32
ff_dovi_get_metadata
int ff_dovi_get_metadata(DOVIContext *s, AVDOVIMetadata **out_metadata)
Get the decoded AVDOVIMetadata.
Definition: dovi_rpudec.c:33
internal.h
AVDynamicHDRPlus
This struct represents dynamic metadata for color volume transform - application 4 of SMPTE 2094-40:2...
Definition: hdr_dynamic_metadata.h:243
avcodec.h
ret
ret
Definition: filter_design.txt:187
frame
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
Definition: filter_design.txt:265
atsc_a53.h
FFITUTT35::payload_size
size_t payload_size
Definition: itut35.h:57
AV_FRAME_DATA_DYNAMIC_HDR_PLUS
@ AV_FRAME_DATA_DYNAMIC_HDR_PLUS
HDR dynamic metadata associated with a video frame.
Definition: frame.h:159
AVCodecContext
main external API structure.
Definition: avcodec.h:443
itut35.h
FFITUTT35Aux::dovi
DOVIContext * dovi
A DOVIContext.
Definition: itut35.h:76
hdr_dynamic_metadata.h
FF_CODEC_PROPERTY_CLOSED_CAPTIONS
#define FF_CODEC_PROPERTY_CLOSED_CAPTIONS
Definition: avcodec.h:1657
ITU_T_T35_COUNTRY_CODE_UK
#define ITU_T_T35_COUNTRY_CODE_UK
Definition: itut35.h:31
ITU_T_T35_PROVIDER_CODE_AOM
#define ITU_T_T35_PROVIDER_CODE_AOM
Definition: itut35.h:46
FF_DISABLE_DEPRECATION_WARNINGS
#define FF_DISABLE_DEPRECATION_WARNINGS
Definition: internal.h:72
mem.h
ITU_T_T35_COUNTRY_CODE_US
#define ITU_T_T35_COUNTRY_CODE_US
Definition: itut35.h:32
FFITUTT35::provider_oriented_code
unsigned int provider_oriented_code
Definition: itut35.h:54
AVFrameSideData
Structure to hold side data for an AVFrame.
Definition: frame.h:321
av_dynamic_hdr_plus_alloc
AVDynamicHDRPlus * av_dynamic_hdr_plus_alloc(size_t *size)
Allocate an AVDynamicHDRPlus structure and set its fields to default values.
Definition: hdr_dynamic_metadata.c:36
dynamic_hdr_vivid.h
av_free
#define av_free(p)
Definition: tableprint_vlc.h:34
av_dynamic_hdr_plus_from_t35
int av_dynamic_hdr_plus_from_t35(AVDynamicHDRPlus *s, const uint8_t *data, size_t size)
Parse the user data registered ITU-T T.35 to AVbuffer (AVDynamicHDRPlus).
Definition: hdr_dynamic_metadata.c:61
bytestream.h
FFITUTT35Aux
Definition: itut35.h:71
bytestream2_init
static av_always_inline void bytestream2_init(GetByteContext *g, const uint8_t *buf, int buf_size)
Definition: bytestream.h:137
AVCodecContext::properties
attribute_deprecated unsigned properties
Properties of the stream that gets decoded.
Definition: avcodec.h:1655
ITU_T_T35_PROVIDER_CODE_SAMSUNG
#define ITU_T_T35_PROVIDER_CODE_SAMSUNG
Definition: itut35.h:47
AVERROR_INVALIDDATA
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
Definition: error.h:61
av_dynamic_hdr_smpte2094_app5_from_t35
int av_dynamic_hdr_smpte2094_app5_from_t35(AVDynamicHDRSmpte2094App5 *s, const uint8_t *data, size_t size)
Parse the user data formatted as ITU-T T.35 message to AVDynamicHDRSmpte2094App5.
Definition: hdr_dynamic_metadata.c:433