Quoting Andreas Rheinhardt (2020-12-30 20:01:08) > Anton Khirnov: > > Quoting Andreas Rheinhardt (2020-12-10 12:16:20) > >> 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. > >> > >> Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@gmail.com> > >> --- > >> libavcodec/mpeg12.c | 4 ---- > >> libavcodec/mpeg12.h | 2 -- > >> libavcodec/mpeg12enc.c | 6 ++++-- > >> 3 files changed, 4 insertions(+), 8 deletions(-) > > > > Looks good, thought it's really confusing how rl_vlc is initialized both > > by ff_rl_init() and by INIT_2D_VLC_RL() > > > It is actually easy: ff_rl_init() initializes index_run, max_level and > max_run (without touching rl_vlc in any way); ff_rl_init_vlc() and > ff_mpeg12_init_vlcs() initialize rl_vlc (via the macros INIT_VLC_RL() > and INIT_2D_VLC_RL() respectively) without touching what ff_rl_init() > sets at all. So rl_vlc is not initialized by ff_rl_init() at all.
Ah right, I confused ff_rl_init_vlc() for ff_rl_init(). Nevermind then. -- Anton Khirnov _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".