Wednesday, 27 January 2016

etcpak 0.5

etcpak strikes again, this time with version 0.5, which has the ability to calculate planar blocks from the ETC2 standard. Color gradients, which were a sore spot in the image quality previously, will now have a much smoother look. This new option is activated by passing -etc2 parameter and comes at a small time cost (152% of pure ETC1 mode, 77 ms vs 117 ms). Example compressed image:

Planar block count in this image is quite high, as can be seen on the following debug image, where blue color indicates planar mode:

It should be noted that AVX2 version of planar block compression does not produce the same results as scalar one. Keep that in mind on pre-Haswell machines.


Saturday, 2 January 2016

etcpak 0.4

New year, new etcpak. Previously etcpak was an order of magnitude faster than the competing ETC compressors. This new version is yet another order of magnitude faster.

Time to compress 8K image:
etcpak 0.3: 655 ms
etcpak 0.4: 77 ms

This is thanks to Daniel Jungmann, who submitted patches implementing SSE 4.1 and AVX2 instructions. SSE 4.1 is now default and required (supported by Core 2 and AMD Bulldozer CPUs) and AVX2 is detected at runtime (support added in Haswell CPUs).

Other new features:
  • ETC1 dissection mode, allowing in-depth inspection of compressed images.
  • Mip-maps will be calculated only if needed (doh!).
  • Alpha channel compression is now deterministic.
  • Minor changes in compression precision. This will change checksums of most compressed images, compared with previous versions.
  • Multithreaded job dispatch algorithm was improved.
  • zlib/PNG checksum validation was removed, resulting in 12% improvement in image load times.