Re: multithreaded vorbis encoding
[email protected] Fri, 18 Nov 2011 16:27:32 -0500
| Newsgroups | gmane.comp.multimedia.ogg.vorbis.devel |
|---|---|
| Message-ID | <CACrD=+_PNWN8FaXJQsCnWH6k5tsKSorx9WuzXk3LF1xZSpC27Q@mail.gmail.com> |
> 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