[XviD-devel] multithreaded xvid

Radek Czyz radoslaw at syskin.cjb.net
Fri Feb 24 09:54:34 CET 2006


Hi everyone,

I just committed my multithreaded XviD code. It's a similar version to 
what you have seen before, but this time, the number of threads you 
specify is the number of EXTRA ME threads. These threads run in parallel 
with main thread, which does usual encoding (MC, quantization, bitstream).

If num_threads==0, there is no extra threads and everything behaves as 
before.
If num_threads > 0, resulting file is identical regardless of 
num_threads. If num_threads==0, resulting file is a tiny bit smaller (at 
same quant), and this is because fcodes can be re-calculated after ME 
finishes. It's definitely nothing significant.

Please check if the whole thing compiles and works on different OSes and 
architectures. I'd say it should, but I never checked.

The speedup on my X2 is significant (yay @ 50fps encoding, at defaults, 
720x576).

Comments, suggestions and speed results are welcome :)

Radek

PS. Never try to encode with num_threads>0 and lower priority. Speed 
suffers like hell. The higher priority the better.


More information about the XviD-devel mailing list