]> git.sesse.net Git - ffmpeg/commit
pthread_frame: merge the functionality for normal decoder init and init_thread_copy
authorAnton Khirnov <anton@khirnov.net>
Mon, 9 Jan 2017 17:04:42 +0000 (18:04 +0100)
committerAnton Khirnov <anton@khirnov.net>
Fri, 10 Apr 2020 13:24:54 +0000 (15:24 +0200)
commit1f4cf92cfbd3accbae582ac63126ed5570ddfd37
tree0d08c281a748689d53350a929fb0df022dc6ef2c
parent665e5b0fba41a8bae2269d9ce8929a24002e5907
pthread_frame: merge the functionality for normal decoder init and init_thread_copy

The current design, where
- proper init is called for the first per-thread context
- first thread's private data is copied into private data for all the
  other threads
- a "fixup" function is called for all the other threads to e.g.
  allocate dynamically allocated data
is very fragile and hard to follow, so it is abandoned. Instead, the
same init function is used to init each per-thread context. Where
necessary, AVCodecInternal.is_copy can be used to differentiate between
the first thread and the other ones (e.g. for decoding the extradata
just once).
38 files changed:
doc/multithreading.txt
libavcodec/aic.c
libavcodec/alac.c
libavcodec/avcodec.h
libavcodec/cfhd.c
libavcodec/cllc.c
libavcodec/dnxhddec.c
libavcodec/exr.c
libavcodec/ffv1dec.c
libavcodec/flacdec.c
libavcodec/h264dec.c
libavcodec/hevcdec.c
libavcodec/hqx.c
libavcodec/huffyuvdec.c
libavcodec/lagarith.c
libavcodec/lcldec.c
libavcodec/magicyuv.c
libavcodec/mdec.c
libavcodec/mimic.c
libavcodec/mpeg4videodec.c
libavcodec/pixlet.c
libavcodec/pngdec.c
libavcodec/proresdec2.c
libavcodec/pthread_frame.c
libavcodec/rv30.c
libavcodec/rv34.c
libavcodec/rv34.h
libavcodec/rv40.c
libavcodec/sheervideo.c
libavcodec/takdec.c
libavcodec/tiff.c
libavcodec/tta.c
libavcodec/vble.c
libavcodec/vp3.c
libavcodec/vp8.c
libavcodec/vp9.c
libavcodec/wavpack.c
libavcodec/ylc.c