logoalt Hacker News

e7h4nztoday at 6:06 AM2 repliesview on HN

The irony of hardware image compression is that the devices that need it most are typically older, bandwidth-constrained SoCs. However, these are precisely the devices that do not support modern formats.

Technologies like ARM AFRC and PVRIC4 can only be used on modern flagship devices. Since flagship memory bandwidth isn't particularly strained to begin with, we end up spending a massive amount of effort on optimizations that only benefit a fraction of users. In most cases, teams are simply unwilling to pay that development cost.

The driver behavior of PVRIC4 perfectly encapsulates the current state of mobile GPU development: 1. The API promises support for flexible compression ratios. 2. The driver silently ignores your request and defaults to 1:2 regardless. 3. You only discover this because a PowerVR developer quietly confirmed it in a random comment section.

This is a microcosm of the "texture compression hell" we face. Beyond the mess of format fragmentation, even the driver layer is now fragmented. You can't trust the hardware, and you can't trust the software.

While the test results for ARM AFRC are genuinely impressive—it's not easy to outperform a software encoder in terms of quality—it remains problematic. As long as you cannot guarantee consistent behavior for a single codebase across different vendors, real-time CPU and GPU encoders remain the only pragmatic choice.

For now, hardware compression encoders are just "nice-to-haves" rather than reliable infrastructure. I am curious if anyone has used AFRC in a production environment? If so, I’d love to know how your fallback strategy was designed.


Replies

mrectoday at 8:45 AM

I don't disagree given your "most" qualifier, but there's a case where every level of hardware would benefit: compression of textures generated at runtime, either via procgen or for e.g. environment maps.

This is in a frustrating state at the moment. CPU compression is way too slow. Some people have demoed on-the-fly GPU compression using a compute shader, but annoyingly there is (or at least was at the time) no way in the GPU APIs to `reinterpret_cast` the compute output as a compressed texture input. Meaning the whole thing had to be dragged down to CPU memory and uploaded again.

show 1 reply