[Flac-dev] Flac-dev Digest, Vol 45, Issue 2

Christopher Peplin chris.peplin at rhubarbtech.com
Tue May 6 16:52:24 PDT 2008


Along the same line as Frederick, myself and another university student were able to implement a multi threaded FLAC
encoder, but using Intel's Threading Building Blocks (TBB) package. We saw similar near-linear speedup.

Our solution is a bit more convoluted since we were learning the API, TBB and writing the encoder all in one 6 week
period. We used a pipeline model on the input stream, and considered each token in the pipeline to be a single block of
audio.

We also had to add some pipeline-safe functions to libFLAC. All of this is detailed in our project report, so I won't
repeat it here.

I agree with Frederick in that the existing encoding API was obviously designed for serial execution, and any internal
threading support would be messy. We had to come up with quite a few tricks to modify as little of libFLAC as possible.

Project report, patches and example encoder: http://rhubarbtech.com/things/pflac.tar.gz

Chris Peplin


More information about the Flac-dev mailing list