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
@@ -1,4 +1,5 @@
|
||||
--!strict
|
||||
--!optimize 2
|
||||
-- containers/Avi: the AVI RIFF form (Microsoft AVI 1.0 + OpenDML 1.02), read and written. New in rosetta. The chunk
|
||||
-- index comes from the OpenDML super index (indx -> ix##), else idx1 (movi-relative or absolute, detected), else a
|
||||
-- scan of the movi lists. Writing: AVI 1.0 (avih, strl, LIST movi, idx1) with an odml / dmlh header.
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
--!strict
|
||||
--!optimize 2
|
||||
-- containers/Ebml: EBML (RFC 8794), the binary structure under Matroska and WebM. New in rosetta.
|
||||
-- Reading: element headers (IDs keep their length marker bits, as the specs write them: 0x1A45DFA3; sizes drop it;
|
||||
-- an all-ones size is "unknown"), children iteration, and the value types (unsigned / signed integers, floats,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
--!strict
|
||||
--!optimize 2
|
||||
-- containers/IsoBmff/Box: the box tree of an ISO BMFF / QuickTime file (ISO/IEC 14496-12 4.2): 32-bit, 64-bit
|
||||
-- (size 1) and to-the-end (size 0) sizes, uuid boxes, full-box version / flags, and the recursion into the container
|
||||
-- boxes (moov / trak / mdia / minf / stbl / udta / meta / ilst items / moof / traf / iprp / ipco / iref / dinf / ...).
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
--!strict
|
||||
--!optimize 2
|
||||
-- containers/IsoBmff/Demux: tracks and sample tables of an ISO BMFF / QuickTime file (ISO/IEC 14496-12 8.3 - 8.8),
|
||||
-- edit lists and fragments (mvex / trex, moof / traf / tfhd / tfdt / trun). The per-sample tables are columnar arrays,
|
||||
-- offsets absolute in the reader's buffer. Never throws.
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
--!strict
|
||||
--!optimize 2
|
||||
-- containers/IsoBmff/Meta: the metadata boxes. HEIF / AVIF items (ISO/IEC 23008-12: pitm, iinf / infe, iloc
|
||||
-- versions 0 - 2, iref, iprp / ipco / ipma, idat; the common properties ispe / pixi / colr / irot / imir / clap / auxC
|
||||
-- decoded, codec configurations av1C / hvcC / avcC kept raw) and the iTunes tags (udta / meta / ilst: text, trkn /
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
--!strict
|
||||
--!optimize 2
|
||||
-- containers/IsoBmff/Mux: writes a progressive ISO BMFF / MP4 / M4A file (ISO/IEC 14496-12): ftyp, moov first ("fast
|
||||
-- start"), the samples interleaved in chunks in one mdat, udta / meta / ilst tags; co64 past 4 GB. Audio and video
|
||||
-- sample entries with their configuration box, plus raw child boxes. Never throws: bad specs return nil, Err.ARG.
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
--!strict
|
||||
--!optimize 2
|
||||
-- containers/IsoBmff/QtPalette: the depth and colour table of a QuickTime video sample description (Apple QuickTime
|
||||
-- File Format, "Video sample description": depth at byte 82, color table ID at 84, then the table when the ID is 0).
|
||||
-- Used by the MOV demuxer and by Matroska's V_QUICKTIME tracks (whose CodecPrivate is the same description). Depths 1,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
--!strict
|
||||
--!optimize 2
|
||||
-- containers/IsoBmff: ISO base media file format (ISO/IEC 14496-12) and its relatives: MP4 / M4A / M4V / MOV (QuickTime)
|
||||
-- / 3GP, fragmented MP4 (moof), HEIF / AVIF items (ISO/IEC 23008-12), iTunes tags. A container (layer 2): m4a, mp4,
|
||||
-- mov, heif, avif build on it. Written from the specifications; no third-party code.
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
--!strict
|
||||
--!optimize 2
|
||||
-- containers/MpegEs: helpers over MPEG video elementary streams for the MPEG-TS / PS demuxers. New in rosetta.
|
||||
-- Start-code scanning, MPEG-1 / MPEG-2 video access units (a picture with the sequence / GOP headers before it,
|
||||
-- picture type and temporal reference, the sequence's frame rate and size, MPEG-2 detection by its sequence
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
--!strict
|
||||
--!optimize 2
|
||||
-- containers/MpegPs: the MPEG program stream (ISO/IEC 11172-1 system streams and ISO/IEC 13818-1 program streams:
|
||||
-- .mpg / .mpeg / .vob). New in rosetta. Pack headers (MPEG-1 and MPEG-2 layouts), system headers, the program
|
||||
-- stream map (stream types), padding, and PES packets of the video (0xE0..0xEF), audio (0xC0..0xDF) and private
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
--!strict
|
||||
--!native
|
||||
--!optimize 2
|
||||
-- containers/MpegTs: an MPEG transport stream demuxer (ISO/IEC 13818-1). Absorbed from mpegts-luau 6e16197 (same
|
||||
-- author; no third-party code); changed: the unit queue keeps an explicit tail (#q on a table with holes at its front
|
||||
-- loses units under LuaJIT's border rule). Never throws: bad input is skipped and counted in `stats`.
|
||||
|
||||
Reference in new issue
Block a user