ws-cleanup: codecs/ grouped by domain; containers/Chunks, codecs/audio/Stream, codecs/image/Pixels, codecs/model/Mat4
C2, the hierarchy (tools/move.py, every reference rewritten mechanically): - codecs/compress: Deflate Lzma Zstd Brotli Bzip2 Lzw; codecs/entropy: Huffman (from core) RangeCoder; codecs/image: Jpeg Dct Vp8 Vp8L Yuv Quantize Raster Blend Pixels; codecs/audio: Mdct Aac Alac Pcm Resample VorbisComment Tracker SoundFont Stream; codecs/video: H264 Mpeg1 Video; codecs/text: Json Xml Text Url; codecs/font: TrueType Cff; codecs/model: MeshFlatten Mat4. containers/ stays flat; core/ keeps Bytes Bits Err Crc32 Adler32 Base64 Md5 Input Sniff. - LAYERS lint: codecs must sit in a domain folder; gen_registry lists codecs by domain (docs/FORMATS.md). - Checked: build.py both targets, rojo build of build/roblox, the full suite on both runtimes. C3, generic code out of format folders: - containers/Chunks (new): the chunked-file walker (RIFF / RIFX / IFF / PNG / CAF layouts: endianness, size first, trailer, padding, lenient missing pad, open-ended ids, size hooks). containers/Riff walks with it (RF64 ds64 through the resize hook); image/png, audio/aiff and audio/caf list their chunk handlers over it. - codecs/audio/Stream (new): Stream.packets, the packet-decoder Decoder (read / seek with pre-roll / position, priming and end trimming) that aac, caf and m4a each carried (~70 lines each). - codecs/image/Pixels: image/bmp/Pixels promoted (+ rgb555); image/ico's DIB decoder uses its row loops instead of its own (the AND mask / alpha rule stay ICO's). - codecs/model/Mat4 (new): matrices / quaternions / TRS shared by FBX (Xform keeps only the FBX transform model), Collada (Math keeps only <lookat> / <skew>) and USD (its matrix helpers and general 4x4 inverse); Mat4.mul is Types.Scene.mul. The Collada normal matrix is now the inverse transpose (it was the inverse; same result for the fixtures' bind shapes). - README rewritten (install for Rojo and LÖVE / LuaJIT, quick start per category, F.* and F.ops, host notes: FORMATS_NO_JIT_TUNE, paths, layout); docs/STYLE.md: the codec domains, "what belongs in a format folder" with the shared building blocks and the DUP rule, conventions (WAVE order, lower-case tags, loops, the api hooks decodeImage / encodeImage / openAudio / plugins / resolve, the codecs/video/Video registry), Err.from, the type baseline. New tests: tests/containers/chunks, tests/codecs/mat4. Type baseline 93. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
9c553b9d1a
commit
434a304315
283 files changed
+1877
-1660
No files matched your search
@@ -1,9 +1,9 @@
|
||||
-- codecs/Aac tests: AudioSpecificConfig parsing (every fixture's esds, explicit SBR / PS signalling from fdkaac,
|
||||
-- codecs/audio/Aac tests: AudioSpecificConfig parsing (every fixture's esds, explicit SBR / PS signalling from fdkaac,
|
||||
-- crafted configs: PCE channel counts, 960-sample frames, Main / LTP object types), ADTS headers, raw frames decoded
|
||||
-- straight from ADTS against ffmpeg's float decode, the FIL extension hook on HE-AAC (implicit SBR), reset, errors,
|
||||
-- the fuzz no-throw pass on raw frames. Fixtures: tools/fixtures/m4a.py.
|
||||
local T = require("@tests/T")
|
||||
local Aac = require("@formats/codecs/Aac")
|
||||
local Aac = require("@formats/codecs/audio/Aac")
|
||||
local IsoBmff = require("@formats/containers/IsoBmff")
|
||||
local Bytes = require("@formats/core/Bytes")
|
||||
local Bits = require("@formats/core/Bits")
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
-- codecs/Alac tests: encoder -> decoder round trips over silence (zero runs), full-scale noise (uncompressed frames),
|
||||
-- codecs/audio/Alac tests: encoder -> decoder round trips over silence (zero runs), full-scale noise (uncompressed frames),
|
||||
-- tones, steps, 1 - 8 channels, 16 / 20 / 24 bits, partial and tiny frames, custom frame lengths; ffmpeg's ALAC
|
||||
-- packets (through containers/IsoBmff) decode to the source integers; the magic cookie (plain, behind frma / alac atoms,
|
||||
-- bad versions / depths); errors; the fuzz no-throw pass on packets. Fixtures: tools/fixtures/m4a.py.
|
||||
local T = require("@tests/T")
|
||||
local Alac = require("@formats/codecs/Alac")
|
||||
local Alac = require("@formats/codecs/audio/Alac")
|
||||
local IsoBmff = require("@formats/containers/IsoBmff")
|
||||
local Bytes = require("@formats/core/Bytes")
|
||||
local Crc32 = require("@formats/core/Crc32")
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
-- codecs/Brotli tests: every fixture stream (reference encoder: qualities 0..11, windows 10..24, text / font / generic
|
||||
-- codecs/compress/Brotli tests: every fixture stream (reference encoder: qualities 0..11, windows 10..24, text / font / generic
|
||||
-- modes, large windows) decodes to its corpus; consumedEnd; offsets inside a bigger buffer; the static dictionary;
|
||||
-- hand-made streams (empty, metadata, uncompressed); maxBytes; truncated / corrupted / random input returns nil, Err
|
||||
-- and never throws. Fixtures: tools/fixtures/brotli.py.
|
||||
local T = require("@tests/T")
|
||||
local Brotli = require("@formats/codecs/Brotli")
|
||||
local Brotli = require("@formats/codecs/compress/Brotli")
|
||||
local Err = require("@formats/core/Err")
|
||||
local Crc32 = require("@formats/core/Crc32")
|
||||
local Fx = require("@tests/gen/brotli")
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
-- codecs/Bzip2 tests: every fixture stream (Python bz2 = libbzip2, block sizes 1..9, RLE1 run edges, block-boundary
|
||||
-- codecs/compress/Bzip2 tests: every fixture stream (Python bz2 = libbzip2, block sizes 1..9, RLE1 run edges, block-boundary
|
||||
-- runs, random / skewed data, concatenated streams with trailing garbage) decodes exactly; offsets / consumedEnd;
|
||||
-- maxBytes; CRC mismatches are Err.CHECKSUM; truncations are Err.TRUNCATED; the fuzz no-throw pass.
|
||||
-- Fixtures: tools/fixtures/bzip2.py.
|
||||
local T = require("@tests/T")
|
||||
local Bzip2 = require("@formats/codecs/Bzip2")
|
||||
local Bzip2 = require("@formats/codecs/compress/Bzip2")
|
||||
local Err = require("@formats/core/Err")
|
||||
local Fx = require("@tests/gen/bzip2")
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
-- codecs/Dct tests: the islow inverse DCT against a double-precision reference (within 1 level per sample, as T.81
|
||||
-- codecs/image/Dct tests: the islow inverse DCT against a double-precision reference (within 1 level per sample, as T.81
|
||||
-- annex A accuracy needs), forward DCT + quantiser against the reference transform (round to nearest of v / (8 q)),
|
||||
-- fdct -> idct round trips at q = 1 within 1 level, edge replication of fdctQuantize, and garbage coefficients never
|
||||
-- throw (outputs stay clamped). The bit-exact djpeg / cjpeg checks are in tests/image/jpeg.luau.
|
||||
local T = require("@tests/T")
|
||||
local Dct = require("@formats/codecs/Dct")
|
||||
local Dct = require("@formats/codecs/image/Dct")
|
||||
|
||||
local t = T.suite("dct")
|
||||
local rand = T.rng(11)
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
-- codecs/Deflate tests: every fixture case (Python zlib, levels 0-9, every strategy, small windows, flushes, gzip
|
||||
-- codecs/compress/Deflate tests: every fixture case (Python zlib, levels 0-9, every strategy, small windows, flushes, gzip
|
||||
-- headers, multi-member gzip) decodes; exact-size mode; checksum vectors; the compressor round-trips every corpus at
|
||||
-- every level (and its zlib / gzip framing); truncated / corrupted / random input returns nil, Err and never throws.
|
||||
-- Ported from deflate-luau tests/inflate.luau. Fixtures: tools/fixtures/deflate.py.
|
||||
local T = require("@tests/T")
|
||||
local Deflate = require("@formats/codecs/Deflate")
|
||||
local Deflate = require("@formats/codecs/compress/Deflate")
|
||||
local Err = require("@formats/core/Err")
|
||||
local Fx = require("@tests/gen/deflate")
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
-- codecs/H264 tests: libx264 streams at many settings (Baseline / Main / High, CAVLC / CABAC, B frames, references,
|
||||
-- codecs/video/H264 tests: libx264 streams at many settings (Baseline / Main / High, CAVLC / CABAC, B frames, references,
|
||||
-- weighted prediction, 8x8 transforms, scaling matrices, slices, odd sizes with cropping, ...) decoded and compared
|
||||
-- per frame with ffmpeg's decoder (CRC-32 of the yuv420p planes, bit-exact); the AVCC (avcC + length-prefixed
|
||||
-- samples) and NAL-at-a-time paths; pts propagation; UNSUPPORTED streams (interlaced, 4:2:2, 4:4:4, 10-bit); error
|
||||
-- codes; and the fuzz no-throw pass. Fixtures: tools/fixtures/h264.py.
|
||||
local T = require("@tests/T")
|
||||
require("@formats/host") -- LuaJIT: the trace limits the api sets (host/init.luau)
|
||||
local H264 = require("@formats/codecs/H264")
|
||||
local H264 = require("@formats/codecs/video/H264")
|
||||
local Crc32 = require("@formats/core/Crc32")
|
||||
local Err = require("@formats/core/Err")
|
||||
local Cases = require("@tests/gen/h264_cases")
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
-- codecs/H264 conformance: a selection of the ITU-T H.264.1 (JVT) conformance bitstreams (Baseline / Main / Extended
|
||||
-- codecs/video/H264 conformance: a selection of the ITU-T H.264.1 (JVT) conformance bitstreams (Baseline / Main / Extended
|
||||
-- without SP / High: CAVLC, CABAC, B frames, weighted prediction, multiple slices, MMCO / long-term references,
|
||||
-- frame_num gaps, cropping, PCM, 8x8 transforms, scaling matrices, ...) decoded bit-exact against the reference
|
||||
-- decoder's yuv (JM, shipped in each zip; ffmpeg where there is none), and interlaced / SP / 4:2:2 streams refused
|
||||
-- with UNSUPPORTED. Fixtures: tools/fixtures/h264_jvt.py (downloaded from itu.int; skipped when unreachable).
|
||||
local T = require("@tests/T")
|
||||
require("@formats/host") -- LuaJIT: the trace limits the api sets (host/init.luau)
|
||||
local H264 = require("@formats/codecs/H264")
|
||||
local H264 = require("@formats/codecs/video/H264")
|
||||
local Crc32 = require("@formats/core/Crc32")
|
||||
local Base64 = require("@formats/core/Base64")
|
||||
local Err = require("@formats/core/Err")
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
-- codecs/Jpeg tests (the Motion-JPEG side; tests/image/jpeg.luau covers the still-image decoder and encoder through
|
||||
-- codecs/image/Jpeg tests (the Motion-JPEG side; tests/image/jpeg.luau covers the still-image decoder and encoder through
|
||||
-- image/jpeg): ffmpeg mjpeg frames (4:2:0, 4:2:2, 4:4:4, odd sizes, stripped DHT, AVI1 + junk after EOI) decoded
|
||||
-- to yuv420p bit-exact with libjpeg-turbo's IDCT planes (TurboJPEG) and to rgba8 bit-exact with djpeg, and within
|
||||
-- PSNR thresholds of ffmpeg's own decode; an interlaced AVI1 frame (two fields) woven; the yuv420p encoder
|
||||
-- byte-identical to TurboJPEG's tj3CompressFromYUV8, read back by djpeg (exact) and ffmpeg (PSNR); the API's
|
||||
-- arguments; the fuzz no-throw pass. Fixtures: tools/fixtures/mjpeg.py.
|
||||
local T = require("@tests/T")
|
||||
local Jpeg = require("@formats/codecs/Jpeg")
|
||||
local Jpeg = require("@formats/codecs/image/Jpeg")
|
||||
local Crc32 = require("@formats/core/Crc32")
|
||||
local Err = require("@formats/core/Err")
|
||||
local Types = require("@formats/Types")
|
||||
local Base64 = require("@formats/core/Base64")
|
||||
local Deflate = require("@formats/codecs/Deflate")
|
||||
local Deflate = require("@formats/codecs/compress/Deflate")
|
||||
local Fx = require("@tests/gen/mjpeg_cases")
|
||||
local Enc = require("@tests/gen/mjpeg_enc")
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
-- codecs/Json tests: the JSONTestSuite parsing corpus (y_ must parse to Python's value, n_ must fail, i_ must not
|
||||
-- codecs/text/Json tests: the JSONTestSuite parsing corpus (y_ must parse to Python's value, n_ must fail, i_ must not
|
||||
-- throw), Python json.dumps output in four styles parsed and reproduced byte for byte (compact sorted, ordered,
|
||||
-- indent 2, ensure_ascii), events / lines / decodeAt / writer, options, error codes, and the fuzz pass.
|
||||
-- Fixtures: tools/fixtures/json.py.
|
||||
local T = require("@tests/T")
|
||||
local Json = require("@formats/codecs/Json")
|
||||
local Json = require("@formats/codecs/text/Json")
|
||||
local Types = require("@formats/Types")
|
||||
local Err = require("@formats/core/Err")
|
||||
local Canon = require("@tests/data/Canon")
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
-- codecs/Lzma tests: every fixture (liblzma through Python's lzma module and the xz CLI: presets 0-9 and -e, lc / lp /
|
||||
-- codecs/compress/Lzma tests: every fixture (liblzma through Python's lzma module and the xz CLI: presets 0-9 and -e, lc / lp /
|
||||
-- pb variants, raw LZMA1 / LZMA2, .lzma files, xz with every check type, BCJ and delta filters, multiple blocks,
|
||||
-- multiple streams and stream padding) decodes to its corpus; consumed offsets; checksum / size / truncation errors;
|
||||
-- maxBytes; the fuzz no-throw pass. Fixtures: tools/fixtures/lzma.py.
|
||||
local T = require("@tests/T")
|
||||
local Lzma = require("@formats/codecs/Lzma")
|
||||
local Lzma = require("@formats/codecs/compress/Lzma")
|
||||
local Err = require("@formats/core/Err")
|
||||
local Fx = require("@tests/gen/lzma")
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
-- codecs/Lzw tests: GIF (LSB) and TIFF (MSB, early change) code streams from Pillow / libtiff decode to their data;
|
||||
-- codecs/compress/Lzw tests: GIF (LSB) and TIFF (MSB, early change) code streams from Pillow / libtiff decode to their data;
|
||||
-- our encoder round-trips random and structured data at every GIF minimum code size and through table resets; the
|
||||
-- output limit, truncated and corrupt streams; the fuzz no-throw pass. Fixtures: tools/fixtures/lzw.py.
|
||||
local T = require("@tests/T")
|
||||
local Lzw = require("@formats/codecs/Lzw")
|
||||
local Lzw = require("@formats/codecs/compress/Lzw")
|
||||
local Fx = require("@tests/gen/lzw")
|
||||
|
||||
local t = T.suite("lzw")
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
-- codecs/model/Mat4 tests: compose / decompose round trips (with a mirrored axis), strict decompose refusing shear,
|
||||
-- quaternion <-> matrix, Euler orders, the affine inverse, row-major conversion, points, the normal matrix.
|
||||
local T = require("@tests/T")
|
||||
local Mat4 = require("@formats/codecs/model/Mat4")
|
||||
|
||||
local t = T.suite("mat4")
|
||||
|
||||
local function near(a: { number }, b: { number }, eps: number?): boolean
|
||||
for i = 1, #b do
|
||||
if math.abs(a[i] - b[i]) > (eps or 1e-9) then
|
||||
return false
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
local q = Mat4.axisAngle(1, 2, 3, 40)
|
||||
local m = Mat4.compose({ 1, 2, 3 }, q, { 2, -3, 0.5 })
|
||||
local tt, rr, ss = Mat4.decompose(m)
|
||||
local back = Mat4.compose(tt, rr, ss)
|
||||
t:check(near(back, m, 1e-9), "compose / decompose round trip (negative scale)")
|
||||
t:check(near(Mat4.quat(Mat4.fromQuat(q)), q, 1e-12) or near(Mat4.quat(Mat4.fromQuat(q)), { -q[1], -q[2], -q[3], -q[4] }, 1e-12), "quat <-> matrix")
|
||||
local shear = Mat4.identity()
|
||||
shear[5] = 0.5
|
||||
t:check(Mat4.decomposeStrict(shear) == nil, "strict decompose refuses shear")
|
||||
t:check(Mat4.decompose(shear) ~= nil, "lenient decompose always answers")
|
||||
local inv = Mat4.inverse(m) :: { number }
|
||||
t:check(near(Mat4.mul(m, inv), Mat4.identity(), 1e-9), "inverse")
|
||||
t:check(Mat4.inverse(Mat4.scaling(1, 0, 1)) == nil, "singular")
|
||||
t:check(near(Mat4.fromRows(Mat4.toRows(m)), m), "rows round trip")
|
||||
local x, y, z = Mat4.point(Mat4.translation(1, 2, 3), 1, 1, 1)
|
||||
t:check(x == 2 and y == 3 and z == 4, "point")
|
||||
-- Euler: "xyz" applies X first (R = Rz * Ry * Rx)
|
||||
local e = Mat4.euler(10, 20, 30)
|
||||
local manual = Mat4.mul(Mat4.rotation(3, 30), Mat4.mul(Mat4.rotation(2, 20), Mat4.rotation(1, 10)))
|
||||
t:check(near(e, manual, 1e-12), "euler xyz")
|
||||
local ex = Mat4.eulerXYZ(Mat4.quat(e))
|
||||
t:check(near(ex, { 10, 20, 30 }, 1e-9), "eulerXYZ")
|
||||
-- the normal matrix of a non-uniform scale is the inverse scale
|
||||
t:check(near(Mat4.normalMatrix(Mat4.scaling(2, 4, 8)), Mat4.scaling(0.5, 0.25, 0.125)), "normal matrix")
|
||||
local rot = Mat4.fromQuat(q)
|
||||
t:check(near(Mat4.normalMatrix(rot), rot, 1e-12), "normal matrix of a rotation is the rotation")
|
||||
t:done()
|
||||
@@ -1,8 +1,8 @@
|
||||
-- codecs/Mdct tests: the FFT against a direct DFT for mixed-radix sizes, the forward / inverse MDCT and the DCT-IV
|
||||
-- codecs/audio/Mdct tests: the FFT against a direct DFT for mixed-radix sizes, the forward / inverse MDCT and the DCT-IV
|
||||
-- against their O(N^2) definitions (AAC, Vorbis and CELT sizes), perfect reconstruction (TDAC) with the sine, KBD and
|
||||
-- Vorbis windows, window power complementarity, bad sizes. No fixtures (the definitions are the reference).
|
||||
local T = require("@tests/T")
|
||||
local Mdct = require("@formats/codecs/Mdct")
|
||||
local Mdct = require("@formats/codecs/audio/Mdct")
|
||||
|
||||
local t = T.suite("mdct")
|
||||
local rand = T.rng(7)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- codecs/Mpeg1 tests, ported from mpeg1-luau tests/decode.luau and tests/robust.luau. Against ffmpeg
|
||||
-- codecs/video/Mpeg1 tests, ported from mpeg1-luau tests/decode.luau and tests/robust.luau. Against ffmpeg
|
||||
-- (tools/fixtures/mpeg1.py): every stream decodes, one access unit at a time, to as many frames as ffmpeg's decode,
|
||||
-- in display order; each frame's RGBA channel means within 1.5 of ffmpeg's; whole sampled frames within 2 MAE per
|
||||
-- channel (IDCT and colour rounding) and, as yuv420p (frameImage), within a PSNR floor of ffmpeg -pix_fmt yuv420p;
|
||||
@@ -7,9 +7,9 @@
|
||||
-- B-frame reordering, string input, truncated units, bit flips and garbage (never throws, recovers at an
|
||||
-- I-picture), an oversized sequence header; frameImage; the fuzz no-throw pass.
|
||||
local T = require("@tests/T")
|
||||
local Mpeg1 = require("@formats/codecs/Mpeg1")
|
||||
local Mpeg1 = require("@formats/codecs/video/Mpeg1")
|
||||
local Base64 = require("@formats/core/Base64")
|
||||
local Deflate = require("@formats/codecs/Deflate")
|
||||
local Deflate = require("@formats/codecs/compress/Deflate")
|
||||
local Types = require("@formats/Types")
|
||||
|
||||
local STREAMS = {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
-- codecs/Quantize tests: palette size bounds for every method and colour budget, the exact (lossless) palette at
|
||||
-- codecs/image/Quantize tests: palette size bounds for every method and colour budget, the exact (lossless) palette at
|
||||
-- <= maxColors colours, transparency handling, PSNR of quantized images above thresholds, determinism of both
|
||||
-- methods and of Floyd-Steinberg dithering (the same CRC on both runtimes), bad arguments, and a no-throw pass.
|
||||
local T = require("@tests/T")
|
||||
local Quantize = require("@formats/codecs/Quantize")
|
||||
local Quantize = require("@formats/codecs/image/Quantize")
|
||||
local Crc32 = require("@formats/core/Crc32")
|
||||
|
||||
local t = T.suite("quantize")
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
-- codecs/Raster tests: exact coverage of axis-aligned rectangles at fractional positions; areas of circles; random
|
||||
-- codecs/image/Raster tests: exact coverage of axis-aligned rectangles at fractional positions; areas of circles; random
|
||||
-- polygons and curves under random transforms against an independent 12 x 12 supersampled winding-number reference
|
||||
-- (both fill rules); clipping, the stroker (width, caps, joins against analytic areas), fill() compositing and paint
|
||||
-- functions; malformed paths never throw. Glyph rendering against FreeType is in tests/font/ttf.luau.
|
||||
local T = require("@tests/T")
|
||||
local R = require("@formats/codecs/Raster")
|
||||
local R = require("@formats/codecs/image/Raster")
|
||||
local Types = require("@formats/Types")
|
||||
|
||||
local t = T.suite("raster")
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
-- codecs/Resample tests: sines through common rate pairs (44100 <-> 48000, 8000 -> 48000, 48000 -> 22050, an inexact
|
||||
-- codecs/audio/Resample tests: sines through common rate pairs (44100 <-> 48000, 8000 -> 48000, 48000 -> 22050, an inexact
|
||||
-- ratio) against the analytic signal, alias rejection when downsampling, output lengths, streaming in odd chunks =
|
||||
-- the whole-buffer result, multichannel, a Pcm source wrapper, bad arguments, and a no-throw pass over garbage.
|
||||
local T = require("@tests/T")
|
||||
local Resample = require("@formats/codecs/Resample")
|
||||
local Pcm = require("@formats/codecs/Pcm")
|
||||
local Resample = require("@formats/codecs/audio/Resample")
|
||||
local Pcm = require("@formats/codecs/audio/Pcm")
|
||||
local Types = require("@formats/Types")
|
||||
|
||||
local t = T.suite("resample")
|
||||
@@ -92,7 +92,7 @@ do
|
||||
t:check(snr(got, gf, ch, 48000, { 700, 1900 }, 500) > 80, "stereo accuracy")
|
||||
end
|
||||
|
||||
-- 4. a codecs/Pcm source at a new rate
|
||||
-- 4. a codecs/audio/Pcm source at a new rate
|
||||
do
|
||||
local a = Types.Audio.new(22050, 1, 5000)
|
||||
a.samples = sine(5000, 1, 22050, { 500 })
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
-- codecs/Url + codecs/Text tests: every example of RFC 3986 section 5.4 (normal and abnormal), dot-segment removal,
|
||||
-- codecs/text/Url + codecs/text/Text tests: every example of RFC 3986 section 5.4 (normal and abnormal), dot-segment removal,
|
||||
-- splitting, encoding and the location helpers (ported from playlist-luau tests/url.luau); random references against
|
||||
-- Python's urllib.parse.urljoin; Url.locate / Url.base; Windows-1252 decoding against Python's cp1252 codec; lines,
|
||||
-- BOM, trim; the fuzz pass. Fixtures: tools/fixtures/playlist.py.
|
||||
local T = require("@tests/T")
|
||||
local Url = require("@formats/codecs/Url")
|
||||
local Text = require("@formats/codecs/Text")
|
||||
local Url = require("@formats/codecs/text/Url")
|
||||
local Text = require("@formats/codecs/text/Text")
|
||||
local Ref = require("@tests/gen/playlist_url")
|
||||
local Cp = require("@tests/gen/playlist_cp1252")
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
-- codecs/Vp8 tests: the VP8 key frames of the WebP fixtures (cwebp at many settings and libvpx through ffmpeg, with
|
||||
-- codecs/image/Vp8 tests: the VP8 key frames of the WebP fixtures (cwebp at many settings and libvpx through ffmpeg, with
|
||||
-- 1..8 token partitions) decoded through the codec API: the yuv420p planes against dwebp -yuv, toRgba against
|
||||
-- dwebp -pam (fancy upsampling) and -nofancy, the decoder object over successive frames, headers, error codes and the
|
||||
-- fuzz no-throw pass on raw frames. Fixtures: tools/fixtures/webp.py.
|
||||
local T = require("@tests/T")
|
||||
local Vp8 = require("@formats/codecs/Vp8")
|
||||
local Vp8 = require("@formats/codecs/image/Vp8")
|
||||
local Crc32 = require("@formats/core/Crc32")
|
||||
local Err = require("@formats/core/Err")
|
||||
local Cases = require("@tests/gen/webp_cases")
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
-- codecs/Vp8L tests: the VP8L bitstreams of the WebP fixtures (cwebp -z 0..9, -exact, near-lossless) decoded through
|
||||
-- codecs/image/Vp8L tests: the VP8L bitstreams of the WebP fixtures (cwebp -z 0..9, -exact, near-lossless) decoded through
|
||||
-- the codec API against dwebp, the encoder at every effort on generated images (gradients, noise, palettes of 1..300
|
||||
-- colours, odd sizes, alpha), headerless alpha streams, error codes, and the fuzz no-throw pass on raw bitstreams.
|
||||
-- Fixtures: tools/fixtures/webp.py.
|
||||
local T = require("@tests/T")
|
||||
local Vp8L = require("@formats/codecs/Vp8L")
|
||||
local Vp8L = require("@formats/codecs/image/Vp8L")
|
||||
local Crc32 = require("@formats/core/Crc32")
|
||||
local Err = require("@formats/core/Err")
|
||||
local Cases = require("@tests/gen/webp_cases")
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
-- codecs/Vp8 video tests: whole IVF streams through one decoder object, every shown frame bit-exact against ffmpeg's
|
||||
-- codecs/image/Vp8 video tests: whole IVF streams through one decoder object, every shown frame bit-exact against ffmpeg's
|
||||
-- native vp8 decoder (yuv420p CRC32): the official VP8 test vectors (vp80-00-comprehensive-001..018 and others) and
|
||||
-- libvpx clips at many settings (alt-ref / hidden frames, golden, token partitions, error resilience, profiles 1-3,
|
||||
-- sharpness, segmentation, q extremes, short key frame intervals, motion off the frame, odd sizes). Also hidden
|
||||
-- frames, reset() and inter frames without a key frame, and the fuzz no-throw pass over damaged streams.
|
||||
-- Fixtures: tools/fixtures/vp8video.py.
|
||||
local T = require("@tests/T")
|
||||
local Vp8 = require("@formats/codecs/Vp8")
|
||||
local Vp8 = require("@formats/codecs/image/Vp8")
|
||||
local Crc32 = require("@formats/core/Crc32")
|
||||
local Err = require("@formats/core/Err")
|
||||
local Cases = require("@tests/gen/vp8video_cases")
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
-- codecs/Xml tests: random documents (namespaces, escapes, CDATA, comments, PIs, DOCTYPE entities, UTF-16, Latin-1)
|
||||
-- codecs/text/Xml tests: random documents (namespaces, escapes, CDATA, comments, PIs, DOCTYPE entities, UTF-16, Latin-1)
|
||||
-- against Python's ElementTree trees; encode -> decode round trips; well-formedness verdicts against expat
|
||||
-- (hand-written cases and random mutations); events, helpers, options, error codes; the fuzz pass.
|
||||
-- Fixtures: tools/fixtures/xml.py.
|
||||
local T = require("@tests/T")
|
||||
local Xml = require("@formats/codecs/Xml")
|
||||
local Xml = require("@formats/codecs/text/Xml")
|
||||
local Types = require("@formats/Types")
|
||||
local Err = require("@formats/core/Err")
|
||||
local Docs = require("@tests/gen/xml_docs")
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
-- codecs/Zstd tests: every fixture case (the zstd CLI at levels 1..19, --ultra -22, --fast, --long, small windows,
|
||||
-- codecs/compress/Zstd tests: every fixture case (the zstd CLI at levels 1..19, --ultra -22, --fast, --long, small windows,
|
||||
-- with / without checksum and content size, multi-frame and skippable frames, empty input) decodes to its corpus;
|
||||
-- offsets / consumedEnd; XXH64 vectors; checksum, limit and error codes; truncated / corrupted / random input never
|
||||
-- throws. Fixtures: tools/fixtures/zstd.py.
|
||||
local T = require("@tests/T")
|
||||
local Zstd = require("@formats/codecs/Zstd")
|
||||
local Zstd = require("@formats/codecs/compress/Zstd")
|
||||
local Err = require("@formats/core/Err")
|
||||
local Fx = require("@tests/gen/zstd")
|
||||
|
||||
|
||||
Reference in new issue
Block a user