Commit Graph
172 Commits
Author SHA1 Message Date
4DBug 918c8310af ws-tex: docs/guide sections (textures / HDR, OpenRaster); DDS / KTX pixelFormat option; XBM / XPM names from F.save
F.save sets opts.format to the file format, so the DDS / KTX layout option is pixelFormat; XBM / XPM make a C
identifier of opts.name (F.save passes the file name).
2026-10-31 15:18:40 -05:00
4DBug d618795ce7 ws-tex: layered/ora (OpenRaster read + write through the PNG hooks)
stack.xml tree (nested isolate / auto stacks, offsets, opacity, visibility, svg composite-ops), mergedimage,
thumbnail. Tested against spec-built files and our file taken apart by python zipfile / ElementTree / Pillow.
2026-10-31 15:12:53 -05:00
4DBug 00d47096ed ws-tex: image/ani (animated cursors -> frames through the decodeImage hook; write through encodeImage)
seq / rate steps, jiffy delays, CUR hotspots, INFO title; AF_ICON clear is UNSUPPORTED. Tested against
Pillow-written ICO / CUR frames assembled into ANI files.
2026-10-31 15:09:35 -05:00
4DBug 9e114fba8b ws-tex: image/icns (read RLE / ARGB / 1-bit / PNG-hook entries, JP2 skipped; write PNG via encodeImage or RLE)
Tested against libicns (png2icns / icns2png -x), Pillow's writer and a hand-written file.
2026-10-31 15:07:07 -05:00
4DBug ce4845ae13 ws-tex: image/ilbm (IFF ILBM / PBM read: planar, EHB, HAM6/8, deep 24/32, masks; write palette / 24 / 32 planes)
Chunks through containers/Chunks, ByteRun1 through codecs/compress/PackBits. Tested against ppmtoilbm files and
hand-written EHB / PBM / mask / transparent-colour files decoded by ilbmtoppm; our files read by ilbmtoppm.
2026-10-31 15:03:24 -05:00
4DBug ef460955d4 ws-tex: image/xbm + image/xpm (read + write)
XBM: X11 / X10 arrays, hex / decimal / octal, hotspot; xbmtopbm reference (netpbm, ImageMagick, Pillow files).
XPM: XPM 3 + XPM 2, c / g / g4 / m keys, hex depths, None, CSS / X11 names + grey0..100 (image/xpm/Names);
ImageMagick reference.
2026-10-31 14:58:20 -05:00
4DBug 403a4d6f31 ws-tex: image/sgi + image/sunras (read + write)
SGI: verbatim / RLE, 1-2 bytes per channel, 1-4 channels (rgba16 native); write RGB(A) RLE / verbatim.
Sun Raster: 1 / 8 / 24 / 32-bit, standard / byte-encoded / RGB types, colour maps; write 24 / 32-bit.
References: ImageMagick, netpbm (sgitopnm-era writers, rasttopnm), Pillow.
2026-10-31 14:52:47 -05:00
4DBug d294c211f9 ws-tex: image/pcx (read 1/2/4/8-bit, planes, palettes; write 8-bit palette / 24 / 32-bit RLE)
Tested against netpbm ppmtopcx / ImageMagick / Pillow files decoded by pcxtoppm; our files read by
ImageMagick. Shared test helper tests/image/_raster.luau and fixture helper tools/fixtures/_raster_ref.py.
2026-10-31 14:48:46 -05:00
4DBug abd01270f0 ws-tex: image/exr (read NONE/RLE/ZIPS/ZIP/PIZ, half/float/uint, scanline + tiled + multipart, mips; write NONE/ZIPS/ZIP)
Tested against the OpenEXR 3.5 python bindings, exrmaketiled (one level / mipmap / ripmap / round up),
exrmultipart, a hand-written subsampled file; PXR24 / B44 / DWAA give UNSUPPORTED; our files read back by
the bindings and exrheader. Broken / zeroed offset tables are rebuilt (exrmultipart writes them zeroed).
2026-10-31 14:43:02 -05:00
4DBug ef2cd93c88 ws-tex: image/ktx (KTX1 + KTX2 read: BCn / ETC2 / EAC / uncompressed, mips, cube, arrays, 3D, Zstd / ZLIB; Basis UNSUPPORTED; KTX2 write)
KTX2 writer: rgba8 (UNORM / SRGB), rgba16, rgba16f / rgba32f with a full DFD, mips, cube / array frames, ZLIB.
Tested against ktx create / deflate / extract, toktx, nvcompress -ktx and hand-written KTX1 (big-endian, packed,
row padding, T=u); our files pass ktx validate.
2026-10-31 14:30:30 -05:00
4DBug e59f5409a7 merge master (ws/apifix) 2026-10-31 14:25:21 -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 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 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 f17a54395d ws-tex: codecs/image/Bcn (BC1-7 decode, BC1/3/4/5 encode) + codecs/image/Half
Decoders ported from Pillow BcnDecode.c (CC0) with D3D11 rules (BC6H +32 rounding, float output, reserved modes,
signed RGTC). Tests against Pillow and Godot 4 (bcdec) over random blocks of every BC6H / BC7 mode; encoder PSNR
above Pillow's encoder. Bench lines in tools/bench.luau.
2026-10-31 14:05:10 -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 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 cdcbd76b9e ws-docs: tools/docs_check.py (guide snippets and examples become tests under both runtimes), docs inputs generator 2026-10-31 13:05:43 -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 763f4a7c04 ws-cleanup: shared plumbing: Err.from, core/Sniff, Pcm.drain, Bits.msbPut; DUP lint; tools/move.py
- core/Err.from(message, offset?, kind?): the private-submodule -> Err plumbing (a kind, or a 'code: ' prefix /
  'truncated' / 'past the end' in the message) that Brotli, Bzip2, Zstd, Jpeg, WOFF2, FBX, plist, msgpack and
  bmfont each wrote.
- core/Sniff (new): Sniff.text(r, n, trim?) (the start of a text file without its BOM), Sniff.dropBom(s),
  Sniff.magic(r, s); 13 text formats' sniff / decode BOM handling goes through it.
- codecs/Pcm.drain(dec, source?, maxFrames?): a format's decode() through its open(); the collect-the-Decoder
  loops of aac, aiff, au, caf, flac, m4a, mp3, opus, vorbis and wav are one call each.
- core/Bits.msbPut: the MSB-first bit writer the MP3 / MP2 / FLAC encoders each copied.
- tools/lint_rules.py DUP: a function body of 12+ code lines repeated token for token in another module fails.
- tools/move.py: moves a module and rewrites every reference (requires, deps, headers, fixture INPUTS, docs).
- tools/fixtures/zstd.py: the incompressible corpus is smaller (zstd.luau 15.1 -> 13.4 MB; every fixture module is
  now under 14.3 MB).
- tools/bench.luau: MPEG-1 also runs with the api's LuaJIT trace limits; the sections that compare tuned / default
  limits set them explicitly (jitTune), so the order of sections no longer leaks the tuning.
2026-10-31 12:00:59 -05:00
4DBug 3243404374 ws-cleanup: type diagnostics 1109 -> 94 unique; lint gate against tools/lint_types_baseline.txt
ws/cleanup-types (merged before) annotated Types, init, core, codecs, containers, ops, host and the formats;
this commit fixes the rest in the modules ws-cleanup added (AudioOps, Resample, Vorbis / FLAC / Opus encoders).
tools/lint.sh now counts unique diagnostics (the analyzer printed every required src module twice: master's
'2499' was 1109 unique) and fails when the count rises above tools/lint_types_baseline.txt (94);
LINT_TYPES_UPDATE=1 lowers it.
2026-10-31 11:30:29 -05:00
4DBug 6b26845afe ws-cleanup: merge master (ws/h264) 2026-10-31 11:12:11 -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 4f2ceec735 ws-cleanup: one base64 (core/Base64)
core/Base64 takes over codecs/Base64's API (encode(buf | string, { url, pad, wrap }, offset, length), decode of both
alphabets, decodeDataUri, dataUri) plus line wrapping (opts.wrap) for plist; codecs/Base64 is removed and glTF /
DAE require core/Base64. The private copies in data/plist (Base64.luau), data/yaml (Parse / Emit) and codecs/Brotli
(the static tables) are gone. tests/codecs/base64 merged into tests/core/base64.
2026-10-31 10:50:40 -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 f00b838205 ws-video: bench.luau merge fix 2026-10-31 10:11:34 -05:00
4DBug 51eec67789 ws-video: merge ws/video-vp8 (final); F.open wraps images as videos only for category video (F.video.open); F.video.fromFrames for image sequences 2026-10-31 10:11:01 -05:00
4DBug 0c7b316998 ws-video-vp8: bench lines (VP8 decode fps 320x240 / 640x480, LuaJIT also with the host's trace limits), damaged inter frame pass in the test, type fix 2026-10-31 10:08:08 -05:00
4DBug 6fcf717214 ws-h264: tests (bit-exact vs ffmpeg, AVCC, NAL-at-a-time, unsupported, fuzz), bench lines; LuaJIT speedups (no table-allocating if-expressions, arithmetic bit reads, branch-free CABAC decisions, split MC filters) 2026-10-31 10:07:39 -05:00
4DBug b0b47007dc ws-video: merge ws/video-vp8 (VP8 inter frames) 2026-10-31 10:05:56 -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 8d2deb13ab ws-video: writers checked by ffprobe / ffmpeg (tools/fixtures/videoenc.py + _video_encode.luau, tests/video/encode.luau); constant-rate output for AVI / Y4M shared in Source.constantRate (uneven GIF delays repeat frames) 2026-10-31 09:59:16 -05:00
4DBug bd06545e2e ws-video: MJPEG (codecs/Jpeg, yuv420p full range; encoder remaps limited-range frames) and MPEG-1 (codecs/Mpeg1, display reordering with the packet pts as tag) in the codec registry; VideoFrame times count from the demuxer's startTime (TS starts at 1.4 s); Matroska Vorbis keeps its codec delay; fixtures decode with -fps_mode passthrough 2026-10-31 09:57:26 -05:00
4DBug 17c00a15df merge ws/3d2 2026-10-31 09:55:41 -05:00
4DBug e53ad35620 ws-h264: codecs/H264 decoder (CAVLC + CABAC, I/P/B, 8x8, weighted, direct, deblock, DPB/POC/reorder); fixtures from libx264 vs ffmpeg 2026-10-31 09:53: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 b3def55516 ws-video-codecs: bench lines: MJPEG decode (yuv / rgba) and yuv420p encode fps at 320x240 / 640x480, MPEG-1 decode fps (yuv / rgba) 2026-10-31 09:49:33 -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
4DBug 312cd3c10e ws-3d2: merge ws/3d2-3mf (model/3mf); registry regenerated, bench lines merged 2026-10-31 09:46:52 -05:00
4DBug 110061960a ws-video-vp8: VP8 inter frames (libvpx 1.17 port): references, modes / motion vectors, split, six-tap / bilinear prediction, inter loop filter levels, hidden frames, reset; tests vs ffmpeg on 27 test vectors + 24 libvpx clips 2026-10-31 09:46:45 -05:00
4DBug d4affd565e ws-3d2/fbx: model/fbx (binary 7.x + ASCII read, binary 7.4 / 7.5 + ASCII write): node tree, Objects / Connections -> Scene (full transform model, layer elements, materials, textures, skins, blend shapes, animation stacks, cameras, lights); tests against assimp + Blender, round trips, fuzz; bench lines 2026-10-31 09:46:25 -05:00
4DBug a2763bee35 ws-video: video/avi tests (OpenDML / idx1 / scan, PCM / ADPCM / MP2 audio, raw RGB / I420, mux round trip), video/y4m tests (every C tag, 10-bit, writer), empty audio chunks are padding 2026-10-31 09:45:10 -05:00