[x264-devel] Re: Questions about x264 encoder apis

Loren Merritt lorenm at u.washington.edu
Thu Mar 31 08:30:13 CEST 2005


On Wed, 30 Mar 2005, Bill May wrote:

> 1). in x264_picture_alloc, you allocate the YUV space, and have the user 
> copy the data into that space.  Do you alter the YUV data ?  Would it be
> possible to have a mode where the caller could just set the correct data and 
> save potential data copies ?

We do not modify the input data. Yes, such an optimization would be 
possible. Note that there may currently be some assumptions about the 
strides that would have to be met or fixed.

> 2). Do you have any plans to install the library and include files so they 
> could be detected by other projects via configure ?

Done. Unless you mean some more complicated automake system, in which 
case, no I have no such plans.

> 3). To force a key frame, is it better to set i_frame_reference or 
> i_keyint_max ?  i_frame_reference seems to do the trick, but I'd like to 
> make sure.

frame_reference has nothing to do with keyframes. x264 forces a keyframe 
when the distance between keyframes would exceed keyint_max. Or if you 
mean interactively, then set x264_picture_t.i_type=X264_TYPE_IDR.

> 5). i_bitrate is in bits per second ?  If I use b_cbr, what should I set the 
> other parameters to ?

kbit/sec.
Good values are rc_buffer_size = .5-1 seconds worth of bits (measured in 
kbit), and rc_init_buffer = .5*rc_buffer_size (measured in kbit). Or just 
leave them 0 and let x264 fill them in based on bitrate.

> 4). I'd like to make it work as fast as possible.  So, I want to set b_psnr 
> to 0.  Any other things to make it faster ?
>
> 6). Any ideas about which nerd knobs would make sense (b_cabac, etc) ?

cabac should always be on, no need to expose it.
The main options (regarding quality vs speed) are subpel_refine, 
frame_reference, and bframe.
For most of the other options: you can play with them if you know what 
you're doing, but otherwise they're just there for my own convenience in 
searching for good defaults.

--Loren Merritt

-- 
This is the x264-devel mailing-list
To unsubscribe, go to: http://developers.videolan.org/lists.html



More information about the x264-devel mailing list