Commit Graph
2380 Commits
Author SHA1 Message Date
FredApps ac1fc5cea8 Merge remote-tracking branch 'origin/main' into xmlattr 2026-11-16 00:00:18 +01:00
FredApps 17f402798e xml: compare strict expanded attribute names by namespace id, not a URI copy
A declaration's URI was copied once per attribute that used it, so one long URI
and many attributes multiplied memory. Give each binding an id (shared by equal
URIs, found once at declaration) and key expanded names by that id.
2026-11-16 00:00:18 +01:00
FredApps 3d519f66d2 Merge pull request #1740 from storytold/fix/ps-reencoded-fallback
ps: preserve reencoded glyph names in fallback fonts
2026-11-15 23:59:03 +01:00
FredApps 6909f21a85 Merge pull request #1650 from storytold/codex/shared-control-envelope
Share bounded legacy control envelopes
2026-11-15 23:58:51 +01:00
Dylan M. Taylor bea6ed1ff0 Merge pull request #1633 from storytold/extract/plist-xml
Share bounded XML property-list reader from Craft Anything
2026-11-15 17:58:08 -05:00
FredApps 3a4aecf38c Merge pull request #1698 from storytold/codex/svgz-member-integrity
Reject damaged later SVGZ members
2026-11-15 23:57:14 +01:00
FredApps 643ea04216 Merge pull request #1678 from storytold/codex/webp-canvas-validation
Validate WebP decoder canvas before allocating frames
2026-11-15 23:57:02 +01:00
FredApps cb3551ad3f Merge pull request #1680 from storytold/fix/jls-low-bit-budget
Fix JPEG-LS low-precision scaling and scan allocation limit
2026-11-15 23:56:48 +01:00
FredApps e42b9e1696 Merge pull request #1731 from storytold/codex/obj-compat-options
Expose compatible OBJ read options
2026-11-15 23:55:19 +01:00
FredApps 3a8c6aef3e Merge pull request #1730 from storytold/codex/obj-stream-bounds
Bound OBJ face and continued-line parsing
2026-11-15 23:54:59 +01:00
FredApps ba0ddffcbb Merge pull request #1716 from storytold/codex/fbx-parent-policy
Allow FBX object-only and last-parent hierarchy policies
2026-11-15 23:54:20 +01:00
FredApps 4b1eb33a5b Merge pull request #1713 from storytold/codex/fbx-strict-geometry
Support strict FBX geometry and final polygons
2026-11-15 23:53:56 +01:00
FredApps b464072bae Merge pull request #1710 from storytold/codex/fbx-rotation-options
Allow FBX pre and post rotations without the active flag
2026-11-15 23:53:27 +01:00
FredApps 254e9a409b Add craft-deckcraft-format: the .deckcraft package layer from DeckCraft (#1748)
The package layer of DeckCraft's native format, moved from storytold/deckcraft
crates/format at 0d5c0b85 (lib.rs, finite.rs): the mimetype and legacy
SlideCraft type, sniffing, the presentation.json envelope (generic over the
app's presentation), the NaN-safe JSON writer (Finite), the reader that patches
null numbers in older files, member names and compression choice, and the
bounded, budget-charged member reads with the format's limits.

The presentation model, repair, media and chart-part mapping, and outline/RTF
stay in DeckCraft. Writes go through craft-zip's deterministic writer; the
consumer's golden test shows the package bytes are unchanged.

Part of #778.
2026-11-15 23:44:31 +01:00
FredApps 59b4f1e8c2 image-codecs: decode AVIF pixels with the pure-Rust AV1 decoder (#778) (#1601)
* image-codecs: decode AVIF pixels with craft-video's pure-Rust AV1 decoder

New optional `avif-decode` feature (native targets) reads still AVIF
files: the HEIF/ISOBMFF item graph, grids, clap/irot/imir, alpha
auxiliary images (including premultiplied), 8/10/12-bit 4:0:0, 4:2:0,
4:2:2 and 4:4:4, nclx/ICC colour, Exif and XMP, and PQ/HLG to linear
F32 through cicp::linearize as the HEIF path does.

The container walk follows LightCraft #3017 by @emmertex. Every size is
checked against the caller's Limits before the AV1 decoder runs, the
decoder's memory budget is capped by max_alloc, and the decode is
wrapped in catch_unwind so a decoder panic becomes an error.

Fixtures are tiny ffmpeg/libaom files; the 4:2:0 planes match libdav1d
bit for bit. Adds a decode_avif fuzz target.

Part of storytold/craft-libs#778.

* image-codecs, video: address review on the AVIF decoder

- clap: width and height are unsigned fractions, the offsets have signed
  numerators, so 0x80000000/0x40000000 is a width of 2, not -2.
- An item with clap, irot or imir more than once (repeated ipma records)
  is refused before any canvas work, instead of rotating 261120 times.
- Matrix coefficients 10 (BT.2020 constant luminance) is refused rather
  than converted with the non-constant-luminance equations.
- An alpha plane whose own transforms differ from the colour's is refused
  rather than composed in the wrong place; none, or the colour's, still
  decode.
- craft-video: Decoder::set_shown_budget lowers the per-chunk byte cap on
  shown pictures (never above 1 GiB), and the AVIF decoder sets it to
  max_alloc, so a payload of many shown pictures is refused before they
  are built.
2026-11-15 23:25:25 +01:00
Dylan M. Taylor 9b5b517b42 Merge pull request #1759 from storytold/fix/raw-lj92-writer-tile-budget
raw: bound lossless-JPEG DNG writer tile padding
2026-11-15 17:22:33 -05:00
Dylan M. Taylor 040b5202f9 Merge pull request #1743 from storytold/extract/psd-unicode-names
psd: share borrowed Unicode channel-name record framing
2026-11-15 17:04:49 -05:00
Dylan M. Taylor 4ce781dab2 Merge pull request #1738 from storytold/extract/usd-crate-codec
Extract bounded USD Crate LZ4 decompression
2026-11-15 17:04:17 -05:00
Dylan M. Taylor b841da4124 Merge pull request #1737 from storytold/extract/psd-channel-resources
psd: share DisplayInfo and alternate spot-color raw records
2026-11-15 17:01:58 -05:00
Dylan M. Taylor 272a095b61 Merge pull request #1735 from storytold/extract/icc-v2-matrix
cms: share bounded ICC v2 matrix/TRC profile writer
2026-11-15 17:01:18 -05:00
Dylan M. Taylor f7e0d7fd55 Merge pull request #1736 from storytold/fix/stream-codecs-vendored-jbig2
Fix external stream-codecs consumers to retain bounded JBIG2 decoder
2026-11-15 17:00:31 -05: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
Dylan M. Taylor fba532b6b2 Merge pull request #467 from AxylumRust/refactor/i18n-clippy-pedantic
i18n: satisfy Clippy pedantic lints
2026-11-15 16:45:48 -05:00
Dylan M. Taylor f494b2d3b1 Merge pull request #1332 from AxylumRust/docs/dxf-configured-tag-limit
docs(dxf): describe configurable tag limit
2026-11-15 16:36:32 -05:00
Dylan M. Taylor f12249ba7d Merge pull request #1346 from AxylumRust/refactor/dwg-clippy-pedantic
refactor(dwg): apply behavior-preserving cleanups
2026-11-15 16:35:58 -05:00
Dylan M. Taylor 506d093a61 Merge pull request #1283 from AxylumRust/test/prc-compressed-validation
craft-prc: validate compressed tessellation reconstruction (#778)
2026-11-15 16:35:34 -05: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
Dylan M. Taylor da591dc6b2 fix(raw): bound LJ92 writer tile padding before allocation 2026-11-15 16:21:37 -05: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
Dylan M. Taylor 589842f0da Merge pull request #1702 from storytold/extract/psd-guides-v2
craft-psd: share Grid and Guides v2 record decoding
2026-11-15 15:18:52 -05:00
9d56699be8 psd: share borrowed Unicode channel-name record framing
Extract framing from PhotoCraft 16941f7198da9ae1811a8928f4c256b5cb37c1cb, retaining the overflow protection added by 3b45e8baee7117e53847523b5bc3ae2b337966d4. Allocation-free adaptation leaves text policy with callers.

Co-authored-by: Valentin Klein <vangel1976@googlemail.com>

Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>
2026-11-15 15:08:20 -05:00
Dylan M. Taylor 808730f49b ps: preserve reencoded glyph names in fallback fonts 2026-11-15 14:57:56 -05:00
bflatastic 556d02941a Extract bounded USD Crate LZ4 decoding from TextureCraft
Source: storytold/texturecraft bdbb52c9b66b221a55b370105b42f485a76e6fc7. Preserve chunk framing and output cap policy, with fallible allocation and checked offsets.
2026-11-15 14:49:24 -05:00
5e2bc54a48 psd: share raw channel display and alternate spot records
Port raw framing from PhotoCraft f7f8fdcd89 and 9a390661b5; preserve tolerant import semantics and keep colour policy with consumers.

Co-authored-by: Khawar Zamman Wani <wanikhawar@gmail.com>
Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>
2026-11-15 14:38:21 -05:00
Dylan M. Taylor 201601fa2d Fix external stream-codecs consumers to use bounded vendored JBIG2 2026-11-15 14:31:01 -05:00
SteamSmithandbflatastic 6c09292724 cms: share bounded ICC v2 matrix-profile serialization
Extract the TextureCraft writer originally introduced in 59f0ab48508e2dc5a812acd1aee00d5d59a528d8, retaining caller colour and timestamp policy. Preserve the is_multiple_of cleanup from 59a3018.

Co-authored-by: bflatastic <bflat@storyteller.ai>
2026-11-15 14:27:36 -05:00
Dylan M. Taylor 7d39dc4df2 Merge pull request #1145 from vangel76/feat/mxf-cinemadng
MXF: CinemaDNG pictures can be read and written
2026-11-15 14:22:04 -05:00
Dylan M. Taylor 316d40376e Keep OBJ declaration groups across smoothing changes 2026-11-15 19:19:15 +00:00
Dylan M. Taylor 2ee29d87b5 Preserve repeated OBJ group declarations 2026-11-15 19:18:54 +00:00
Dylan M. Taylor 284b0d815b Expose compatible OBJ read options 2026-11-15 19:15:02 +00:00
Dylan M. Taylor 40b9b7ef45 Bound OBJ face and continued-line parsing 2026-11-15 19:13:32 +00:00
Dylan M. Taylor 654e8d55e1 Merge pull request #1611 from storytold/codex/bento-public
aaf: expose bounded Bento container access
2026-11-15 14:11:15 -05:00
Dylan M. Taylor cae7c1d8a6 Share Samsung SEF repair and JPEG EOI inspection (#1640)
* Expose tolerant JPEG marker inspection

* Export JPEG inspection API

* Factor JPEG inspection fields from shared walker

* Share ICC chunk collection between JPEG inspection modes

* Cover JPEG MPF and gain-map inspection

* Expose MPF index inspection for located payloads

* Cover located MPF index parity

* Preserve bounded MPF index directory validation

* Share Samsung SEF repair and JPEG EOI inspection

* Cover JPEG scan byte search
2026-11-15 13:57:49 -05:00
Dylan M. Taylor 27b1134e23 Share Opus FFT and CELT allocation primitives 2026-11-15 18:57:27 +00:00
Dylan M. Taylor ea178b2d1c Merge branch 'codex/fbx-strict-geometry' into codex/fbx-parent-policy 2026-11-15 18:54:20 +00:00
Dylan M. Taylor ce5f671c22 Fix strict FBX geometry clippy warning 2026-11-15 18:54:08 +00:00
Dylan M. Taylor e7c96161dd Share JPEG marker and MPF index inspection (#1634)
* Expose tolerant JPEG marker inspection

* Export JPEG inspection API

* Factor JPEG inspection fields from shared walker

* Share ICC chunk collection between JPEG inspection modes

* Cover JPEG MPF and gain-map inspection

* Expose MPF index inspection for located payloads

* Cover located MPF index parity

* Preserve bounded MPF index directory validation
2026-11-15 13:51:53 -05:00
Dylan M. Taylor 39b7076b04 Allow object-only FBX hierarchy connections 2026-11-15 18:50:08 +00:00
Dylan M. Taylor 818f05566e Allow last FBX parent connection to win 2026-11-15 18:43:10 +00:00
Dylan M. Taylor 357dc3fb73 Support strict FBX geometry and final polygons 2026-11-15 18:37:23 +00:00