feature article
Subscribe Now

Memory vs. Image Quality

Imagination’s PVRIC4 Combines Lossy and Lossless Compression

“Sometimes a loss is the best thing that can happen.” – Snoop Dogg

Audiophiles claim to hear which way their speaker wire is braided. Oenophiles (aka wine snobs) say they can taste the type of soil the grapes were grown in. Car buffs can recite make, model, and year based on a glimpse of a taillight lens.

And graphics professionals can detect subtle differences in compression algorithms. All you pixel whisperers out there, look away now. We’re about to do some lossy compression.

It’s no secret that today’s consumer electronics handle a USDA boatload of image data. Photos and videos consume a lot of memory, a lot of transmission bandwidth, a lot of GPU energy, and a lot of people’s time. So, for the good of the industry, why not reduce three out of four?

That’s just what Imagination Technologies says it’s done with its new video-compression IP, dubbed PVRIC4. If you’re a lifetime member of the PowerVR fan club, you’ll know that PVRIC4 follows PVRIC versions 3, 2, and 1. Yes, it’s the fourth generation of the PVRIC (which stands for PowerVR Image Compression) compression hardware.  

What separates Number Four from its three older siblings is lossy compression. Whereas the other versions all did lossless compression, PVRIC4 does both lossless and lossy. Why both? Because your customers probably can’t see the difference.

The whole point behind image compression – of either kind – is to save you money on memory, computing power, bandwidth, and possibly energy. There are well-known ways to compress still images without compromising their image quality one bit – literally. In fact, it’s hard to find photo images that aren’t compressed, even in high-end digital cameras. Lossless compression is common, and lossy compression (e.g., JPEG or GIF) even more so.

Same goes for video: you can compress the heck out of a video stream without affecting the image quality at all. More often, though, we accept a certain amount of image degradation in return for big reductions in bandwidth or memory footprint. Every TV station and video-streaming website in the world uses lossy compression, and the subscribers don’t seem to mind (or even know it’s happening).

Imagination’s PVRIC blocks – all four generations of them – include hardware to do lossless compression on-the-fly. These IP blocks sit between your video engine and its video buffer. Their operation is invisible to the GPU; think of it as an unusually intelligent memory controller. They handle read, write, or read-modify-write cycles to any arbitrary address, compressing data during writes and decompressing it during reads. Because all four do lossless compression, the images are unchanged but the memory they require to store can vary widely.

Some images compress very well; some not so much. Your memory savings is therefore variable and highly dependent on the images. There’s no way to tell how much good the compression will do. In the pathological worst-case scenario of an image of random static noise, you get exactly zero compression. That’s unlikely, but at least you’re no worse off than before.

What PVRIC4 adds is an alternate path. In addition to its lossless compression pipeline, it adds a newly designed lossy pipeline. The latter pipe absolutely guarantees 2:1 compression, if not better. That means you’ll save on memory, no matter what. The tradeoff? You may or may not notice the difference in image quality.

Imagination is betting you won’t, and it calls its PVRIC4 “visually lossless.” If you take the time to compare the same image compressed via both pipelines, you’ll see that some pixels are different. But in real life, at video frame rates, you won’t.  

That 2:1 compression ratio is something of a magic number. At anything less than 50% compression, you can’t guarantee that you’ll save enough space to cut your memory BOM. But if the PVRIC4 can cut images in half, all day long and under any circumstances, you can whack your buffer in half with confidence.

How do you know which pipeline to use? You don’t have to decide – the hardware does it for you. All images pass through both the lossy and the lossless pipelines simultaneously, and the PVRIC4 decides later which version to use. If the lossless (image-perfect) pipeline managed to produce a 2:1 shrink, then it gets routed to the output. But, if the compression ratio is anything less than 2:1, the lossy version takes its place. (You can disable the lossy pipeline at any time and force lossless compression only.)

The decision happens on a block-by-block basis, not over the whole image, so some portions of a video frame may get compressed one way and some the other. In fact, that’s nearly always the case. The image on the left shows how a typical patchwork of 16×4 blocks have passed through the lossless pipeline (in black) versus the lossy pipeline (in purple) to produce the final image on the right.

In a dozen or so benchmarks that the company shared, the difference in compression ratios between the two pipelines was pretty small. The new lossy pipeline didn’t squeeze images down much smaller than the older, lossless, pipeline could do. That’s either good news or bad news, depending on your perspective. The good news is, the existing lossless pipeline was already efficient and achieved impressive compression rates with no loss of image quality. The bad news is, it didn’t always achieve that magic 2:1 ratio that allows you to cut your frame buffer in half. The new lossy pipeline is what permits that. The PVRIC4 will always pass under the 2:1 bar, one way or another.

Imagination says its PVRIC4 is better than competing image-compression engines because (a) it works at the memory interface, handling random-access buffer reads and writes instead of just continuous display streams, and (b) it’s “perceptually lossless,” meaning, uh, better. Sure, you can find alternatives that compress by more than 2:1, but the visual difference will make your eyes hurt.

Cost might be an issue, too. If you’re using Imagination’s PowerVR GPU, the company will be happy to throw in the PVRIC4 for free. If you’re using an arch-rival’s IP such as (ahem) Mali, then you’ll have to pay a licensing fee. That’s only fair, and it’s good to know that PVRIC4 can work with competing GPUs. That should be music to an SoC designer’s ears.

Leave a Reply

featured blogs
Mar 28, 2024
The difference between Olympic glory and missing out on the podium is often measured in mere fractions of a second, highlighting the pivotal role of timing in sports. But what's the chronometric secret to those photo finishes and record-breaking feats? In this comprehens...
Mar 26, 2024
Learn how GPU acceleration impacts digital chip design implementation, expanding beyond chip simulation to fulfill compute demands of the RTL-to-GDSII process.The post Can GPUs Accelerate Digital Design Implementation? appeared first on Chip Design....
Mar 21, 2024
The awesome thing about these machines is that you are limited only by your imagination, and I've got a GREAT imagination....

featured video

We are Altera. We are for the innovators.

Sponsored by Intel

Today we embark on an exciting journey as we transition to Altera, an Intel Company. In a world of endless opportunities and challenges, we are here to provide the flexibility needed by our ecosystem of customers and partners to pioneer and accelerate innovation. As we leap into the future, we are committed to providing easy-to-design and deploy leadership programmable solutions to innovators to unlock extraordinary possibilities for everyone on the planet.

To learn more about Altera visit: http://intel.com/altera

featured chalk talk

The Future of Intelligent Devices is Here
Sponsored by Alif Semiconductor
In this episode of Chalk Talk, Amelia Dalton and Henrik Flodell from Alif Semiconductor explore the what, where, and how of Alif’s Ensemble 32-bit microcontrollers and fusion processors. They examine the autonomous intelligent power management, high on-chip integration and isolated security subsystem aspects of these 32-bit microcontrollers and fusion processors, the role that scalability plays in this processor family, and how you can utilize them for your next embedded design.
Aug 9, 2023
27,635 views