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
This commit is contained in:
1 parent
8a706a993c
commit
7a6368242b
44 files changed
+3083
-1599
No files matched your search
+507
-193
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user