From 5a4d95d1605b2e1e9b627fdd11a7f9632c0b0d05 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Fri, 25 Sep 2026 15:43:58 -0700 Subject: [PATCH] quest(audio-codecs): ADTS export refuses what it cannot label Co-Authored-By: Claude Opus 5.5 --- quest/m1/audio-codecs/README.md | 1 + quest/m1/audio-codecs/adts-refusals.md | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 quest/m1/audio-codecs/adts-refusals.md diff --git a/quest/m1/audio-codecs/README.md b/quest/m1/audio-codecs/README.md index ee3cca548f..b298d3560f 100644 --- a/quest/m1/audio-codecs/README.md +++ b/quest/m1/audio-codecs/README.md @@ -45,6 +45,7 @@ its own decode and encode quest so verification stays per host. - [AudioToolbox decode](/quest/m1/audio-codecs/decode-audiotoolbox.md) - macOS and iOS decode HE-AAC, multichannel AAC, and what else the framework offers - [Opus surround](/quest/m1/audio-codecs/opus-surround.md) - mapping family 1 decodes on every host through the multistream decoder +- [ADTS refusals](/quest/m1/audio-codecs/adts-refusals.md) - the ADTS writer refuses channel counts and object types it cannot label instead of mislabeling them - [AudioToolbox encode](/quest/m1/audio-codecs/encode-audiotoolbox.md) - macOS and iOS encode AAC-LC ## Related diff --git a/quest/m1/audio-codecs/adts-refusals.md b/quest/m1/audio-codecs/adts-refusals.md new file mode 100644 index 0000000000..c7896e377d --- /dev/null +++ b/quest/m1/audio-codecs/adts-refusals.md @@ -0,0 +1,25 @@ +# [S] ADTS export refuses what it cannot label + +## Goal + +`moq-mux`'s ADTS writer never labels an AAC track with the wrong layout or +object type. A channel count ADTS cannot name is refused, not silently written +as stereo, and an explicit SBR or PS description is written with the object +type ADTS can carry or refused, not masked to two bits into a wrong profile. + +## Plan + +- `channel_config_from_count` falls back to stereo for counts it cannot + represent; refuse instead, the same way #4178 made channelConfiguration 11 to + 14 refuse. +- The ADTS header masks the object type to two bits, so an explicit HE-AAC + (object type 5) or HE-AACv2 (29) description is mislabeled. Decide per case: + signal the backward-compatible AAC-LC core (implicit SBR) when the description + allows it, otherwise refuse. +- Tests for both with real fixtures, checked against ffprobe. + +Public API: none. Wire: none; TS output changes only for inputs it mislabeled. + +## Related + +- [#4178](https://github.com/moq-dev/moq/pull/4178) - the PCE export that found these