kfr

Fast, modern C++ DSP framework, FFT, Sample Rate Conversion, FIR/IIR/Biquad Filters (SSE, AVX, AVX-512, ARM NEON)
Log | Files | Refs | README

CHANGELOG.md (15955B)


      1 # Changelog
      2 
      3 ## 6.1.1
      4 
      5 #### Changed
      6 
      7 - DFT performance has been improved by 30-80% for ARM and ARM64 cpus
      8 - DFT benchmark is now enabled for non-x86 builds
      9 
     10 ## 6.1.0
     11 
     12 #### Added
     13 
     14 - C API now supports Multidimensional DFT
     15 
     16 #### Changed
     17 
     18 - Documentation update
     19 - Update to latest CxxDox
     20 - `Dims` template parameter in `dft_plan_md` and `dft_plan_md_real` now defaults to `dynamic_shape`
     21 
     22 ## 6.0.4
     23 
     24 #### Fixed
     25 
     26 - Clang 19 compatibility fix
     27 
     28 ## 6.0.3
     29 
     30 #### Changed
     31 
     32 - Added more Doxygen documentation for filter functions (@Jalmenara)
     33 - Examples now include detailed comments
     34 
     35 #### Fixed
     36 
     37 - Fixed stateless parameter
     38 - Fixed build with non-MSVC on Win32 (@jcelerier)
     39 - Resolved Android building issues
     40 - Removed deprecated atomic initialization
     41 
     42 ## 6.0.2
     43 
     44 #### Added
     45 
     46 - Windows arm64 support
     47 - Emscripten (wasm/wasm64) support
     48 
     49 #### Changed
     50 
     51 - `complex_size` now takes dft_pack_format as parameter
     52 
     53 ## 6.0.0
     54 
     55 - DFT performance has been improved up to 40% (backported to KFR 5.2.0 branch)
     56 - C API for non x86 architectures
     57 - DSP refactoring with easier initialization
     58 - Multiarchitecture for resampling, FIR and IIR filters
     59 - `matrix_transpose`: optimized matrix transpose (square/non-square, inplace/out-of-place, real/complex, scalar/vectors)
     60 - CMake config file generation (`find_package(KFR CONFIG)` support, see [installation](installation.md))
     61 - `.npy` format support (reading/writing, v1/v2, c/fortran order, real/complex, bigendian/littleendian)
     62 - Multidimensional DFT: real/complex
     63 - `inline_vector`
     64 
     65 #### Other changes
     66 
     67 - CMake minimum version is 3.12
     68 - Multidimensional reference DFT
     69 - Easier cross compilation to ARM64 on x86_64 macOS
     70 - Automated tests using GitHub Actions (previously Azure Pipelines)
     71 - GCC 7 and 8: emulate missing avx-512 instrinsics
     72 - `read_group` and `write_group`
     73 - [❗breaking change] `reshape_may_copy` and `flatten_may_copy` in `tensor<>` allows copying by default
     74 - `shape<>::transpose` function
     75 - `tensor<>::transpose` function
     76 - `convert_endianess`
     77 - DFT, DSP and IO sources have been moved to `src/` directory
     78 - Multiarchitecture is enabled by default
     79 - `KFR_DFT_NO_NPo2` has been removed (assumed always enabled)
     80 - Tests refactoring
     81 - Some tests moved to `tests/internal/`
     82 - [❗breaking change] Scalars are now passed by value in expressions (this fixes dangling references in some cases)
     83 - Expression functions should return `expression_make_function` instead of `expression_function`
     84 - `KFR_WITH_CLANG`
     85 - `KFR_VERSION` CMake variable
     86 - Functions to get module versions (`library_version_dft`, `library_version_dsp` etc)
     87 - Exceptions are no longer enforced in MSVC
     88 - `kfr::complex` removed (use `std::complex` instead). `KFR_STD_COMPLEX` cmake variable removed too
     89 - `strides_for_shape` for fortran order
     90 - AARCH and ARM emulation refactoring (dynamic libraries are now supported)
     91 - `call_with_temp`
     92 - `maximum_dims` is now 16 (was 8)
     93 - `to_fmt`/`from_fmt` supports inplace
     94 - `shape` refactoring: `rotate_left`, `rotate_right`, `remove_back`, `remove_front`
     95 - temp argument can be `nullptr` for DFT (temporary buffer will be allocated on stack or heap)
     96 - `dft_plan` and similar classes have now default and move constructors
     97 - `-DCMAKE_POSITION_INDEPENDENT_CODE=ON` is required for building C API
     98 - `ci/run.sh` can now build in a directory outside source tree
     99 - [❗breaking change]`graphics/color.hpp` and `graphics/geometry.hpp` have been removed
    100 - Simpler `CMT_CVAL` macro
    101 - `/Zc:lambda` is now required for building KFR in MSVC
    102 - `println` for `string_view`
    103 - MSVC internal compiler error fixed
    104 - Complex vector operators fixed
    105 
    106 ## 5.2.0
    107 
    108 2023-11-27
    109 
    110 #### Changed
    111 
    112 - The performance of DFT has been increased up to 40% compared to KFR 5 on x86 and x86_64
    113 in single and double precision, inplace and out of place processing.
    114 
    115 #### Added
    116 
    117 - `KFR_NO_PERF_TESTS` define can now disable performance tests
    118 - `CMT_CVAL` for extracting constexpr-enabled value from `cval_t`
    119 - `fft_algorithm_selection` to select FFT algorithm for given FFT size.
    120 
    121 #### Fixed
    122 
    123 - Warnings in Clang 10 https://github.com/kfrlib/kfr/issues/198
    124 - `std::is_pov` is peprecated in C++20 https://github.com/kfrlib/kfr/issues/190
    125 - DFT sizes 0 and 1 were not processed correctly https://github.com/kfrlib/kfr/issues/195
    126 - Internal compiler error in Visual Studio Compiler 19.37 https://github.com/kfrlib/kfr/issues/194
    127 - Goertzel issue https://github.com/kfrlib/kfr/issues/121
    128 - Bug in `nearest_real_or_complex` https://github.com/kfrlib/kfr/issues/137
    129 - Fixed operators in `KFR_STD_COMPLEX` mode
    130 - Testo library: typo in `epsilon_scope`
    131 - Fix ambiguities with std::identity (c++20)
    132 - Force linking in correct order for multi-architecture binaries
    133 
    134 ## 5.1.0
    135 
    136 2023-10-11
    137 
    138 #### Added
    139 
    140 - Tukey window function
    141 - Subscript operator for `vec<>`
    142 - Unary operators for `vec<>`
    143 
    144 #### Fixed
    145 
    146 - Inverse DCT has been fixed
    147 - Allow C API to be built on non-x86 systems
    148 - Tensor iteration range has been fixed
    149 - `transpose(vec<vec<>>)` has been fixed
    150 - `vec<bit<>>` bug on GCC and MSVC
    151 - Internal constant `is_pod` has been removed
    152 - `root` and `cbrt` have been fixed for negative values
    153 - Fixed numerous warnings in MSVC
    154 
    155 ## 5.0.3
    156 
    157 2023-06-26
    158 
    159 #### Added
    160 
    161 - Planck-taper window function
    162 
    163 #### Fixed
    164 
    165 - Sample rate conversion: automatic zero padding 
    166 - DFT: incorrect result of real dft when input size != 4N https://github.com/kfrlib/kfr/pull/141
    167 - Add options for installing libraries and headers https://github.com/kfrlib/kfr/pull/182
    168 
    169 ## 5.0.2
    170 
    171 2023-01-25
    172 
    173 #### Performance
    174 
    175 - ARM/ARM64 performance has been improved up to 2 times in various usage scenarios, including DFT.
    176 
    177 #### Fixed
    178 
    179 - Fix sine and other functions not accepting scalar references
    180 - Fix possible name conflict with fmt
    181 
    182 ## 5.0.1
    183 
    184 2022-12-06
    185 
    186 #### Changed
    187 
    188 - Documentation updates
    189 
    190 #### Fixed
    191 
    192 - MSVC fixes
    193 - Ambiguous assign operator fixes
    194 
    195 ## 5.0.0
    196 
    197 2022-11-30
    198 
    199 #### Added
    200 
    201 - New `tensor<T, dims>` class for multidimensional data (like numpy's nparray)
    202 - Histogram computation
    203 - Normal (gaussian) distribution for random number generator
    204 - All builtin expressions support multiple dimensions
    205 - Exception support (may be configured to call user-supplied function or std::abort)
    206 - [changes required] CMake variables now have `KFR_` prefix
    207 - Template parameter deduction for `vec`, so `vec{1, 2}` is the same as `vec<int, 2>{1, 2}`
    208 - [changes required] `random_state` is now architecture-agnostic and defined in `kfr` namespace
    209 - All expression classes have been moved from `kfr::CMT_ARCH_NAME::internal` to `kfr::CMT_ARCH_NAME` namespace
    210 - `expression_traits<T>` introduced to support interpreting any object as kfr expression
    211 - [changes required] User-defined expressions should be rewritten to be used in KFR5
    212 - Out-of-class assign operators for all input & output expressions
    213 - `round.hpp`, `clamp.hpp`, `select.hpp`, `sort.hpp`, `saturation.hpp`, `min_max.hpp`, `logical.hpp`, `abs.hpp` headers have been moved to `simd` module
    214 - `state_holder.hpp` has been moved to `base` module
    215 - All code related to expressions have been moved to `base` module
    216 - `vec<T, N>::front()` and `vec<T, N>::front()` are now writable
    217 - `set_elements` functions for output expressions like `get_elements` for input expressions
    218 
    219 #### Changed
    220 
    221 - Documentation updates
    222 
    223 ## 4.3.1
    224 
    225 2022-11-23
    226 
    227 #### Fixed
    228 
    229 - C++20 compatibility fixes
    230 
    231 ## 4.3.0
    232 
    233 2022-10-14
    234 
    235 #### Changed
    236 * Compile times improved and memory usage reduced for MSVC and GCC
    237 * `cxxdox` version updated
    238 * Tests for latest Clang, Azure Pipelines images are updated
    239 * .editorconfig file
    240 
    241 #### Fixed
    242 * Fixed incompatibility with latest GCC
    243 * Fixed various Internal Compiler Error in latest MSVC2019
    244 * Fixed tests for Clang 14
    245 * Fixed bugs in gather/scatter and read/write functions
    246 
    247 ## 4.2.1
    248 
    249 2021-04-29
    250 
    251 #### Fixed
    252 
    253 - AVX512 intrinsics in MSVC and GCC
    254 - `carg`
    255 - Python 3.7 compatibility
    256 
    257 #### Changed
    258 
    259 - Global constants are now inline
    260 
    261 ## 4.2.0
    262 
    263 2020-02-17
    264 
    265 #### Added
    266 
    267 - `ENABLE_DFT_MULTIARCH` cmake option can be used to build `kfr_dft` with multiple architectures support (x86/x86_64 only)
    268 - `config.h` is generated during install step with all `#define`s needed for correct usage of installed libraries
    269 
    270 #### Changed
    271 
    272 - `CMAKE_INSTALL_PREFIX` is reset to empty on Win32 (can be overriden in cmake command line)
    273 - C API binary is now installed using install command (`make install`, `ninja install` or `cmake --build . --target install`)
    274 
    275 ## 4.1.0
    276 
    277 2020-03-04
    278 
    279 #### Added
    280 
    281 - MSVC2019 support (16.4.4 is required)
    282 - Stateless short_fir expression (thanks to https://github.com/slarew)
    283 - `biquad_filter` constructor taking `std::vector<biquad_params<T>>` (thanks to https://github.com/BenjaminNavarro)
    284 - `cabssqr` function (thanks to https://github.com/slarew)
    285 - `moving_sum` expression (thanks to https://github.com/slarew)
    286 - `gen_expj` generator (thanks to https://github.com/slarew)
    287 
    288 #### Changed
    289 - `cdirect_t{}` is now allowed in real dft plan methods for compatibility
    290 - complex support for `convolve_filter` (thanks to https://github.com/slarew)
    291 
    292 #### Fixed
    293 
    294 - GCC debug build (thanks to https://github.com/BenjaminNavarro)
    295 - `is_invocable_r_impl` fallback for missing C++17 feature
    296 - `std::complex` compatibility (thanks to https://github.com/slarew)
    297 - Various CI fixes
    298 
    299 ## 4.0.0
    300 
    301 2019-12-05
    302 
    303 #### Added
    304 
    305 - IIR filter design
    306   - Butterworth
    307   - Chebyshev type I and II
    308   - Bessel
    309   - Lowpass, highpass, bandpass and bandstop filters
    310   - Conversion of arbitrary filter from Z,P,K to SOS format (suitable for biquad function and filter)
    311 - Discrete Cosine Transform type II and III
    312 - cmake uninstall target
    313 - C API: 
    314   - DFT
    315   - real DFT
    316   - DCT
    317   - FIR
    318   - IIR
    319   - Convolution
    320   - Aligned memory allocation
    321   - Built for SSE2, SSE4.1, AVX, AVX2, AVX512, x86 and x86_64, architecture is selected at runtime
    322 - New vector based types: 
    323   - color
    324   - rectangle
    325   - point
    326   - size
    327   - border
    328   - geometric vector
    329   - 2D matrix
    330 - Color space conversion:
    331   - sRGB
    332   - linear RGB
    333   - XYZ
    334   - Lab
    335   - LCH
    336   - HSV
    337 - MP3 audio reading
    338 - `aligned_reallocate` function
    339 - `zip` and `column` functions
    340 - `vec<vec<vec<T>>>` support
    341 - New example: `iir.cpp`
    342 - `biquad` that gets `std::vector` of `biquad_param`s
    343 - `csqr` function
    344 - `factorial` function
    345 - `isreal` function
    346 - `make_complex` function for expressions
    347 - New optimization technique for vector element shuffle
    348 - `std::get<>` support for `vec<>`
    349 - C++17 structured bindings support for `vec<>`
    350 - comparison operators for `cvals_t`
    351 - compile time `cminof`, `cmaxof` functions
    352 - `vector_width_for` constant to get vector width for specific architecture
    353 - make_univector for containers and arrays
    354 - univector: copy constructor optimization
    355 - Custom `assertion_failed`
    356 
    357 #### Changed
    358 
    359 - C++17 compiler is required. Some of C++17 library features may be missing, in this case KFR uses custom implementation
    360 - `cast` function now works with both vectors and expressions (expression versions was previously called `convert`)
    361 - Memory alignment can be up to 32768
    362 - New implementation for `cometa::function` using shared pointer
    363 - `memory.hpp` allocation functions has been moved to cometa
    364 - `cconj` has been moved to simd module (instead of `math`)
    365 - dr_libs version updated
    366 - All global constants are now `inline constexpr`
    367 - enums moved out of architecture namespace
    368 - `special_constant::undefined` removed
    369 
    370 #### Fixed
    371 
    372 - Fixed real DFT with raw poitners
    373 - Bug with generators 
    374 - Fixed grid issues in dspplot
    375 - Wrong index in `concatenate`
    376 - `csqrt` function
    377 - Fixed NaNs in `amp_to_dB`
    378 - GCC 9 support
    379 - Workaround for Clang 8.0 FMA code generator bug
    380 - Flat top window
    381 - SSE4.2 detection (previously detected as SSE4.1)
    382 
    383 #### Notes
    384 
    385 * MSVC support is limited to MSVC2017 due to ICE in MSVC2019. Once fixed, support will be added
    386 * DFT is limited to Clang due to ICE in MSVC and broken AVX optimization in GCC 8 and 9. Once fixed, support will be added
    387 
    388 ## 3.0.9
    389 
    390 2019-04-02
    391 
    392 #### Added
    393 
    394 - `reduce` supports different types and containers other than `univector`
    395 - Assignment operators for `univector`: `+=`, `*=` etc
    396 - `concatenate` function to concatenate two expressions sequentially
    397 - Audio file IO: `read_channels`/`write_channels` to read channels data directly without interleaving/deinterleaving
    398 - `as_string`: support for `std::vector`
    399 
    400 #### Changed
    401 
    402 - `expression_scalar`: support for `vec<T>`
    403 
    404 #### Fixed
    405 
    406 - CPU detection in cmake subdirectory
    407 - MSVC 2017 32-bit intrinsics
    408 
    409 ## 3.0.8
    410 
    411 2019-03-15
    412 
    413 #### Added
    414 
    415 - Ability to pass `random_bit_generator` by reference
    416 - Tests for iOS ARM and ARM64
    417 
    418 #### Changed
    419 
    420 - `kfr::complex` is placed in `kfr` namespace
    421 
    422 #### Fixed
    423 
    424 ## 3.0.7
    425 
    426 2019-03-13
    427 
    428 #### Added
    429 
    430 - Detected CPU is now saved to CMake cache
    431 - Linux/AArch64 tests have been added to CI
    432 
    433 #### Changed
    434 
    435 - `mask<>` is now a specialization of `vec<>`. This allows using many `vec` functions for masks
    436 - `short_fir` performance has been increased by around 50%-60%
    437 
    438 #### Fixed
    439 
    440 - Fixed the bug with infinitely loading in Intellisense
    441 
    442 ## 3.0.6
    443 
    444 2019-03-07
    445 
    446 #### Added
    447 
    448 - Android arm & arm64 tests have been added to CI
    449 
    450 #### Fixed
    451 
    452 - Fixed Android support (thanks to https://github.com/Jman420)
    453 - Fixed building cpu detection tool in CMake subdirectory (thanks to https://github.com/Jman420)
    454 
    455 ## 3.0.5
    456 
    457 2019-02-21
    458 
    459 #### Added
    460 
    461 - DFT speeds have been improved by up to 15% on most modern cpus
    462 - Support for MSVC 2017
    463 - Support for GCC 7.3
    464 - Support for GCC 8.2
    465 - Support for resampling complex vectors (Thanks to https://github.com/ermito)
    466 - Tests for various math functions no longer depend on MPFR
    467 
    468 #### Changed
    469 
    470 - Testo now allocates much less memory during long tests (x3 less than previously)
    471 
    472 #### Fixed
    473 
    474 - Building generators (Thanks to https://github.com/ermito)
    475 
    476 ## 3.0.4
    477 
    478 2019-01-08
    479 
    480 #### Added
    481 
    482 #### Changed
    483 
    484 - `KFR_READCYCLECOUNTER` may be redefined to point to any function returning (pseudo-)random value
    485 - Ability to disable random number initialization functions
    486 
    487 #### Fixed
    488 
    489 ## 3.0.3
    490 
    491 2018-12-27
    492 
    493 #### Added
    494 
    495 - Partial compatibility for Visual Studio 2017
    496 - Support for `KFR_USE_STD_ALLOCATION`
    497 - `univector` support for `abstract_reader`/`abstract_writer`
    498 
    499 #### Changed
    500 
    501 #### Fixed
    502 
    503 - Paths in `CMakeLists.txt`
    504 
    505 ## 3.0.2
    506 
    507 2018-12-19
    508 
    509 #### Added
    510 
    511 - More documentation
    512 - dspplot: `freqticks` parameter
    513 - dspplot: `freq_lim` parameter
    514 - dspplot: `freq_dB_lim` parameter
    515 - dspplot: `phasearg` parameter
    516 - More tests for Sample Rate Converter
    517 
    518 #### Changed
    519 
    520 - Sample Rate Converter: now computes the transition width of the filter. This makes cutoff frequency more precise
    521 - Sample Rate Converter: now uses Kaiser window with different &beta; parameter for different quality. This leads to a better balance between transition width and sidelobes attenuation.
    522 - Sample Rate Converter: `quality` parameter is now passed as runtime parameter rather than compile time parameter
    523 - `fir.cpp` example has been extended to include examples of applying FIR filters
    524 
    525 #### Fixed
    526 
    527 - `amp_to_dB` function
    528 - 24-bit audio reading
    529 
    530 ## 3.0.1
    531 
    532 2018-11-28
    533 
    534 #### Added
    535 
    536 - WAV file reading/writing
    537 - FLAC file reading
    538 - Audio sample conversion
    539 - Interleaving/deinterleaving
    540 - sample_rate_converter example
    541 - Sample Rate Converter: `process`() function
    542 
    543 #### Changed
    544 
    545 - Assignment to an empty vector resizes it
    546 - New documentation
    547 - KFR IO is now built separately (only needed for audio file support)
    548 
    549 #### Fixed
    550 
    551 - Resampler bug: sequential calls to `resampler::operator()` may fail
    552 
    553 ### 3.0.0
    554 
    555 #### Added
    556 
    557 - Optimized non-power of two DFT implementation
    558 - Full AVX-512 support
    559 - EBU R128
    560 - Ability to include KFR as a subdirectory in cmake project
    561 - Number of automatic tests has been increased
    562 - C API for DFT
    563 - Partial GCC 8.x support
    564 - Ability to make sized linspace
    565 - `fraction` type
    566 
    567 #### Changed
    568 
    569 - GPL version changed from 3 to 2+
    570 - Refactoring of DFT code
    571 - KFR DFT is now built separately
    572 - FIR filter now supports different tap and sample types (thanks to @fbbdev)
    573 
    574 #### Fixed
    575 
    576 - Various fixes for KFR functions
    577 - FFT with size=128 on architectures with SSE only
    578 - Small kfr::complex type fixes