Andreas Rheinhardt
b9c1ab8907
avcodec/fft_template, fft_init_table: Make ff_fft_init() thread-safe
...
Commit 1af615683e4a1a858407afbaa2fd686842da7e49 put initializing
the ff_fft_offsets_lut (which is typically used if FFT_FIXED_32)
behind an ff_thread_once() to make ff_fft_init() thread-safe; yet
there is a second place where said table may be initialized which
is not guarded by this AVOnce: ff_fft_init_mips(). MIPS uses this LUT
even for ordinary floating point FFTs, so that ff_fft_init() is not
thread-safe (on MIPS) for both 32bit fixed-point as well as
floating-point FFTs; e.g. ff_mdct_init() inherits this flaw and
therefore initializing e.g. the AAC decoders is not thread-safe (on
MIPS) despite them having FF_CODEC_CAP_INIT_CLEANUP set.
This commit fixes this by moving the AVOnce to fft_init_table.c and
using it to guard all initializations of ff_fft_offsets_lut.
(It is not that bad in practice, because every entry of
ff_fft_offsets_lut is never read during initialization and is only once
ever written to (namely to its final value); but even these are
conflicting actions which are (by definition) data races and lead to
undefined behaviour.)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-11-24 11:35:03 +01:00
..
2020-11-24 11:35:03 +01:00
2020-10-18 21:27:23 +02:00
2020-10-28 13:53:23 +01:00
2020-10-26 12:25:28 +10:00
2020-11-09 14:58:37 +10:00
2020-10-17 09:36:07 +10:00
2020-11-12 07:23:06 +01:00
2020-11-24 09:38:35 +01:00
2020-10-11 19:59:24 +02:00
2020-11-08 19:05:17 +00:00
2020-11-08 19:05:17 +00:00
2020-11-08 19:05:17 +00:00
2020-11-08 19:05:17 +00:00
2020-10-15 22:53:56 +02:00
2020-10-12 12:20:26 +02:00
2020-10-18 15:29:34 +02:00
2020-10-18 15:29:34 +02:00
2020-10-18 15:29:34 +02:00
2020-10-18 15:29:34 +02:00
2020-11-21 22:13:10 +01:00
2020-10-27 10:19:38 +01:00
2020-10-27 10:32:16 +01:00
2020-11-24 10:13:55 +02:00
2020-11-24 10:13:55 +02:00
2020-11-13 10:38:18 -03:00
2020-10-28 13:53:23 +01:00
2020-11-13 20:36:06 -03:00
2020-11-24 10:13:55 +02:00
2020-11-11 10:23:01 -03:00
2020-11-24 10:13:55 +02:00
2020-11-24 10:13:55 +02:00
2020-10-29 11:22:35 +01:00
2020-10-29 11:22:35 +01:00
2020-10-28 11:59:35 -03:00
2020-10-28 11:59:35 -03:00
2020-11-08 18:54:42 +00:00
2020-10-17 14:36:11 +02:00
2020-10-20 15:33:13 +02:00
2020-11-21 21:56:51 +01:00
2020-10-20 15:33:13 +02:00
2020-10-26 09:10:49 +01:00
2020-10-28 13:53:23 +01:00
2020-11-12 15:55:16 +01:00
2020-11-12 15:55:16 +01:00
2020-11-22 17:45:17 +01:00
2020-11-24 11:35:03 +01:00
2020-11-24 11:35:03 +01:00
2020-11-24 11:35:03 +01:00
2020-10-24 19:11:12 +02:00
2020-10-28 13:53:23 +01:00
2020-10-11 19:59:24 +02:00
2020-11-10 02:14:29 +01:00
2020-10-28 13:53:23 +01:00
2020-11-08 18:54:42 +00:00
2020-10-11 19:59:24 +02:00
2020-10-18 21:27:23 +02:00
2020-10-20 15:33:13 +02:00
2020-10-17 14:36:11 +02:00
2020-10-15 22:53:56 +02:00
2020-10-28 11:29:09 +08:00
2020-11-12 15:55:16 +01:00
2020-10-24 16:50:29 +02:00
2020-10-12 22:06:28 +02:00
2020-10-28 13:53:23 +01:00
2020-10-28 13:53:23 +01:00
2020-10-12 22:38:40 +02:00
2020-10-28 13:53:23 +01:00
2020-10-28 11:55:53 -03:00
2020-11-03 00:46:59 +01:00
2020-11-24 09:38:35 +01:00
2020-10-12 02:10:41 +02:00
2020-11-08 18:54:42 +00:00
2020-11-24 11:35:03 +01:00
2020-10-28 13:53:23 +01:00
2020-11-08 18:54:42 +00:00
2020-11-21 22:09:51 +01:00
2020-11-24 11:35:03 +01:00
2020-11-24 11:35:03 +01:00
2020-10-19 05:15:00 +02:00
2020-10-19 21:45:22 +02:00
2020-11-03 16:21:10 +01:00
2020-10-28 13:53:23 +01:00
2020-10-27 10:33:11 +01:00
2020-10-28 13:53:23 +01:00
2020-10-12 02:00:08 +02:00
2020-10-12 02:10:41 +02:00
2020-10-18 20:42:21 +02:00
2020-10-28 13:53:23 +01:00
2020-10-12 02:00:08 +02:00
2020-11-24 11:35:03 +01:00
2020-11-24 11:35:03 +01:00
2020-11-24 11:35:03 +01:00
2020-11-24 09:38:35 +01:00
2020-11-24 09:38:35 +01:00
2020-11-24 09:38:35 +01:00
2020-10-28 13:53:23 +01:00
2020-11-06 13:57:49 +01:00
2020-11-21 22:09:51 +01:00
2020-10-20 17:18:11 +02:00
2020-11-13 10:38:18 -03:00
2020-11-11 18:36:09 +01:00
2020-11-11 18:36:09 +01:00
2020-10-21 18:17:08 +02:00
2020-10-21 18:17:08 +02:00
2020-11-08 18:54:42 +00:00
2020-11-08 18:54:42 +00:00
2020-10-21 07:51:05 +02:00
2020-10-21 07:47:55 +02:00
2020-10-21 07:47:55 +02:00
2020-10-25 09:47:37 +01:00
2020-10-18 20:42:21 +02:00
2020-10-28 13:53:23 +01:00
2020-11-08 18:54:42 +00:00
2020-11-08 18:54:42 +00:00
2020-11-08 18:54:42 +00:00
2020-11-08 18:54:42 +00:00
2020-10-12 12:19:29 +02:00
2020-11-08 18:54:42 +00:00
2020-11-24 11:35:03 +01:00
2020-10-28 13:53:23 +01:00
2020-10-26 07:16:10 +01:00
2020-10-26 07:16:10 +01:00
2020-11-24 11:35:03 +01:00
2020-11-06 13:57:49 +01:00
2020-11-24 09:38:35 +01:00
2020-11-24 09:38:35 +01:00
2020-11-24 09:38:35 +01:00
2020-10-28 13:53:23 +01:00
2020-10-11 19:59:24 +02:00
2020-11-06 13:57:49 +01:00
2020-11-24 11:35:02 +01:00
2020-11-09 15:57:56 -03:00
2020-10-16 00:29:06 +02:00
2020-10-16 00:29:06 +02:00
2020-11-02 22:57:23 +00:00
2020-11-02 22:57:23 +00:00
2020-11-03 20:35:39 +00:00
2020-11-03 20:36:14 +00:00
2020-11-03 20:36:44 +00:00
2020-11-08 18:54:42 +00:00
2020-11-08 18:54:42 +00:00
2020-10-28 13:53:23 +01:00
2020-11-24 09:38:35 +01:00
2020-10-12 22:20:37 +02:00
2020-10-29 11:22:35 +01:00
2020-10-21 06:53:41 +02:00
2020-11-13 18:01:54 +01:00
2020-10-21 06:53:41 +02:00
2020-10-24 19:11:12 +02:00
2020-11-19 10:04:41 -03:00
2020-10-27 11:51:01 +01:00
2020-10-23 10:37:04 +02:00
2020-10-23 10:37:04 +02:00
2020-10-28 13:53:23 +01:00
2020-10-28 13:53:23 +01:00
2020-10-28 13:53:23 +01:00
2020-10-28 13:53:23 +01:00
2020-10-28 13:53:23 +01:00
2020-10-16 00:38:50 +02:00