Re: multithreaded vorbis encoding

Thomas Eschenbacher <[email protected]> Sat, 19 Nov 2011 20:23:01 +0100
Newsgroups gmane.comp.multimedia.ogg.vorbis.devel
Message-ID <[email protected]>
[email protected] wrote:
> [...] 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.

Oh that's bad. Parallelizing anything else than vorbis_analysis could
give only a performance gain in the range of a single-digit percentage,
which is not wort the effort.

> [...]
>> => 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.

But what about the loop that is around that, in my code I have a loop
over "buffers", which are then devided into blocks. So is one buffer one
"logical unit", so that I could process buffers in parallel, or are they
just parts of a sequential stream, like the "blocks"?

For reference, you could see my code here:
> http://kwave.svn.sourceforge.net/viewvc/kwave/trunk/plugins/codec_ogg/OggEncoder.cpp?revision=HEAD&view=markup / (lines 300..361).

Do you see any chance to speed this up?

Thomas