Go to the documentation of this file.
35 unsigned *_max,
unsigned *_sum)
38 unsigned max = 0, sum = 0;
40 for (n = 0; n < n_in; n++) {
41 unsigned sz = in[n]->
size;
54 unsigned max, sum, mag, marker, n, sz;
60 marker = 0xC0 + (mag << 3) + (n_in - 1);
61 sz = sum + 2 + (mag + 1) * n_in;
66 for (n = 0; n < n_in; n++) {
67 memcpy(ptr, in[n]->
data, in[n]->
size);
71 #define wloop(mag, wr) \
73 for (n = 0; n < n_in; n++) { \
105 int res, invisible,
profile, marker, uses_superframe_syntax = 0, n;
121 if ((marker & 0xe0) == 0xc0) {
122 int nbytes = 1 + ((marker >> 3) & 0x3);
123 int n_frames = 1 + (marker & 0x7), idx_sz = 2 + n_frames * nbytes;
143 if (uses_superframe_syntax &&
s->n_cache > 0) {
145 "Mixing of superframe syntax and naked VP9 frames not supported\n");
148 }
else if ((!invisible || uses_superframe_syntax) && !
s->n_cache) {
153 "Too many invisible frames\n");
173 for (n = 0; n <
s->n_cache; n++)
204 for (n = 0; n <
s->n_cache; n++)
224 .
p.
name =
"vp9_superframe",
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
static void vp9_superframe_close(AVBSFContext *ctx)
static void stats(AVPacket *const *in, int n_in, unsigned *_max, unsigned *_sum)
AVPacket * cache[MAX_CACHE]
filter_frame For filters that do not use the this method is called when a frame is pushed to the filter s input It can be called at any time except in a reentrant way If the input frame is enough to produce then the filter should push the output frames on the output link immediately As an exception to the previous rule if the input frame is enough to produce several output frames then the filter needs output only at least one per link The additional frames can be left buffered in the filter
void av_packet_free(AVPacket **pkt)
Free the packet, if the packet is reference counted, it will be unreferenced first.
The bitstream filter state.
const FFBitStreamFilter ff_vp9_superframe_bsf
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static int init_get_bits8(GetBitContext *s, const uint8_t *buffer, int byte_size)
Initialize GetBitContext.
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
#define av_assert0(cond)
assert() equivalent, that is always enabled.
static enum AVCodecID codec_ids[]
static int vp9_superframe_init(AVBSFContext *ctx)
static void flush(AVCodecContext *avctx)
static unsigned int get_bits1(GetBitContext *s)
void av_packet_move_ref(AVPacket *dst, AVPacket *src)
Move every field in src to dst and reset src.
AVCodecID
Identify the syntax and semantics of the bitstream.
AVBitStreamFilter p
The public AVBitStreamFilter.
static int vp9_superframe_filter(AVBSFContext *ctx, AVPacket *pkt)
static int merge_superframe(AVPacket *const *in, int n_in, AVPacket *out)
AVPacket * av_packet_alloc(void)
Allocate an AVPacket and set its fields to default values.
int av_packet_copy_props(AVPacket *dst, const AVPacket *src)
Copy only "properties" fields from src to dst.
static void vp9_superframe_flush(AVBSFContext *ctx)
This structure stores compressed data.
int ff_bsf_get_packet_ref(AVBSFContext *ctx, AVPacket *pkt)
Called by bitstream filters to get packet for filtering.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
void * priv_data
Format private data.