92 int cur_frame_type = -1,
size = 0;
103 "previous frame was expected.\n");
122 "previous frame was expected.\n");
254 .
name =
"av1_frame_split",
int nb_units
Number of units in this fragment.
static void flush(AVCodecContext *avctx)
#define AV_LOG_WARNING
Something somehow does not look correct.
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.
static void av1_frame_split_flush(AVBSFContext *ctx)
void * priv_data
Opaque filter-specific private data.
#define av_assert0(cond)
assert() equivalent, that is always enabled.
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.
uint32_t CodedBitstreamUnitType
The codec-specific type of a bitstream unit.
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 AV_LOG_VERBOSE
Detailed information.
Coded bitstream unit structure.
void * content
Pointer to the decomposed form of this unit.
CodedBitstreamUnit * units
Pointer to an array of units of length nb_units_allocated.
uint8_t * data
Pointer to the directly-parsable bitstream form of this unit.
int av_packet_ref(AVPacket *dst, const AVPacket *src)
Setup a new reference to the data described by a given packet.
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.
static const CodedBitstreamUnitType decompose_unit_types[]
#define i(width, name, range_min, range_max)
AVCodecID
Identify the syntax and semantics of the bitstream.
simple assert() macros that are a bit more flexible than ISO C assert().
int extradata_size
Size of the extradata content in bytes.
static char * split(char *message, char delim)
CodedBitstreamContext * cbc
#define FF_ARRAY_ELEMS(a)
static enum AVCodecID av1_frame_split_codec_ids[]
static int av1_frame_split_init(AVBSFContext *ctx)
int nb_decompose_unit_types
Length of the decompose_unit_types array.
Coded bitstream fragment structure, combining one or more units.
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
static void av1_frame_split_close(AVBSFContext *ctx)
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.
void ff_cbs_close(CodedBitstreamContext **ctx_ptr)
Close a context and free all internal state.
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...
const AVBitStreamFilter ff_av1_frame_split_bsf
static enum AVCodecID codec_ids[]
CodedBitstreamUnitType * decompose_unit_types
Array of unit types which should be decomposed when reading.
CodedBitstreamFragment temporal_unit
AVPacket * av_packet_alloc(void)
Allocate an AVPacket and set its fields to default values.
AV1RawTileGroup tile_group
AV1RawFrameHeader frame_header
static int av1_frame_split_filter(AVBSFContext *ctx, AVPacket *out)
This structure stores compressed data.
AVCodecParameters * par_in
Parameters of the input stream.
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.
size_t data_size
The number of bytes in the bitstream (including any padding bits in the final byte).