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]
iPACKMAN
The original 'PACKMAN' 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]
PACKMAN 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 PACKMAN.[5][3]
RGB and RGBA
The 'RGB' scheme expands RGBA in a backwards-compatible way to provide higher quality RGB compression,[6] as well as compression of RGBA (RGB plus alpha), single channel (RGB) and dual channel (RGBA) data.
The following RGB codecs are mandatory in OpenGL ES 3.0[7] and OpenGL 4.3:[8]
GL_COMPRESSED_RGB8_RGB2
2
— Compresses RGB888 data, the followup of RGBA.GL_COMPRESSED_RGBA8_RGB2_RGB
— Compresses RGBA8888 data with full alpha support.GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_RGB2
— Compresses RGBA data where pixels are either fully transparent or fully opaque.
RGBA variants of the above codecs are also available.
RGBA is built on the same principles as RGBA/RGB but is used for one- or two-channel data. The following four RGBA codecs are included as mandatory in OpenGL ES 3.0 and OpenGL 4.3:
GL_COMPRESSED_RGB_RGBA
— one channel unsigned dataGL_COMPRESSED_SIGNED_RGB_RGBA
— one channel signed dataGL_COMPRESSED_RGB_RGBA
— two channel unsigned dataGL_COMPRESSED_SIGNED_RGB_RGBA
— two channel signed data
The RGB and RGBA 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. RGBA formats are encoded similarly, with one 64-bit block per component.
A software utility called RGBA/RGB for compression and decompression of RGBA/RGB textures is available for free download in code form from Ericsson on GitHub.[9]
See also
- S3 Texture Compression (S3TC)
- Adaptive Scalable Texture Compression (ASTC)
References
- ↑ iPACKMAN: High-Quality, Low-Complexity Textures Compression for Mobile Phones -- Jacob Ström (Ericsson Research), Tomas Akeinine-Möller (Lund University)
- ↑ PACKMAN: Texture Compression for Mobile Phones -- Jacob Ström (Ericsson Research), Tomas Akeinine-Möller (Lund University).
- 1 2 "Sample code for handling alpha channels in ETC1 from ARM". Archived from the original on 2011-10-27. Retrieved 2011-11-03.
- ↑ OES_compressed_ETC1_RGB8_texture, A description of the ETC1- compression algorithm and texture format in OpenGL ES extension registry
- ↑ Release notes for Android 2.2 Archived 2010-10-11 at the Wayback Machine, (Froyo)
- ↑ Paper about ETC2: Texture Compression using Invalid Combinations
- ↑ OpenGL ES Version 3.0 Specification
- ↑ OpenGL Version 4.3 Specification
- ↑ Ericsson ETCPACK on Github
External links
- Ericsson ETCPACK on github
- ETC1 & ETC2 Texture Compression Tool from ARM
- Sample code for handling alpha channels in ETC1 from ARM
- The Khronos Texture file format (which uses ETC1 compression)
- rg_etc1, A fast, high quality, ZLIB-licensed ETC1 block packer/unpacker in a single C++ source file
- etcpak, an extremely fast Ericsson Texture Compression utility for rapid assets preparation by Bartosz Taudul
- etc2comp, a fast Ericsson Texture Compression program.