Log in

View Full Version : On the multi-threading and lookahead in x264


stoneiii
19th July 2011, 06:55
Hello,
Lookahead is a new feature added into x264 of current version compared to the old one I have read previously. So I am a little confused about its effect especially its combination with the multi-threading.

How does it affect reference buffer management and slice type decision? Does lookahead operation only does in one thread?

Could anyone give me a brief introduction so that I should know how to carry on my study.
Thanks in advance

stoneiii
19th July 2011, 07:01
Does the functions, x264_lookahead_get_frames and x264_lookahead_slicetype_decide always be called?
Or they are only called when param.rc.i_lookahead>0?

Dark Shikari
19th July 2011, 07:03
x264 has always had a lookahead. The "new feature" is that x264's lookahead now has its own separate thread, to limits its ability to bottleneck the main encode.

If you have detailed questions about the code you should ask on #x264dev on Freenode.