lancir.h

Branch


Log

Author Commit Date CI Message
Thomas de Grivel 89b14ca9 2025-11-25T11:33:25 change encoding to utf8-unix
Aleksey Vaneev 1c8433cb 2025-04-10T13:54:58 Version 3.1: Implemented full C++ compliance, eliminated `stdlib.h` dependency. Removed a previously added scanline unbiasing since its positive effect was a compiler-dependent statistical error. Fixed a bug with bit-depth conversions (e.g., 16-bit to 8-bit). Fixed `sign conversion`, `nullptr`, and other compiler warnings. Optimized dithering function. Added 8-bit input gamma correction optimization. Added optional gamma correction bypass for alpha-channel (`AlphaIndex`). LANCIR: implemented WebAssembly SIMD128 support. Improved documentation.
Aleksey Vaneev d4884eeb 2025-03-31T16:12:32 LANCIR 3.0.18. Added pre-C++11 compliance.
Aleksey Vaneev 623bbbc4 2025-03-31T15:40:47 LANCIR 3.0.17. Added pre-C++11 compliance. Fixed pedantic `sign conversion` and `nullptr` warnings.
Aleksey Vaneev 84b38194 2025-03-24T17:55:39 LANCIR 3.0.16. Implemented full C++ compliance.
Aleksey Vaneev 8be60ed2 2025-03-24T16:59:48 LANCIR 3.0.15. Implemented full C++ compliance.
Aleksey Vaneev 0269b5db 2025-03-19T19:28:08 LANCIR 3.0.14. Improved C++ compliance, comments. Implemented compile-time branching elimination via template parameters in the outputScanline() function. Fixed compilation error on ARM32 targets. Removed redundant ifdef's.
Aleksey Vaneev cef36b42 2025-03-16T09:35:34 LANCIR 3.0.13: Added platform detection for MSVC ARM.
Aleksey Vaneev eb89c3ba 2025-03-15T10:22:13 LANCIR 3.0.12: Improved platform detection.
Aleksey Vaneev ae50ac8c 2024-02-02T17:35:30 LANCIR 3.0.11: Minor code clean-up.
Aleksey Vaneev 643fd99e 2024-01-18T13:51:54 LANCIR 3.0.10: Considerably improved large image resizing speed. Memory overhead now became negligible. Source and destination buffers should now differ. Introduced a simpler overloaded resizeImage() function that returns a result.
Aleksey Vaneev e928341c 2023-12-07T05:40:20 LANCIR 3.0.9. Changed floating-point `0x1pN` constants not supported by some compilers, to `e` notation.
Aleksey Vaneev bb3482a7 2023-08-05T10:23:43 LANCIR 3.0.8. Removed _mm_cvtss_f32 SSSE3 intrinsic dependency.
Aleksey Vaneev 7271d321 2021-12-30T07:22:40 LANCIR 3.0.7. Optimized 1-channel resize function for a slightly lower overhead.
Aleksey Vaneev 1b311293 2021-12-28T10:48:48 LANCIR 3.0.6. Fixed a bug in update() that returned "true" even if filters were not updated, previously this impacted overhead when resizing many small images.
Aleksey Vaneev 6e0a1229 2021-12-27T20:19:28 LANCIR 3.0.5. The "virtual oversampling" has been removed from this version, for an even lower overhead. While it was a correct thing overall, it does not make much of a difference for Lanczos filter. Filter oversampling will likely be used in a future AVIR refactoring to create precise filters while not inducing a computational overhead - it looks like there is no practical need to perform full-featured input image upsizing/oversampling as half of image's samples are initially zero anyway. But for precise filter design oversampling is a necessity, like described on the project page; it has to be tested and analyzed if downsampling a designed oversampled filter works well (it should). So, LANCIR is now likely has a "production" quality level, its further development is not planned at the moment.
Aleksey Vaneev c457bd53 2021-12-27T14:45:08 LANCIR 3.0.4. Rearranged final summation instructions in `resize3` yielding 2-3% performance boost in 3-channel resizing.
Aleksey Vaneev 7b89d36d 2021-12-26T08:14:13 LANCIR 3.0.3. Implemented the "virtual oversampling", at 4X. It is the same technique as originally used in AVIR, but completely overhead-less; improves Lanczos's filter to the maximum. Optimized filter buffer's allocation. LANCIR's cutting-edge techniques will be used in a future AVIR refactoring.
Aleksey Vaneev 3bb2bd95 2021-12-24T15:34:07 LANCIR 3.0.2. Further algorithm's refinement, now using progressive batched resizing which yields an enormous performance boost in most cases on larger images. This is a preparation for a major AVIR refactoring.
Aleksey Vaneev 5809d5b5 2021-12-22T15:41:29 LANCIR 3.0.1. A deep algorithm's redesign. Now features AVX, SSE2, and NEON optimizations out-of-the box. Now it is likely one of the fastest (if not the fastest) Lanczos algorithms available for CPUs. NOTE: resizeImage() function's arguments were changed: now also accepting NewBuf's scanline size.
Aleksey Vaneev 24034240 2021-10-03T09:31:06 Version 3.0. Improved speed by 10-25% on upsizing by utilizing a special resizing function together with filter-less 2X upsizing. Does not apply to the de-interleaved (AVX) resizing. Minor LANCIR optimization.
Aleksey Vaneev c6e4dead 2021-04-15T17:27:09 Version 2.8. Fixed regression with the copy-constructor of CImageResizeVars class (previously it caused uninitialized accesses). Removed filter length optimization as it did not reduce overhead measurably. Optimized "peaked cosine" window function generator (removed division). Added "unbiasing" to resizer - an unconventional approach which reduces peak error significantly, at the expense of 5% increased overhead. Reoptimized filter parameters, now yielding an unprecedented quality.
Aleksey Vaneev 4efa5c61 2021-04-10T22:34:30 Version 2.7. Added normalization of individual fractional delay filters. This reduced peak error by 3 dB, which is substantial for image resizing. Reoptimized all filter parameters resulting in better frequency response linearity. Added AVIR_NOCTOR macro to avoid copy-constructing and copying objects of some classes via a default copy function. Added copy-constructor and assignment operator to the CImageResizerVars class, to avoid uninitialized memory copying. Corrected automatic image offseting and "k" factor on image upsizing.
Aleksey Vaneev 4ee357d2 2021-02-18T15:44:12 LANCIR: added a missing `ElCount` multiplier to `memset` on empty input image.
Aleksey Vaneev fa37d98a 2020-03-14T08:45:06 LANCIR: fixed a rare access violation crash.
Aleksey Vaneev 96d6501c 2019-06-23T22:30:58 Fixed a crash in CLancIR.
Aleksey Vaneev ace3afd9 2019-05-31T16:12:09 Added independent "kx" and "ky" step parameters to the CLancIR resizing function.
Aleksey Vaneev f3d8c344 2019-05-18T08:42:00 Made minor text description updates in "lancir".
Aleksey Vaneev 10e74833 2019-05-17T22:44:26 Added "lancir" filter normalization.
Aleksey Vaneev 30447d6c 2019-05-17T10:03:37 Made minor optimizations to "lancir".
Aleksey Vaneev 5ab3db5a 2019-05-16T13:01:38 Made minor "lancir" optimizations.
Aleksey Vaneev 13d00bb2 2019-05-16T06:30:49 Fixed a minor image offset on image upsizing.
Aleksey Vaneev 244414db 2019-05-16T05:17:44 Implemented fast CLancIR image resizing algorithm.