Unified · Split
| @@ -185,47 +185,6 @@ void ff_vlc_free(VLC *vlc); · 184 unmodified lines | ||
| 185 | 185 | #define VLC_INIT_OUTPUT_LE 8 |
| 186 | 186 | #define VLC_INIT_LE (VLC_INIT_INPUT_LE | VLC_INIT_OUTPUT_LE) |
| 187 | 187 | |
| 188 | −#define VLC_INIT_CUSTOM_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, \ | |
| 189 | − h, i, j, flags, static_size) \ | |
| 190 | − do { \ | |
| 191 | − static VLCElem table[static_size]; \ | |
| 192 | − (vlc)->table = table; \ | |
| 193 | − (vlc)->table_allocated = static_size; \ | |
| 194 | − ff_vlc_init_sparse(vlc, bits, a, b, c, d, e, f, g, h, i, j, \ | |
| 195 | − flags | VLC_INIT_USE_STATIC); \ | |
| 196 | − } while (0) | |
| 197 | − | |
| 198 | −#define VLC_INIT_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, h, i, j, static_size) \ | |
| 199 | − VLC_INIT_CUSTOM_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, \ | |
| 200 | − h, i, j, 0, static_size) | |
| 201 | − | |
| 202 | −#define VLC_INIT_LE_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, h, i, j, static_size) \ | |
| 203 | − VLC_INIT_CUSTOM_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, \ | |
| 204 | − h, i, j, VLC_INIT_LE, static_size) | |
| 205 | − | |
| 206 | −#define VLC_INIT_CUSTOM_STATIC(vlc, bits, a, b, c, d, e, f, g, flags, static_size) \ | |
| 207 | − VLC_INIT_CUSTOM_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, \ | |
| 208 | − NULL, 0, 0, flags, static_size) | |
| 209 | − | |
| 210 | −#define VLC_INIT_STATIC(vlc, bits, a, b, c, d, e, f, g, static_size) \ | |
| 211 | − VLC_INIT_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, NULL, 0, 0, static_size) | |
| 212 | − | |
| 213 | −#define VLC_INIT_LE_STATIC(vlc, bits, a, b, c, d, e, f, g, static_size) \ | |
| 214 | − VLC_INIT_LE_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, NULL, 0, 0, static_size) | |
| 215 | − | |
| 216 | −#define VLC_INIT_STATIC_FROM_LENGTHS(vlc, bits, nb_codes, lens, len_wrap, \ | |
| 217 | − symbols, symbols_wrap, symbols_size, \ | |
| 218 | − offset, flags, static_size) \ | |
| 219 | − do { \ | |
| 220 | − static VLCElem table[static_size]; \ | |
| 221 | − (vlc)->table = table; \ | |
| 222 | − (vlc)->table_allocated = static_size; \ | |
| 223 | − ff_vlc_init_from_lengths(vlc, bits, nb_codes, lens, len_wrap, \ | |
| 224 | − symbols, symbols_wrap, symbols_size, \ | |
| 225 | − offset, flags | VLC_INIT_USE_STATIC, \ | |
| 226 | − NULL); \ | |
| 227 | − } while (0) | |
| 228 | − | |
| 229 | 188 | /** |
| 230 | 189 | * For static VLCs, the number of bits can often be hardcoded |
| 231 | 190 | * at each get_vlc2() callsite. Then using a full VLC would be uneconomical, |