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",
static av_cold void close(AVCodecParserContext *s)
static int av1_frame_merge_filter(AVBSFContext *bsf, AVPacket *out)
static void av1_frame_merge_close(AVBSFContext *bsf)
static int av1_frame_merge_init(AVBSFContext *bsf)
static void av1_frame_merge_flush(AVBSFContext *bsf)
static enum AVCodecID av1_frame_merge_codec_ids[]
const FFBitStreamFilter ff_av1_frame_merge_bsf
int ff_bsf_get_packet_ref(AVBSFContext *ctx, AVPacket *pkt)
Called by bitstream filters to get packet for filtering.
#define i(width, name, range_min, range_max)
void(* flush)(AVBSFContext *ctx)
int(* init)(AVBSFContext *ctx)
AVCodecID
Identify the syntax and semantics of the bitstream.
void av_packet_free(AVPacket **pkt)
Free the packet, if the packet is reference counted, it will be unreferenced first.
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
void av_packet_move_ref(AVPacket *dst, AVPacket *src)
Move every field in src to dst and reset src.
AVPacket * av_packet_alloc(void)
Allocate an AVPacket and set its fields to default values.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define AVERROR_EOF
End of file.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define AV_NOPTS_VALUE
Undefined timestamp value.
@ AV1_OBU_TEMPORAL_DELIMITER
CodedBitstreamContext * input
CodedBitstreamFragment frag[2]
CodedBitstreamContext * output
The bitstream filter state.
void * priv_data
Opaque filter-specific private data.
This structure stores compressed data.
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
Context structure for coded bitstream operations.
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.
void * content
Pointer to the decomposed form of this unit.
void * content_ref
If content is reference counted, a RefStruct reference backing content.
CodedBitstreamUnitType type
Codec-specific type of this unit.
void(* filter)(uint8_t *src, ptrdiff_t stride, int qscale)
static AVFormatContext * ctx