summaryrefslogtreecommitdiff
path: root/libavcodec/rl.h
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2014-08-31 20:07:40 +0200
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2014-09-02 19:20:28 +0200
commite48cd2de98c3dbac998c76c54749d1b534b32ff6 (patch)
tree321f7eb203fd9002e99f18338818c48c69c97fb7 /libavcodec/rl.h
parent2ca78936c7d4862100b7eb9b4c6097b063d495c8 (diff)
rl.h: Use on-stack temporary VLC tables instead of having them static.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Diffstat (limited to 'libavcodec/rl.h')
-rw-r--r--libavcodec/rl.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/libavcodec/rl.h b/libavcodec/rl.h
index 3cef366251..2897ec5aa1 100644
--- a/libavcodec/rl.h
+++ b/libavcodec/rl.h
@@ -53,22 +53,18 @@ typedef struct RLTable {
* the level and run tables, if this is NULL av_malloc() will be used
*/
void ff_init_rl(RLTable *rl, uint8_t static_store[2][2*MAX_RUN + MAX_LEVEL + 3]);
-void ff_init_vlc_rl(RLTable *rl, const VLC *vlc);
+void ff_init_vlc_rl(RLTable *rl, unsigned static_size);
#define INIT_VLC_RL(rl, static_size)\
{\
int q;\
static RL_VLC_ELEM rl_vlc_table[32][static_size];\
- VLC tmp_vlc;\
- INIT_VLC_STATIC(&tmp_vlc, 9, rl.n + 1,\
- &rl.table_vlc[0][1], 4, 2,\
- &rl.table_vlc[0][0], 4, 2, static_size);\
\
if(!rl.rl_vlc[0]){\
for(q=0; q<32; q++)\
rl.rl_vlc[q]= rl_vlc_table[q];\
\
- ff_init_vlc_rl(&rl, &tmp_vlc);\
+ ff_init_vlc_rl(&rl, static_size);\
}\
}