Skip to main content

bayertap

A passive conformance tap for bayerlink links.

In a streaming netlist, a tap is a sink that observes a stream without stalling it. This is that concept as bench equipment: point it at any V4L2 capture device carrying a bayerlink source and it tells you whether the bytes survive — judged with the same published codec the source encoded with, so the two ends cannot disagree about what conformance means.

bayertap probe                          # which byte-lane permutation is this rig?
bayertap --lane-map 2,1,0 check --pattern counting     # every sample, judged
bayertap --via tunnel check --pattern counting          # through a cheap dongle
bayertap --from-file frame.npy check    # no hardware at all

Capture tiers

Tier Hardware Path Fidelity
Trusted TC358743 HDMI→CSI-2 bridge (~$25, the PiKVM part) on any Pi or Jetson --via direct, RGB888 byte-exact
Cheap MS2130S / MS2131S USB3 stick (~$15) on any Linux box --via direct, RGB24 byte-exact if the stick's pipeline is transparent — check answers that in minutes
Drawer MS2109-class USB2 stick --via tunnel, YUYV bit-exact at 1/6 capacity, via the luma tunnel — run the source with --luma-tunnel
Rejected any USB2 stick, direct MJPEG / starved YUYV physics: USB2 cannot carry uncompressed 1080p, and MJPEG is lossy. Refused in code, not just here

The drawer tier deserves its sentence: a $10 dongle you already own becomes a working conformance receiver today, because bayerlink's luma tunnel carries the unchanged container as grey levels with a pilot line the decoder learns the channel from. Slow, and completely sufficient for proving bytes.

The two bring-up commands

probe resolves the byte-lane permutation — which captured channel holds container byte k — by trying all six against the header's magic and CRC. Its output is directly the lane_map for this tool's check and for the FPGA-side receiver (np2hw.bayerlink_in). One command instead of a scope.

check --pattern X regenerates the pattern locally (patterns are pure functions — nothing travels out of band) and compares every sample, watches frame_seq for gaps, tolerates scanout repeats (protocol-legal), and exits nonzero on any discrepancy. Point CI at it if you like.

For the TC358743 tier, remember the bridge needs an EDID loaded (v4l2-ctl --set-edid) before it captures — and that EDID is leverage: it is what the source reads, so advertise only RGB 4:4:4 at your one mode and the source is steered into the only format the protocol accepts.

Status

Everything except the ioctl layer is proven off-target: struct sizes pinned against the kernel uapi, both decode paths (direct with lane maps, tunnel with pilot learning) tested end-to-end from files. First runs against real capture silicon are the bench session; the known-good device table starts there.

Licence

MIT.

Metadata

Release files for bayertap 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bayertap 0.2.0
File Size Uploaded
bayertap-0.2.0.tar.gz 11.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bayertap 0.2.0
File Interpreter ABI Platform
bayertap-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 21.6 kB

Release files / bayertap-0.2.0.tar.gz

Download URL bayertap-0.2.0.tar.gz
Size 11.0 kB
Tags Source
SHA-256 checksum
How to use checksums
7a9f6ccfd6a08bd4d75e2548362da8082bd17cb5dddcfc7f4f660009d002224e
BLAKE2b-256 checksum
How to use checksums
a5a782af24ee287c6c8578984a26994a5c379e067acbe32f391ef2ed4c3c086e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 9, 2026.

Transparency log

Release files / bayertap-0.2.0-py3-none-any.whl

Download URL bayertap-0.2.0-py3-none-any.whl
Size 10.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5783ee3259709f2878adc4c579ecead99cb51ddf07caca4bc0da1a59f6a99f14
BLAKE2b-256 checksum
How to use checksums
85bf7f27c42a4f91e3a0bef85141d0490616e42e24acb32da7ebdb4f1afd9302
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 9, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page