Baud
All protocols

HDMI

Video, audio and a conversation on one cable: TMDS pixels, EDID, InfoFrames.

Pixels become TMDS symbols

Eight-bit colour values go in, ten-bit symbols come out, one per channel per pixel clock.

TMDS: 3 pixels, one row per pixel clock · 10-bit symbols03610001000000001800110000000200100000000037F110111111137F110111111137F1101111111200100000000018001100000001000100000000Pixel 0 · Chann…Pixel 0 · Chann…Pixel 0 · Chann…Pixel 1 · Chann…Pixel 1 · Chann…Pixel 1 · Chann…Pixel 2 · Chann…Pixel 2 · Chann…Pixel 2 · Chann…Click a field to inspect it

Whole frame

Each pixel clock, three 10-bit symbols leave in parallel: one per colour channel. Eight bits go in, ten come out: the extra two bits buy a signal with few transitions (less interference) and balanced ones and zeros (so it can be AC-coupled).

FieldOffsetExample valueMeaning
Pixel 0 · Channel 0 (Blue)Word 00x00 → 0100000000Input 0x00 = 00000000 has 0 ones. Step 1 (fewer transitions): chain the bits with XOR, giving the 9-bit value 100000000 (the top bit records which was used). Step 2 (DC balance): the low 8 bits are sent as they are and a 10th bit records that. Result 0100000000. Running disparity of this channel is now -8.
Pixel 0 · Channel 1 (Green)Word 10x80 → 0110000000Input 0x80 = 10000000 has 1 ones. Step 1 (fewer transitions): chain the bits with XOR, giving the 9-bit value 110000000 (the top bit records which was used). Step 2 (DC balance): the low 8 bits are sent as they are and a 10th bit records that. Result 0110000000. Running disparity of this channel is now -6.
Pixel 0 · Channel 2 (Red)Word 20xFF → 1000000000Input 0xFF = 11111111 has 8 ones. Step 1 (fewer transitions): more than four 1s, so chain the bits with XNOR, giving the 9-bit value 011111111 (the top bit records which was used). Step 2 (DC balance): the low 8 bits are inverted to keep the line's running balance near zero and a 10th bit records that. Result 1000000000. Running disparity of this channel is now -8.
Pixel 1 · Channel 0 (Blue)Word 30x80 → 1101111111Input 0x80 = 10000000 has 1 ones. Step 1 (fewer transitions): chain the bits with XOR, giving the 9-bit value 110000000 (the top bit records which was used). Step 2 (DC balance): the low 8 bits are inverted to keep the line's running balance near zero and a 10th bit records that. Result 1101111111. Running disparity of this channel is now +0.
Pixel 1 · Channel 1 (Green)Word 40x80 → 1101111111Input 0x80 = 10000000 has 1 ones. Step 1 (fewer transitions): chain the bits with XOR, giving the 9-bit value 110000000 (the top bit records which was used). Step 2 (DC balance): the low 8 bits are inverted to keep the line's running balance near zero and a 10th bit records that. Result 1101111111. Running disparity of this channel is now +2.
Pixel 1 · Channel 2 (Red)Word 50x80 → 1101111111Input 0x80 = 10000000 has 1 ones. Step 1 (fewer transitions): chain the bits with XOR, giving the 9-bit value 110000000 (the top bit records which was used). Step 2 (DC balance): the low 8 bits are inverted to keep the line's running balance near zero and a 10th bit records that. Result 1101111111. Running disparity of this channel is now +0.
Pixel 2 · Channel 0 (Blue)Word 60xFF → 1000000000Input 0xFF = 11111111 has 8 ones. Step 1 (fewer transitions): more than four 1s, so chain the bits with XNOR, giving the 9-bit value 011111111 (the top bit records which was used). Step 2 (DC balance): the low 8 bits are inverted to keep the line's running balance near zero and a 10th bit records that. Result 1000000000. Running disparity of this channel is now -8.
Pixel 2 · Channel 1 (Green)Word 70x80 → 0110000000Input 0x80 = 10000000 has 1 ones. Step 1 (fewer transitions): chain the bits with XOR, giving the 9-bit value 110000000 (the top bit records which was used). Step 2 (DC balance): the low 8 bits are sent as they are and a 10th bit records that. Result 0110000000. Running disparity of this channel is now -4.
Pixel 2 · Channel 2 (Red)Word 80x00 → 0100000000Input 0x00 = 00000000 has 0 ones. Step 1 (fewer transitions): chain the bits with XOR, giving the 9-bit value 100000000 (the top bit records which was used). Step 2 (DC balance): the low 8 bits are sent as they are and a 10th bit records that. Result 0100000000. Running disparity of this channel is now -8.

Overview

HDMI carries uncompressed video and audio from a source to a display. Pixels travel on three differential TMDS data channels plus a clock, each pixel clock sending one 10-bit symbol per channel. Between lines and frames the same wires carry control symbols and 'data islands' with audio and small descriptive packets called InfoFrames.

Alongside the fast wires are slow ones that do the talking: DDC (an I2C bus) lets the source read the display's EDID, HPD signals that a display is present, CEC links remote controls, and HDCP authenticates for copy protection. HDMI 2.1 replaces TMDS with Fixed Rate Link for up to 48 Gbit/s.

Key facts

Video link
3 TMDS data lanes + clock (2.1: FRL)
Encoding
TMDS 8b→10b per pixel clock
Rates
1.4: 10.2G · 2.0: 18G · 2.1: 48G bit/s
Side channels
DDC (I2C), CEC, HPD, +5V
EDID
128-byte blocks at I2C 0x50
Compatibility
DVI-compatible video (same TMDS)

Control, preamble, guard, video

How the receiver knows when pixels begin: periods announced by preambles and bracketed by guard bands.

HDMI: periods on the three data channels · one row per pixel clockvideo continues to the end of the line; data islands carry audio and InfoFrames036912153541101010100354110101010035411010101000AB00101010113541101010100354110101010035411010101000AB001010101135411010101002CC101100110013301001100112CC101100110010001000000001800110000000200100000000037F110111111137F110111111137F1101111111Control period: idleControl period: HSYNCVideo preambleVideo guard bandPixel 0 (orange)Pixel 1 (gray)Click a field to inspect it

Whole frame

HDMI interleaves three kinds of period on the same wires: control (syncs), data islands (audio, InfoFrames) and video. Each is announced by a preamble and bracketed by guard bands, so the receiver always knows which it is in.

FieldOffsetExample valueMeaning
Control period: idleWord 0–2HSYNC=0 VSYNC=0, CTL=0000Between pixels, TMDS sends control symbols instead of data: four special 10-bit codes that stand for the 2-bit values 00, 01, 10 and 11. They have many transitions on purpose, so they can never be mistaken for pixel data. Channel 0 carries HSYNC and VSYNC (here both 0), channels 1 and 2 carry four more control bits (CTL0-3).
Control period: HSYNCWord 3–5HSYNC=1Horizontal sync is not a separate wire: it is encoded in channel 0's control symbol. When HSYNC = 1, channel 0 sends 0010101011 instead of 1101010100.
Video preambleWord 6–8CTL0-3 = 1000Just before video starts, CTL0-3 = 1000 (channel 1 changes its control symbol) for eight pixel clocks. This announces 'video data period follows'. A data island would be announced by 1010 instead. Shown once; the real preamble lasts 8 clocks.
Video guard bandWord 9–11guard bandTwo pixel clocks of a fixed pattern (here once): 1011001100 / 0100110011 / 1011001100. It marks exactly where the first pixel starts, even if the preamble was damaged. Real HDMI sends 2 guard clocks before video.
Pixel 0 (orange)Word 12–140100000000 0110000000 1000000000R = 255, G = 128, B = 0 encoded as three TMDS symbols (see the previous scene). Running disparity restarts from 0 at the beginning of each video period.
Pixel 1 (gray)Word 15–171101111111 1101111111 1101111111R = G = B = 128. Equal values in the three channels give the same symbol on each, though the running balance can make later ones differ.

An AVI InfoFrame

A tiny packet in the data island that describes the picture, with a real checksum.

AVI InfoFrame · 1080p60 · 17 bytes0481216821000001002000000100D00001101A7101001111000010000A81010100000000000001000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Packet typeVersionLengthChecksumData byte 1: fo…Data byte 2: co…Data byte 3: ra…VICData byte 5Bar informationClick a field to inspect it

Whole frame

82 02 0D A7 10 A8 00 10 00 00 00 00 00 00 00 00 00: a 17-byte note that tells the TV what the picture is: RGB, BT.709, 16:9, format number 16. The TV reads it every frame, so it follows mode changes instantly.

FieldOffsetExample valueMeaning
Packet typeByte 00x82 = AVI InfoFrameInfoFrames are small descriptive packets sent in the data islands. 0x82 = AVI (Auxiliary Video Information); 0x84 = audio; 0x81 = vendor specific.
VersionByte 12The layout version of this packet type. Version 2 is the common one for AVI.
LengthByte 213Bytes of data after the checksum: 13.
ChecksumByte 30xA7 (sum ≡ 0)Chosen so that the sum of every byte of the InfoFrame (header, checksum and data) is 0 modulo 256. Computed for real here: the sum is 0. A sink ignores an InfoFrame whose sum is not 0.
Data byte 1: formatByte 4RGB, active format validColour format and whether the picture has borders.
Data byte 2: colorimetry and aspectByte 5BT.709, 16:9How to interpret the colours and the shape of the picture.
Data byte 3: range and scalingByte 6defaultsExtended colorimetry, quantization range (full or limited), and whether the picture was scaled. All defaults here.
VICByte 716 = 1080p60Video Identification Code: a number from the CTA-861 table that names the whole video format in one byte. 16 = 1920×1080 progressive at 60 Hz. Others: 4 = 720p60, 5 = 1080i60, 31 = 1080p50, 97 = 3840×2160p60.
Data byte 5Byte 80YCC quantization range, content type, and pixel repetition (low-resolution modes are sent with each pixel repeated). 0 = none.
Bar informationByte 9–16nonePositions of black bars, if the first byte said there are any. Unused here.

EDID: the display's identity

What the TV tells the source over the DDC wires when it is plugged in.

EDID block · first 54 of 128 bytesthen 4 descriptors, an extension count and a checksum0816243240480000000000FF11111111FF11111111FF11111111FF11111111FF11111111FF1111111100000000001000010000AD101011013400110100120001001001000000010000000000000000000000000000000C00001100220010001001000000010300000011801000000033001100111D0001110178011110000600000110EE111011109110010001A31010001154010101004C01001100991001100126001001100F0000111150010100005401010100210010000108000010000000000000D111010001400100000081100000014001000000010000000101000000010100000001010000000101000000010100000001010000000101000000010100000001010000000101000000010100000001HeaderManufacturer IDProduct codeSerial numberWeek of m…Year of m…EDID vers…EDID revi…Video inp…WidthHeightGammaFeaturesChromaticityEstablished timingsStandard timingsClick a field to inspect it

Whole frame

The TV's identity card: who made it, how big it is, which colours it can show and which old modes it understands. The block ends with a checksum byte so that all 128 bytes sum to 0.

FieldOffsetExample valueMeaning
HeaderByte 0–700 FF FF FF FF FF FF 00A fixed 8-byte pattern: 00, six FF, 00. It is how a reader recognises an EDID block at all.
Manufacturer IDByte 8–9"DEM"Three letters packed 5 bits each (A = 1): 'DEM' here, a made-up demo ID. Real IDs are assigned by UEFI (SAM = Samsung, DEL = Dell, GSM = LG).
Product codeByte 10–110x1234The maker's model number. Note that multi-byte numbers in EDID are little-endian: 34 12 means 0x1234.
Serial numberByte 12–151A 32-bit number (little-endian), often unused.
Week of manufactureByte 1612Week 1–54 of the year.
Year of manufactureByte 1734 → 2024Years since 1990.
EDID versionByte 181EDID 1.3 here (1.4 adds more). The version and revision are two bytes.
EDID revisionByte 1933 = revision 3.
Video inputByte 200x80 = digitalBit 7 = 1 means a digital input (HDMI/DVI/DisplayPort); the lower bits describe the interface.
WidthByte 2151 cmPhysical screen width in centimetres.
HeightByte 2229 cmPhysical screen height in centimetres. Together with the resolution, software computes DPI.
GammaByte 232.20Stored as (gamma × 100) − 100: 0x78 = 120 → 2.20.
FeaturesByte 24sRGB, preferred timingPower-management modes, colour type, 'sRGB is the default colour space' and 'the first detailed timing is the preferred mode'.
ChromaticityByte 25–34sRGB primariesThe CIE xy coordinates of the red, green and blue primaries and the white point, 10 bits each, packed into 10 bytes. These are the sRGB values, so a source can map colours correctly.
Established timingsByte 35–37VGA, SVGA, XGAA bitmap of old, standard modes supported: here 640×480@60, 800×600@60 and 1024×768@60.
Standard timingsByte 38–531080p60, 720p60Eight 2-byte entries. Each gives horizontal pixels as (value+31)×8, an aspect ratio and a refresh rate offset. D1 40 = (209+31)×8 = 1920 wide, 16:9, 60 Hz = 1920×1080@60; 81 40 = 1280×720@60. 01 01 means unused.

EDID: the preferred video mode

One 18-byte descriptor defines a complete 1080p60 mode.

EDID detailed timing descriptor · 1080p60 · 18 bytes061202000000103A0011101080100000001800011000710111000138001110002D00101101400100000058010110002C0010110045010001010000000000FD111111011E000111101100010001000000000000000000001E00011110Pixel clockHorizontal active / blankingVertical act…Sync timingImage sizeBordersFlagsClick a field to inspect it

Whole frame

02 3A 80 18 71 38 2D 40 58 2C 45 00 FD 1E 11 00 00 1E: 148.5 MHz ÷ (2200 × 1125) = 60.00 Hz. The whole video mode is described by a handful of numbers, and these 18 bytes are what the TV says it prefers.

FieldOffsetExample valueMeaning
Pixel clockByte 0–114850 × 10 kHz = 148.50 MHzIn units of 10 kHz, little-endian: 0x3A02 = 14,850 → 148.50 MHz. Every pixel of the whole frame, including blanking, is sent at this rate.
Horizontal active / blankingByte 2–41920 + 280 = 2200Two 12-bit numbers squeezed into 3 bytes: the low 8 bits of each, then both high nibbles in the third byte. Active = 0x780 = 1920 pixels; blanking = 0x118 = 280 pixels. Total per line: 2200 clocks.
Vertical active / blankingByte 5–71080 + 45 = 1125The same packing for lines: active = 0x438 = 1080 lines; blanking = 0x02D = 45 lines. Total 1125 lines per frame.
Sync timingByte 8–11H 88/44 · V 4/5Where the sync pulses sit inside the blanking: horizontal front porch 88 and pulse width 44 (clocks); vertical front porch 4 and pulse width 5 (lines). The top 2 bits of each are in the last byte.
Image sizeByte 12–14509 × 286 mmPhysical size in millimetres: 509 × 286 mm (a 23-inch panel). Low bytes first, then a byte with both high nibbles.
BordersByte 15–160, 0Overscan border in pixels (horizontal, vertical): 0.
FlagsByte 170x1E0x1E: digital separate sync, positive polarity for both vertical and horizontal sync, progressive scan.

Plugging in

The conversation before the first pixel.

Sourceconsole / PCTV (sink)HDMI inputHPD high+5V pinDDC readI2C 0x50, EDIDSCDCI2C 0x54TMDS video148.5 MHz, 1080p60HDCPDDC, 0x3ACECopcode 0x36standbysink detectedshowing 1080p60standby

Whole exchange

Before a single pixel moves, HDMI is a conversation: detect, ask what you can show, agree a mode, then stream. Most 'no signal' problems happen in the first three steps.

  1. 1Hot Plug Detect

    The TV raises the Hot Plug Detect line (using the 5 V the source supplies). To the source this means 'a display is connected and ready'.

  2. 2Reading the EDID

    The source reads 128+ bytes over the DDC wires, which are an ordinary I2C bus (see the I2C page). The TV's EDID memory lives at address 0x50. The bytes are the ones in the EDID scenes above.

  3. 3Setting up the link (HDMI 2.0)

    For fast modes the source configures the sink over I2C address 0x54 (the Status and Control Data Channel): turn on scrambling and set the clock ratio. Slow modes skip this.

  4. 4Video starts flowing

    The source picks the best mode that both sides support (usually the preferred timing from the EDID), starts the TMDS clock and sends video, with an AVI InfoFrame in each frame's data islands to say what the picture is.

  5. 5Copy-protection handshake

    For protected content the source authenticates the sink over the same DDC wires and then encrypts the video. If this fails you see a black or noisy picture while the plain mode works fine.

  6. 6A remote-control message

    On a separate single wire, CEC (Consumer Electronics Control) lets devices control each other. 0x36 is 'Standby': this is how one remote switches the whole system off.

Where you meet it

  • TVs, monitors, projectors, game consoles, set-top boxes, laptops
  • Capture cards and HDMI-to-USB or HDMI-to-NDI converters in streaming setups
  • Audio return (ARC / eARC) from a TV to a soundbar over the same cable

Watch out for

  • A black screen on first connection is often an EDID or HDCP problem, not a cable fault: try another port, another cable, or an EDID emulator.
  • Bandwidth is a budget: 4K60 4:4:4 at 8-bit needs HDMI 2.0's 18 Gbit/s; 4K120 or 10-bit needs 2.1 or chroma subsampling (4:2:0).
  • Long passive cables fail at high rates before they fail at low ones, so the same cable can work at 1080p and not at 4K.
  • Switches and splitters sit between HDCP and EDID: a cheap splitter that shows only the lowest common EDID will limit everything to its weakest display.

Standards

  • HDMI Specification 1.4b / 2.0 / 2.1 (HDMI Forum)
  • DVI 1.0 (Digital Display Working Group): TMDS
  • VESA E-EDID 1.4
  • CTA-861 (InfoFrames, VICs)

Related protocols