- codecs/Dct: jpeg-luau's islow / reduced IDCTs + a forward islow DCT with jcdctmgr.c's quantiser; tests/codecs/dct.luau - image/jpeg: Decode (marker parser, absorbed + reader ranges, SOF9/SOF10 + DAC, EXIF / ICC / COM / JFIF density), Scan + Color (absorbed), Arith (jdarith.c port), Encode (baseline / optimised / progressive, 444/422/420, restarts, APP1/APP2/COM from meta), Tables (annex K) - tests: 115 cjpeg/jpegtran/Pillow files, 444 decodes bit-exact with djpeg at 1, 1/2, 1/4, 1/8 (104 arithmetic), 38 encodes byte-identical to cjpeg (so djpeg decodes them), orientation, meta, truncation, fuzz - licenses: libjpeg-turbo LICENSE + README.ijg, NOTICE rows - tools/bench.luau: jpeg block; tools/bench.sh runs every fixture generator (bench blocks read their outputs)
10 lines
699 B
Bash
10 lines
699 B
Bash
#!/usr/bin/env bash
|
|
# Timings (bash tools/bench.sh): tools/bench.luau under luau --codegen -O2 and under LuaJIT (the build output).
|
|
cd "$(dirname "$0")/.." || exit 1
|
|
LUAU=${LUAU:-$(command -v luau || nix shell nixpkgs#luau -c sh -c 'command -v luau')}
|
|
LUAJIT=${LUAJIT:-$(command -v luajit || nix shell nixpkgs#luajit -c sh -c 'command -v luajit')}
|
|
python3 -I tools/fixtures.py > /dev/null || exit 1 # every generator (up-to-date ones are skipped): the bench blocks read their outputs
|
|
python3 -I tools/build.py luajit > /dev/null || exit 1
|
|
"$LUAU" --codegen -O2 tools/bench.luau
|
|
"$LUAJIT" -e 'package.path = "build/luajit/?.lua;build/luajit/?/init.lua;" .. package.path' build/luajit/tools/bench.lua
|