[flac-dev] More than 150 MB / second encoding ?

neheb at hushmail.com neheb at hushmail.com
Sun Mar 16 21:17:33 PDT 2014


Whoops I did not post to the mailing list. Original Message:

FLACCL might work: http://www.cuetools.net/wiki/FLACCL

The problems with it are: slow initialization time. The OpenCL kernel must be compiled during the first run. Which leads me to the second drawback.

It requires a GPU. Core i5s include an integrated GPU which can be utilized.

The latest version of FLACCL is at: http://www.cuetools.net/install/CUETools_2.1.5.zip

Recommended command line would probably be: -1 --lax --no-md5 --fast-gpu

--slow-gpu may produce faster results on your end. Needs to be tested. -1 could also be increased if needed. --no-md5 could also be removed but the code that calculates the MD5 hash is slow. I also think that an MD5 hash of the audio data is pointless since FLAC includes CRCs for every block.

Also, there is currently a bug in the flac.cl kernel which sometimes produces wrong encodes at higher compression levels. The fixed kernel can be downloaded from: http://sourceforge.net/p/cuetoolsnet/code/ci/default/tree/CUETools.Codecs.FLACCL/flac.cl?format=raw

For a slightly smaller size, you can change the line "cbits = min(cbits, clz(order + 1) + 1 - shared.task.obits);" to "cbits = min(cbits, clz(order) + 1 - shared.task.obits);". I checked with the author to make sure this is correct.

Also: BIG NOTE: The best results that I could get on my machine was around 110MB/s (based on my own calculations). It may or may not be acceptable for your purposes.

As an aside: the author of LZ4 has also created Zhuff which is basically LZ4 with an entropy coder. Encoding speeds are slightly slower but decompression is much faster. Compresses better as well. See: http://fastcompression.blogspot.com/p/zhuff.html

On 3/16/2014 at 10:27 AM, "Nouvelle Collection" <nouvellecollection at gmail.com> wrote:
>
>Hello,
>
>Is there some version of FLAC that allows very very fast encoding 
>(i.e.
>able to process at least 150 MB / second of .wav input data on a 
>standard
>computer : laptop computer, Core i5/i7,  Windows 7 64 bit, 8 GB 
>RAM) ?
>(It's ok to have a compression ratio which is a little bit lower 
>than
>traditionnal FLAC)
>
>I'm looking for something which is between FLAC (very good ratio, 
>slower
>than LZ4)   and  LZ4 (very very fast compression : 400 MB / sec, 
>but lower
>compression ratio than FLAC because it's not dedicated to audio).
>
>Best regards.



More information about the flac-dev mailing list