Skip to content
  • Steven Walters's avatar
    Threaded lookahead · 6940dcae
    Steven Walters authored
    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.
    6940dcae