mirror of
https://github.com/navidrome/navidrome.git
synced 2026-10-26 10:17:09 +01:00
Normalize the downscaled image to *image.RGBA once and read Pix directly (the image.At interface boxed a color per pixel — ~16k allocs/encode), and replace per-pixel math.Pow with a 256-entry sRGB-to-linear table. ~72% faster (3.0ms -> 0.86ms for covers >=300px), 19 allocs/op. Benchmark included. |
||
|---|---|---|
| .. | ||
| blurhash.go | ||
| blurhash_bench_test.go | ||
| blurhash_suite_test.go | ||
| blurhash_test.go | ||