FFmpeg
Loading...
Searching...
No Matches
cbs_vp9.c
Go to the documentation of this file.
1/*
2 * This file is part of FFmpeg.
3 *
4 * FFmpeg is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * FFmpeg is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with FFmpeg; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18
19#include "libavutil/avassert.h"
20
21#include "cbs.h"
22#include "cbs_internal.h"
23#include "cbs_vp9.h"
24
25
27 int width, const char *name,
28 const int *subscripts, int32_t *write_to)
29{
30 uint32_t magnitude;
31 int sign;
33
35
36 if (get_bits_left(gbc) < width + 1) {
37 av_log(ctx->log_ctx, AV_LOG_ERROR, "Invalid signed value at "
38 "%s: bitstream ended.\n", name);
40 }
41
42 magnitude = get_bits(gbc, width);
43 sign = get_bits1(gbc);
44 value = sign ? -(int32_t)magnitude : magnitude;
45
47
48 *write_to = value;
49 return 0;
50}
51
53 int width, const char *name,
54 const int *subscripts, int32_t value)
55{
56 uint32_t magnitude;
57 int sign;
58
60
61 if (put_bits_left(pbc) < width + 1)
62 return AVERROR(ENOSPC);
63
64 sign = value < 0;
65 magnitude = sign ? -value : value;
66
67 put_bits(pbc, width, magnitude);
68 put_bits(pbc, 1, sign);
69
71
72 return 0;
73}
74
76 uint32_t range_min, uint32_t range_max,
77 const char *name, uint32_t *write_to)
78{
79 uint32_t value;
80
82
83 av_assert0(range_min <= range_max && range_max - range_min < 32);
84
85 for (value = range_min; value < range_max;) {
86 if (get_bits_left(gbc) < 1) {
87 av_log(ctx->log_ctx, AV_LOG_ERROR, "Invalid increment value at "
88 "%s: bitstream ended.\n", name);
90 }
91 if (get_bits1(gbc))
92 ++value;
93 else
94 break;
95 }
96
98
99 *write_to = value;
100 return 0;
101}
102
104 uint32_t range_min, uint32_t range_max,
105 const char *name, uint32_t value)
106{
107 int len;
108
110
111 av_assert0(range_min <= range_max && range_max - range_min < 8);
112 if (value < range_min || value > range_max) {
113 av_log(ctx->log_ctx, AV_LOG_ERROR, "%s out of range: "
114 "%"PRIu32", but must be in [%"PRIu32",%"PRIu32"].\n",
115 name, value, range_min, range_max);
116 return AVERROR_INVALIDDATA;
117 }
118
119 if (value == range_max)
120 len = range_max - range_min;
121 else
122 len = value - range_min + 1;
123 if (put_bits_left(pbc) < len)
124 return AVERROR(ENOSPC);
125
126 if (len > 0)
127 put_bits(pbc, len, (1 << len) - 1 - (value != range_max));
128
130
131 return 0;
132}
133
135 int width, const char *name,
136 const int *subscripts, uint32_t *write_to)
137{
138 uint32_t value;
139 int b;
140
142
143 av_assert0(width % 8 == 0);
144
145 if (get_bits_left(gbc) < width) {
146 av_log(ctx->log_ctx, AV_LOG_ERROR, "Invalid le value at "
147 "%s: bitstream ended.\n", name);
148 return AVERROR_INVALIDDATA;
149 }
150
151 value = 0;
152 for (b = 0; b < width; b += 8)
153 value |= get_bits(gbc, 8) << b;
154
156
157 *write_to = value;
158 return 0;
159}
160
162 int width, const char *name,
163 const int *subscripts, uint32_t value)
164{
165 int b;
166
168
169 av_assert0(width % 8 == 0);
170
171 if (put_bits_left(pbc) < width)
172 return AVERROR(ENOSPC);
173
174 for (b = 0; b < width; b += 8)
175 put_bits(pbc, 8, value >> b & 0xff);
176
178
179 return 0;
180}
181
182#define HEADER(name) do { \
183 ff_cbs_trace_header(ctx, name); \
184 } while (0)
185
186#define CHECK(call) do { \
187 err = (call); \
188 if (err < 0) \
189 return err; \
190 } while (0)
191
192#define FUNC_NAME(rw, codec, name) cbs_ ## codec ## _ ## rw ## _ ## name
193#define FUNC_VP9(rw, name) FUNC_NAME(rw, vp9, name)
194#define FUNC(name) FUNC_VP9(READWRITE, name)
195
196#define SUBSCRIPTS(subs, ...) (subs > 0 ? ((int[subs + 1]){ subs, __VA_ARGS__ }) : NULL)
197
198#define s(width, name) \
199 xs(width, name, current->name, 0, )
200#define fs(width, name, subs, ...) \
201 xf(width, name, current->name, subs, __VA_ARGS__)
202#define ss(width, name, subs, ...) \
203 xs(width, name, current->name, subs, __VA_ARGS__)
204
205#define READ
206#define READWRITE read
207#define RWContext GetBitContext
208
209#define f(width, name) do { \
210 uint32_t value; \
211 CHECK(ff_cbs_read_simple_unsigned(ctx, rw, width, #name, \
212 &value)); \
213 current->name = value; \
214 } while (0)
215#define xf(width, name, var, subs, ...) do { \
216 uint32_t value; \
217 CHECK(ff_cbs_read_unsigned(ctx, rw, width, #name, \
218 SUBSCRIPTS(subs, __VA_ARGS__), \
219 &value, 0, (1 << width) - 1)); \
220 var = value; \
221 } while (0)
222#define xs(width, name, var, subs, ...) do { \
223 int32_t value; \
224 CHECK(cbs_vp9_read_s(ctx, rw, width, #name, \
225 SUBSCRIPTS(subs, __VA_ARGS__), &value)); \
226 var = value; \
227 } while (0)
228
229
230#define increment(name, min, max) do { \
231 uint32_t value; \
232 CHECK(cbs_vp9_read_increment(ctx, rw, min, max, #name, &value)); \
233 current->name = value; \
234 } while (0)
235
236#define fle(width, name, subs, ...) do { \
237 CHECK(cbs_vp9_read_le(ctx, rw, width, #name, \
238 SUBSCRIPTS(subs, __VA_ARGS__), &current->name)); \
239 } while (0)
240
241#define delta_q(name) do { \
242 uint8_t delta_coded; \
243 int8_t delta_q; \
244 xf(1, name.delta_coded, delta_coded, 0, ); \
245 if (delta_coded) \
246 xs(4, name.delta_q, delta_q, 0, ); \
247 else \
248 delta_q = 0; \
249 current->name = delta_q; \
250 } while (0)
251
252#define prob(name, subs, ...) do { \
253 uint8_t prob_coded; \
254 uint8_t prob; \
255 xf(1, name.prob_coded, prob_coded, subs, __VA_ARGS__); \
256 if (prob_coded) \
257 xf(8, name.prob, prob, subs, __VA_ARGS__); \
258 else \
259 prob = 255; \
260 current->name = prob; \
261 } while (0)
262
263#define fixed(width, name, value) do { \
264 av_unused uint32_t fixed_value; \
265 CHECK(ff_cbs_read_unsigned(ctx, rw, width, #name, \
266 0, &fixed_value, value, value)); \
267 } while (0)
268
269#define infer(name, value) do { \
270 current->name = value; \
271 } while (0)
272
273#define byte_alignment(rw) (get_bits_count(rw) % 8)
274
276
277#undef READ
278#undef READWRITE
279#undef RWContext
280#undef f
281#undef xf
282#undef xs
283#undef increment
284#undef fle
285#undef delta_q
286#undef prob
287#undef fixed
288#undef infer
289#undef byte_alignment
290
291
292#define WRITE
293#define READWRITE write
294#define RWContext PutBitContext
295
296#define f(width, name) do { \
297 CHECK(ff_cbs_write_simple_unsigned(ctx, rw, width, #name, \
298 current->name)); \
299 } while (0)
300#define xf(width, name, var, subs, ...) do { \
301 CHECK(ff_cbs_write_unsigned(ctx, rw, width, #name, \
302 SUBSCRIPTS(subs, __VA_ARGS__), \
303 var, 0, (1 << width) - 1)); \
304 } while (0)
305#define xs(width, name, var, subs, ...) do { \
306 CHECK(cbs_vp9_write_s(ctx, rw, width, #name, \
307 SUBSCRIPTS(subs, __VA_ARGS__), var)); \
308 } while (0)
309
310#define increment(name, min, max) do { \
311 CHECK(cbs_vp9_write_increment(ctx, rw, min, max, #name, current->name)); \
312 } while (0)
313
314#define fle(width, name, subs, ...) do { \
315 CHECK(cbs_vp9_write_le(ctx, rw, width, #name, \
316 SUBSCRIPTS(subs, __VA_ARGS__), current->name)); \
317 } while (0)
318
319#define delta_q(name) do { \
320 xf(1, name.delta_coded, !!current->name, 0, ); \
321 if (current->name) \
322 xs(4, name.delta_q, current->name, 0, ); \
323 } while (0)
324
325#define prob(name, subs, ...) do { \
326 xf(1, name.prob_coded, current->name != 255, subs, __VA_ARGS__); \
327 if (current->name != 255) \
328 xf(8, name.prob, current->name, subs, __VA_ARGS__); \
329 } while (0)
330
331#define fixed(width, name, value) do { \
332 CHECK(ff_cbs_write_unsigned(ctx, rw, width, #name, \
333 0, value, value, value)); \
334 } while (0)
335
336#define infer(name, value) do { \
337 if (current->name != (value)) { \
338 av_log(ctx->log_ctx, AV_LOG_WARNING, "Warning: " \
339 "%s does not match inferred value: " \
340 "%"PRId64", but should be %"PRId64".\n", \
341 #name, (int64_t)current->name, (int64_t)(value)); \
342 } \
343 } while (0)
344
345#define byte_alignment(rw) (put_bits_count(rw) % 8)
346
348
349#undef WRITE
350#undef READWRITE
351#undef RWContext
352#undef f
353#undef xf
354#undef xs
355#undef increment
356#undef fle
357#undef delta_q
358#undef prob
359#undef fixed
360#undef infer
361#undef byte_alignment
362
363
366 int header)
367{
368 uint8_t superframe_header;
369 int err;
370
371 if (frag->data_size == 0)
372 return AVERROR_INVALIDDATA;
373
374 // Last byte in the packet.
375 superframe_header = frag->data[frag->data_size - 1];
376
377 if ((superframe_header & 0xe0) == 0xc0) {
378 VP9RawSuperframeIndex sfi = {0};
379 GetBitContext gbc;
380 size_t index_size, pos;
381 int i;
382
383 index_size = 2 + (((superframe_header & 0x18) >> 3) + 1) *
384 ((superframe_header & 0x07) + 1);
385
386 if (index_size > frag->data_size)
387 return AVERROR_INVALIDDATA;
388
389 err = init_get_bits(&gbc, frag->data + frag->data_size - index_size,
390 8 * index_size);
391 if (err < 0)
392 return err;
393
394 err = cbs_vp9_read_superframe_index(ctx, &gbc, &sfi);
395 if (err < 0)
396 return err;
397
398 pos = 0;
399 for (i = 0; i <= sfi.frames_in_superframe_minus_1; i++) {
400 if (pos + sfi.frame_sizes[i] + index_size > frag->data_size) {
401 av_log(ctx->log_ctx, AV_LOG_ERROR, "Frame %d too large "
402 "in superframe: %"PRIu32" bytes.\n",
403 i, sfi.frame_sizes[i]);
404 return AVERROR_INVALIDDATA;
405 }
406
407 err = ff_cbs_append_unit_data(frag, 0,
408 frag->data + pos,
409 sfi.frame_sizes[i],
410 frag->data_ref);
411 if (err < 0)
412 return err;
413
414 pos += sfi.frame_sizes[i];
415 }
416 if (pos + index_size != frag->data_size) {
417 av_log(ctx->log_ctx, AV_LOG_WARNING, "Extra padding at "
418 "end of superframe: %zu bytes.\n",
419 frag->data_size - (pos + index_size));
420 }
421
422 return 0;
423
424 } else {
425 err = ff_cbs_append_unit_data(frag, 0,
426 frag->data, frag->data_size,
427 frag->data_ref);
428 if (err < 0)
429 return err;
430 }
431
432 return 0;
433}
434
436 CodedBitstreamUnit *unit)
437{
439 GetBitContext gbc;
440 int err, pos;
441
442 err = init_get_bits(&gbc, unit->data, 8 * unit->data_size);
443 if (err < 0)
444 return err;
445
446 err = ff_cbs_alloc_unit_content(ctx, unit);
447 if (err < 0)
448 return err;
449 frame = unit->content;
450
451 err = cbs_vp9_read_frame(ctx, &gbc, frame);
452 if (err < 0)
453 return err;
454
455 pos = get_bits_count(&gbc);
456 av_assert0(pos % 8 == 0);
457 pos /= 8;
458 av_assert0(pos <= unit->data_size);
459
460 if (pos == unit->data_size) {
461 // No data (e.g. a show-existing-frame frame).
462 } else {
463 frame->data_ref = av_buffer_ref(unit->data_ref);
464 if (!frame->data_ref)
465 return AVERROR(ENOMEM);
466
467 frame->data = unit->data + pos;
468 frame->data_size = unit->data_size - pos;
469 }
470
471 return 0;
472}
473
475 CodedBitstreamUnit *unit,
476 PutBitContext *pbc)
477{
478 VP9RawFrame *frame = unit->content;
479 int err;
480
481 err = cbs_vp9_write_frame(ctx, pbc, frame);
482 if (err < 0)
483 return err;
484
485 // Frame must be byte-aligned.
486 av_assert0(put_bits_count(pbc) % 8 == 0);
487
488 if (frame->data) {
489 if (frame->data_size > put_bits_left(pbc) / 8)
490 return AVERROR(ENOSPC);
491
492 flush_put_bits(pbc);
493 memcpy(put_bits_ptr(pbc), frame->data, frame->data_size);
494 skip_put_bytes(pbc, frame->data_size);
495 }
496
497 return 0;
498}
499
502{
503 int err;
504
505 if (frag->nb_units == 1) {
506 // Output is just the content of the single frame.
507
508 CodedBitstreamUnit *frame = &frag->units[0];
509
510 frag->data_ref = av_buffer_ref(frame->data_ref);
511 if (!frag->data_ref)
512 return AVERROR(ENOMEM);
513
514 frag->data = frame->data;
515 frag->data_size = frame->data_size;
516
517 } else {
518 // Build superframe out of frames.
519
521 PutBitContext pbc;
523 uint8_t *data;
524 size_t size, max, pos;
525 int i, size_len;
526
527 if (frag->nb_units > 8) {
528 av_log(ctx->log_ctx, AV_LOG_ERROR, "Too many frames to "
529 "make superframe: %d.\n", frag->nb_units);
530 return AVERROR(EINVAL);
531 }
532
533 max = 0;
534 for (i = 0; i < frag->nb_units; i++)
535 if (max < frag->units[i].data_size)
536 max = frag->units[i].data_size;
537
538 if (max < 2)
539 size_len = 1;
540 else
541 size_len = av_log2(max) / 8 + 1;
542 av_assert0(size_len <= 4);
543
545 sfi.bytes_per_framesize_minus_1 = size_len - 1;
547
548 size = 2;
549 for (i = 0; i < frag->nb_units; i++) {
550 size += size_len + frag->units[i].data_size;
551 sfi.frame_sizes[i] = frag->units[i].data_size;
552 }
553
555 if (!ref)
556 return AVERROR(ENOMEM);
557 data = ref->data;
559
560 pos = 0;
561 for (i = 0; i < frag->nb_units; i++) {
562 av_assert0(size - pos > frag->units[i].data_size);
563 memcpy(data + pos, frag->units[i].data,
564 frag->units[i].data_size);
565 pos += frag->units[i].data_size;
566 }
567 av_assert0(size - pos == 2 + frag->nb_units * size_len);
568
569 init_put_bits(&pbc, data + pos, size - pos);
570
571 err = cbs_vp9_write_superframe_index(ctx, &pbc, &sfi);
572 if (err < 0) {
573 av_log(ctx->log_ctx, AV_LOG_ERROR, "Failed to write "
574 "superframe index.\n");
576 return err;
577 }
578
579 av_assert0(put_bits_left(&pbc) == 0);
580 flush_put_bits(&pbc);
581
582 frag->data_ref = ref;
583 frag->data = data;
584 frag->data_size = size;
585 }
586
587 return 0;
588}
589
591{
592 CodedBitstreamVP9Context *vp9 = ctx->priv_data;
593
594 memset(vp9->ref, 0, sizeof(vp9->ref));
595}
596
601
603 .codec_id = AV_CODEC_ID_VP9,
604
605 .priv_data_size = sizeof(CodedBitstreamVP9Context),
606
607 .unit_types = cbs_vp9_unit_types,
608
609 .split_fragment = &cbs_vp9_split_fragment,
610 .read_unit = &cbs_vp9_read_unit,
611 .write_unit = &cbs_vp9_write_unit,
612
614
615 .assemble_fragment = &cbs_vp9_assemble_fragment,
616};
int32_t
simple assert() macros that are a bit more flexible than ISO C assert().
#define av_assert0(cond)
assert() equivalent, that is always enabled.
Definition avassert.h:42
#define i(width, name, range_min, range_max)
Definition cbs_h264.c:63
#define CBS_TRACE_READ_END()
#define CBS_UNIT_TYPE_END_OF_LIST
#define CBS_UNIT_TYPE_INTERNAL_REF(type, structure, ref_field)
#define CBS_TRACE_WRITE_END_NO_SUBSCRIPTS()
#define CBS_TRACE_READ_START()
#define CBS_TRACE_READ_END_NO_SUBSCRIPTS()
#define CBS_TRACE_WRITE_END()
#define CBS_TRACE_WRITE_START()
static int cbs_vp9_read_s(CodedBitstreamContext *ctx, GetBitContext *gbc, int width, const char *name, const int *subscripts, int32_t *write_to)
Definition cbs_vp9.c:26
static int cbs_vp9_read_unit(CodedBitstreamContext *ctx, CodedBitstreamUnit *unit)
Definition cbs_vp9.c:435
static CodedBitstreamUnitTypeDescriptor cbs_vp9_unit_types[]
Definition cbs_vp9.c:597
static int cbs_vp9_write_increment(CodedBitstreamContext *ctx, PutBitContext *pbc, uint32_t range_min, uint32_t range_max, const char *name, uint32_t value)
Definition cbs_vp9.c:103
static int cbs_vp9_assemble_fragment(CodedBitstreamContext *ctx, CodedBitstreamFragment *frag)
Definition cbs_vp9.c:500
static int cbs_vp9_read_increment(CodedBitstreamContext *ctx, GetBitContext *gbc, uint32_t range_min, uint32_t range_max, const char *name, uint32_t *write_to)
Definition cbs_vp9.c:75
const CodedBitstreamType ff_cbs_type_vp9
Definition cbs_vp9.c:602
static int cbs_vp9_read_le(CodedBitstreamContext *ctx, GetBitContext *gbc, int width, const char *name, const int *subscripts, uint32_t *write_to)
Definition cbs_vp9.c:134
static int cbs_vp9_split_fragment(CodedBitstreamContext *ctx, CodedBitstreamFragment *frag, int header)
Definition cbs_vp9.c:364
static av_cold void cbs_vp9_flush(CodedBitstreamContext *ctx)
Definition cbs_vp9.c:590
static int cbs_vp9_write_le(CodedBitstreamContext *ctx, PutBitContext *pbc, int width, const char *name, const int *subscripts, uint32_t value)
Definition cbs_vp9.c:161
static int cbs_vp9_write_s(CodedBitstreamContext *ctx, PutBitContext *pbc, int width, const char *name, const int *subscripts, int32_t value)
Definition cbs_vp9.c:52
static int cbs_vp9_write_unit(CodedBitstreamContext *ctx, CodedBitstreamUnit *unit, PutBitContext *pbc)
Definition cbs_vp9.c:474
@ VP9_SUPERFRAME_MARKER
Definition cbs_vp9.h:79
#define max(a, b)
static AVFrame * frame
void(* flush)(AVBSFContext *ctx)
Definition dts2pts.c:610
double value
Definition eval.c:102
static int get_bits_left(GetBitContext *gb)
Definition get_bits.h:688
static unsigned int get_bits1(GetBitContext *s)
Definition get_bits.h:391
static int get_bits_count(const GetBitContext *s)
Definition get_bits.h:254
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
Definition get_bits.h:337
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
Definition get_bits.h:517
@ AV_CODEC_ID_VP9
Definition codec_id.h:217
#define AV_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding.
Definition defs.h:40
void av_buffer_unref(AVBufferRef **buf)
Free a given reference and automatically free the buffer if there are no more references to it.
Definition buffer.c:139
AVBufferRef * av_buffer_ref(const AVBufferRef *buf)
Create a new reference to an AVBuffer.
Definition buffer.c:103
AVBufferRef * av_buffer_alloc(size_t size)
Allocate an AVBuffer of the given size using av_malloc().
Definition buffer.c:77
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
Definition error.h:61
#define AVERROR(e)
Definition error.h:45
#define AV_LOG_WARNING
Something somehow does not look correct.
Definition log.h:216
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition log.h:210
#define b
Definition input.c:43
#define av_log2
Definition intmath.h:84
static void put_bits(Jpeg2000EncoderContext *s, int val, int n)
put n times val bit
Definition j2kenc.c:154
#define av_cold
Definition attributes.h:117
const char data[16]
Definition mxf.c:149
static void init_put_bits(PutBitContext *s, uint8_t *buffer, int buffer_size)
Initialize the PutBitContext s.
Definition put_bits.h:62
static int put_bits_count(PutBitContext *s)
Definition put_bits.h:90
static uint8_t * put_bits_ptr(PutBitContext *s)
Return the pointer to the byte where the bitstream writer will put the next bit.
Definition put_bits.h:402
static int put_bits_left(PutBitContext *s)
Definition put_bits.h:135
static void flush_put_bits(PutBitContext *s)
Pad the end of the output stream with zeros.
Definition put_bits.h:153
static void skip_put_bytes(PutBitContext *s, int n)
Skip the given number of bytes.
Definition put_bits.h:411
const char * name
Definition qsvenc.c:142
static const uint8_t header[24]
Definition sdr2.c:68
unsigned int pos
Definition spdifenc.c:431
A reference to a data buffer.
Definition buffer.h:82
Context structure for coded bitstream operations.
Definition cbs.h:226
Coded bitstream fragment structure, combining one or more units.
Definition cbs.h:129
CodedBitstreamUnit * units
Pointer to an array of units of length nb_units_allocated.
Definition cbs.h:175
int nb_units
Number of units in this fragment.
Definition cbs.h:160
size_t data_size
The number of bytes in the bitstream.
Definition cbs.h:142
uint8_t * data
Pointer to the bitstream form of this fragment.
Definition cbs.h:135
AVBufferRef * data_ref
A reference to the buffer containing data.
Definition cbs.h:152
Coded bitstream unit structure.
Definition cbs.h:77
void * content
Pointer to the decomposed form of this unit.
Definition cbs.h:114
uint8_t * data
Pointer to the directly-parsable bitstream form of this unit.
Definition cbs.h:88
size_t data_size
The number of bytes in the bitstream (including any padding bits in the final byte).
Definition cbs.h:93
AVBufferRef * data_ref
A reference to the buffer containing data.
Definition cbs.h:105
VP9ReferenceFrameState ref[VP9_NUM_REF_FRAMES]
Definition cbs_vp9.h:217
uint8_t superframe_marker
Definition cbs_vp9.h:173
uint8_t bytes_per_framesize_minus_1
Definition cbs_vp9.h:174
uint32_t frame_sizes[VP9_MAX_FRAMES_IN_SUPERFRAME]
Definition cbs_vp9.h:176
uint8_t frames_in_superframe_minus_1
Definition cbs_vp9.h:175
#define av_log(a,...)
static int ref[MAX_W *MAX_W]
static AVFormatContext * ctx
Definition movenc.c:49
#define width
Definition dsp.h:89
int size
int len