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
Dec 1, 2023
Why is Design for Testability (DFT) crucial for VLSI (Very Large Scale Integration) design? Keeping testability in mind when developing a chip makes it simpler to find structural flaws in the chip and make necessary design corrections before the product is shipped to users. T...
Nov 27, 2023
See how we're harnessing generative AI throughout our suite of EDA tools with Synopsys.AI Copilot, the world's first GenAI capability for chip design.The post Meet Synopsys.ai Copilot, Industry's First GenAI Capability for Chip Design appeared first on Chip Design....
Nov 6, 2023
Suffice it to say that everyone and everything in these images was shot in-camera underwater, and that the results truly are haunting....

featured video

Dramatically Improve PPA and Productivity with Generative AI

Sponsored by Cadence Design Systems

Discover how you can quickly optimize flows for many blocks concurrently and use that knowledge for your next design. The Cadence Cerebrus Intelligent Chip Explorer is a revolutionary, AI-driven, automated approach to chip design flow optimization. Block engineers specify the design goals, and generative AI features within Cadence Cerebrus Explorer will intelligently optimize the design to meet the power, performance, and area (PPA) goals in a completely automated way.

Click here for more information

featured paper

Power and Performance Analysis of FIR Filters and FFTs on Intel Agilex® 7 FPGAs

Sponsored by Intel

Learn about the Future of Intel Programmable Solutions Group at intel.com/leap. The power and performance efficiency of digital signal processing (DSP) workloads play a significant role in the evolution of modern-day technology. Compare benchmarks of finite impulse response (FIR) filters and fast Fourier transform (FFT) designs on Intel Agilex® 7 FPGAs to publicly available results from AMD’s Versal* FPGAs and artificial intelligence engines.

Read more

featured chalk talk

Optimize Performance: RF Solutions from PCB to Antenna
RF is a ubiquitous design element found in a large variety of electronic designs today. In this episode of Chalk Talk, Amelia Dalton and Rahul Rajan from Amphenol RF discuss how you can optimize your RF performance through each step of the signal chain. They examine how you can utilize Amphenol’s RF wide range of connectors including solutions for PCBs, board to board RF connectivity, board to panel and more!
May 25, 2023
23,125 views