avutil: merge slice threading implementation from avcodec and avfilter
authorMuhammad Faiz <mfcc64@gmail.com>
Tue, 11 Jul 2017 23:42:23 +0000 (06:42 +0700)
committerMuhammad Faiz <mfcc64@gmail.com>
Wed, 19 Jul 2017 08:50:07 +0000 (15:50 +0700)
commita3d3cfa65c01123edf46d22c3fab7ef1bb428b37
tree209ff56753daa8af1d416df3d946a3ae1035776a
parent5c9dcd5c484f56fb9fb5d277256439f0becce12c
avutil: merge slice threading implementation from avcodec and avfilter

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>
libavutil/Makefile
libavutil/slicethread.c [new file with mode: 0644]
libavutil/slicethread.h [new file with mode: 0644]
libavutil/version.h