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
Apr 25, 2024
Structures in Allegro X layout editors let you create reusable building blocks for your PCBs, saving you time and ensuring consistency. What are Structures? Structures are pre-defined groups of design objects, such as vias, connecting lines (clines), and shapes. You can combi...
Apr 25, 2024
See how the UCIe protocol creates multi-die chips by connecting chiplets from different vendors and nodes, and learn about the role of IP and specifications.The post Want to Mix and Match Dies in a Single Package? UCIe Can Get You There appeared first on Chip Design....
Apr 18, 2024
Are you ready for a revolution in robotic technology (as opposed to a robotic revolution, of course)?...

featured video

MaxLinear Integrates Analog & Digital Design in One Chip with Cadence 3D Solvers

Sponsored by Cadence Design Systems

MaxLinear has the unique capability of integrating analog and digital design on the same chip. Because of this, the team developed some interesting technology in the communication space. In the optical infrastructure domain, they created the first fully integrated 5nm CMOS PAM4 DSP. All their products solve critical communication and high-frequency analysis challenges.

Learn more about how MaxLinear is using Cadence’s Clarity 3D Solver and EMX Planar 3D Solver in their design process.

featured paper

Designing Robust 5G Power Amplifiers for the Real World

Sponsored by Keysight

Simulating 5G power amplifier (PA) designs at the component and system levels with authentic modulation and high-fidelity behavioral models increases predictability, lowers risk, and shrinks schedules. Simulation software enables multi-technology layout and multi-domain analysis, evaluating the impacts of 5G PA design choices while delivering accurate results in a single virtual workspace. This application note delves into how authentic modulation enhances predictability and performance in 5G millimeter-wave systems.

Download now to revolutionize your design process.

featured chalk talk

E-Mobility - Charging Stations & Wallboxes AC or DC Charging?
In this episode of Chalk Talk, Amelia Dalton and Andreas Nadler from Würth Elektronik investigate e-mobility charging stations and wallboxes. We take a closer look at the benefits, components, and functions of AC and DC wallboxes and charging stations. They also examine the role that DC link capacitors play in power conversion and how Würth Elektronik can help you create your next AC and DC wallbox or charging station design.
Jul 12, 2023
32,974 views