75 for (i = 1; i < frag->
nb_units; i++) {
95 for (i = 0; i < frag->
nb_units; i++) {
114 if (err < 0 && err !=
AVERROR(EAGAIN))
126 if (!ctx->
in || !ctx->
pkt)
148 .
name =
"av1_frame_merge",
static int av1_frame_merge_filter(AVBSFContext *bsf, AVPacket *out)
int nb_units
Number of units in this fragment.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
static void flush(AVCodecContext *avctx)
static void av1_frame_merge_close(AVBSFContext *bsf)
int ff_cbs_write_packet(CodedBitstreamContext *ctx, AVPacket *pkt, CodedBitstreamFragment *frag)
Write the bitstream of a fragment to a packet.
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.
int ff_cbs_insert_unit_content(CodedBitstreamContext *ctx, CodedBitstreamFragment *frag, int position, CodedBitstreamUnitType type, void *content, AVBufferRef *content_buf)
Insert a new unit into a fragment with the given content.
void * priv_data
Opaque filter-specific private data.
static void filter(int16_t *output, ptrdiff_t out_stride, int16_t *low, ptrdiff_t low_stride, int16_t *high, ptrdiff_t high_stride, int len, int clip)
void av_packet_free(AVPacket **pkt)
Free the packet, if the packet is reference counted, it will be unreferenced first.
static enum AVCodecID av1_frame_merge_codec_ids[]
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 AVERROR_EOF
End of file.
void * content
Pointer to the decomposed form of this unit.
CodedBitstreamUnit * units
Pointer to an array of units of length nb_units_allocated.
void ff_cbs_fragment_free(CodedBitstreamContext *ctx, CodedBitstreamFragment *frag)
Free the units array of a fragment in addition to what ff_cbs_fragment_reset does.
#define i(width, name, range_min, range_max)
AVCodecID
Identify the syntax and semantics of the bitstream.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static void av1_frame_merge_flush(AVBSFContext *bsf)
CodedBitstreamContext * cbc
const AVBitStreamFilter ff_av1_frame_merge_bsf
Coded bitstream fragment structure, combining one or more units.
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
void ff_cbs_fragment_reset(CodedBitstreamContext *ctx, 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.
AVBufferRef * content_ref
If content is reference counted, a reference to the buffer containing content.
void ff_cbs_close(CodedBitstreamContext **ctx_ptr)
Close a context and free all internal state.
static int av1_frame_merge_init(AVBSFContext *bsf)
static enum AVCodecID codec_ids[]
CodedBitstreamFragment frag[2]
AVPacket * av_packet_alloc(void)
Allocate an AVPacket and set its fields to default values.
This structure stores compressed data.
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.