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
Oct 20, 2020
In 2020, mobile traffic has skyrocketed everywhere as our planet battles a pandemic. Samtec.com saw nearly double the mobile traffic in the first two quarters than it normally sees. While these levels have dropped off from their peaks in the spring, they have not returned to ...
Oct 20, 2020
Voltus TM IC Power Integrity Solution is a power integrity and analysis signoff solution that is integrated with the full suite of design implementation and signoff tools of Cadence to deliver the... [[ Click on the title to access the full blog on the Cadence Community site...
Oct 19, 2020
Have you ever wondered if there may another world hidden behind the facade of the one we know and love? If so, would you like to go there for a visit?...
Oct 16, 2020
[From the last episode: We put together many of the ideas we'€™ve been describing to show the basics of how in-memory compute works.] I'€™m going to take a sec for some commentary before we continue with the last few steps of in-memory compute. The whole point of this web...

Featured Paper

Four Ways to Improve Verification Performance and Throughput

Sponsored by Cadence Design Systems

Learn how to address your growing verification needs. Hear how Cadence Xcelium™ Logic Simulation improves your design’s performance and throughput: improving single-core engine performance, leveraging multi-core simulation, new features, and machine learning-optimized regression technology for up to 5X faster regressions.

Click here for more information about Xcelium Logic Simulation

featured paper

Fundamentals of Precision ADC Noise Analysis

Sponsored by Texas Instruments

Build your knowledge of noise performance with high-resolution delta-sigma ADCs. This e-book covers types of ADC noise, how other components contribute noise to the system, and how these noise sources interact with each other.

Click here to download the whitepaper

Featured Chalk Talk

Selecting the Right MOSFET: BLDC Motor Control in Battery Applications

Sponsored by Mouser Electronics and Nexperia

An increasing number of applications today rely on brushless motors, and that means we need smooth, efficient motor control. Choosing the right MOSFET can have a significant impact on the performance of your design. In this episode of Chalk Talk, Amelia Dalton chats with Tom Wolf of Nexperia about MOSFET requirements for brushless motor control, and how to chooser the right MOSFET for your design.

More information about Nexperia PSMN N-Channel MOSFETs