62 memset(ai, 0,
sizeof(*ai));
65 if (
ctx->overscan_appropriate_flag >= 0) {
70 if (
ctx->video_format >= 0) {
76 if (
ctx->video_full_range_flag >= 0) {
81 if (
ctx->colour_primaries >= 0) {
86 if (
ctx->transfer_characteristics >= 0) {
91 if (
ctx->matrix_coefficients >= 0) {
97 if (
ctx->chroma_sample_loc_type >= 0) {
118 if (
ctx->overscan_appropriate_flag >= 0 ||
ctx->video_format >= 0 ||
119 ctx->video_full_range_flag >= 0 ||
ctx->colour_primaries >= 0 ||
120 ctx->transfer_characteristics >= 0 ||
ctx->matrix_coefficients >= 0 ||
121 ctx->chroma_sample_loc_type >= 0) {
127 if (
ctx->delete_filler) {
142 .fragment_name =
"access unit",
143 .unit_name =
"NAL unit",
152#define OFFSET(x) offsetof(LCEVCMetadataContext, x)
153#define FLAGS (AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_BSF_PARAM)
155 {
"overscan_appropriate_flag",
"Set VUI overscan appropriate flag",
157 { .i64 = -1 }, -1, 1,
FLAGS },
159 {
"video_format",
"Set video format (table E-2)",
161 { .i64 = -1 }, -1, 5,
FLAGS},
162 {
"video_full_range_flag",
"Set video full range flag",
164 { .i64 = -1 }, -1, 1,
FLAGS },
165 {
"colour_primaries",
"Set colour primaries (table E-3)",
167 { .i64 = -1 }, -1, 255,
FLAGS },
168 {
"transfer_characteristics",
"Set transfer characteristics (table E-4)",
170 { .i64 = -1 }, -1, 255,
FLAGS },
171 {
"matrix_coefficients",
"Set matrix coefficients (table E-5)",
173 { .i64 = -1 }, -1, 255,
FLAGS },
175 {
"chroma_sample_loc_type",
"Set chroma sample location type (figure E-1)",
177 { .i64 = -1 }, -1, 5,
FLAGS },
179 {
"delete_filler",
"Delete all filler",
186 .class_name =
"lcevc_metadata_bsf",
197 .p.name =
"lcevc_metadata",
static AVFormatContext * ctx
static av_cold void close(AVCodecParserContext *s)
const FFBitStreamFilter ff_lcevc_metadata_bsf
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)
int ff_cbs_lcevc_add_process_block(CodedBitstreamContext *ctx, CodedBitstreamFragment *au, int position, uint32_t payload_type, void *payload_data, void *payload_ref)
Add a process block to an access unit.
void ff_cbs_lcevc_delete_process_block_type(CodedBitstreamContext *ctx, CodedBitstreamFragment *au, uint32_t payload_type)
Delete all blocks with the given payload type from an access unit.
int ff_cbs_lcevc_find_process_block(CodedBitstreamContext *ctx, CodedBitstreamFragment *au, uint32_t payload_type, LCEVCRawProcessBlock **iter)
Iterate over blocks with the given payload type in an access unit.
common internal and external API header
int(* init)(AVBSFContext *ctx)
@ AV_OPT_TYPE_INT
Underlying C type is int.
@ AV_OPT_TYPE_BOOL
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
LCEVC common definitions.
@ LCEVC_PAYLOAD_TYPE_FILLER
@ LCEVC_PAYLOAD_TYPE_ADDITIONAL_INFO
@ LCEVC_PAYLOAD_TYPE_GLOBAL_CONFIG
@ LCEVC_ADDITIONAL_INFO_TYPE_VUI
static const struct TransferCharacteristics transfer_characteristics[]
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.
CodedBitstreamUnitType type
Codec-specific type of this unit.
int transfer_characteristics
int overscan_appropriate_flag
int video_full_range_flag
int chroma_sample_loc_type
LCEVCRawAdditionalInfo ai
uint8_t additional_info_type
uint8_t overscan_appropriate_flag
uint8_t matrix_coefficients
uint8_t video_full_range_flag
uint8_t overscan_info_present_flag
uint8_t chroma_sample_loc_type_bottom_field
uint8_t transfer_characteristics
uint8_t colour_description_present_flag
uint8_t chroma_loc_info_present_flag
uint8_t chroma_sample_loc_type_top_field
uint8_t video_signal_type_present_flag
void(* filter)(uint8_t *src, ptrdiff_t stride, int qscale)