From 9275838a6210cc986a2a5de40ff329f0d4d0fb1e Mon Sep 17 00:00:00 2001 From: 4DBug Date: Sat, 31 Oct 2026 11:03:34 -0500 Subject: [PATCH] ws-h264: speed note in the codec header (bench numbers, LuaJIT trace limits) Co-Authored-By: Claude Opus 5.5 --- src/Formats/codecs/H264/init.luau | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Formats/codecs/H264/init.luau b/src/Formats/codecs/H264/init.luau index d638a39..1dcfd90 100644 --- a/src/Formats/codecs/H264/init.luau +++ b/src/Formats/codecs/H264/init.luau @@ -21,6 +21,10 @@ -- end -- local rest = dec:flush() -- the frames still held for reordering -- +-- Speed (one Zen 5 core, tools/bench.luau, libx264 crf 23 clips): Luau --codegen ~220-425 fps at 320x240 and ~75-135 +-- fps at 640x360; LuaJIT with the api's trace limits (host/init.luau) about the same or faster, but with LuaJIT's default +-- limits (maxtrace=1000) the trace cache thrashes and it drops to ~30-190 fps. Real-time is comfortable at 320x240 and +-- feasible at 640x360 for typical bitrates; high-bitrate CIF conformance streams run ~100-150 fps (Luau). -- Never throws: bad data returns nil, Err (core/Err codes ARG / UNSUPPORTED / LIMIT), or frames with the bad slices -- concealed (dec.errors counts them, dec.lastError says why). local Err = require("@formats/core/Err")