aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mpeg12.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-12-08 20:25:23 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-12-31 11:11:59 +0100
commit6e8fcd9c5624c1a89e49803de9e10562ace61b6a (patch)
tree68007453ffc341058d2624de2bf1fb4b02ec8761 /libavcodec/mpeg12.c
parent1ead0c6388ba7f74ccb0c3e991a49600c92c877e (diff)
downloadffmpeg-6e8fcd9c5624c1a89e49803de9e10562ace61b6a.tar.gz
avcodec/mpeg12: Don't initialize encoder-only parts of RLTable
ff_mpeg12_init_vlcs() currently initializes index_run, max_level and max_run of ff_rl_mpeg1/2; yet the only user of these fields is the MPEG-1/2 encoder which already initializes these tables on its own. So remove the initializations in ff_mpeg12_init_vlcs(); this also simplifies making ff_mpeg12_init_vlcs() thread-safe. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/mpeg12.c')
-rw-r--r--libavcodec/mpeg12.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index e4f007aec5..b4ef41e12d 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -41,8 +41,6 @@
#include "bytestream.h"
#include "thread.h"
-uint8_t ff_mpeg12_static_rl_table_store[2][2][2*MAX_RUN + MAX_LEVEL + 3];
-
static const uint8_t table_mb_ptype[7][2] = {
{ 3, 5 }, // 0x01 MB_INTRA
{ 1, 2 }, // 0x02 MB_PAT
@@ -163,8 +161,6 @@ av_cold void ff_mpeg12_init_vlcs(void)
INIT_VLC_STATIC(&ff_mb_btype_vlc, MB_BTYPE_VLC_BITS, 11,
&table_mb_btype[0][1], 2, 1,
&table_mb_btype[0][0], 2, 1, 64);
- ff_rl_init(&ff_rl_mpeg1, ff_mpeg12_static_rl_table_store[0]);
- ff_rl_init(&ff_rl_mpeg2, ff_mpeg12_static_rl_table_store[1]);
INIT_2D_VLC_RL(ff_rl_mpeg1, 680, 0);
INIT_2D_VLC_RL(ff_rl_mpeg2, 674, 0);