Go to the documentation of this file.
24 #define VLC_MULTI_MAX_SYMBOLS 6
56 #define vlc_init(vlc, nb_bits, nb_codes, \
57 bits, bits_wrap, bits_size, \
58 codes, codes_wrap, codes_size, \
60 ff_vlc_init_sparse(vlc, nb_bits, nb_codes, \
61 bits, bits_wrap, bits_size, \
62 codes, codes_wrap, codes_size, \
96 const void *codes,
int codes_wrap,
int codes_size,
97 const void *symbols,
int symbols_wrap,
int symbols_size,
130 const int8_t *lens,
int lens_wrap,
131 const void *symbols,
int symbols_wrap,
int symbols_size,
168 int nb_codes,
const int8_t *lens,
int lens_wrap,
169 const void *symbols,
int symbols_wrap,
int symbols_size,
176 #define VLC_INIT_USE_STATIC 1
177 #define VLC_INIT_STATIC_OVERLONG (2 | VLC_INIT_USE_STATIC)
180 #define VLC_INIT_INPUT_LE 4
182 #define VLC_INIT_OUTPUT_LE 8
183 #define VLC_INIT_LE (VLC_INIT_INPUT_LE | VLC_INIT_OUTPUT_LE)
185 #define VLC_INIT_CUSTOM_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, \
186 h, i, j, flags, static_size) \
188 static VLCElem table[static_size]; \
189 (vlc)->table = table; \
190 (vlc)->table_allocated = static_size; \
191 ff_vlc_init_sparse(vlc, bits, a, b, c, d, e, f, g, h, i, j, \
192 flags | VLC_INIT_USE_STATIC); \
195 #define VLC_INIT_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, h, i, j, static_size) \
196 VLC_INIT_CUSTOM_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, \
197 h, i, j, 0, static_size)
199 #define VLC_INIT_LE_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, h, i, j, static_size) \
200 VLC_INIT_CUSTOM_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, \
201 h, i, j, VLC_INIT_LE, static_size)
203 #define VLC_INIT_CUSTOM_STATIC(vlc, bits, a, b, c, d, e, f, g, flags, static_size) \
204 VLC_INIT_CUSTOM_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, \
205 NULL, 0, 0, flags, static_size)
207 #define VLC_INIT_STATIC(vlc, bits, a, b, c, d, e, f, g, static_size) \
208 VLC_INIT_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, NULL, 0, 0, static_size)
210 #define VLC_INIT_LE_STATIC(vlc, bits, a, b, c, d, e, f, g, static_size) \
211 VLC_INIT_LE_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, NULL, 0, 0, static_size)
213 #define VLC_INIT_STATIC_FROM_LENGTHS(vlc, bits, nb_codes, lens, len_wrap, \
214 symbols, symbols_wrap, symbols_size, \
215 offset, flags, static_size) \
217 static VLCElem table[static_size]; \
218 (vlc)->table = table; \
219 (vlc)->table_allocated = static_size; \
220 ff_vlc_init_from_lengths(vlc, bits, nb_codes, lens, len_wrap, \
221 symbols, symbols_wrap, symbols_size, \
222 offset, flags | VLC_INIT_USE_STATIC, \
void ff_vlc_free_multi(VLC_MULTI *vlc)
void ff_vlc_free(VLC *vlc)
uint8_t val[VLC_MULTI_MAX_SYMBOLS]
int ff_vlc_init_from_lengths(VLC *vlc, int nb_bits, int nb_codes, const int8_t *lens, int lens_wrap, const void *symbols, int symbols_wrap, int symbols_size, int offset, int flags, void *logctx)
Build VLC decoding tables suitable for use with get_vlc2()
int ff_vlc_init_multi_from_lengths(VLC *vlc, VLC_MULTI *multi, int nb_bits, int nb_elems, int nb_codes, const int8_t *lens, int lens_wrap, const void *symbols, int symbols_wrap, int symbols_size, int offset, int flags, void *logctx)
Build VLC decoding tables suitable for use with get_vlc_multi()
#define VLC_MULTI_MAX_SYMBOLS
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 offset
int ff_vlc_init_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)
Build VLC decoding tables suitable for use with get_vlc2().
#define flags(name, subs,...)