71 "on RGB streams encoded in BT.709 sRGB.\n");
80 "can only be set for 4:2:0 streams.\n");
90 UINT32_MAX > INT_MAX ? UINT32_MAX : INT_MAX);
113 for (i = 0; i < frag->
nb_units; i++) {
140 for (i = frag->
nb_units - 1; i >= 0; i--) {
151 .fragment_name =
"temporal unit",
161 #define OFFSET(x) offsetof(AV1MetadataContext, x) 162 #define FLAGS (AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_BSF_PARAM) 167 {
"color_primaries",
"Set color primaries (section 6.4.2)",
169 { .i64 = -1 }, -1, 255,
FLAGS },
170 {
"transfer_characteristics",
"Set transfer characteristics (section 6.4.2)",
172 { .i64 = -1 }, -1, 255,
FLAGS },
173 {
"matrix_coefficients",
"Set matrix coefficients (section 6.4.2)",
175 { .i64 = -1 }, -1, 255,
FLAGS },
177 {
"color_range",
"Set color range flag (section 6.4.2)",
179 { .i64 = -1 }, -1, 1,
FLAGS,
"cr" },
181 { .i64 = 0 }, .flags =
FLAGS, .unit =
"cr" },
183 { .i64 = 1 }, .flags =
FLAGS, .unit =
"cr" },
185 {
"chroma_sample_position",
"Set chroma sample position (section 6.4.2)",
187 { .i64 = -1 }, -1, 3,
FLAGS,
"csp" },
195 {
"tick_rate",
"Set display tick rate (num_units_in_display_tick / time_scale)",
197 { .dbl = 0.0 }, 0, UINT_MAX,
FLAGS },
198 {
"num_ticks_per_picture",
"Set display ticks per picture for CFR streams",
200 { .i64 = -1 }, -1, INT_MAX, FLAGS },
202 {
"delete_padding",
"Delete all Padding OBUs",
204 { .i64 = 0 }, 0, 1, FLAGS},
221 .
name =
"av1_metadata",
223 .priv_class = &av1_metadata_class,
int nb_units
Number of units in this fragment.
#define AV_LOG_WARNING
Something somehow does not look correct.
#define LIBAVUTIL_VERSION_INT
static av_cold int init(AVCodecContext *avctx)
CodedBitstreamUnitType type
Codec-specific type of this unit.
The bitstream filter state.
const char * av_default_item_name(void *ptr)
Return the context name.
int chroma_sample_position
uint32_t num_units_in_display_tick
void * priv_data
Opaque filter-specific private data.
order of coefficients is actually GBR, also IEC 61966-2-1 (sRGB)
int ff_cbs_bsf_generic_init(AVBSFContext *bsf, const CBSBSFType *type)
Initialise generic CBS BSF setup.
#define BSF_ELEMENT_OPTIONS_PIR(name, help, field, opt_flags)
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
uint8_t matrix_coefficients
int av_reduce(int *dst_num, int *dst_den, int64_t num, int64_t den, int64_t max)
Reduce a fraction.
void * content
Pointer to the decomposed form of this unit.
CodedBitstreamUnit * units
Pointer to an array of units of length nb_units_allocated.
AVCodecID
Identify the syntax and semantics of the bitstream.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
filter_frame For filters that do not use the this method is called when a frame is pushed to the filter s input It can be called at any time except in a reentrant way If the input frame is enough to produce then the filter should push the output frames on the output link immediately As an exception to the previous rule if the input frame is enough to produce several output frames then the filter needs output only at least one per link The additional frames can be left buffered in the filter
also ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP177 Annex B
void ff_cbs_bsf_generic_close(AVBSFContext *bsf)
Close a generic CBS BSF instance.
int ff_cbs_bsf_generic_filter(AVBSFContext *bsf, AVPacket *pkt)
Filter operation for CBS BSF.
Coded bitstream fragment structure, combining one or more units.
Describe the class of an AVClass context structure.
Rational number (pair of numerator and denominator).
void ff_cbs_delete_unit(CodedBitstreamFragment *frag, int position)
Delete a unit from a fragment and free all memory it uses.
int ff_cbs_insert_unit_content(CodedBitstreamFragment *frag, int position, CodedBitstreamUnitType type, void *content, AVBufferRef *content_buf)
Insert a new unit into a fragment with the given content.
uint8_t color_description_present_flag
uint32_t num_ticks_per_picture_minus_1
AV1RawSequenceHeader sequence_header
uint8_t equal_picture_interval
IEC 61966-2-1 (sRGB or sYCC)
common internal and external API header
static enum AVCodecID codec_ids[]
uint8_t chroma_sample_position
int num_ticks_per_picture
int transfer_characteristics
This structure stores compressed data.
uint8_t transfer_characteristics