Go to the documentation of this file.
55 if (
ctx->color_primaries >= 0 ||
56 ctx->transfer_characteristics >= 0 ||
57 ctx->matrix_coefficients >= 0) {
60 if (
ctx->color_primaries >= 0)
62 if (
ctx->transfer_characteristics >= 0)
64 if (
ctx->matrix_coefficients >= 0)
68 if (
ctx->color_range >= 0) {
73 "on RGB streams encoded in BT.709 sRGB.\n");
79 if (
ctx->chroma_sample_position >= 0) {
82 "can only be set for 4:2:0 streams.\n");
88 if (
ctx->tick_rate.num &&
ctx->tick_rate.den) {
92 UINT32_MAX > INT_MAX ? UINT32_MAX : INT_MAX);
98 if (
ctx->num_ticks_per_picture > 0) {
101 ctx->num_ticks_per_picture - 1;
136 if (
ctx->delete_padding) {
148 .fragment_name =
"temporal unit",
164 #define OFFSET(x) offsetof(AV1MetadataContext, x)
165 #define FLAGS (AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_BSF_PARAM)
170 {
"color_primaries",
"Set color primaries (section 6.4.2)",
172 { .i64 = -1 }, -1, 255,
FLAGS },
173 {
"transfer_characteristics",
"Set transfer characteristics (section 6.4.2)",
175 { .i64 = -1 }, -1, 255,
FLAGS },
176 {
"matrix_coefficients",
"Set matrix coefficients (section 6.4.2)",
178 { .i64 = -1 }, -1, 255,
FLAGS },
180 {
"color_range",
"Set color range flag (section 6.4.2)",
182 { .i64 = -1 }, -1, 1,
FLAGS, .unit =
"cr" },
184 { .i64 = 0 }, .flags =
FLAGS, .unit =
"cr" },
186 { .i64 = 1 }, .flags =
FLAGS, .unit =
"cr" },
188 {
"chroma_sample_position",
"Set chroma sample position (section 6.4.2)",
190 { .i64 = -1 }, -1, 3,
FLAGS, .unit =
"csp" },
198 {
"tick_rate",
"Set display tick rate (time_scale / num_units_in_display_tick)",
200 { .dbl = 0.0 }, 0, UINT_MAX,
FLAGS },
201 {
"num_ticks_per_picture",
"Set display ticks per picture for CFR streams",
203 { .i64 = -1 }, -1, INT_MAX,
FLAGS },
205 {
"delete_padding",
"Delete all Padding OBUs",
207 { .i64 = 0 }, 0, 1,
FLAGS},
224 .
p.
name =
"av1_metadata",
uint32_t num_units_in_display_tick
#define AV_LOG_WARNING
Something somehow does not look correct.
int ff_cbs_bsf_generic_init(AVBSFContext *bsf, const CBSBSFType *type)
Initialise generic CBS BSF setup.
void * content
Pointer to the decomposed form of this unit.
int ff_cbs_insert_unit_content(CodedBitstreamFragment *frag, int position, CodedBitstreamUnitType type, void *content, void *content_ref)
Insert a new unit into a fragment with the given content.
@ AVCOL_SPC_RGB
order of coefficients is actually GBR, also IEC 61966-2-1 (sRGB), YZX and ST 428-1
CodedBitstreamUnitType type
Codec-specific type of this unit.
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
@ AV1_OBU_TEMPORAL_DELIMITER
The bitstream filter state.
@ AVCOL_TRC_IEC61966_2_1
IEC 61966-2-1 (sRGB or sYCC)
int av_reduce(int *dst_num, int *dst_den, int64_t num, int64_t den, int64_t max)
Reduce a fraction.
CodedBitstreamUnit * units
Pointer to an array of units of length nb_units_allocated.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Coded bitstream fragment structure, combining one or more units.
uint8_t transfer_characteristics
#define LIBAVUTIL_VERSION_INT
Describe the class of an AVClass context structure.
Rational number (pair of numerator and denominator).
@ AVCOL_PRI_BT709
also ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP 177 Annex B
const char * av_default_item_name(void *ptr)
Return the context name.
uint8_t chroma_sample_position
int transfer_characteristics
AVCodecID
Identify the syntax and semantics of the bitstream.
static const AVColorPrimariesDesc color_primaries[AVCOL_PRI_NB]
AVBitStreamFilter p
The public AVBitStreamFilter.
int chroma_sample_position
int(* init)(AVBSFContext *ctx)
uint32_t num_ticks_per_picture_minus_1
AV1RawSequenceHeader sequence_header
void ff_cbs_bsf_generic_close(AVBSFContext *bsf)
Close a generic CBS BSF instance.
static const struct TransferCharacteristics transfer_characteristics[AVCOL_TRC_NB]
@ AV1_OBU_SEQUENCE_HEADER
uint8_t color_description_present_flag
#define i(width, name, range_min, range_max)
uint8_t equal_picture_interval
void * priv_data
Opaque filter-specific private data.
int ff_cbs_bsf_generic_filter(AVBSFContext *bsf, AVPacket *pkt)
Filter operation for CBS BSF.
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
#define BSF_ELEMENT_OPTIONS_PIR(name, help, field, opt_flags)
uint8_t matrix_coefficients
This structure stores compressed data.
int num_ticks_per_picture
int nb_units
Number of units in this fragment.
void ff_cbs_delete_unit(CodedBitstreamFragment *frag, int position)
Delete a unit from a fragment and free all memory it uses.