From 1d5d666601b6dc9319f8a539c40d016e3aef932e Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Thu, 10 Dec 2020 06:39:41 +0100 Subject: avcodec/msmpeg4: Factor out common RLTable initialization code Up until now, both the msmpeg4 decoders and encoders initialized several RLTables common to them (the decoders also initialized the VLCs of these RLTables). This is an obstacle to making these codecs init-threadsafe. So move this initialization to ff_msmpeg4_common_init() that already contains this initialization code. This allows to reuse the AVOnce used for initializing ff_v2_dc_lum/chroma_table which automatically makes initializing these RLTables thread-safe. Reviewed-by: Anton Khirnov Signed-off-by: Andreas Rheinhardt --- libavcodec/msmpeg4data.c | 1 - 1 file changed, 1 deletion(-) (limited to 'libavcodec/msmpeg4data.c') diff --git a/libavcodec/msmpeg4data.c b/libavcodec/msmpeg4data.c index fb0c6185bf..890aeb5670 100644 --- a/libavcodec/msmpeg4data.c +++ b/libavcodec/msmpeg4data.c @@ -33,7 +33,6 @@ uint32_t ff_v2_dc_lum_table[512][2]; uint32_t ff_v2_dc_chroma_table[512][2]; -uint8_t ff_static_rl_table_store[NB_RL_TABLES][2][2 * MAX_RUN + MAX_LEVEL + 3]; VLC ff_msmp4_mb_i_vlc; VLC ff_msmp4_dc_luma_vlc[2]; -- cgit v1.2.3