Files
basis_universal/encoder
Arseny Kapoulkine 950e452f7d Optimize find_optimal_selector_clusters_for_each_block
In find_optimal_selector_clusters_for_each_block, a noticeable amount of
time is spent computing color distances for pixels of different clusters.

Because for each pixel we only have 4 colors to compare against, we have
to compute a grand total of 64 unique color deltas; the cluster count,
however, is typically ~200 and we computed 16 deltas for each cluster.

It's thus cheaper to precompute all 64 deltas ahead of time and just add
the right deltas up for each cluster.

This reduces the time to encode a 2Kx2K image with a mip chain in a
single thread with SSE4.1 enabled from 7.8 seconds to 7.3 seconds; the
resulting image is binary identical before/after this change.
2021-03-24 09:12:31 -07:00
..
2020-12-17 13:59:00 -05:00
2021-03-09 11:00:25 -05:00
2021-03-09 11:00:25 -05:00
2021-03-09 11:00:25 -05:00
2021-03-09 11:00:25 -05:00
2021-03-09 11:00:25 -05:00
2021-03-09 11:00:25 -05:00
2021-03-09 11:00:25 -05:00
2021-03-09 11:00:25 -05:00
2021-03-09 11:00:25 -05:00
2021-03-09 11:00:25 -05:00
2021-03-09 11:00:25 -05:00
2021-03-09 11:00:25 -05:00
2021-03-09 11:00:25 -05:00
2021-03-09 10:58:57 -05:00
2021-03-09 10:58:57 -05:00
2021-03-09 11:02:48 -05:00
2021-03-09 11:00:25 -05:00
2021-03-09 11:00:25 -05:00
2021-03-09 11:00:25 -05:00
2021-03-09 11:00:25 -05:00
2021-03-09 10:58:42 -05:00
2021-03-09 10:58:42 -05:00
2021-03-09 10:58:42 -05:00
2021-03-09 10:58:42 -05:00
2021-03-09 10:58:42 -05:00