blurhash
blurhash copied to clipboard
C: Thread safety and improved MSVC build support
This is derived from #72, but with the commits restructured and simplified, and some additional changes.
- Fix building on MSVC
- Fix incorrect static array size
- Remove implicit type conversions
- Remove VLA usage
- Expose a thread-safe version of the main hash function
The original main hash function is now implemented in terms of the thread-safe version.
Does this come with a performance cost?
A small one, but yes; you could alternately solve the same problem by making the array [9][9][3] at no cost.