#include <stdint.h>
#include "libavutil/buffer.h"
#include "libavutil/log.h"
#include "cbs.h"
#include "codec_id.h"
#include "get_bits.h"
#include "put_bits.h"
Go to the source code of this file.
|
#define | MAX_UINT_BITS(length) ((UINT64_C(1) << (length)) - 1) |
|
#define | MAX_INT_BITS(length) ((INT64_C(1) << ((length) - 1)) - 1) |
|
#define | MIN_INT_BITS(length) (-(INT64_C(1) << ((length) - 1))) |
|
#define | TYPE_LIST(...) { __VA_ARGS__ } |
|
#define | CBS_UNIT_TYPE_POD(type_, structure) |
|
#define | CBS_UNIT_RANGE_POD(range_start, range_end, structure) |
|
#define | CBS_UNIT_TYPES_INTERNAL_REF(types, structure, ref_field) |
|
#define | CBS_UNIT_TYPE_INTERNAL_REF(type, structure, ref_field) CBS_UNIT_TYPES_INTERNAL_REF((type), structure, ref_field) |
|
#define | CBS_UNIT_RANGE_INTERNAL_REF(range_start, range_end, structure, ref_field) |
|
#define | CBS_UNIT_TYPES_COMPLEX(types, structure, free_func) |
|
#define | CBS_UNIT_TYPE_COMPLEX(type, structure, free_func) CBS_UNIT_TYPES_COMPLEX((type), structure, free_func) |
|
#define | CBS_UNIT_TYPE_END_OF_LIST { .nb_unit_types = 0 } |
|
|
void | ff_cbs_trace_header (CodedBitstreamContext *ctx, const char *name) |
|
void | ff_cbs_trace_syntax_element (CodedBitstreamContext *ctx, int position, const char *name, const int *subscripts, const char *bitstring, int64_t value) |
|
int | ff_cbs_read_unsigned (CodedBitstreamContext *ctx, GetBitContext *gbc, int width, const char *name, const int *subscripts, uint32_t *write_to, uint32_t range_min, uint32_t range_max) |
|
int | ff_cbs_write_unsigned (CodedBitstreamContext *ctx, PutBitContext *pbc, int width, const char *name, const int *subscripts, uint32_t value, uint32_t range_min, uint32_t range_max) |
|
int | ff_cbs_read_signed (CodedBitstreamContext *ctx, GetBitContext *gbc, int width, const char *name, const int *subscripts, int32_t *write_to, int32_t range_min, int32_t range_max) |
|
int | ff_cbs_write_signed (CodedBitstreamContext *ctx, PutBitContext *pbc, int width, const char *name, const int *subscripts, int32_t value, int32_t range_min, int32_t range_max) |
|
◆ MAX_UINT_BITS
#define MAX_UINT_BITS |
( |
|
length | ) |
((UINT64_C(1) << (length)) - 1) |
◆ MAX_INT_BITS
#define MAX_INT_BITS |
( |
|
length | ) |
((INT64_C(1) << ((length) - 1)) - 1) |
◆ MIN_INT_BITS
#define MIN_INT_BITS |
( |
|
length | ) |
(-(INT64_C(1) << ((length) - 1))) |
◆ TYPE_LIST
#define TYPE_LIST |
( |
|
... | ) |
{ __VA_ARGS__ } |
◆ CBS_UNIT_TYPE_POD
#define CBS_UNIT_TYPE_POD |
( |
|
type_, |
|
|
|
structure |
|
) |
| |
Value: { \
.nb_unit_types = 1, \
.unit_type.list = { type_ }, \
.content_size = sizeof(structure), \
.
type.ref = { .nb_offsets = 0 }, \
}
Definition at line 195 of file cbs_internal.h.
◆ CBS_UNIT_RANGE_POD
#define CBS_UNIT_RANGE_POD |
( |
|
range_start, |
|
|
|
range_end, |
|
|
|
structure |
|
) |
| |
Value: { \
.unit_type.range.start = range_start, \
.unit_type.range.end = range_end, \
.content_size = sizeof(structure), \
.
type.ref = { .nb_offsets = 0 }, \
}
Definition at line 202 of file cbs_internal.h.
◆ CBS_UNIT_TYPES_INTERNAL_REF
#define CBS_UNIT_TYPES_INTERNAL_REF |
( |
|
types, |
|
|
|
structure, |
|
|
|
ref_field |
|
) |
| |
Value: { \
.content_size = sizeof(structure), \
.
type.ref = { .nb_offsets = 1, \
.offsets = { offsetof(structure, ref_field) } }, \
}
Definition at line 211 of file cbs_internal.h.
◆ CBS_UNIT_TYPE_INTERNAL_REF
◆ CBS_UNIT_RANGE_INTERNAL_REF
#define CBS_UNIT_RANGE_INTERNAL_REF |
( |
|
range_start, |
|
|
|
range_end, |
|
|
|
structure, |
|
|
|
ref_field |
|
) |
| |
Value: { \
.unit_type.range.start = range_start, \
.unit_type.range.end = range_end, \
.content_size = sizeof(structure), \
.
type.ref = { .nb_offsets = 1, \
.offsets = { offsetof(structure, ref_field) } }, \
}
Definition at line 222 of file cbs_internal.h.
◆ CBS_UNIT_TYPES_COMPLEX
#define CBS_UNIT_TYPES_COMPLEX |
( |
|
types, |
|
|
|
structure, |
|
|
|
free_func |
|
) |
| |
Value: { \
.content_size = sizeof(structure), \
.
type.complex = { .content_free = free_func }, \
}
Definition at line 232 of file cbs_internal.h.
◆ CBS_UNIT_TYPE_COMPLEX
◆ CBS_UNIT_TYPE_END_OF_LIST
#define CBS_UNIT_TYPE_END_OF_LIST { .nb_unit_types = 0 } |
◆ CBSContentType
Enumerator |
---|
CBS_CONTENT_TYPE_INTERNAL_REFS | |
CBS_CONTENT_TYPE_COMPLEX | |
Definition at line 33 of file cbs_internal.h.
◆ anonymous enum
Enumerator |
---|
CBS_MAX_LIST_UNIT_TYPES | |
CBS_MAX_REF_OFFSETS | |
CBS_UNIT_TYPE_RANGE | |
Definition at line 43 of file cbs_internal.h.
◆ ff_cbs_trace_header()
◆ ff_cbs_trace_syntax_element()
void ff_cbs_trace_syntax_element |
( |
CodedBitstreamContext * |
ctx, |
|
|
int |
position, |
|
|
const char * |
name, |
|
|
const int * |
subscripts, |
|
|
const char * |
bitstring, |
|
|
int64_t |
value |
|
) |
| |
Definition at line 493 of file cbs.c.
Referenced by cbs_av1_read_increment(), cbs_av1_read_leb128(), cbs_av1_read_ns(), cbs_av1_read_subexp(), cbs_av1_read_uvlc(), cbs_av1_write_increment(), cbs_av1_write_leb128(), cbs_av1_write_ns(), cbs_av1_write_subexp(), cbs_av1_write_uvlc(), cbs_read_se_golomb(), cbs_read_ue_golomb(), cbs_vp9_read_increment(), cbs_vp9_read_le(), cbs_vp9_read_s(), cbs_vp9_write_increment(), cbs_vp9_write_le(), cbs_vp9_write_s(), cbs_write_se_golomb(), cbs_write_ue_golomb(), ff_cbs_read_signed(), ff_cbs_read_unsigned(), ff_cbs_write_signed(), and ff_cbs_write_unsigned().
◆ ff_cbs_read_unsigned()
◆ ff_cbs_write_unsigned()
◆ ff_cbs_read_signed()
◆ ff_cbs_write_signed()
◆ ff_cbs_type_av1
◆ ff_cbs_type_h264
◆ ff_cbs_type_h265
◆ ff_cbs_type_jpeg
◆ ff_cbs_type_mpeg2
◆ ff_cbs_type_vp9