FLAC 1.4.0
FLAC 1.4.0 released 2022-09-09
This release fixes a lot of bugs found by fuzzing, and fuzzing coverage has improved much. Also, compression should be better but a little slower. Speedups for 64-bit ARM have been implemented. Encoding and decoding 32 bps PCM is now possible.
Package checksums (SHA-256)
34467d1466d1ff468a3217ad9e2e2d4ca12960cc13ea608dc7a5a288b5628a1e
flac-1.4.0-win.zipaf41c0733c93c237c3e52f64dd87e3b0d9af38259f1c7d11e8cbf583c48c2506
flac-1.4.0.tar.xz
Changes
As there have been changes to the library interfaces, the libFLAC version number is incremented to 12, the libFLAC++ version number is incremented to 10. As some changes were breaking, the version age numbers (see libtool versioning) have been reset to 0. For more details on the changes to the API, see the porting guide.
The XMMS plugin and 'common' plugin code (used only by the XMMS plugin) are deprecated, they will be removed in a future release.
- General:
- It is now possible to limit the minimum bitrate of a FLAC file generated by libFLAC and with the
flac
tool to 1 bit/sample. This function can be used to aid live streaming, for example for internet radio - Encoding files with sample rates up to 1'048'575Hz is now possible. (Con Kolivas)
- Compression of preset -3 through -8 was slightly improved at the cost of a small decrease in encoding speed by increasing the precision with which autocorrelation was calculated (Martijn van Beurden)
- Encoding speed of preset -0, -1 and -2 was slightly improved
- Compression of presets -1 and -4 was slighly improved on certain material by changing the adaptive mid-side heuristics
- Speedups specifically targeting 64-bit ARMv8 devices using NEON were integrated (Ronen Gvili, Martijn van Beurden)
- Speedups for x86_64 CPUs having the FMA instruction set extention are added
- Encoding and decoding of 32-bit PCM is now possible
- It is now possible to limit the minimum bitrate of a FLAC file generated by libFLAC and with the
- (Ogg) FLAC format:
- The FLAC format document is being rewritten by the IETF CELLAR working group. The latest draft can be found on https://datatracker.ietf.org/doc/draft-ietf-cellar-flac/
- The FLAC format document specifies no bounds for the residual. In other to match current decoder implementations, it is proposed to bound the residual to the range provided by a 32-bit int signed two's complement. This limit must be checked by FLAC encoders as to keep FLAC decoders free from the complexity of being to decode a residual exceeding a 32-bit int.
- There is now a set of files available to test whether a FLAC decoder implements the format correctly. This FLAC decoder testbench can be found at https://github.com/ietf-wg-cellar/flac-test-files. Also, results of testing hard- and software can be found here at https://wiki.hydrogenaud.io/index.php?title=FLAC_decoder_testbench.
- flac:
- The option --limit-min-bitrate was added to aid streaming, see github #264
- The option --keep-foreign-metadata-if-present is added. This option works the same as --keep-foreign-metadata, but does return a warning instead of an error if no foreign metadata was found to store or restore
- The warning returned by the foreign metadata handling is now clearer in case a user tries to restore foreign metadata of the wrong type, for example decoding a FLAC file containing AIFF foreign metadata to a WAV file
- A problem when using the analyse function causing the first frame to have a wrong size and offset was fixed
- Fix bug where channel mask of a file is unintentionally reused when several files are processed with one command
- The order of compression-related commands is no longer important, i.e. -8ep gives the same result as -ep8. Previously, a compression level (like -8) would override a more specific setting (like -e or -p). This is no longer the case
- flac now checks the block-align property of WAV files to ensure non-standard WAV files (for which flac has no handling) are not mangled
- metaflac:
- (none)
- build system:
- MSVC and Makefile.lite build system files have been removed. Building with MSVC (Visual Studio) can be done by using CMake
- Various CMake improvements, especially for creating MSVC build files (Martijn van Beurden, martinRenou, CookiePLMonster, David Callu, Tyler Dunn, Cameron Cawley)
- Various fixes for MinGW (Martijn van Beurden, Cameron Cawley)
- Removed obsolete autotools macro's to silence warnings
- Fixes for FreeBSD PowerPC (pkubaj)
- Fixed some compiler warnings (Martijn van Beurden, Tyler Dunn)
- Fix building with uclibc (Fabrice Fontaine)
- testing/validation:
- Addition of new encoder fuzzer, adding fuzzing for 8, 24 and 32-bit inputs
- Addition of new decoder fuzzer, adding coverage of seeking code
- Addition of metadata fuzzer, adding coverage of metadata APIs
- Various improvements to fuzzers to improve code coverage, fuzzing speed and stability
- Many changes to test suite to improve cross-platform compatibility (Rosen Penev)
- Windows CI now also builds the whole test suite
- Clang-format file added (Rosen Penev)
- Add warning on using v141_xp platform toolset with /MT (Martijn van Beurden, Paul Sanders)
- libraries:
- Various seeking fixes (Martijn van Beurden, Robert Kausch)
- Various bugs fixed found by fuzzing
- On decoding, it is now checked whether residuals can be contained by a 32-bit int, preventing integer overflow
- Add check that samples supplied to libFLAC actually fall within the bps set
- Add checks when parsing metadata blocks to not allocate excessive amounts of memory and not overread
- Undocumented Windows-only utf8 functions are no longer exported to the DLL interface
- Removed all assembler and intrinsics code from the decoder to improve fuzzing, as they provided only a small speed benefit
- The bitwriter buffer is limited in size to 2^24 bytes, so it cannot write excessively large files. This is a backup in case another bug in this area creeps (back) in.
- The metadata iterations should now never return a vorbiscomment entry with NULL as an entry, now always at least an empty string is returned
- documentation:
- Removed html documentation and generate man pages from markdown
- Interface changes:
- libFLAC:
- Addition of FLAC__stream_encoder_set_limit_min_bitrate() and FLAC__stream_encoder_get_limit_min_bitrate(), see github #264
- get_client_data_from_decoder is renamed FLAC__get_decoder_client_data(), see github #124
- All API functions taking a filename as an argument now take UTF-8 filenames on Windows, and no longer accept filenames using the current codepage
- FLAC__Frame struct has changed: warmup samples are now stored in FLAC__int64 instead of FLAC__int32 types, and verbatim samples can now be stored in either FLAC__int32 or FLAC__int64 depending on whether samples fix the former or latter
- The FLAC__StreamMetadata struct now has a tag, so it can be forward declared
- libFLAC++:
- Addition of ::set_limit_min_bitrate() and ::get_limit_min_bitrate(), see github #264
- All API functions taking a filename as an argument now take UTF-8 filenames on Windows, and no longer accept filenames using the current codepage
- The ::FLAC__Frame struct has changed, see the libFLAC interface change.
- libFLAC: