10 typedef struct RLTable
{
11 int n
; ///< number of entries of table_vlc minus 1
12 int last
; ///< number of values for last = 0
13 const uint16_t (*table_vlc
)[2];
14 const int8_t *table_run
;
15 const int8_t *table_level
;
16 uint8_t *index_run
[2]; ///< encoding only
17 int8_t *max_level
[2]; ///< encoding & decoding
18 int8_t *max_run
[2]; ///< encoding & decoding
19 VLC vlc
; ///< decoding only deprected FIXME remove
20 RL_VLC_ELEM
*rl_vlc
[32]; ///< decoding only
25 * @param static_store static uint8_t array[2][2*MAX_RUN + MAX_LEVEL + 3] which will hold
26 * the level and run tables, if this is NULL av_malloc() will be used
28 void init_rl(RLTable
*rl
, uint8_t static_store
[2][2*MAX_RUN
+ MAX_LEVEL
+ 3]);
29 void init_vlc_rl(RLTable
*rl
, int use_static
);
31 static inline int get_rl_index(const RLTable
*rl
, int last
, int run
, int level
)
34 index
= rl
->index_run
[last
][run
];
37 if (level
> rl
->max_level
[last
][run
])
39 return index
+ level
- 1;