Everything besides VLC.table is basically write-only and even VLC.table can be removed by accessing the underlying table directly.
Unified · Split
| @@ -49,14 +49,15 @@ static const int8_t vector_symbols[] = { · 48 unmodified lines | ||
| 49 | 49 | 2, 3, 4, SIGNED_8BIT, -2, -3, -4, SIGNED_6BIT |
| 50 | 50 | }; |
| 51 | 51 | |
| 52 | −static VLC vector_vlc; | |
| 52 | +static VLCElem vector_vlc[1 << VECTOR_VLC_BITS]; | |
| 53 | 53 | |
| 54 | 54 | static av_cold void vqc_init_static_data(void) |
| 55 | 55 | { |
| 56 | − VLC_INIT_STATIC_FROM_LENGTHS(&vector_vlc, VECTOR_VLC_BITS, FF_ARRAY_ELEMS(vector_nbits), | |
| 57 | − vector_nbits, 1, | |
| 58 | − vector_symbols, 1, 1, | |
| 59 | − 0, 0, 1 << VECTOR_VLC_BITS); | |
| 56 | + VLC_INIT_STATIC_TABLE_FROM_LENGTHS(vector_vlc, VECTOR_VLC_BITS, | |
| 57 | + FF_ARRAY_ELEMS(vector_nbits), | |
| 58 | + vector_nbits, 1, | |
| 59 | + vector_symbols, 1, 1, | |
| 60 | + 0, 0); | |
| 60 | 61 | } |
| 61 | 62 | |
| 62 | 63 | typedef struct VqcContext { |
| @@ -171,7 +172,7 @@ static int decode_vectors(VqcContext * s, const uint8_t * buf, int size, int wid · 108 unmodified lines | ||
| 171 | 172 | continue; |
| 172 | 173 | } |
| 173 | 174 | |
| 174 | − symbol = get_vlc2(&gb, vector_vlc.table, VECTOR_VLC_BITS, 1); | |
| 175 | + symbol = get_vlc2(&gb, vector_vlc, VECTOR_VLC_BITS, 1); | |
| 175 | 176 | switch(symbol) { |
| 176 | 177 | case SKIP_3: dst += 3; break; |
| 177 | 178 | case SKIP_4: dst += 4; break; |