]> git.sesse.net Git - ffmpeg/commit
avcodec/pthread_slice: use slice threading from avutil
authorMuhammad Faiz <mfcc64@gmail.com>
Tue, 11 Jul 2017 23:58:07 +0000 (06:58 +0700)
committerMuhammad Faiz <mfcc64@gmail.com>
Wed, 19 Jul 2017 08:51:32 +0000 (15:51 +0700)
commitb505f15b1530d72682b3314e84936f80fe6e43b2
treeadec9cf0fb1adf00e0e2e6d15ceaf32274470014
parenta3d3cfa65c01123edf46d22c3fab7ef1bb428b37
avcodec/pthread_slice: use slice threading from avutil

Also remove pthread_cond_broadcast(progress_cond) on uninit.
Broadcasting it is not required because workers are always
parked when they are not in thread_execute. So it is imposible
that a worker is waiting on progress_cond when uninitialized.

Benchmark:
./ffmpeg -threads $threads -thread_type slice -i 10slices.mp4 -f null null
threads=2:
  old: 70.212s 70.525s 70.877s
  new: 65.219s 65.377s 65.484s
threads=3:
  old: 65.086s 66.306s 66.409s
  new: 63.229s 65.026s 65.116s
threads=4:
  old: 60.993s 61.482s 62.123s
  new: 59.224s 59.441s 59.667s
threads=5:
  old: 57.576s 57.860s 58.832s
  new: 53.032s 53.948s 54.086s

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
libavcodec/pthread_slice.c