[x264-devel] x264 benchmarking

Christian Bienia cbienia at CS.Princeton.EDU
Mon Oct 9 02:35:40 CEST 2006


Hi,

I'm about to run a few benchmarks to analyze the performance of x264's
parallel encoder. I have two questions, I'd appreciate if somebody could
help me here:

1. How exactly is x264 parallelized? From my source code review, I
understand that for each slice, no more than X264_SLICE_MAX threads are
started (I assume a slice corresponds to a frame):

    h->param.i_threads = x264_clip3( h->param.i_threads, 1,
X264_SLICE_MAX );
    h->param.i_threads = X264_MIN( h->param.i_threads,
(h->param.i_height + 15) >> (4 + h->param.b_interlaced) );

Furthermore, the height of the slice (param.i_height) is an upper bound
on the amount of parallelism each slice contains. x264 cannot encode
multiple frames simultaneously if the amount of CPUs exceeds the upper
bound. Could somebody confirm that?

2. How does x264 detect the number of frames in a YUV video? I have a
case where x264 detects twice as many frames in the benchmark input I
created than are actually available. I used ffmpeg to merge multiple PNG
files to a YUV420P video, and now I'm wondering why the number of frames
doubled.

- Chris

-- 
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