]> git.videolan.org Git - x264.git/commit
Threaded lookahead
authorSteven Walters <kemuri9@gmail.com>
Wed, 2 Sep 2009 01:46:51 +0000 (18:46 -0700)
committerJason Garrett-Glaser <darkshikari@gmail.com>
Wed, 2 Sep 2009 04:06:20 +0000 (21:06 -0700)
commit5b3c89c592e412fc02fd8001ee361ea50c249153
treef5419f7de7e29d932b694a394075ee21e63e0ad0
parent326113b4f57de6c5a2599c047ab5c7762b1a4b13
Threaded lookahead
Move lookahead into a separate thread, set to higher priority than the other threads, for optimal performance.
Reduces the amount that lookahead bottlenecks encoding, greatly increasing performance with lookahead-intensive settings (e.g. b-adapt 2) on many-core CPUs.
Buffer size can be controlled with --sync-lookahead, which defaults to auto (threads+bframes buffer size).
Note that this buffer is separate from the rc-lookahead value.
Note also that this does not split lookahead itself into multiple threads yet; this may be added in the future.
Additionally, split frames into "fdec" and "fenc" frame types and keep the two separate.
This split greatly reduces memory usage, which helps compensate for the larger lookahead size.
Extremely special thanks to Michael Kazmier and Alex Giladi of Avail Media, the original authors of this patch.
16 files changed:
Makefile
common/common.c
common/common.h
common/cpu.h
common/frame.c
common/frame.h
common/macroblock.c
common/osdep.h
common/x86/cpu-a.asm
encoder/analyse.h
encoder/encoder.c
encoder/lookahead.c [new file with mode: 0644]
encoder/ratecontrol.c
encoder/slicetype.c
x264.c
x264.h