[FFmpeg-devel] [PATCH 33/39] avcodec/msmpeg4: Factor out common RLTable initialization code
Anton Khirnov
anton at khirnov.net
Sat Apr 17 17:31:19 EEST 2021
Quoting Andreas Rheinhardt (2020-12-10 12:16:51)
> 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.
>
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
> ---
> libavcodec/msmpeg4.c | 12 +++++++++++-
> libavcodec/msmpeg4data.c | 1 -
> libavcodec/msmpeg4data.h | 1 -
> libavcodec/msmpeg4dec.c | 5 +----
> libavcodec/msmpeg4enc.c | 3 ---
> 5 files changed, 12 insertions(+), 10 deletions(-)
LGTM
--
Anton Khirnov
More information about the ffmpeg-devel
mailing list