[FFmpeg-devel] [PATCH] Use ff_thread_once() to initialize sin/cos static tables.

Derek Buitenhuis derek.buitenhuis at gmail.com
Sun Oct 25 13:03:51 CET 2015


On 10/25/2015 11:56 AM, Michael Niedermayer wrote:
> the problem that causes the slowdown should be due to initializing all
> table sizes when only 1 or a few small ones are needed
> making the init more fine grained (as it was) should solve this
> that could be done with a single mutex (not of once type) and
> initializing only the needed table when its not already inited
> or with a once mutex for each table size
> there are certainly also other options

Seems reasonable to me. Probably would prefer once, to avoid possible
lock contention.

- Derek


More information about the ffmpeg-devel mailing list