ARM-software / astc-encoder

The Arm ASTC Encoder, a compressor for the Adaptive Scalable Texture Compression data format.
https://developer.arm.com/graphics
Apache License 2.0
1.08k stars 241 forks source link

Better hmin/hmax algorithms for SSE/AVX2 #510

Closed rygorous closed 3 weeks ago

rygorous commented 3 weeks ago

Use a formulation that automatically produces the same result in all lanes, avoiding a separate broadcast step.

The same approach would work with floats in principle, but it's not guaranteed to give the same result in all lanes when NaNs are involved (due to the way MINPS/MAXPS are defined), so leave the float versions alone for now.

About 1% encode time reduction encoding a 8192x8192 test texture at 6x6 -thorough on a Ryzen 7950X3D.