Ericsson Texture Compression Explained

Ericsson Texture Compression (ETC) is a lossy texture compression technique developed in collaboration with Ericsson Research in early 2005. It was originally developed under the name iPACKMAN[1] and based on an earlier compression scheme called iPACKMAN.[2]

ETC1

The original 'ETC1' compression scheme provides 6x compression of 24-bit RGB data. It does not support the compression of images with Alpha components, although there are work-arounds for this.[3]

ETC1 takes 4x4 groups of pixel data and compresses each into a single 64-bit word. The 4×4 pixel group is first divided into two 4×2 chunks - either horizontally or vertically. Each half is given a base color - either using 4/4/4 RGB or by giving one of them a 5/5/5 RGB and having the other be a 3/3/3 bit offset from that base. Each 4×2 region also has a 3-bit brightness range selection. Each pixel is then offset from the base color by adding one of four signed values to the base color for its half of the 4×4 group.

This format is a part of the OpenGL ES graphics standard extensions[4] for embedded devices such as mobile phones and has been approved by the Khronos Group for use in the WebGL graphics standard for browser-side World Wide Web graphics.

Android version 2.2 (Froyo) includes support for ETC1.[5]

ETC2

The 'ETC2' scheme expands ETC1 in a backwards-compatible way to provide higher quality RGB compression,[6] as well as compression of RGBA (RGB plus alpha).

The following ETC2 codecs are mandatory in OpenGL ES 3.0[7] and OpenGL 4.3:[8]

sRGB variants of the above codecs are also available.

EAC

EAC is built on the same principles as ETC1/ETC2 but is used for one- or two-channel data. The following four EAC codecs are included as mandatory in OpenGL ES 3.0 and OpenGL 4.3:

Encoding

The RGBA and RG11 formats are encoded in 128 bits per 4x4 block, while the rest are encoded in 64 bits per block. For RGBA, the RGB channels are encoded in a regular 64-bit block, while the A channel gets its own 64-bit block. RG11 formats are encoded similarly, with one 64-bit block per component.

Software

A software utility called ETCPACK for compression and decompression of ETC1/ETC2 textures is available for free download in code form from Ericsson on GitHub.[9]

See also

External links

Notes and References

  1. http://www.jacobstrom.com/publications/StromAkenineGH05.pdf iPACKMAN: High-Quality, Low-Complexity Textures Compression for Mobile Phones
  2. http://www.jacobstrom.com/publications/packman_sketch.pdf PACKMAN: Texture Compression for Mobile Phones
  3. Web site: Sample code for handling alpha channels in ETC1 from ARM . 2011-11-03 . https://web.archive.org/web/20111027230227/http://www.malideveloper.com/developer-resources/sample-code/index.php . 2011-10-27 . dead .
  4. http://www.khronos.org/registry/gles/extensions/OES/OES_compressed_ETC1_RGB8_texture.txt OES_compressed_ETC1_RGB8_texture
  5. http://developer.android.com/sdk/android-2.2.html Release notes for Android 2.2
  6. http://www.graphicshardware.org/previous/www_2007/presentations/strom-etc2-gh07.pdf Paper about ETC2: Texture Compression using Invalid Combinations
  7. Web site: OpenGL ES Version 3.0 Specification . 2012-08-07 . 2016-03-06 . https://web.archive.org/web/20160306081700/https://www.khronos.org/registry/gles/specs/3.0/es_spec_3.0.0.pdf . dead .
  8. http://www.opengl.org/registry/doc/glspec43.core.20120806.pdf OpenGL Version 4.3 Specification
  9. https://github.com/Ericsson/ETCPACK Ericsson ETCPACK on Github