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

Reply
 
Thread Tools Search this Thread Display Modes
Old 3rd June 2011, 09:45   #1  |  Link
OpasanNekiLik
Registered User
 
Join Date: Aug 2010
Posts: 12
2 B frames encoding time anomaly

Could someone explain to me the anomaly why x264 encoder needs more time for encoding with 2 B frames than with 3 B frames?

I made test where I encoded a video sequence with various number [0..16] of B frames between keyframes. The best quality was achieved with 2 and 3 B frames but for some reason 2 B frames require more encoding time than 1 or 3 B frames.

Test can be found here.
OpasanNekiLik is offline   Reply With Quote
Old 3rd June 2011, 11:38   #2  |  Link
detmek
Registered User
 
Join Date: Aug 2009
Posts: 463
New b-pyramid algorithm increases encoding speed, even for --b-adapt 2. If 3 B frames activates b-pyramid, maybe that is a reason.
detmek is offline   Reply With Quote
Old 5th June 2011, 01:23   #3  |  Link
akupenguin
x264 developer
 
akupenguin's Avatar
 
Join Date: Sep 2004
Posts: 2,392
Pyramid is slower than non-pyramid, because pyramid allows the use of more references, namely the 2nd future ref in disposable b-frames prior to the B-ref. Pyramid is enabled by default when B>=2. Pyramid with B==2 has a greater fraction of "disposable b-frames prior to the B-ref" than B==3 does. And indeed, the speed bump goes away if you set ref=1 and/or pyramid=none.

Pyramid=strict is faster than pyramid=normal because strict forbids the use of some refs that normal allows. This is not an optimization, just a loss of an opportunity.
akupenguin is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 21:33.


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