JPEG Restart Markers: Sequential vs Progressive

JPEG images utilize restart markers to enhance error recovery and enable multi-threaded decoding by periodically resetting the entropy-coding state. While both sequential and progressive formats define the frequency of these markers using the Define Restart Interval (DRI) header, the structural placement of the markers differs significantly. In sequential JPEGs, restart markers are inserted at fixed intervals across a single, linear progression of spatial pixel blocks. In progressive JPEGs, restart markers are distributed across multiple scans, repeating throughout the image across various spectral bands and bit-depth layers.

Function of Restart Markers

A restart marker (ranging from RST0 to RST7) clears the entropy decoder’s state, forces bitstream alignment to the next byte boundary, and resets DC prediction to zero. This segmentation prevents bit errors in one block from corrupting the remainder of the file and allows independent decoding of distinct segments. The DRI marker dictates how many Minimum Coded Units (MCUs) must be processed between each restart marker.

Placement in Sequential JPEG Files

Sequential JPEGs store image data in a single top-to-bottom scan where each MCU contains the full set of interleaved color components (typically Y, Cb, and Cr) and all 64 DCT coefficients (one DC and 63 AC).

Placement in Progressive JPEG Files

Progressive JPEGs decompose image data into multiple distinct scans covering the entire frame. These scans isolate either specific frequency bands (spectral selection) or specific bit-planes of coefficients (successive approximation).

Key Operational Differences

  1. Entropy Scope: In sequential files, a restart marker isolates complete pixel data. In progressive files, a restart marker isolates only the specific coefficient band or bit-plane belonging to that particular pass.
  2. Counter Resets: Sequential files cycle RST0–RST7 unbroken from the beginning of the image data to the end. Progressive files reset the counter to RST0 at the start of every single scan pass, regardless of where the previous pass left off.
  3. Parallel Processing Granularity: In sequential files, decoders can split the bitstream at restart markers to render complete horizontal image bands in parallel. In progressive files, decoders must track restart markers across separate coefficient layers, meaning parallelization operates on frequency refinements rather than independent, fully rendered pixel segments.