How HEIC Uses HEVC Video Compression Over JPEG

HEIC (High Efficiency Image Container) achieves superior file sizes and visual fidelity by adopting the compression architecture of HEVC (H.265) video encoding rather than modernizing the legacy JPEG format. While JPEG relies on static, independent block-based algorithms developed in the early 1990s, HEIC treats still photography as an isolated keyframe within a video sequence. By leveraging HEVC’s advanced intra-frame prediction, flexible block partitioning, and internal filtering techniques, HEIC compresses image data roughly twice as effectively as standard JPEG without loss of visual quality.

Intra-Frame Coding: The Core of HEVC Stills

At a technical level, video streams consist of intra-coded frames (I-frames) that require no other video frames to decode, and inter-coded frames (P-frames and B-frames) that rely on temporal data across time. HEIC functions by adapting the HEVC Main Still Picture profile, effectively saving a standalone I-frame.

Legacy JPEG compresses every image uniformly by dividing it into rigid 8x8 pixel blocks and converting them to frequency domain representations using a Discrete Cosine Transform (DCT). In contrast, HEIC replaces this fixed-grid approach with the full spatial toolset developed to minimize bitrate in high-definition video pipelines.

Coding Tree Units Replace Fixed Blocks

HEIC eliminates JPEG's fixed 8x8 pixel grid in favor of Coding Tree Units (CTUs), the fundamental processing unit of HEVC.

Advanced Directional Intra-Prediction

JPEG carries out very little spatial prediction; it primarily calculates differences between the DC (average color) values of adjacent blocks. HEVC expands this spatial reasoning dramatically:

  1. 35 Prediction Modes: When encoding a block, HEVC analyzes surrounding reconstructed pixels and predicts the content using 33 angular directions, a planar mode (for smooth surfaces), and a DC mode (for flat color).
  2. Residual Encoding: Instead of encoding the entire raw block, HEIC generates a mathematical prediction of that block and subtracts it from the actual image. It then only encodes the "residual"—the minor difference between prediction and reality. This drastically cuts the total data payload compared to JPEG's direct-transform method.

Transform and In-Loop Filtering Techniques

HEVC incorporates precision transform and filtering mechanisms designed to keep video streams clear at minimal bitrates, all of which benefit HEIC files:

Container Architecture Derived from Video Formats

Beyond raw pixel compression, HEIC derives its structural framework from video container formats. JPEG utilizes the JFIF wrapper, which generally handles only a single flat image stream.

HEIC relies on the ISO Base Media File Format (ISOBMFF)—the same standard underlying modern MP4 video files. This structural heritage enables HEIC to store image sequences (such as burst shots or animations), stereo views, auxiliary image maps (such as depth data and alpha channels), and non-destructive image edits within a unified, lightweight package that legacy JPEG cannot natively accommodate.