FFmpeg
Data Structures | Macros | Functions
vlc.h File Reference
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  VLC
 
struct  RL_VLC_ELEM
 

Macros

#define VLC_TYPE   int16_t
 
#define init_vlc(vlc, nb_bits, nb_codes, bits, bits_wrap, bits_size, codes, codes_wrap, codes_size, flags)
 
#define INIT_VLC_LE   2
 
#define INIT_VLC_USE_NEW_STATIC   4
 
#define INIT_VLC_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, h, i, j, static_size)
 
#define INIT_LE_VLC_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, h, i, j, static_size)
 
#define INIT_VLC_STATIC(vlc, bits, a, b, c, d, e, f, g, static_size)   INIT_VLC_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, NULL, 0, 0, static_size)
 
#define INIT_LE_VLC_STATIC(vlc, bits, a, b, c, d, e, f, g, static_size)   INIT_LE_VLC_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, NULL, 0, 0, static_size)
 

Functions

int ff_init_vlc_sparse (VLC *vlc, int nb_bits, int nb_codes, const void *bits, int bits_wrap, int bits_size, const void *codes, int codes_wrap, int codes_size, const void *symbols, int symbols_wrap, int symbols_size, int flags)
 
void ff_free_vlc (VLC *vlc)
 

Macro Definition Documentation

#define VLC_TYPE   int16_t
#define init_vlc (   vlc,
  nb_bits,
  nb_codes,
  bits,
  bits_wrap,
  bits_size,
  codes,
  codes_wrap,
  codes_size,
  flags 
)
#define INIT_VLC_LE   2
#define INIT_VLC_USE_NEW_STATIC   4
#define INIT_VLC_SPARSE_STATIC (   vlc,
  bits,
  a,
  b,
  c,
  d,
  e,
  f,
  g,
  h,
  i,
  j,
  static_size 
)
Value:
do { \
static VLC_TYPE table[static_size][2]; \
(vlc)->table = table; \
(vlc)->table_allocated = static_size; \
ff_init_vlc_sparse(vlc, bits, a, b, c, d, e, f, g, h, i, j, \
} while (0)
const char * g
Definition: vf_curves.c:115
The reader does not expect b to be semantically here and if the code is changed by maybe adding a a division or other the signedness will almost certainly be mistaken To avoid this confusion a new type was SUINT is the C unsigned type but it holds a signed int to use the same example SUINT a
Definition: undefined.txt:36
#define f(width, name)
Definition: cbs_vp9.c:255
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
Definition: undefined.txt:32
static const uint16_t table[]
Definition: prosumer.c:206
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:259
uint8_t bits
Definition: vp3data.h:202
#define b
Definition: input.c:41
int ff_init_vlc_sparse(VLC *vlc, int nb_bits, int nb_codes, const void *bits, int bits_wrap, int bits_size, const void *codes, int codes_wrap, int codes_size, const void *symbols, int symbols_wrap, int symbols_size, int flags)
Definition: bitstream.c:273
#define INIT_VLC_USE_NEW_STATIC
Definition: vlc.h:55
#define VLC_TYPE
Definition: vlc.h:24

Definition at line 57 of file vlc.h.

Referenced by imm4_init_static_data().

#define INIT_LE_VLC_SPARSE_STATIC (   vlc,
  bits,
  a,
  b,
  c,
  d,
  e,
  f,
  g,
  h,
  i,
  j,
  static_size 
)
Value:
do { \
static VLC_TYPE table[static_size][2]; \
(vlc)->table = table; \
(vlc)->table_allocated = static_size; \
ff_init_vlc_sparse(vlc, bits, a, b, c, d, e, f, g, h, i, j, \
} while (0)
const char * g
Definition: vf_curves.c:115
The reader does not expect b to be semantically here and if the code is changed by maybe adding a a division or other the signedness will almost certainly be mistaken To avoid this confusion a new type was SUINT is the C unsigned type but it holds a signed int to use the same example SUINT a
Definition: undefined.txt:36
#define f(width, name)
Definition: cbs_vp9.c:255
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
Definition: undefined.txt:32
static const uint16_t table[]
Definition: prosumer.c:206
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:259
uint8_t bits
Definition: vp3data.h:202
#define b
Definition: input.c:41
int ff_init_vlc_sparse(VLC *vlc, int nb_bits, int nb_codes, const void *bits, int bits_wrap, int bits_size, const void *codes, int codes_wrap, int codes_size, const void *symbols, int symbols_wrap, int symbols_size, int flags)
Definition: bitstream.c:273
#define INIT_VLC_LE
Definition: vlc.h:54
#define INIT_VLC_USE_NEW_STATIC
Definition: vlc.h:55
#define VLC_TYPE
Definition: vlc.h:24

Definition at line 66 of file vlc.h.

Referenced by compute_alpha_vlcs().

#define INIT_VLC_STATIC (   vlc,
  bits,
  a,
  b,
  c,
  d,
  e,
  f,
  g,
  static_size 
)    INIT_VLC_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, NULL, 0, 0, static_size)
#define INIT_LE_VLC_STATIC (   vlc,
  bits,
  a,
  b,
  c,
  d,
  e,
  f,
  g,
  static_size 
)    INIT_LE_VLC_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, NULL, 0, 0, static_size)

Definition at line 78 of file vlc.h.

Referenced by speedhq_static_init().

Function Documentation

int ff_init_vlc_sparse ( VLC vlc,
int  nb_bits,
int  nb_codes,
const void bits,
int  bits_wrap,
int  bits_size,
const void codes,
int  codes_wrap,
int  codes_size,
const void symbols,
int  symbols_wrap,
int  symbols_size,
int  flags 
)
void ff_free_vlc ( VLC vlc)