[x264-devel] commit: Threaded lookahead (Steven Walters )

git version control git at videolan.org
Wed Sep 2 06:16:40 CEST 2009


x264 | branch: master | Steven Walters <kemuri9 at gmail.com> | Tue Sep  1 18:46:51 2009 -0700| [5b3c89c592e412fc02fd8001ee361ea50c249153] | committer: Jason Garrett-Glaser 

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.

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=5b3c89c592e412fc02fd8001ee361ea50c249153
---

 Makefile              |    2 +-
 common/common.c       |    8 ++
 common/common.h       |   26 +++--
 common/cpu.h          |    8 +-
 common/frame.c        |  202 +++++++++++++++++++++++-------------
 common/frame.h        |   25 ++++-
 common/macroblock.c   |    2 +-
 common/osdep.h        |   13 +++
 common/x86/cpu-a.asm  |    4 +-
 encoder/analyse.h     |    8 ++
 encoder/encoder.c     |  127 +++++++++-------------
 encoder/lookahead.c   |  278 +++++++++++++++++++++++++++++++++++++++++++++++++
 encoder/ratecontrol.c |    8 +-
 encoder/slicetype.c   |  107 ++++++++++----------
 x264.c                |    4 +-
 x264.h                |    4 +-
 16 files changed, 598 insertions(+), 228 deletions(-)

Diff:   http://git.videolan.org/gitweb.cgi/x264.git/?a=commitdiff;h=5b3c89c592e412fc02fd8001ee361ea50c249153


More information about the x264-devel mailing list