Developers

PVRTC: the most efficient texture compression standard for the mobile graphics world

Picture of Imagination Technologies
Mar 27, 2013  |  5 min read

After going behind the scenes of Imagination’s latest and greatest PVRTC2 texture compression standard, we now look at how PVRTC works and compare it against other widely texture compression standards available to game developers who want to target the whole range of our PowerVR GPUs, including Series5, Serie5XT and Series6.

Textures are ubiquitous in mobile and desktop graphics. They add a degree of realism to a wide range of applications like games or navigation apps where a combination of factors such as image quality and loading times are vital to smartphone, tablet and portable console users. Typically such content is increasingly pushing for higher quality on higher resolutions in order to raise the overall quality bar. This means computing systems need to have access to the right combination of features, raw graphics and compute performance and software tools to make efficient use of all available resources.

Even though the effort that artists and developers put into texture design and mapping is rarely appreciated, gamers can quickly identify issues associated with texture compression such as low resolution, compression artifacts or aliasing. Therefore adopting and maintaining the right compression standard when starting development work on any application is vital to achieving success.

Why use PVRTC?

PVRTC is Imagination’s proprietary texture compression standard for our PowerVR graphics cores.

The core OpenGL ES 2.0 specification does not define a particular compressed texture format but supports the loading of a wide range of compressed texture data. As more developers are writing apps that run across various operating systems (iOS, Android, BlackBerry 10, Windows 8), using PVRTC will ensure the same consistent experience across more than 1 billion devices. As all our PowerVR Series5/5XT and Series6 support the PVRTC texture compression standard, developers will enjoy the best of both worlds: considerable visual enhancements and a significant reduction in memory footprint compared to block-based compression techniques. In addition to this, they will benefit from the many other advantages of the PowerVR GPU architecture such as high hardware efficiency, a low power design, and unrivalled performance with reduced area costs.

Why use PVRTC texture compression

The main aim of PVRTC is to avoid the discontinuities along rectangular regions that frequently occur with block-based methods such as S3TC and ETC1. Rather than consider the texture as independent blocks of texels, it represents the texture as a pair of low-resolution images, which are bilinearly upscaled. These upscaled images are, in turn, blended on a pixel-by-pixel basis, by a full resolution, but low precision, modulation image.

Its other main advantage is the support of RGBA in both 4bpp and 2bpp modes.

Using PVRTC not only gets you very high compression factors of 8:1 for 4bpp or (amazingly) 16:1 for 2bpp and a superior image quality, but also ensures that your application is optimized for the hardware platforms on which it runs as there is a direct correlation between the choice of the PVRTC scheme and an enhanced user experience.

As mentioned, PVRTC also supports both opaque (RGB) and translucent (RGBA) textures. Alpha data is stored only for areas that it is actually needed, so if local area is opaque, all the available data will be used to store RGB data. Although the PVRTC 2bpp format offers the highest memory and bandwidth savings, it’s important to consider textures on a case by case basis so developers should try both 4bpp and 2bpp to decide which works best for them. We’ve made sure that by choosing either PVRTC 2bpp or PVRTC 4bpp, you will still have significantly higher quality with no compromises in memory bandwidth, power consumption or performance.

Memory, quality, power, performance: the four horsemen of texture compression

Many mobile applications today can offer desktop quality graphics and therefore most developers have focused on supporting OpenGL ES as the main standard for the embedded market. This implies using detailed textures which require more memory and large data sizes. Compressing textures is a natural choice for developers who understand the requirements of the mobile gaming market.

Limiting power consumption is what has always driven the embedded market. Software developers and hardware engineers should know that memory accesses are the most important cause of battery drain next to keeping the display lit. With PowerVR’s tile-based deferred rendering, Imagination has managed to keep most of the processing on chip and our graphics processing architecture has been optimized right down to the texture decoding level, making sure that we provide the industry’s leading, most popular implementation  for texture compression.

Modern computing platforms have shared, unified memory architectures. A multi-core CPU, a multi-threaded GPU and other processing units all compete for the same RAM resources, so memory bandwidth becomes vital for mobile. Texture compression permits smaller texture footprints and therefore the size of transfers from the main memory to the GPU is reduced, allowing rendering or other computing tasks (like doing game physics or image processing with OpenCL ) to complete faster.

Memory storage options for embedded devices are quite limited compared to desktop PCs. Texture compression not only reduces your application’s memory footprint, it also allows you to decrease the amount of storage your game occupies on a smartphone and tablet. As memory and storage sizes are becoming increasingly important, expectations around multi-tasking while gaming have also continued to rise. While a file compression scheme like PNG could often have a lower size, a PVRTC texture will not need to be decompressed to full size while the app is running. Another advantage is that compressed textures can always be compressed further via zipping or other file compression methods.

PVRTC compared against ATITC, ETC1 and BC1

Imagination’s PVRTC compared against ATITC, ETC1 and BC1

Finally, visual quality is also a determining factor even for mobile devices. Because lossy compression can be tolerable in a rendering system such as a GPU, most texture compression algorithms involve some form of quantization for fixed-size blocks of pixels. But as high-resolution displays for portable devices start to become a common feature, getting the right balance between image quality and compression factors is a necessary step in writing an app optimized for the mobile world.

PVRTC: How it works

Decompressing PVRTC-encoded textures implies a three-step process which has been carefully optimized for hardware efficiency and low power consumption.

Firstly, to decode a texel (or a set of 2×2 neighbouring texels) the hardware identifies which four 64-bit ‘words’ of data are needed and fetches them from the cache and/or memory. Bilinear interpolation is then applied to the colour data contained in those ‘words’ to produce a local 4×4 upscaling of the two low resolution images (8×4 for PVRTC 2bpp).

The modulation data is embedded in the data words used to linearly interpolate between the up-scaled versions of the low resolution images. There are a number of optimizations in both the up-scaling process and the modulation steps which have a three-fold benefit: minimize hardware requirements, increase decompression efficiency and reduce power consumption.

PVRTC how it works

PVRTC: how it works

For example, the low precision colour data are expanded to a uniform RGBA 5554 format which then allows a reduction in the cost of the bilinear upscale by moving the conversion to  8888 colour precision to after the upscale. Also, bilinear up-scales are treated as subdivision of surface patches meaning that four texels can be produced in parallel with only a handful of multiplexers and a limited number of add units per colour channel.

PVRTC data word

The PVRTC data word

By using regions of adjacent texels, PVRTC addresses the worst case scenario of block-based schemes. It produces base colours in the middle of each corresponding region which keeps weighting factors small and increases image quality and decompression efficiency.

Finally, the choice of appropriate modulation values gives numerators that are easy to implement in hardware.

Compression types for mobile: part 2 of our case study

Presently, there are six well-known compression types supported by OpenGL ES:

–          PVRTC, Imagination’s widely used PowerVR texture compression

–          PVRTC2, the recently updated PowerVR texture compression

–          ETC1 (Ericsson texture compression) and ETC2/EAC (backwards compatible with ETC1 and mandatory in the OpenGL ES 3.0 graphics standard)

–          ASTC (Adaptive scalable texture compression), an upcoming optional extension for both OpenGL and OpenGL ES

–          ATITC (ATI texture compression)

–          S3TC (S3 texture compression), also called DXTn, DXTC or BCn

Since each compression method has various implementation specifics, we have used three separate images to test their visual efficiency

PVRTC comparison image sources

We have focused on PVRTC and used our PVRTexTool from the PowerVR Graphics SDK v3.0 to compress the images mentioned above. It features an improved GUI, support many popular texture compressions formats and includes error metrics which allow you to compare between results.

We have also included ETC1 and BC1 (S3TC, DXT1) as they are currently supported by some existing OpenGL ES-compliant hardware platforms.

_PowerVRGPU_02_PVRTC ATITC_ETC1_BC1 03_03_PVRTC_ATITC_ETC1_BC1

Being able to have textures compressed at all times improves cache use efficiency. The PowerVR architecture only decompresses texels when needed in the final rendering process, resulting in significant reductions in on-chip bandwidth and processing power. This is one of many reasons why PowerVR PVRTC has been, and continues to be, a key part of every generation of PowerVR graphics architecture, including the forthcoming Series6.

If you want to know more about PVRTC, you can contact our DevTech support team on Imagination’s PowerVR Insider dedicated forum. Among other interesting and useful threads, you can find a dedicated PowerVR FAQ list that covers devices supporting PVRTC2 and briefly explains what the PVRTC standard is about. For more on PVRTC and texture compression, follow us on Twitter (@ImaginationTech) and subscribe to our blog.

 

Share this post

About the Author
Picture of Imagination Technologies

Here at Imagination, our vision is to be the undisputed leader in semiconductor IP solutions that transform billions of lives.

More from Imagination Technologies

Read Next