[theora-dev] Multi-Thread Theora Encoder

Ralph Giles giles at xiph.org
Tue Oct 2 21:41:46 PDT 2007

On Wed, Oct 03, 2007 at 12:57:59AM -0300, Felipe Portavales Goldstein wrote:

> As far as I tested the slowdown is less than 1 percent or irrelevant.

Good, we should be able to include this in the mainline then.

> The only big difference in terms of performance is the extra-overhead
> in the PickModes function call and a extra final loop to re-order the
> Motion Vectors produced by each thread.

So this overhead can be skipped when there's only one thread.

> The only thing that I should do before submit is a way to control the
> number of threads at run time (discover the number of CPUs at run
> time). By now I have to recompile the code to have a different number
> of threads running.

The best way to do this is through the theora_control() interface, since 
applications will want control, and determining the number of available 
CPUs is very platform dependent.


More information about the theora-dev mailing list