#include "libavutil/avassert.h"
#include "cbs.h"
#include "cbs_internal.h"
#include "cbs_vp8.h"
#include <stdbool.h>
#include "cbs_vp8_syntax_template.c"
Go to the source code of this file.
|
| #define | DEFAULT_PROB 0x80 |
| |
| #define | HEADER(name) |
| |
| #define | CHECK(call) |
| |
| #define | FUNC_NAME(rw, codec, name) cbs_##codec##_##rw##_##name |
| |
| #define | FUNC_VP8(rw, name) FUNC_NAME(rw, vp8, name) |
| |
| #define | FUNC(name) FUNC_VP8(READWRITE, name) |
| |
| #define | SUBSCRIPTS(subs, ...) (subs > 0 ? ((int[subs + 1]){subs, __VA_ARGS__}) : NULL) |
| |
| #define | f(width, name) xf(width, name, 0, ) |
| |
| #define | bc_f(width, name) bc_unsigned_subs(width, DEFAULT_PROB, true, name, 0, ) |
| |
| #define | bc_s(width, name) bc_signed_subs(width, DEFAULT_PROB, name, 0, ) |
| |
| #define | bc_fs(width, name, subs, ...) bc_unsigned_subs(width, DEFAULT_PROB, true, name, subs, __VA_ARGS__) |
| |
| #define | bc_ss(width, name, subs, ...) bc_signed_subs(width, DEFAULT_PROB, name, subs, __VA_ARGS__) |
| |
| #define | bc_b(name) bc_unsigned_subs(1, DEFAULT_PROB, false, name, 0, ) |
| |
| #define | bc_b_prob(prob, name) bc_unsigned_subs(1, prob, false, name, 0, ) |
| |
| #define | READ |
| |
| #define | READWRITE read |
| |
| #define | RWContext GetBitContext |
| |
| #define | CBSVP8BoolCodingRW CBSVP8BoolDecoder |
| |
| #define | xf(width, name, subs, ...) |
| |
| #define | fixed(width, name, value) |
| |
| #define | bc_unsigned_subs(width, prob, enable_trace, name, subs, ...) |
| |
| #define | bc_signed_subs(width, prob, name, subs, ...) |
| |
|
| static int | cbs_vp8_bool_decoder_init (CBSVP8BoolDecoder *decoder, GetBitContext *gbc) |
| |
| static bool | cbs_vp8_bool_decoder_fill_value (CBSVP8BoolDecoder *decoder) |
| |
| static int | cbs_vp8_bool_decoder_read_bool (CBSVP8BoolDecoder *decoder, const uint8_t prob, uint8_t *output) |
| |
| static int | cbs_vp8_bool_decoder_read_literal (CBSVP8BoolDecoder *decoder, const uint8_t prob, uint32_t num_bits, uint32_t *output) |
| |
| static int | cbs_vp8_bool_decoder_read_unsigned (CodedBitstreamContext *ctx, CBSVP8BoolDecoder *bool_decoder, int width, uint8_t prob, const char *name, const int *subscripts, uint32_t *write_to, bool trace_enable) |
| |
| static int | cbs_vp8_bool_decoder_read_signed (CodedBitstreamContext *ctx, CBSVP8BoolDecoder *bool_decoder, int width, uint8_t prob, const char *name, const int *subscripts, int32_t *write_to) |
| |
| static int | cbs_vp8_read_unsigned_le (CodedBitstreamContext *ctx, GetBitContext *gbc, int width, const char *name, const int *subscripts, uint32_t *write_to, uint32_t range_min, uint32_t range_max) |
| |
| static int | cbs_vp8_split_fragment (CodedBitstreamContext *ctx, CodedBitstreamFragment *frag, int header) |
| |
| static int | cbs_vp8_read_unit (CodedBitstreamContext *ctx, CodedBitstreamUnit *unit) |
| |
| static int | cbs_vp8_write_unit (CodedBitstreamContext *ctx, CodedBitstreamUnit *unit, PutBitContext *pbc) |
| |
| static int | cbs_vp8_assemble_fragment (CodedBitstreamContext *ctx, CodedBitstreamFragment *frag) |
| |
◆ DEFAULT_PROB
| #define DEFAULT_PROB 0x80 |
◆ HEADER
◆ CHECK
Value: do { \
int err = (call); \
if (err < 0) \
return err; \
} while (0)
Definition at line 222 of file cbs_vp8.c.
◆ FUNC_NAME
| #define FUNC_NAME |
( |
|
rw, |
|
|
|
codec, |
|
|
|
name |
|
) |
| cbs_##codec##_##rw##_##name |
◆ FUNC_VP8
◆ FUNC
◆ SUBSCRIPTS
| #define SUBSCRIPTS |
( |
|
subs, |
|
|
|
... |
|
) |
| (subs > 0 ? ((int[subs + 1]){subs, __VA_ARGS__}) : NULL) |
◆ bc_f
◆ bc_s
◆ bc_fs
◆ bc_ss
◆ bc_b
◆ bc_b_prob
◆ READ
◆ READWRITE
◆ RWContext
◆ CBSVP8BoolCodingRW
◆ xf
◆ fixed
Value: do { \
uint32_t fixed_value; \
} while (0)
Definition at line 264 of file cbs_vp8.c.
◆ bc_unsigned_subs
| #define bc_unsigned_subs |
( |
|
width, |
|
|
|
prob, |
|
|
|
enable_trace, |
|
|
|
name, |
|
|
|
subs, |
|
|
|
... |
|
) |
| |
◆ bc_signed_subs
◆ cbs_vp8_bool_decoder_init()
◆ cbs_vp8_bool_decoder_fill_value()
◆ cbs_vp8_bool_decoder_read_bool()
| static int cbs_vp8_bool_decoder_read_bool |
( |
CBSVP8BoolDecoder * |
decoder, |
|
|
const uint8_t |
prob, |
|
|
uint8_t * |
output |
|
) |
| |
|
static |
◆ cbs_vp8_bool_decoder_read_literal()
| static int cbs_vp8_bool_decoder_read_literal |
( |
CBSVP8BoolDecoder * |
decoder, |
|
|
const uint8_t |
prob, |
|
|
uint32_t |
num_bits, |
|
|
uint32_t * |
output |
|
) |
| |
|
static |
◆ cbs_vp8_bool_decoder_read_unsigned()
| static int cbs_vp8_bool_decoder_read_unsigned |
( |
CodedBitstreamContext * |
ctx, |
|
|
CBSVP8BoolDecoder * |
bool_decoder, |
|
|
int |
width, |
|
|
uint8_t |
prob, |
|
|
const char * |
name, |
|
|
const int * |
subscripts, |
|
|
uint32_t * |
write_to, |
|
|
bool |
trace_enable |
|
) |
| |
|
static |
◆ cbs_vp8_bool_decoder_read_signed()
◆ cbs_vp8_read_unsigned_le()
| static int cbs_vp8_read_unsigned_le |
( |
CodedBitstreamContext * |
ctx, |
|
|
GetBitContext * |
gbc, |
|
|
int |
width, |
|
|
const char * |
name, |
|
|
const int * |
subscripts, |
|
|
uint32_t * |
write_to, |
|
|
uint32_t |
range_min, |
|
|
uint32_t |
range_max |
|
) |
| |
|
static |
◆ cbs_vp8_split_fragment()
◆ cbs_vp8_read_unit()
◆ cbs_vp8_write_unit()
◆ cbs_vp8_assemble_fragment()
◆ ff_vp8_token_update_probs
| const uint8_t ff_vp8_token_update_probs[4][8][3][11] |
◆ cbs_vp8_unit_types
◆ ff_cbs_type_vp8
Initial value:= {
.priv_data_size = 0,
}
Definition at line 374 of file cbs_vp8.c.
static int cbs_vp8_bool_decoder_read_unsigned(CodedBitstreamContext *ctx, CBSVP8BoolDecoder *bool_decoder, int width, uint8_t prob, const char *name, const int *subscripts, uint32_t *write_to, bool trace_enable)
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option name
static int cbs_vp8_bool_decoder_read_signed(CodedBitstreamContext *ctx, CBSVP8BoolDecoder *bool_decoder, int width, uint8_t prob, const char *name, const int *subscripts, int32_t *write_to)
#define CBS_UNIT_TYPE_INTERNAL_REF(type, structure, ref_field)
static CodedBitstreamUnitTypeDescriptor cbs_vp8_unit_types[]
static AVFormatContext * ctx
#define MAX_UINT_BITS(length)
static int cbs_vp8_assemble_fragment(CodedBitstreamContext *ctx, CodedBitstreamFragment *frag)
#define SUBSCRIPTS(subs,...)
static int cbs_vp8_read_unsigned_le(CodedBitstreamContext *ctx, GetBitContext *gbc, int width, const char *name, const int *subscripts, uint32_t *write_to, uint32_t range_min, uint32_t range_max)
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default value
static int cbs_vp8_read_unit(CodedBitstreamContext *ctx, CodedBitstreamUnit *unit)
#define CBS_UNIT_TYPE_END_OF_LIST
#define prob(name, subs,...)
static int cbs_vp8_write_unit(CodedBitstreamContext *ctx, CodedBitstreamUnit *unit, PutBitContext *pbc)
static int cbs_vp8_split_fragment(CodedBitstreamContext *ctx, CodedBitstreamFragment *frag, int header)