… for Codecs & Media
Tip #690: H.264 vs. HEVC – What’s the Difference?
Smaller file size, greater image quality; but requiring more CPU power to encode or decode.
This tip, written by Ana Rodrigues, first appeared in Medium.com. This is a summary.
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 Advanced Video Coding (AVC), or H.264.
With this new format, image resolutions around 8192×4320 become possible to display and stream. HEVC reduces file sizes 40-60%, depending upon frame size. As well, when compared to H.264, HEVC/H.265 delivers a significantly better visual quality, when compressed to the same file size or bitrate.
However, 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.
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).