Commit Graph
4741 Commits
Author SHA1 Message Date
aiongg dbff374c1a wip 2026-11-14 02:18:00 +00:00
aiongg 23c4885d2a wip 2026-11-14 02:17:33 +00:00
alehel 098eb2e43a craft-audio: review round 3 for the coded formats
- craft-media: Mp4Writer::new refuses a writer positioned where the header
  would end past u64::MAX instead of overflowing the sum (correction to
  round 2, which let the M4A writer reach that addition).
- AAC is written at 6 kbit/s or a quarter of the sample rate per channel at
  least: the encoder accepts lower rates but codes only silence at them, so
  with_bitrate(128) gave a silent file.
- README: what to do with a layout a coded format refuses, and the names
  encode_format_for takes for M4A.

Refs #1230
2026-11-14 03:16:51 +01:00
alehel 63712c33e6 craft-audio: review round 2 for the coded formats
- craft-media: Mp4Writer counts chunk offsets from the first byte of the
  file, not from position 0 of the writer, so a file begun mid-writer is
  valid. This replaces the seek adapter the M4A writer wrapped its sink in.
- Tests pin the bytes of the roll sample group and each format's feature.
- Docs: ALAC's length comes from the sample durations, not an edit list;
  which readers take an empty AAC file; speaker names as the errors print
  them; craft-media's README lists roll_distance.
- Error messages for a layout a format has not no longer suggest setting
  a layout that was set.

Refs #1230
2026-11-14 03:16:51 +01:00
alehel 3dadce4d7c craft-audio: review round 1 for the coded formats
- craft-media: TrackConfig::roll_distance writes a `roll` sample group
  (sgpd + sbgp) over every sample. The AAC M4A track sets -1: Apple's
  decoders took 2112 frames of priming and dropped the start of the audio
  without it (afinfo now reports the frames written and 1024 priming).
- EncodeFormat::is_built and feature: which formats this build writes.
- Clippy: the writer enum's variants differ in size with flac-encode and
  a codec feature but no pcm-encode.
- Tests for the finished sample entry (AAC bit rate, ALAC cookie), ALAC
  dither and afinfo's reading of the priming.
- README: ffmpeg's reading of 8-channel AAC, and files with no audio.

Refs #1230
2026-11-14 03:16:51 +01:00
alehel eee76c3fc2 craft-audio: AAC, ALAC, MP3, AC-3 and E-AC-3 as formats of encode and FileEncoder
EncodeFormat gains Aac and Alac (M4A through craft-media's MP4 muxer) and
Mp3, Ac3 and Eac3 (raw streams), so one call writes any of them from
WAV-order f32 audio and EncodeOptions.

- EncodeOptions::rate_control (with_bitrate, with_quality): a bit rate is
  moved to the nearest one the stream can carry; quality is AAC's VBR.
- Channels are mapped onto the codec's order by speaker, from
  EncodeOptions::layout. A layout the format has not is Unsupported
  instead of reaching the wrong speakers.
- M4A: the edit list skips the AAC priming, and the last sample's duration
  is cut so the track ends at the last frame written.
- encode_format_for, ENCODE_EXTENSIONS and EncodeFormat::ALL list the new
  formats; aac-encode and alac-encode now turn on craft-media's isobmff.

Refs #1230
2026-11-14 03:16:51 +01:00
aiongg dad3e170c5 Contract stubs: craft-color gradient module, wip 2026-11-14 02:15:00 +00:00
aiongg 556d7ce8df Contract stubs: craft-menu (stage 6, wip) 2026-11-14 02:13:47 +00:00
Dylan M. Taylor 545155124f feat(xfl): parse native edge attributes (M4) (#1232) 2026-11-13 21:12:36 -05:00
Dylan M. Taylor de7640a006 feat(xml): preserve strict end-tag parsing as an option 2026-11-13 21:11:56 -05:00
aiongg 870c17ba97 Contract stubs: craft-ui-patterns (06.md items), cw.C46 senses_surface 2026-11-14 02:11:11 +00:00
alehelandClaude Opus 5.5 7c652beec4 craft-audio: review fixes, round 1 (#446)
- `Encoder::with_application` checks the channel count before clamping
  the bitrate, so 86 channels or more return `Error::Channels` instead
  of panicking in `clamp`. Tested with 86 and 255.
- The ffmpeg oracle test skips a missing `opus`/`libopus` decoder
  through the testkit's `skip`, so `CRAFT_MEDIA_REQUIRE_ORACLES=1` fails
  it.
- README: the encode example pads at least the pre-skip after the audio
  before rounding up to a frame, so the encoder delay is flushed; the
  MP4 note says an explicit edit replaces the `media_start` edit and
  gives its fields.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 21:09:46 -05:00
alehelandClaude Opus 5.5 bdf8cb2a19 craft-audio: Opus encoder
EffectCraft's `effectcraft-opusenc` as `opus::encoder` (and
`opus::Encoder`) behind `opus-encode`: SILK, hybrid and CELT, 48 kHz,
20 ms frames, mono or stereo. The constructors and `encode_float`
return `Result` instead of panicking. `Bandwidth` is one type for the
decoder and the encoder, and the two `Mode` enums convert into each
other. `encode` now turns on `opus-encode`.

The encoder tests (modes, ffmpeg's two Opus decoders as oracles) and
`TrackDecoder` on Opus without an `OpusHead` come with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 21:09:46 -05:00
aiongg eb01f1f302 Lints: slice iteration in gallery test, private token doc link 2026-11-14 02:08:38 +00:00
Dylan M. Taylor 33958638b2 Validate XFL archive end record candidates 2026-11-14 02:06:54 +00:00
Dylan M. Taylor dc200ff58c Merge pull request #1236 from dylanmtaylor/codex/eps-postscript-vm
Add reusable PostScript VM stack operators
2026-11-13 20:59:50 -05:00
aiongg 38ce55467c Contract stubs: craft-ui-canvas, craft-ui-shell (plus stage-4 carry) 2026-11-14 01:59:24 +00:00
aiongg 894ecc6390 Lints: unambiguous write doc links, private doc links, contains 2026-11-14 01:58:46 +00:00
aiongg 85c383f919 Lints: fix craft-aaf error variant docs 2026-11-14 01:48:11 +00:00
aiongg 52a2595a60 Lints: document craft-aaf, fix its doc links, keep canvas size builder closure 2026-11-14 01:47:15 +00:00
aiongg 3c509c6227 Contract stubs: craft-ui-macros, craft-ui-widgets, craft-ui-panels 2026-11-14 01:46:34 +00:00
aiongg 7e7a97ed01 Contract stubs: craft-ui-contract (05.md items) 2026-11-14 01:38:03 +00:00
aiongg bcd543e017 Lints: ui-patterns tests, gallery, docx docs link 2026-11-14 01:36:21 +00:00
aiongg 5cfafa8476 Contract stubs: craft-ui-contract (04.md items) 2026-11-14 01:31:59 +00:00
aiongg ae4e2ab09e Contract stubs: stage 1 (font-catalog, i18n, keymap, platform, behavior, window) 2026-11-14 01:25:39 +00:00
aiongg 8378864db3 Lints: gate test-only items, simplify types, struct literals, doc link 2026-11-14 01:25:10 +00:00
Dylan M. Taylor 948b5c23c1 Merge pull request #1222 from dylanmtaylor/codex/gif-animation-writer
Add shared animated GIF writer
2026-11-13 20:23:11 -05:00
aiongg d08c97c8c5 Lints: story facts initialisers, doc links, path field last edit 2026-11-14 01:14:54 +00:00
aiongg 1414789132 CI: the keymap workflow builds with the crate's egui feature 2026-11-14 00:56:50 +00:00
aiongg 206c1c5379 Lints: timeline story facts and icon ids 2026-11-14 00:56:27 +00:00
aiongg 9f83b6677e Lints: table grid test alias name 2026-11-14 00:55:55 +00:00
aiongg 1a5d904df4 Lints: table grid test alias 2026-11-14 00:55:49 +00:00
aiongg 80ea3f6670 Lints: ui-widgets trials, table, prepress, media, raw and update doc links 2026-11-14 00:55:22 +00:00
Dylan M. Taylor 39f45eda55 Avoid ambiguous empty stack assertions 2026-11-14 00:48:11 +00:00
aiongg 04cf3b6afa pdf read-only contract: the lockfile covers the wasm test dependencies 2026-11-14 00:41:50 +00:00
aiongg 36a1900fca Lints: cargo fmt 2026-11-14 00:41:05 +00:00
aiongg f093f96ddd Lints: update tests import their modules' items explicitly allowed, scheduled is a test helper of the ui feature 2026-11-14 00:40:10 +00:00
aiongg dd7fe94ebc Lints: name the registered function type in craft-ui 2026-11-14 00:39:46 +00:00
aiongg 469e3cbc62 Lints: keep the sizing story closures 2026-11-14 00:39:29 +00:00
Dylan M. Taylor 6d620e971e Merge pull request #1229 from storytold/codex/craft-jxl-extraction
Add shared JPEG XL decoder and encoder
2026-11-13 19:39:17 -05:00
aiongg d325856d4f Lints: ui-shell, ui-canvas and ui-patterns findings 2026-11-14 00:39:12 +00:00
aiongg 9e93828b21 Lints: ui-panels trials may panic; ui-contract Act alias lifetime 2026-11-14 00:38:39 +00:00
aiongg b4c1ae526c Lints: ui-widgets and ui-contract trial findings 2026-11-14 00:37:55 +00:00
aiongg d58447183d Lints: Default for the test kit's Panel and Windows 2026-11-14 00:37:14 +00:00
Dylan M. Taylor 26feec69cb Add reusable PostScript VM stack operators 2026-11-14 00:37:04 +00:00
aiongg 08645da7ae Lints: use the field shorthand for env 2026-11-14 00:36:50 +00:00
aiongg 8a3bf301bc Lints: re-export record_failure only for the updater that uses it 2026-11-14 00:36:22 +00:00
aiongg 0c586294ea Lints: fix clippy and rustdoc findings in ui-contract, i18n, heif, mesh, video, audio, doc and the doc links 2026-11-14 00:35:31 +00:00
Dylan M. Taylor 543e5d4983 Validate GIF frame length before copying 2026-11-14 00:34:24 +00:00
aiongg efabb13baa Lints: dxf, media and prepress do not warn on missing docs (their public items are not all documented) 2026-11-14 00:30:30 +00:00