380 Commits
Author SHA1 Message Date
4DBug 94d79313d4 merge master (ws/apifix) into ws/arch2 2026-10-31 14:25:30 -05:00
4DBug e59f5409a7 merge master (ws/apifix) 2026-10-31 14:25:21 -05:00
4DBug 41c4fbfc6d ws-arch2: containers/Fat (FAT12 / 16 / 32, VFAT long names, MBR partitions, FAT12 floppy writer) + archive/fat (read + floppy write) 2026-10-31 14:25:20 -05:00
4DBug bd696dea1e merge master (ws/apifix) into ws/roblox 2026-10-31 14:25:18 -05:00
4DBug f3299bf70f ws-audio2: music/ult (UltraTracker): it family, two effect columns folded into the IT volume column, sustain loops, auto tone portamento (also from the volume column) 2026-10-31 14:25:08 -05:00
4DBug a1d2e7218c video/fli: FLI / FLC / FLX animations (read)
Header (FLI 1/70 s, FLC ms, depths 8 / 15 / 16 / 24), frame chunks into containers/Demux, open() through the
registry's flic decoder (codecs/video/Legacy/Flic); the ring frame is dropped unless opts.ringFrame. Fixtures
encoded by tools/fixtures/fli.py (every chunk type) with ffmpeg's decode as the reference: bit-exact.
2026-10-31 14:24:29 -05:00
4DBug 6eadacce64 ws-arch2-unix: codecs/compress/UnixCompress (.Z LZW decode + encode, bit-identical to ncompress 5.0: group padding on width changes / CLEAR, ratio-check clears) + archive/z (single-stream, .taz / .tZ -> .tar, writes ncompress's bytes), tests vs ncompress and gzip -d, bench lines 2026-10-31 14:23:51 -05:00
4DBug 4dcb005180 ws-video2-theora: video/ogv, Ogg video (Theora + Vorbis / Opus / FLAC)
Demuxes every logical stream of the first Ogg group into containers/Demux:
Theora (frame times from granules, Xiph-laced headers as track.config, comment
tags in meta.tags), Vorbis / Opus / FLAC audio (headers in track.config) for the
api's openAudio hook; open = Video.open. Sniff claims only Ogg files with a Theora
BOS page. encode remuxes Theora (+ Vorbis / Opus pages from AudioWrap, interleaved
by time). codecs/video/Theora gains info / comment helpers.
2026-10-31 14:22:39 -05:00
4DBug b02e59809f ws-game: archive/mpq (MPQ v1-4 read: hash / block tables, encryption, listfile names, zlib / implode / bzip2 / LZMA / sparse sectors; Huffman / ADPCM UNSUPPORTED); codecs/compress/Explode (PKWARE DCL implode decompressor, binary + ASCII, tested against StormLib); licenses: blast (format reference) 2026-10-31 14:21:34 -05:00
4DBug 672948f7d7 ws-tex: image/dds (read every DXGI / legacy FourCC / bit-mask format, mips, cube, arrays, volumes; write rgba8 / BC1/3/4/5 / 16-bit / float)
New shared codecs: codecs/image/Texel (uncompressed GPU texel formats incl. packed, shared exponent, YUY2),
codecs/image/Texture (dispatch over Bcn / Etc / Texel, surface assembly, mip halving). Tested against
nvcompress / nvassemble / ImageMagick files (Pillow per surface, Godot for BC6H floats), hand-written
formats, and our files read back by Pillow + nvddsinfo.
2026-10-31 14:21:04 -05:00
4DBug f8a26fc699 ws-arch2: archive/adf (Amiga OFS / FFS, intl, dircache; DD / HD; read) 2026-10-31 14:20:36 -05:00
4DBug 8e3873c9fb codecs/video/Legacy: Cinepak, Microsoft Video 1, QuickTime RLE / SMC and FLIC decoders
Registry decoders (codecs/video/Video BUILTIN: cvid, CRAM / MSVC / WHAM, 'rle ', 'smc ', AFLC), rgba8 pictures
painted over the previous picture, palettes from track.palette (or packet.palette). Bit-exact with ffmpeg on
28 AVI / MOV / MKV fixtures (tools/fixtures/legacy.py: ffmpeg's encoders plus encoders in _legacy_mux.py for
QuickTime RLE 1/2/4/8-bit, 8-bit MS Video 1 and Cinepak). Also fixes QtPalette's big-endian reads.
2026-10-31 14:20:17 -05:00
4DBug ea9c0b36df ws-roblox: codecs/model/Rbx (RbxTree, typed values, CFrame rotation ids, binary property columns), model/rbxm (binary rbxm / rbxl read + write; LZ4 / Zstd / raw chunks; unknown chunks and property types round trip raw), model/rbxmx (XML rbxmx / rbxlx read + write); tests vs rojo 7.7 + lune 0.11 both ways
init.luau: KIND_CATEGORY gains rbxtree = model (F.save of an RbxTree finds the model category).
2026-10-31 14:19:46 -05:00
4DBug 967b91db91 ws-audio2: WavPack: codecs/audio/WavPack (port of WavPack 5.9.0's decoder, BSD) + audio/wavpack
Lossless and hybrid (lossy, and lossless with the .wvc via opts.correction / opts.resolve), 8-32 bit int (int32 modes,
wvx) and 32-bit float, 1-8+ channels, every decorrelation pass, joint stereo, cross decorrelation, noise shaping,
block CRCs; APEv2 tags; sample-accurate seeking. 58 fixtures (wavpack -f..-hhx6, ffmpeg) bit-exact against wvunpack.

codecs/audio/Stream (shared, backward compatible): Stream.packets takes optional spec.scale (read() writes pcm values
times scale) and spec.ints (adds dec:readInt for bit-exact integer reads).
2026-10-31 14:19:23 -05:00
4DBug 80f5fd2c5b ws-audio2: music/stm (Scream Tracker 2): s3m family with the ST2 tempo byte, deferred Bxx, no effect memory 2026-10-31 14:19:23 -05:00
4DBug a43d81538e ws-3d3: model/3ds (Autodesk 3D Studio) read + write
Meshes (smoothing-group normals, uvs, mesh matrix, per-face materials), Phong
materials with texture maps (uri), cameras, lights, the keyframer (hierarchy,
pivots, instances, dummies, position / rotation / scale / camera tracks ->
one animation). Writer: objects, materials, cameras, lights, keyframer.
Tested against assimp (test models, its 3DS exporter, and reading our files).
2026-10-31 14:19:08 -05:00
4DBug 4f05c89f01 ws-3d3-b: model/x (DirectX .x read: text, binary, MSZIP tzip / bzip, 32 / 64-bit floats; frames, meshes with normals / uvs / colours, materials and textures, skins, animation sets); assimp's test models plus bin 0064 / tzip variants match assimp's counts, bones, animations and world bounds 2026-10-31 14:17:28 -05:00
4DBug 8183f4d2d7 ws-video2-theora: codecs/video/Theora, a Theora decoder (port of libtheora 1.2.0, BSD)
Headers (identification, comment via VorbisComment, setup: loop-filter limits,
quant ranges -> dequant tables, the 80 Huffman trees as collapsed lookup tables),
intra / inter frames, coded SB / block flags, MB modes (8 alphabets), MVs (VLC /
CLC, last / prior, 4MV with per-format chroma averages, half / quarter-pel),
block qi, DCT tokens with EOB runs, DC prediction, the spec IDCT, loop filter,
golden / previous refs, 4:2:0 / 4:2:2 / 4:4:4, picture-region crop, empty-packet
dupes. Bit-exact with ffmpeg on every frame of 12 fixtures (tests/codecs/theora).

Outside the folder: codecs/video/Video BUILTIN entry theora gets a decoder
(track.config = Xiph-laced headers, as Matroska's CodecPrivate);
licenses/libtheora-BSD.txt + NOTICE row.
2026-10-31 14:16:35 -05:00
4DBug 5ca22c4431 ws-arch2: archive/d64 (C64 D64 / D71 / D81 read + write, PETSCII names as c1541) 2026-10-31 14:15:12 -05:00
4DBug 8b94584d0f ws-arch2-unix: archive/rpm (lead, signature + main headers, file list from dirnames / basenames, payload gzip / bzip2 / xz / lzma / zstd / none decompressed lazily via codecs/compress, cpio via containers/Cpio; meta.rpm), tests vs rpmbuild / rpm -qp / rpm2cpio; containers/Cpio.TYPE_OF 2026-10-31 14:14:56 -05:00
4DBug 9a6ddd5c16 ws-3d3: codecs/model/Draco: Draco decoder (port of Google Draco 1.5.7, Apache-2.0)
Meshes (sequential; Edgebreaker standard / predictive / valence, topology splits,
attribute seams) and sequential point clouds, bitstreams 1.0 - 2.2; generic /
integer / quantization / octahedral normal attribute decoders; difference,
parallelogram, multi and constrained multi-parallelogram, tex coords (deprecated
and portable, exact int64 arithmetic) and geometric normal predictions; metadata.
Byte-exact against libdraco on 196 files (Draco test data 0.9 - 2.2 and
draco_encoder outputs at every level / quantization). kd-tree point clouds:
UNSUPPORTED for now.
2026-10-31 14:14:50 -05:00
4DBug 22615b503e ws-audio2: audio/mpc + codecs/audio/Musepack: Musepack SV7 / SV8 decoding (libmpcdec r475 port, BSD)
Gapless (synthesis delay, SV8 leading silence, SV7 last frame length), seeking (SV8 by packet with one packet of
pre-roll: exact; SV7 by frame with 32 frames of pre-roll like libmpcdec), APEv2 tags via codecs/audio/ApeTag (merged
from ws/audio2-lossless), ID3v2 skipped. Fixtures build mpcenc / mppenc / a float libmpcdec dumper from the pinned
upstream tarballs through nix; 132-140 dB SNR vs libmpcdec float, 82.7 dB vs ffmpeg's s16 decode.
2026-10-31 14:14:29 -05:00
4DBug 5bbb4227c2 ws-apifix: API.md / STYLE.md / README: music as audio, video as animated image, F.save extra files, variant(r), caps.extraFiles, F.music builder, bitrate in bit/s; type baseline 92 2026-10-31 14:14:11 -05:00
4DBug 33d87e0c4d ws-audio2: music/669 (Composer 669 / UNIS 669): s3m family with Hz periods, fast + auto slides, frequency adjust, per-pattern speed and break rows 2026-10-31 14:13:48 -05:00
4DBug 6274eedd12 ws-apifix: MP4 AAC length matches ffmpeg: the edit list's length (Track.playDuration) cuts the end padding as well as the priming (codecDelay); a 1 s clip decodes to 44100 frames, not 45056. AudioWrap.trim(dec, skip, length?); the MP4 writer keeps the edit length of copied audio. Video tests compare the whole decoded audio length with ffmpeg (not yet for Matroska) 2026-10-31 14:13:08 -05:00
4DBug 998177e5ab ws-voxel: codecs/text/Nbt (NBT Java / Bedrock / network varint, SNBT parse + print, typed values), data/nbt, data/snbt
Shared change: codecs/compress/Deflate gains Deflate.peek(buf, off, len, n) (the first n inflated bytes of a
gzip / zlib / raw stream, for sniffing gzip-wrapped NBT) through a backward-compatible prefix flag on
Inflate.raw; gunzip's header parsing moved into a local helper both use.
2026-10-31 14:12:46 -05:00
4DBug 384cdc407d ws-audio2: music/mtm (MultiTracker) on the tracker engine; engine: m.engine family, m.preamp, flags (periods amiga/hz, fastPortas, autoTonePorta, autoReset, st2Tempo, oktSlides), extension effects (note slides, auto portamento, frequency adjust), codecs/audio/Tracker/Load helpers (OpenMPT BSD)
Engine changes are backward compatible: m.engine defaults to m.format; the channel / sample / instrument
global volumes now apply in every family (defaults leave MOD / S3M / XM unchanged); mod/s3m/xm/it tests green.
2026-10-31 14:11:20 -05:00
4DBug 3243291877 ws-arch2: archive/binhex, archive/macbinary (I / II / III), archive/applesingle (AppleSingle / AppleDouble v1 / v2), read + write, over the new containers/MacFile (fork convention, Mac OS Roman names, 1904 dates) 2026-10-31 14:11:03 -05:00
4DBug 363b14932f ws-audio2: codecs/audio/Adpcm (IMA / ima4 / IMA WAV / MS / ADX / PS-ADPCM / DSP decode, IMA + MS encode, Decoder layouts) and audio/adpcm (raw streams)
- codecs/audio/Adpcm: decoder kernels bit-exact with ffmpeg (IMA, ima4, MS) and vgmstream (ADX, PS-ADPCM, DSP);
  IMA nibble / IMA WAV / MS block encoders. Adpcm/Decoder: streaming Decoders over the shared layouts (channel
  interleaved frames, nibble streams, self-contained blocks) with exact seeking through state snapshots.
- audio/wav: its IMA / MS block decoders moved to codecs/audio/Adpcm (wav tests unchanged and green).
- codecs/audio/Stream (shared, small and backward compatible): pcm() may return a buffer of f32 (copied with
  buffer.copy) instead of a table.
- audio/adpcm: headerless ima / ima_wav / ms / ima_qt / psx streams by options; encode ima / ima_wav / ms.
- licenses: vgmstream (ISC).
2026-10-31 14:10:23 -05:00
4DBug 34d0600109 ws-game: archive/vpk (Valve VPK v1 / v2 read incl. multi-part via opts.resolve / opts.files, preload, CRC checks; single-file v1 / v2 write with MD5 section) 2026-10-31 14:09:50 -05:00
4DBug 848e4bfff6 ws-audio2: AHX and HVL (music/ahx, music/hvl) over codecs/audio/Hively, a port of hvl2wav's replay.c (BSD-3): bit-exact vs hvl2wav 2026-10-31 14:09:29 -05:00
4DBug be643a66c8 ws-tex: codecs/image/Etc (ETC1, ETC2 RGB/RGBA/RGB A1, EAC R11/RG11 decode)
Written from the Khronos Data Format Spec 1.3. Exact against Godot 4 (etcpak) for ETC1 / ETC2 in every mode,
EAC unsigned within 1 (8-bit rounding); RGB A1 checked as punch-through rules over Godot's ETC2 RGB decode;
signed EAC against the spec rule in the fixture generator.
2026-10-31 14:09:27 -05:00
4DBug 07f70f70d5 ws-arch2-unix: archive/ar (GNU / SysV long names + symbol tables, BSD #1/ names + __.SYMDEF; GNU / BSD writer) with .deb (meta.payload = data.tar.*, meta.control from control.tar.* via codecs/compress + containers/Tar), tests vs GNU ar (byte-identical), llvm-ar, bsdtar, dpkg-deb 2026-10-31 14:09:08 -05:00
4DBug ac47545aa3 ws-apifix: one bitrate unit: every encoder's bitrate option is bit/s (MP3 now too), values below 1000 are kbit/s (the old MP3 values keep working; Opus accepts them too); the MP3 Decoder's bitrate field is bit/s as the Decoder contract says (was kbit/s) 2026-10-31 14:06:51 -05:00
4DBug 5ec3121f65 ws-game: archive/wad (IWAD / PWAD read + write; lumps with namespaces and maps; flats / pictures / composed textures as Images via PLAYPAL; maps as Scenes: triangulated sector floors / ceilings, walls with vanilla alignment, things); codecs/model/Polygon (2D polygons with holes -> triangles); licenses: Freedoom (fixture source only) 2026-10-31 14:05:53 -05:00
4DBug 29be8113b4 merge ws/game af4488d (codecs/model/Rig) for the IQM / X skins and animations 2026-10-31 14:05:51 -05:00
4DBug 4c74171631 ws-3d3: model/pmx: MikuMikuDance PMX 2.0 / 2.1 and PMD 1.0 reader (weights, materials, bones + skin, vertex morphs -> targets, other morphs / physics in extras); tests against assimp and synthetic models 2026-10-31 14:04:40 -05:00
4DBug 1aaf8fce68 ws-3d3-b: model/lwo (LightWave LWO2 / LWOB / Modo LXOB read: layers with pivots and parents, polygons, VMAP / VMAD uv / colour / normal / weight / morph maps, surfaces and image blocks); 54 assimp test models match assimp's counts, materials and world bounds 2026-10-31 14:03:52 -05:00
4DBug 2f0ff81c95 ws-apifix: an outline font saved as BMFont writes its pages (opts.files; without a destination F.save returns them as a third value { [page file] = PNG bytes }; caps.extraFiles); pages named after the destination 2026-10-31 14:03:45 -05:00
4DBug a05199c34d ws-arch2-unix: containers/Cpio (newc / crc / odc / old binary both endians read; newc / crc / odc write; hard links, symlinks, devices) + archive/cpio (any Archive -> cpio), tests vs GNU cpio (byte-identical re-encode) and bsdtar 2026-10-31 14:02:43 -05:00
4DBug 07dc6f7e84 ws-3d3-d: model/b3d (Blitz3D read: brushes, textures, node tree, skins, keyframe animation; LH -> RH) 2026-10-31 14:00:57 -05:00
4DBug fe44292f58 ws-arch2: archive/yenc (yEnc 1.3 read incl. multi-part in one text, write; CRC checks) 2026-10-31 14:00:46 -05:00
4DBug d73b93c740 ws-apifix: videos save as animated images (F.save(video, gif | apng | webp), F.convert(avi, "gif"): frames / fps / maxFrames (300) / maxPixels (2^25)); VideoFrame.index restarts at the seek position; F.detect names WebM files "webm"
api: encoderFor finds image formats for a VideoDecoder, videoToImage() collects the frames; F.detect asks a
format's optional variant(r) for a more precise name (video/mkv: Mkv.variant, from Parse.docType).
codecs/video/Video: index after seek = round(pts * frameRate) + 1.
2026-10-31 14:00:36 -05:00
4DBug 8cdb65367a ws-arch2: archive/uu (uuencode / xxencode / base64 blocks, read + write), core/Crc16 (ccitt / arc), Archive.files helper, shared fixture helpers (_arch2.py / _arch2_ours.luau) and tests/archive/_entries.luau
core/Crc16 is new (CRC-16/XMODEM for BinHex / MacBinary, CRC-16/ARC for LHA / Zoo). containers/Archive gains
Archive.files(value, name?) (additive).
2026-10-31 13:58:54 -05:00
4DBug 4dd6cd1400 ws-audio2: move music/midi/Render to codecs/audio/MidiRender (attach: summary + render method, shared by the MIDI variants); .kar lyrics -> meta.lyrics / karaoke / tags 2026-10-31 13:57:25 -05:00
4DBug cf737746d4 ws-video2: Dsp header 2026-10-31 13:56:33 -05:00
4DBug eac069f7dc ws-game: archive/grp (Build engine GRP read + write) 2026-10-31 13:56:30 -05:00
4DBug 10bd6b021f ws-apifix: music is audio (F.save / F.convert of a Module or Midi to an audio format renders it, render options from opts; F.audio.open / load render music bytes), F.music builder (ops/MusicOps: new, addPattern, setCell / getCell, addSample, addInstrument, note; also F.ops.music), MIDI writer writes track.name as a 0x03 event
api (init.luau): detectFor() falls back from audio to rendering music formats; encoderFor finds audio formats for
music values; renderMusic() through codecs/audio/Tracker or music/midi render.
2026-10-31 13:56:21 -05:00
4DBug 5af4aa361e ws-game: codecs/model/Rig (morph targets + weights animations, skeletons + skins, influences, joint TRS animations for the game model formats); codecs/image/Pixels.palette (RGB / BGR triples -> u32 palette; additive) 2026-10-31 13:54:43 -05:00
4DBug 8057a1a323 Merge commit 'ba4b20e' into ws/arch2-unix 2026-10-31 13:54:28 -05:00