Commit Graph
52 Commits
Author SHA1 Message Date
4DBug f7c8abc1b4 merge master into ws/videoctl 2026-11-02 22:17:23 -06:00
4DBug 7ea8498f78 video: yields before the rgba / scale conversion and between a new H.264 picture's planes; build/ regenerated 2026-11-02 22:05:24 -06:00
4DBug 89b363af78 merge ws/lazydetect 2026-11-02 21:59:42 -06:00
4DBug e05392ee8e api: lazy format detection (Sniffs.luau): F.detect loads no format module
tools/gen_registry.py now also writes src/Rosetta/Sniffs.luau: each format's sniff copied
(tools/sniff_extract.py) with the top-level locals, types and load-time loops it reaches;
requires outside core/ become proxies that require on first field access. 198 of 199
sniffs are copied (model/fbx reads Binary.MAGIC at load time: its module sniffs).
Registry entries gain sniff (0 copy, 1 copy reaching a codec / container, 2 module) and
variant (the module has variant(r)).

init.luau detect: the extension's formats first, then by sniff cost and registry order;
a sniff runs only while its cap (1, or LATE) could still win, ties to registry order, so
results equal the eager path. F.detect loads the winner only when it has variant().

tests/detect.luau: every copied sniff against its module's on samples of every fixture
module (tools/fixtures/detect.py), scores within 0..1, and F.detect against the eager
reference with no name, the right / wrong / unknown extension and per category.

Outside init / Registry / gen_registry: tools/fixtures.py (LAST generators run after
the others and rerun when their outputs change), tools/lint_rules.py (Sniffs is api
layer, skipped by DUP), docs/STYLE.md and docs/API.md notes, build/ regenerated.
2026-11-02 21:58:10 -06:00
4DBug a87ad99410 perf (LuaJIT): stop cross-codec trace pollution in long mixed processes; bench.sh mixed
- compat math.clamp is vararg: LuaJIT never starts a root trace at a vararg function but still inlines it. The plain
  shim, called from interpreted code, collected aborted root traces until it was blacklisted, after which every trace
  through it aborted: in one process, png (or anything earlier) left jpeg / webp / tiff / ImageOps 2-10x slower.
- Dct.fdctQuantize: branch-free quantiser and a divisor table (q * 8) from Jpeg.Encode; the sign branch among the column
  pass's live values made LuaJIT retry side traces it could not compile (register coalescing) forever. Also faster
  in luau -O2 (~5%) and native (~10%). Outputs unchanged.
- tools/bench_mixed.luau + bash tools/bench.sh mixed: core, audio, video, image in one LuaJIT process against the
  per-codec benches, marking lines more than 1.3x slower mixed.
2026-11-02 21:12:36 -06:00
4DBug e993458d36 codecs/audio/Aac/SbrDct: 64-point transforms as two 16-point halves (Roblox native register allocation) 2026-11-02 01:13:28 -06:00
4DBug 9a4cacc40b codecs/audio/Aac: probe parses only, two frames for AAC-LC streams 2026-11-02 00:38:29 -06:00
4DBug 95efdd7e3e codecs/audio/Aac: faster SBR windows and HF assembly 2026-11-02 00:33:56 -06:00
4DBug 627ddded77 merge ws/perf-video 2026-11-01 21:22:20 -06:00
4DBug 6ddc5b6017 merge ws/perf-audio (Ogg page CRC via core Crc32.msb from ws/perf-core) 2026-11-01 20:57:10 -06:00
4DBug de755ca036 merge ws/perf-core 2026-11-01 20:56:00 -06:00
4DBug 7a6368242b video perf: MPEG-1/2, yuv -> rgba, H.264, VP8 faster in interpreted Luau (and native / LuaJIT), outputs unchanged
- codecs/video/Mpeg2/Decoder: coefficient loop keeps the bit position in a local and reads a 25-bit window with
  one readu32 (no fifth byte); MPEG-1 oddification with bor; dequant shifts; tracks the highest coefficient so the
  IDCT skips the zero rows; toRgba / toRgba422 through shifted-channel lookup tables (one rshift + one index per
  channel, the alpha folded in), two rows per chroma row without a per-pixel branch
- codecs/video/Dsp: idct(blk, dst, off, stride, add, last?): pass 1 only over the rows up to last's, pass 2 with
  the rows-4..7-zero branch tree when they are, fused with the put / add (rounding and the CLAMP offset in one
  division); mc: an unrolled whole-sample copy for 8 / 16 wide blocks, the 4-tap case a column at a time reusing
  each row's pair sums
- codecs/image/Yuv.toRgba: per-matrix luma table, shifted-channel clip tables, chroma once per 2x2
- codecs/video/H264: prediction scratch as buffers (put = u32 copy, bi-pred average four samples at a time),
  whole-sample single-list blocks copied straight from the reference, implicit / identity weights routed to the
  plain paths, 2-tap chroma when a fraction is 0 and the bilinear taps slide along the row, six-tap with two
  multiplies; deblocking skips the inner edges of macroblocks with one motion and no luma coefficients
  (S.flatTab) and finds equal motion before motionDiffers
- codecs/image/Vp8/Predict: six-tap filters with a sliding window (one read per sample)
- --!optimize 2 on every video codec / container module that lacked it (the bundles already force it)
- tools/bench_video.luau: the video fps lines on their own (sections, "once", "jitdefault"), more MPEG-1 clips
2026-11-01 20:54:46 -06:00
4DBug c0766614bc build: regenerate bundles after the audio perf pass 2026-11-01 20:38:20 -06:00
4DBug 8a706a993c bsp, map: meta.unit = 0.0254 (Quake units are inches), as vbsp/vmf 2026-11-01 20:35:47 -06:00
4DBug d5276798c3 merge ws/perf-image 2026-11-01 20:33:57 -06:00
4DBug c93ef2fa6f build: regenerate bundles after the core perf pass 2026-11-01 20:30:07 -06:00
4DBug 3f788e9d22 perf(image): Floyd-Steinberg error sums in tables and locals (same float sums), map cache checked inline; build: regenerate bundles 2026-11-01 20:17:06 -06:00
4DBug 8bd15840d8 merge ws/engines 2026-11-01 20:14:34 -06:00
4DBug 351f6620dd model/bsp: Quake 1 / Half-Life / Quake II materials link their texture (baseColorTexture), as Quake III does 2026-11-01 20:10:47 -06:00
4DBug 58df9e8a3a merge ws/quake 2026-11-01 20:08:48 -06:00
4DBug a5a03ecb8d audio perf: FLAC keeps floor(x * inv) / floor(u * 0.5) (LuaJIT: a division is slower) 2026-11-01 20:07:09 -06:00
4DBug 11d0df9418 merge ws/blend 2026-11-01 19:48:59 -06:00
4DBug 0e0b213a80 merge ws/idtech: UDMF (codecs/model/DoomMap), Doom 3 / Quake 4 .map + .proc, Wolf3D VSWAP + GAMEMAPS, codecs/text/Lexer 2026-11-01 19:48:30 -06:00
4DBug e100366cb8 merge ws/source: VBSP v19-21, VMF, KeyValues / data/vdf, codecs/model/Displacement (with ws/quake's Brush / Patch / Miptex) 2026-11-01 19:46:56 -06:00
4DBug a2cd103674 audio perf: ALAC integer divisions 2026-11-01 19:45:14 -06:00
4DBug be397639ea model/blend: comments to specs only, a type fix; build: regenerate bundles 2026-11-01 19:44:35 -06:00
4DBug cc4aa331eb build: regenerate bundles 2026-11-01 19:35:47 -06:00
4DBug 1e69799c21 docs/guide: Quake maps and BSP, WAD2 / WAD3, lmp / spr, Quake III shaders and skins; bench lines; q3skin sniff needs a path 2026-11-01 19:25:25 -06:00
4DBug c19a68dfae merge ws/sourcemdl: Source MDL v44-49 (+vvd/vtx/phy/ani, flexes, animations), VMT materials, codecs/model/SourceAnim 2026-11-01 19:25:04 -06:00
4DBug fe1ee676c6 model/sourcemdl: type annotations (lint type baseline back at 92); bundles regenerated 2026-11-01 19:23:12 -06:00
4DBug 7a69ba8455 build: regenerate bundles (model/sourcemdl, codecs/model/SourceAnim) 2026-11-01 19:21:22 -06:00
4DBug 9ae847d2a3 merge ws/build 2026-11-01 19:18:53 -06:00
4DBug 175ca9e823 archive/wad2, image/lmp, image/spr, data/q3shader, data/q3skin
WAD2 / WAD3 with miptex / qpic / conchars / font / palette images and addImage; Quake .lmp pictures, palette and
colormap (palette never embedded); Quake / Half-Life / SPR32 sprites with frame groups; Quake III shader scripts and
.skin files. Miptex gains qpic decode / encode and palette mapping; Pixels.keyed keeps the key colour (alpha 0).
2026-11-01 19:17:00 -06:00
4DBug e4840b719b model/vmf: Hammer VMF read and write (Brush solids with Valve 220 axes, displacements, entities, cameras, visgroups, byte-exact write back, document builders); KeyValues: escapes = "quotes", bare / flat block layout for writing 2026-11-01 19:15:54 -06:00
4DBug 0f0da6e8ea model/d3map: Doom 3 / Quake 4 editor .map (Version 2 / 3): brushDef3 through codecs/model/Brush, patchDef2 / 3 through codecs/model/Patch, entities as nodes; side areas checked against qhull 2026-11-01 19:06:29 -06:00
4DBug 67e116a6c6 model/bsp: BSP2 / 2PSB, Quake 1 / 2 / Half-Life lightmap atlas (TEXCOORD_1, .lit), tree / hulls / visibility in meta.bsp
Bsp.leafAt / contents / pvs point queries; tested on ericw-tools qbsp + vis output in all three Quake 1 layouts.
2026-11-01 19:03:55 -06:00
4DBug 9efeea304e merge ws/quake (codecs/model/Brush, Patch, Miptex) 2026-11-01 18:57:46 -06:00
4DBug 4bd59a30c8 merge ws/quake (codecs/model/Brush, codecs/model/Patch, model/map) for model/d3map 2026-11-01 18:55:23 -06:00
4DBug 69ee08a600 vector/gamemaps: own test file (CONTRACT); type fixes in vswap / gamemaps 2026-11-01 18:54:01 -06:00
4DBug 2704653a3e model/map: Quake / Valve 220 / Quake II / Quake III editor maps, read and write
Entities as nodes (keys in extras, brushes as parsed), brushes through codecs/model/Brush, patchDef2 / patchDef3
through codecs/model/Patch, texture sizes from WAD2 / WAD3 / .wal / images; tested against ericw-tools qbsp.
2026-11-01 18:52:31 -06:00
4DBug e51fd3585e archive/vswap (Wolfenstein 3D pages: walls, sprites and sounds through a palette passed in) and vector/gamemaps (GAMEMAPS + MAPHEAD, Carmack + RLEW, into a TileMap); test data from the fixture's own writers 2026-11-01 18:50:33 -06:00
4DBug 082ea2019e build engine: docs/guide sections (ART tiles, Build maps) with inputs from tools/fixtures/docs_build.py, bench lines, type fixes; bundles rebuilt 2026-11-01 18:46:54 -06:00
4DBug d8212c6839 merge ws/source (codecs/text/KeyValues for .vmt materials) 2026-11-01 18:46:27 -06:00
4DBug 5ad934565d codecs/model/Brush, codecs/model/Patch, codecs/image/Miptex; Pixels palette helpers
Brush: plane brushes -> polygons (qbsp-style clipping), Quake standard / Valve 220 / brush-primitive projection,
optional coplanar merge and CSG hull; tested against ericw-tools qbsp -nofill (area per plane, texels per corner).
Patch: Bezier control grids moved out of model/bsp/Quake3, per-axis subdivisions (patchDef2 / patchDef3), normals.
Miptex: Quake / GoldSrc miptex decode / encode and the WAD2 / WAD3 directory (model/bsp uses it now).
Pixels: grey, keyed, colorList, colormap, paletteBytes. STYLE: layout block and 2a table list the new modules.
2026-11-01 18:40:29 -06:00
4DBug 719abb97c0 model/proc: Doom 3 / Quake 4 .proc render geometry (models / surfaces to meshes, clockwise-front turned CCW; portals, BSP nodes, shadow models as data) 2026-11-01 18:40:10 -06:00
4DBug 1c79609ecb codecs/text/KeyValues: Valve KeyValues text (conditions, #include / #base, duplicates, escapes, entity lump) and binary; data/vdf over it
STYLE.md: KeyValues listed in the layout block and the section 2a table.
2026-11-01 18:35:33 -06:00
4DBug 7d4e0381fe codecs/model/DoomMap: the Doom map-to-Scene builder moved out of archive/wad, plus a UDMF 1.1 TEXTMAP parser (fields kept, namespace flag bits); Wad.map loads UDMF maps; model/udmf for a standalone TEXTMAP; codecs/text/Lexer (C-style tokens for id Tech / UDMF text)
STYLE.md: layout block and the 2a table list DoomMap and Lexer. tests/archive/wad: the UDMF stub map now loads (empty) instead of UNSUPPORTED.
2026-11-01 18:33:24 -06:00
4DBug 9e7d159af8 audio/mpc: newV split in two halves (newVEven, newVOdd): as one function its native lowering failed register allocation and it ran interpreted 2026-11-01 18:20:23 -06:00
4DBug 01c044805f audio/mp3: a Xing/Info frame count of 0 (ffmpeg writing to a pipe) no longer caps the length to 0; the frames found are the length, as ffmpeg does 2026-11-01 18:06:43 -06:00
4DBug 200d7a58f3 build: regenerate bundles after the comment cleanup 2026-11-01 01:34:21 -06:00