]> git.videolan.org Git - x264.git/commit
Threaded lookahead
authorJason Garrett-Glaser <jason@x264.com>
Tue, 8 May 2012 22:42:56 +0000 (15:42 -0700)
committerJason Garrett-Glaser <jason@x264.com>
Fri, 18 May 2012 23:15:14 +0000 (16:15 -0700)
commit999b753ff0f4dc872077f4fa90d465e948cbe656
tree303a70f7ece906d0a4b552c1e52e46dbfaf980b4
parentecfbf9d8025e39783bc4262dc1972ca742d8a993
Threaded lookahead

Split each lookahead frame analysis call into multiple threads.  Has a small
impact on quality, but does not seem to be consistently any worse.

This helps alleviate bottlenecks with many cores and frame threads. In many
case, this massively increases performance on many-core systems.  For example,
over 100% faster 1080p encoding with --preset veryfast on a 12-core i7 system.
Realtime 1080p30 at --preset slow should now be feasible on real systems.

For sliced-threads, this patch should be faster regardless of settings (~10%).

By default, lookahead threads are 1/6 of regular threads.  This isn't exacting,
but it seems to work well for all presets on real systems.  With sliced-threads,
it's the same as the number of encoding threads.
common/common.c
common/common.h
common/macroblock.c
common/threadpool.c
encoder/encoder.c
encoder/slicetype.c
x264.c
x264.h