From 7b9127015674a74515f8c7e1997f12943d6d2eb4 Mon Sep 17 00:00:00 2001 From: Adrian Hilber Date: Fri, 16 Oct 2026 13:48:54 +0200 Subject: [PATCH] Point to the shared MXL interlaced convention in SPECIFICATION.md. One sentence where SPECIFICATION.md talks about interlaced video links the shared convention (mxl-multiviewer docs/mxl-interlaced.md). Docs only: no version bump, no CHANGELOG entry. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01St7QwmonpoG9EEEqaLFXLi --- SPECIFICATION.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SPECIFICATION.md b/SPECIFICATION.md index 0297c4c..64e7f2b 100644 --- a/SPECIFICATION.md +++ b/SPECIFICATION.md @@ -147,6 +147,8 @@ The container maintains this mapping internally. Essential entries (non-exhausti The container follows the shared convention of the MXL media functions (MXL `218ddaa`). The flow definition keeps `grain_rate` = the frame rate (25/1 or 30000/1001) and the real `interlace_mode`; MXL then stores **one field per grain** (height / 2 lines) at twice that rate. Grain 2k is the first field in time of TAI frame k (k = `mxlTimestampToIndex` at the frame rate), grain 2k + 1 the second. `interlaced_tff`: the first field is the top field, the even frame lines (0, 2, 4, …); `interlaced_bff`: the bottom field, the odd lines. A reader weaves grain i into the frame lines of parity `(i & 1) ^ bff`. MXL has no per-grain field marker, so a reader cannot detect a writer that puts the first field on an odd index. +Interlaced video and its ANC follow the shared MXL interlaced convention: https://github.com/LeeO86/mxl-multiviewer/blob/main/docs/mxl-interlaced.md + - **Field order** comes from the mode table: `NTSC` is lower field first (`bmdLowerFieldFirst` in `IDeckLinkDisplayMode::GetFieldDominance`), so its flow is `interlaced_bff`; `PAL`, `HD1080i50` and `HD1080i5994` are `interlaced_tff`. The MXL flow definition and the NMOS flow and receiver caps carry it. - **Counters:** `mxl_decklink_grains_committed_total` (and `grains_committed` in `/statusz`) counts MXL grains: two per frame for an interlaced input, one for a progressive input. `mxl_decklink_frames_total` counts frames in both. - **Input:** k comes from the frame's start, one frame period before its timestamp (§3.5; the frame arrives when it is complete). The bridge writes grain 2k from the first field's lines and grain 2k + 1 from the other lines of the woven DeckLink frame, by row (v210 directly, 8-bit YUV after the expansion of §3.3; for `video/v210a` the fill lines).