FFmpeg
Data Structures | Macros | Functions | Variables
cbs_internal.h File Reference
#include "avcodec.h"
#include "cbs.h"
#include "get_bits.h"
#include "put_bits.h"

Go to the source code of this file.

Data Structures

struct  CodedBitstreamType
 

Macros

#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)))
 

Functions

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)
 

Variables

const CodedBitstreamType ff_cbs_type_av1
 
const CodedBitstreamType ff_cbs_type_h264
 
const CodedBitstreamType ff_cbs_type_h265
 
const CodedBitstreamType ff_cbs_type_jpeg
 
const CodedBitstreamType ff_cbs_type_mpeg2
 
const CodedBitstreamType ff_cbs_type_vp9
 

Macro Definition Documentation

◆ MAX_UINT_BITS

#define MAX_UINT_BITS (   length)    ((UINT64_C(1) << (length)) - 1)

Definition at line 98 of file cbs_internal.h.

◆ MAX_INT_BITS

#define MAX_INT_BITS (   length)    ((INT64_C(1) << ((length) - 1)) - 1)

Definition at line 102 of file cbs_internal.h.

◆ MIN_INT_BITS

#define MIN_INT_BITS (   length)    (-(INT64_C(1) << ((length) - 1)))

Definition at line 106 of file cbs_internal.h.

Function Documentation

◆ ff_cbs_trace_header()

void ff_cbs_trace_header ( CodedBitstreamContext ctx,
const char *  name 
)

Definition at line 426 of file cbs.c.

◆ 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 
)

◆ ff_cbs_read_unsigned()

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 
)

Definition at line 485 of file cbs.c.

Referenced by cbs_av1_read_leb128(), and cbs_av1_read_subexp().

◆ ff_cbs_write_unsigned()

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 
)

Definition at line 528 of file cbs.c.

Referenced by cbs_av1_write_leb128(), and cbs_av1_write_subexp().

◆ ff_cbs_read_signed()

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 
)

Definition at line 564 of file cbs.c.

◆ ff_cbs_write_signed()

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 
)

Definition at line 607 of file cbs.c.

Variable Documentation

◆ ff_cbs_type_av1

const CodedBitstreamType ff_cbs_type_av1

Definition at line 1265 of file cbs_av1.c.

◆ ff_cbs_type_h264

const CodedBitstreamType ff_cbs_type_h264

Definition at line 1508 of file cbs_h2645.c.

◆ ff_cbs_type_h265

const CodedBitstreamType ff_cbs_type_h265

Definition at line 1521 of file cbs_h2645.c.

◆ ff_cbs_type_jpeg

const CodedBitstreamType ff_cbs_type_jpeg

Definition at line 461 of file cbs_jpeg.c.

◆ ff_cbs_type_mpeg2

const CodedBitstreamType ff_cbs_type_mpeg2

Definition at line 423 of file cbs_mpeg2.c.

◆ ff_cbs_type_vp9

const CodedBitstreamType ff_cbs_type_vp9

Definition at line 645 of file cbs_vp9.c.