Commit d16a4da4 authored by Loren Merritt's avatar Loren Merritt

allow --vbv-init to take absolute values (in kbit), in addition to the...

allow --vbv-init to take absolute values (in kbit), in addition to the previous fractions of vbv-bufsize.


git-svn-id: svn://svn.videolan.org/x264/trunk@674 df754926-b1dd-0310-bc7b-ec298dee348c
parent 98494077
......@@ -221,6 +221,8 @@ int x264_ratecontrol_new( x264_t *h )
x264_log( h, X264_LOG_WARNING, "VBV buffer size too small, using %d kbit\n",
h->param.rc.i_vbv_buffer_size );
}
if( h->param.rc.f_vbv_buffer_init > 1. )
h->param.rc.f_vbv_buffer_init = x264_clip3f( h->param.rc.f_vbv_buffer_init / h->param.rc.i_vbv_buffer_size, 0, 1 );
rc->buffer_rate = h->param.rc.i_vbv_max_bitrate * 1000 / rc->fps;
rc->buffer_size = h->param.rc.i_vbv_buffer_size * 1000;
rc->buffer_fill_final = rc->buffer_size * h->param.rc.f_vbv_buffer_init;
......
......@@ -251,7 +251,7 @@ typedef struct x264_param_t
float f_rate_tolerance;
int i_vbv_max_bitrate;
int i_vbv_buffer_size;
float f_vbv_buffer_init;
float f_vbv_buffer_init; /* <=1: fraction of buffer_size. >1: kbit */
float f_ip_factor;
float f_pb_factor;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment