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;
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 .
name =
"av1_frame_split",
static enum AVCodecID codec_ids[]
static void flush(AVCodecContext *avctx)
static char * split(char *message, char delim)
static void av1_frame_split_close(AVBSFContext *ctx)
static enum AVCodecID av1_frame_split_codec_ids[]
static const CodedBitstreamUnitType decompose_unit_types[]
static int av1_frame_split_init(AVBSFContext *ctx)
static int av1_frame_split_filter(AVBSFContext *ctx, AVPacket *out)
static void av1_frame_split_flush(AVBSFContext *ctx)
const AVBitStreamFilter ff_av1_frame_split_bsf
simple assert() macros that are a bit more flexible than ISO C assert().
#define av_assert0(cond)
assert() equivalent, that is always enabled.
static av_cold int init(AVCodecContext *avctx)
int ff_bsf_get_packet_ref(AVBSFContext *ctx, AVPacket *pkt)
Called by bitstream filters to get packet for filtering.
void ff_cbs_close(CodedBitstreamContext **ctx_ptr)
Close a context and free all internal state.
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 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.
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...
int ff_cbs_init(CodedBitstreamContext **ctx_ptr, enum AVCodecID codec_id, void *log_ctx)
Create and initialise a new context for the given codec.
void ff_cbs_fragment_free(CodedBitstreamFragment *frag)
Free the units array of a fragment in addition to what ff_cbs_fragment_reset does.
uint32_t CodedBitstreamUnitType
The codec-specific type of a bitstream unit.
static av_always_inline void filter(int16_t *output, ptrdiff_t out_stride, const int16_t *low, ptrdiff_t low_stride, const int16_t *high, ptrdiff_t high_stride, int len, int clip)
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.
int av_packet_ref(AVPacket *dst, const AVPacket *src)
Setup a new reference to the data described by a given packet.
#define AV_LOG_WARNING
Something somehow does not look correct.
#define AV_LOG_VERBOSE
Detailed information.
#define AV_NOPTS_VALUE
Undefined timestamp value.
@ AV1_OBU_TEMPORAL_DELIMITER
@ AV1_OBU_SEQUENCE_HEADER
#define FF_ARRAY_ELEMS(a)
CodedBitstreamFragment temporal_unit
CodedBitstreamContext * cbc
AV1RawFrameHeader frame_header
AV1RawTileGroup tile_group
The bitstream filter state.
void * priv_data
Format private data.
This structure stores compressed data.
Context structure for coded bitstream operations.
Coded bitstream fragment structure, combining one or more units.
Coded bitstream unit structure.
void * content
Pointer to the decomposed form of this unit.
CodedBitstreamUnitType type
Codec-specific type of this unit.
size_t data_size
The number of bytes in the bitstream (including any padding bits in the final byte).