Lossless audio codec comparison revision 6 - main part
Introduction
This collection of documents compares the performance of lossless audio codecs on various kinds of PCM audio material.
This document will explain details common to these three documents.
Method
To compare the performance of each codec, the following steps are followed for each combination of corpus file, codec and codec setting:
- A WAV file is placed on a large enough ramdisk.
- An MD5sum is calculated for the WAV file excluding its header
- The WAV file is encoded by the chosen codec provided with the required settings. The amount of time required to do this conversion is measured and the resulting filesize is recorded
- The encoded file is decoded by the chosen codec. The amount of time required to do this conversion is measured
- An MD5sum is calculated for the resulting decoded file excluding its header
- The MD5sum of the provided WAV file and the decoded file are compared
The following codecs and settings are used:
Codec | Settings used |
---|---|
FLAC | -0, -1, -2, -3, -4, -5, -6, -7, -8 |
ALAC | --fast, [-] |
WavPack | -f, [-], -h, -hh, -x4f, -x4, -x4h, -x4hh |
TAK | -p0, -p0e, -p0m, -p1, -p1e, -p1m, -p2, -p2e, -p2m, -p3, -p3e, -p3m, -p4, -p4e, -p4m |
OptimFROG | presets 0 through 10 and max |
Monkeys Audio | -c1000, -c2000, -c3000, -c4000, -c5000 |
La | [-], -high |
MP4ALS | -a -o5, -a, -a -o20, -a -o40, -a -b, -a -b -o20, -a -b -o40, -a -b -o1023, -7 |
WMA | [-] |
Shorten | [-] |
TTA | [-] |
For each codec, the latest Windows binary provided by the author of the codec is used, no specially tuned compiles are used, with the following exceptions:
- ALAC: encoding is done with refalac64 as provided by QAAC
- WMA: encoding is done with WMAEncode.exe (which uses the encoder provided by Windows 11) and decoding with FFmpeg 6.0
64-bit compiles have been used, except for TAK, Shorten, La and MP4ALS, where no 64-bit executable was available.
Not all codecs are featured in all tests, because not all codecs are able to handle all material.
Measurements are made on a Windows 11 machine with an Intel i3-10100T with 4GB of RAM. Turbo Boost has been disabled to help keep measurements consistent. This CPU has all x86 instruction set extensions up to and including AVX2. Measuring the time used is done with timer64.exe, part of the 7-max/7-benchmark suite. The time measured in this revision is wall time, whereas in previous revisions this was CPU time.
Timing is done per source. This measured time is divided by the content length, i.e. the execution time of the encoding or decoding process in seconds divided by the playback length of the source in seconds. The result of this division is called CPU-usage. The filesize of the encoded file is divided by the filesize of the original WAV file to calculate a compression. In case a source file is too large for the available RAM disk, it is split up into parts of equal length, each part is encoded, decoded and verified seperately, and results are summed.
No parallel processing was done, to make sure processes didn't influence each other, and keep as much resources available for the OS as possible.
The average of all sources is obtained by averaging the results per source, without any weighing. The total results are therefore not influenced by the length of the corpus content, each source contributes an equal amount to the average.