Commit Graph
158 Commits
Author SHA1 Message Date
el-jandDylan M. Taylor 0649a07aa1 craft-audio: ITU-T G.726 ADPCM speech codec (#1531) (#1792)
* craft-audio: ITU-T G.726 ADPCM speech codec (#1531)

* fix(audio): mask G726 sample codewords before adaptation

---------

Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>
2026-11-17 12:15:52 -05:00
Dylan M. Taylor 2d6d39f1a9 Merge pull request #1959 from el-j/feat/audio-vorbis-decode
craft-audio: native Vorbis I decoder (#1547)
2026-11-17 11:55:19 -05:00
Dylan M. Taylor 00048fdadf Merge remote-tracking branch 'origin/main' into fix/vorbis-codebook-size
# Conflicts:
#	crates/audio/src/lib.rs
2026-11-17 09:08:44 -05:00
Dylan M. Taylor 363a51967b fix(audio): bound Vorbis decode allocations and strengthen oracles 2026-11-17 09:07:52 -05:00
Dylan M. Taylor e5db2c26b9 Merge remote-tracking branch 'origin/main' into fix/adpcm-layout-overflow
# Conflicts:
#	crates/audio/src/lib.rs
2026-11-17 09:01:31 -05:00
Dylan M. Taylor 2ad03f00d0 docs(audio): remove duplicated codec overview after merge 2026-11-17 08:56:22 -05:00
Dylan M. Taylor 90947c57d7 Merge pull request #1460 from alehel/feat/vmd-decoding
feat(media,video,audio): Sierra VMD demuxer and decoders
2026-11-17 08:53:39 -05:00
Dylan M. Taylor 9c4a8a1dd9 Merge main and retain MP2 and ADPCM registrations 2026-11-17 08:49:11 -05:00
Dylan M. Taylor cec152da82 fix(audio): reject overflowing interleaved ADPCM layouts 2026-11-17 08:47:42 -05:00
Dylan M. Taylor 1291955de9 Merge pull request #1789 from el-j/feat/audio-g722
craft-audio: ITU-T G.722 wideband speech codec (#1530)
2026-11-17 08:33:15 -05:00
el-j e524806621 craft-audio: the Vorbis decoder's bit-reversal loop iterates the table 2026-11-17 11:25:41 +01:00
el-j e5bde5203c Merge main into feat/audio-mp2-encode 2026-11-17 10:12:38 +01:00
el-j 46587441df Merge main into feat/audio-adpcm 2026-11-17 10:12:32 +01:00
el-j 3d06331fc8 Merge main into feat/audio-g722 2026-11-17 10:12:12 +01:00
el-j de861bef5a Merge main into feat/audio-vorbis-decode 2026-11-17 10:11:58 +01:00
alehel 00e0075184 Merge remote-tracking branch 'origin/main' into m1460-merge
# Conflicts:
#	crates/audio/Cargo.toml
#	crates/audio/README.md
#	crates/audio/src/lib.rs
#	crates/media-testkit/src/lib.rs
2026-11-17 04:06:58 +01:00
el-j d09d31c109 craft-audio: Bluetooth Low Complexity Subband Coding (SBC) audio codec (#1537) (#1839) 2026-11-16 21:30:36 -05:00
el-j 352c06857d craft-audio: GSM 06.10 full-rate speech decoder and encoder (#1534) (#1874) 2026-11-16 21:30:32 -05:00
Dylan M. Taylor e2bf53f2bd craft-audio: share non-seeking canonical WAV streaming primitives (#1962) 2026-11-16 20:25:09 -05:00
el-j 3382b9662a craft-audio: native Vorbis I decoder (#1547) 2026-11-17 01:10:43 +01:00
alehel 1676c70cd0 Merge remote-tracking branch 'origin/main' into claude/vmd-format-support-7746c5
# Conflicts:
#	crates/audio/src/lib.rs
#	crates/video/src/lib.rs
2026-11-16 12:43:58 +01:00
FredApps a380d33f46 Merge pull request #1699 from storytold/codex/lpcm-shared
Share DVD and Blu-ray LPCM decoding
2026-11-16 07:04:47 +01:00
FredApps b3643af647 Merge pull request #1616 from storytold/codex/omf-bounds
aaf: preserve bounded FilmCraft OMF traversal
2026-11-16 04:50:18 +01:00
FredApps d26e89917a omf: charge depth-limited visits and share a document search budget; AIFF-C needs an integer PCM code 2026-11-16 03:05:05 +01:00
FredApps 4daca46778 pcm_export: use is_multiple_of 2026-11-16 03:01:21 +01:00
FredApps b99a64fc5b pcm_export: refuse zero channels, zero sample rate and partial frames 2026-11-16 03:01:11 +01:00
el-j d09260a36a craft-audio: prevent potential negation overflow and bound multichannel input in G.722 2026-11-16 02:39:51 +01:00
el-j 8314189cb0 craft-audio: bound the Microsoft ADPCM step; regression tests for the review findings 2026-11-16 02:26:50 +01:00
el-j 853c8e8a4d craft-audio: remove a file that does not belong to this PR 2026-11-16 02:24:40 +01:00
el-j 31d3e07999 Merge main into feat/audio-adpcm 2026-11-16 02:23:22 +01:00
el-j c25ac10b88 Merge main into feat/audio-mp2-encode 2026-11-16 02:23:11 +01:00
el-j 6502ca440e craft-audio: ITU-T G.722 wideband speech codec (#1530) 2026-11-16 02:14:12 +01:00
FredApps 5f4e05d951 audio: rustfmt after main merge 2026-11-16 01:56:22 +01:00
FredApps 22ead09553 Merge remote-tracking branch 'origin/main' into w1621
# Conflicts:
#	crates/audio/src/lib.rs
2026-11-16 01:48:39 +01:00
FredApps 7f78225721 Merge pull request #1614 from storytold/codex/shared-pcm-essence
audio: share compatible PCM essence wrappers
2026-11-16 01:43:05 +01:00
el-j bbe92b892e craft-audio: address review findings on overflow checks and sample bounds 2026-11-16 01:06:06 +01:00
FredApps 69c0ff7068 Merge remote-tracking branch 'origin/main' into w-codex/omf-bounds 2026-11-16 00:48:12 +01:00
FredApps 1d413b992d Merge pull request #1688 from storytold/codex/flac-main-reconcile
Reconcile native FLAC decoder with merged QOA support
2026-11-16 00:17:47 +01:00
FredApps a5f31480eb Merge remote-tracking branch 'origin/main' into w-codex/pcm-export-shared
# Conflicts:
#	crates/audio/src/lib.rs
2026-11-16 00:08:48 +01:00
FredApps 6c947d655b Merge remote-tracking branch 'origin/main' into pcm-essence
# Conflicts:
#	crates/audio/src/lib.rs
2026-11-16 00:05:49 +01:00
FredApps c26b32c8ac Merge pull request #1636 from storytold/codex/shared-pcm-packet
audio: share interleaved PCM packet decoding
2026-11-16 00:05:15 +01:00
FredApps d1a431c4b5 audio: pure-Rust Vorbis encoder (1-8 channels, quality, tags, wasm) and an Ogg page writer (#1642)
* audio: pure-Rust Vorbis encoder, and an Ogg page writer in craft-media

Replace the libvorbis wrapper (vorbis_rs, C, desktop only) behind
`vorbis-encode` with FilmCraft's clean-room Vorbis I encoder by
@JordyUSA (storytold/filmcraft#4481), and move its Ogg page writer into
craft-media's `ogg` module.

craft-audio:
- `vorbis::encoder::{Encoder, EncoderConfig, Error}`: 1-8 channels in
  Vorbis order, any sample rate, quality -1 to 10 (VBR), streaming
  packets with granule positions.
- `encode_ogg_vorbis` with `OggVorbisOptions` (quality, vendor, tags,
  serial) writes a whole Ogg Vorbis file with a comment header.
- `encode_ogg(buf, kbps)` and `OGG_BITRATES` keep working: the bit rate
  picks the quality whose nominal rate it is (`quality_for_bitrate`).
- `encode` with `EncodeFormat::Ogg` takes 1-8 channel WAV-order layouts
  and writes them in Vorbis order, and `RateControl::Quality`.
- Ogg is built on wasm32 too.
- Residue partitions hold whole sample frames (48, 40, 48 or 56 values
  for 3, 5, 6 and 7 channels): libvorbis decodes each partition from
  channel 0, so 32-value partitions came out scrambled for those counts.
- The first audio packet gets a page of its own, so a short file's
  first audio page is never also its last (ffmpeg then kept the padding).

craft-media: `ogg::PageWriter`, `opus_tags`, `vorbis_comment`.

Part of storytold/craft-libs#778.

* audio, media: address review on the Vorbis encoder and Ogg writer

- Encoder: read cursor into the pending input, compacted once per call,
  so a large encode() call no longer moves the tail on every block.
- Tests: check ffmpeg's libvorbis decoder only when ffmpeg has it.
- PageWriter::finish: the end granule replaces the last page's only when
  a packet completes on it (RFC 7845 4.4); documented and tested.
- README: Ogg Opus packet granules are the samples decoded so far.

* audio: pick Ogg by extension on wasm32 too

The Vorbis encoder is pure Rust now, so encode_format_for("ogg") follows
the vorbis-encode feature alone, as EncodeFormat::Ogg.is_built() and
ENCODE_EXTENSIONS already do.
2026-11-15 22:59:29 +01:00
el-j 485f8e45f4 craft-audio: ADPCM test lints 2026-11-15 22:41:38 +01:00
el-j 9134fff94c craft-audio: ADPCM docs link and ffmpeg rounding variants in the oracle tests
Older ffmpeg releases decode IMA and Flash ADPCM with the
((2 * magnitude + 1) * step) rounding; the tests accept either that or the
recommended-practice one.
2026-11-15 22:41:20 +01:00
el-j 6b059051e5 craft-audio: IMA WAV, Microsoft, Yamaha and Flash ADPCM decoders and encoders (adpcm)
Bit-exact with ffmpeg's decoders on both ffmpeg-made and our own
streams; our encoders match ffmpeg's in SNR.

Closes #1536.
2026-11-15 22:35:46 +01:00
FredApps 5a7a63a21d Merge pull request #1593 from storytold/i778/opus-encoder-effectcraft-speedups
craft-audio: port EffectCraft's later Opus encoder speed-ups
2026-11-15 22:26:13 +01:00
el-j 1648ef05f5 craft-audio: MPEG-1/2 Layer II (MP2) encoder (mpa-encode)
Constant bit rate mono and stereo at 16-48 kHz, written from ISO/IEC
11172-3 and 13818-3. Decoded by our decoder and by ffmpeg as an
oracle.

Closes #1545.
2026-11-15 22:15:58 +01:00
Dylan M. Taylor 30596f73c5 Merge pull request #1707 from storytold/extract/wav-marker-metadata
audio: extract WAV cue, adtl, RF64 and XMP marker metadata
2026-11-15 15:43:10 -05:00
alehel ad5ff4426a Merge remote-tracking branch 'origin/main' into claude/vmd-format-support-7746c5
# Conflicts:
#	crates/audio/src/lib.rs
2026-11-15 21:17:32 +01:00
Dylan M. Taylor 27b1134e23 Share Opus FFT and CELT allocation primitives 2026-11-15 18:57:27 +00:00