Skip to content

Decode MXF essence coding labels by registry family (3.1.3) - #6

Merged
aagedal merged 2 commits into
mainfrom
t3/mxf-codec-ul-registry
Nov 1, 2026
Merged

aagedal merged 2 commits into
mainfrom
t3/mxf-codec-ul-registry

Conversation

@aagedal

@aagedal aagedal commented Nov 1, 2026

Copy link
Copy Markdown
Owner

MXFReader.codecNameForUL matched on byte 13 alone, so picture/sound labels and codec families collided: D-10 and DVCPRO HD read as PCM, DV25 and JPEG 2000 as MPEG-2, AC-3/MPEG audio as PCM, and ProRes, DNxHD/DNxHR, FFV1 etc. returned no codec.

  • Decode SMPTE RP 224 labels by category (byte 9), compression (byte 11) and family/member (bytes 12–13), cross-checked against FFmpeg's mxf.c/mxfenc.c and bmx's label table. Codec names follow the existing conventions: ProRes FourCCs (as MOV), ffprobe short names otherwise (dnxhd, dvvideo, jpeg2000, ffv1, vc1, …), with ffprobe profiles where the label pins them down (MPEG-2, AVC, ProRes, DNxHD/DNxHR).
  • ProRes in MXF uses the decode depth (10-bit 4:2:2 / 12-bit 4:4:4); 4444 alpha comes from AlphaSampleDepth or, like ffprobe, the first frame header (bounded 26-byte read).
  • Removed the byte-11 == 0x04 branch and 0x41 → ProRes mapping, which match no registered label (their j2k / dv names become jpeg2000 / dvvideo).
  • CLI CodecShort covers the new codec names.
  • Verified against FFmpeg-written MXF for every codec its muxer supports plus Sony/Resolve XAVC, XDCAM HD422, DNxHR and FX6 samples: codec, profile and pix_fmt match ffprobe (except the intentionally unset ambiguous AVC Baseline label and the package's existing 4444XQ profile name).
  • Release metadata bumped to 3.1.3; Scripts/verify-release.sh 3.1.3 passes locally.

🤖 Generated with Claude Code

aagedal and others added 2 commits November 1, 2026 18:38
codecNameForUL matched byte 13 alone, so picture and sound labels and
different codec families collided: D-10 and DVCPRO HD read as PCM, DV25
and JPEG 2000 as MPEG-2, AC-3/MPEG audio as PCM, and ProRes, DNxHD/DNxHR,
FFV1 and others returned no codec.

Decode RP 224 labels by category (byte 9), compression (byte 11) and
family/member (bytes 12-13), cross-checked against FFmpeg's mxf tables
and bmx's label table, returning ffprobe-style codec names and profiles.
Remove the byte-11 == 0x04 branch and 0x41 ProRes mapping, which match
no registered label.

ProRes in MXF now uses the MOV FourCC defaults (decode depth instead of
ComponentDepth) and resolves 4444 alpha from AlphaSampleDepth or, like
ffprobe, the first frame header.

Verified against FFmpeg-written MXF for every codec its muxer supports
and the local Sony/Resolve/XDCAM/DNxHR samples: codec, profile and
pix_fmt match ffprobe.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aagedal
aagedal merged commit af70dc7 into main Nov 1, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant