63 memset(ai, 0,
sizeof(*ai));
66 if (
ctx->overscan_appropriate_flag >= 0) {
71 if (
ctx->video_format >= 0) {
77 if (
ctx->video_full_range_flag >= 0) {
82 if (
ctx->colour_primaries >= 0) {
87 if (
ctx->transfer_characteristics >= 0) {
92 if (
ctx->matrix_coefficients >= 0) {
98 if (
ctx->chroma_sample_loc_type >= 0) {
119 if (
ctx->overscan_appropriate_flag >= 0 ||
ctx->video_format >= 0 ||
120 ctx->video_full_range_flag >= 0 ||
ctx->colour_primaries >= 0 ||
121 ctx->transfer_characteristics >= 0 ||
ctx->matrix_coefficients >= 0 ||
122 ctx->chroma_sample_loc_type >= 0) {
128 if (
ctx->delete_filler) {
143 .fragment_name =
"access unit",
144 .unit_name =
"NAL unit",
153#define OFFSET(x) offsetof(LCEVCMetadataContext, x)
154#define FLAGS (AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_BSF_PARAM)
156 {
"overscan_appropriate_flag",
"Set VUI overscan appropriate flag",
158 { .i64 = -1 }, -1, 1,
FLAGS },
160 {
"video_format",
"Set video format (table E-2)",
162 { .i64 = -1 }, -1, 5,
FLAGS},
163 {
"video_full_range_flag",
"Set video full range flag",
165 { .i64 = -1 }, -1, 1,
FLAGS },
166 {
"colour_primaries",
"Set colour primaries (table E-3)",
168 { .i64 = -1 }, -1, 255,
FLAGS },
169 {
"transfer_characteristics",
"Set transfer characteristics (table E-4)",
171 { .i64 = -1 }, -1, 255,
FLAGS },
172 {
"matrix_coefficients",
"Set matrix coefficients (table E-5)",
174 { .i64 = -1 }, -1, 255,
FLAGS },
176 {
"chroma_sample_loc_type",
"Set chroma sample location type (figure E-1)",
178 { .i64 = -1 }, -1, 5,
FLAGS },
180 {
"delete_filler",
"Delete all filler",
187 .class_name =
"lcevc_metadata_bsf",
198 .p.name =
"lcevc_metadata",
static AVFormatContext * ctx
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, CodedBitstreamUnit *unit, int position, uint32_t payload_type, void *payload_data, void *payload_ref)
Add a process block to a NAL unit of type IDR or NON_IDR, at the given position of its block list or ...
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, CodedBitstreamUnit **block_unit, 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
av_cold void CBS_FUNC close(CodedBitstreamContext **ctx_ptr)
Close a context and free all internal state.
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.
Coded bitstream unit structure.
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)