56 int split = !!
s->buffer_pkt->data;
58 if (!
s->buffer_pkt->data) {
65 ret = ff_cbs_read_packet(
s->cbc, td,
s->buffer_pkt);
84 s->cur_frame_idx =
s->last_frame_idx = 0;
85 s->nb_frames = nb_frames;
92 int cur_frame_type = -1,
size = 0;
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;
170 if (!
frame->show_existing_frame && !
frame->show_frame)
173 if (
s->cur_frame ==
s->nb_frames) {
175 ff_cbs_fragment_reset(td);
190 ff_cbs_fragment_reset(td);
220 if (!
ctx->par_in->extradata_size)
223 ret = ff_cbs_read_extradata(
s->cbc, td,
ctx->par_in);
227 ff_cbs_fragment_reset(td);
237 ff_cbs_fragment_reset(&
s->temporal_unit);
245 ff_cbs_fragment_free(&
s->temporal_unit);
246 ff_cbs_close(&
s->cbc);
254 .p.name =
"av1_frame_split",
static char * split(char *message, char delim)
static AVFormatContext * ctx
static const CodedBitstreamUnitType decompose_unit_types[]
static av_cold void close(AVCodecParserContext *s)
static void av1_frame_split_close(AVBSFContext *ctx)
static enum AVCodecID av1_frame_split_codec_ids[]
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)
simple assert() macros that are a bit more flexible than ISO C assert().
#define av_assert0(cond)
assert() equivalent, that is always enabled.
const FFBitStreamFilter ff_av1_frame_split_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.
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
uint32_t CodedBitstreamUnitType
The codec-specific type of a bitstream unit.
#define FF_ARRAY_ELEMS(a)
CodedBitstreamFragment temporal_unit
CodedBitstreamContext * cbc
AV1RawFrameHeader frame_header
AV1RawTileGroup tile_group
union AV1RawOBU::@016362317061177152367125047142162076164261250366 obu
The bitstream filter state.
This structure stores compressed data.
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.
Coded bitstream unit structure.
void * content
Pointer to the decomposed form of this unit.
uint8_t * data
Pointer to the directly-parsable bitstream 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).
void(* filter)(uint8_t *src, ptrdiff_t stride, int qscale)