Skip to content

Instantly share code, notes, and snippets.

@RavuAlHemio
Last active May 4, 2025 22:02
Show Gist options
  • Save RavuAlHemio/82959fb698790781c08716b22496e9fe to your computer and use it in GitHub Desktop.
Save RavuAlHemio/82959fb698790781c08716b22496e9fe to your computer and use it in GitHub Desktop.
descriptions of all JPEG marker types

JPEG marker types

Taken from ISO/IEC 10918-1:1994.

Most hexadecimal digits are written in uppercase; b is written in lowercase to reduce confusion of B with 8.

sequence length abbr description reference to standard
FF00 0 not a marker; actual 0xFF value in entropy-coded data segment §§ D.1.6, F.1.2.3
FF01 0 TEM temporary value used during arithmetic coding § D.1.6
FF02-FFbF ? RES reserved
FFC0 b2-b4 SOF0 Start-of-Frame, non-differential, Huffman, baseline DCT § B.2.2
FFC1 b2-b4 SOF1 Start-of-Frame, non-differential, Huffman, extended sequential DCT § B.2.2
FFC2 b2-b4 SOF2 Start-of-Frame, non-differential, Huffman, progressive DCT § B.2.2
FFC3 b2-b4 SOF3 Start-of-Frame, non-differential, Huffman, lossless (sequential) § B.2.2
FFC4 b2-b4 DHT Define Huffman Tables § B.2.4.2
FFC5 b2-b4 SOF5 Start-of-Frame, differential, Huffman, sequential DCT § J
FFC6 b2-b4 SOF6 Start-of-Frame, differential, Huffman, progressive DCT § J
FFC7 b2-b4 SOF7 Start-of-Frame, differential, Huffman, lossless (sequential) § J
FFC8 ? JPG reserved for JPEG extensions
FFC9 b2-b4 SOF9 Start-of-Frame, non-differential, arithmetic, extended sequential DCT § B.2.2
FFCA b2-b4 SOF10 Start-of-Frame, non-differential, arithmetic, progressive DCT § B.2.2
FFCb b2-b4 SOF11 Start-of-Frame, non-differential, arithmetic, lossless (sequential) § B.2.2
FFCC b2-b4 DAC Define Arithmetic Coding conditionings § B.2.4.3
FFCD b2-b4 SOF13 Start-of-Frame, differential, arithmetic, sequential DCT § J
FFCE b2-b4 SOF14 Start-of-Frame, differential, arithmetic, progressive DCT § J
FFCF b2-b4 SOF15 Start-of-Frame, differential, arithmetic, lossless (sequential) § J
FFD0-FFD7 0 RSTm ReSTart with modulo 8 count m (low nibble of second byte) § B.2.1
FFD8 0 SOI Start of Image § B.2.1
FFD9 0 EOI End of Image § B.2.1
FFDA b2-b4 SOS Start of Scan (image data) § B.2.3
FFDb b2-b4 DQT Define Quantization Tables § B.2.4.1
FFDC b2-b4 DNL Define Number of Lines § B.2.5
FFDD b2-b4 DRI Define Restart Interval § B.2.4.4
FFDE b2-b4 DHP Define Hierarchical Progression § B.3.2
FFDF b2-b4 EXP EXPand reference components § B.3.3
FFE0-FFEF b2-b4 APPn application segment n (low nibble of second byte) § B.2.4.6
FFF0 b2-b4 VER VERsion ext § B.3
FFF1 b2-b4 DTI Define Tiled Image ext § B.5.2
FFF2 b2-b4 DTT Define Tile ext § B.5.3
FFF3 b2-b4 SRF Selectively Refined Frame ext § B.4.2
FFF4 b2-b4 SRS Selectively Refined Scan ext § B.4.3
FFF5 b2-b4 DCR Define Component Registration ext § B.6
FFF6 b2-b4 DQS Define Quantizer Scale selection ext § B.7
FFF7-FFFD ? JPGn JPEG extension n (low nibble of second byte)
FFFE b2-b4 COM COMment § B.2.4.5
FFFF not a marker; sequences of 0xFF can be reduced down to one 0xFF § B.1.1.2

b2-b4: length is specified as a big-endian 16-bit unsigned integer in the two bytes directly following the marker sequence; this length includes the length field but not the marker sequence

references to standard are

  • to ISO/IEC 10918-1:1994 by default
  • to ISO/IEC 10918-3:1997 if preceded by ext
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment