39b85b74c2
This change significantly improves compression speed. Explanation: When generating selector codebook, pixel selectors can be processed in groups, while the intermediate error results for those groups can be precalculated. Testing: The modified algorithm has been tested on the Kodak test set using 64-bit build with default settings (running on Windows 10, i7-4790, 3.6GHz). All the decompressed test images are identical to the images being compressed and decompressed using original version of Crunch. [Compressing Kodak set without mipmaps] Original: 1582222 bytes / 28.865 sec Modified: 1482780 bytes / 13.340 sec Improvement: 6.28% (compression ratio) / 53.78% (compression time) [Compressing Kodak set with mipmaps] Original: 2065243 bytes / 36.988 sec Modified: 1931586 bytes / 18.087 sec Improvement: 6.47% (compression ratio) / 51.10% (compression time)