Go to the documentation of this file.
35 size_t buf_size,
int flags) {
37 int provider_code, country_code;
38 unsigned int provider_oriented_code = 0;
45 country_code = bytestream2_get_byte(&gb);
46 if (country_code == 0xFF) {
54 switch (country_code) {
58 provider_code = bytestream2_get_be16u(&gb);
60 switch (provider_code) {
64 provider_oriented_code = bytestream2_get_be32u(&gb);
65 switch (provider_oriented_code) {
66 case MKBETAG(
'D',
'T',
'G',
'1'):
69 if (!(bytestream2_get_byteu(&gb) & 0x40))
72 case MKBETAG(
'G',
'A',
'9',
'4'):
82 provider_oriented_code = bytestream2_get_byteu(&gb);
83 if (provider_oriented_code != 0x0001)
89 provider_oriented_code = bytestream2_get_be16u(&gb);
90 int application_identifier = bytestream2_get_byteu(&gb);
92 if (provider_oriented_code != 1 || application_identifier != 4)
98 provider_oriented_code = bytestream2_get_be32u(&gb);
99 if (provider_oriented_code != 0x800)
105 provider_oriented_code = bytestream2_get_be16u(&gb);
106 if (provider_oriented_code != 1)
118 provider_code = bytestream2_get_be16u(&gb);
120 switch (provider_code) {
130 provider_code = bytestream2_get_be16u(&gb);
132 switch (provider_code) {
137 provider_oriented_code = bytestream2_get_be16u(&gb);
138 if (provider_oriented_code != 0x0005)
180 case MKBETAG(
'D',
'T',
'G',
'1'):
189 case MKBETAG(
'G',
'A',
'9',
'4'):
222 if (!aux || !aux->
dovi)
246 if (!hdr_smpte2094_app5)
256 if (!
metadata->hdr_smpte2094_app5) {
339 #if FF_API_CODEC_PROPS
346 if (
metadata.aom_film_grain.enable) {
#define FF_ENABLE_DEPRECATION_WARNINGS
#define ITU_T_T35_PROVIDER_CODE_HDR_VIVID
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
static av_always_inline int bytestream2_get_bytes_left(const GetByteContext *g)
@ AV_FRAME_DATA_A53_CC
ATSC A53 Part 4 Closed Captions.
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.
int err_recognition
Error recognition; may misdetect some more or less valid parts as errors.
@ AV_FRAME_DATA_DOVI_METADATA
Parsed Dolby Vision metadata, suitable for passing to a software implementation.
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.
static av_always_inline void bytestream2_skipu(GetByteContext *g, unsigned int size)
#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...
This structure describes decoded (raw) audio or video data.
#define ITU_T_T35_COUNTRY_CODE_CN
#define ITU_T_T35_PROVIDER_CODE_VNOVA
#define ITU_T_T35_PROVIDER_CODE_ATSC
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.
@ AV_FRAME_DATA_DYNAMIC_HDR_SMPTE_2094_APP5
HDR dynamic metadata associated with a video frame.
void ff_aom_uninit_film_grain_params(AVFilmGrainAFGS1Params *s)
void ff_itut_t35_unref(FFITUTT35Meta *metadata)
Unref all references in metadata.
@ AV_FRAME_DATA_DYNAMIC_HDR_VIVID
HDR Vivid dynamic metadata associated with a video frame.
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.
void av_buffer_unref(AVBufferRef **buf)
Free a given reference and automatically free the buffer if there are no more references to it.
This struct represents dynamic metadata for color volume transform as specified in the SMPTE 2094-50 ...
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...
This struct represents dynamic metadata for color volume transform - CUVA 005.1:2021 standard.
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.
@ AV_FRAME_DATA_AFD
Active Format Description data consisting of a single byte as specified in ETSI TS 101 154 using AVAc...
int ff_aom_attach_film_grain_sets(const AVFilmGrainAFGS1Params *s, AVFrame *frame)
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.
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.
#define ITU_T_T35_PROVIDER_CODE_SMPTE
#define ITU_T_T35_PROVIDER_CODE_DOLBY
@ AV_FRAME_DATA_LCEVC
Raw LCEVC payload data, as a uint8_t array, with NAL emulation bytes intact.
#define MKBETAG(a, b, c, d)
AVBufferRef * av_buffer_alloc(size_t size)
Allocate an AVBuffer of the given size using av_malloc().
int ff_aom_parse_film_grain_sets(AVFilmGrainAFGS1Params *s, const uint8_t *payload, int payload_size)
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).
int ff_dovi_get_metadata(DOVIContext *s, AVDOVIMetadata **out_metadata)
Get the decoded AVDOVIMetadata.
This struct represents dynamic metadata for color volume transform - application 4 of SMPTE 2094-40:2...
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
@ AV_FRAME_DATA_DYNAMIC_HDR_PLUS
HDR dynamic metadata associated with a video frame.
main external API structure.
DOVIContext * dovi
A DOVIContext.
#define FF_CODEC_PROPERTY_CLOSED_CAPTIONS
#define ITU_T_T35_COUNTRY_CODE_UK
#define ITU_T_T35_PROVIDER_CODE_AOM
#define FF_DISABLE_DEPRECATION_WARNINGS
#define ITU_T_T35_COUNTRY_CODE_US
unsigned int provider_oriented_code
Structure to hold side data for an AVFrame.
static av_always_inline void bytestream2_init(GetByteContext *g, const uint8_t *buf, int buf_size)
attribute_deprecated unsigned properties
Properties of the stream that gets decoded.
#define ITU_T_T35_PROVIDER_CODE_SAMSUNG
#define AVERROR_INVALIDDATA
Invalid data found when processing input.