[theora-dev] Multi-Thread Theora Encoder
Felipe Portavales Goldstein
portavales at gmail.com
Tue Oct 2 20:57:59 PDT 2007
On 10/2/07, Ralph Giles <giles at xiph.org> wrote:
> On Tue, Oct 02, 2007 at 06:51:10PM -0300, Felipe Portavales Goldstein wrote:
>
> > I'm happy to announce I developed a Multi-Threaded version of the
> > Theora encoder. I changed the Motion Vector Search part of the
> > algorithm to be executed in parallel.
>
> Excellent news! Please do check it into svn under a branch so we can try
> it out.
>
> What's the slowdown running the code on a uniprocessor?
As far as I tested the slowdown is less than 1 percent or irrelevant.
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.
The PickModes function is called one for each thread (in some sub-set
of Super-Blocks of the screen) and the final loop to re-order depends
on the number of Rows of SuperBlocks designated to each thread. This
re-ordering is made in linear time, also.
So, when running on a uniprocessor, there is only one thread and the
PickModes function acts just like before my modifications.
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.
>
> -r
>
--
________________________________________
Felipe Portavales Goldstein <portavales at gmail>
Undergraduate Student - IC-UNICAMP
Computer Systems Laboratory
http://www.students.ic.unicamp.br/~ra023772/
More information about the theora-dev
mailing list