92 int cur_frame_type = -1,
size = 0;
103 "previous frame was expected.\n");
122 "previous frame was expected.\n");
254 .
name =
"av1_frame_split",
int nb_units
Number of units in this fragment.
static void flush(AVCodecContext *avctx)
#define AV_LOG_WARNING
Something somehow does not look correct.
static av_cold int init(AVCodecContext *avctx)
int ff_cbs_init(CodedBitstreamContext **ctx_ptr, enum AVCodecID codec_id, void *log_ctx)
Create and initialise a new context for the given codec.
CodedBitstreamUnitType type
Codec-specific type of this unit.
The bitstream filter state.
static void av1_frame_split_flush(AVBSFContext *ctx)
void * priv_data
Opaque filter-specific private data.
#define av_assert0(cond)
assert() equivalent, that is always enabled.
void av_packet_free(AVPacket **pkt)
Free the packet, if the packet is reference counted, it will be unreferenced first.
uint32_t CodedBitstreamUnitType
The codec-specific type of a bitstream unit.
int ff_cbs_read_packet(CodedBitstreamContext *ctx, CodedBitstreamFragment *frag, const AVPacket *pkt)
Read the data bitstream from a packet into a fragment, then split into units and decompose.
void av_packet_move_ref(AVPacket *dst, AVPacket *src)
Move every field in src to dst and reset src.
#define AV_LOG_VERBOSE
Detailed information.
Coded bitstream unit structure.
void * content
Pointer to the decomposed form of this unit.
CodedBitstreamUnit * units
Pointer to an array of units of length nb_units_allocated.
uint8_t * data
Pointer to the directly-parsable bitstream form of this unit.
void ff_cbs_fragment_reset(CodedBitstreamFragment *frag)
Free the units contained in a fragment as well as the fragment's own data buffer, but not the units a...
int av_packet_ref(AVPacket *dst, const AVPacket *src)
Setup a new reference to the data described by a given packet.
static const CodedBitstreamUnitType decompose_unit_types[]
AVCodecID
Identify the syntax and semantics of the bitstream.
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
simple assert() macros that are a bit more flexible than ISO C assert().
int extradata_size
Size of the extradata content in bytes.
static char * split(char *message, char delim)
CodedBitstreamContext * cbc
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
#define FF_ARRAY_ELEMS(a)
static enum AVCodecID av1_frame_split_codec_ids[]
static int av1_frame_split_init(AVBSFContext *ctx)
int nb_decompose_unit_types
Length of the decompose_unit_types array.
Coded bitstream fragment structure, combining one or more units.
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
static void av1_frame_split_close(AVBSFContext *ctx)
Context structure for coded bitstream operations.
void ff_cbs_close(CodedBitstreamContext **ctx_ptr)
Close a context and free all internal state.
const CodedBitstreamUnitType * decompose_unit_types
Array of unit types which should be decomposed when reading.
int ff_cbs_read_extradata(CodedBitstreamContext *ctx, CodedBitstreamFragment *frag, const AVCodecParameters *par)
Read the extradata bitstream found in codec parameters into a fragment, then split into units and dec...
const AVBitStreamFilter ff_av1_frame_split_bsf
static enum AVCodecID codec_ids[]
CodedBitstreamFragment temporal_unit
AVPacket * av_packet_alloc(void)
Allocate an AVPacket and set its fields to default values.
void ff_cbs_fragment_free(CodedBitstreamFragment *frag)
Free the units array of a fragment in addition to what ff_cbs_fragment_reset does.
AV1RawTileGroup tile_group
AV1RawFrameHeader frame_header
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later.That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another.Frame references ownership and permissions
static int av1_frame_split_filter(AVBSFContext *ctx, AVPacket *out)
This structure stores compressed data.
AVCodecParameters * par_in
Parameters of the input stream.
int ff_bsf_get_packet_ref(AVBSFContext *ctx, AVPacket *pkt)
Called by bitstream filters to get packet for filtering.
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
#define AV_NOPTS_VALUE
Undefined timestamp value.
size_t data_size
The number of bytes in the bitstream (including any padding bits in the final byte).