wm4
9b121dfc32
w32pthreads: always use Vista+ API, drop XP support
...
This removes the XP compatibility code, and switches entirely to SWR
locks, which are available starting at Windows Vista.
This removes CRITICAL_SECTION use, which allows us to add
PTHREAD_MUTEX_INITIALIZER, which will be useful later.
Windows XP is hereby not a supported build target anymore. It was
decided in a project vote that this is OK.
7 years ago
Muhammad Faiz
22b72de04b
avfilter/pthread: use slice threading from avutil
...
Benchmark (with 2 cpus):
./ffmpeg -f rawvideo -s 1280x720 -t 1000 -i /dev/zero \
-filter_threads $threads -vf transpose=clock -f null null
threads=2:
old: 31.129s 31.446s 31.574s
new: 29.602s 29.636s 29.656s
threads=3 (nb_threads = nb_cpus + 1 is bad choice at this situation):
old: 40.132s 40.279s 40.279s
new: 39.308s 39.570s 39.693s
threads=4:
old: 31.306s 31.366s 31.654s
new: 30.231s 30.360s 30.451s
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
7 years ago
Clément Bœsch
473f0f75a1
lavfi: fix race when func rets holder is NULL
...
If ret is NULL, a dummy common holder is created to hold *all* the
parallel function returns, which gets written concurrently. This commit
simplify the whole logic by simply not writing to that holder when not
set.
8 years ago
Vittorio Giovara
41ed7ab45f
cosmetics: Fix spelling mistakes
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
9 years ago
Diego Biurrun
29c2d06d67
cosmetics: Drop empty comment lines
9 years ago
Clément Bœsch
17d41220d8
lavfi/pthread: fix perameters/parameters typo
9 years ago
Clément Bœsch
a362015641
lavc,lavfi: use avutil/thread.h instead of redundant conditional includes
...
This was somehow forgotten in a8bb81a05c
.
9 years ago
Michael Niedermayer
658f5d1f63
avfilter/pthread: Use av_mallocz_array()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Derek Buitenhuis
692b930904
lavfi/pthread: Avoid crashes/odd behavior caused by spurious wakeups
...
This is similar to 5152196b2b
.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
11 years ago
Derek Buitenhuis
3511d4fc97
pthread: Avoid crashes/odd behavior caused by spurious wakeups
...
This is similar to 5152196b2b
.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
11 years ago
Derek Buitenhuis
eb90a2091f
pthread: Fix deadlock during thread initialization
...
Sometimes, if pthread_create() failed, then pthread_cond_wait() could
accidentally be called in the worker threads after the uninit function
had already called pthread_cond_broadcast(), leading to a deadlock.
Don't call pthread_cond_wait() if c->done is set.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
11 years ago
Anton Khirnov
0767bfd199
lavfi: allow user-provided execute() callbacks
11 years ago
Sean McGovern
50612484e0
pthread: Rename thread_init to avoid symbol collision
...
The AIX threads library exposes a function with the same name.
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Carl Eugen Hoyos
674d8a9629
Rename thread_init() in libavcodec and libavfilter as library_thread_init().
...
The aix header sys/thread.h contains a definition for thread_init().
12 years ago
Dave Yeo
e615a77799
os2threads: move from lavc to compat/
...
For useage in other places besides lavc. Needed after commit
90f9a5830b
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
4cf7b87551
av_cpu_count: factorize "detected %d logical cores" message
...
Also print the message just once
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
129bb23843
lavfi: add a slice threading infrastructure
...
Mostly based on libavcodec's
12 years ago