Repository navigation
1.0.7: ANC packets start at byte 6, as MXL stores RFC 8331; C bit follows the data stream - #25
Merged
Merged
Conversation
MXL docs/Architecture.md stores a video/smpte291 grain from the RFC 8331 Length field on; Length, ANC_Count, F and reserved are 6 bytes and the first packet follows at byte 6. The writer padded the header to 8 bytes. Now no header padding; each packet is padded to a multiple of 32 bits from its own start, like mxl-st2110-gateway, mxl-data-probe and gst-mxl-rs. F bits unchanged. New unit test against a reference vector from the gateway's ANC codec. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01St7QwmonpoG9EEEqaLFXLi
C = 1 means the colour-difference (chroma) data stream. It was 1 for every packet with a known line. Now it is 1 only for GetDataStreamIndex() == 1 (chroma, HD when the luma stream is full); 0 (luma, SD) and unknown values give C = 0. S and StreamNum, which RFC 8331 keeps for the link number of a multi-stream interface, are 0 (they carried the same index). The test vector is the gateway's AFD golden packet with its original C = 0 plus a chroma packet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01St7QwmonpoG9EEEqaLFXLi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
MXL 218ddaa
docs/Architecture.md(video/smpte291): a grain stores the RFC 8331 payload from the Length field on. Length (16), ANC_Count (8), F (2) and reserved (22) are 6 bytes; the first ANC packet follows at byte 6 (in the RTP packet that is byte 20, 32-bit aligned; MXL drops the first 14 bytes).encodeRfc8331padded the header to 8 bytes (alignTo32after reserved), so every packet sat 2 bytes late. mxl-st2110-gateway's ANC egress, MXL'smxl-data-probeand gst-mxl-rs read packets at byte 6 and would take the 2 padding bytes as the start of packet 1.Now:
word_align);decodeRfc8331(tests) reads the same layout.The output side does not read ANC, so nothing else changes.
C bit (second commit)
RFC 8331 C = 1 means the colour-difference (chroma) data stream. The writer set C = 1 for every packet with a known line. Now C follows the SDK's
GetDataStreamIndex()(third_party/decklink/DeckLinkAPI.h:996: "Usually zero. Can only be 1 if non-SD and the first data stream is completely full"): 0 = luma (and SD) gives C = 0, 1 = chroma gives C = 1, anything else counts as luma.The same index was also written to S and StreamNum. RFC 8331 keeps those for the link number of a multi-stream interface (e.g. ST 425-3), which the SDK does not give, so S and StreamNum are now 0. The decoder (tests) maps C back to the index.
Tests
codec::serialiseGrain, and decode back.codec::parseGrain): no parity or checksum errors; an empty grain is byte-identical too.Version 1.0.7 (CMake,
src/version.hpp, Kubernetes), CHANGELOG, SPECIFICATION §2.3, IMPLEMENTATION_PLAN.Companion PRs: LeeO86/mxl-test-player#15, LeeO86/mxl-replay#28.
🤖 Generated with Claude Code
https://claude.ai/code/session_01St7QwmonpoG9EEEqaLFXLi