Go to the documentation of this file.
56 int split = !!
s->buffer_pkt->data;
58 if (!
s->buffer_pkt->data) {
71 for (
i = 0;
i <
td->nb_units;
i++) {
84 s->cur_frame_idx =
s->last_frame_idx = 0;
85 s->nb_frames = nb_frames;
92 int cur_frame_type = -1,
size = 0;
94 for (
i =
s->cur_frame_idx; i < td->nb_units;
i++) {
103 "previous frame was expected.\n");
109 s->last_frame_idx =
s->cur_frame_idx;
110 s->cur_frame_idx =
i + 1;
115 if (
s->cur_frame <
s->nb_frames)
122 "previous frame was expected.\n");
128 s->last_frame_idx =
s->cur_frame_idx;
133 if (
frame->show_existing_frame &&
134 s->cur_frame <
s->nb_frames) {
135 s->cur_frame_idx =
i + 1;
150 s->cur_frame <
s->nb_frames) {
151 s->cur_frame_idx =
i + 1;
162 out->data = (uint8_t *)
td->units[
s->last_frame_idx].data;
167 s->buffer_pkt->data +=
size;
168 s->buffer_pkt->size -=
size;
173 if (
s->cur_frame ==
s->nb_frames) {
220 if (!
ctx->par_in->extradata_size)
254 .
p.
name =
"av1_frame_split",
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
#define AV_LOG_WARNING
Something somehow does not look correct.
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
av_cold void ff_cbs_fragment_free(CodedBitstreamFragment *frag)
Free the units array of a fragment in addition to what ff_cbs_fragment_reset does.
static void av1_frame_split_close(AVBSFContext *ctx)
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...
void * content
Pointer to the decomposed 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...
Context structure for coded bitstream operations.
#define AV_LOG_VERBOSE
Detailed information.
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
void av_packet_free(AVPacket **pkt)
Free the packet, if the packet is reference counted, it will be unreferenced first.
The bitstream filter state.
Coded bitstream unit structure.
av_cold void ff_cbs_close(CodedBitstreamContext **ctx_ptr)
Close a context and free all internal state.
static enum AVCodecID av1_frame_split_codec_ids[]
#define FF_ARRAY_ELEMS(a)
Coded bitstream fragment structure, combining one or more units.
int(* init)(AVBSFContext *ctx)
#define av_assert0(cond)
assert() equivalent, that is always enabled.
size_t data_size
The number of bytes in the bitstream (including any padding bits in the final byte).
int av_packet_ref(AVPacket *dst, const AVPacket *src)
Setup a new reference to the data described by a given packet.
void av_packet_move_ref(AVPacket *dst, AVPacket *src)
Move every field in src to dst and reset src.
static const CodedBitstreamUnitType decompose_unit_types[]
CodedBitstreamContext * cbc
AVCodecID
Identify the syntax and semantics of the bitstream.
static void av1_frame_split_flush(AVBSFContext *ctx)
AVBitStreamFilter p
The public AVBitStreamFilter.
const FFBitStreamFilter ff_av1_frame_split_bsf
#define AV_NOPTS_VALUE
Undefined timestamp value.
@ AV1_OBU_SEQUENCE_HEADER
static char * split(char *message, char delim)
AVPacket * av_packet_alloc(void)
Allocate an AVPacket and set its fields to default values.
AV1RawFrameHeader frame_header
static int av1_frame_split_filter(AVBSFContext *ctx, AVPacket *out)
#define i(width, name, range_min, range_max)
AV1RawTileGroup tile_group
static int av1_frame_split_init(AVBSFContext *ctx)
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(* flush)(AVBSFContext *ctx)
av_cold int ff_cbs_init(CodedBitstreamContext **ctx_ptr, enum AVCodecID codec_id, void *log_ctx)
Create and initialise a new context for the given codec.
This structure stores compressed data.
CodedBitstreamFragment temporal_unit
int ff_bsf_get_packet_ref(AVBSFContext *ctx, AVPacket *pkt)
Called by bitstream filters to get packet for filtering.
void * priv_data
Format private data.