## Compression Measurement Explained

*Euclid Discoveries has an intense focus on improving video compression and reducing video bandwidth consumption. So it makes sense that we are equally interested in how compression is measured and how reductions in bandwidth utilization are expressed. We asked one of our resident experts, Donald Pian, to shed some light on the subject. Donald is a PhD and Algorithmic Engineer for Euclid and the following is his explanation of video compression measurement, as it relates to the H.265 Video Codec Standard.*

H.264 is the latest video compression standard and is more formally referred to as ITU-T Rec. H.264 (MPEG-4 Part 10). Since its standardization in 2003, most would consider H.264 as the most successful digital video codec standard in history. However, H.264 may be widely replaced by ITU-T Rec. H.265 (MPEG-H Part 2) since it offers significantly better video coding efficiency.

In the era of increasing video consumption and decreasing spectrum for the mobile market all eyes are on the new standard and the promise of smaller file sizes and decreased bandwidth usage. As people talk about bandwidth, bitrates and video quality, we thought it would be a good idea to explain how to measure video compression and how to compare the encoding performance of the new standard H.265 to the current standard H.264.

Starting with the basics, one normally looks at the following three factors in measuring video compression: how big is the communication channel one can send data through (bandwidth), how much data does one need to send per second (encoded bitrate) and what is the quality of the video you are sending.

Digital video quality which is typically measured by Peak Signal-to-Noise Ratio (PSNR) will be covered in another article. For now, we will assume that the video codecs to be compared have similar parameter settings (e.g. same fixed quantization step size) and the resulting videos have the same perceptual visual quality.

Assuming the video quality produced by each video codec is similar to each other, let’s look at video encoding performance which is often measured by* Bandwidth Reduction*and* Compression Ratio Gain*. To measure bandwidth reduction you compare the bitrates of the videos encoded by the two different codecs as follows:

Let BitrateA and BitrateB be the video encoded bit rates for VideoCodecA and VideoCodecB, respectively. Then the Bandwidth Reduction of VideoCodecB compared to VideoCodecA is equal to ( BitrateA minus BitrateB ) divided by BitrateA.

For example, if you encode a video with codec A and it has a bitrate of 1000 bits/sec and encode the same video with codec B which has a bitrate of 800 bits/sec then using the formula above the *Bandwidth Reduction* would be (1000 – 800)/1000 or 20% *Bandwidth Reduction*.

Compression ratio gain also uses the resulting bitrates and is equal to ( BitrateA minus BitrateB) divided by BitrateB.

If you use the same bit rates as above (1000 for BitrateA and 800 for BitrateB), then the*Compression Ratio Gain *would be (1000-800)/800 = 25% *Compression Ratio Gain*.

These calculations though are only one step to consider as codec settings can be adjusted to work well with certain videos and one should verify that the video is being encoded by similar methods (apples to apples). Other factors include the type of videos used, the segmentation of the frame during processing, the prediction structure and the rate control.

How does one set the video codec parameters to result in the same delivered video quality? In the second part of this series we will look at video quality along with these other factors in comparing the current ITU-T Rec. H.264 standard to the emerging ITU-T Rec. H.265 standard.