| Branch: | Revision:

ffmpeg / libavcodec / pthread.c @ 043d2ff2

History | View | Annotate | Download (27 KB)

# Date Author Comment
043d2ff2 02/11/2011 01:54 AM Alexander Strange

Deprecate avcodec_thread_init()

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...

b38f008e 02/11/2011 01:53 AM Alexander Strange

Frame-based multithreading framework using pthreads

See doc/multithreading.txt for details on use in codecs.

Signed-off-by: Ronald S. Bultje <>

4a287145 03/15/2010 02:03 PM Benoit Fouet

Remove avcodec_thread_execute from avcodec.h, and make static functions that
need it in *thread.c.

Originally committed as revision 22544 to svn://

e31fefd4 03/08/2010 12:55 PM Andreas Öman

Make avcodec_thread_execute2() static

Originally committed as revision 22324 to svn://

68cf92ee 01/20/2010 10:55 PM Måns Rullgård

Always call avcodec_thread_init()

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....

8d23a86f 10/12/2009 11:35 AM Reimar Döffinger

Add an execute2 function that is more flexible and allows to use parallel
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....

406792e7 01/19/2009 03:46 PM Diego Biurrun

cosmetics: Remove pointless period after copyright statement non-sentences.

Originally committed as revision 16684 to svn://

c4687bf6 12/15/2008 09:02 PM Diego Biurrun

Avoid invasion of POSIX-reserved _t namespace.

Originally committed as revision 16144 to svn://

3a84713a 11/12/2008 05:47 PM Roman Shaposhnik

Making it easier to send arbitrary structures as work orders to MT workers

Originally committed as revision 15804 to svn://

5e4c7ca2 08/13/2007 03:28 PM Ramiro Polla

Add attribute that forces alignment of stack to functions that need it.
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://

b54bb84c 07/06/2007 03:17 PM Benoit Fouet

set thread_opaque to NULL when freeing it

Originally committed as revision 9506 to svn://

e5a389a1 07/05/2007 10:40 AM Diego Biurrun

license header consistency cosmetics

Originally committed as revision 9484 to svn://

2029f312 05/10/2007 09:00 AM Diego Biurrun

Remove redundant #inclusion of common.h, avcodec.h already #includes it.

Originally committed as revision 8967 to svn://

849f1035 12/08/2006 12:35 AM Måns Rullgård

rename always_inline to av_always_inline and move to common.h

Originally committed as revision 7256 to svn://

b78e7197 10/07/2006 03:30 PM Diego Biurrun

Change license headers to say 'FFmpeg' instead of 'this program/this library'
and fix GPL/LGPL version mismatches.

Originally committed as revision 6577 to svn://

5509bffa 01/12/2006 10:43 PM Diego Biurrun

Update licensing information: The FSF changed postal address.

Originally committed as revision 4842 to svn://

bb270c08 12/22/2005 01:10 AM Diego Biurrun

COSMETICS: tabs --> spaces, some prettyprinting

Originally committed as revision 4764 to svn://

115329f1 12/17/2005 06:14 PM Diego Biurrun

COSMETICS: Remove all trailing whitespace.

Originally committed as revision 4749 to svn://

12013f67 05/26/2004 08:04 PM Michael Niedermayer

10l fixes by ("Debabrata Banerjee" <davatar at comcast dot net>)

Originally committed as revision 3161 to svn://

a8eb52a8 05/18/2004 01:53 AM Roman Shaposhnik
  • reimplementation using mutexes and condition variables.

Originally committed as revision 3138 to svn://

399cec2f 03/03/2004 07:29 PM Michael Niedermayer

count > thread_count for execute()

Originally committed as revision 2842 to svn://

16806499 02/19/2004 08:29 PM Michael Niedermayer

w32threads by (Gildas Bazin <gbazin at altern dot org>)

Originally committed as revision 2803 to svn://

9c3d33d6 02/13/2004 05:54 PM Michael Niedermayer

multithreaded/SMP motion estimation
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...