A header whose sixth patch is short (96 kHz, start 3, stop 9) was
rejected, though that patch is dropped and five remain.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(materialx): add bounded document reader and OpenPBR writer
* proof, video, latex, cms: satisfy the clippy lints that ship with Rust 1.100
The newer clippy flags needless bool guards and range loops whose index
only indexes one slice; express both with the equivalent iterators so
the workspace lint stays green on every platform.
* cms: index the ink loops instead of a range loop, which newer clippy rejects
* feat(materialx): resolve shader graphs and write OpenPBR materials
* feat(materialx): resolve shader graphs and write OpenPBR materials
Write AVI files: hdrl with avih and one strl (strh, strf, strn, indx) per
stream, odml/dmlh, an interleaved movi and idx1. Past the RIFF limit
(default 1 GiB) the file continues in OpenDML RIFF AVIX extensions with
ix## standard indexes and an indx super index per stream.
- VideoSpec::for_codec builds the stream from CodecParams; MPEG-4 Part 2
is tagged FMP4.
- Audio is timed by bytes (PCM-style) or one packet per chunk.
- Bad options and chunks are errors; finish() closes a readable file
after a failed write.
Tests read the files back through this crate's demuxer by every index,
and through ffmpeg (decode identical to the sources, seeks through the
index, ffprobe fields), in one RIFF and across AVIX extensions. The
MPEG-4 encoder tests play its packets from an AVI file.
The SBR decoders now record the layout they were built for and are rebuilt when the
decoder's layout differs, instead of being cleared in set_layout. An access unit whose new
program config fails puts the layout back, and with it the SBR decoders still match.
Refs #1121
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A VARFIX pointer of 1 marks no transient envelope, like 0.
- A start at QMF channel 32 is valid; kx is checked once the crossover is known.
- The noise and harmonic gains take q / (1 + q) first, so two clamped levels no longer
overflow to infinity and NaN.
- A header that runs past its fill element is refused before it replaces the one in use.
- A new program config layout drops the SBR decoders, whose history was the old order's.
- The ffmpeg oracle requires a high band to compare on every channel but the 5.1 LFE.
Refs #1121
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
aac::Decoder::set_sbr(true) decodes HE-AAC at twice the core rate with the
SBR tool of ISO/IEC 14496-3 §4.6.18: QMF analysis and synthesis, frequency
band tables, patching with LPC inverse filtering, envelope adjustment with
limiter, boost, noise and sinusoids. TrackDecoder uses it in place of the
2x upsampler. Tables are transcribed from ETSI ES 201 980 Annex I.
Matches ffmpeg's decoder on AudioToolbox HE-AAC streams of 1-6 channels:
the same 962-sample delay, ~54 dB SNR, high band level within 0.01 dB.
Parametric stereo is still not decoded.
Refs #1121
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>