Go to the documentation of this file.
38 ff_cbs_fragment_reset(&
ctx->frag[0]);
39 ff_cbs_fragment_reset(&
ctx->frag[1]);
58 err = ff_cbs_read_packet(
ctx->input, frag, in);
86 err = ff_cbs_write_packet(
ctx->output, buffer_pkt, tu);
97 err = ff_cbs_insert_unit_content(tu, -1, frag->
units[
i].
type,
110 if (!buffer_pkt->data ||
117 ff_cbs_fragment_reset(&
ctx->frag[
ctx->idx]);
120 if (err < 0 && err !=
AVERROR(EAGAIN))
133 if (!
ctx->in || !
ctx->pkt)
147 ff_cbs_fragment_free(&
ctx->frag[0]);
148 ff_cbs_fragment_free(&
ctx->frag[1]);
151 ff_cbs_close(&
ctx->input);
152 ff_cbs_close(&
ctx->output);
160 .
p.
name =
"av1_frame_merge",
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
void * content_ref
If content is reference counted, a RefStruct reference backing content.
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_merge_filter(AVBSFContext *bsf, AVPacket *out)
#define AVERROR_EOF
End of file.
void * content
Pointer to the decomposed form of this unit.
Context structure for coded bitstream operations.
const FFBitStreamFilter ff_av1_frame_merge_bsf
void(* filter)(uint8_t *src, int stride, int qscale)
CodedBitstreamUnitType type
Codec-specific type of this unit.
@ 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.
static void av1_frame_merge_flush(AVBSFContext *bsf)
static void av1_frame_merge_close(AVBSFContext *bsf)
CodedBitstreamUnit * units
Pointer to an array of units of length nb_units_allocated.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Coded bitstream fragment structure, combining one or more units.
void(* flush)(AVBSFContext *ctx)
CodedBitstreamContext * input
void av_packet_move_ref(AVPacket *dst, AVPacket *src)
Move every field in src to dst and reset src.
av_cold void CBS_FUNC() close(CodedBitstreamContext **ctx_ptr)
Close a context and free all internal state.
AVCodecID
Identify the syntax and semantics of the bitstream.
static enum AVCodecID av1_frame_merge_codec_ids[]
AVBitStreamFilter p
The public AVBitStreamFilter.
int(* init)(AVBSFContext *ctx)
#define AV_NOPTS_VALUE
Undefined timestamp value.
AVPacket * av_packet_alloc(void)
Allocate an AVPacket and set its fields to default values.
CodedBitstreamFragment frag[2]
#define i(width, name, range_min, range_max)
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
void * priv_data
Opaque filter-specific private data.
This structure stores compressed data.
int ff_bsf_get_packet_ref(AVBSFContext *ctx, AVPacket *pkt)
Called by bitstream filters to get packet for filtering.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
CodedBitstreamContext * output
static int av1_frame_merge_init(AVBSFContext *bsf)
int nb_units
Number of units in this fragment.