19 #ifndef AVCODEC_CBS_INTERNAL_H 20 #define AVCODEC_CBS_INTERNAL_H 140 const char *
name,
const int *subscripts,
141 const char *bitstring, int64_t
value);
149 const int *subscripts, uint32_t *write_to,
150 uint32_t range_min, uint32_t range_max);
154 const int *subscripts, uint32_t
value,
155 uint32_t range_min, uint32_t range_max);
159 const int *subscripts,
int32_t *write_to,
169 #define MAX_UINT_BITS(length) ((UINT64_C(1) << (length)) - 1) 173 #define MAX_INT_BITS(length) ((INT64_C(1) << ((length) - 1)) - 1) 177 #define MIN_INT_BITS(length) (-(INT64_C(1) << ((length) - 1))) 180 #define CBS_UNIT_TYPE_POD(type, structure) { \ 181 .nb_unit_types = 1, \ 182 .unit_types = { type }, \ 183 .content_type = CBS_CONTENT_TYPE_POD, \ 184 .content_size = sizeof(structure), \ 186 #define CBS_UNIT_TYPE_INTERNAL_REF(type, structure, ref_field) { \ 187 .nb_unit_types = 1, \ 188 .unit_types = { type }, \ 189 .content_type = CBS_CONTENT_TYPE_INTERNAL_REFS, \ 190 .content_size = sizeof(structure), \ 191 .nb_ref_offsets = 1, \ 192 .ref_offsets = { offsetof(structure, ref_field) }, \ 194 #define CBS_UNIT_TYPE_COMPLEX(type, structure, free_func) { \ 195 .nb_unit_types = 1, \ 196 .unit_types = { type }, \ 197 .content_type = CBS_CONTENT_TYPE_COMPLEX, \ 198 .content_size = sizeof(structure), \ 199 .content_free = free_func, \ 201 #define CBS_UNIT_TYPE_END_OF_LIST { .nb_unit_types = 0 } const CodedBitstreamUnitType unit_types[CBS_MAX_UNIT_TYPES]
ptrdiff_t const GLvoid * data
static void flush(AVCodecContext *avctx)
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_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)
uint32_t CodedBitstreamUnitType
The codec-specific type of a bitstream unit.
GLsizei GLboolean const GLfloat * value
const CodedBitstreamUnitTypeDescriptor * unit_types
bitstream reader API header.
Coded bitstream unit structure.
void ff_cbs_trace_header(CodedBitstreamContext *ctx, const char *name)
static const uint8_t header[24]
int(* content_clone)(AVBufferRef **ref, CodedBitstreamUnit *unit)
AVCodecID
Identify the syntax and semantics of the bitstream.
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)
const CodedBitstreamUnitType unit_type_range_end
const CodedBitstreamType ff_cbs_type_mpeg2
size_t ref_offsets[CBS_MAX_REF_OFFSETS]
const CodedBitstreamType ff_cbs_type_av1
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)
typedef void(APIENTRY *FF_PFNGLACTIVETEXTUREPROC)(GLenum texture)
Libavcodec external API header.
Coded bitstream fragment structure, combining one or more units.
const CodedBitstreamType ff_cbs_type_jpeg
Describe the class of an AVClass context structure.
Context structure for coded bitstream operations.
const CodedBitstreamType ff_cbs_type_h265
A reference to a data buffer.
enum CBSContentType content_type
static int ref[MAX_W *MAX_W]
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)
const CodedBitstreamUnitType unit_type_range_start
void(* content_free)(void *opaque, uint8_t *data)
const CodedBitstreamType ff_cbs_type_h264
const AVClass * priv_class
const CodedBitstreamType ff_cbs_type_vp9