summaryrefslogtreecommitdiff
path: root/libavcodec/pthread.c
Commit message (Collapse)AuthorAge
* Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* threads: allow thread count of zeroMans Rullgard2011-03-02
| | | | | | | | | This moves setting the thread count to a minimum of 1 to frame_thread_init(), allowing a value of zero to propagate through to the codec if frame threading is not used. This makes auto-threads work in libx264. Signed-off-by: Mans Rullgard <mans@mansr.com>
* pthreads: Fix bug introduced with thread_safe_callbacksAlexander Strange2011-03-01
| | | | | | | | | For intra codecs, ff_thread_finish_setup() is called before decoding starts automatically. However, get_buffer can only be used before it's called, so adding this requirement broke frame threading for them. Fixed by moving the call until after get_buffer is finished. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* Deprecate avcodec_thread_init()Alexander Strange2011-02-09
| | | | | | | | | | | | | | As a side effect of the last commit, avcodec_open() now calls it automatically, so there is no longer any need for clients to call it. Instead they should set AVCodecContext.thread_count. avcodec_thread_free() is deprecated, and will be removed from avcodec.h at the next MAJOR libavcodec bump. Rename the functions to ff_thread_init/free, since they are now internal. Wrappers are provided to maintain API compatibility. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* Frame-based multithreading framework using pthreadsAlexander Strange2011-02-09
| | | | | | See doc/multithreading.txt for details on use in codecs. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* Remove avcodec_thread_execute from avcodec.h, and make static functions thatBenoit Fouet2010-03-15
| | | | | | need it in *thread.c. Originally committed as revision 22544 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Make avcodec_thread_execute2() staticAndreas Öman2010-03-08
| | | | Originally committed as revision 22324 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Always call avcodec_thread_init()Måns Rullgård2010-01-20
| | | | | | | | | The various avcodec_thread_init() functions are updated to return immediately after setting avctx->thread_count. This allows -threads 0 to pass through to codecs. It also simplifies the usage for apps using libavcodec. Originally committed as revision 21358 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add an execute2 function that is more flexible and allows to use parallelReimar Döffinger2009-10-12
| | | | | | | | processing with jobs > threads without wasting too much memory. It also avoids needing a separate int array when the only additional data the jobs needs is a single int running from 0 to count-1. Originally committed as revision 20210 to svn://svn.ffmpeg.org/ffmpeg/trunk
* cosmetics: Remove pointless period after copyright statement non-sentences.Diego Biurrun2009-01-19
| | | | Originally committed as revision 16684 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Avoid invasion of POSIX-reserved _t namespace.Diego Biurrun2008-12-15
| | | | Originally committed as revision 16144 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Making it easier to send arbitrary structures as work orders to MT workersRoman Shaposhnik2008-11-12
| | | | Originally committed as revision 15804 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add attribute that forces alignment of stack to functions that need it.Ramiro Polla2007-08-13
| | | | | | | | | Necessary for systems that don't align by default to 16 bytes, required by some SSE instructions. Requires GCC >= 4.2. Based on patch by Gaël Chardon. Originally committed as revision 10106 to svn://svn.ffmpeg.org/ffmpeg/trunk
* set thread_opaque to NULL when freeing itBenoit Fouet2007-07-06
| | | | Originally committed as revision 9506 to svn://svn.ffmpeg.org/ffmpeg/trunk
* license header consistency cosmeticsDiego Biurrun2007-07-05
| | | | Originally committed as revision 9484 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove redundant #inclusion of common.h, avcodec.h already #includes it.Diego Biurrun2007-05-10
| | | | Originally committed as revision 8967 to svn://svn.ffmpeg.org/ffmpeg/trunk
* rename always_inline to av_always_inline and move to common.hMåns Rullgård2006-12-08
| | | | Originally committed as revision 7256 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Change license headers to say 'FFmpeg' instead of 'this program/this library'Diego Biurrun2006-10-07
| | | | | | and fix GPL/LGPL version mismatches. Originally committed as revision 6577 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Update licensing information: The FSF changed postal address.Diego Biurrun2006-01-12
| | | | Originally committed as revision 4842 to svn://svn.ffmpeg.org/ffmpeg/trunk
* COSMETICS: tabs --> spaces, some prettyprintingDiego Biurrun2005-12-22
| | | | Originally committed as revision 4764 to svn://svn.ffmpeg.org/ffmpeg/trunk
* COSMETICS: Remove all trailing whitespace.Diego Biurrun2005-12-17
| | | | Originally committed as revision 4749 to svn://svn.ffmpeg.org/ffmpeg/trunk
* 10l fixes by ("Debabrata Banerjee" <davatar at comcast dot net>)Michael Niedermayer2004-05-26
| | | | Originally committed as revision 3161 to svn://svn.ffmpeg.org/ffmpeg/trunk
* * reimplementation using mutexes and condition variables.Roman Shaposhnik2004-05-18
| | | | Originally committed as revision 3138 to svn://svn.ffmpeg.org/ffmpeg/trunk
* count > thread_count for execute()Michael Niedermayer2004-03-03
| | | | Originally committed as revision 2842 to svn://svn.ffmpeg.org/ffmpeg/trunk
* w32threads by (Gildas Bazin <gbazin at altern dot org>)Michael Niedermayer2004-02-19
| | | | Originally committed as revision 2803 to svn://svn.ffmpeg.org/ffmpeg/trunk
* multithreaded/SMP motion estimationMichael Niedermayer2004-02-13
multithreaded/SMP encoding for MPEG1/MPEG2/MPEG4/H263 all pthread specific code is in pthread.c to try it, run configure --enable-pthreads and ffmpeg ... -threads <num> the internal thread API is a simple AVCodecContext.execute() callback which executes a given function pointer with different arguments and returns after finishing all, that way no mutexes or other thread-mess is needed outside pthread.c Originally committed as revision 2772 to svn://svn.ffmpeg.org/ffmpeg/trunk