Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 20th September 2015, 02:43   #1  |  Link
kotuwa
Registered User
 
Join Date: May 2012
Posts: 66
lookahead-threads vs quality and

x264. What are the impacts of lookahead-threads value regarding the quality?

Is it related to to other things such as VBV, MB-Tree, rc-lookahead.. etc?

I heard that too high number of threads like more than 16 may affect the quality a little bit. right?
Is it same with lookahead-threads?
Or different...
lookahead thread count said to be like threads/6 (or threads/4 as I observed, either it is changed now or depends on other parameters)

Among below 3 examples, which would give the better quality theoretically. Is the difference too insignificant? or not? (Encoding time is irrelevant)

threads 16, lookahead-threads 4
threads 12, lookahead-threads 3
threads 8, lookahead-threads 2
threads 4, lookahead-threads 1
threads 2, lookahead-threads 1
threads 1, lookahead-threads 1


kotuwa is offline   Reply With Quote
Old 21st September 2015, 13:20   #2  |  Link
zerowalker
Registered User
 
Join Date: Jul 2011
Posts: 1,121
Not that into this but i think that any kind of threading is bad for quality cause you can't share the information between the threads or something.
So for highest quality you would do no threads at all.
However that's not realistic, the difference is so small (as long as it's not a ton of threads) and the speed boost is great.

I don't talk from a developers standpoint though, just from some knowhow, which might be wrong;p
zerowalker is offline   Reply With Quote
Old 21st September 2015, 22:27   #3  |  Link
Asmodian
Registered User
 
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,407
Too many lookahead threads causes slower performance but not, as I understand it, worse quality. Lookahead happens before encoding so the information from all lookahead threads is available to every encode thread.

Your examples are wrong in that threads 1, lookahead-threads 1 will be the best quality but only because of threads, not lookahead-threads.

When the number of threads starts significantly affecting quality is dependent on the horizontal resolution as well. The over 16 rule of thumb is for 1080p, use less threads for lower resolutions and more for higher.

threads 8, lookahead-threads 2 will be the same quality and size as threads 8, lookahead-threads 1.
__________________
madVR options explained
Asmodian is offline   Reply With Quote
Old 21st September 2015, 22:44   #4  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Here is a good thread on the topic. I agree with Asmodian on the influence of lookahead threads on quality - it should be nil or at least negligible.
Groucho2004 is offline   Reply With Quote
Old 22nd September 2015, 07:42   #5  |  Link
F J Walter
Registered User
 
Join Date: Oct 2007
Posts: 47
x264 does frame-based multithreading where a certain number of threads are used for the encode, and then there is a thread (or threads) for lookahead. Because lookahead uses such a small portion of CPU time compared to the encode you only need roughly 1/6 as many lookahead threads as encode threads.

The fact that multiple lookahead threads are enabled by default (when using a certain number of threads) is a good indication that there is no noticeable quality loss. MBtree is done in lookahead, and so that quality may be affected in the same way that motion estimation quality can be affected by multithreading in the encode, but the effect will be negligible enough to ignore - even more so than it is in the encode.

It's wrong to say there is *no* difference at all, just that the difference is ignorable. I just did a test myself: compared 1 vs 2 lookahead threads (both times with 6 encode threads) and the resulting file *is* different.

Last edited by F J Walter; 22nd September 2015 at 07:51.
F J Walter is offline   Reply With Quote
Old 23rd September 2015, 18:53   #6  |  Link
kotuwa
Registered User
 
Join Date: May 2012
Posts: 66
Thanks for the Replies
kotuwa is offline   Reply With Quote
Reply

Tags
lookahead, lookahead-threads, mbtree, threads, vbv


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:21.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.