[XviD-devel] multithreaded xvid

Radek Czyz radoslaw at syskin.cjb.net
Fri Feb 24 15:23:13 CET 2006


Hi again,

Update on that - running encoding in parallel with ME was only useful 
under some unusual circumstances, such as no other process doing 
anything. As soon as I used a real avisynth script, finishing ME first 
and doing encoding later was better.
All that became even better at lower quality settings (such as first pass).

So, I just updated the code - now ME runs first, on num_threads threads.

num_threads  = 0 means old code path while num_threads = 1 means new, 
but there is no difference in output, and probably no measurable 
difference in speed. I'll probably remove old code completely once this 
proves stable.

Radek

Radek Czyz wrote:
> 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.
> _______________________________________________
> XviD-devel mailing list
> XviD-devel at xvid.org
> http://list.xvid.org/mailman/listinfo/xvid-devel
> 
> 


More information about the XviD-devel mailing list