Commit Graph
114 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 0da914f4a2 video: share seekable raw APV access-unit ranges (#2925) 2026-11-23 03:35:54 +07:00
Terra854 fb04a21e9d video: allow a lower Motion JPEG track allocation limit (#2916) 2026-11-23 03:35:41 +07:00
Terra854 44b842cadf video: expose FFV1 configured alpha before decoding (#2881) 2026-11-21 12:56:43 -05:00
Terra854 69b7468cd3 video: dispatch Motion JPEG through TrackDecoder (#2874) 2026-11-21 12:56:32 -05:00
FredApps f2180e9a9c Merge remote-tracking branch 'origin/next' into HEAD 2026-11-20 12:24:55 +01:00
aiongg b05c1c27f9 Merge storytold main into next (20 Nov sync) 2026-11-20 01:48:18 +00:00
Dylan M. Taylor 106134631c video: add TrackDecoderOptions, with_threads, and set_draft on TrackDecoder (#2461)
* video: add TrackDecoderOptions, with_threads, and set_draft on TrackDecoder (#778)

* fix(video): allow unused opts when decoder features disabled

* video: fix unreachable pattern in TrackDecoder::set_draft and verify inner state on reset

* fix(video): allow irrefutable_let_patterns when single decoder feature enabled

* fix(video): remove nonexistent hevc/av1 Decoder::threads test getters

* style(video): allow clippy::cognitive_complexity in track options test
2026-11-19 20:36:39 -05:00
FredApps ec3a32d0c2 Isolate generated track fixtures per test 2026-11-20 01:15:29 +01:00
FredApps 0290ef624a Include track decoding trials in video integration suite 2026-11-20 00:54:24 +01:00
FredApps b73ad070b2 Merge remote-tracking branch 'origin/next' into perf/2218-video 2026-11-20 00:52:34 +01:00
aiongg 49ffa71e8c Sync follow-ups: rustdoc links in main's new and changed crates
next documents the whole workspace with -D warnings; main does not, so these come in with the
sync:
- craft-gpu: the crate docs link GpuJob::provider_id; ProviderId is not exported.
- craft-gpu-null, craft-gpu-wgpu: GpuContext is in scope, so its links need no explicit target.
- craft-video: TrackDecoder exists only with a decoder feature, so the error docs name it in code.
- craft-plotter: outer's docs name the grid in words; Grid is private.
- craft-develop: best_offset and synthesize are PhotoCraft's and were not ported, so the
  inpaint docs name them in code.
2026-11-19 16:55:34 +00:00
aiongg 2680fefdd8 Sync follow-ups: craft-video's track decoder builds with ffv1, vp8-decode and mpeg2-decode alone; mpegts mux docs quote AV1 field names
next makes craft-media optional in craft-video, and main's track decoder (built with any decoder
feature, now including ffv1 and vp8-decode) imports craft_media::CodecParams. Every feature that
builds the track module now turns on craft-media, as dnx and av1-decode already do.

The AV1 descriptor fields `seq_level_idx[0]` and `seq_tier[0]` are code, so rustdoc no longer
reads `[0]` as an intra-doc link (next's media workflow documents with -D warnings).
2026-11-19 16:32:01 +00: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
FredApps af2b8cfe05 Consolidate video integration tests 2026-11-19 12:56:43 +01:00
alehel 9ef7889f5b craft-video: dispatch ProRes, DNx, APV, FFV1 and VP8 tracks 2026-11-19 10:14:21 +01:00
Aleksander HelgakerandClaude Opus 5.5 2e6f11eabb craft-video: TrackDecoder for H.264, HEVC, VP9, AV1 and MPEG-2 (#1231) (#2022)
* craft-video: TrackDecoder, codec-agnostic decoding for H.264, HEVC, VP9, AV1 and MPEG-2 (#1231)

Add `craft_video::TrackDecoder`, the counterpart of craft-audio's: built
from a track's `CodecParams`, it takes packets in decode order with
their timestamps and returns `VideoFrame`s in display order, with
`flush` and `reset`. Each codec is behind its decoder feature.

Configuration: an `avcC` / `hvcC` record, Annex B parameter sets (AVI
with global headers) or nothing (MPEG-TS) for H.264 and HEVC; the
`av1C` config OBUs for AV1; a sequence header for MPEG-2. Picture data
in the configuration is refused (or, for MPEG-2, dropped by the
decoder's reset). `reset` keeps the configuration: H.264 applies it
again, HEVC and AV1 build a new decoder from it.

A call that fails keeps the frames it finished for the next call.

Add `VideoError` (Unsupported, Malformed, Frame), into which each
decoder's error converts. `av1::decode::bits` becomes `pub(crate)` for
its LEB128 reader.

Tests: unit tests for codec selection, configuration checks, hostile
configuration and kept frames; `tests/track` decodes ffmpeg-made MP4,
MPEG-TS and AVI files and compares with ffmpeg's decode, then decodes
again after a reset and from a later key packet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* craft-video: TrackDecoder review fixes (#1231)

- MPEG-2: configuration is checked before it is decoded. Every start
  code must be a sequence header, extension, user data or GOP header;
  a picture after a valid sequence header was decoded and then dropped
  by a reset, so construction succeeded. It is now Malformed.
- The decode and flush docs and the README say what each codec keeps
  after its own decoding error: H.264 keeps finished pictures, HEVC
  only its newest 32 while calls keep failing, VP9 those of earlier
  packets, MPEG-2 unless the packet made too many, and AV1 drops those
  of the failing decode or flush. Frames that fail to convert are
  still kept for the next call.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 23:25:56 -05:00
aiongg e8e713ee26 Merge storytold main into next (18 Nov sync)
Merges main at 3b8e426a26.

- crates/ui: main's e-sign dialog (crates/ui/src/esign) moves to craft-cloud-ui beside the
  share dialog, behind craft-cloud-ui's esign feature; craft-ui forwards `esign` and
  re-exports the module.
- crates/proof: main's can_suggest_cased goes to affix/check.rs and its tests to
  affix/tests.rs (next split affix.rs); French wiring in lib.rs.
- crates/svg: main's validated resolver and raster validation stay under tree-render, which
  now also enables gif and image-webp; the shared image-codec helpers are gated on tree.
- craft-ai-agents: main's rev (craft-ai-integrations main), one entry.
- crates/craft: facade dependencies, features and re-exports for main's new crates.
2026-11-18 23:07:38 +00:00
el-j 6a41b76ca5 Merge main into feat/video-mjpeg-frame 2026-11-18 19:40:40 +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
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
el-j 8d3cd561a4 craft-video: Motion JPEG frames convert to VideoFrame (#1231) 2026-11-17 10:07:43 +01:00
alehelandClaude Opus 5.5 e0440f9942 video: the VMD decoder is behind vmd-decode, with vmd turning it on
craft-audio names its VMD decoder feature `vmd-decode`, and craft-video
names a codec's decoder `<codec>-decode` wherever the codec may also have
an encoder (mpeg2, mpeg4, vp8…). The video decoder now follows that:
`vmd-decode` gates the module and its VideoFrame conversion, and `vmd`
turns it on, so `vmd` keeps working and an encoder can be added later
without renaming.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 09:39:25 +01:00
alehel 983a32c6e6 Merge remote-tracking branch 'origin/main' into n1460-merge
# Conflicts:
#	crates/video/src/lib.rs
2026-11-17 08:32:17 +01:00
alehelandClaude Opus 5.5 873fc3ecd5 video: the real-file VMD oracle checks that ffmpeg succeeded
real_files_match_ffmpeg waited for ffmpeg without looking at its exit
status, so pictures that matched before ffmpeg failed still passed. It now
asserts success, as the generated-file oracle does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 06:08:45 +01:00
alehelandClaude Opus 5.5 73e6b12930 video: a VMD decoder's picture converts into a VideoFrame
`VideoFrame::try_from(&vmd::Decoder)` looks the picture's palette indices
up in the decoder's palette and gives 8-bit R, G, B planes (matrix 0). The
README and the frame module docs said every decoder's output converts by
moving its buffers; paletted video copies, as VMD keeps only indices.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 04:54:38 +01:00
Dylan M. Taylor 18277c006c test(video): reject short and overlong inflated Screen Video blocks 2026-11-16 22:35:35 -05:00
Dylan M. Taylor 3e0bb788a7 test(video): bound Screen Video output and hostile packet handling 2026-11-16 22:33:39 -05:00
Tanish Manku 8ad90cc70d test(video): retain synthetic partial-block Screen Video fixture 2026-11-16 22:33:12 -05:00
Tanish Manku 5ed5fb9de7 video: extract bounded Screen Video key-frame decoding from AniCraft
Preserves codec algorithm from AniCraft1f3e603b7ff53a3da364e41ec4da8d43dc83aab0 and2b7571363b4b647266df758f95b6e397021cfd4d; neutral frame type and explicit caller limits adapt the shared API.
2026-11-16 22:32:40 -05: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
Aleksander Helgaker 274d562dee craft-video: MPEG-2 encoder, third step: CBR and VBR within the VBV buffer (#1133) (#1767) 2026-11-16 21:31:10 -05:00
Aleksander Helgaker 77f244cb96 craft-video: VideoFrame, a shared frame type for decoder output (#1231) (#1768) 2026-11-16 21:31:05 -05:00
el-j 5ea29f8f05 craft-video: Hap video decoder and encoder (#1519) (#1911) 2026-11-16 21:30:00 -05:00
Dylan M. Taylor 54426ff827 Merge pull request #1858 from dotCooCoo/fix/mjpeg-test-fixed-input
craft-video: the ffmpeg MJPEG round-trip test encodes the same picture every run
2026-11-16 20:01:31 -05:00
Dylan M. Taylor 136c34ae4c ffv1: bound thin-frame border and alpha storage before allocation (#1917) 2026-11-16 14:51:27 -05:00
alehel d4ed32ac8f Merge remote-tracking branch 'origin/main' into pr1460-merge
# Conflicts:
#	crates/media/src/lib.rs
2026-11-16 18:16:58 +01:00
aiongg 2df33d2f01 Merge remote-tracking branch 'upstream/main' into sync/main-1116
# Conflicts:
#	Cargo.lock
#	crates/audio/src/lib.rs
#	crates/exr/src/decode.rs
#	crates/font-catalog/src/lib.rs
#	crates/ps/src/lib.rs
#	crates/svg/Cargo.toml
#	crates/text/Cargo.toml
#	crates/text/src/lib.rs
#	crates/video/Cargo.toml
#	crates/video/src/lib.rs
2026-11-16 14:23:07 +00:00
FredApps ddbe78231b craft-video: pass the packet's Adobe APP14 transform to the MJPEG decoder (#1847)
mjpeg::Decoder called craft_jpeg::decode with no Adobe transform, so a
packet with numeric component ids and APP14 transform 0 (RGB as stored)
was converted as YCbCr and came out in the wrong colours. The decoder
now reads the transform with craft_jpeg::adobe_transform, as the JPEG
image readers do. A regression test injects APP14 transforms 0 and 1;
it fails without the fix.
2026-11-16 07:10:48 -05: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
dotCooCoo a57f393d97 craft-video: the ffmpeg MJPEG round-trip test encodes the same picture every run
we_decode_what_ffmpeg_encodes_to_what_ffmpeg_decodes built its input
with ffmpeg's gradients source, which picks random colors on every run,
so the agreement it measured changed from run to run. On one CI run the
4:2:0 case scored 30.5 dB against the 38 dB floor. The test now writes
the file's own picture(67, 41, 3) as raw RGB and feeds it to ffmpeg
through rawvideo, for both the plain and the default-tables encodes.
2026-11-16 03:21:19 -08:00
FredApps 341020b2c1 Merge pull request #1757 from el-j/feat/video-mjpeg
craft-video: Motion JPEG decoder and encoder (mjpeg)
2026-11-16 11:18:40 +01:00
Dylan M. Taylor 5c91598ccc Merge pull request #1807 from storytold/fix/av1-zero-quantizer
fix(video): preserve explicit rav1e zero quantizer
2026-11-15 23:44:40 -05:00
Dylan M. Taylor f450b5b591 fix(video): preserve explicit rav1e zero quantizer 2026-11-15 22:33:24 -05:00
aiongg 0835e114ca Fix CI lints: samples referenced in every build, missing docs, rustdoc links, deprecated Ui::id, unused manifest dependencies 2026-11-16 03:03:33 +00:00
FredApps f57db543da raw_video: QuickTime RGB24 always uses even-padded rows; only the last row's pad may be missing 2026-11-16 03:12:25 +01:00
FredApps f428f4d3b0 Merge remote-tracking branch 'origin/main' into w1692 2026-11-16 03:12:24 +01: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 252c959167 Merge remote-tracking branch 'origin/main' into feat/video-mjpeg 2026-11-16 02:22:43 +01:00
FredApps c3ad96bfd8 video: honour QuickTime RGB row padding; require BGRX masks for BI_BITFIELDS
Addresses the CodeRabbit review on #1692: odd-width raw RGB rows carry a pad byte,
and BI_BITFIELDS is only BGRX with the matching masks (new from_avi_bitfields).
2026-11-16 02:14:30 +01:00