45 if (
ctx->color_primaries >= 0 ||
46 ctx->transfer_characteristics >= 0 ||
47 ctx->matrix_coefficients >= 0 ||
48 ctx->full_range_flag >= 0) {
51 if (
ctx->color_primaries >= 0)
53 if (
ctx->transfer_characteristics >= 0)
55 if (
ctx->matrix_coefficients >= 0)
57 if (
ctx->full_range_flag >= 0)
80 if (
ctx->delete_filler) {
92 ff_cbs_delete_unit(frag,
i);
101 frame->filler.filler_size = 0;
102 for (
int t = 0; t < priv->
num_tiles; t++)
103 frame->tile[t].tile_dummy_byte_size = 0;
111 au_info->filler.filler_size = 0;
118 md->filler.filler_size = 0;
119 for (
int j = 0; j <
md->metadata_count; j++) {
125 md->payloads[k] =
md->payloads[j];
134 ff_cbs_delete_unit(frag,
i);
136 md->metadata_count = k;
151 .fragment_name =
"access unit",
161#define OFFSET(x) offsetof(APVMetadataContext, x)
162#define FLAGS (AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_BSF_PARAM)
164 {
"color_primaries",
"Set color primaries (section 5.3.5)",
166 { .i64 = -1 }, -1, 255,
FLAGS },
167 {
"transfer_characteristics",
"Set transfer characteristics (section 5.3.5)",
169 { .i64 = -1 }, -1, 255,
FLAGS },
170 {
"matrix_coefficients",
"Set matrix coefficients (section 5.3.5)",
172 { .i64 = -1 }, -1, 255,
FLAGS },
174 {
"full_range_flag",
"Set full range flag flag (section 5.3.5)",
176 { .i64 = -1 }, -1, 1,
FLAGS, .unit =
"cr" },
178 { .i64 = 0 }, .flags =
FLAGS, .unit =
"cr" },
180 { .i64 = 1 }, .flags =
FLAGS, .unit =
"cr" },
182 {
"delete_filler",
"Delete all filler in the stream",
189 .class_name =
"apv_metadata_bsf",
200 .p.name =
"apv_metadata",
static AVFormatContext * ctx
static av_cold void close(AVCodecParserContext *s)
const FFBitStreamFilter ff_apv_metadata_bsf
static int FUNC au_info(CodedBitstreamContext *ctx, RWContext *rw, APVRawAUInfo *current)
int ff_cbs_bsf_generic_filter(AVBSFContext *bsf, AVPacket *pkt)
Filter operation for CBS BSF.
av_cold void ff_cbs_bsf_generic_close(AVBSFContext *bsf)
Close a generic CBS BSF instance.
av_cold int ff_cbs_bsf_generic_init(AVBSFContext *bsf, const CBSBSFType *type)
Initialise generic CBS BSF setup.
#define i(width, name, range_min, range_max)
common internal and external API header
static const AVColorPrimariesDesc color_primaries[AVCOL_PRI_NB]
int(* init)(AVBSFContext *ctx)
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.
@ AV_OPT_TYPE_INT
Underlying C type is int.
AVCodecID
Identify the syntax and semantics of the bitstream.
const char * av_default_item_name(void *ptr)
Return the context name.
#define LIBAVUTIL_VERSION_INT
@ APV_PBU_NON_PRIMARY_FRAME
@ APV_PBU_ACCESS_UNIT_INFORMATION
static const struct TransferCharacteristics transfer_characteristics[]
int transfer_characteristics
APVRawFrameHeader frame_header
The bitstream filter state.
void * priv_data
Opaque filter-specific private data.
Describe the class of an AVClass context structure.
This structure stores compressed data.
Coded bitstream fragment structure, combining one or more units.
CodedBitstreamUnit * units
Pointer to an array of units of length nb_units_allocated.
int nb_units
Number of units in this fragment.
void * content
Pointer to the decomposed form of this unit.
CodedBitstreamUnitType type
Codec-specific type of this unit.
void(* filter)(uint8_t *src, ptrdiff_t stride, int qscale)