aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/pthread.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove unnecessary parameter from ff_thread_init() and fix behaviorAlexander Strange2011-04-051-1/+1
| | | | | | | | | | | thread_count passed to ff_thread_init() is only used to set AVCodecContext. thread_count, and can be removed. Instead move it to the legacy implementation of avcodec_thread_init(). This also fixes the problem that calling avcodec_thread_init() with pthreads enabled did not set it since ff1efc524cb3c60f2f746e3b4550bb1a86c65316. Signed-off-by: Janne Grunau <janne-libav@jannau.net>
* lavc: mark hurry_up for removal on next major bumpAnton Khirnov2011-04-021-0/+2
| | | | | It has been deprecated for about five years, skip_idct/skip_frame should be used instead.
* Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-191-4/+4
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* threads: allow thread count of zeroMans Rullgard2011-03-021-2/+5
| | | | | | | | | 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-011-2/+7
| | | | | | | | | 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-091-3/+3
| | | | | | | | | | | | | | 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-091-4/+718
| | | | | | 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-151-1/+1
| | | | | | need it in *thread.c. Originally committed as revision 22544 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Make avcodec_thread_execute2() staticAndreas Öman2010-03-081-1/+1
| | | | Originally committed as revision 22324 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Always call avcodec_thread_init()Måns Rullgård2010-01-201-1/+5
| | | | | | | | | 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-121-1/+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-191-1/+1
| | | | Originally committed as revision 16684 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Avoid invasion of POSIX-reserved _t namespace.Diego Biurrun2008-12-151-3/+3
| | | | 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-121-3/+6
| | | | 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-131-1/+1
| | | | | | | | | 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-061-1/+1
| | | | Originally committed as revision 9506 to svn://svn.ffmpeg.org/ffmpeg/trunk
* license header consistency cosmeticsDiego Biurrun2007-07-051-1/+0
| | | | 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-101-1/+0
| | | | 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-081-1/+1
| | | | 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-071-4/+6
| | | | | | 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-121-1/+1
| | | | Originally committed as revision 4842 to svn://svn.ffmpeg.org/ffmpeg/trunk
* COSMETICS: tabs --> spaces, some prettyprintingDiego Biurrun2005-12-221-17/+17
| | | | Originally committed as revision 4764 to svn://svn.ffmpeg.org/ffmpeg/trunk
* COSMETICS: Remove all trailing whitespace.Diego Biurrun2005-12-171-21/+21
| | | | 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-261-2/+2
| | | | Originally committed as revision 3161 to svn://svn.ffmpeg.org/ffmpeg/trunk
* * reimplementation using mutexes and condition variables.Roman Shaposhnik2004-05-181-155/+122
| | | | Originally committed as revision 3138 to svn://svn.ffmpeg.org/ffmpeg/trunk
* count > thread_count for execute()Michael Niedermayer2004-03-031-46/+108
| | | | Originally committed as revision 2842 to svn://svn.ffmpeg.org/ffmpeg/trunk
* w32threads by (Gildas Bazin <gbazin at altern dot org>)Michael Niedermayer2004-02-191-7/+7
| | | | Originally committed as revision 2803 to svn://svn.ffmpeg.org/ffmpeg/trunk
* multithreaded/SMP motion estimationMichael Niedermayer2004-02-131-0/+139
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