Skip to content

Add SMPTE ST 2067-201:2026 IAB Plugin Level 0 support: MCA Content/Use Class, IABMaxObjectCount, IABChannelSubDescriptor11 - #169

Open
fschleich wants to merge 11 commits into
cinecert:masterfrom
fschleich:IAB_Plugin_Level_0_Revision
Open

fschleich wants to merge 11 commits into
cinecert:masterfrom
fschleich:IAB_Plugin_Level_0_Revision

Conversation

@fschleich

Copy link
Copy Markdown
Contributor

Summary

This PR extends the AS-02 IAB implementation to cover SMPTE ST 2067-201:2026
(IAB Plugin, Level 0) and the associated ST 377-41 MCA labeling items. It adds
the new structural metadata to the library, wires it through the
AS_02::IAB::MXFWriter, and exposes it in the command-line tools. All new
writer parameters are optional with backward-compatible defaults, so existing
callers are unaffected.

Changes

New / extended structural metadata (Metadata.h/.cpp, MDD.h/.cpp)

  • MCA Content / MCA Use Class — added MCAContent and MCAUseClass
    optional properties to MCALabelSubDescriptor (read/write/copy/dump),
    per SMPTE ST 377-41:2023 (ST 2067-201:2026 §5.10.3). New item ULs
    registered in the MDD table.
  • IABMaxObjectCount — added as an optional ui16_t item on
    IABEssenceDescriptor (ST 2067-201:2026, Table 3).
  • IABChannelSubDescriptor — new InterchangeObject subclass
    (ST 2067-201:2026, Annex E) with items IABBedMetaID (ui32),
    IABChannelID (ui32), IABAudioDescription (ui8) and optional
    IABAudioDescriptionText (UTF-16). Includes the set key + item ULs, and
    registration of an object factory so the descriptor is parsed on read.

Writer (AS_02_IAB.h/.cpp)

  • MXFWriter::OpenWrite gains three optional trailing parameters:
    write_max_object_count, max_object_count, and a vector of
    IABChannelSubDescriptors. When supplied, IABMaxObjectCount is set on
    the essence descriptor and the channel subdescriptors are cloned (with
    fresh InstanceUIDs) and linked into the essence descriptor's
    SubDescriptors list.
  • Index writer setup fixed: SetEditRate is now applied after descriptor
    setup and SetPrimerLookup is wired to the header primer.

Command-line tools

  • as-02-wrap-iab — new options:

    • -m <count> — IABMaxObjectCount.
    • -c <bedMetaId>,<channelId>,<audioDescription>[,<audioDescriptionText>]
      — add an IABChannelSubDescriptor (repeatable).
    • -C <mca-content> / -u <mca-use-class> — MCA Content / Use Class.

    Input is validated before writing: (bedMetaId, channelId) pairs must be
    unique, and AudioDescriptionText must be present iff the MSB (0x80) of
    AudioDescription is set (ST 2067-201:2026 Annex E.2.5 / ST 2098-2
    §10.3.13).

  • as-02-info — reports IABMaxObjectCount when present.

  • as-02-unwrap — IAB frames are now written out to .iab files
    (honoring file_prefix, number_width, no_write_flag, and fb_size),
    replacing the previous hexdump-only path and the hardcoded 24000-byte
    frame buffer capacity.

fschleich added 11 commits May 9, 2025 11:22
- Replaced the exact-match test (iabAudioDescription != 0x80) with a proper MSB test (iabAudioDescription & 0x80), so any value 0x80–0xFF with the top bit set (e.g. 0x81, 0xC0) correctly permits AudioDescriptionText — matching ST 2067-201 Annex E.2.5 and ST 2098-2 §10.3.13.
- Made it bidirectional: text present but MSB clear → rejected; MSB set but text absent → rejected (the item must be present iff the MSB is set).
- Fixed the stale comments (line 145 and the wrong "0x08" on line 150) and cited the governing spec clauses.
Added full support for the two new MCA items the 2026 revision adopts from ST 377-4:2021 / ST 377-41:2023.
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