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 8th October 2013, 02:42   #1  |  Link
xkfz007
Registered User
 
Join Date: Sep 2013
Posts: 38
ABR Buffer Size of X264 Rate Control

In the abr mode of x264 rate control, a buffer is used. However, the buffer size is changing, which is increasing by step sqrt(fps value), such as sqrt(25), sqrt(30), sqrt(50). I do not understand the reason why the buffer size is variable, rather than a constant? Someone please give me some hints.
xkfz007 is offline   Reply With Quote
Old 8th October 2013, 02:50   #2  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
In 1-pass ABR, the goal is to hit an average bitrate for the whole video, without any constraints. The encoder does not know the length of the video, so the "buffer size" for this decision increases as it gets more and more frames. Ideally (as in 2-pass), the "buffer" would be the entire video.

As far as I can tell though, the sqrt is of the duration of the video so far, not the fps.
Dark Shikari is offline   Reply With Quote
Old 8th October 2013, 03:37   #3  |  Link
xkfz007
Registered User
 
Join Date: Sep 2013
Posts: 38
Thanks very much. It is the duration of the video, and I remembered incorrectly. It is my honor to get a reply from the professor of x264.
xkfz007 is offline   Reply With Quote
Old 8th October 2013, 04:09   #4  |  Link
xkfz007
Registered User
 
Join Date: Sep 2013
Posts: 38
Buffer Size Increase

Quote:
Originally Posted by Dark Shikari View Post
In 1-pass ABR, the goal is to hit an average bitrate for the whole video, without any constraints. The encoder does not know the length of the video, so the "buffer size" for this decision increases as it gets more and more frames. Ideally (as in 2-pass), the "buffer" would be the entire video.

As far as I can tell though, the sqrt is of the duration of the video so far, not the fps.
In x264 1-pass ABR, the initial value of the buffersize is:
Code:
abr_buffer = 2 * rcc->rate_tolerance * rcc->bitrate
Suppose the rcc->rate_tolerance equals 1.0. So the initial value is the twice the value of bits of first seconds. And the following size increases every second. I wander if it is reasonable to set the initial value of abr buffer as rcc->bitrate*1(the bits of first second), and increase the it by rcc->bitrate*1, which means for the first second the value is rcc->bitrate*1, second for rcc->bitrate*2, third for rcc->bitrate*3?
xkfz007 is offline   Reply With Quote
Reply

Tags
rate control, x264

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:25.


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