Commit Graph
303 Commits
Author SHA1 Message Date
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
4DBug 1ed25296ba ws-roblox: codecs/compress/Lz4 (LZ4 block decode + encode, decodeInto with history for linked blocks), tests vs python-lz4 both ways, bench line 2026-10-31 13:53:23 -05:00
4DBug d41d64219a ws-game: archive/pak (Quake PACK / SiN SPAK read + write); containers/Archive: slice() lazy loader and collect() for simple archive writers (additive) 2026-10-31 13:52:17 -05:00
4DBug 51117f9732 ws-arch2: groundwork: Types.BitmapStrike / BitmapGlyph + Font.bitmap (optional field), codecs/font/Bitmap (bitmap Font value, strike of any font, 1-bit row pack/unpack), api unwrap of meta.payload entries (a .deb loads as its data.tar.*; meta.container / meta.outer)
Types.luau: additive only (new optional Font field and two new types). init.luau: unwrap() also follows
meta.payload = <entry name> on non-stream archives; stream behaviour unchanged.
2026-10-31 13:51:09 -05:00
4DBug 25d8e4ff25 ws-apifix: F.ops.layers.flatten applies the mask of a passThrough group (codecs/image/Blend lerp takes a mask) 2026-10-31 13:50:05 -05:00
4DBug fca79bd858 ws-docs: guide pages cad, font, layered, music, playlist, subtitles, tilemap, video; runnable examples per category; README converting note 2026-10-31 13:25:10 -05:00
4DBug db81f73acf ws-docs: recipes: MIDI render, glTF to OBJ, vox greedy mesh, zip, CSV, SVG to PNG, TTF bake to BMFont, drawing text 2026-10-31 13:18:01 -05:00
4DBug 0552f0ebf8 ws-docs: guide pages archive, audio, data, image, scene, vector; recipes (first part); docs input generators 2026-10-31 13:16:12 -05:00
4DBug 001e746305 ws-docs: docs/guide/README.md (installing, inputs, detection, errors, options, saving, converting, hosts); LÖVE example: SVG tile, GIF played as a video with a per-update decode budget 2026-10-31 13:09:04 -05:00
4DBug 9941113b7b ws-cleanup: audio codecs out of the format folders (codecs/audio/Opus, Vorbis, Flac, Mpa)
The decoders / encoders are libraries, not the file format: audio/opus/{Celt, CeltTables, CeltEncoder, Mdct, Packet,
Silk, SilkTables, Decoder} -> codecs/audio/Opus; audio/vorbis/{Codebook, Packet, Setup, Tables} ->
codecs/audio/Vorbis; audio/flac/{Frame, Encode} -> codecs/audio/Flac; audio/mp3/{Core, Tables, Header, Encode2,
Encode3, EncTables, Analysis} -> codecs/audio/Mpa (tools/move.py; code unchanged). Each gets an index init.luau.
The format folders keep the file mapping: Ogg Opus / Ogg Vorbis (headers, granules, seeking, the Vorbis encoder's
Ogg writer), native / Ogg FLAC streams and metadata, ID3 / Xing / the MP3 frame index. docs: STYLE says a codec is
not the format. Full suite: 248 runs pass on both runtimes, lint green.
2026-10-31 12:47:02 -05:00
4DBug 44a599f00c ws-cleanup: codecs/compress/PackBits; UTF-16 and half floats from one place
- codecs/compress/PackBits (new, from image/tiff/Pixels): decode (lenient count + a clean flag for strict callers)
  and encode; image/tiff and layered/psd (which carried its own decoder) use it. tests/codecs/packbits.
- codecs/text/Text.utf16(buf, offset, length, bigEndian?): the UTF-16 -> UTF-8 conversion codecs/font/TrueType,
  archive/7z and layered/psd each wrote (lone surrogates -> U+FFFD everywhere now).
- image/tiff/Pixels and data/cbor use core/Bytes.half instead of their own float16 decoders.
2026-10-31 12:28:33 -05:00
4DBug 51b08575c4 ws-cleanup: codecs/ grouped by domain; containers/Chunks, codecs/audio/Stream, codecs/image/Pixels, codecs/model/Mat4
C2, the hierarchy (tools/move.py, every reference rewritten mechanically):
- codecs/compress: Deflate Lzma Zstd Brotli Bzip2 Lzw; codecs/entropy: Huffman (from core) RangeCoder;
  codecs/image: Jpeg Dct Vp8 Vp8L Yuv Quantize Raster Blend Pixels; codecs/audio: Mdct Aac Alac Pcm Resample
  VorbisComment Tracker SoundFont Stream; codecs/video: H264 Mpeg1 Video; codecs/text: Json Xml Text Url;
  codecs/font: TrueType Cff; codecs/model: MeshFlatten Mat4. containers/ stays flat; core/ keeps Bytes Bits Err
  Crc32 Adler32 Base64 Md5 Input Sniff.
- LAYERS lint: codecs must sit in a domain folder; gen_registry lists codecs by domain (docs/FORMATS.md).
- Checked: build.py both targets, rojo build of build/roblox, the full suite on both runtimes.

C3, generic code out of format folders:
- containers/Chunks (new): the chunked-file walker (RIFF / RIFX / IFF / PNG / CAF layouts: endianness, size first,
  trailer, padding, lenient missing pad, open-ended ids, size hooks). containers/Riff walks with it (RF64 ds64
  through the resize hook); image/png, audio/aiff and audio/caf list their chunk handlers over it.
- codecs/audio/Stream (new): Stream.packets, the packet-decoder Decoder (read / seek with pre-roll / position,
  priming and end trimming) that aac, caf and m4a each carried (~70 lines each).
- codecs/image/Pixels: image/bmp/Pixels promoted (+ rgb555); image/ico's DIB decoder uses its row loops instead of
  its own (the AND mask / alpha rule stay ICO's).
- codecs/model/Mat4 (new): matrices / quaternions / TRS shared by FBX (Xform keeps only the FBX transform model),
  Collada (Math keeps only <lookat> / <skew>) and USD (its matrix helpers and general 4x4 inverse); Mat4.mul is
  Types.Scene.mul. The Collada normal matrix is now the inverse transpose (it was the inverse; same result for the
  fixtures' bind shapes).
- README rewritten (install for Rojo and LÖVE / LuaJIT, quick start per category, F.* and F.ops, host notes:
  FORMATS_NO_JIT_TUNE, paths, layout); docs/STYLE.md: the codec domains, "what belongs in a format folder" with the
  shared building blocks and the DUP rule, conventions (WAVE order, lower-case tags, loops, the api hooks
  decodeImage / encodeImage / openAudio / plugins / resolve, the codecs/video/Video registry), Err.from, the type
  baseline. New tests: tests/containers/chunks, tests/codecs/mat4. Type baseline 93.
2026-10-31 12:25:03 -05:00
4DBug 6b26845afe ws-cleanup: merge master (ws/h264) 2026-10-31 11:12:11 -05:00
4DBug 45bb5f9b95 ws-cleanup: F.ops facade (image / mesh / layers / audio / vector.rasterize) and ops/AudioOps
- F.ops in init.luau, loaded on first use: F.ops.image (ImageOps), F.ops.mesh (MeshOps), F.ops.layers (LayerOps),
  F.ops.audio (new ops/AudioOps), F.ops.vector.rasterize (the vector/svg renderer for any Vector, through F.format).
- ops/AudioOps: toAudio / fromDecoder (Audio from a Decoder via codecs/Pcm), gain / gainDb / normalize, peak / rms,
  remix / downmix / upmix (WAVE-layout matrices, BS.775 coefficients normalised against clipping), resample
  (codecs/Resample), trim, concat and mix (inputs converted to the first one's rate and channels), fade.
- tests/ops/audioops (39 checks, both runtimes); docs/API.md (new): the F.* API, F.ops, hooks, host.
2026-10-31 11:06:04 -05:00
4DBug c0eafd29a5 ws-cleanup: consistency (lower-case tags, WAVE channel order, loops = play count, Err messages, caps)
- Audio tags keys are lower case everywhere (Types.Tags): FLAC no longer returns TITLE / ARTIST (the raw fields stay
  in meta.source.comments; also for Vorbis and Opus); Vorbis / Opus / FLAC read and write tags through
  codecs/VorbisComment (TRACKNUMBER -> track, DISCNUMBER -> disc, DESCRIPTION -> comment); MP3 albumArtist ->
  albumartist and year -> date (ID3 TYER / TDRC, ID3v1); RIFF INFO / CAF / MP4 freeform names are lower-cased (MP4
  writes iTunSMPB / iTunNORM back in their usual spelling; m4a reads tags.itunsmpb).
- Channel order: Vorbis (and Opus mapping family 1) decode to WAVE order like FLAC / WAV / AAC (both used to return
  the Vorbis order); the Vorbis encoder takes WAVE order and writes Vorbis order. Pcm.WAVE_FROM_VORBIS / Pcm.reorder;
  Vorbis.packetDecoder gives pd.order. Tests reorder oggdec's / opusdec's raw (Vorbis-order) references.
- img.loops is the play count in GIF, APNG and WebP (they already agreed; Types / WebP docs said "loop count");
  tests/api round-trips loops 0 / 1 / 3 through all three.
- Err: messages without the format name (png / midi encoders said "png encode: ..."); codecs/Bzip2 and codecs/Zstd
  check arguments through Bytes.span.
- caps: mp3 encodeLayers = { 2, 3 }, opus encodeChannels = 2.
2026-10-31 11:01:22 -05:00
4DBug 7271e6e3fa ws-h264: F.video.open end to end on MP4 / MKV / TS / AVI / raw H.264 (bit-exact vs ffmpeg), display-order pts from the sorted packet times; JVT conformance test (48 streams bit-exact vs JM yuv, 4 refused); video/mp4 writer: a video edit list plays every frame (the B-frame delay no longer cut 2 frames off the end); tests tune LuaJIT through host 2026-10-31 10:53:34 -05:00
4DBug 84101d919e ws-h264: merge master 2026-10-31 10:29:56 -05:00
4DBug d4486dccce ws-h264: merge ws/video; codecs/Video registers h264 (avc1/avc3/H264/... FourCCs, V_MPEG4/ISO/AVC) via H264.newVideoDecoder; video/h264 raw Annex B format (demux by access unit, copy-writer from MP4/MKV samples); MMCO 5 resets frame_num (JVT MR2/MR4/MR5); meta.yuv from the VUI 2026-10-31 10:29:56 -05:00
4DBug 2eaed46eea merge ws/video: containers mkv/avi/mp4/ts/ps/y4m (+writers), codecs Jpeg/Mpeg1/Vp8 inter/Video registry, AudioWrap, F.video.open 2026-10-31 10:22:17 -05:00
4DBug 3dd0b59784 ws-video: bench block (whole pipeline fps for MJPEG AVI / MPEG-1 TS / VP8 WebM / Y4M at 320x240 and 640x480, y4m -> MJPEG AVI), docs/video.md (API, layers, how a codec plugs into the registry), NOTICE row for mpegts-luau 2026-10-31 10:05:09 -05:00
4DBug f2a4a33713 ws-video: video/mp4 (MP4 / MOV / 3GP on containers/IsoBmff: edit lists, fragments, dOps -> OpusHead, PCM entries, AAC priming as codec delay; writer: copied H.264 / HEVC / AV1 / MJPEG / AAC / ALAC / Opus / FLAC / MP3, MJPEG from frames, PCM in MOV, edit lists for B-frame / codec delays); IsoBmff Mux writes no empty DecoderSpecificInfo (ffmpeg refuses it); writer checks extended to MP4 / MOV / H.264 remux 2026-10-31 10:02:25 -05:00
4DBug 17c00a15df merge ws/3d2 2026-10-31 09:55:41 -05:00
4DBug ba996820b5 ws-video: merge ws/video-codecs (codecs/Jpeg, codecs/Mpeg1) 2026-10-31 09:53:26 -05:00
4DBug e044209ab1 ws-video: merge master (m4a, music, ...) 2026-10-31 09:50:42 -05:00
4DBug aa4963dc27 ws-video: video/mpegts (containers/MpegTs absorbed from mpegts-luau 6e16197, its unit queue fixed for LuaJIT; M2TS, resync before the first packet, private stream types by PES id), video/mpegps (containers/MpegPs: MPEG-1 / MPEG-2 packs, PSM, private stream 1; pictures cut from the joined ES, PTS from PES / GOP temporal references; raw .m1v), containers/MpegEs; tests vs ffprobe / ffmpeg 2026-10-31 09:50:42 -05:00
4DBug b275bdb498 Merge branch 'ws/3d2-step' into ws/3d2 2026-10-31 09:47:00 -05:00
4DBug a4751298ed Merge branch 'ws/3d2-usda' into ws/3d2 2026-10-31 09:47:00 -05:00
4DBug dd453c336e ws-3d2: merge ws/3d2-dae (model/dae); registry regenerated 2026-10-31 09:47:00 -05:00