August 29, 2017

H.264 vs H.265 — A technical comparison. When will H.265 dominate the market?



Stream4S opinion on when H.265 will become the standard codec on the market.





Remember those frustrating times when you were watching a video or a movie online and all of the sudden you experienced a loss of quality? Now it can be possible to stream high-quality videos in congested network environments in a faster and virtuous way. Conceived to boost video streaming, High Efficiency Video Coding (HEVC), or H.265, is a video compression standard designed to substantially improve coding efficiency when compared to its precedent, the Advanced Video Coding (AVC), or H.264. With an increasing growth of video streaming on the Internet over popular websites such as Netflix and YouTube, and with 4K cameras gaining new ground in the market, a considerable amount of storage and bandwidth is required. HEVC promises a 50% storage reduction as its algorithm uses efficient coding by encoding video at the lowest possible bit rate while maintaining a high image quality level.
As many of us, Stream4s believes HEVC will revolutionize how video data is displayed, either online, on television and even in the surveillance industry. With this new format, image resolutions around 8192×4320 become possible to display and stream. To demonstrate the incredible power of this codec, a subjective video performance study was made between these two codecs to understand how intensely is this bit reduction. The study showed the bit reduction is inversely proportional to the video image quality, where HEVC/H.265 presented a bit reduction of 52% at 480p and 64% at 4K UHD when compared to H.264. Besides this outstanding bit reduction, when compared to H.264, HEVC/H.265 delivers a significantly better visual quality, when compressed to the same file size or bitrate.

 

 Powerful Streaming — at what cost?

Even though HEVC is already finalized, it is still not popular. Apart from the fact that the codec is patented by various parties and it is associated with high licensing fees, HEVC/H.265 comes with the trade-off requiring almost 10x more computing power. This new technology is on standby until the hardware market adapts to it, as it happened already with H.264, launched in 2003 but only gaining popularity a few years later. Hardware manufacturers are already starting to adjust their products to support this new format to fulfill the intense market need. Even though some softwares such as VideoLAN are capable to decode such codec, software decoding, although more flexible, is not an option since hardware decoding is usually faster and saves battery life tremendously. Nevertheless, hardware still takes up valuable disc space on either the CPU or GPU.

 

HVEC vs H.264 — a technical comparison

Both codecs work by comparing different parts of a video frame in order to find the ones that are redundant within the subsequent frames. These areas are replaced with a short information, describing the original pixels. What differs HEVC/H.265 from H.264 is the ability to expand the size of these areas into bigger or smaller blocks, called coding tree units (CTU) in the HEVC/H.265. The pattern CTU sizes can be from 4×4 to 64×64, whilst H.264 only allows a maximum block-size of 16×16 (CTU is particular feature of HEVC). An improved CTU segmentation, as well as a better motion compensation and spatial prediction require much more signal processing capability for video compression, but has a significantly less impact on the amount of computation needed for decompression. Motion compensated prediction, another great progress in HEVC/H.265, references blocks of pixels to another area in the same frame (intra prediction) or in another frame (inter prediction).
As mentioned above, CTU are one of the HEVC’s main coding tools. Apart from this, the codec relies on paralleling processing computing techniques to make it even faster and supports advanced extensions as AVX/AVX2 and FMA3/FMA4. The individual rectangular regions that divide the image are independent and enable parallel processing. Besides, HEVC also has another feature that H.264 doesn’t possess: Wavefront Parallel Processing (WPP), a sort of decision tree that grants a more productive and effectual compression.
Several other coding tools used in H.264 are continued in this new codec, although with some slight, yet unprecedented, changes. The lossless data compression entropy coding, the Context-adaptive binary arithmetic coding (CABAC), is preserved in HEVC/H.265 but in a slightly upgraded version. Intra prediction is another feature that suffered significantly improvements in relation to H.264. HEVC stipulates 33 directional modes while H.264 limits them to 8 and allows DC intra prediction as well as planar prediction. An additional improvement is mainly due to the Adaptive Motion Vector Prediction, the newest method for inter prediction as it uses the picture information in a more concise way.


Thanks to the notably improvements that can be seen in this new codec, Stream4s is confident that HEVC/H.265 will become the universal standard codec, as soon as the hardware catches up.

HEVC/H.265 not only has a better visual quality at a low storage and bandwidth but also a dexterously coding algorithm by encoding motion vectors with much greater precision and minimal residual errors. Besides the preeminent method used for inter prediction, this new codec also presents an improved deblocking filter and sample adaptive offset to reduce even more artifacts.

Another excellent tutorial on it:

https://youtu.be/Fawcboio6g4

Here is a YouTube demo. The difference is dramatic for h.265:

https://youtu.be/qL22L0mRSDs



Source: https://medium.com/advanced-computer-vision/h-264-vs-h-265-a-technical-comparison-when-will-h-265-dominate-the-market-26659303171a