Repository navigation
dOps: decode and encode any channel mapping family - #246
Conversation
Dops now carries the family and its table (stream count, coupled count, and per-channel mapping) as channel_mapping, None for family 0, instead of refusing a nonzero family. The table is checked against the output channel count and the RFC 7845 5.1.1 stream rules on both decode and encode. Family 0 encodes byte-identically. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mp4-atom now decodes any dOps channel mapping family (kixelated/mp4-atom#246), so the Opus importer can no longer rely on it refusing a table. Refuse one explicitly until surround import lands, and point the workspace at the mp4-atom branch until it releases. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Still in draft. What is the plan? |
Step 1, figure out why AI wanted this change. |
|
@bradh The plan is to ship this in 0.17.0 next to kixelated/mp4-atom#254, so downstream takes a single breaking bump. moq needs it so fMP4 Opus with channel mapping family 1 (surround) or family 2 (ambisonics) can pass through CMAF import and export. Today (Written by Claude Opus 5.5) |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 59 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@bradh I reviewed it, lemme know if you disagree with anything. |
…of every family, family 3's demixing matrix whole, and refuses a table that breaks RFC 7845's rules. Dops gains channel_mapping: Option<OpusChannelMapping>, upstream's shape (kixelated#246). In family 3 the table is RFC 8486's 2 x (N + M) x C octet matrix, read whole where upstream reads C octets. Decode checks the counts before it reads the table, so a matrix cut to one octet per channel, as libavformat's MP4 muxer writes it, is refused by name.
Dopsrefused any nonzero channel mapping family on decode and always wrote family 0, so surround Opus (family 1, ambisonics 2/3, unpositioned 255) could not pass through.Changes
Dopsgainschannel_mapping: Option<OpusChannelMapping>;Noneis family 0 (no table).OpusChannelMapping { family, stream_count, coupled_count, channel_mapping: Vec<u8> }.Error::InvalidCombination.familystays a rawu8.Public API
Breaking: a new public field on
Dops, plus the new exportedOpusChannelMapping. Serde input without the field still deserializes, asNone.Why
moq needs it for two things. One is surround Opus over CMAF: an fMP4 Opus track with a family 1
dOpsshould import with its mapping table, and a family 1 track should export to adOpsthat keeps it. Today both directions refuse it. The other is ambisonic fMP4 (family 2), which needs the table to tell first-order ambisonics apart from the non-diegetic stereo variants.The change is breaking, so it ships in the 0.17.0 release alongside kixelated/mp4-atom#254. That way downstream takes one breaking bump instead of two.
Shape
Option<OpusChannelMapping>sits besideoutput_channel_count. A flatfamily: u8plus an optional table would allow family 0 with a table. An enum replacingoutput_channel_countwould break every caller harder.OpusChannelMappingavoids a genericChannelMappingat the crate root, next tochnl. The table field mirrors the spec'sChannelMapping. Rename it totableif you prefer howdops.channel_mapping.tablereads at call sites.(Written by Claude Opus 5.5)
🤖 Generated with Claude Code