Commit Graph
110 Commits
Author SHA1 Message Date
aiongg cf35f7dbae Merge remote-tracking branch 'upstream/main' into next-sync-1123
# Conflicts:
#	Cargo.toml
#	crates/audio/src/track.rs
2026-11-23 01:29:52 +00:00
Terra854 6a061a30bd audio: decode FLAC frames through TrackDecoder (#2868)
* audio: decode FLAC frames through TrackDecoder

* audio: keep FLAC state out of the decoder enum layout
2026-11-21 14:04:27 -05:00
aiongg ca58dfe6c9 Merge storytold main into next (19 Nov sync)
Merges main at d7c9632bfb.

- Cargo.toml: both sides' new workspace crates (next's font-subset, harfbuzz-subset-sys and
  host; main's gpu, gpu-null, gpu-providers and gpu-wgpu).
- crates/jpeg: next split lib.rs into modules; main's reduced-size decoding goes to them: the
  scaled IDCT, reconstruction and render_scaled to idct.rs, MAX_SHRINK, reduced_estimate and
  decode_reduced stay public in lib.rs. Main's new test added; the frame test next removed
  stays removed.
- crates/audio, crates/media: next builds the integration tests into the library's test
  executable (autotests off, tests/main.rs); main's new DSD and MPEG-TS mux tests are modules
  there behind their features instead of [[test]] targets, and the mux tests reach their shared
  helper module through the integration module.
- crates/media/src/matroska/track.rs: main's new FFV1 codec-parameter test added; the test
  modules next removed stay removed.
- crates/file-formats: main's JXL capability test, which asks the codec whether JXL reads,
  replaces next's interim check.
2026-11-19 16:22:24 +00:00
el-j 7b1a8f4515 craft-audio: validate DSF container bounds and DSDIFF channel counts (#1787) 2026-11-19 09:26:19 +01:00
ljkx cec20449a2 fix(audio): an empty WAV data chunk before a LIST chunk is no audio (#2123) (#2246)
A `data` chunk of size 0 counted as empty only when the RIFF size matched
the file. A writer that appends a `LIST` chunk after writing the RIFF size
leaves it stale, so the reader took the file for an unfinished recording
and decoded the `LIST` chunk's bytes as samples (8 frames of noise instead
of none).

A size-0 `data` chunk is now also empty when whole chunks follow it and the
first one has an id that follows audio (LIST, bext, cue, JUNK, ...). A
recording that was never finalised (PCM after the header) and bytes that
only start like a chunk still decode as audio.
2026-11-18 15:30:49 -05:00
el-j e20290fb43 Check padding addition for DSDIFF size calculation 2026-11-18 21:23:33 +01:00
el-j 669c839251 audio: DSD review fixes (DSDIFF text and padding, channel layouts, ID3 decoding, factor-64 decimation) 2026-11-18 19:45:16 +01:00
el-j f771b496fa Merge main into feat/audio-dsd 2026-11-18 19:40:45 +01:00
aiongg 4d22e6b958 Merge storytold main d6b5b16bbb into next (18 Nov sync)
- Workflows: main's per-crate layout, with next in the push triggers, Linux only for pushes to
  next, next's crate features (keymap egui, window and update ui) and test paths (crw samples and
  the pdf fixtures run inside the lib's test binary). The workspace gate keeps --keep-going and
  the facade-as-an-app clippy from next's ui.yml. Per-crate doc steps live in docs.yml, which also
  documents craft-ui, the ui-* crates, craft-doc and craft-pdf with every feature. docpath, i18n,
  print and ui workflows go, as on main. actions.lock lists docs.yml and theme.yml.
- Main's cloud and share UI (account, cloud, share, presence, the overflow menu and split button)
  lives in the new crate craft-cloud-ui as main wrote it; the craft-ui facade forwards share and
  cloud and re-exports account, cloud, share and presence, so craft-cloud-local builds unchanged.
- audio and media: main's new tests join tests/main.rs under their features.
- cms: main's new synth and FOGRA39 tests, with the fogra39() helper they use.
- nextest: no gpu group on unix; next's tests create no GPU device.
2026-11-18 01:22:22 +00:00
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 25a882c1ce fix(audio): stop DSF audio at the declared data chunk 2026-11-17 10:12:56 -05:00
Dylan M. Taylor cbbba064fd Merge remote-tracking branch 'origin/main' into fix/dsd-chunk-bounds
# Conflicts:
#	crates/audio/Cargo.toml
#	crates/audio/src/lib.rs
2026-11-17 09:58:22 -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 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 83048a707e fix(audio): bound DSD writer and aggregate PCM buffers 2026-11-17 08:49:27 -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 557f9f5fb1 fix(audio): reject overflowing DSD chunk sizes and invalid factors 2026-11-17 08:45:21 -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
aiongg ac3dfd1f53 Merge storytold main into next (17 Nov sync)
storytold main 83cb1133dd (291 commits) into the integration head bab1a99b85; 47 conflicted files.

- Domain test files (metafile, prepress, pdf plates, settings store, heif, media-testkit, atomic): tests next cut stay cut; tests new on main are kept, as trials where the crate's test target runs trials.
- atomic: main's group-bits test and Faulty::set_group go to src/tests.rs. audio: main's GSM and SBC oracles join tests/main.rs. cms constructors, pdf knockout_backdrop and testing_pdf join their crates' one test binary; timeline's preflight tests become src/preflight_tests.rs trials.
- update: main's changes to detect, install (linux, macos) and the tests land in next's split modules. The app's own offer is inspected on a thread of its own, picked up by tick's polling; settle_for_tests settles offers too. Later on a ready update drops the close it asked for. updater_pin_tests.rs stays deleted; its new pin test is in tests/it/update.rs.
- craft-color: main added a different crate at crates/color (the colour tags of compositor and display frames); it is next's craft-color module `tags`, re-exported at the root.
- Old crates/ui (combo, docking, testing, README) and keymap's ui/view.rs stay deleted; main's new crates/ui/src/testing files are dropped with them.
- New crates in the craft facade: ai, control, dds, frame, ipc, media-source, palette, press-print, score, ssip. testkit and xtask are listed outside it.
- Cargo.lock: the union of both locks, resolved by cargo metadata. Workflow: main's nextest Windows leg, with next's --keep-going clippy.
2026-11-17 12:44:52 +00:00
aiongg cd73a4f24a Remove the DIAG prints 2026-11-17 09:35:16 +00: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 1ec3f6737c Merge main into feat/audio-dsd 2026-11-17 10:12:18 +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
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
aiongg 3ceff195c7 Sync follow-ups: upstream's new tests in crates whose test executable runs trials are trials (print cups, ticket and windows_native, timeline interchange, update); craft-print's cups module documented (missing_docs), its tests under cfg(test) 2026-11-16 02:02:00 +00:00
aiongg 4a65e13b74 Sync follow-ups: upstream's new audio codec tests reach the test kit through the integration module, serde_json back as a dev-dependency, no imports for tests our side cut; stream.rs items documented (missing_docs) 2026-11-16 01:58:30 +00:00
aiongg dffc61a7e0 Merge storytold main 832883b5 (sync 16 Nov)
961 upstream commits since 7bb6c900. Resolutions:
- Test-only conflicts: upstream tests from before the base that our side
  cut stay cut; tests new upstream are kept (audio aac/config, layout,
  encode_format; cms lutfile; media mux; print windows_native, ticket;
  update self_update; xml hostile).
- Code our side moved, with upstream's change carried to the new place:
  craft-media mux roll sample groups (mux/boxes.rs) and writer-start
  offsets with overflow checks (mux/progressive.rs); craft-print's
  shrink-to-fit scale guard (sheets/plan.rs); craft-update's nextest
  archive detection (self_update/detect.rs); craft-vectorcraft-format's
  Tail::write_to_with (container.rs); craft-i18n's pedantic fixes
  (bidi.rs, negotiation.rs).
- craft-ui: the old crate's modules stay removed; gpu_test_lock guarded
  their per-test wgpu renderers, which the snapshot kit does not have.
- New upstream tests in crates that build their integration tests into
  the library's test executable are modules of tests/main.rs (audio
  flac_decode and qoa_oracle, cms, docpath, pcraft-format,
  vectorcraft-format).
- The 22 new crates are optional members of the craft facade.
2026-11-16 01:52:09 +00: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 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
el-j cb7e8c5ec1 craft-audio: DSD audio (DSF and DFF) to PCM. Closes #1539. 2026-11-16 01:25:17 +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 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 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
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
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 affd53bf5f Merge remote-tracking branch 'origin/main' into codex/flac-main-reconcile
# Conflicts:
#	crates/audio/Cargo.toml
#	crates/audio/src/lib.rs
2026-11-15 17:52:06 +00:00