Skip to content

Commit f6ca01e

Browse files
committed
Documentation
1 parent 5003d1e commit f6ca01e

File tree

9 files changed

+684
-65
lines changed

9 files changed

+684
-65
lines changed

CHANGELOG.md

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,121 @@
11
# Changelog
22

3+
## 7.0.0
4+
5+
#### Added
6+
7+
* macOS universal binaries
8+
* New module: `audio`
9+
* New Wave, AIFF, FLAC, and Mp3 (via `minimp3`) encoders/decoders
10+
* Apple ALAC support
11+
* Apple CAF container support
12+
* RF64/BW64 container support
13+
* RISC-V support
14+
* RISC-V prebuilt binaries
15+
* New ARM and ARM64 toolchain implementation
16+
* New RISC-V 64 toolchain for `riscv64-linux-gnu`
17+
* `macos-merge-binaries.cmake` merges two directories into one with universal binaries
18+
* Custom port to fix the `macosforge/alac` bug
19+
* New `elliptic` function to design elliptic filters with ripple parameters (follows SciPy semantics)
20+
* Version information added for each module (`library_version_dsp`, `library_version_audio`, etc.)
21+
* `samples_store` and `samples_load` convert audio channels to/from stored formats (integer and floating-point, optional dithering)
22+
* `strided_channel` class for reading/writing strided data in KFR expressions
23+
* `audio_data` class providing a unified interface for interleaved/planar audio data
24+
* Zero-copy construction from user-supplied pointers for `audio_data`
25+
* Computing statistics for `audio_data`: Peak and RMS
26+
* Per-channel processing for `audio_data`
27+
* Basic dithering support: Rectangular and Triangular
28+
* `audio_encoder` and `audio_decoder` base classes for encoding/decoding audio
29+
* Reading RIFF chunks in `audio_decoder`
30+
* Audio format detection from the first 16 bytes
31+
* Audio format selection from file extension
32+
* Raw decoder/encoder
33+
* Audio decoder based on Media Foundation for Windows
34+
* Automatic switch from standard Wave to RF64 if audio exceeds 4 GB (can be disabled with `switch_to_rf64_if_over_4gb`)
35+
* `encode_audio_file` and `decode_audio_file` functions for simplified file handling
36+
* `arange` function added (similar to NumPy’s)
37+
* Added `has_expression_traits`, `input_expression`, `output_expression`, and `input_output_expression` concepts
38+
* `expr_element` concept defines valid expression element types
39+
* Added `f_class`, `i_class`, and `u_class` concepts (`is_f_class`, `is_i_class`, `is_u_class`)
40+
* Added `not_f_class`, `not_i_class`, and `not_u_class` concepts
41+
* `has_data_size` concept checks for `std::data` and `std::size` definitions
42+
* Added `filtfilt` for forward-backward IIR filtering
43+
* Added `arrangement_speakers` and `arrangement_for_channels` functions
44+
* Added `fopen_path` for cross-platform UTF-8 file access; replaces `fopen_portable`
45+
* `memory_reader` and `memory_writer` adapters for user memory buffers
46+
* Added more tests for vector concatenation and slicing
47+
* Minimal usage examples added under `tests/usage-config` and `tests/usage-manual`
48+
* New RISC-V vector types: `f32rvv`, `i32rvv`, `u32rvv`, etc.
49+
* Added `simd_compat` concept to verify SIMD element compatibility
50+
* Added `scoped_flush_denormals` RAII class to enable flush-to-zero semantics on x86 and ARM
51+
* `test_matrix` function introduced (replaces `testo::matrix` for Catch2 compatibility)
52+
53+
#### Changed
54+
55+
* Prebuilt binaries are tested after build
56+
* Prebuilt binaries use Clang 21
57+
* `KFR_ENABLE_MULTIARCH` is forcibly turned off for non-x86
58+
* `KFR_USE_BOOST_MATH` option enables the use of standalone Boost.Math for elliptic filters (on by default)
59+
* `KFR_USE_BOOST` option switches to using Boost.Math from a full Boost installation. Enable if you already use Boost
60+
* C++20 standard is now handled via the `cxx_std_20` CMake feature and inherited by dependent targets
61+
* Refactored CMake config with separate targets and dependency handling
62+
* `add_kfr_library` refactored to distinguish between private and public dependencies and definitions
63+
* In multiarch builds, the base architecture is now named exactly as the module itself (was: `kfr_dsp_sse2`, `kfr_dsp_avx2`; now: `kfr_dsp`, `kfr_dsp_avx2`)
64+
* Examples and tools migrated to the new audio I/O code
65+
* All third-party libraries moved to `src/thirdparty` or `include/kfr/thirdparty`
66+
* Old audio I/O handled by `audio_reader` and `audio_writer` is now deprecated
67+
* `reverse` expression is now writable
68+
* `audio_sample_type` now represents bit depth; negative if floating-point
69+
* `convert_endianness` now accepts references to data types
70+
* `samplerate_converter` is now default-, move-constructible, and move-assignable
71+
* `IO_SEEK_64` and `IO_TELL_64` macros renamed to `KFR_IO_SEEK_64` and `KFR_IO_TELL_64`
72+
* `get_nth_type` optimized for Clang and GCC
73+
* All `constexpr` variables now marked `inline`
74+
* `is_poweroftwo`, `next_poweroftwo`, `ilog2`, etc., now use C++20 `<bit>` header
75+
* Sample Rate Converter tool refactored for chunked resampling
76+
* [Breaking change] CMake 3.16 required
77+
* [Breaking change] `cometa` namespace merged into `kfr`; Cometa is no longer distributed separately. Replace `cometa` with `kfr` in your sources
78+
* [Breaking change] All macros renamed from `CMT_` to `KFR_`; replace all occurrences of `CMT_` with `KFR_`
79+
* [Breaking change] All macros renamed from `TESTO_` to `KFR_`; replace all occurrences of `TESTO_` with `KFR_`
80+
* [Breaking change] `cometa.hpp` renamed to `meta.hpp`; `kfr/cometa/*.hpp` renamed to `kfr/meta/*.hpp`. Update your includes accordingly
81+
* [Breaking change] `kfr/testo/*.hpp` renamed to `kfr/test/*.hpp`
82+
* [Breaking change] Some classes and functions no longer accept a template parameter and now default to `double` for maximum precision. Related changes:
83+
* `zpk<float_type>` replaced with `zpk`
84+
* `bessel<float_type>` and `butterworth<float_type>` replaced with `bessel` and `butterworth`
85+
* `bilinear<float_type>`, `lp2lp_zpk<float_type>`, `lp2bs_zpk<float_type>`, `lp2bp_zpk<float_type>`, `lp2hp_zpk<float_type>`, and `warp_freq<float_type>` replaced with non-template equivalents
86+
* `iir_lowpass<float_type>`, `iir_highpass<float_type>`, `iir_bandpass<float_type>`, `iir_bandstop<float_type>` replaced with non-template equivalents
87+
* `iir_params<float_type>` still accepts a template parameter to control precision
88+
* `to_sos` now accepts `float_type` (default `double`) to return `iir_params<float_type>`
89+
* New `elliptic` function follows the same rule and always produces double-precision `zpk`
90+
* `intrinsics` namespace renamed to `intr`
91+
* Many functions from `iir_design.hpp` moved to `src/iir_design.cpp`
92+
* Documentation updates: applying FIR/IIR filters, computing loudness, performing sample conversion
93+
* [Breaking change] `KFR_ACCEPT_EXPRESSIONS` removed; replaced with `expression_argument` and `expression_arguments` concepts
94+
* [Breaking change] `identity` removed; replaced with C++ `std::type_identity_t`
95+
* [Breaking change] `output_expression` concept replaces `enable_if_output_expression` trait
96+
* [Breaking change] 8-bit sample support removed
97+
* [Breaking change] Fixed typo: `convert_endianess``convert_endianness`
98+
* [Breaking change] `CMT_NOEXCEPT` removed; use `noexcept`
99+
* [Breaking change] C API: `kfr_size_t` and `kfr_int32_t` removed; use `size_t` and `int32_t`
100+
* [Breaking change] `Speaker``speaker_type`, `SpeakerArrangement``speaker_arrangement`
101+
* [Breaking change] `from_lambda` parameter required to construct `vec` from a lambda generator
102+
* `ebu_r128` now accepts `std::span` instead of `std::vector`
103+
* `arraysize` and `carraysize` removed; use `std::size` from C++17
104+
* Removed C++17 compatibility definitions for non-compliant compilers
105+
* More functions marked `noexcept` and `constexpr`
106+
* `CMT_ENABLE_IF` mostly replaced with concepts and `requires`; `KFR_ENABLE_IF` still available
107+
* `CMT_CLANG_EXT` renamed to `KFR_VEC_EXT` and now usable with GCC
108+
* C API can now be built without exceptions
109+
* `numeric` concept replaces `is_numeric<T1>` predicate
110+
* `aligned_size`, `aligned_force_free`, `aligned_release`, and `aligned_reallocate` only defined if `KFR_MANAGED_ALLOCATION` is on (default off)
111+
112+
#### Fixed
113+
114+
* Custom port to fix the `macosforge/alac` bug
115+
* Fixed generic fallback for `bittestany`
116+
* Fixed u8/i8 shifts on x86 and related tests
117+
* Various smaller fixes
118+
3119
## 6.3.1
4120

5121
#### Fixed

README.md

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,7 @@ KFR is an open source C++ DSP framework that contains high performance building
1616

1717
:star2: **New**: Explore benchmark results from the LIGO, Virgo, and KAGRA collaborations, comparing KFR performance against FFTW for signal processing in gravitational-wave research: https://ar5iv.labs.arxiv.org/html/2503.14292
1818

19-
## KFR 7
20-
21-
KFR 7 is currently in development.
22-
23-
What is already available in the `main` branch:
19+
## KFR 7 - What's New
2420

2521
* Elliptic filter design
2622
* Zero-Phase IIR Filter (`filtfilt`)
@@ -34,7 +30,8 @@ What is already available in the `main` branch:
3430
* ALAC
3531
* MP3 (decoding only)
3632
* Raw PCM
37-
* decoding AAC and other formats using MediaFoundation (Windows only)
33+
* decoding AAC and other formats using MediaFoundation (Windows only)
34+
* Universal macOS Binaries (Intel + Apple Silicon)
3835
* Basic RISC-V support
3936
* Only CPUs with VLEN >= 128 are supported
4037
* Linux only, clang required
@@ -43,7 +40,12 @@ What is already available in the `main` branch:
4340
* Performance improvements
4441
* Broader GCC support
4542
* Tests are migrated to Catch2 framework
46-
* [More to come...](https://github.com/kfrlib/kfr/issues/256)
43+
* Progress since KFR 6:
44+
* Multidimensional DFT via the C API
45+
* DFT performance improved by up to 80% on ARM and ARM64
46+
* New Android x86/x64 and Linux ARM/AArch64 builds
47+
* Matrix transpose up to 30% faster
48+
* [More](docs/docs/whatsnew7.md)
4749

4850
## Our other projects
4951

@@ -59,28 +61,26 @@ What is already available in the `main` branch:
5961

6062
Compiler support:
6163

62-
![Clang 11+](https://img.shields.io/badge/Clang-11%2B-brightgreen.svg?style=flat-square)
63-
![GCC 7+](https://img.shields.io/badge/GCC-7%2B-brightgreen.svg?style=flat-square)
64-
![MSVC 2019](https://img.shields.io/badge/MSVC-2019%2B-brightgreen.svg?style=flat-square)
65-
![Xcode 12+](https://img.shields.io/badge/Xcode-12%2B-brightgreen.svg?style=flat-square)
64+
![Clang 16+](https://img.shields.io/badge/Clang-16%2B-brightgreen.svg?style=flat-square)
65+
![GCC 11+](https://img.shields.io/badge/GCC-11%2B-brightgreen.svg?style=flat-square)
66+
![MSVC 2022](https://img.shields.io/badge/MSVC-2022%2B-brightgreen.svg?style=flat-square)
67+
![Xcode 13+](https://img.shields.io/badge/Xcode-13%2B-brightgreen.svg?style=flat-square)
6668

6769
KFR has no external dependencies except for a C++20-compatible standard C++ library. CMake is used as the build system.
6870

6971
Clang is highly recommended and proven to provide the best performance for KFR. You can use Clang as a drop-in replacement for both GCC on Linux and MSVC on Windows. On macOS, Clang is the default compiler and included in the official Xcode toolchain.
7072

71-
_Note_: ARM/AArch64 support and building the DFT module currently requires Clang due to internal compiler errors and a lack of some optimizations in GCC and MSVC.
73+
_Note_: ARM/AArch64/RISC-V support and building the DFT module currently requires Clang due to internal compiler errors and a lack of some optimizations in GCC and MSVC.
7274

7375
:arrow_right: See [Installation](docs/docs/installation.md) docs for more details
7476

7577
## Features
7678

77-
:star2: — new in KFR6
78-
7979
### FFT/DFT
8080
* Optimized DFT implementation for any size (non-power of two sizes are supported)
8181
* DFT performance is on par with the most performant implementation currently available [See Benchmarks](#benchmark-results)
8282
* Real forward and inverse DFT
83-
* :star2: Multidimensional complex and real DFT
83+
* Multidimensional complex and real DFT
8484
* Discrete Cosine Transform type II (and its inverse, also called DCT type III)
8585
* Convolution using FFT
8686
* Convolution filter
@@ -96,6 +96,7 @@ _Note_: ARM/AArch64 support and building the DFT module currently requires Clang
9696
* Bessel
9797
* Lowpass, highpass, bandpass and bandstop filters
9898
* Conversion of arbitrary filter from {Z, P, K} to SOS format (suitable for biquad function and filter)
99+
* Zero-Phase IIR Filtering
99100
* Biquad filter [See Benchmarks](#benchmark-results)
100101
* Simple biquad filter design
101102
* FIR filter design using window method
@@ -107,14 +108,17 @@ _Note_: ARM/AArch64 support and building the DFT module currently requires Clang
107108
### Base
108109

109110
* Tensors (multidimensional arrays)
110-
* :star2: .npy support (reading/writing)
111-
* :star2: Matrix transpose
111+
* .npy support (reading/writing)
112+
* Matrix transpose
112113
* Statistical functions
113114
* Random number generation
114115
* Template expressions (See examples)
115116
* Ring (Circular) buffer
116-
* :star2: Windows arm64 support
117-
* :star2: Emscripten (wasm/wasm64) support
117+
* Windows arm64 support
118+
* RISC-V support
119+
* Emscripten (wasm/wasm64) support
120+
* Scoped control over denormal flushing for stable floating-point behavior
121+
* Interleaved and planar data support with sample type conversion
118122

119123
### Math
120124

@@ -147,13 +151,13 @@ _Note_: ARM/AArch64 support and building the DFT module currently requires Clang
147151

148152
The multiarchitecture mode enables building algorithms for multiple architectures with runtime dispatch to detect the CPU of the target machine and select the best code path
149153

150-
* :star2: Multiarchitecture for DFT, resampling, FIR and IIR filters.
154+
* Multiarchitecture for DFT, resampling, FIR and IIR filters.
151155

152156
### C API
153157

154158
C API is available and includes a subset of KFR features including FFT and filter processing.
155159

156-
* :star2: Support for non x86 systems.
160+
* Support for non x86 systems.
157161

158162
## Benchmark results
159163

@@ -186,11 +190,11 @@ See [fft benchmark](https://github.com/kfrlib/fft-benchmark) for details about b
186190

187191
## Documentation
188192

189-
KFR 6 (latest)
193+
KFR 7 (latest)
190194
https://www.kfrlib.com/docs/latest/
191195

192-
KFR 5
193-
https://www.kfrlib.com/docs/v5/
196+
KFR 6
197+
https://www.kfrlib.com/docs/v6/
194198

195199
Built with
196200
* [cxxdox - generates markdown docs from C++](https://github.com/kfrlib/cxxdox)
@@ -203,7 +207,7 @@ Built with
203207

204208
`main` - current stable version passing all compiler/architecture tests.
205209

206-
`v5` - previous version of KFR (no new features, fixes only)
210+
`v6` - previous version of KFR (no new features, fixes only)
207211

208212
## License
209213

docs/docs/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
## Getting started
44

5-
* [What's new in KFR 6](whatsnew6.md)
5+
* [What's new in KFR 7](whatsnew7.md)
66
* [Installation](installation.md)
77
* [Basics](basics.md)
88
* [Expressions](expressions.md)
99
* [C API](capi.md)
10-
* [Upgrade to KFR 6](upgrade6.md)
10+
* [Upgrade to KFR 7](upgrade7.md)
1111

1212
## Guides
1313

@@ -33,14 +33,14 @@
3333
* [DFT data layout](dft_format.md)
3434

3535
### I/O
36-
* [How to read WAV file](read_audio.md)
36+
* [How to read or write audio file](read_audio.md)
3737
* [File types support](file_support.md)
3838
* [How to plot filter impulse response](plot.md)
3939

4040
## Function reference
4141

4242
* [Function reference](auto/refindex.md)
4343

44-
## KFR 5
44+
## KFR 6
4545

46-
For KFR 5 documentation, see https://kfr.dev/docs/v5
46+
For KFR 6 documentation, see https://kfr.dev/docs/v6

docs/docs/installation.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ target_link_libraries(your_executable_or_library PUBLIC kfr_dsp)
144144
target_link_libraries(your_executable_or_library PUBLIC kfr_dft)
145145
# for <kfr/io.hpp>
146146
target_link_libraries(your_executable_or_library PUBLIC kfr_io)
147+
# for <kfr/audio.hpp>
148+
target_link_libraries(your_executable_or_library PUBLIC kfr_audio)
147149
```
148150

149151
### Makefile, command line etc (Unix-like systems, not recommended)

0 commit comments

Comments
 (0)