]> git.sesse.net Git - x264/commit
Threaded lookahead
authorSteven Walters <kemuri9@gmail.com>
Wed, 2 Sep 2009 01:46:51 +0000 (18:46 -0700)
committerFiona Glaser <fiona@x264.com>
Wed, 2 Sep 2009 04:06:20 +0000 (21:06 -0700)
commit6940dcaef140d8a0c43c9a62db158e9d71a8fdeb
tree10817a6e4ca0519d10fd50df58ccfb9149faf33d
parent7df6f5d62983432414016f5ec18f71f17626354e
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