Go to the documentation of this file.
   19 #ifndef AVCODEC_CBS_INTERNAL_H 
   20 #define AVCODEC_CBS_INTERNAL_H 
  145                                  const char *
name, 
const int *subscripts,
 
  146                                  const char *bitstring, int64_t 
value);
 
  154                          const int *subscripts, uint32_t *write_to,
 
  155                          uint32_t range_min, uint32_t range_max);
 
  159                           const int *subscripts, uint32_t 
value,
 
  160                           uint32_t range_min, uint32_t range_max);
 
  164                        const int *subscripts, 
int32_t *write_to,
 
  174 #define MAX_UINT_BITS(length) ((UINT64_C(1) << (length)) - 1) 
  178 #define MAX_INT_BITS(length) ((INT64_C(1) << ((length) - 1)) - 1) 
  182 #define MIN_INT_BITS(length) (-(INT64_C(1) << ((length) - 1))) 
  185 #define CBS_UNIT_TYPE_POD(type, structure) { \ 
  186         .nb_unit_types  = 1, \ 
  187         .unit_types     = { type }, \ 
  188         .content_type   = CBS_CONTENT_TYPE_POD, \ 
  189         .content_size   = sizeof(structure), \ 
  191 #define CBS_UNIT_TYPE_INTERNAL_REF(type, structure, ref_field) { \ 
  192         .nb_unit_types  = 1, \ 
  193         .unit_types     = { type }, \ 
  194         .content_type   = CBS_CONTENT_TYPE_INTERNAL_REFS, \ 
  195         .content_size   = sizeof(structure), \ 
  196         .nb_ref_offsets = 1, \ 
  197         .ref_offsets    = { offsetof(structure, ref_field) }, \ 
  199 #define CBS_UNIT_TYPE_COMPLEX(type, structure, free_func) { \ 
  200         .nb_unit_types  = 1, \ 
  201         .unit_types     = { type }, \ 
  202         .content_type   = CBS_CONTENT_TYPE_COMPLEX, \ 
  203         .content_size   = sizeof(structure), \ 
  204         .content_free   = free_func, \ 
  206 #define CBS_UNIT_TYPE_END_OF_LIST { .nb_unit_types = 0 } 
  
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
const CodedBitstreamUnitType unit_type_range_start
void(* close)(CodedBitstreamContext *ctx)
const AVClass * priv_class
enum CBSContentType content_type
const CodedBitstreamType ff_cbs_type_vp9
Context structure for coded bitstream operations.
void(* content_free)(void *opaque, uint8_t *data)
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)
Coded bitstream unit structure.
size_t ref_offsets[CBS_MAX_REF_OFFSETS]
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)
@ CBS_CONTENT_TYPE_INTERNAL_REFS
void ff_cbs_trace_syntax_element(CodedBitstreamContext *ctx, int position, const char *name, const int *subscripts, const char *bitstring, int64_t value)
const CodedBitstreamType ff_cbs_type_mpeg2
Coded bitstream fragment structure, combining one or more units.
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(* read_unit)(CodedBitstreamContext *ctx, CodedBitstreamUnit *unit)
Describe the class of an AVClass context structure.
int(* content_clone)(AVBufferRef **ref, CodedBitstreamUnit *unit)
const CodedBitstreamUnitType unit_types[CBS_MAX_UNIT_TYPES]
void ff_cbs_trace_header(CodedBitstreamContext *ctx, const char *name)
AVCodecID
Identify the syntax and semantics of the bitstream.
const CodedBitstreamType ff_cbs_type_jpeg
const CodedBitstreamUnitTypeDescriptor * unit_types
@ CBS_CONTENT_TYPE_COMPLEX
static const uint8_t header[24]
const CodedBitstreamType ff_cbs_type_av1
const CodedBitstreamUnitType unit_type_range_end
int(* write_unit)(CodedBitstreamContext *ctx, CodedBitstreamUnit *unit, PutBitContext *pbc)
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)
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
uint32_t CodedBitstreamUnitType
The codec-specific type of a bitstream unit.
static int ref[MAX_W *MAX_W]
const CodedBitstreamType ff_cbs_type_h265
void(* flush)(CodedBitstreamContext *ctx)
A reference to a data buffer.
int(* assemble_fragment)(CodedBitstreamContext *ctx, CodedBitstreamFragment *frag)
int(* split_fragment)(CodedBitstreamContext *ctx, CodedBitstreamFragment *frag, int header)
const CodedBitstreamType ff_cbs_type_h264