[Vorbis-dev] multithreaded vorbis encoding

xiphmont at xiph.org xiphmont at xiph.org
Fri Nov 18 13:27:32 PST 2011


> By analyzing that process with valgrind/cachegrind I found out that 95%
> of the time used for encoding is spent in the function
> "vorbis_analysis(&vb, 0)".

Yes, it's the top-level wrapper for most processing.

> My question now is: would it be technically possible to parallelize this?

You can parallelize some, but a call to vorbis_analysis() requires
state from a previous call to vorbis_analysis.  There is some
interframe analysis happening.

> I think about using multiple worker threads for the vorbis_analysis calls,
> especiall on multi core systems this would be a big benefit.
>
> => Are the blocks passed as "vb" independent from each other,
>   so that I can encode them in parallel?

The 'vb' wraps internal dsp state that is not independent from block to block.

Monty


More information about the Vorbis-dev mailing list