VGA/HDMI video capture card over PCIe Gen2 x4
An M.2 capture card that takes VGA or HDMI, processes the video in a 10-bit pipeline on an Artix-7, and streams it to the host over PCIe Gen2 x4.
- 10-bitvideo pipeline
- Gen2 x4PCIe
- 2inputs: VGA and HDMI
Architecture · block diagram
- Main data path
- Logic
- Processor
- Memory
- Interconnect
- Off-chip
The story
A capture card must accept a wide range of sources: analog VGA, or HDMI in different formats, interlaced or progressive, with embedded audio. It then delivers processed frames to the host. An M.2 2280 card has little board space. The FPGA handles the video processing, and a small MCU handles board management.
Challenges
Two different input types share one pipeline. Interlaced sources must come out progressive. Cards already in the field also needed firmware updates without a return to the factory.
What I built
Both inputs feed a capture stage that converts them to a common 10-bit format. The pipeline then runs color-space conversion, cropping and scaling, and deinterlacing. A DDR3 frame buffer holds the frames that the scaler and the deinterlacer need. A PCIe DMA engine streams finished frames to the host over Gen2 x4. The card also captures HDMI embedded audio with the video.
The MCU handles EDID emulation, which advertises the supported modes to the source. It also manages I2C, card-ID strapping and field firmware updates.
The hardest problem
Deinterlacing and scaling both need neighboring lines and fields. The DDR3 frame buffer holds that history without a stall in capture. A 10-bit pipeline avoids banding through color conversion and scaling.
The field-update path had to be fail-safe, because a failed update on a deployed card means a return. The MCU firmware updates cards that are already installed in customers' machines.
Result
The card captures VGA and HDMI, with HDMI audio, and streams over PCIe Gen2 x4. Color-space conversion, cropping, scaling and deinterlacing run in 10 bits on the FPGA. The MCU handles EDID emulation, card-ID strapping and field firmware updates.
Where you'd find something like this
KVM and remote server management
Capturing video from legacy and industrial equipment
Medical and industrial display recording, streaming