summaryrefslogtreecommitdiff
path: root/libavutil/slicethread.c
Commit message (Collapse)AuthorAgeFilesLines
* slicethread: Limit the automatic number of threads to 16Martin Storsjö2022-09-061-1/+3
| | | | | | | | | | | This matches a similar cap on the number of automatic threads in libavcodec/pthread_slice.c. On systems with lots of cores, this fixes a couple fate failures in 32 bit mode on such machines (where spawning a huge number of threads runs out of address space). Signed-off-by: Martin Storsjö <martin@martin.st>
* avutil/avassert: Don't include avutil.hAndreas Rheinhardt2022-02-241-0/+1
| | | | | Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavu/slicethread: return ENOSYS rather than EINVAL in the dummy funcAnton Khirnov2021-08-291-1/+1
| | | | | | EINVAL is the wrong error code here, since the arguments passed to the function are valid. The error is that the function is not implemented in the build, which corresponds to ENOSYS.
* avcodec/avcodec: Don't include cpu.hAndreas Rheinhardt2021-07-221-0/+1
| | | | | | | It is not used here at all; instead, add it where it is used without including it or any of the arch-specific CPU headers. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* w32pthreads: always use Vista+ API, drop XP supportwm42017-12-261-4/+0
| | | | | | | | | | | 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.
* avutil: merge slice threading implementation from avcodec and avfilterMuhammad Faiz2017-07-191-0/+259
Rework it to improve performance. Now mutex is not shared by workers, instead each worker has its own mutex and condition variable. This reduces lock contention between workers. Also use atomic variable for counter. The interface also allows execute to run special function on main thread, requested by Ronald. Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>