merge ws/perf-audio (Ogg page CRC via core Crc32.msb from ws/perf-core)

This commit is contained in:
4DBug committed 2026-11-01 20:57:10 -06:00
commit 6ddc5b6017
113 files changed
+4582 -2280

No files matched your search

+765 -265
View File
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
Binary file not shown.
+16 -16
View File
@@ -16,30 +16,30 @@
"Brotli": [[8, "src/Rosetta/codecs/compress/Brotli/init.luau"], [95, "src/Rosetta/codecs/compress/Brotli/Decode.luau"], [1071, "src/Rosetta/codecs/compress/Brotli/Static.luau"]], "Brotli": [[8, "src/Rosetta/codecs/compress/Brotli/init.luau"], [95, "src/Rosetta/codecs/compress/Brotli/Decode.luau"], [1071, "src/Rosetta/codecs/compress/Brotli/Static.luau"]],
"Lzma": [[8, "src/Rosetta/codecs/compress/Lzma/init.luau"], [548, "src/Rosetta/codecs/compress/Lzma/Crc64.luau"], [615, "src/Rosetta/codecs/compress/Lzma/Decode.luau"], [1088, "src/Rosetta/codecs/compress/Lzma/Filters.luau"]], "Lzma": [[8, "src/Rosetta/codecs/compress/Lzma/init.luau"], [548, "src/Rosetta/codecs/compress/Lzma/Crc64.luau"], [615, "src/Rosetta/codecs/compress/Lzma/Decode.luau"], [1088, "src/Rosetta/codecs/compress/Lzma/Filters.luau"]],
"Zstd": [[8, "src/Rosetta/codecs/compress/Zstd/init.luau"], [65, "src/Rosetta/codecs/compress/Zstd/Decode.luau"], [1049, "src/Rosetta/codecs/compress/Zstd/Xxh64.luau"]], "Zstd": [[8, "src/Rosetta/codecs/compress/Zstd/init.luau"], [65, "src/Rosetta/codecs/compress/Zstd/Decode.luau"], [1049, "src/Rosetta/codecs/compress/Zstd/Xxh64.luau"]],
"Mpa": [[8, "src/Rosetta/codecs/audio/Mpa/init.luau"], [22, "src/Rosetta/codecs/audio/Mpa/Analysis.luau"], [81, "src/Rosetta/codecs/audio/Mpa/Core.luau"], [1684, "src/Rosetta/codecs/audio/Mpa/EncTables.luau"], [1976, "src/Rosetta/codecs/audio/Mpa/Encode2.luau"], [2361, "src/Rosetta/codecs/audio/Mpa/Encode3.luau"], [3002, "src/Rosetta/codecs/audio/Mpa/Header.luau"], [3143, "src/Rosetta/codecs/audio/Mpa/Tables.luau"]], "Mpa": [[8, "src/Rosetta/codecs/audio/Mpa/init.luau"], [23, "src/Rosetta/codecs/audio/Mpa/Analysis.luau"], [82, "src/Rosetta/codecs/audio/Mpa/Core.luau"], [1740, "src/Rosetta/codecs/audio/Mpa/EncTables.luau"], [2033, "src/Rosetta/codecs/audio/Mpa/Encode2.luau"], [2418, "src/Rosetta/codecs/audio/Mpa/Encode3.luau"], [3059, "src/Rosetta/codecs/audio/Mpa/Header.luau"], [3200, "src/Rosetta/codecs/audio/Mpa/Tables.luau"]],
"Opus": [[8, "src/Rosetta/codecs/audio/Opus/init.luau"], [22, "src/Rosetta/codecs/audio/Opus/Celt.luau"], [1869, "src/Rosetta/codecs/audio/Opus/CeltEncoder.luau"], [2934, "src/Rosetta/codecs/audio/Opus/CeltTables.luau"], [2994, "src/Rosetta/codecs/audio/Opus/Decoder.luau"], [3454, "src/Rosetta/codecs/audio/Opus/Mdct.luau"], [3791, "src/Rosetta/codecs/audio/Opus/Packet.luau"], [4024, "src/Rosetta/codecs/audio/Opus/Silk.luau"], [6060, "src/Rosetta/codecs/audio/Opus/SilkTables.luau"]], "Opus": [[8, "src/Rosetta/codecs/audio/Opus/init.luau"], [23, "src/Rosetta/codecs/audio/Opus/Celt.luau"], [1895, "src/Rosetta/codecs/audio/Opus/CeltEncoder.luau"], [2960, "src/Rosetta/codecs/audio/Opus/CeltTables.luau"], [3021, "src/Rosetta/codecs/audio/Opus/Decoder.luau"], [3485, "src/Rosetta/codecs/audio/Opus/Mdct.luau"], [3836, "src/Rosetta/codecs/audio/Opus/Packet.luau"], [4069, "src/Rosetta/codecs/audio/Opus/Silk.luau"], [6111, "src/Rosetta/codecs/audio/Opus/SilkTables.luau"]],
"Vorbis": [[8, "src/Rosetta/codecs/audio/Vorbis/init.luau"], [21, "src/Rosetta/codecs/audio/Vorbis/Codebook.luau"], [405, "src/Rosetta/codecs/audio/Vorbis/Packet.luau"], [971, "src/Rosetta/codecs/audio/Vorbis/Setup.luau"], [1392, "src/Rosetta/codecs/audio/Vorbis/Tables.luau"]], "Vorbis": [[8, "src/Rosetta/codecs/audio/Vorbis/init.luau"], [22, "src/Rosetta/codecs/audio/Vorbis/Codebook.luau"], [406, "src/Rosetta/codecs/audio/Vorbis/Packet.luau"], [979, "src/Rosetta/codecs/audio/Vorbis/Setup.luau"], [1401, "src/Rosetta/codecs/audio/Vorbis/Tables.luau"]],
"Aac": [[8, "src/Rosetta/codecs/audio/Aac/init.luau"], [327, "src/Rosetta/codecs/audio/Aac/Decode.luau"], [1210, "src/Rosetta/codecs/audio/Aac/Tables.luau"]], "Aac": [[8, "src/Rosetta/codecs/audio/Aac/init.luau"], [328, "src/Rosetta/codecs/audio/Aac/Decode.luau"], [1227, "src/Rosetta/codecs/audio/Aac/Tables.luau"]],
"Flac": [[8, "src/Rosetta/codecs/audio/Flac/init.luau"], [19, "src/Rosetta/codecs/audio/Flac/Encode.luau"], [968, "src/Rosetta/codecs/audio/Flac/Frame.luau"]], "Flac": [[8, "src/Rosetta/codecs/audio/Flac/init.luau"], [20, "src/Rosetta/codecs/audio/Flac/Encode.luau"], [969, "src/Rosetta/codecs/audio/Flac/Frame.luau"]],
"Musepack": [[8, "src/Rosetta/codecs/audio/Musepack/init.luau"], [353, "src/Rosetta/codecs/audio/Musepack/Decode.luau"], [1247, "src/Rosetta/codecs/audio/Musepack/Tables.luau"]], "Musepack": [[8, "src/Rosetta/codecs/audio/Musepack/init.luau"], [354, "src/Rosetta/codecs/audio/Musepack/Decode.luau"], [1248, "src/Rosetta/codecs/audio/Musepack/Tables.luau"]],
"WavPack": [[8, "src/Rosetta/codecs/audio/WavPack/init.luau"], [230, "src/Rosetta/codecs/audio/WavPack/Block.luau"], [1685, "src/Rosetta/codecs/audio/WavPack/Tables.luau"]], "WavPack": [[8, "src/Rosetta/codecs/audio/WavPack/init.luau"], [231, "src/Rosetta/codecs/audio/WavPack/Block.luau"], [1686, "src/Rosetta/codecs/audio/WavPack/Tables.luau"]],
"Tracker": [[8, "src/Rosetta/codecs/audio/Tracker/init.luau"], [490, "src/Rosetta/codecs/audio/Tracker/Load.luau"], [768, "src/Rosetta/codecs/audio/Tracker/Mixer.luau"], [937, "src/Rosetta/codecs/audio/Tracker/Pcm.luau"], [1065, "src/Rosetta/codecs/audio/Tracker/Player.luau"], [3053, "src/Rosetta/codecs/audio/Tracker/Tables.luau"]], "Tracker": [[8, "src/Rosetta/codecs/audio/Tracker/init.luau"], [491, "src/Rosetta/codecs/audio/Tracker/Load.luau"], [770, "src/Rosetta/codecs/audio/Tracker/Mixer.luau"], [1017, "src/Rosetta/codecs/audio/Tracker/Pcm.luau"], [1146, "src/Rosetta/codecs/audio/Tracker/Player.luau"], [3135, "src/Rosetta/codecs/audio/Tracker/Tables.luau"]],
"Hively": [[8, "src/Rosetta/codecs/audio/Hively/init.luau"], [204, "src/Rosetta/codecs/audio/Hively/Load.luau"], [453, "src/Rosetta/codecs/audio/Hively/Player.luau"], [1411, "src/Rosetta/codecs/audio/Hively/Tables.luau"]], "Hively": [[8, "src/Rosetta/codecs/audio/Hively/init.luau"], [205, "src/Rosetta/codecs/audio/Hively/Load.luau"], [455, "src/Rosetta/codecs/audio/Hively/Player.luau"], [1414, "src/Rosetta/codecs/audio/Hively/Tables.luau"]],
"SoundFont": [[8, "src/Rosetta/codecs/audio/SoundFont/init.luau"], [62, "src/Rosetta/codecs/audio/SoundFont/Fallback.luau"], [205, "src/Rosetta/codecs/audio/SoundFont/Parse.luau"], [718, "src/Rosetta/codecs/audio/SoundFont/Synth.luau"]], "SoundFont": [[8, "src/Rosetta/codecs/audio/SoundFont/init.luau"], [63, "src/Rosetta/codecs/audio/SoundFont/Fallback.luau"], [207, "src/Rosetta/codecs/audio/SoundFont/Parse.luau"], [721, "src/Rosetta/codecs/audio/SoundFont/Synth.luau"]],
"Draco": [[8, "src/Rosetta/codecs/model/Draco/init.luau"], [340, "src/Rosetta/codecs/model/Draco/Attributes.luau"], [809, "src/Rosetta/codecs/model/Draco/Connectivity.luau"], [1998, "src/Rosetta/codecs/model/Draco/Int64.luau"], [2147, "src/Rosetta/codecs/model/Draco/KdTree.luau"], [2506, "src/Rosetta/codecs/model/Draco/Predict.luau"], [3468, "src/Rosetta/codecs/model/Draco/Reader.luau"]], "Draco": [[8, "src/Rosetta/codecs/model/Draco/init.luau"], [340, "src/Rosetta/codecs/model/Draco/Attributes.luau"], [809, "src/Rosetta/codecs/model/Draco/Connectivity.luau"], [1998, "src/Rosetta/codecs/model/Draco/Int64.luau"], [2147, "src/Rosetta/codecs/model/Draco/KdTree.luau"], [2506, "src/Rosetta/codecs/model/Draco/Predict.luau"], [3468, "src/Rosetta/codecs/model/Draco/Reader.luau"]],
"archive_1": [[8, "src/Rosetta/archive/7z/init.luau"], [393, "src/Rosetta/archive/7z/Header.luau"], [920, "src/Rosetta/archive/adf/init.luau"], [1202, "src/Rosetta/archive/applesingle/init.luau"], [1388, "src/Rosetta/archive/ar/init.luau"], [1791, "src/Rosetta/archive/arj/init.luau"], [2001, "src/Rosetta/archive/binhex/init.luau"], [2250, "src/Rosetta/archive/br/init.luau"], [2325, "src/Rosetta/archive/bz2/init.luau"], [2389, "src/Rosetta/archive/cab/init.luau"], [2802, "src/Rosetta/archive/cab/Sum.luau"], [2843, "src/Rosetta/archive/cpio/init.luau"], [3011, "src/Rosetta/archive/d64/init.luau"], [3425, "src/Rosetta/archive/fat/init.luau"], [3547, "src/Rosetta/archive/grp/init.luau"], [3661, "src/Rosetta/archive/gzip/init.luau"], [3846, "src/Rosetta/archive/iso/init.luau"], [3918, "src/Rosetta/archive/lha/init.luau"], [4343, "src/Rosetta/archive/lz4/init.luau"], [4687, "src/Rosetta/archive/macbinary/init.luau"], [4885, "src/Rosetta/archive/mpq/init.luau"], [5291, "src/Rosetta/archive/mpq/Crypt.luau"], [5356, "src/Rosetta/archive/pak/init.luau"], [5490, "src/Rosetta/archive/rpm/init.luau"], [5814, "src/Rosetta/archive/tar/init.luau"], [5932, "src/Rosetta/archive/unitypackage/init.luau"], [6168, "src/Rosetta/archive/uu/init.luau"], [6438, "src/Rosetta/archive/vpk/init.luau"], [6749, "src/Rosetta/archive/vswap/init.luau"], [7019, "src/Rosetta/archive/wad/init.luau"], [7473, "src/Rosetta/archive/wad/Picture.luau"], [7575, "src/Rosetta/archive/wad2/init.luau"], [7857, "src/Rosetta/archive/xz/init.luau"]], "archive_1": [[8, "src/Rosetta/archive/7z/init.luau"], [393, "src/Rosetta/archive/7z/Header.luau"], [920, "src/Rosetta/archive/adf/init.luau"], [1202, "src/Rosetta/archive/applesingle/init.luau"], [1388, "src/Rosetta/archive/ar/init.luau"], [1791, "src/Rosetta/archive/arj/init.luau"], [2001, "src/Rosetta/archive/binhex/init.luau"], [2250, "src/Rosetta/archive/br/init.luau"], [2325, "src/Rosetta/archive/bz2/init.luau"], [2389, "src/Rosetta/archive/cab/init.luau"], [2802, "src/Rosetta/archive/cab/Sum.luau"], [2843, "src/Rosetta/archive/cpio/init.luau"], [3011, "src/Rosetta/archive/d64/init.luau"], [3425, "src/Rosetta/archive/fat/init.luau"], [3547, "src/Rosetta/archive/grp/init.luau"], [3661, "src/Rosetta/archive/gzip/init.luau"], [3846, "src/Rosetta/archive/iso/init.luau"], [3918, "src/Rosetta/archive/lha/init.luau"], [4343, "src/Rosetta/archive/lz4/init.luau"], [4687, "src/Rosetta/archive/macbinary/init.luau"], [4885, "src/Rosetta/archive/mpq/init.luau"], [5291, "src/Rosetta/archive/mpq/Crypt.luau"], [5356, "src/Rosetta/archive/pak/init.luau"], [5490, "src/Rosetta/archive/rpm/init.luau"], [5814, "src/Rosetta/archive/tar/init.luau"], [5932, "src/Rosetta/archive/unitypackage/init.luau"], [6168, "src/Rosetta/archive/uu/init.luau"], [6438, "src/Rosetta/archive/vpk/init.luau"], [6749, "src/Rosetta/archive/vswap/init.luau"], [7019, "src/Rosetta/archive/wad/init.luau"], [7473, "src/Rosetta/archive/wad/Picture.luau"], [7575, "src/Rosetta/archive/wad2/init.luau"], [7857, "src/Rosetta/archive/xz/init.luau"]],
"archive_2": [[8, "src/Rosetta/archive/yenc/init.luau"], [280, "src/Rosetta/archive/z/init.luau"], [376, "src/Rosetta/archive/zip/init.luau"], [595, "src/Rosetta/archive/zoo/init.luau"], [791, "src/Rosetta/archive/zst/init.luau"]], "archive_2": [[8, "src/Rosetta/archive/yenc/init.luau"], [280, "src/Rosetta/archive/z/init.luau"], [376, "src/Rosetta/archive/zip/init.luau"], [595, "src/Rosetta/archive/zoo/init.luau"], [791, "src/Rosetta/archive/zst/init.luau"]],
"audio": [[8, "src/Rosetta/audio/aac/init.luau"], [214, "src/Rosetta/audio/ac3/init.luau"], [360, "src/Rosetta/audio/adpcm/init.luau"], [505, "src/Rosetta/audio/adx/init.luau"], [736, "src/Rosetta/audio/aiff/init.luau"], [1127, "src/Rosetta/audio/ape/init.luau"], [1255, "src/Rosetta/audio/au/init.luau"], [1416, "src/Rosetta/audio/brstm/init.luau"], [1707, "src/Rosetta/audio/caf/init.luau"], [2369, "src/Rosetta/audio/flac/init.luau"], [2517, "src/Rosetta/audio/flac/Meta.luau"], [2739, "src/Rosetta/audio/flac/Stream.luau"], [3109, "src/Rosetta/audio/m4a/init.luau"], [3443, "src/Rosetta/audio/mp3/init.luau"], [3703, "src/Rosetta/audio/mp3/Index.luau"], [3894, "src/Rosetta/audio/mp3/Stream.luau"], [4121, "src/Rosetta/audio/mp3/Tags.luau"], [4433, "src/Rosetta/audio/mpc/init.luau"], [4527, "src/Rosetta/audio/opus/init.luau"], [4905, "src/Rosetta/audio/opus/Encode.luau"], [5016, "src/Rosetta/audio/qoa/init.luau"], [5196, "src/Rosetta/audio/tta/init.luau"], [5314, "src/Rosetta/audio/vag/init.luau"], [5537, "src/Rosetta/audio/voc/init.luau"], [5812, "src/Rosetta/audio/vorbis/init.luau"], [6266, "src/Rosetta/audio/vorbis/Encode.luau"], [7079, "src/Rosetta/audio/wav/init.luau"], [7700, "src/Rosetta/audio/wav/Codecs.luau"], [7866, "src/Rosetta/audio/wavpack/init.luau"]], "audio": [[8, "src/Rosetta/audio/aac/init.luau"], [215, "src/Rosetta/audio/ac3/init.luau"], [362, "src/Rosetta/audio/adpcm/init.luau"], [508, "src/Rosetta/audio/adx/init.luau"], [740, "src/Rosetta/audio/aiff/init.luau"], [1132, "src/Rosetta/audio/ape/init.luau"], [1261, "src/Rosetta/audio/au/init.luau"], [1423, "src/Rosetta/audio/brstm/init.luau"], [1715, "src/Rosetta/audio/caf/init.luau"], [2378, "src/Rosetta/audio/flac/init.luau"], [2527, "src/Rosetta/audio/flac/Meta.luau"], [2749, "src/Rosetta/audio/flac/Stream.luau"], [3119, "src/Rosetta/audio/m4a/init.luau"], [3454, "src/Rosetta/audio/mp3/init.luau"], [3715, "src/Rosetta/audio/mp3/Index.luau"], [3906, "src/Rosetta/audio/mp3/Stream.luau"], [4133, "src/Rosetta/audio/mp3/Tags.luau"], [4445, "src/Rosetta/audio/mpc/init.luau"], [4540, "src/Rosetta/audio/opus/init.luau"], [4919, "src/Rosetta/audio/opus/Encode.luau"], [5031, "src/Rosetta/audio/qoa/init.luau"], [5212, "src/Rosetta/audio/tta/init.luau"], [5331, "src/Rosetta/audio/vag/init.luau"], [5555, "src/Rosetta/audio/voc/init.luau"], [5831, "src/Rosetta/audio/vorbis/init.luau"], [6286, "src/Rosetta/audio/vorbis/Encode.luau"], [7099, "src/Rosetta/audio/wav/init.luau"], [7720, "src/Rosetta/audio/wav/Codecs.luau"], [7899, "src/Rosetta/audio/wavpack/init.luau"]],
"cad": [[8, "src/Rosetta/cad/step/init.luau"], [390, "src/Rosetta/cad/step/Brep.luau"], [625, "src/Rosetta/cad/step/Parse.luau"], [1182, "src/Rosetta/cad/step/Write.luau"]], "cad": [[8, "src/Rosetta/cad/step/init.luau"], [390, "src/Rosetta/cad/step/Brep.luau"], [625, "src/Rosetta/cad/step/Parse.luau"], [1182, "src/Rosetta/cad/step/Write.luau"]],
"codecs_audio": [[8, "src/Rosetta/codecs/audio/Ac3/init.luau"], [167, "src/Rosetta/codecs/audio/Ac3/Decode.luau"], [1052, "src/Rosetta/codecs/audio/Ac3/Tables.luau"], [1153, "src/Rosetta/codecs/audio/Adpcm/Decoder.luau"], [1455, "src/Rosetta/codecs/audio/Alac/init.luau"], [1689, "src/Rosetta/codecs/audio/Alac/Decode.luau"], [2108, "src/Rosetta/codecs/audio/Alac/Encode.luau"], [2520, "src/Rosetta/codecs/audio/Ape/init.luau"], [2735, "src/Rosetta/codecs/audio/Ape/Decode.luau"], [3496, "src/Rosetta/codecs/audio/ApeTag.luau"], [3593, "src/Rosetta/codecs/audio/Mdct/init.luau"], [3777, "src/Rosetta/codecs/audio/Mdct/Fft.luau"], [3986, "src/Rosetta/codecs/audio/MidiRender.luau"], [4332, "src/Rosetta/codecs/audio/Pcm/init.luau"], [4595, "src/Rosetta/codecs/audio/Pcm/Convert.luau"], [4892, "src/Rosetta/codecs/audio/Qoa/init.luau"], [5174, "src/Rosetta/codecs/audio/Resample/init.luau"], [5533, "src/Rosetta/codecs/audio/Stream.luau"], [5694, "src/Rosetta/codecs/audio/Tta/init.luau"], [5811, "src/Rosetta/codecs/audio/Tta/Decode.luau"], [6063, "src/Rosetta/codecs/audio/VorbisComment.luau"]], "codecs_audio": [[8, "src/Rosetta/codecs/audio/Ac3/init.luau"], [168, "src/Rosetta/codecs/audio/Ac3/Decode.luau"], [1053, "src/Rosetta/codecs/audio/Ac3/Tables.luau"], [1155, "src/Rosetta/codecs/audio/Adpcm/Decoder.luau"], [1458, "src/Rosetta/codecs/audio/Alac/init.luau"], [1693, "src/Rosetta/codecs/audio/Alac/Decode.luau"], [2112, "src/Rosetta/codecs/audio/Alac/Encode.luau"], [2524, "src/Rosetta/codecs/audio/Ape/init.luau"], [2740, "src/Rosetta/codecs/audio/Ape/Decode.luau"], [3501, "src/Rosetta/codecs/audio/ApeTag.luau"], [3599, "src/Rosetta/codecs/audio/Mdct/init.luau"], [3819, "src/Rosetta/codecs/audio/Mdct/Fft.luau"], [4073, "src/Rosetta/codecs/audio/MidiRender.luau"], [4420, "src/Rosetta/codecs/audio/Pcm/init.luau"], [4684, "src/Rosetta/codecs/audio/Pcm/Convert.luau"], [4981, "src/Rosetta/codecs/audio/Qoa/init.luau"], [5263, "src/Rosetta/codecs/audio/Resample/init.luau"], [5658, "src/Rosetta/codecs/audio/Stream.luau"], [5820, "src/Rosetta/codecs/audio/Tta/init.luau"], [5938, "src/Rosetta/codecs/audio/Tta/Decode.luau"], [6190, "src/Rosetta/codecs/audio/VorbisComment.luau"]],
"codecs_compress": [[8, "src/Rosetta/codecs/compress/Bzip2/init.luau"], [52, "src/Rosetta/codecs/compress/Bzip2/Decode.luau"], [565, "src/Rosetta/codecs/compress/Explode.luau"], [761, "src/Rosetta/codecs/compress/Lz4.luau"], [1030, "src/Rosetta/codecs/compress/Lzh/init.luau"], [1634, "src/Rosetta/codecs/compress/Lzw/init.luau"], [1902, "src/Rosetta/codecs/compress/Lzx.luau"], [2336, "src/Rosetta/codecs/compress/PackBits.luau"], [2426, "src/Rosetta/codecs/compress/Quantum.luau"], [2663, "src/Rosetta/codecs/compress/UnixCompress.luau"], [2967, "src/Rosetta/codecs/compress/Xxh32.luau"]], "codecs_compress": [[8, "src/Rosetta/codecs/compress/Bzip2/init.luau"], [52, "src/Rosetta/codecs/compress/Bzip2/Decode.luau"], [565, "src/Rosetta/codecs/compress/Explode.luau"], [761, "src/Rosetta/codecs/compress/Lz4.luau"], [1030, "src/Rosetta/codecs/compress/Lzh/init.luau"], [1634, "src/Rosetta/codecs/compress/Lzw/init.luau"], [1902, "src/Rosetta/codecs/compress/Lzx.luau"], [2336, "src/Rosetta/codecs/compress/PackBits.luau"], [2426, "src/Rosetta/codecs/compress/Quantum.luau"], [2663, "src/Rosetta/codecs/compress/UnixCompress.luau"], [2967, "src/Rosetta/codecs/compress/Xxh32.luau"]],
"codecs_entropy": [[8, "src/Rosetta/codecs/entropy/Huffman.luau"], [295, "src/Rosetta/codecs/entropy/RangeCoder/init.luau"], [306, "src/Rosetta/codecs/entropy/RangeCoder/Decoder.luau"], [520, "src/Rosetta/codecs/entropy/RangeCoder/Encoder.luau"]], "codecs_entropy": [[8, "src/Rosetta/codecs/entropy/Huffman.luau"], [295, "src/Rosetta/codecs/entropy/RangeCoder/init.luau"], [306, "src/Rosetta/codecs/entropy/RangeCoder/Decoder.luau"], [527, "src/Rosetta/codecs/entropy/RangeCoder/Encoder.luau"]],
"codecs_font": [[8, "src/Rosetta/codecs/font/Bitmap.luau"], [209, "src/Rosetta/codecs/font/Cff/init.luau"], [850, "src/Rosetta/codecs/font/GlyphNames.luau"], [1000, "src/Rosetta/codecs/font/TrueType/init.luau"], [1314, "src/Rosetta/codecs/font/TrueType/Glyf.luau"], [1706, "src/Rosetta/codecs/font/TrueType/Tables.luau"]], "codecs_font": [[8, "src/Rosetta/codecs/font/Bitmap.luau"], [209, "src/Rosetta/codecs/font/Cff/init.luau"], [850, "src/Rosetta/codecs/font/GlyphNames.luau"], [1000, "src/Rosetta/codecs/font/TrueType/init.luau"], [1314, "src/Rosetta/codecs/font/TrueType/Glyf.luau"], [1706, "src/Rosetta/codecs/font/TrueType/Tables.luau"]],
"codecs_image": [[8, "src/Rosetta/codecs/image/Blend.luau"], [387, "src/Rosetta/codecs/image/Etc.luau"], [685, "src/Rosetta/codecs/image/Half.luau"], [754, "src/Rosetta/codecs/image/Miptex.luau"], [1054, "src/Rosetta/codecs/image/Pixels.luau"], [1374, "src/Rosetta/codecs/image/Quantize/init.luau"], [1835, "src/Rosetta/codecs/image/Raster.luau"], [2532, "src/Rosetta/codecs/image/Texel.luau"], [2905, "src/Rosetta/codecs/image/Texture.luau"]], "codecs_image": [[8, "src/Rosetta/codecs/image/Blend.luau"], [387, "src/Rosetta/codecs/image/Etc.luau"], [685, "src/Rosetta/codecs/image/Half.luau"], [754, "src/Rosetta/codecs/image/Miptex.luau"], [1054, "src/Rosetta/codecs/image/Pixels.luau"], [1374, "src/Rosetta/codecs/image/Quantize/init.luau"], [1835, "src/Rosetta/codecs/image/Raster.luau"], [2532, "src/Rosetta/codecs/image/Texel.luau"], [2905, "src/Rosetta/codecs/image/Texture.luau"]],
"codecs_model": [[8, "src/Rosetta/codecs/model/Brush.luau"], [648, "src/Rosetta/codecs/model/Displacement.luau"], [797, "src/Rosetta/codecs/model/DoomMap/init.luau"], [1242, "src/Rosetta/codecs/model/DoomMap/Udmf.luau"], [1492, "src/Rosetta/codecs/model/Mat4.luau"], [1751, "src/Rosetta/codecs/model/MeshFlatten.luau"], [2279, "src/Rosetta/codecs/model/Minecraft/init.luau"], [2831, "src/Rosetta/codecs/model/Minecraft/Colors.luau"], [2910, "src/Rosetta/codecs/model/Minecraft/Legacy.luau"], [3017, "src/Rosetta/codecs/model/Minecraft/Packed.luau"], [3223, "src/Rosetta/codecs/model/Patch.luau"], [3347, "src/Rosetta/codecs/model/Polygon.luau"], [3581, "src/Rosetta/codecs/model/Rbx/Binary.luau"], [4335, "src/Rosetta/codecs/model/Rig.luau"], [4578, "src/Rosetta/codecs/model/Sampler.luau"], [4738, "src/Rosetta/codecs/model/SourceAnim.luau"], [4959, "src/Rosetta/codecs/model/Vrml/init.luau"], [5107, "src/Rosetta/codecs/model/Vrml/Build.luau"], [5681, "src/Rosetta/codecs/model/Vrml/Fields.luau"], [5844, "src/Rosetta/codecs/model/Vrml/Geometry.luau"], [6593, "src/Rosetta/codecs/model/Vrml/Parse.luau"], [7115, "src/Rosetta/codecs/model/Vrml/Write.luau"], [7842, "src/Rosetta/codecs/model/Vrml/Xml.luau"]], "codecs_model": [[8, "src/Rosetta/codecs/model/Brush.luau"], [648, "src/Rosetta/codecs/model/Displacement.luau"], [797, "src/Rosetta/codecs/model/DoomMap/init.luau"], [1242, "src/Rosetta/codecs/model/DoomMap/Udmf.luau"], [1492, "src/Rosetta/codecs/model/Mat4.luau"], [1751, "src/Rosetta/codecs/model/MeshFlatten.luau"], [2279, "src/Rosetta/codecs/model/Minecraft/init.luau"], [2831, "src/Rosetta/codecs/model/Minecraft/Colors.luau"], [2910, "src/Rosetta/codecs/model/Minecraft/Legacy.luau"], [3017, "src/Rosetta/codecs/model/Minecraft/Packed.luau"], [3223, "src/Rosetta/codecs/model/Patch.luau"], [3347, "src/Rosetta/codecs/model/Polygon.luau"], [3581, "src/Rosetta/codecs/model/Rbx/Binary.luau"], [4335, "src/Rosetta/codecs/model/Rig.luau"], [4578, "src/Rosetta/codecs/model/Sampler.luau"], [4738, "src/Rosetta/codecs/model/SourceAnim.luau"], [4959, "src/Rosetta/codecs/model/Vrml/init.luau"], [5107, "src/Rosetta/codecs/model/Vrml/Build.luau"], [5681, "src/Rosetta/codecs/model/Vrml/Fields.luau"], [5844, "src/Rosetta/codecs/model/Vrml/Geometry.luau"], [6593, "src/Rosetta/codecs/model/Vrml/Parse.luau"], [7115, "src/Rosetta/codecs/model/Vrml/Write.luau"], [7842, "src/Rosetta/codecs/model/Vrml/Xml.luau"]],
"codecs_text": [[8, "src/Rosetta/codecs/text/GodotVariant.luau"], [667, "src/Rosetta/codecs/text/Json/init.luau"], [936, "src/Rosetta/codecs/text/Json/Decode.luau"], [1371, "src/Rosetta/codecs/text/Json/Encode.luau"], [1716, "src/Rosetta/codecs/text/KeyValues/init.luau"], [2286, "src/Rosetta/codecs/text/KeyValues/Binary.luau"], [2592, "src/Rosetta/codecs/text/Lexer/init.luau"], [2724, "src/Rosetta/codecs/text/Nbt/init.luau"], [3077, "src/Rosetta/codecs/text/Nbt/Binary.luau"], [3769, "src/Rosetta/codecs/text/Nbt/Snbt.luau"], [4409, "src/Rosetta/codecs/text/Nbt/Value.luau"], [4647, "src/Rosetta/codecs/text/Text/init.luau"], [4738, "src/Rosetta/codecs/text/Url/init.luau"], [4943, "src/Rosetta/codecs/text/Xml/init.luau"], [5393, "src/Rosetta/codecs/text/Xml/Parse.luau"]], "codecs_text": [[8, "src/Rosetta/codecs/text/GodotVariant.luau"], [667, "src/Rosetta/codecs/text/Json/init.luau"], [936, "src/Rosetta/codecs/text/Json/Decode.luau"], [1371, "src/Rosetta/codecs/text/Json/Encode.luau"], [1716, "src/Rosetta/codecs/text/KeyValues/init.luau"], [2286, "src/Rosetta/codecs/text/KeyValues/Binary.luau"], [2592, "src/Rosetta/codecs/text/Lexer/init.luau"], [2724, "src/Rosetta/codecs/text/Nbt/init.luau"], [3077, "src/Rosetta/codecs/text/Nbt/Binary.luau"], [3769, "src/Rosetta/codecs/text/Nbt/Snbt.luau"], [4409, "src/Rosetta/codecs/text/Nbt/Value.luau"], [4647, "src/Rosetta/codecs/text/Text/init.luau"], [4738, "src/Rosetta/codecs/text/Url/init.luau"], [4943, "src/Rosetta/codecs/text/Xml/init.luau"], [5393, "src/Rosetta/codecs/text/Xml/Parse.luau"]],
"codecs_video": [[8, "src/Rosetta/codecs/video/Video/Source.luau"]], "codecs_video": [[8, "src/Rosetta/codecs/video/Video/Source.luau"]],
"containers": [[8, "src/Rosetta/containers/Archive.luau"], [275, "src/Rosetta/containers/Avi/init.luau"], [827, "src/Rosetta/containers/Blend.luau"], [1566, "src/Rosetta/containers/Chunks.luau"], [1701, "src/Rosetta/containers/Cpio.luau"], [2129, "src/Rosetta/containers/Demux.luau"], [2404, "src/Rosetta/containers/Ebml/init.luau"], [2717, "src/Rosetta/containers/Fat.luau"], [3405, "src/Rosetta/containers/Iso9660.luau"], [3910, "src/Rosetta/containers/IsoBmff/init.luau"], [4080, "src/Rosetta/containers/IsoBmff/Box.luau"], [4268, "src/Rosetta/containers/IsoBmff/Demux.luau"], [5113, "src/Rosetta/containers/IsoBmff/Meta.luau"], [5634, "src/Rosetta/containers/IsoBmff/Mux.luau"], [6150, "src/Rosetta/containers/IsoBmff/QtPalette.luau"], [6267, "src/Rosetta/containers/MacFile.luau"], [6416, "src/Rosetta/containers/Ogg/init.luau"], [6841, "src/Rosetta/containers/Ogg/Page.luau"], [7007, "src/Rosetta/containers/Riff/init.luau"], [7324, "src/Rosetta/containers/Tar.luau"], [7738, "src/Rosetta/containers/Zip/init.luau"]], "containers": [[8, "src/Rosetta/containers/Archive.luau"], [275, "src/Rosetta/containers/Avi/init.luau"], [827, "src/Rosetta/containers/Blend.luau"], [1566, "src/Rosetta/containers/Chunks.luau"], [1701, "src/Rosetta/containers/Cpio.luau"], [2129, "src/Rosetta/containers/Demux.luau"], [2404, "src/Rosetta/containers/Ebml/init.luau"], [2717, "src/Rosetta/containers/Fat.luau"], [3405, "src/Rosetta/containers/Iso9660.luau"], [3910, "src/Rosetta/containers/IsoBmff/init.luau"], [4081, "src/Rosetta/containers/IsoBmff/Box.luau"], [4270, "src/Rosetta/containers/IsoBmff/Demux.luau"], [5116, "src/Rosetta/containers/IsoBmff/Meta.luau"], [5638, "src/Rosetta/containers/IsoBmff/Mux.luau"], [6155, "src/Rosetta/containers/IsoBmff/QtPalette.luau"], [6273, "src/Rosetta/containers/MacFile.luau"], [6422, "src/Rosetta/containers/Ogg/init.luau"], [6847, "src/Rosetta/containers/Ogg/Page.luau"], [7013, "src/Rosetta/containers/Riff/init.luau"], [7330, "src/Rosetta/containers/Tar.luau"], [7744, "src/Rosetta/containers/Zip/init.luau"]],
"core": [[8, "src/Rosetta/core/Adler32.luau"], [68, "src/Rosetta/core/Base64.luau"], [296, "src/Rosetta/core/Bits.luau"], [589, "src/Rosetta/core/Crc16.luau"], [641, "src/Rosetta/core/Md5.luau"], [799, "src/Rosetta/core/Sniff.luau"]], "core": [[8, "src/Rosetta/core/Adler32.luau"], [68, "src/Rosetta/core/Base64.luau"], [296, "src/Rosetta/core/Bits.luau"], [589, "src/Rosetta/core/Crc16.luau"], [641, "src/Rosetta/core/Md5.luau"], [799, "src/Rosetta/core/Sniff.luau"]],
"data": [[8, "src/Rosetta/data/cbor/init.luau"], [107, "src/Rosetta/data/cbor/Codec.luau"], [676, "src/Rosetta/data/csv/init.luau"], [988, "src/Rosetta/data/ini/init.luau"], [1234, "src/Rosetta/data/json/init.luau"], [1326, "src/Rosetta/data/msgpack/init.luau"], [1415, "src/Rosetta/data/msgpack/Codec.luau"], [1857, "src/Rosetta/data/nbt/init.luau"], [1916, "src/Rosetta/data/plist/init.luau"], [2222, "src/Rosetta/data/plist/Binary.luau"], [2489, "src/Rosetta/data/q3shader/init.luau"], [2728, "src/Rosetta/data/q3skin/init.luau"], [2824, "src/Rosetta/data/snbt/init.luau"], [2887, "src/Rosetta/data/toml/init.luau"], [2954, "src/Rosetta/data/toml/Decode.luau"], [3582, "src/Rosetta/data/toml/Encode.luau"], [3791, "src/Rosetta/data/tres/init.luau"], [3936, "src/Rosetta/data/vdf/init.luau"], [4037, "src/Rosetta/data/xml/init.luau"], [4093, "src/Rosetta/data/yaml/init.luau"], [4166, "src/Rosetta/data/yaml/Emit.luau"], [4456, "src/Rosetta/data/yaml/Parse.luau"]], "data": [[8, "src/Rosetta/data/cbor/init.luau"], [107, "src/Rosetta/data/cbor/Codec.luau"], [676, "src/Rosetta/data/csv/init.luau"], [988, "src/Rosetta/data/ini/init.luau"], [1234, "src/Rosetta/data/json/init.luau"], [1326, "src/Rosetta/data/msgpack/init.luau"], [1415, "src/Rosetta/data/msgpack/Codec.luau"], [1857, "src/Rosetta/data/nbt/init.luau"], [1916, "src/Rosetta/data/plist/init.luau"], [2222, "src/Rosetta/data/plist/Binary.luau"], [2489, "src/Rosetta/data/q3shader/init.luau"], [2728, "src/Rosetta/data/q3skin/init.luau"], [2824, "src/Rosetta/data/snbt/init.luau"], [2887, "src/Rosetta/data/toml/init.luau"], [2954, "src/Rosetta/data/toml/Decode.luau"], [3582, "src/Rosetta/data/toml/Encode.luau"], [3791, "src/Rosetta/data/tres/init.luau"], [3936, "src/Rosetta/data/vdf/init.luau"], [4037, "src/Rosetta/data/xml/init.luau"], [4093, "src/Rosetta/data/yaml/init.luau"], [4166, "src/Rosetta/data/yaml/Emit.luau"], [4456, "src/Rosetta/data/yaml/Parse.luau"]],
"font": [[8, "src/Rosetta/font/bdf/init.luau"], [297, "src/Rosetta/font/bmfont/init.luau"], [724, "src/Rosetta/font/bmfont/Parse.luau"], [1177, "src/Rosetta/font/eot/init.luau"], [1409, "src/Rosetta/font/fon/init.luau"], [1692, "src/Rosetta/font/hershey/init.luau"], [1887, "src/Rosetta/font/pcf/init.luau"], [2167, "src/Rosetta/font/psf/init.luau"], [2487, "src/Rosetta/font/ttf/init.luau"], [2538, "src/Rosetta/font/type1/init.luau"], [2897, "src/Rosetta/font/type1/Charstring.luau"], [3175, "src/Rosetta/font/woff/init.luau"], [3307, "src/Rosetta/font/woff2/init.luau"], [3364, "src/Rosetta/font/woff2/Rebuild.luau"]], "font": [[8, "src/Rosetta/font/bdf/init.luau"], [297, "src/Rosetta/font/bmfont/init.luau"], [724, "src/Rosetta/font/bmfont/Parse.luau"], [1177, "src/Rosetta/font/eot/init.luau"], [1409, "src/Rosetta/font/fon/init.luau"], [1692, "src/Rosetta/font/hershey/init.luau"], [1887, "src/Rosetta/font/pcf/init.luau"], [2167, "src/Rosetta/font/psf/init.luau"], [2487, "src/Rosetta/font/ttf/init.luau"], [2538, "src/Rosetta/font/type1/init.luau"], [2897, "src/Rosetta/font/type1/Charstring.luau"], [3175, "src/Rosetta/font/woff/init.luau"], [3307, "src/Rosetta/font/woff2/init.luau"], [3364, "src/Rosetta/font/woff2/Rebuild.luau"]],
@@ -54,8 +54,8 @@
"model_5": [[8, "src/Rosetta/model/ply/init.luau"], [1113, "src/Rosetta/model/ply/Binary.luau"], [1314, "src/Rosetta/model/pmx/init.luau"], [1383, "src/Rosetta/model/pmx/Build.luau"], [1679, "src/Rosetta/model/pmx/Pmd.luau"], [2014, "src/Rosetta/model/pmx/Read.luau"], [2418, "src/Rosetta/model/proc/init.luau"], [2800, "src/Rosetta/model/qb/init.luau"], [3193, "src/Rosetta/model/rbxm/init.luau"], [3786, "src/Rosetta/model/rbxmx/init.luau"], [4462, "src/Rosetta/model/robloxmesh/init.luau"], [5121, "src/Rosetta/model/robloxmesh/Parse.luau"], [5578, "src/Rosetta/model/robloxmesh/Write.luau"], [5687, "src/Rosetta/model/schematic/init.luau"], [6008, "src/Rosetta/model/schematic/Common.luau"], [6128, "src/Rosetta/model/schematic/Litematic.luau"], [6339, "src/Rosetta/model/schematic/Mcedit.luau"], [6583, "src/Rosetta/model/schematic/Sponge.luau"], [6712, "src/Rosetta/model/smd/init.luau"], [6779, "src/Rosetta/model/smd/Read.luau"], [7048, "src/Rosetta/model/smd/Write.luau"], [7291, "src/Rosetta/model/sourcemdl/init.luau"], [7462, "src/Rosetta/model/sourcemdl/Build.luau"], [7892, "src/Rosetta/model/sourcemdl/Material.luau"]], "model_5": [[8, "src/Rosetta/model/ply/init.luau"], [1113, "src/Rosetta/model/ply/Binary.luau"], [1314, "src/Rosetta/model/pmx/init.luau"], [1383, "src/Rosetta/model/pmx/Build.luau"], [1679, "src/Rosetta/model/pmx/Pmd.luau"], [2014, "src/Rosetta/model/pmx/Read.luau"], [2418, "src/Rosetta/model/proc/init.luau"], [2800, "src/Rosetta/model/qb/init.luau"], [3193, "src/Rosetta/model/rbxm/init.luau"], [3786, "src/Rosetta/model/rbxmx/init.luau"], [4462, "src/Rosetta/model/robloxmesh/init.luau"], [5121, "src/Rosetta/model/robloxmesh/Parse.luau"], [5578, "src/Rosetta/model/robloxmesh/Write.luau"], [5687, "src/Rosetta/model/schematic/init.luau"], [6008, "src/Rosetta/model/schematic/Common.luau"], [6128, "src/Rosetta/model/schematic/Litematic.luau"], [6339, "src/Rosetta/model/schematic/Mcedit.luau"], [6583, "src/Rosetta/model/schematic/Sponge.luau"], [6712, "src/Rosetta/model/smd/init.luau"], [6779, "src/Rosetta/model/smd/Read.luau"], [7048, "src/Rosetta/model/smd/Write.luau"], [7291, "src/Rosetta/model/sourcemdl/init.luau"], [7462, "src/Rosetta/model/sourcemdl/Build.luau"], [7892, "src/Rosetta/model/sourcemdl/Material.luau"]],
"model_6": [[8, "src/Rosetta/model/sourcemdl/Mdl.luau"], [535, "src/Rosetta/model/sourcemdl/Phy.luau"], [658, "src/Rosetta/model/sourcemdl/Vtx.luau"], [840, "src/Rosetta/model/sourcemdl/Vvd.luau"], [934, "src/Rosetta/model/stl/init.luau"], [1384, "src/Rosetta/model/stl/Decode.luau"], [1458, "src/Rosetta/model/t3d/init.luau"], [1552, "src/Rosetta/model/t3d/Build.luau"], [1957, "src/Rosetta/model/t3d/Parse.luau"], [2125, "src/Rosetta/model/udmf/init.luau"], [2208, "src/Rosetta/model/usda/init.luau"], [2417, "src/Rosetta/model/usda/Build.luau"], [3695, "src/Rosetta/model/usda/Parse.luau"], [4493, "src/Rosetta/model/usda/Write.luau"], [5310, "src/Rosetta/model/vbsp/init.luau"], [5756, "src/Rosetta/model/vbsp/Faces.luau"], [5980, "src/Rosetta/model/vbsp/Props.luau"], [6072, "src/Rosetta/model/vmf/init.luau"], [6397, "src/Rosetta/model/vmf/Build.luau"], [6821, "src/Rosetta/model/vox/init.luau"], [7707, "src/Rosetta/model/vox/Grid.luau"], [7764, "src/Rosetta/model/vrml/init.luau"], [7830, "src/Rosetta/model/x/init.luau"]], "model_6": [[8, "src/Rosetta/model/sourcemdl/Mdl.luau"], [535, "src/Rosetta/model/sourcemdl/Phy.luau"], [658, "src/Rosetta/model/sourcemdl/Vtx.luau"], [840, "src/Rosetta/model/sourcemdl/Vvd.luau"], [934, "src/Rosetta/model/stl/init.luau"], [1384, "src/Rosetta/model/stl/Decode.luau"], [1458, "src/Rosetta/model/t3d/init.luau"], [1552, "src/Rosetta/model/t3d/Build.luau"], [1957, "src/Rosetta/model/t3d/Parse.luau"], [2125, "src/Rosetta/model/udmf/init.luau"], [2208, "src/Rosetta/model/usda/init.luau"], [2417, "src/Rosetta/model/usda/Build.luau"], [3695, "src/Rosetta/model/usda/Parse.luau"], [4493, "src/Rosetta/model/usda/Write.luau"], [5310, "src/Rosetta/model/vbsp/init.luau"], [5756, "src/Rosetta/model/vbsp/Faces.luau"], [5980, "src/Rosetta/model/vbsp/Props.luau"], [6072, "src/Rosetta/model/vmf/init.luau"], [6397, "src/Rosetta/model/vmf/Build.luau"], [6821, "src/Rosetta/model/vox/init.luau"], [7707, "src/Rosetta/model/vox/Grid.luau"], [7764, "src/Rosetta/model/vrml/init.luau"], [7830, "src/Rosetta/model/x/init.luau"]],
"model_7": [[8, "src/Rosetta/model/x/Build.luau"], [571, "src/Rosetta/model/x/Parse.luau"], [868, "src/Rosetta/model/x3d/init.luau"]], "model_7": [[8, "src/Rosetta/model/x/Build.luau"], [571, "src/Rosetta/model/x/Parse.luau"], [868, "src/Rosetta/model/x3d/init.luau"]],
"music": [[8, "src/Rosetta/music/669/init.luau"], [214, "src/Rosetta/music/ahx/init.luau"], [265, "src/Rosetta/music/far/init.luau"], [494, "src/Rosetta/music/hmp/init.luau"], [758, "src/Rosetta/music/hvl/init.luau"], [809, "src/Rosetta/music/it/init.luau"], [1227, "src/Rosetta/music/it/Itsex.luau"], [1343, "src/Rosetta/music/med/init.luau"], [1990, "src/Rosetta/music/midi/init.luau"], [2133, "src/Rosetta/music/midi/Smf.luau"], [2544, "src/Rosetta/music/mod/init.luau"], [2897, "src/Rosetta/music/mtm/init.luau"], [3119, "src/Rosetta/music/mus/init.luau"], [3276, "src/Rosetta/music/okt/init.luau"], [3557, "src/Rosetta/music/ptm/init.luau"], [3779, "src/Rosetta/music/s3m/init.luau"], [4015, "src/Rosetta/music/sf2/init.luau"], [4058, "src/Rosetta/music/stm/init.luau"], [4289, "src/Rosetta/music/ult/init.luau"], [4593, "src/Rosetta/music/umx/init.luau"], [4809, "src/Rosetta/music/xm/init.luau"], [5370, "src/Rosetta/music/xmi/init.luau"]], "music": [[8, "src/Rosetta/music/669/init.luau"], [215, "src/Rosetta/music/ahx/init.luau"], [267, "src/Rosetta/music/far/init.luau"], [497, "src/Rosetta/music/hmp/init.luau"], [762, "src/Rosetta/music/hvl/init.luau"], [814, "src/Rosetta/music/it/init.luau"], [1233, "src/Rosetta/music/it/Itsex.luau"], [1350, "src/Rosetta/music/med/init.luau"], [1998, "src/Rosetta/music/midi/init.luau"], [2142, "src/Rosetta/music/midi/Smf.luau"], [2554, "src/Rosetta/music/mod/init.luau"], [2908, "src/Rosetta/music/mtm/init.luau"], [3131, "src/Rosetta/music/mus/init.luau"], [3289, "src/Rosetta/music/okt/init.luau"], [3571, "src/Rosetta/music/ptm/init.luau"], [3794, "src/Rosetta/music/s3m/init.luau"], [4031, "src/Rosetta/music/sf2/init.luau"], [4075, "src/Rosetta/music/stm/init.luau"], [4307, "src/Rosetta/music/ult/init.luau"], [4612, "src/Rosetta/music/umx/init.luau"], [4829, "src/Rosetta/music/xm/init.luau"], [5391, "src/Rosetta/music/xmi/init.luau"]],
"ops": [[8, "src/Rosetta/ops/AudioOps.luau"], [457, "src/Rosetta/ops/LayerOps.luau"], [550, "src/Rosetta/ops/MeshOps/init.luau"], [1602, "src/Rosetta/ops/MeshOps/Greedy.luau"], [1769, "src/Rosetta/ops/MusicOps.luau"]], "ops": [[8, "src/Rosetta/ops/AudioOps.luau"], [487, "src/Rosetta/ops/LayerOps.luau"], [580, "src/Rosetta/ops/MeshOps/init.luau"], [1632, "src/Rosetta/ops/MeshOps/Greedy.luau"], [1799, "src/Rosetta/ops/MusicOps.luau"]],
"playlist": [[8, "src/Rosetta/playlist/m3u/init.luau"], [361, "src/Rosetta/playlist/pls/init.luau"], [539, "src/Rosetta/playlist/xspf/init.luau"]], "playlist": [[8, "src/Rosetta/playlist/m3u/init.luau"], [361, "src/Rosetta/playlist/pls/init.luau"], [539, "src/Rosetta/playlist/xspf/init.luau"]],
"subtitle": [[8, "src/Rosetta/subtitle/ass/init.luau"], [452, "src/Rosetta/subtitle/srt/init.luau"], [625, "src/Rosetta/subtitle/vtt/init.luau"]], "subtitle": [[8, "src/Rosetta/subtitle/ass/init.luau"], [452, "src/Rosetta/subtitle/srt/init.luau"], [625, "src/Rosetta/subtitle/vtt/init.luau"]],
"vector": [[8, "src/Rosetta/vector/gamemaps/init.luau"], [195, "src/Rosetta/vector/gamemaps/Expand.luau"], [292, "src/Rosetta/vector/ldtk/init.luau"], [384, "src/Rosetta/vector/ldtk/Read.luau"], [720, "src/Rosetta/vector/ldtk/Write.luau"], [1368, "src/Rosetta/vector/ogmo/init.luau"], [1487, "src/Rosetta/vector/ogmo/Read.luau"], [1892, "src/Rosetta/vector/ogmo/Write.luau"], [2246, "src/Rosetta/vector/svg/init.luau"], [2332, "src/Rosetta/vector/svg/Parse.luau"], [3078, "src/Rosetta/vector/svg/PathData.luau"], [3446, "src/Rosetta/vector/svg/Render.luau"], [3863, "src/Rosetta/vector/svg/Style.luau"], [4235, "src/Rosetta/vector/svg/Write.luau"], [4435, "src/Rosetta/vector/tiled/init.luau"], [4615, "src/Rosetta/vector/tiled/Data.luau"], [4766, "src/Rosetta/vector/tiled/Tmj.luau"], [5397, "src/Rosetta/vector/tiled/Tmx.luau"]], "vector": [[8, "src/Rosetta/vector/gamemaps/init.luau"], [195, "src/Rosetta/vector/gamemaps/Expand.luau"], [292, "src/Rosetta/vector/ldtk/init.luau"], [384, "src/Rosetta/vector/ldtk/Read.luau"], [720, "src/Rosetta/vector/ldtk/Write.luau"], [1368, "src/Rosetta/vector/ogmo/init.luau"], [1487, "src/Rosetta/vector/ogmo/Read.luau"], [1892, "src/Rosetta/vector/ogmo/Write.luau"], [2246, "src/Rosetta/vector/svg/init.luau"], [2332, "src/Rosetta/vector/svg/Parse.luau"], [3078, "src/Rosetta/vector/svg/PathData.luau"], [3446, "src/Rosetta/vector/svg/Render.luau"], [3863, "src/Rosetta/vector/svg/Style.luau"], [4235, "src/Rosetta/vector/svg/Write.luau"], [4435, "src/Rosetta/vector/tiled/init.luau"], [4615, "src/Rosetta/vector/tiled/Data.luau"], [4766, "src/Rosetta/vector/tiled/Tmj.luau"], [5397, "src/Rosetta/vector/tiled/Tmx.luau"]],
+765 -265
View File
File diff suppressed because it is too large. Load diff
+793 -291
View File
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+4 -2
View File
@@ -462,9 +462,11 @@ do
if x ~= x then return x end if x ~= x then return x end
return mmin(mmax(x, lo), hi) return mmin(mmax(x, lo), hi)
end end
-- branch-free for the same reason (a data-dependent sign spawned side traces: WavPack's decorrelation 2x slower);
-- x * 1e300 * 1e300 is +-inf or beyond +-1 for every non-zero x, 0 for 0; + 0 turns -0 into 0
math.sign = math.sign or function(x) math.sign = math.sign or function(x)
if x > 0 then return 1 elseif x < 0 then return -1 end if x ~= x then return 0 end
return 0 return mmin(mmax(x * 1e300 * 1e300, -1), 1) + 0
end end
-- Luau rounds half away from zero -- Luau rounds half away from zero
math.round = math.round or function(x) math.round = math.round or function(x)
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- audio/aac: raw AAC in ADTS framing (ISO/IEC 13818-7 / 14496-3 1.A.3). Supports: AAC-LC via codecs/audio/Aac (1-8 -- audio/aac: raw AAC in ADTS framing (ISO/IEC 13818-7 / 14496-3 1.A.3). Supports: AAC-LC via codecs/audio/Aac (1-8
-- channels, every rate), CRC-protected headers, a leading ID3v2 tag, resync, seeking by frame; HE-AAC plays its -- channels, every rate), CRC-protected headers, a leading ID3v2 tag, resync, seeking by frame; HE-AAC plays its
-- AAC-LC core. Not supported: writing, ADIF, LATM. -- AAC-LC core. Not supported: writing, ADIF, LATM.
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- audio/ac3: raw AC-3 (Dolby Digital, ATSC A/52) via codecs/audio/Ac3. Supports: every channel layout (WAVE order, no -- audio/ac3: raw AC-3 (Dolby Digital, ATSC A/52) via codecs/audio/Ac3. Supports: every channel layout (WAVE order, no
-- downmix), 32 / 44.1 / 48 kHz, every bit rate, the CRC check, resync, exact seeking; drc 0 .. 1, off by default. -- downmix), 32 / 44.1 / 48 kHz, every bit rate, the CRC check, resync, exact seeking; drc 0 .. 1, off by default.
-- Not supported: writing, E-AC-3 (UNSUPPORTED), bsid 9 / 10 reduced-rate streams. -- Not supported: writing, E-AC-3 (UNSUPPORTED), bsid 9 / 10 reduced-rate streams.
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- audio/adpcm: headerless ADPCM (.adpcm / .ima / .vox) via codecs/audio/Adpcm; sniff is 0, the layout comes from opts. -- audio/adpcm: headerless ADPCM (.adpcm / .ima / .vox) via codecs/audio/Adpcm; sniff is 0, the layout comes from opts.
-- "ima": DVI nibbles, high first; "ima_wav": MS IMA blocks; "ms": MS ADPCM, 7 standard coefficient pairs; "ima_qt": -- "ima": DVI nibbles, high first; "ima_wav": MS IMA blocks; "ms": MS ADPCM, 7 standard coefficient pairs; "ima_qt":
-- Apple ima4 (34-byte packets, 64 frames); "psx": PS-ADPCM (16-byte frames, 28 samples). Encode: ima, ima_wav, ms. -- Apple ima4 (34-byte packets, 64 frames); "psx": PS-ADPCM (16-byte frames, 28 samples). Encode: ima, ima_wav, ms.
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- audio/adx: CRI ADX via codecs/audio/Adpcm; header and decoder follow vgmstream r2117 (ISC, -- audio/adx: CRI ADX via codecs/audio/Adpcm; header and decoder follow vgmstream r2117 (ISC,
-- licenses/vgmstream-LICENSE.txt), bit-exact with it. Supports: encoding type 3, versions 3-5, 1-8 channels, loop -- licenses/vgmstream-LICENSE.txt), bit-exact with it. Supports: encoding type 3, versions 3-5, 1-8 channels, loop
-- points; encode as version 4. Not supported: encrypted ADX (0x0408 / 0x0409), encoding types 2 and 4, AHX. -- points; encode as version 4. Not supported: encrypted ADX (0x0408 / 0x0409), encoding types 2 and 4, AHX.
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- audio/aiff: AIFF / AIFF-C (Apple AIFF 1.3, AIFF-C draft 1991). Supports: PCM 1-32 bits; AIFF-C NONE / twos / -- audio/aiff: AIFF / AIFF-C (Apple AIFF 1.3, AIFF-C draft 1991). Supports: PCM 1-32 bits; AIFF-C NONE / twos /
-- sowt / raw / in24 / in32 / fl32 / fl64 / ulaw / alaw / ima4; text chunks as tags; truncated SSND; encode 8-32 bit, -- sowt / raw / in24 / in32 / fl32 / fl64 / ulaw / alaw / ima4; text chunks as tags; truncated SSND; encode 8-32 bit,
-- sowt, fl32, fl64, ulaw, alaw. Not supported: other compressed AIFF-C codecs, MARK / INST, the ID3 chunk. -- sowt, fl32, fl64, ulaw, alaw. Not supported: other compressed AIFF-C codecs, MARK / INST, the ID3 chunk.
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- audio/ape: Monkey's Audio (.ape) via codecs/audio/Ape and ApeTag, from the Monkey's Audio SDK 13.28 (BSD 3-clause, -- audio/ape: Monkey's Audio (.ape) via codecs/audio/Ape and ApeTag, from the Monkey's Audio SDK 13.28 (BSD 3-clause,
-- licenses/monkeys-audio-LICENSE.txt). Supports: versions 3.95+, every level, 8-32-bit integer and 32-bit float, 1-32 -- licenses/monkeys-audio-LICENSE.txt). Supports: versions 3.95+, every level, 8-32-bit integer and 32-bit float, 1-32
-- channels, an ID3v2 prefix, seeking by the seek table. Not supported: files before 3.95, encoding. -- channels, an ID3v2 prefix, seeking by the seek table. Not supported: files before 3.95, encoding.
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- audio/au: Sun / NeXT audio (.au / .snd), big endian. Supports: encodings 1 (mu-law), 2-5 (8-32-bit linear), 6 / 7 -- audio/au: Sun / NeXT audio (.au / .snd), big endian. Supports: encodings 1 (mu-law), 2-5 (8-32-bit linear), 6 / 7
-- (float), 27 (A-law), data size 0xFFFFFFFF (to the end), the annotation as tags.comment; encode to any of them. -- (float), 27 (A-law), data size 0xFFFFFFFF (to the end), the annotation as tags.comment; encode to any of them.
-- Not supported: G.721 / G.722 / G.723 ADPCM and the other NeXT encodings. -- Not supported: G.721 / G.722 / G.723 ADPCM and the other NeXT encodings.
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- audio/brstm: Nintendo BRSTM (Wii, "RSTM", BE), BCSTM (3DS, "CSTM", LE), BFSTM (Wii U BE / Switch LE, "FSTM"); layouts -- audio/brstm: Nintendo BRSTM (Wii, "RSTM", BE), BCSTM (3DS, "CSTM", LE), BFSTM (Wii U BE / Switch LE, "FSTM"); layouts
-- follow vgmstream r2117 (ISC, licenses/vgmstream-LICENSE.txt), bit-exact. Supports: DSP ADPCM, PCM16 / PCM8, 1-255 -- follow vgmstream r2117 (ISC, licenses/vgmstream-LICENSE.txt), bit-exact. Supports: DSP ADPCM, PCM16 / PCM8, 1-255
-- channels, loop points. Read only. Not supported: BCSTM IMA ADPCM, BRSTM 0.1, BFSTM regions, the track table. -- channels, loop points. Read only. Not supported: BCSTM IMA ADPCM, BRSTM 0.1, BFSTM regions, the track table.
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- audio/caf: Apple Core Audio Format (CAF 1.0 spec). Supports: linear PCM (8-32-bit integer, 32 / 64-bit float, either -- audio/caf: Apple Core Audio Format (CAF 1.0 spec). Supports: linear PCM (8-32-bit integer, 32 / 64-bit float, either
-- endian), ALAC, AAC-LC (kuki esds), mu-law, A-law, IMA4; pakt trimming, data size -1, info tags, seeking; encode PCM -- endian), ALAC, AAC-LC (kuki esds), mu-law, A-law, IMA4; pakt trimming, data size -1, info tags, seeking; encode PCM
-- (16 / 24-bit BE, 32-bit float) and ALAC (16 / 20 / 24-bit). Not supported: other compressed formats. -- (16 / 24-bit BE, 32-bit float) and ALAC (16 / 20 / 24-bit). Not supported: other compressed formats.
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- audio/flac: FLAC (RFC 9639), native and Ogg FLAC; absorbed from flac-luau 7083d0d (same author). Supports: every -- audio/flac: FLAC (RFC 9639), native and Ogg FLAC; absorbed from flac-luau 7083d0d (same author). Supports: every
-- subframe type, Rice / Rice2, 4-32 bits, 1-8 channels, CRC-16 resync, seeking, an ID3v2 prefix, the main metadata -- subframe type, Rice / Rice2, 4-32 bits, 1-8 channels, CRC-16 resync, seeking, an ID3v2 prefix, the main metadata
-- blocks; encode levels 0-8 (libFLAC presets), 4-24 bits. Not supported: MD5 check on decode, chained Ogg, Ogg output. -- blocks; encode levels 0-8 (libFLAC presets), 4-24 bits. Not supported: MD5 check on decode, chained Ogg, Ogg output.
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- audio/m4a: MPEG-4 audio (M4A / M4B / MP4 / MOV audio tracks) via containers/IsoBmff. Supports: AAC-LC (HE-AAC plays -- audio/m4a: MPEG-4 audio (M4A / M4B / MP4 / MOV audio tracks) via containers/IsoBmff. Supports: AAC-LC (HE-AAC plays
-- its core), ALAC, edit-list gapless trimming, seeking, iTunes tags and cover art; encode ALAC (16 / 20 / 24-bit, 1-8 -- its core), ALAC, edit-list gapless trimming, seeking, iTunes tags and cover art; encode ALAC (16 / 20 / 24-bit, 1-8
-- channels). Not supported: writing AAC, other codecs in MP4 (UNSUPPORTED), encrypted files. -- channels). Not supported: writing AAC, other codecs in MP4 (UNSUPPORTED), encrypted files.
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- audio/mp3: MPEG audio layers I-III (ISO/IEC 11172-3, 13818-3, MPEG-2.5); absorbed from mp3-luau c755bbf, a port of -- audio/mp3: MPEG audio layers I-III (ISO/IEC 11172-3, 13818-3, MPEG-2.5); absorbed from mp3-luau c755bbf, a port of
-- minimp3 by lieff (CC0: licenses/minimp3-CC0.txt). Supports: every mode, CBR / VBR / free format, Xing / LAME gapless, -- minimp3 by lieff (CC0: licenses/minimp3-CC0.txt). Supports: every mode, CBR / VBR / free format, Xing / LAME gapless,
-- exact seeking, ID3v2 / ID3v1 tags; encode layers III / II (CBR). Not supported: MPEG-2 multichannel, CRC, VBR output. -- exact seeking, ID3v2 / ID3v1 tags; encode layers III / II (CBR). Not supported: MPEG-2 multichannel, CRC, VBR output.
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- audio/mpc: Musepack (.mpc / .mp+ / .mpp) SV7 and SV8 via codecs/audio/Musepack (a libmpcdec port). Supports: mono / -- audio/mpc: Musepack (.mpc / .mp+ / .mpp) SV7 and SV8 via codecs/audio/Musepack (a libmpcdec port). Supports: mono /
-- stereo, 32-48 kHz, gapless length, seeking (SV8 exact; SV7 with 32 frames of pre-roll, as libmpcdec), APEv2 tags, -- stereo, 32-48 kHz, gapless length, seeking (SV8 exact; SV7 with 32 frames of pre-roll, as libmpcdec), APEv2 tags,
-- an ID3v2 prefix, ReplayGain in meta. Not supported: writing, SV4-SV6 (UNSUPPORTED), chapters. -- an ID3v2 prefix, ReplayGain in meta. Not supported: writing, SV4-SV6 (UNSUPPORTED), chapters.
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- audio/opus/Encode: Ogg Opus writing (RFC 7845), CELT only (TOC config 31: full band, 20 ms, code 0), family 0. -- audio/opus/Encode: Ogg Opus writing (RFC 7845), CELT only (TOC config 31: full band, 20 ms, code 0), family 0.
local Err = require("@rosetta/core/Err") local Err = require("@rosetta/core/Err")
local Bytes = require("@rosetta/core/Bytes") local Bytes = require("@rosetta/core/Bytes")
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- audio/opus: Ogg Opus (RFC 6716, RFC 7845); absorbed from opus-luau dd2b4e5, a port of the libopus 1.6 decoder (BSD: -- audio/opus: Ogg Opus (RFC 6716, RFC 7845); absorbed from opus-luau dd2b4e5, a port of the libopus 1.6 decoder (BSD:
-- licenses/libopus-BSD.txt). Supports: every mode / bandwidth / frame size, mapping families 0 / 1 / 255, seeking, PLC; -- licenses/libopus-BSD.txt). Supports: every mode / bandwidth / frame size, mapping families 0 / 1 / 255, seeking, PLC;
-- encode CELT only (20 ms, full band, CBR). Not supported: SILK / hybrid encoding, mapping family 3, chained streams. -- encode CELT only (20 ms, full band, CBR). Not supported: SILK / hybrid encoding, mapping family 3, chained streams.
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- audio/qoa: QOA "Quite OK Audio" via codecs/audio/Qoa (a port of qoa.h, phoboslab, MIT). Supports: static and -- audio/qoa: QOA "Quite OK Audio" via codecs/audio/Qoa (a port of qoa.h, phoboslab, MIT). Supports: static and
-- streaming files, 1-255 channels, rates up to 16777215 Hz, frame-accurate seeking; encode byte-for-byte as qoa_encode, -- streaming files, 1-255 channels, rates up to 16777215 Hz, frame-accurate seeking; encode byte-for-byte as qoa_encode,
-- 1-8 channels. Not supported: channel count or rate changes mid-stream. -- 1-8 channels. Not supported: channel count or rate changes mid-stream.
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- audio/tta: True Audio (.tta, TTA1) via codecs/audio/Tta, from the TTA1 format description. Supports: 8 / 16 / 24 -- audio/tta: True Audio (.tta, TTA1) via codecs/audio/Tta, from the TTA1 format description. Supports: 8 / 16 / 24
-- bits, any channel count, seeking by the seek table, APEv2 tags, an ID3v2 prefix. Not supported: password-protected -- bits, any channel count, seeking by the seek table, APEv2 tags, an ID3v2 prefix. Not supported: password-protected
-- files, TTA2, ID3v2 contents, encoding. -- files, TTA2, ID3v2 contents, encoding.
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- audio/vag: Sony VAG (PS-ADPCM: VAGp mono, VAGi stereo) and KVAG (IMA); layouts follow vgmstream r2117 (ISC, -- audio/vag: Sony VAG (PS-ADPCM: VAGp mono, VAGi stereo) and KVAG (IMA); layouts follow vgmstream r2117 (ISC,
-- licenses/vgmstream-LICENSE.txt), bit-exact, Sony's leading blank frame included. Supports: loop points; encode VAGp / -- licenses/vgmstream-LICENSE.txt), bit-exact, Sony's leading blank frame included. Supports: loop points; encode VAGp /
-- VAGi. Not supported: HEVAG (0x00020001 / 0x00030000), game-specific variants (pGAV, VAG1 / VAG2, Jak, ...). -- VAGi. Not supported: HEVAG (0x00020001 / 0x00030000), game-specific variants (pGAV, VAG1 / VAG2, Jak, ...).
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- audio/voc: Creative Voice File (.voc), from Creative's format description. Supports: block types 1, 2, 3, 5, 8, 9 -- audio/voc: Creative Voice File (.voc), from Creative's format description. Supports: block types 1, 2, 3, 5, 8, 9
-- (8 / 16-bit, A-law, mu-law); markers and repeats played once, as ffmpeg; truncated files; encode version 1.20 type 9 -- (8 / 16-bit, A-law, mu-law); markers and repeats played once, as ffmpeg; truncated files; encode version 1.20 type 9
-- blocks. Not supported: Creative ADPCM, channel count changes mid-file (the first block's rate is used). -- blocks. Not supported: Creative ADPCM, channel count changes mid-file (the first block's rate is used).
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- audio/vorbis: Ogg Vorbis (Vorbis I spec; RFC 5215); the decoder is a port of stb_vorbis 1.22 (public domain / MIT, -- audio/vorbis: Ogg Vorbis (Vorbis I spec; RFC 5215); the decoder is a port of stb_vorbis 1.22 (public domain / MIT,
-- licenses/stb_vorbis-LICENSE.txt) with libvorbis' sample-exact trimming and seeking. Supports: 1-255 channels, -- licenses/stb_vorbis-LICENSE.txt) with libvorbis' sample-exact trimming and seeking. Supports: 1-255 channels,
-- floor 1, residues 0-2, packetDecoder for Matroska / MP4; an encoder. Not supported: floor 0, chained streams. -- floor 1, residues 0-2, packetDecoder for Matroska / MP4; an encoder. Not supported: floor 0, chained streams.
+56 -43
View File
@@ -7,54 +7,60 @@ local readu8, readi8, readu16, readi16, readu32, readi32 =
local readf32, readf64, writef32, writeu32 = buffer.readf32, buffer.readf64, buffer.writef32, buffer.writeu32 local readf32, readf64, writef32, writeu32 = buffer.readf32, buffer.readf64, buffer.writef32, buffer.writeu32
local band, rshift, byteswap = bit32.band, bit32.rshift, bit32.byteswap local band, rshift, byteswap = bit32.band, bit32.rshift, bit32.byteswap
local writeu8, writeu16, writei16, writei32 = buffer.writeu8, buffer.writeu16, buffer.writei16, buffer.writei32 local writeu8, writeu16, writei16, writei32 = buffer.writeu8, buffer.writeu16, buffer.writei16, buffer.writei32
local floor = math.floor
local Codecs = {} local Codecs = {}
-- integer PCM: 1 byte = unsigned, 2 / 3 / 4 bytes = signed -- integer PCM: 1 byte = unsigned, 2 / 3 / 4 bytes = signed
function Codecs.int(src: buffer, off: number, dst: buffer, d: number, count: number, bytes: number, be: boolean) function Codecs.int(src: buffer, off: number, dst: buffer, d: number, count: number, bytes: number, be: boolean)
local o = d * 4 local o = d * 4
local e = off + (count - 1) * bytes -- the last sample's offset
if bytes == 1 then if bytes == 1 then
for i = 0, count - 1 do for s = off, e do
writef32(dst, o + i * 4, (readu8(src, off + i) - 128) / 128) writef32(dst, o, (readu8(src, s) - 128) / 128)
o += 4
end end
elseif bytes == 2 then elseif bytes == 2 then
if be then if be then
for i = 0, count - 1 do for s = off, e, 2 do
local s = off + i * 2
local v = readi8(src, s) * 256 + readu8(src, s + 1) local v = readi8(src, s) * 256 + readu8(src, s + 1)
writef32(dst, o + i * 4, v / 32768) writef32(dst, o, v / 32768)
o += 4
end end
else else
for i = 0, count - 1 do for s = off, e, 2 do
writef32(dst, o + i * 4, readi16(src, off + i * 2) / 32768) writef32(dst, o, readi16(src, s) / 32768)
o += 4
end end
end end
elseif bytes == 3 then elseif bytes == 3 then
if be then if be then
for i = 0, count - 1 do for s = off, e, 3 do
local s = off + i * 3
local v = readi8(src, s) * 65536 + readu8(src, s + 1) * 256 + readu8(src, s + 2) local v = readi8(src, s) * 65536 + readu8(src, s + 1) * 256 + readu8(src, s + 2)
writef32(dst, o + i * 4, v / 8388608) writef32(dst, o, v / 8388608)
o += 4
end end
else else
for i = 0, count - 1 do for s = off, e, 3 do
local s = off + i * 3
local v = readi8(src, s + 2) * 65536 + readu16(src, s) local v = readi8(src, s + 2) * 65536 + readu16(src, s)
writef32(dst, o + i * 4, v / 8388608) writef32(dst, o, v / 8388608)
o += 4
end end
end end
else else
if be then if be then
for i = 0, count - 1 do for s = off, e, 4 do
local v = byteswap(readu32(src, off + i * 4)) local v = byteswap(readu32(src, s))
if v >= 0x80000000 then if v >= 0x80000000 then
v -= 0x100000000 v -= 0x100000000
end end
writef32(dst, o + i * 4, v / 2147483648) writef32(dst, o, v / 2147483648)
o += 4
end end
else else
for i = 0, count - 1 do for s = off, e, 4 do
writef32(dst, o + i * 4, readi32(src, off + i * 4) / 2147483648) writef32(dst, o, readi32(src, s) / 2147483648)
o += 4
end end
end end
end end
@@ -63,28 +69,29 @@ end
function Codecs.float(src: buffer, off: number, dst: buffer, d: number, count: number, bytes: number, be: boolean, function Codecs.float(src: buffer, off: number, dst: buffer, d: number, count: number, bytes: number, be: boolean,
tmp: buffer) tmp: buffer)
local o = d * 4 local o = d * 4
local e = off + (count - 1) * bytes
if bytes == 4 then if bytes == 4 then
if be then if be then
for i = 0, count - 1 do for s = off, e, 4 do
writeu32(tmp, 0, byteswap(readu32(src, off + i * 4))) writeu32(tmp, 0, byteswap(readu32(src, s)))
writef32(dst, o + i * 4, readf32(tmp, 0)) writef32(dst, o, readf32(tmp, 0))
o += 4
end end
else else
for i = 0, count - 1 do buffer.copy(dst, o, src, off, count * 4)
writef32(dst, o + i * 4, readf32(src, off + i * 4))
end
end end
else else
if be then if be then
for i = 0, count - 1 do for s = off, e, 8 do
local s = off + i * 8
writeu32(tmp, 0, byteswap(readu32(src, s + 4))) writeu32(tmp, 0, byteswap(readu32(src, s + 4)))
writeu32(tmp, 4, byteswap(readu32(src, s))) writeu32(tmp, 4, byteswap(readu32(src, s)))
writef32(dst, o + i * 4, readf64(tmp, 0)) writef32(dst, o, readf64(tmp, 0))
o += 4
end end
else else
for i = 0, count - 1 do for s = off, e, 8 do
writef32(dst, o + i * 4, readf64(src, off + i * 8)) writef32(dst, o, readf64(src, s))
o += 4
end end
end end
end end
@@ -92,8 +99,9 @@ end
function Codecs.law(src: buffer, off: number, dst: buffer, d: number, count: number, tbl: buffer) function Codecs.law(src: buffer, off: number, dst: buffer, d: number, count: number, tbl: buffer)
local o = d * 4 local o = d * 4
for i = 0, count - 1 do for s = off, off + count - 1 do
writef32(dst, o + i * 4, readf32(tbl, readu8(src, off + i) * 4)) writef32(dst, o, readf32(tbl, readu8(src, s) * 4))
o += 4
end end
end end
@@ -103,11 +111,13 @@ end
function Codecs.quantize(src: buffer, s: number, dst: buffer, off: number, count: number, kind: string) function Codecs.quantize(src: buffer, s: number, dst: buffer, off: number, count: number, kind: string)
local so = s * 4 local so = s * 4
local se = so + count * 4 - 4
local o = off
if kind == "f32" then if kind == "f32" then
buffer.copy(dst, off, src, so, count * 4) buffer.copy(dst, off, src, so, count * 4)
elseif kind == "s16" then elseif kind == "s16" then
for i = 0, count - 1 do for i = so, se, 4 do
local v = math.floor(readf32(src, so + i * 4) * 32768 + 0.5) local v = floor(readf32(src, i) * 32768 + 0.5)
if v > 32767 then if v > 32767 then
v = 32767 v = 32767
elseif v < -32768 then elseif v < -32768 then
@@ -115,11 +125,12 @@ function Codecs.quantize(src: buffer, s: number, dst: buffer, off: number, count
elseif v ~= v then elseif v ~= v then
v = 0 v = 0
end end
writei16(dst, off + i * 2, v) writei16(dst, o, v)
o += 2
end end
elseif kind == "s24" then elseif kind == "s24" then
for i = 0, count - 1 do for i = so, se, 4 do
local v = math.floor(readf32(src, so + i * 4) * 8388608 + 0.5) local v = floor(readf32(src, i) * 8388608 + 0.5)
if v > 8388607 then if v > 8388607 then
v = 8388607 v = 8388607
elseif v < -8388608 then elseif v < -8388608 then
@@ -130,13 +141,13 @@ function Codecs.quantize(src: buffer, s: number, dst: buffer, off: number, count
if v < 0 then if v < 0 then
v += 16777216 v += 16777216
end end
local o = off + i * 3
writeu16(dst, o, v % 65536) writeu16(dst, o, v % 65536)
writeu8(dst, o + 2, v // 65536) writeu8(dst, o + 2, v // 65536)
o += 3
end end
elseif kind == "s32" then elseif kind == "s32" then
for i = 0, count - 1 do for i = so, se, 4 do
local v = math.floor(readf32(src, so + i * 4) * 2147483648 + 0.5) local v = floor(readf32(src, i) * 2147483648 + 0.5)
if v > 2147483647 then if v > 2147483647 then
v = 2147483647 v = 2147483647
elseif v < -2147483648 then elseif v < -2147483648 then
@@ -144,11 +155,12 @@ function Codecs.quantize(src: buffer, s: number, dst: buffer, off: number, count
elseif v ~= v then elseif v ~= v then
v = 0 v = 0
end end
writei32(dst, off + i * 4, v) writei32(dst, o, v)
o += 4
end end
else -- u8 else -- u8
for i = 0, count - 1 do for i = so, se, 4 do
local v = math.floor(readf32(src, so + i * 4) * 128 + 0.5) local v = floor(readf32(src, i) * 128 + 0.5)
if v > 127 then if v > 127 then
v = 127 v = 127
elseif v < -128 then elseif v < -128 then
@@ -156,7 +168,8 @@ function Codecs.quantize(src: buffer, s: number, dst: buffer, off: number, count
elseif v ~= v then elseif v ~= v then
v = 0 v = 0
end end
writeu8(dst, off + i, v + 128) writeu8(dst, o, v + 128)
o += 1
end end
end end
end end
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- audio/wavpack: WavPack (.wv) via codecs/audio/WavPack, from the WavPack 5 file format document and WavPack 5.9.0's -- audio/wavpack: WavPack (.wv) via codecs/audio/WavPack, from the WavPack 5 file format document and WavPack 5.9.0's
-- open_utils.c (BSD 3-clause, licenses/wavpack-LICENSE.txt). Supports: lossless and hybrid (lossy without the .wvc, as -- open_utils.c (BSD 3-clause, licenses/wavpack-LICENSE.txt). Supports: lossless and hybrid (lossy without the .wvc, as
-- wvunpack), 8-32-bit integer and float, 1-4096 channels, seeking, APEv2. Not supported: DSD, WavPack 1-3, encoding. -- wvunpack), 8-32-bit integer and float, 1-4096 channels, seeking, APEv2. Not supported: DSD, WavPack 1-3, encoding.
+30 -14
View File
@@ -94,6 +94,20 @@ local DIM = { 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2 }
local UNSIGNED = { false, false, true, true, false, false, true, true, true, true, true } local UNSIGNED = { false, false, true, true, false, false, true, true, true, true, true }
local MOD = { 3, 3, 3, 3, 9, 9, 8, 8, 13, 13, 17 } local MOD = { 3, 3, 3, 3, 9, 9, 8, 8, 13, 13, 17 }
local OFF = { 1, 1, 0, 0, 4, 4, 0, 0, 0, 0, 0 } local OFF = { 1, 1, 0, 0, 4, 4, 0, 0, 0, 0, 0 }
-- UNPACK[cb][4 sym + k]: a codeword's dim values (k = 1 .. dim), first value most significant
local UNPACK: { { number } } = {}
for cb = 1, 11 do
local dim, mod, off = DIM[cb], MOD[cb], OFF[cb]
local t = table.create(mod ^ dim * 4, 0)
for sym = 0, mod ^ dim - 1 do
local v = sym
for k = dim, 1, -1 do
t[sym * 4 + k] = v % mod - off
v = v // mod
end
end
UNPACK[cb] = t
end
-- |q|^(4/3) -- |q|^(4/3)
local POW43 = table.create(8192, 0) local POW43 = table.create(8192, 0)
@@ -421,7 +435,7 @@ local function spectralData(st: State, c: Channel, pulses: { number }?): string?
continue continue
end end
local bk = SPEC_BOOK[cb] local bk = SPEC_BOOK[cb]
local dim, uns, mod, off = DIM[cb], UNSIGNED[cb], MOD[cb], OFF[cb] local dim, uns, unpack = DIM[cb], UNSIGNED[cb], UNPACK[cb]
local gain = 2 ^ (0.25 * (sf[idx] - 100)) local gain = 2 ^ (0.25 * (sf[idx] - 100))
for w = 0, glen - 1 do for w = 0, glen - 1 do
local base = (win + w) * 128 + lo local base = (win + w) * 128 + lo
@@ -432,19 +446,8 @@ local function spectralData(st: State, c: Channel, pulses: { number }?): string?
return "bad spectral code" return "bad spectral code"
end end
-- unpack the symbol into dim values (first value most significant) -- unpack the symbol into dim values (first value most significant)
local vals1: number, vals2: number, vals3: number, vals4: number local u = sym * 4
if dim == 4 then local vals1, vals2, vals3, vals4 = unpack[u + 1], unpack[u + 2], unpack[u + 3], unpack[u + 4]
vals4 = sym % mod - off
sym = (sym - (sym % mod)) / mod
vals3 = sym % mod - off
sym = (sym - (sym % mod)) / mod
vals2 = sym % mod - off
sym = (sym - (sym % mod)) / mod
vals1 = sym % mod - off
else
vals2 = sym % mod - off
vals1 = (sym - (sym % mod)) / mod - off
end
if uns then if uns then
if vals1 ~= 0 and getBits(1) == 1 then if vals1 ~= 0 and getBits(1) == 1 then
vals1 = -vals1 vals1 = -vals1
@@ -670,6 +673,19 @@ local function filterbank(st: State, c: Channel, out: { number }, stride: number
else else
local t = st.time local t = st.time
Mdct.inverse(PLAN_LONG, spec, 1, 1, t, 1, 2 / 2048) Mdct.inverse(PLAN_LONG, spec, 1, 1, t, 1, 2 / 2048)
if seq ~= LONG_STOP and seq ~= LONG_START then
-- ONLY_LONG: window, overlap-add and output in one pass
local rise = if prev == 1 then KBD_LONG else SINE_LONG
local fall = if shape == 1 then KBD_LONG else SINE_LONG
local p = offset
for n = 1, 1024 do
out[p] = (t[n] * rise[n] + overlap[n]) * scale
overlap[n] = t[1024 + n] * fall[1024 + n]
p += stride
end
c.prevShape = shape
return
end
if seq == LONG_STOP then if seq == LONG_STOP then
local rise = if prev == 1 then KBD_SHORT else SINE_SHORT local rise = if prev == 1 then KBD_SHORT else SINE_SHORT
for n = 1, 448 do for n = 1, 448 do
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- codecs/audio/Aac/Tables: the AAC-LC tables of ISO/IEC 14496-3 (subpart 4, Annex 4.A): Huffman codebooks, scalefactor -- codecs/audio/Aac/Tables: the AAC-LC tables of ISO/IEC 14496-3 (subpart 4, Annex 4.A): Huffman codebooks, scalefactor
-- band offsets, TNS band limits. Transcribed from FFmpeg libavcodec/aactab.c (tables of the standard, no code; see -- band offsets, TNS band limits. Transcribed from FFmpeg libavcodec/aactab.c (tables of the standard, no code; see
-- licenses/NOTICE.md). Generated; do not edit. -- licenses/NOTICE.md). Generated; do not edit.
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- codecs/audio/Aac: AAC-LC decoder (ISO/IEC 14496-3 subpart 4, ISO/IEC 13818-7): AudioSpecificConfig, ADTS, raw_data_block. -- codecs/audio/Aac: AAC-LC decoder (ISO/IEC 14496-3 subpart 4, ISO/IEC 13818-7): AudioSpecificConfig, ADTS, raw_data_block.
-- Written from the standard; no third-party code. HE-AAC decodes its AAC-LC core at the core rate. Not supported: Main -- Written from the standard; no third-party code. HE-AAC decodes its AAC-LC core at the core rate. Not supported: Main
-- prediction, LTP, SSR, coupling channels, 960-sample frames, ER / USAC (UNSUPPORTED). -- prediction, LTP, SSR, coupling channels, 960-sample frames, ER / USAC (UNSUPPORTED).
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- codecs/audio/Ac3/Tables: transcribed from ATSC A/52:2018 section 7.2.3 (bit allocation tables) and section 5.4 (frame -- codecs/audio/Ac3/Tables: transcribed from ATSC A/52:2018 section 7.2.3 (bit allocation tables) and section 5.4 (frame
-- sizes); masktab is derived from bndtab / bndsz. No third-party code. -- sizes); masktab is derived from bndtab / bndsz. No third-party code.
local T = {} local T = {}
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- codecs/audio/Ac3: AC-3 (Dolby Digital, ATSC A/52) syncframes: syncinfo / BSI, CRC check and decoder. -- codecs/audio/Ac3: AC-3 (Dolby Digital, ATSC A/52) syncframes: syncinfo / BSI, CRC check and decoder.
-- Written from ATSC A/52:2018; no third-party code. E-AC-3 (bsid 11 .. 16) and bsid 9 / 10 are UNSUPPORTED. -- Written from ATSC A/52:2018; no third-party code. E-AC-3 (bsid 11 .. 16) and bsid 9 / 10 are UNSUPPORTED.
local Err = require("@rosetta/core/Err") local Err = require("@rosetta/core/Err")
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- codecs/audio/Adpcm/Decoder: the streaming Types.Decoder over packetised ADPCM (ADX, VAG, BRSTM, raw IMA) with exact seeking. -- codecs/audio/Adpcm/Decoder: the streaming Types.Decoder over packetised ADPCM (ADX, VAG, BRSTM, raw IMA) with exact seeking.
-- New in rosetta. -- New in rosetta.
local Err = require("@rosetta/core/Err") local Err = require("@rosetta/core/Err")
+5 -5
View File
@@ -78,7 +78,7 @@ local function rice(b: buffer, pos: number, limit: number, out: { number }, n: n
if pos > limit then if pos > limit then
return -1 -- each value reads at most 41 bits past here: inside the 16 padding bytes return -1 -- each value reads at most 41 bits past here: inside the 16 padding bytes
end end
local k = 31 - countlz(floor(history / 512) + 3) local k = 31 - countlz(history // 512 + 3)
if k > kb then if k > kb then
k = kb k = kb
end end
@@ -90,14 +90,14 @@ local function rice(b: buffer, pos: number, limit: number, out: { number }, n: n
if x > 0xFFFF then if x > 0xFFFF then
history = 0xFFFF history = 0xFFFF
else else
history += x * mult - floor(history * mult / 512) history += x * mult - (history * mult) // 512
end end
if history < 128 and i < n then if history < 128 and i < n then
if pos > limit then if pos > limit then
return -1 return -1
end end
local lg = if history > 0 then 31 - countlz(history) else 0 local lg = if history > 0 then 31 - countlz(history) else 0
k = 7 - lg + floor((history + 16) / 64) k = 7 - lg + (history + 16) // 64
if k > kb then if k > kb then
k = kb k = kb
end end
@@ -155,7 +155,7 @@ local function predict(err: { number }, out: { number }, n: number, bps: number,
for j = 1, order do for j = 1, order do
val += (out[i - j] - d) * coefs[j] val += (out[i - j] - d) * coefs[j]
end end
val = floor((val + half) / qd) val = (val + half) // qd -- qd is 2^quant: exact
local e = err[i] local e = err[i]
out[i] = signExtend(val + d + e, bps) out[i] = signExtend(val + d + e, bps)
if e ~= 0 then if e ~= 0 then
@@ -168,7 +168,7 @@ local function predict(err: { number }, out: { number }, n: number, bps: number,
local v = d - out[i - j] local v = d - out[i - j]
local sgn = if v > 0 then es elseif v < 0 then -es else 0 local sgn = if v > 0 then es elseif v < 0 then -es else 0
coefs[j] -= sgn coefs[j] -= sgn
e -= floor(v * sgn / qd) * (order - j + 1) e -= ((v * sgn) // qd) * (order - j + 1)
end end
end end
i += 1 i += 1
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- codecs/audio/Alac: Apple Lossless (ALAC) decoder and encoder. -- codecs/audio/Alac: Apple Lossless (ALAC) decoder and encoder.
-- Written from the ALAC format as Apple published it; no third-party code. ALAC stores C L R ... for 3+ channels; the -- Written from the ALAC format as Apple published it; no third-party code. ALAC stores C L R ... for 3+ channels; the
-- API uses WAV order. -- API uses WAV order.
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- codecs/audio/Ape: the Monkey's Audio codec (.ape), file versions 3.95 and later. -- codecs/audio/Ape: the Monkey's Audio codec (.ape), file versions 3.95 and later.
-- Ported from the Monkey's Audio SDK 13.28 (Matthew T. Ashland, BSD 3-clause since v10, licenses/monkeys-audio-LICENSE.txt): -- Ported from the Monkey's Audio SDK 13.28 (Matthew T. Ashland, BSD 3-clause since v10, licenses/monkeys-audio-LICENSE.txt):
-- APEHeader.cpp, APEInfo / APEDecompress.cpp. Not supported: pre-3.95 (UNSUPPORTED), the pre-8.50 "interim" 24-bit re-decode. -- APEHeader.cpp, APEInfo / APEDecompress.cpp. Not supported: pre-3.95 (UNSUPPORTED), the pre-8.50 "interim" 24-bit re-decode.
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- codecs/audio/ApeTag: APEv1 / APEv2 tags -> Types.Tags. -- codecs/audio/ApeTag: APEv1 / APEv2 tags -> Types.Tags.
-- From the APEv2 specification (wiki.hydrogenaud.io); no third-party code. Items + a 32-byte "APETAGEX" footer, optional -- From the APEv2 specification (wiki.hydrogenaud.io); no third-party code. Items + a 32-byte "APETAGEX" footer, optional
-- 32-byte header (APEv2), before an optional ID3v1 tag. -- 32-byte header (APEv2), before an optional ID3v1 tag.
+25 -2
View File
@@ -28,10 +28,33 @@ for i = 0, 255 do
CRC16[i + 1] = d CRC16[i + 1] = d
end end
-- slice-by-4: C1 = CRC16; Ck[i] = the CRC16 state after i (high byte) and k - 1 zero bytes
local C1, C2, C3, C4 = table.create(256, 0), table.create(256, 0), table.create(256, 0), table.create(256, 0)
for i = 0, 255 do
C1[i + 1] = CRC16[i + 1]
end
for i = 0, 255 do
local c = C1[i + 1]
c = bxor(band(lshift(c, 8), 0xFFFF), C1[rshift(c, 8) + 1])
C2[i + 1] = c
c = bxor(band(lshift(c, 8), 0xFFFF), C1[rshift(c, 8) + 1])
C3[i + 1] = c
c = bxor(band(lshift(c, 8), 0xFFFF), C1[rshift(c, 8) + 1])
C4[i + 1] = c
end
local function crc16(b: buffer, from: number, to: number): number local function crc16(b: buffer, from: number, to: number): number
local c = 0 local c = 0
for i = from, to - 1 do local i = from
c = bxor(band(lshift(c, 8), 0xFFFF), CRC16[bxor(rshift(c, 8), readu8(b, i)) + 1]) -- four bytes w (big-endian) at a time: the state is linear, so the new state is the xor of each byte of
-- (c << 16) ~ w pushed through 4, 3, 2 and 1 table steps
while i + 4 <= to do
local x = bxor(lshift(c, 16), byteswap(readu32(b, i)))
c = bxor(bxor(C4[rshift(x, 24) + 1], C3[band(rshift(x, 16), 255) + 1]), bxor(C2[band(rshift(x, 8), 255) + 1], C1[band(x, 255) + 1]))
i += 4
end
for j = i, to - 1 do
c = bxor(band(lshift(c, 8), 0xFFFF), CRC16[bxor(rshift(c, 8), readu8(b, j)) + 1])
end end
return c return c
end end
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- codecs/audio/Flac: FLAC frames without the container (frame header, subframes, CRC-8 / CRC-16) and the frame encoder. -- codecs/audio/Flac: FLAC frames without the container (frame header, subframes, CRC-8 / CRC-16) and the frame encoder.
-- Absorbed from flac-luau 7083d0d; the encoder is new. -- Absorbed from flac-luau 7083d0d; the encoder is new.
local Flac = { local Flac = {
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- codecs/audio/Hively/Load: AHX ("THX\0".."THX\2") and HivelyTracker ("HVL\0", "HVL\1") module files -> Tune. -- codecs/audio/Hively/Load: AHX ("THX\0".."THX\2") and HivelyTracker ("HVL\0", "HVL\1") module files -> Tune.
-- Ported from hvl2wav replay.c 1.9 (hvl_load_ahx / hvl_reset; BSD-3-Clause, (c) 2006-2018 Pete Gordon; -- Ported from hvl2wav replay.c 1.9 (hvl_load_ahx / hvl_reset; BSD-3-Clause, (c) 2006-2018 Pete Gordon;
-- licenses/hivelytracker-LICENSE.txt), with bounds checks the C code does not have. -- licenses/hivelytracker-LICENSE.txt), with bounds checks the C code does not have.
@@ -1,5 +1,6 @@
--!strict --!strict
--!native --!native
--!optimize 2
-- codecs/audio/Hively/Player: the AHX / HivelyTracker replayer and integer mixer, as hvl2wav's replay.c 1.9 computes them. -- codecs/audio/Hively/Player: the AHX / HivelyTracker replayer and integer mixer, as hvl2wav's replay.c 1.9 computes them.
-- Ported from HivelyTracker (BSD-3-Clause, (c) 2006-2018 Pete Gordon; licenses/hivelytracker-LICENSE.txt). Where the C -- Ported from HivelyTracker (BSD-3-Clause, (c) 2006-2018 Pete Gordon; licenses/hivelytracker-LICENSE.txt). Where the C
-- code reads outside its arrays on bad data this port clamps instead. -- code reads outside its arrays on bad data this port clamps instead.
@@ -1,5 +1,6 @@
--!strict --!strict
--!native --!native
--!optimize 2
-- codecs/audio/Hively/Tables: the AHX / HivelyTracker replayer's waveform, panning, vibrato and period tables. -- codecs/audio/Hively/Tables: the AHX / HivelyTracker replayer's waveform, panning, vibrato and period tables.
-- Ported from hvl2wav replay.c 1.9 (BSD-3-Clause, (c) 2006-2018 Pete Gordon; licenses/hivelytracker-LICENSE.txt) as -- Ported from hvl2wav replay.c 1.9 (BSD-3-Clause, (c) 2006-2018 Pete Gordon; licenses/hivelytracker-LICENSE.txt) as
-- built on 64-bit Linux (`long` is 64-bit: the noise generator's shifts do not wrap at 32 bits). -- built on 64-bit Linux (`long` is 64-bit: the noise generator's shifts do not wrap at 32 bits).
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- codecs/audio/Hively: the AHX / HivelyTracker engine (loader, replayer, waveform tables, render glue). -- codecs/audio/Hively: the AHX / HivelyTracker engine (loader, replayer, waveform tables, render glue).
-- A port of hvl2wav replay.c 1.9 (BSD-3-Clause, (c) 2006-2018 Pete Gordon; licenses/hivelytracker-LICENSE.txt); at -- A port of hvl2wav replay.c 1.9 (BSD-3-Clause, (c) 2006-2018 Pete Gordon; licenses/hivelytracker-LICENSE.txt); at
-- hvl2wav's settings the output equals its 16-bit samples / 32768. hvl2wav pads a 44.1 kHz speed-multiplier-4 frame to -- hvl2wav's settings the output equals its 16-bit samples / 32768. hvl2wav pads a 44.1 kHz speed-multiplier-4 frame to
+81 -36
View File
@@ -82,77 +82,122 @@ end
-- one pass of radix p: cc (i, v, k) = src[1 + i + ido * (v + p * k)] -> ch (i, k, u) = dst[1 + i + ido * (k + l1 * u)] -- one pass of radix p: cc (i, v, k) = src[1 + i + ido * (v + p * k)] -> ch (i, k, u) = dst[1 + i + ido * (k + l1 * u)]
local function pass(p: number, ido: number, l1: number, ar: { number }, ai: { number }, br: { number }, bi: { number }, tr: { number }, ti: { number }, cr: { number }, ci: { number }) local function pass(p: number, ido: number, l1: number, ar: { number }, ai: { number }, br: { number }, bi: { number }, tr: { number }, ti: { number }, cr: { number }, ci: { number })
local lp = ido * l1 local lp = ido * l1
if p == 4 then if ido == 1 and p == 4 then -- the last pass: no twiddles, s = 4k + 1, d = k + 1
local lp2, lp3 = 2 * lp, 3 * lp
local s = 1
for d = 1, l1 do
local a0r, a0i = ar[s], ai[s]
local a1r, a1i = ar[s + 1], ai[s + 1]
local a2r, a2i = ar[s + 2], ai[s + 2]
local a3r, a3i = ar[s + 3], ai[s + 3]
local t0r, t0i = a0r + a2r, a0i + a2i
local t1r, t1i = a0r - a2r, a0i - a2i
local t2r, t2i = a1r + a3r, a1i + a3i
local t3r, t3i = a1r - a3r, a1i - a3i
br[d], bi[d] = t0r + t2r, t0i + t2i
br[d + lp], bi[d + lp] = t1r + t3i, t1i - t3r
br[d + lp2], bi[d + lp2] = t0r - t2r, t0i - t2i
br[d + lp3], bi[d + lp3] = t1r - t3i, t1i + t3r
s += 4
end
elseif ido == 1 and p == 2 then
local s = 1
for d = 1, l1 do
local a0r, a0i = ar[s], ai[s]
local a1r, a1i = ar[s + 1], ai[s + 1]
br[d], bi[d] = a0r + a1r, a0i + a1i
br[d + lp], bi[d + lp] = a0r - a1r, a0i - a1i
s += 2
end
elseif p == 4 then
local ido2, ido3, lp2, lp3 = 2 * ido, 3 * ido, 2 * lp, 3 * lp
for k = 0, l1 - 1 do for k = 0, l1 - 1 do
for i = 0, ido - 1 do local s = 1 + ido * 4 * k
local s = 1 + i + ido * 4 * k local d = 1 + ido * k
do -- i = 0: no twiddle
local a0r, a0i = ar[s], ai[s] local a0r, a0i = ar[s], ai[s]
local a1r, a1i = ar[s + ido], ai[s + ido] local a1r, a1i = ar[s + ido], ai[s + ido]
local a2r, a2i = ar[s + 2 * ido], ai[s + 2 * ido] local a2r, a2i = ar[s + ido2], ai[s + ido2]
local a3r, a3i = ar[s + 3 * ido], ai[s + 3 * ido] local a3r, a3i = ar[s + ido3], ai[s + ido3]
local t0r, t0i = a0r + a2r, a0i + a2i
local t1r, t1i = a0r - a2r, a0i - a2i
local t2r, t2i = a1r + a3r, a1i + a3i
local t3r, t3i = a1r - a3r, a1i - a3i
br[d], bi[d] = t0r + t2r, t0i + t2i
br[d + lp], bi[d + lp] = t1r + t3i, t1i - t3r
br[d + lp2], bi[d + lp2] = t0r - t2r, t0i - t2i
br[d + lp3], bi[d + lp3] = t1r - t3i, t1i + t3r
end
for i1 = 2, ido do -- i = i1 - 1
s += 1
d += 1
local a0r, a0i = ar[s], ai[s]
local a1r, a1i = ar[s + ido], ai[s + ido]
local a2r, a2i = ar[s + ido2], ai[s + ido2]
local a3r, a3i = ar[s + ido3], ai[s + ido3]
local t0r, t0i = a0r + a2r, a0i + a2i local t0r, t0i = a0r + a2r, a0i + a2i
local t1r, t1i = a0r - a2r, a0i - a2i local t1r, t1i = a0r - a2r, a0i - a2i
local t2r, t2i = a1r + a3r, a1i + a3i local t2r, t2i = a1r + a3r, a1i + a3i
local t3r, t3i = a1r - a3r, a1i - a3i local t3r, t3i = a1r - a3r, a1i - a3i
local d = 1 + i + ido * k
br[d], bi[d] = t0r + t2r, t0i + t2i br[d], bi[d] = t0r + t2r, t0i + t2i
local y1r, y1i = t1r + t3i, t1i - t3r local y1r, y1i = t1r + t3i, t1i - t3r
local y2r, y2i = t0r - t2r, t0i - t2i local y2r, y2i = t0r - t2r, t0i - t2i
local y3r, y3i = t1r - t3i, t1i + t3r local y3r, y3i = t1r - t3i, t1i + t3r
if i == 0 then local w1r, w1i = tr[i1], ti[i1]
br[d + lp], bi[d + lp] = y1r, y1i local w2r, w2i = tr[ido + i1], ti[ido + i1]
br[d + 2 * lp], bi[d + 2 * lp] = y2r, y2i local w3r, w3i = tr[ido2 + i1], ti[ido2 + i1]
br[d + 3 * lp], bi[d + 3 * lp] = y3r, y3i br[d + lp], bi[d + lp] = y1r * w1r - y1i * w1i, y1r * w1i + y1i * w1r
else br[d + lp2], bi[d + lp2] = y2r * w2r - y2i * w2i, y2r * w2i + y2i * w2r
local w1r, w1i = tr[i + 1], ti[i + 1] br[d + lp3], bi[d + lp3] = y3r * w3r - y3i * w3i, y3r * w3i + y3i * w3r
local w2r, w2i = tr[ido + i + 1], ti[ido + i + 1]
local w3r, w3i = tr[2 * ido + i + 1], ti[2 * ido + i + 1]
br[d + lp], bi[d + lp] = y1r * w1r - y1i * w1i, y1r * w1i + y1i * w1r
br[d + 2 * lp], bi[d + 2 * lp] = y2r * w2r - y2i * w2i, y2r * w2i + y2i * w2r
br[d + 3 * lp], bi[d + 3 * lp] = y3r * w3r - y3i * w3i, y3r * w3i + y3i * w3r
end
end end
end end
elseif p == 2 then elseif p == 2 then
for k = 0, l1 - 1 do for k = 0, l1 - 1 do
for i = 0, ido - 1 do local s = 1 + ido * 2 * k
local s = 1 + i + ido * 2 * k local d = 1 + ido * k
do
local a0r, a0i = ar[s], ai[s]
local a1r, a1i = ar[s + ido], ai[s + ido]
br[d], bi[d] = a0r + a1r, a0i + a1i
br[d + lp], bi[d + lp] = a0r - a1r, a0i - a1i
end
for i1 = 2, ido do
s += 1
d += 1
local a0r, a0i = ar[s], ai[s] local a0r, a0i = ar[s], ai[s]
local a1r, a1i = ar[s + ido], ai[s + ido] local a1r, a1i = ar[s + ido], ai[s + ido]
local d = 1 + i + ido * k
br[d], bi[d] = a0r + a1r, a0i + a1i br[d], bi[d] = a0r + a1r, a0i + a1i
local yr, yi = a0r - a1r, a0i - a1i local yr, yi = a0r - a1r, a0i - a1i
if i == 0 then local wr, wi = tr[i1], ti[i1]
br[d + lp], bi[d + lp] = yr, yi br[d + lp], bi[d + lp] = yr * wr - yi * wi, yr * wi + yi * wr
else
local wr, wi = tr[i + 1], ti[i + 1]
br[d + lp], bi[d + lp] = yr * wr - yi * wi, yr * wi + yi * wr
end
end end
end end
elseif p == 3 then elseif p == 3 then
local c = 0.86602540378443864676 -- sin(pi / 3) local c = 0.86602540378443864676 -- sin(pi / 3)
local ido2, lp2 = 2 * ido, 2 * lp
for k = 0, l1 - 1 do for k = 0, l1 - 1 do
for i = 0, ido - 1 do local s = ido * 3 * k
local s = 1 + i + ido * 3 * k local d = ido * k
for i1 = 1, ido do
s += 1
d += 1
local a0r, a0i = ar[s], ai[s] local a0r, a0i = ar[s], ai[s]
local a1r, a1i = ar[s + ido], ai[s + ido] local a1r, a1i = ar[s + ido], ai[s + ido]
local a2r, a2i = ar[s + 2 * ido], ai[s + 2 * ido] local a2r, a2i = ar[s + ido2], ai[s + ido2]
local tr_, ti_ = a1r + a2r, a1i + a2i local tr_, ti_ = a1r + a2r, a1i + a2i
local sr, si = a1r - a2r, a1i - a2i local sr, si = a1r - a2r, a1i - a2i
local d = 1 + i + ido * k
br[d], bi[d] = a0r + tr_, a0i + ti_ br[d], bi[d] = a0r + tr_, a0i + ti_
local mr, mi = a0r - 0.5 * tr_, a0i - 0.5 * ti_ local mr, mi = a0r - 0.5 * tr_, a0i - 0.5 * ti_
local y1r, y1i = mr + c * si, mi - c * sr local y1r, y1i = mr + c * si, mi - c * sr
local y2r, y2i = mr - c * si, mi + c * sr local y2r, y2i = mr - c * si, mi + c * sr
if i == 0 then if i1 == 1 then
br[d + lp], bi[d + lp] = y1r, y1i br[d + lp], bi[d + lp] = y1r, y1i
br[d + 2 * lp], bi[d + 2 * lp] = y2r, y2i br[d + lp2], bi[d + lp2] = y2r, y2i
else else
local w1r, w1i = tr[i + 1], ti[i + 1] local w1r, w1i = tr[i1], ti[i1]
local w2r, w2i = tr[ido + i + 1], ti[ido + i + 1] local w2r, w2i = tr[ido + i1], ti[ido + i1]
br[d + lp], bi[d + lp] = y1r * w1r - y1i * w1i, y1r * w1i + y1i * w1r br[d + lp], bi[d + lp] = y1r * w1r - y1i * w1i, y1r * w1i + y1i * w1r
br[d + 2 * lp], bi[d + 2 * lp] = y2r * w2r - y2i * w2i, y2r * w2i + y2i * w2r br[d + lp2], bi[d + lp2] = y2r * w2r - y2i * w2i, y2r * w2i + y2i * w2r
end end
end end
end end
+45 -9
View File
@@ -108,16 +108,52 @@ function Mdct.forward(plan: Plan, x: { number }, xi: number, out: { number }, oi
end end
function Mdct.inverse(plan: Plan, inp: { number }, ii: number, is: number?, y: { number }, yi: number, scale: number?) function Mdct.inverse(plan: Plan, inp: { number }, ii: number, is: number?, y: { number }, yi: number, scale: number?)
local m = plan.m local q, m = plan.n // 4, plan.m
local h = m // 2 local h = m // 2
local c = plan.c local re, im, twc, tws = plan.re, plan.im, plan.twc, plan.tws
Mdct.dct4(plan, inp, ii, is or 1, c, 1, 1, scale) local us = is or 1
-- unfold: y = (C2, -C2 reversed, -C1 reversed, -C1) local sc = scale or 1
for j = 0, h - 1 do local ia, ib, step = ii, ii + (m - 1) * us, 2 * us -- inp[ii + 2p us], inp[ii + (m - 1 - 2p) us]
y[yi + j] = c[h + j + 1] for p = 1, q do
y[yi + h + j] = -c[m - j] local a, b = inp[ia], inp[ib]
y[yi + m + j] = -c[h - j] local c, s = twc[p], tws[p]
y[yi + 3 * h + j] = -c[j + 1] re[p] = a * c + b * s
im[p] = b * c - a * s
ia += step
ib -= step
end
Fft.forward(plan.fft, re, im)
-- the DCT-IV output C[j] (j = 2k and M - 1 - 2k) unfolded into y = (C2, -C2 reversed, -C1 reversed, -C1):
-- y[3h - 1 - j] = -C[j]; y[3h + j] = -C[j] (j < h), y[j - h] = C[j] (j >= h)
local b3 = yi + 3 * h
-- 2k < h exactly when M - 1 - 2k >= h (h = q)
local half = (q + 1) // 2
local yh = yi - h
for k = 0, half - 1 do
local k1 = k + 1
local c, s = twc[k1], tws[k1]
local tr, ti = re[k1], im[k1]
local e = (tr * c + ti * s) * sc -- C[2k]
local o = -(ti * c - tr * s) * sc -- C[M - 1 - 2k]
local j = 2 * k
y[b3 - 1 - j] = -e
y[b3 + j] = -e
j = m - 1 - j
y[j + yh] = o
y[b3 - 1 - j] = -o
end
for k = half, q - 1 do
local k1 = k + 1
local c, s = twc[k1], tws[k1]
local tr, ti = re[k1], im[k1]
local e = (tr * c + ti * s) * sc
local o = -(ti * c - tr * s) * sc
local j = 2 * k
y[j + yh] = e
y[b3 - 1 - j] = -e
j = m - 1 - j
y[b3 - 1 - j] = -o
y[b3 + j] = -o
end end
end end
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- codecs/audio/MidiRender: the MIDI tempo map, event timeline and the Decoder that plays a Midi through SoundFont. -- codecs/audio/MidiRender: the MIDI tempo map, event timeline and the Decoder that plays a Midi through SoundFont.
-- Lengths as python mido computes them. Format 0 / 1: one tempo map from every track, tracks merged (ties keep track -- Lengths as python mido computes them. Format 0 / 1: one tempo map from every track, tracks merged (ties keep track
-- order); format 2: each track is its own song, played one after another. -- order); format 2: each track is its own song, played one after another.
+61 -6
View File
@@ -156,6 +156,7 @@ end
-- layer III side info (L3_read_side_info): fills GR_*, returns main_data_begin or -1 -- layer III side info (L3_read_side_info): fills GR_*, returns main_data_begin or -1
local function readSideInfo(h1: number, h2: number, h3: number): number local function readSideInfo(h1: number, h2: number, h3: number): number
local GR_NLONG, GR_NSHORT, GR_RC, GR_SBG, GR_SFB, GR_TS = GR_NLONG, GR_NSHORT, GR_RC, GR_SBG, GR_SFB, GR_TS
local mono = band(h3, 0xC0) == 0xC0 local mono = band(h3, 0xC0) == 0xC0
local mpeg1 = band(h1, 8) ~= 0 local mpeg1 = band(h1, 8) ~= 0
local srIdx = band(rshift(h2, 2), 3) + (band(rshift(h1, 3), 1) + band(rshift(h1, 4), 1)) * 3 local srIdx = band(rshift(h2, 2), 3) + (band(rshift(h1, 3), 1) + band(rshift(h1, 4), 1)) * 3
@@ -254,6 +255,7 @@ end
-- L3_read_scalefactors + L3_decode_scalefactors -> SCF[0 .. nLong + nShort) -- L3_read_scalefactors + L3_decode_scalefactors -> SCF[0 .. nLong + nShort)
local function decodeScalefactors(h1: number, h3: number, istOff: number, gr: number, ch: number) local function decodeScalefactors(h1: number, h3: number, istOff: number, gr: number, ch: number)
local GR_SBG, ISCF, IST, SCFSIZE = GR_SBG, ISCF, IST, SCFSIZE
local mpeg1 = band(h1, 8) ~= 0 local mpeg1 = band(h1, 8) ~= 0
local nLong, nShort = GR_NLONG[gr], GR_NSHORT[gr] local nLong, nShort = GR_NLONG[gr], GR_NSHORT[gr]
local part = ((if nShort ~= 0 then 1 else 0) + (if nLong == 0 then 1 else 0)) * 28 local part = ((if nShort ~= 0 then 1 else 0) + (if nLong == 0 then 1 else 0)) * 28
@@ -335,6 +337,7 @@ end
-- layer III Huffman decoding (L3_huffman) into GRBUF[dst ..], reads MAIN through a 32-bit cache -- layer III Huffman decoding (L3_huffman) into GRBUF[dst ..], reads MAIN through a 32-bit cache
local function huffman(dst: number, gr: number, limit: number) local function huffman(dst: number, gr: number, limit: number)
local GRBUF, SCF, SFB = GRBUF, SCF, SFB
local b = bsBuf local b = bsBuf
local one = 0.0 local one = 0.0
local ireg = 0 local ireg = 0
@@ -482,6 +485,7 @@ end
-- L3_midside_stereo on GRBUF[left .. left + n) and its right channel at + 576 -- L3_midside_stereo on GRBUF[left .. left + n) and its right channel at + 576
local function midside(left: number, n: number) local function midside(left: number, n: number)
local GRBUF = GRBUF
for i = left * 4, (left + n - 1) * 4, 4 do for i = left * 4, (left + n - 1) * 4, 4 do
local a, c = rf(GRBUF, i), rf(GRBUF, i + 2304) local a, c = rf(GRBUF, i), rf(GRBUF, i + 2304)
wf(GRBUF, i, a + c) wf(GRBUF, i, a + c)
@@ -490,6 +494,7 @@ local function midside(left: number, n: number)
end end
local function intensityStereo(h1: number, h3: number, gr: number) local function intensityStereo(h1: number, h3: number, gr: number)
local GRBUF, IST, MAXB = GRBUF, IST, MAXB
local mpeg1 = band(h1, 8) ~= 0 local mpeg1 = band(h1, 8) ~= 0
local ms = band(h3, 0x20) ~= 0 local ms = band(h3, 0x20) ~= 0
local nLong, nShort = GR_NLONG[gr], GR_NSHORT[gr] local nLong, nShort = GR_NLONG[gr], GR_NSHORT[gr]
@@ -559,6 +564,7 @@ local function intensityStereo(h1: number, h3: number, gr: number)
end end
local function reorder(g: number, sfb: number) local function reorder(g: number, sfb: number)
local GRBUF, SYN = GRBUF, SYN
local src, dst = g, 0 local src, dst = g, 0
while true do while true do
local len = ru8(SFB, sfb) local len = ru8(SFB, sfb)
@@ -586,14 +592,50 @@ for i = 0, 7 do
end end
local function antialias(g: number, nbands: number) local function antialias(g: number, nbands: number)
local GRBUF = GRBUF
local a0, a1, a2, a3, a4, a5, a6, a7 = AA0[1], AA0[2], AA0[3], AA0[4], AA0[5], AA0[6], AA0[7], AA0[8]
local b0, b1, b2, b3, b4, b5, b6, b7 = AA1[1], AA1[2], AA1[3], AA1[4], AA1[5], AA1[6], AA1[7], AA1[8]
local o = g * 4 local o = g * 4
for _ = 1, nbands do for _ = 1, nbands do
for i = 0, 7 do do
local ui, di = o + (18 + i) * 4, o + (17 - i) * 4 local u, d = rf(GRBUF, o + 72), rf(GRBUF, o + 68)
local u, d = rf(GRBUF, ui), rf(GRBUF, di) wf(GRBUF, o + 72, u * a0 - d * b0)
local c0, c1 = AA0[i + 1], AA1[i + 1] wf(GRBUF, o + 68, u * b0 + d * a0)
wf(GRBUF, ui, u * c0 - d * c1) end
wf(GRBUF, di, u * c1 + d * c0) do
local u, d = rf(GRBUF, o + 76), rf(GRBUF, o + 64)
wf(GRBUF, o + 76, u * a1 - d * b1)
wf(GRBUF, o + 64, u * b1 + d * a1)
end
do
local u, d = rf(GRBUF, o + 80), rf(GRBUF, o + 60)
wf(GRBUF, o + 80, u * a2 - d * b2)
wf(GRBUF, o + 60, u * b2 + d * a2)
end
do
local u, d = rf(GRBUF, o + 84), rf(GRBUF, o + 56)
wf(GRBUF, o + 84, u * a3 - d * b3)
wf(GRBUF, o + 56, u * b3 + d * a3)
end
do
local u, d = rf(GRBUF, o + 88), rf(GRBUF, o + 52)
wf(GRBUF, o + 88, u * a4 - d * b4)
wf(GRBUF, o + 52, u * b4 + d * a4)
end
do
local u, d = rf(GRBUF, o + 92), rf(GRBUF, o + 48)
wf(GRBUF, o + 92, u * a5 - d * b5)
wf(GRBUF, o + 48, u * b5 + d * a5)
end
do
local u, d = rf(GRBUF, o + 96), rf(GRBUF, o + 44)
wf(GRBUF, o + 96, u * a6 - d * b6)
wf(GRBUF, o + 44, u * b6 + d * a6)
end
do
local u, d = rf(GRBUF, o + 100), rf(GRBUF, o + 40)
wf(GRBUF, o + 100, u * a7 - d * b7)
wf(GRBUF, o + 40, u * b7 + d * a7)
end end
o += 72 o += 72
end end
@@ -627,6 +669,7 @@ end
-- L3_imdct36: GRBUF[g ..], OVL[ov ..] (float indices), window W (1-based, 18 values) -- L3_imdct36: GRBUF[g ..], OVL[ov ..] (float indices), window W (1-based, 18 values)
local function imdct36(g: number, ov: number, W: { number }, nbands: number) local function imdct36(g: number, ov: number, W: { number }, nbands: number)
local GRBUF = GRBUF
local w0 = W[1] local w0 = W[1]
local w1 = W[2] local w1 = W[2]
local w2 = W[3] local w2 = W[3]
@@ -739,6 +782,7 @@ end
-- mp3d_DCT_II (scalar path) over the n time slots of a channel at GRBUF[g ..]: t[4][8] in locals -- mp3d_DCT_II (scalar path) over the n time slots of a channel at GRBUF[g ..]: t[4][8] in locals
local function dctII(g: number, n: number) local function dctII(g: number, n: number)
local GRBUF = GRBUF
for k = 0, n - 1 do for k = 0, n - 1 do
local y = (g + k) * 4 local y = (g + k) * 4
local t0_0, t1_0, t2_0, t3_0 local t0_0, t1_0, t2_0, t3_0
@@ -989,6 +1033,7 @@ end
-- L3_imdct12: x = TMP f32 index (stride 3), dst buffer + float index, ov = OVL float index -- L3_imdct12: x = TMP f32 index (stride 3), dst buffer + float index, ov = OVL float index
local function imdct12(x: number, dst: buffer, d: number, ov: number) local function imdct12(x: number, dst: buffer, d: number, ov: number)
local TMP = TMP
local xb = x * 4 local xb = x * 4
local x0, x3, x6, x9, x12, x15 = local x0, x3, x6, x9, x12, x15 =
rf(TMP, xb), rf(TMP, xb + 12), rf(TMP, xb + 24), rf(TMP, xb + 36), rf(TMP, xb + 48), rf(TMP, xb + 60) rf(TMP, xb), rf(TMP, xb + 12), rf(TMP, xb + 24), rf(TMP, xb + 36), rf(TMP, xb + 48), rf(TMP, xb + 60)
@@ -1017,6 +1062,7 @@ local function imdct12(x: number, dst: buffer, d: number, ov: number)
end end
local function imdctShort(g: number, ov: number, nbands: number) local function imdctShort(g: number, ov: number, nbands: number)
local GRBUF = GRBUF
for _ = 1, nbands do for _ = 1, nbands do
bcopy(TMP, 0, GRBUF, g * 4, 72) bcopy(TMP, 0, GRBUF, g * 4, 72)
bcopy(GRBUF, g * 4, OVL, ov * 4, 24) bcopy(GRBUF, g * 4, OVL, ov * 4, 24)
@@ -1085,6 +1131,7 @@ end
-- mp3d_synth_pair: z = SYN float index, dst = PCM float index -- mp3d_synth_pair: z = SYN float index, dst = PCM float index
local function synthPair(dst: number, nch: number, z: number) local function synthPair(dst: number, nch: number, z: number)
local SYN = SYN
local zb = z * 4 local zb = z * 4
local a = (rf(SYN, zb + 14 * 256) - rf(SYN, zb)) * 29 local a = (rf(SYN, zb + 14 * 256) - rf(SYN, zb)) * 29
a += (rf(SYN, zb + 1 * 256) + rf(SYN, zb + 13 * 256)) * 213 a += (rf(SYN, zb + 1 * 256) + rf(SYN, zb + 13 * 256)) * 213
@@ -1109,6 +1156,7 @@ end
-- mp3d_synth: two time slots of 32 subbands -> 64 samples per channel -- mp3d_synth: two time slots of 32 subbands -> 64 samples per channel
local function synth(xl: number, dstl: number, nch: number, lins: number) local function synth(xl: number, dstl: number, nch: number, lins: number)
local GRBUF, SYN, WINT = GRBUF, SYN, WINT
local xr = xl + 576 * (nch - 1) local xr = xl + 576 * (nch - 1)
local dstr = dstl + (nch - 1) local dstr = dstl + (nch - 1)
local zlin = lins + 15 * 64 local zlin = lins + 15 * 64
@@ -1216,6 +1264,7 @@ local function synth(xl: number, dstl: number, nch: number, lins: number)
end end
local function synthGranule(nbands: number, nch: number, pcm: number) local function synthGranule(nbands: number, nch: number, pcm: number)
local SYN = SYN
for ch = 0, nch - 1 do for ch = 0, nch - 1 do
dctII(576 * ch, nbands) dctII(576 * ch, nbands)
end end
@@ -1241,6 +1290,7 @@ local ALLOC_L2M1_LOW = { 44, 4, 2, 44, 3, 10 }
local totalBands, stereoBands = 0, 0 local totalBands, stereoBands = 0, 0
local function l12ReadScaleInfo(h1: number, h2: number, h3: number, kbpsHdr: number) local function l12ReadScaleInfo(h1: number, h2: number, h3: number, kbpsHdr: number)
local BA = BA
local mode = rshift(h3, 6) local mode = rshift(h3, 6)
local sb = if mode == 3 then 0 elseif mode == 1 then band(rshift(h3, 4), 3) * 4 + 4 else 32 local sb = if mode == 3 then 0 elseif mode == 1 then band(rshift(h3, 4), 3) * 4 + 4 else 32
local layer1 = band(h1, 6) == 6 local layer1 = band(h1, 6) == 6
@@ -1331,6 +1381,7 @@ local function l12Dequantize(g: number, groupSize: number): number
end end
local function l12ApplyScf(scfOff: number) local function l12ApplyScf(scfOff: number)
local GRBUF = GRBUF
local sb, tb = stereoBands, totalBands local sb, tb = stereoBands, totalBands
bcopy(GRBUF, (576 + sb * 18) * 4, GRBUF, sb * 18 * 4, (tb - sb) * 18 * 4) bcopy(GRBUF, (576 + sb * 18) * 4, GRBUF, sb * 18 * 4, (tb - sb) * 18 * 4)
for i = 0, tb - 1 do for i = 0, tb - 1 do
@@ -1389,6 +1440,7 @@ function Core.upmix(pcm: buffer, n: number)
end end
function Core.decodeFrame(st: State, b: buffer, off: number, size: number, pcm: buffer): number function Core.decodeFrame(st: State, b: buffer, off: number, size: number, pcm: buffer): number
local FRAME, GRBUF, MAIN = FRAME, GRBUF, MAIN
if size < 4 or size > MAX_FRAME or off < 0 or off + size > buffer.len(b) then if size < 4 or size > MAX_FRAME or off < 0 or off + size > buffer.len(b) then
st.needReset = true st.needReset = true
return 0 return 0
@@ -1476,6 +1528,7 @@ function Core.decodeFrame(st: State, b: buffer, off: number, size: number, pcm:
end end
function Core.probeL3(b: buffer, off: number, size: number): (number, number, number) function Core.probeL3(b: buffer, off: number, size: number): (number, number, number)
local FRAME = FRAME
local n = min(size, 64) local n = min(size, 64)
if size < 4 or off + n > buffer.len(b) then if size < 4 or off + n > buffer.len(b) then
return -1, 0, 0 return -1, 0, 0
@@ -1500,6 +1553,7 @@ end
-- Layer I / II: minimp3 drops a frame that needs more bits than it has -- Layer I / II: minimp3 drops a frame that needs more bits than it has
function Core.probeL12(b: buffer, off: number, size: number): boolean function Core.probeL12(b: buffer, off: number, size: number): boolean
local FRAME = FRAME
if size < 4 or size > MAX_FRAME or off + size > buffer.len(b) then if size < 4 or size > MAX_FRAME or off + size > buffer.len(b) then
return false return false
end end
@@ -1533,6 +1587,7 @@ end
-- mp3dec_check_vbrtag on the frame b[off, off + size): 0 = no tag, -1 = a Xing / Info tag without a frame -- mp3dec_check_vbrtag on the frame b[off, off + size): 0 = no tag, -1 = a Xing / Info tag without a frame
-- count, 1 = tag; then frames, encoder delay + 529, padding - 529 (both 0 without a LAME extension) -- count, 1 = tag; then frames, encoder delay + 529, padding - 529 (both 0 without a LAME extension)
function Core.vbrTag(b: buffer, off: number, size: number): (number, number, number, number) function Core.vbrTag(b: buffer, off: number, size: number): (number, number, number, number)
local FRAME = FRAME
if size < 12 or size > MAX_FRAME or off + size > buffer.len(b) then if size < 12 or size > MAX_FRAME or off + size > buffer.len(b) then
return 0, 0, 0, 0 return 0, 0, 0, 0
end end
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- codecs/audio/Mpa/EncTables: the synthesis window D and the layer III Huffman trees of ISO/IEC 11172-3, from PDMP3 -- codecs/audio/Mpa/EncTables: the synthesis window D and the layer III Huffman trees of ISO/IEC 11172-3, from PDMP3
-- (public domain / unlicense, Krister Lagerstrom and contributors: licenses/PDMP3-UNLICENSE.txt). Tree entries with a -- (public domain / unlicense, Krister Lagerstrom and contributors: licenses/PDMP3-UNLICENSE.txt). Tree entries with a
-- high byte are nodes (high byte: left offset, low byte: right offset), else leaves (x << 4 | y; count1: v w x y bits). -- high byte are nodes (high byte: left offset, low byte: right offset), else leaves (x << 4 | y; count1: v w x y bits).
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- codecs/audio/Mpa/Tables: constant tables of minimp3 (https://github.com/lieff/minimp3, CC0), generated by tools/gen_tables.py. -- codecs/audio/Mpa/Tables: constant tables of minimp3 (https://github.com/lieff/minimp3, CC0), generated by tools/gen_tables.py.
-- Every list is flattened row-major and 0-based (t[0] is the first element), like the C arrays. -- Every list is flattened row-major and 0-based (t[0] is the first element), like the C arrays.
local T = {} local T = {}
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- codecs/audio/Mpa: MPEG audio layers I / II / III (ISO/IEC 11172-3, 13818-3, MPEG-2.5) without the file around it. -- codecs/audio/Mpa: MPEG audio layers I / II / III (ISO/IEC 11172-3, 13818-3, MPEG-2.5) without the file around it.
-- Core is a port of minimp3 by lieff (CC0, licenses/minimp3-CC0.txt), absorbed from mp3-luau c755bbf; the layer II / III -- Core is a port of minimp3 by lieff (CC0, licenses/minimp3-CC0.txt), absorbed from mp3-luau c755bbf; the layer II / III
-- encoders are new. -- encoders are new.
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- codecs/audio/Musepack/Tables: the Musepack SV7 / SV8 Huffman tables, synthesis window and requantisation constants. -- codecs/audio/Musepack/Tables: the Musepack SV7 / SV8 Huffman tables, synthesis window and requantisation constants.
-- Ported from libmpcdec (musepack_src_r475: huffman.c, synth_filter.c, requant.c, mpc_bits_reader.c; BSD-3-Clause, -- Ported from libmpcdec (musepack_src_r475: huffman.c, synth_filter.c, requant.c, mpc_bits_reader.c; BSD-3-Clause,
-- (c) The Musepack Development Team, licenses/libmpcdec-BSD.txt). Huffman tables: flat { code, length, value, ... } -- (c) The Musepack Development Team, licenses/libmpcdec-BSD.txt). Huffman tables: flat { code, length, value, ... }
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- codecs/audio/Musepack: Musepack (MPC) stream versions 7 and 8. -- codecs/audio/Musepack: Musepack (MPC) stream versions 7 and 8.
-- A port of libmpcdec (musepack_src_r475: mpc_demux.c, streaminfo.c, mpc_decoder.c; BSD-3-Clause, (c) The Musepack -- A port of libmpcdec (musepack_src_r475: mpc_demux.c, streaminfo.c, mpc_decoder.c; BSD-3-Clause, (c) The Musepack
-- Development Team, licenses/libmpcdec-BSD.txt), gapless like libmpcdec. SV4 - SV6 are UNSUPPORTED. -- Development Team, licenses/libmpcdec-BSD.txt), gapless like libmpcdec. SV4 - SV6 are UNSUPPORTED.
+29 -4
View File
@@ -193,6 +193,7 @@ local function laplaceDecode(dec: RD.Dec, fs: number, decay: number): number
end end
local function unquantCoarseEnergy(st: any, start: number, endb: number, intra: boolean, dec: RD.Dec, C: number, LM: number) local function unquantCoarseEnergy(st: any, start: number, endb: number, intra: boolean, dec: RD.Dec, C: number, LM: number)
local E_PROB = E_PROB
local oldE = st.oldBandE local oldE = st.oldBandE
local probBase = LM * 84 + (if intra then 42 else 0) -- e_prob_model[LM][intra], 0-based local probBase = LM * 84 + (if intra then 42 else 0) -- e_prob_model[LM][intra], 0-based
local coef, beta local coef, beta
@@ -276,6 +277,7 @@ end
-- bit allocation (rate.c) -- bit allocation (rate.c)
local function bits2pulses(bandI: number, LM: number, bits: number): number local function bits2pulses(bandI: number, LM: number, bits: number): number
local CACHE_BITS = CACHE_BITS
local base = CACHE_INDEX[(LM + 1) * NB_EBANDS + bandI + 1] local base = CACHE_INDEX[(LM + 1) * NB_EBANDS + bandI + 1]
local lo, hi = 0, CACHE_BITS[base + 1] local lo, hi = 0, CACHE_BITS[base + 1]
bits -= 1 bits -= 1
@@ -312,6 +314,7 @@ end
-- clt_compute_allocation + interp_bits2pulses (decoder side) -- clt_compute_allocation + interp_bits2pulses (decoder side)
local function computeAllocation(start: number, endb: number, offsets: { number }, cap: { number }, allocTrim: number, local function computeAllocation(start: number, endb: number, offsets: { number }, cap: { number }, allocTrim: number,
total: number, pulses: { number }, ebits: { number }, finePriority: { number }, C: number, LM: number, ec: RD.Dec) total: number, pulses: { number }, ebits: { number }, finePriority: { number }, C: number, LM: number, ec: RD.Dec)
local ALLOC, EB, LOG2_FRAC_TABLE = ALLOC, EB, LOG2_FRAC_TABLE
total = imax(total, 0) total = imax(total, 0)
local len = NB_EBANDS local len = NB_EBANDS
local skipStart = start local skipStart = start
@@ -541,6 +544,7 @@ end
-- PVQ (cwrs.c, vq.c) -- PVQ (cwrs.c, vq.c)
local function cwrsi(n: number, k: number, i: number, iy: { number }): number local function cwrsi(n: number, k: number, i: number, iy: { number }): number
local U = U
local yy = 0 local yy = 0
local idx = 1 local idx = 1
local p, k0, val local p, k0, val
@@ -618,6 +622,7 @@ local function cwrsi(n: number, k: number, i: number, iy: { number }): number
end end
local function expRotation1(X: number, len: number, stride: number, c: number, s: number) local function expRotation1(X: number, len: number, stride: number, c: number, s: number)
local W = W
local ms = -s local ms = -s
local p = X + 1 local p = X + 1
for _ = 0, len - stride - 1 do for _ = 0, len - stride - 1 do
@@ -672,6 +677,7 @@ local function expRotation(X: number, len: number, dir: number, stride: number,
end end
local function renormaliseVector(X: number, N: number, gain: number) local function renormaliseVector(X: number, N: number, gain: number)
local W = W
local E = 1e-15 local E = 1e-15
for i = X + 1, X + N do for i = X + 1, X + N do
local v = W[i] local v = W[i]
@@ -684,6 +690,7 @@ local function renormaliseVector(X: number, N: number, gain: number)
end end
local function algUnquant(X: number, N: number, K: number, spread: number, B: number, dec: RD.Dec, gain: number): number local function algUnquant(X: number, N: number, K: number, spread: number, B: number, dec: RD.Dec, gain: number): number
local U = U
local iy = IY local iy = IY
local ft = U[N * UK + K + 1] + U[N * UK + K + 2] local ft = U[N * UK + K + 1] + U[N * UK + K + 2]
local Ryy = cwrsi(N, K, decUint(dec, ft), iy) local Ryy = cwrsi(N, K, decUint(dec, ft), iy)
@@ -734,6 +741,7 @@ local ctx: Ctx = {
} }
local function haar1(X: number, N0: number, stride: number) local function haar1(X: number, N0: number, stride: number)
local W = W
N0 = rshift(N0, 1) N0 = rshift(N0, 1)
local s = 0.70710678 local s = 0.70710678
for i = 0, stride - 1 do for i = 0, stride - 1 do
@@ -749,6 +757,7 @@ local function haar1(X: number, N0: number, stride: number)
end end
local function deinterleaveHadamard(X: number, N0: number, stride: number, hadamard: boolean) local function deinterleaveHadamard(X: number, N0: number, stride: number, hadamard: boolean)
local W = W
local N = N0 * stride local N = N0 * stride
local tmp = TMP local tmp = TMP
if hadamard then if hadamard then
@@ -772,6 +781,7 @@ local function deinterleaveHadamard(X: number, N0: number, stride: number, hadam
end end
local function interleaveHadamard(X: number, N0: number, stride: number, hadamard: boolean) local function interleaveHadamard(X: number, N0: number, stride: number, hadamard: boolean)
local W = W
local N = N0 * stride local N = N0 * stride
local tmp = TMP local tmp = TMP
if hadamard then if hadamard then
@@ -810,6 +820,7 @@ local function computeQn(N: number, b: number, offset: number, pulseCap: number,
end end
local function computeTheta(N: number, b: number, B: number, B0: number, LM: number, stereo: boolean, fill: number) local function computeTheta(N: number, b: number, B: number, B0: number, LM: number, stereo: boolean, fill: number)
local ctx = ctx
local i = ctx.i local i = ctx.i
local ec = ctx.ec local ec = ctx.ec
local pulseCap = LOGN[i + 1] + LM * 8 local pulseCap = LOGN[i + 1] + LM * 8
@@ -889,6 +900,7 @@ local function computeTheta(N: number, b: number, B: number, B0: number, LM: num
end end
local function quantBandN1(X: number, Y: number, lowbandOut: number): number local function quantBandN1(X: number, Y: number, lowbandOut: number): number
local W, ctx = W, ctx
local x = X local x = X
local ec = ctx.ec local ec = ctx.ec
for _ = 0, (if Y >= 0 then 1 else 0) do for _ = 0, (if Y >= 0 then 1 else 0) do
@@ -907,6 +919,7 @@ local function quantBandN1(X: number, Y: number, lowbandOut: number): number
end end
local function quantPartition(X: number, N: number, b: number, B: number, lowband: number, LM: number, gain: number, fill: number): number local function quantPartition(X: number, N: number, b: number, B: number, lowband: number, LM: number, gain: number, fill: number): number
local CACHE_BITS, W, ctx = CACHE_BITS, W, ctx
local i = ctx.i local i = ctx.i
local B0 = B local B0 = B
local cm = 0 local cm = 0
@@ -999,6 +1012,7 @@ end
local function quantBand(X: number, N: number, b: number, B: number, lowband: number, LM: number, lowbandOut: number, local function quantBand(X: number, N: number, b: number, B: number, lowband: number, LM: number, lowbandOut: number,
gain: number, lowbandScratch: number, fill: number): number gain: number, lowbandScratch: number, fill: number): number
local BIT_INTERLEAVE, W = BIT_INTERLEAVE, W
local N0 = N local N0 = N
local NB = N local NB = N
local B0 = B local B0 = B
@@ -1069,6 +1083,7 @@ local function quantBand(X: number, N: number, b: number, B: number, lowband: nu
end end
local function stereoMerge(X: number, Y: number, mid: number, N: number) local function stereoMerge(X: number, Y: number, mid: number, N: number)
local W = W
local xp, side = 0, 0 local xp, side = 0, 0
for j = 1, N do for j = 1, N do
local y = W[Y + j] local y = W[Y + j]
@@ -1097,6 +1112,7 @@ end
local function quantBandStereo(X: number, Y: number, N: number, b: number, B: number, lowband: number, LM: number, local function quantBandStereo(X: number, Y: number, N: number, b: number, B: number, lowband: number, LM: number,
lowbandOut: number, lowbandScratch: number, fill: number): number lowbandOut: number, lowbandScratch: number, fill: number): number
local W, ctx = W, ctx
if N == 1 then if N == 1 then
return quantBandN1(X, Y, lowbandOut) return quantBandN1(X, Y, lowbandOut)
end end
@@ -1169,6 +1185,7 @@ local function quantAllBands(start: number, endb: number, hasY: boolean, N: numb
pulses: { number }, shortBlocks: boolean, spread: number, dualStereo: boolean, intensity: number, pulses: { number }, shortBlocks: boolean, spread: number, dualStereo: boolean, intensity: number,
tfRes: { number }, totalBits: number, balance: number, ec: RD.Dec, LM: number, codedBands: number, tfRes: { number }, totalBits: number, balance: number, ec: RD.Dec, LM: number, codedBands: number,
seed: number, disableInv: boolean): number seed: number, disableInv: boolean): number
local EB, W, ctx = EB, W, ctx
local M = lshift(1, LM) local M = lshift(1, LM)
local B = if shortBlocks then M else 1 local B = if shortBlocks then M else 1
local normOffset = M * EB[start + 1] local normOffset = M * EB[start + 1]
@@ -1278,6 +1295,7 @@ end
local function antiCollapse(st: any, C: number, size: number, LM: number, start: number, endb: number, local function antiCollapse(st: any, C: number, size: number, LM: number, start: number, endb: number,
collapse: { number }, pulses: { number }, seed: number) collapse: { number }, pulses: { number }, seed: number)
local EB = EB
local logE, prev1logE, prev2logE = st.oldBandE, st.oldLogE, st.oldLogE2 local logE, prev1logE, prev2logE = st.oldBandE, st.oldLogE, st.oldLogE2
for i = start, endb - 1 do for i = start, endb - 1 do
local N0 = EB[i + 2] - EB[i + 1] local N0 = EB[i + 2] - EB[i + 1]
@@ -1318,6 +1336,7 @@ local function antiCollapse(st: any, C: number, size: number, LM: number, start:
end end
local function denormaliseBands(X: number, freq: { number }, logE: { number }, eoff: number, start: number, endb: number, M: number, silence: boolean) local function denormaliseBands(X: number, freq: { number }, logE: { number }, eoff: number, start: number, endb: number, M: number, silence: boolean)
local EB = EB
local N = M * SHORT_MDCT local N = M * SHORT_MDCT
local bound = M * EB[endb + 1] local bound = M * EB[endb + 1]
if silence then if silence then
@@ -1349,6 +1368,7 @@ local function denormaliseBands(X: number, freq: { number }, logE: { number }, e
end end
local function celtSynthesis(st: any, C: number, CC: number, start: number, effEnd: number, isTransient: boolean, LM: number, silence: boolean, N: number) local function celtSynthesis(st: any, C: number, CC: number, start: number, effEnd: number, isTransient: boolean, LM: number, silence: boolean, N: number)
local FREQ2, WINDOW = FREQ2, WINDOW
local M = lshift(1, LM) local M = lshift(1, LM)
local B, NB, shift local B, NB, shift
if isTransient then if isTransient then
@@ -1396,6 +1416,7 @@ end
-- comb_filter, in place on mem (1-based base index of sample 0) -- comb_filter, in place on mem (1-based base index of sample 0)
local function combFilter(mem: { number }, base: number, T0: number, T1: number, N: number, g0: number, g1: number, local function combFilter(mem: { number }, base: number, T0: number, T1: number, N: number, g0: number, g1: number,
tapset0: number, tapset1: number, overlap: number) tapset0: number, tapset1: number, overlap: number)
local COMB_GAINS = COMB_GAINS
if g0 == 0 and g1 == 0 then if g0 == 0 and g1 == 0 then
return return
end end
@@ -1412,14 +1433,16 @@ local function combFilter(mem: { number }, base: number, T0: number, T1: number,
overlap = 0 overlap = 0
end end
local i = 0 local i = 0
local d1 = 2 - T1
while i < overlap do while i < overlap do
local p = base + i local p = base + i
local x0 = mem[p - T1 + 2] local x0 = mem[p + d1]
local w = WINDOW[i + 1] local w = WINDOW[i + 1]
local f = w * w local f = w * w
local of = 1 - f local of = 1 - f
mem[p] = mem[p] + (of * g00) * mem[p - T0] + (of * g01) * (mem[p - T0 + 1] + mem[p - T0 - 1]) local t = p - T0
+ (of * g02) * (mem[p - T0 + 2] + mem[p - T0 - 2]) + (f * g10) * x2 + (f * g11) * (x1 + x3) mem[p] = mem[p] + (of * g00) * mem[t] + (of * g01) * (mem[t + 1] + mem[t - 1])
+ (of * g02) * (mem[t + 2] + mem[t - 2]) + (f * g10) * x2 + (f * g11) * (x1 + x3)
+ (f * g12) * (x0 + x4) + (f * g12) * (x0 + x4)
x4 = x3 x4 = x3
x3 = x2 x3 = x2
@@ -1437,7 +1460,7 @@ local function combFilter(mem: { number }, base: number, T0: number, T1: number,
x2 = mem[p - T1] x2 = mem[p - T1]
x1 = mem[p - T1 + 1] x1 = mem[p - T1 + 1]
for q = p, base + N - 1 do for q = p, base + N - 1 do
local x0 = mem[q - T1 + 2] local x0 = mem[q + d1]
mem[q] = mem[q] + g10 * x2 + g11 * (x1 + x3) + g12 * (x0 + x4) mem[q] = mem[q] + g10 * x2 + g11 * (x1 + x3) + g12 * (x0 + x4)
x4 = x3 x4 = x3
x3 = x2 x3 = x2
@@ -1527,6 +1550,7 @@ Celt.reset = resetState
-- noise-based concealment (celt_decode_lost, FRAME_PLC_NOISE) -- noise-based concealment (celt_decode_lost, FRAME_PLC_NOISE)
local function decodeLost(st: any, N: number, LM: number) local function decodeLost(st: any, N: number, LM: number)
local EB = EB
local C = st.channels local C = st.channels
local start = st.start local start = st.start
local endb = st["end"] local endb = st["end"]
@@ -1582,6 +1606,7 @@ end
-- celt_decode_with_ec (buf nil or len <= 1 conceals) -- celt_decode_with_ec (buf nil or len <= 1 conceals)
function Celt.decode(st: any, buf: buffer?, off: number, len: number, pcm: { number }, pbase: number, frameSize: number, function Celt.decode(st: any, buf: buffer?, off: number, len: number, pcm: { number }, pbase: number, frameSize: number,
dec: RD.Dec?, accum: boolean): number dec: RD.Dec?, accum: boolean): number
local EB = EB
local CC = st.channels local CC = st.channels
local C = st.stream_channels local C = st.stream_channels
local start = st.start local start = st.start
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- codecs/audio/Opus/CeltTables: from libopus celt/static_modes_float.h and celt/quant_bands.c (BSD, licenses/). -- codecs/audio/Opus/CeltTables: from libopus celt/static_modes_float.h and celt/quant_bands.c (BSD, licenses/).
return { return {
logN400 = { logN400 = {
+5 -1
View File
@@ -403,7 +403,11 @@ function Decoder.decodeMultistream(ms: MS, buf: buffer?, off: number, len: numbe
return if ret < 0 then ret else -3 return if ret < 0 then ret else -3
end end
frameSize = ret frameSize = ret
if s < ms.coupled then local nch = ms.channels
if ms.streams == 1 and nch <= 2 and ms.coupled == nch - 1 and ms.mapping[1] == 0 and (nch == 1 or ms.mapping[2] == 1) then
-- one stream in its own channel order: the copy is a block move
table.move(tmp, 1, frameSize * nch, pbase, pcm)
elseif s < ms.coupled then
copyOut(ms, s * 2, tmp, 0, 2, pcm, pbase, frameSize) copyOut(ms, s * 2, tmp, 0, 2, pcm, pbase, frameSize)
copyOut(ms, s * 2 + 1, tmp, 1, 2, pcm, pbase, frameSize) copyOut(ms, s * 2 + 1, tmp, 1, 2, pcm, pbase, frameSize)
else else
+34 -20
View File
@@ -50,6 +50,9 @@ for shift = 0, 3 do
local factors = FACTORS[shift] local factors = FACTORS[shift]
local bitrev = table.create(n, 0) local bitrev = table.create(n, 0)
bitrevTable(bitrev, 0, 0, 1, factors, 1) bitrevTable(bitrev, 0, 0, 1, factors, 1)
for i = 1, n do
bitrev[i] += 1 -- 1-based targets
end
local twr, twi = table.create(n, 0), table.create(n, 0) local twr, twi = table.create(n, 0), table.create(n, 0)
for k = 0, n - 1 do for k = 0, n - 1 do
local ph = -2 * pi * k / n local ph = -2 * pi * k / n
@@ -132,6 +135,7 @@ local function bfly4(fr: { number }, fi: { number }, fstride: number, twr: { num
end end
else else
local m2, m3 = 2 * m, 3 * m local m2, m3 = 2 * m, 3 * m
local fs2, fs3 = fstride * 2, fstride * 3
for i = 0, N - 1 do for i = 0, N - 1 do
local p = i * mm + 1 local p = i * mm + 1
local t1, t2, t3 = 1, 1, 1 local t1, t2, t3 = 1, 1, 1
@@ -154,8 +158,8 @@ local function bfly4(fr: { number }, fi: { number }, fstride: number, twr: { num
fr[p + m2] = f0r - s3r fr[p + m2] = f0r - s3r
fi[p + m2] = f0i - s3i fi[p + m2] = f0i - s3i
t1 += fstride t1 += fstride
t2 += fstride * 2 t2 += fs2
t3 += fstride * 3 t3 += fs3
fr[p] = f0r + s3r fr[p] = f0r + s3r
fi[p] = f0i + s3i fi[p] = f0i + s3i
fr[p + m] = s5r + s4i fr[p + m] = s5r + s4i
@@ -170,6 +174,7 @@ end
local function bfly3(fr: { number }, fi: { number }, fstride: number, twr: { number }, twi: { number }, m: number, N: number, mm: number) local function bfly3(fr: { number }, fi: { number }, fstride: number, twr: { number }, twi: { number }, m: number, N: number, mm: number)
local m2 = 2 * m local m2 = 2 * m
local fs2 = fstride * 2
local epi3i = twi[fstride * m + 1] local epi3i = twi[fstride * m + 1]
for i = 0, N - 1 do for i = 0, N - 1 do
local p = i * mm + 1 local p = i * mm + 1
@@ -184,7 +189,7 @@ local function bfly3(fr: { number }, fi: { number }, fstride: number, twr: { num
local s3r, s3i = s1r + s2r, s1i + s2i local s3r, s3i = s1r + s2r, s1i + s2i
local s0r, s0i = s1r - s2r, s1i - s2i local s0r, s0i = s1r - s2r, s1i - s2i
t1 += fstride t1 += fstride
t2 += fstride * 2 t2 += fs2
local f0r, f0i = fr[p], fi[p] local f0r, f0i = fr[p], fi[p]
local fmr, fmi = f0r - s3r * 0.5, f0i - s3i * 0.5 local fmr, fmi = f0r - s3r * 0.5, f0i - s3i * 0.5
s0r *= epi3i s0r *= epi3i
@@ -203,23 +208,28 @@ end
local function bfly5(fr: { number }, fi: { number }, fstride: number, twr: { number }, twi: { number }, m: number, N: number, mm: number) local function bfly5(fr: { number }, fi: { number }, fstride: number, twr: { number }, twi: { number }, m: number, N: number, mm: number)
local yar, yai = twr[fstride * m + 1], twi[fstride * m + 1] local yar, yai = twr[fstride * m + 1], twi[fstride * m + 1]
local ybr, ybi = twr[fstride * 2 * m + 1], twi[fstride * 2 * m + 1] local ybr, ybi = twr[fstride * 2 * m + 1], twi[fstride * 2 * m + 1]
local fs1, fs2, fs3, fs4 = fstride, 2 * fstride, 3 * fstride, 4 * fstride
for i = 0, N - 1 do for i = 0, N - 1 do
local p0 = i * mm + 1 local p0 = i * mm + 1
local p1, p2, p3, p4 = p0 + m, p0 + 2 * m, p0 + 3 * m, p0 + 4 * m local p1, p2, p3, p4 = p0 + m, p0 + 2 * m, p0 + 3 * m, p0 + 4 * m
for u = 0, m - 1 do local k1, k2, k3, k4 = 1, 1, 1, 1 -- u * fstride * (1 .. 4) + 1
for _ = 0, m - 1 do
local s0r, s0i = fr[p0], fi[p0] local s0r, s0i = fr[p0], fi[p0]
local k = u * fstride
local ar, ai = fr[p1], fi[p1] local ar, ai = fr[p1], fi[p1]
local wr, wi = twr[k + 1], twi[k + 1] local wr, wi = twr[k1], twi[k1]
local s1r, s1i = ar * wr - ai * wi, ar * wi + ai * wr local s1r, s1i = ar * wr - ai * wi, ar * wi + ai * wr
ar, ai = fr[p2], fi[p2] ar, ai = fr[p2], fi[p2]
wr, wi = twr[2 * k + 1], twi[2 * k + 1] wr, wi = twr[k2], twi[k2]
local s2r, s2i = ar * wr - ai * wi, ar * wi + ai * wr local s2r, s2i = ar * wr - ai * wi, ar * wi + ai * wr
ar, ai = fr[p3], fi[p3] ar, ai = fr[p3], fi[p3]
wr, wi = twr[3 * k + 1], twi[3 * k + 1] wr, wi = twr[k3], twi[k3]
local s3r, s3i = ar * wr - ai * wi, ar * wi + ai * wr local s3r, s3i = ar * wr - ai * wi, ar * wi + ai * wr
ar, ai = fr[p4], fi[p4] ar, ai = fr[p4], fi[p4]
wr, wi = twr[4 * k + 1], twi[4 * k + 1] wr, wi = twr[k4], twi[k4]
k1 += fs1
k2 += fs2
k3 += fs3
k4 += fs4
local s4r, s4i = ar * wr - ai * wi, ar * wi + ai * wr local s4r, s4i = ar * wr - ai * wi, ar * wi + ai * wr
local s7r, s7i = s1r + s4r, s1i + s4i local s7r, s7i = s1r + s4r, s1i + s4i
@@ -298,24 +308,28 @@ function Mdct.backward(inp: { number }, inBase: number, out: { number }, outBase
-- pre-rotate, storing in bit-reversed order (real and imaginary swapped: an FFT is used instead of an IFFT) -- pre-rotate, storing in bit-reversed order (real and imaginary swapped: an FFT is used instead of an IFFT)
local xp1 = inBase local xp1 = inBase
local xp2 = inBase + stride * (N2 - 1) local xp2 = inBase + stride * (N2 - 1)
for i = 0, N4 - 1 do local st2 = 2 * stride
for i = 1, N4 do
local x1 = inp[xp1] local x1 = inp[xp1]
local x2 = inp[xp2] local x2 = inp[xp2]
local t0, t1 = trig[2 * i + 1], trig[2 * i + 2] local t0, t1 = trig[2 * i - 1], trig[2 * i]
local rev = bitrev[i + 1] + 1 local rev = bitrev[i]
fi[rev] = x2 * t1 + x1 * t0 fi[rev] = x2 * t1 + x1 * t0
fr[rev] = x1 * t1 - x2 * t0 fr[rev] = x1 * t1 - x2 * t0
xp1 += 2 * stride xp1 += st2
xp2 -= 2 * stride xp2 -= st2
end end
fftImpl(pl) fftImpl(pl)
local h = outBase + (overlap // 2) local h = outBase + (overlap // 2)
for k = 0, N4 - 1 do local hb = h + N2 - 1
local re = fi[k + 1] for k = 1, N4 do
local im = fr[k + 1] local re = fi[k]
local t0, t1 = trig[2 * k + 1], trig[2 * k + 2] local im = fr[k]
out[h + 2 * k] = re * t1 + im * t0 local t0, t1 = trig[2 * k - 1], trig[2 * k]
out[h + N2 - 1 - 2 * k] = re * t0 - im * t1 out[h] = re * t1 + im * t0
out[hb] = re * t0 - im * t1
h += 2
hb -= 2
end end
-- mirror on both sides for TDAC -- mirror on both sides for TDAC
local xp = outBase + overlap - 1 local xp = outBase + overlap - 1
+17 -11
View File
@@ -714,21 +714,27 @@ local function up2HQ(S: { number }, out: { number }, oo: number, inp: { number }
S[1], S[2], S[3], S[4], S[5], S[6] = s0, s1, s2, s3, s4, s5 S[1], S[2], S[3], S[4], S[5], S[6] = s0, s1, s2, s3, s4, s5
end end
-- FIR12 per phase ti, in tap order: FIR12[4 ti + 1 .. 4 ti + 4], FIR12[4 (11 - ti) + 4 .. 4 (11 - ti) + 1]
local FIR12_ROWS: { { number } } = table.create(12) :: any
for ti = 0, 11 do
local f0, f1 = ti * 4, (11 - ti) * 4
FIR12_ROWS[ti + 1] = { FIR12[f0 + 1], FIR12[f0 + 2], FIR12[f0 + 3], FIR12[f0 + 4], FIR12[f1 + 4], FIR12[f1 + 3], FIR12[f1 + 2], FIR12[f1 + 1] }
end
local function iirFirInterpol(out: { number }, oo: number, buf: { number }, max_index_Q16: number, incr: number): number local function iirFirInterpol(out: { number }, oo: number, buf: { number }, max_index_Q16: number, incr: number): number
local rows: { { number } } = FIR12_ROWS
local index_Q16 = 0 local index_Q16 = 0
while index_Q16 < max_index_Q16 do while index_Q16 < max_index_Q16 do
local ti = ((index_Q16 % 65536) * 12) // 65536 local r = rows[((index_Q16 % 65536) * 12) // 65536 + 1]
local b = index_Q16 // 65536 + 1 -- buf is 1-based local b = index_Q16 // 65536 + 1 -- buf is 1-based
local f0 = ti * 4 local res_Q15 = buf[b] * r[1]
local f1 = (11 - ti) * 4 + buf[b + 1] * r[2]
local res_Q15 = buf[b] * FIR12[f0 + 1] + buf[b + 2] * r[3]
+ buf[b + 1] * FIR12[f0 + 2] + buf[b + 3] * r[4]
+ buf[b + 2] * FIR12[f0 + 3] + buf[b + 4] * r[5]
+ buf[b + 3] * FIR12[f0 + 4] + buf[b + 5] * r[6]
+ buf[b + 4] * FIR12[f1 + 4] + buf[b + 6] * r[7]
+ buf[b + 5] * FIR12[f1 + 3] + buf[b + 7] * r[8]
+ buf[b + 6] * FIR12[f1 + 2]
+ buf[b + 7] * FIR12[f1 + 1]
out[oo] = sat16((res_Q15 + 16384) // 32768) out[oo] = sat16((res_Q15 + 16384) // 32768)
oo += 1 oo += 1
index_Q16 += incr index_Q16 += incr
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- codecs/audio/Opus: the Opus codec (RFC 6716) without its container. -- codecs/audio/Opus: the Opus codec (RFC 6716) without its container.
-- A port of the libopus 1.6 decoder (BSD, licenses/libopus-BSD.txt), absorbed from opus-luau dd2b4e5; the CELT encoder is new. -- A port of the libopus 1.6 decoder (BSD, licenses/libopus-BSD.txt), absorbed from opus-luau dd2b4e5; the CELT encoder is new.
local Opus = { local Opus = {
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- codecs/audio/Pcm: PCM plumbing shared by audio formats: raw sample formats, streaming Decoders, encoder input sources. -- codecs/audio/Pcm: PCM plumbing shared by audio formats: raw sample formats, streaming Decoders, encoder input sources.
local Err = require("@rosetta/core/Err") local Err = require("@rosetta/core/Err")
local Bytes = require("@rosetta/core/Bytes") local Bytes = require("@rosetta/core/Bytes")
+70 -34
View File
@@ -105,7 +105,7 @@ type State = {
f: Filter, f: Filter,
step: number, -- M = from / g: the input advance per output frame, in units of 1 / L step: number, -- M = from / g: the input advance per output frame, in units of 1 / L
L: number, -- to / g L: number, -- to / g
hist: { number }, hist: { { number } }, -- per channel: input frame base + i - 1 at [i]
histFrames: number, histFrames: number,
base: number, base: number,
inFrames: number, inFrames: number,
@@ -115,6 +115,16 @@ type State = {
flush: any, flush: any,
} }
-- dot(x, xi, h, hi, n): sum of x[xi + k] * h[hi + k] for k = 0 .. n - 1, in that order
local function dot(x: { number }, xi: number, h: { number }, hi: number, n: number): number
local acc = 0
local d = xi - hi
for k = hi, hi + n - 1 do
acc += x[k + d] * h[k]
end
return acc
end
local function run(st: State, limitOut: number, out: buffer?): (buffer, number) local function run(st: State, limitOut: number, out: buffer?): (buffer, number)
local f = st.f local f = st.f
local taps, half, h = f.taps, f.half, f.h local taps, half, h = f.taps, f.half, f.h
@@ -140,61 +150,78 @@ local function run(st: State, limitOut: number, out: buffer?): (buffer, number)
local b = if out and buffer.len(out) >= bytes then out else buffer.create(bytes) local b = if out and buffer.len(out) >= bytes then out else buffer.create(bytes)
local exact = f.exact local exact = f.exact
local phases = f.phases local phases = f.phases
local x0, x1 = hist[1], hist[2]
local o = 0 local o = 0
for j = j0, jmax - 1 do local num = j0 * M
local num = j * M local ip = num // L -- floor(t)
local ip = num // L -- floor(t) local ph = num - ip * L -- num mod L
local first = ip - half + 1 for _ = j0, jmax - 1 do
local rel = first - base local rel = ip - half + 1 - base
local kLo = if rel < 0 then -rel else 0 local kLo = if rel < 0 then -rel else 0
local kHi = taps - 1 local kHi = taps - 1
if rel + kHi >= histFrames then if rel + kHi >= histFrames then
kHi = histFrames - 1 - rel kHi = histFrames - 1 - rel
end end
local cnt = kHi - kLo + 1
local xi = rel + kLo + 1
if exact then if exact then
local hb = (num - ip * L) * taps + 1 -- phase * taps + 1 local hb = ph * taps + kLo + 1
for c = 0, ch - 1 do if ch == 2 then
local acc = 0 local a0, a1 = 0, 0
local hi = (rel + kLo) * ch + c + 1 local d = xi - hb
for k = kLo, kHi do for k = hb, hb + cnt - 1 do
acc += hist[hi] * h[hb + k] local hk = h[k]
hi += ch a0 += x0[k + d] * hk
a1 += x1[k + d] * hk
end end
writef32(b, o, acc) writef32(b, o, a0)
writef32(b, o + 4, a1)
o += 8
elseif ch == 1 then
writef32(b, o, dot(x0, xi, h, hb, cnt))
o += 4 o += 4
else
for c = 1, ch do
writef32(b, o, dot(hist[c], xi, h, hb, cnt))
o += 4
end
end end
else else
local fp = (num - ip * L) / L * phases local fp = ph / L * phases
local p = floor(fp) local p = floor(fp)
local a = fp - p local a = fp - p
local hb = p * taps + 1 local hb = p * taps + kLo + 1
local hb2 = hb + taps local hb2 = hb + taps
for c = 0, ch - 1 do for c = 1, ch do
local acc, acc2 = 0, 0 local acc = dot(hist[c], xi, h, hb, cnt)
local hi = (rel + kLo) * ch + c + 1 local acc2 = dot(hist[c], xi, h, hb2, cnt)
for k = kLo, kHi do
local x = hist[hi]
acc += x * h[hb + k]
acc2 += x * h[hb2 + k]
hi += ch
end
writef32(b, o, acc + (acc2 - acc) * a) writef32(b, o, acc + (acc2 - acc) * a)
o += 4 o += 4
end end
end end
ph += M
if ph >= L then
local q = ph // L
ip += q
ph -= q * L
end
end end
st.outPos = jmax st.outPos = jmax
local keepFrom = (jmax * M) // L - half + 1 local keepFrom = (jmax * M) // L - half + 1
local drop = keepFrom - base local drop = keepFrom - base
if drop > 0 then if drop > 0 then
if drop >= histFrames then if drop >= histFrames then
st.hist = {} for c = 1, ch do
hist[c] = {}
end
st.histFrames = 0 st.histFrames = 0
st.base = base + histFrames st.base = base + histFrames
else else
local nh: { number } = table.create((histFrames - drop) * ch) :: any for c = 1, ch do
table.move(hist, drop * ch + 1, histFrames * ch, 1, nh) local nh: { number } = table.create(histFrames - drop) :: any
st.hist = nh table.move(hist[c], drop + 1, histFrames, 1, nh)
hist[c] = nh
end
st.histFrames = histFrames - drop st.histFrames = histFrames - drop
st.base = base + drop st.base = base + drop
end end
@@ -208,10 +235,15 @@ local function process(self: State, src: buffer, frames: number, out: buffer?):
end end
local ch = self.channels local ch = self.channels
frames = min(floor(frames), buffer.len(src) // (ch * 4)) frames = min(floor(frames), buffer.len(src) // (ch * 4))
local hist = self.hist local p = self.histFrames
local p = self.histFrames * ch for c = 1, ch do
for i = 0, frames * ch - 1 do local x = self.hist[c]
hist[p + i + 1] = readf32(src, i * 4) local o = (c - 1) * 4
local step = ch * 4
for i = p + 1, p + frames do
x[i] = readf32(src, o)
o += step
end
end end
self.histFrames += frames self.histFrames += frames
self.inFrames += frames self.inFrames += frames
@@ -250,6 +282,10 @@ function Resample.new(from: number, to: number, channels: number, opts: Options?
local L: number, M: number = ti // g, fi // g local L: number, M: number = ti // g, fi // g
local exact = L <= MAX_EXACT local exact = L <= MAX_EXACT
local phases = if exact then L else INTERP_PHASES local phases = if exact then L else INTERP_PHASES
local hist: { { number } } = table.create(channels) :: any
for c = 1, channels do
hist[c] = {}
end
local st: State = { local st: State = {
from = from, from = from,
to = to, to = to,
@@ -258,7 +294,7 @@ function Resample.new(from: number, to: number, channels: number, opts: Options?
f = if L == 1 and M == 1 then { taps = 2, half = 1, phases = 1, exact = true, h = { 1, 0 } } else makeFilter(to / from, phases, exact, q[1], q[2], cut), f = if L == 1 and M == 1 then { taps = 2, half = 1, phases = 1, exact = true, h = { 1, 0 } } else makeFilter(to / from, phases, exact, q[1], q[2], cut),
step = M, step = M,
L = L, L = L,
hist = {}, hist = hist,
histFrames = 0, histFrames = 0,
base = 0, base = 0,
inFrames = 0, inFrames = 0,
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- codecs/audio/SoundFont/Fallback: the built-in General MIDI set (generated waveforms per GM family, drum kit on bank 128). -- codecs/audio/SoundFont/Fallback: the built-in General MIDI set (generated waveforms per GM family, drum kit on bank 128).
-- No third-party code. -- No third-party code.
local Parse = require("@rosetta/codecs/audio/SoundFont/Parse") local Parse = require("@rosetta/codecs/audio/SoundFont/Parse")
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- codecs/audio/SoundFont/Parse: SoundFont 2.0x (sfbk RIFF) reader, zones merged into regions as TinySoundFont does. -- codecs/audio/SoundFont/Parse: SoundFont 2.0x (sfbk RIFF) reader, zones merged into regions as TinySoundFont does.
-- After tsf.h v0.9 (MIT, (c) Bernhard Schelling; licenses/TinySoundFont-LICENSE.txt) tsf_load_presets / -- After tsf.h v0.9 (MIT, (c) Bernhard Schelling; licenses/TinySoundFont-LICENSE.txt) tsf_load_presets /
-- tsf_region_operator / tsf_region_envtosecs. Unlike tsf.h, initialAttenuation is cB * 0.04 dB (FluidSynth's -- tsf_region_operator / tsf_region_envtosecs. Unlike tsf.h, initialAttenuation is cB * 0.04 dB (FluidSynth's
+34 -16
View File
@@ -1,5 +1,6 @@
--!strict --!strict
--!native --!native
--!optimize 2
-- codecs/audio/SoundFont/Synth: a SoundFont 2 sample synthesizer with MIDI channels. -- codecs/audio/SoundFont/Synth: a SoundFont 2 sample synthesizer with MIDI channels.
-- A port of TinySoundFont (tsf.h v0.9, MIT, (c) 2017-2025 Bernhard Schelling, based on SFZero (c) 2012 Steve Folta; -- A port of TinySoundFont (tsf.h v0.9, MIT, (c) 2017-2025 Bernhard Schelling, based on SFZero (c) 2012 Steve Folta;
-- licenses/TinySoundFont-LICENSE.txt). Unlike tsf.h, the envelope gain is ramped across each 64-sample block. -- licenses/TinySoundFont-LICENSE.txt). Unlike tsf.h, the envelope gain is ramped across each 64-sample block.
@@ -675,6 +676,8 @@ local function voiceRender(s: State, v: Voice, out: buffer, frame: number, numSa
local endD = region.stop local endD = region.stop
local loopEndD = loopEnd + 1 local loopEndD = loopEnd + 1
local loopLen = loopEnd - loopStart + 1 local loopLen = loopEnd - loopStart + 1
local wrapAt = if isLooping then loopEnd else math.huge -- ip >= loopEnd and isLooping
local wrapEnd = if isLooping then loopEndD else math.huge
local pos = v.pos local pos = v.pos
local lpActive, a0, a1, b1, b2, z1, z2 = v.lpActive, v.a0, v.a1, v.b1, v.b2, v.z1, v.z2 local lpActive, a0, a1, b1, b2, z1, z2 = v.lpActive, v.a0, v.a1, v.b1, v.b2, v.z1, v.z2
local dynamicLowpass = modLfoToFilterFc ~= 0 or modEnvToFilterFc ~= 0 local dynamicLowpass = modLfoToFilterFc ~= 0 or modEnvToFilterFc ~= 0
@@ -719,26 +722,41 @@ local function voiceRender(s: State, v: Voice, out: buffer, frame: number, numSa
local panL, panR = v.panL, v.panR local panL, panR = v.panL, v.panR
local g = gainMono local g = gainMono
local k = block local k = block
while k > 0 and pos < endD do if lpActive then
k -= 1 while k > 0 and pos < endD do
local ip = floor(pos) k -= 1
local np = if ip >= loopEnd and isLooping then loopStart else ip + 1 local ip = floor(pos)
local s0 = readf32(input, ip * 4) local np = if ip >= wrapAt then loopStart else ip + 1
local val = s0 + (readf32(input, np * 4) - s0) * (pos - ip) local s0 = readf32(input, ip * 4)
if lpActive then local val = s0 + (readf32(input, np * 4) - s0) * (pos - ip)
local y = val * a0 + z1 local y = val * a0 + z1
z1 = val * a1 + z2 - b1 * y z1 = val * a1 + z2 - b1 * y
z2 = val * a0 - b2 * y z2 = val * a0 - b2 * y
val = y val = y * g
g += step
writef32(out, o, readf32(out, o) + val * panL)
writef32(out, o + 4, readf32(out, o + 4) + val * panR)
o += 8
pos += pitchRatio
if pos >= wrapEnd then
pos -= loopLen
end
end end
val *= g else
g += step while k > 0 and pos < endD do
writef32(out, o, readf32(out, o) + val * panL) k -= 1
writef32(out, o + 4, readf32(out, o + 4) + val * panR) local ip = floor(pos)
o += 8 local np = if ip >= wrapAt then loopStart else ip + 1
pos += pitchRatio local s0 = readf32(input, ip * 4)
if pos >= loopEndD and isLooping then local val = (s0 + (readf32(input, np * 4) - s0) * (pos - ip)) * g
pos -= loopLen g += step
writef32(out, o, readf32(out, o) + val * panL)
writef32(out, o + 4, readf32(out, o + 4) + val * panR)
o += 8
pos += pitchRatio
if pos >= wrapEnd then
pos -= loopLen
end
end end
end end
o += k * 8 o += k * 8
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- codecs/audio/SoundFont: SoundFont 2 banks and the sample synth that plays MIDI through them. -- codecs/audio/SoundFont: SoundFont 2 banks and the sample synth that plays MIDI through them.
-- The synth is a port of TinySoundFont (tsf.h v0.9, MIT, (c) 2017-2025 Bernhard Schelling; licenses/TinySoundFont-LICENSE.txt). -- The synth is a port of TinySoundFont (tsf.h v0.9, MIT, (c) 2017-2025 Bernhard Schelling; licenses/TinySoundFont-LICENSE.txt).
local Err = require("@rosetta/core/Err") local Err = require("@rosetta/core/Err")
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- codecs/audio/Stream: the streaming Types.Decoder over a packetised codec (gapless trim, seeking with pre-roll). -- codecs/audio/Stream: the streaming Types.Decoder over a packetised codec (gapless trim, seeking with pre-roll).
-- New in rosetta. -- New in rosetta.
local Err = require("@rosetta/core/Err") local Err = require("@rosetta/core/Err")
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- codecs/audio/Tracker/Load: helpers mapping other tracker formats' effects onto the engine's S3M / IT or MOD / XM families. -- codecs/audio/Tracker/Load: helpers mapping other tracker formats' effects onto the engine's S3M / IT or MOD / XM families.
-- Ported from OpenMPT's ModCommand helpers (ConvertModCommand, ConvertToVolCommand, FillInTwoCommands, GetEffectWeight, -- Ported from OpenMPT's ModCommand helpers (ConvertModCommand, ConvertToVolCommand, FillInTwoCommands, GetEffectWeight,
-- CPattern::WriteEffect; BSD licence, licenses/openmpt-LICENSE.txt). -- CPattern::WriteEffect; BSD licence, licenses/openmpt-LICENSE.txt).
+80 -2
View File
@@ -1,8 +1,9 @@
--!strict --!strict
--!native --!native
--!optimize 2
-- codecs/audio/Tracker/Mixer: tracker voice mixing (loops, IT sustain loops, IT two-pole resonant filter, click ramps). -- codecs/audio/Tracker/Mixer: tracker voice mixing (loops, IT sustain loops, IT two-pole resonant filter, click ramps).
-- No third-party code. -- No third-party code.
local floor, ceil, min = math.floor, math.ceil, math.min local floor, ceil, min, max = math.floor, math.ceil, math.min, math.max
local readf32, writef32 = buffer.readf32, buffer.writef32 local readf32, writef32 = buffer.readf32, buffer.writef32
local Mixer = {} local Mixer = {}
@@ -87,7 +88,10 @@ local function mixVoice(v: any, out: buffer?, off: number, n: number, linear: bo
local fa, fb0, fb1 = v.fa, v.fb0, v.fb1 local fa, fb0, fb1 = v.fa, v.fb0, v.fb1
local y1l, y2l, y1r, y2r = v.y1l, v.y2l, v.y1r, v.y2r local y1l, y2l, y1r, y2r = v.y1l, v.y2l, v.y1r, v.y2r
local o = (off + i) * 8 local o = (off + i) * 8
for _ = 1, m do -- the common voice (mono, interpolated) runs the general loop only while its volume ramps
local fast = nch == 1 and linear
local mg = if fast then (if rl > 0 then min(rl, m) else 0) else m
for _ = 1, mg do
local idx = floor(p) local idx = floor(p)
if idx > hi then if idx > hi then
idx = hi idx = hi
@@ -148,6 +152,80 @@ local function mixVoice(v: any, out: buffer?, off: number, n: number, linear: bo
o += 8 o += 8
p += step p += step
end end
-- while p < e - 1 (forward), idx = floor(p) is in range and idx + 1 < e needs no wrap: those steps skip the
-- checks; two steps of margin for the rounding of the running p
local k0 = mg + 1
local safe = mg
if mg < m and step >= 0.001 and p >= 0 and s >= 0 and e <= len then
safe = min(m, mg + floor((e - 1 - p) / step) - 2)
end
if mg < m and fOn then -- the general loop, specialised to a filtered mono voice after its ramp
for _ = k0, safe do
local idx = floor(p)
local a = readf32(data, idx * 4)
local x = a + (readf32(data, idx * 4 + 4) - a) * (p - idx)
local y = x * fa + y1l * fb0 + y2l * fb1
y2l, y1l = y1l, y
writef32(out, o, readf32(out, o) + y * gl)
writef32(out, o + 4, readf32(out, o + 4) + y * gr)
o += 8
p += step
end
for _ = max(k0, safe + 1), m do
local idx = floor(p)
if idx > hi then
idx = hi
elseif idx < 0 then
idx = 0
end
local j = idx + 1
if j >= e then
j = wrapJ
end
if j > hi then
j = hi
end
local a = readf32(data, idx * 4)
local x = a + (readf32(data, j * 4) - a) * (p - idx)
local y = x * fa + y1l * fb0 + y2l * fb1
y2l, y1l = y1l, y
writef32(out, o, readf32(out, o) + y * gl)
writef32(out, o + 4, readf32(out, o + 4) + y * gr)
o += 8
p += step
end
elseif mg < m then -- the same, unfiltered
for _ = k0, safe do
local idx = floor(p)
local a = readf32(data, idx * 4)
local x = a + (readf32(data, idx * 4 + 4) - a) * (p - idx)
writef32(out, o, readf32(out, o) + x * gl)
writef32(out, o + 4, readf32(out, o + 4) + x * gr)
o += 8
p += step
end
for _ = max(k0, safe + 1), m do
local idx = floor(p)
if idx > hi then
idx = hi
elseif idx < 0 then
idx = 0
end
local j = idx + 1
if j >= e then
j = wrapJ
end
if j > hi then
j = hi
end
local a = readf32(data, idx * 4)
local x = a + (readf32(data, j * 4) - a) * (p - idx)
writef32(out, o, readf32(out, o) + x * gl)
writef32(out, o + 4, readf32(out, o + 4) + x * gr)
o += 8
p += step
end
end
v.p = p v.p = p
v.gl, v.gr, v.rampN = gl, gr, rl v.gl, v.gr, v.rampN = gl, gr, rl
v.y1l, v.y2l, v.y1r, v.y2r = y1l, y2l, y1r, y2r v.y1l, v.y2l, v.y1r, v.y2r = y1l, y2l, y1r, y2r
@@ -1,5 +1,6 @@
--!strict --!strict
--!native --!native
--!optimize 2
-- codecs/audio/Tracker/Pcm: raw 8 / 16-bit tracker sample data (signed / unsigned, XM / IT 2.15 delta coding, -- codecs/audio/Tracker/Pcm: raw 8 / 16-bit tracker sample data (signed / unsigned, XM / IT 2.15 delta coding,
-- interleaved or planar stereo) <-> f32. -- interleaved or planar stereo) <-> f32.
local readu8, readi8, readu16, readi16 = buffer.readu8, buffer.readi8, buffer.readu16, buffer.readi16 local readu8, readi8, readu16, readi16 = buffer.readu8, buffer.readi8, buffer.readu16, buffer.readi16
@@ -1,5 +1,6 @@
--!strict --!strict
--!native --!native
--!optimize 2
-- codecs/audio/Tracker/Player: the tracker sequencer for the MOD, S3M, XM and IT effect families. -- codecs/audio/Tracker/Player: the tracker sequencer for the MOD, S3M, XM and IT effect families.
-- Written from the format documents (ProTracker 2.3 docs, the XM spec and FT2 behaviour notes, ST3 TECH.DOC, ITTECH.TXT); -- Written from the format documents (ProTracker 2.3 docs, the XM spec and FT2 behaviour notes, ST3 TECH.DOC, ITTECH.TXT);
-- no third-party code. -- no third-party code.
@@ -1,5 +1,6 @@
--!strict --!strict
--!native --!native
--!optimize 2
-- codecs/audio/Tracker/Tables: tracker lookup tables, from the public format documents (ProTracker 2.3 effect docs, -- codecs/audio/Tracker/Tables: tracker lookup tables, from the public format documents (ProTracker 2.3 effect docs,
-- FT2 / XM spec, ST3 TECH.DOC, ITTECH.TXT). -- FT2 / XM spec, ST3 TECH.DOC, ITTECH.TXT).
local Tables = {} local Tables = {}
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- codecs/audio/Tracker: the shared tracker engine behind music/mod, s3m, xm and it, and the formats mapped onto them. -- codecs/audio/Tracker: the shared tracker engine behind music/mod, s3m, xm and it, and the formats mapped onto them.
-- Written from the format documents (ProTracker 2.3, the XM spec + FT2 behaviour, ST3 TECH.DOC, ITTECH.TXT); libxmp / -- Written from the format documents (ProTracker 2.3, the XM spec + FT2 behaviour, ST3 TECH.DOC, ITTECH.TXT); libxmp /
-- OpenMPT were used only as reference players for tests. -- OpenMPT were used only as reference players for tests.
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- codecs/audio/Tta: the TTA1 (True Audio) lossless codec. -- codecs/audio/Tta: the TTA1 (True Audio) lossless codec.
-- From the TTA1 format description (22-byte header and seek table with CRC-32s, frames of 256 / 245 seconds); no libtta / -- From the TTA1 format description (22-byte header and seek table with CRC-32s, frames of 256 / 245 seconds); no libtta /
-- ffmpeg code (LGPL). Format 2 (password) is UNSUPPORTED. -- ffmpeg code (LGPL). Format 2 (password) is UNSUPPORTED.
+24 -17
View File
@@ -278,12 +278,12 @@ local function partition(br: Codebook.Br, book: Codebook.Book, target: { number
return false return false
end end
local base = e * dims local base = e * dims
local len = math.min(dims, psize - k)
local at = offset + k local at = offset + k
for i = 0, len - 1 do -- the values at + i < limit of the first min(dims, psize - k)
if at + i < limit then local len = math.min(dims, psize - k, limit - at)
target[at + i + 1] += vq[base + i + 1] local d = base - at
end for t = at + 1, at + len do
target[t] += vq[t + d]
end end
k += dims k += dims
end end
@@ -517,13 +517,13 @@ function Packet.decode(st: State, b: buffer, off: number, size: number): number
for j = 1, leftStart do for j = 1, leftStart do
fr[j] = 0 fr[j] = 0
end end
local L = leftEnd - leftStart for j = 1, leftEnd - leftStart do
for j = 0, L - 1 do fr[leftStart + j] *= lslope[j]
fr[leftStart + j + 1] *= lslope[j + 1]
end end
local R = rightEnd - rightStart local R = rightEnd - rightStart
for j = 0, R - 1 do local rb = rightStart + R + 1 -- fr[rightStart + j + 1] *= rslope[R - j]
fr[rightStart + j + 1] *= rslope[R - j] for j = 1, R do
fr[rb - j] *= rslope[j]
end end
for j = rightEnd + 1, n do for j = rightEnd + 1, n do
fr[j] = 0 fr[j] = 0
@@ -539,13 +539,20 @@ function Packet.decode(st: State, b: buffer, off: number, size: number): number
local tl = st.tailLen local tl = st.tailLen
for c = 1, ch do for c = 1, ch do
local out, tail, fr = st.out[c], st.tail[c], st.frame[c] local out, tail, fr = st.out[c], st.tail[c], st.frame[c]
for j = 0, count - 1 do -- out[j] = (tail[j] if j <= tl else 0) + (fr[j - o] if j > o), j = 1 .. count
local v = if j < tl then tail[j + 1] else 0 local a = math.min(math.max(o, 0), count) -- j <= a: no frame sample
local fi = j - o local b = math.min(tl, count) -- j <= b: a tail sample
if fi >= 0 then for j = 1, math.min(a, b) do
v += fr[fi + 1] out[j] = tail[j]
end end
out[j + 1] = v for j = b + 1, a do
out[j] = 0
end
for j = a + 1, b do
out[j] = tail[j] + fr[j - o]
end
for j = math.max(a, b) + 1, count do
out[j] = 0 + fr[j - o]
end end
end end
end end
@@ -1,5 +1,6 @@
--!strict --!strict
--!native --!native
--!optimize 2
-- codecs/audio/Vorbis/Setup: the three Vorbis header packets (Vorbis I spec section 4.2). -- codecs/audio/Vorbis/Setup: the three Vorbis header packets (Vorbis I spec section 4.2).
-- Ported from stb_vorbis 1.22 start_decoder (public domain / MIT, licenses/stb_vorbis-LICENSE.txt). Floor 0 is -- Ported from stb_vorbis 1.22 start_decoder (public domain / MIT, licenses/stb_vorbis-LICENSE.txt). Floor 0 is
-- rejected as unsupported, as stb_vorbis does. -- rejected as unsupported, as stb_vorbis does.
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- codecs/audio/Vorbis/Tables: the floor 1 inverse dB table (Vorbis I specification section 10.1, as in stb_vorbis 1.22, -- codecs/audio/Vorbis/Tables: the floor 1 inverse dB table (Vorbis I specification section 10.1, as in stb_vorbis 1.22,
-- public domain / MIT, licenses/stb_vorbis-LICENSE.txt). -- public domain / MIT, licenses/stb_vorbis-LICENSE.txt).
return table.freeze({ return table.freeze({
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- codecs/audio/Vorbis: the Vorbis I decoder without its container. -- codecs/audio/Vorbis: the Vorbis I decoder without its container.
-- A Luau port of stb_vorbis 1.22 (public domain / MIT, licenses/stb_vorbis-LICENSE.txt). -- A Luau port of stb_vorbis 1.22 (public domain / MIT, licenses/stb_vorbis-LICENSE.txt).
local Vorbis = { local Vorbis = {
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- codecs/audio/VorbisComment: Vorbis comment fields ("KEY=value"; Vorbis, Opus, FLAC) <-> Types.Tags. -- codecs/audio/VorbisComment: Vorbis comment fields ("KEY=value"; Vorbis, Opus, FLAC) <-> Types.Tags.
local VorbisComment = {} local VorbisComment = {}
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- codecs/audio/WavPack: the WavPack 4 / 5 audio codec (the blocks of .wv files, and of WavPack in Matroska). -- codecs/audio/WavPack: the WavPack 4 / 5 audio codec (the blocks of .wv files, and of WavPack in Matroska).
-- Ported from WavPack 5.9.0 (David Bryant, BSD 3-clause, licenses/wavpack-LICENSE.txt). Not supported: DSD, pre-4.0 -- Ported from WavPack 5.9.0 (David Bryant, BSD 3-clause, licenses/wavpack-LICENSE.txt). Not supported: DSD, pre-4.0
-- streams (version < 0x402). -- streams (version < 0x402).
@@ -86,12 +86,13 @@ function RangeDecoder.new(buf: buffer, base: number, storage: number): Dec
return d return d
end end
function RangeDecoder.decode(d: Dec, ft: number): number local function decode(d: Dec, ft: number): number
local ext = d.rng // ft local ext = d.rng // ft
d.ext = ext d.ext = ext
local s = d.val // ext local s = d.val // ext
return ft - math.min(s + 1, ft) return ft - math.min(s + 1, ft)
end end
RangeDecoder.decode = decode
function RangeDecoder.decodeBin(d: Dec, bits: number): number function RangeDecoder.decodeBin(d: Dec, bits: number): number
local ext = rshift(d.rng, bits) local ext = rshift(d.rng, bits)
@@ -101,16 +102,16 @@ function RangeDecoder.decodeBin(d: Dec, bits: number): number
return ft - math.min(s + 1, ft) return ft - math.min(s + 1, ft)
end end
function RangeDecoder.update(d: Dec, fl: number, fh: number, ft: number) local function update(d: Dec, fl: number, fh: number, ft: number)
local s = d.ext * (ft - fh) local s = d.ext * (ft - fh)
d.val = band(d.val - s, 0xFFFFFFFF) -- uint32 wrap (corrupt streams only) d.val = band(d.val - s, 0xFFFFFFFF) -- uint32 wrap (corrupt streams only)
if fl > 0 then local rng = if fl > 0 then d.ext * (fh - fl) else d.rng - s
d.rng = d.ext * (fh - fl) d.rng = rng
else if rng <= CODE_BOT then
d.rng -= s normalize(d)
end end
normalize(d)
end end
RangeDecoder.update = update
function RangeDecoder.bitLogp(d: Dec, logp: number): boolean function RangeDecoder.bitLogp(d: Dec, logp: number): boolean
local r = d.rng local r = d.rng
@@ -118,12 +119,15 @@ function RangeDecoder.bitLogp(d: Dec, logp: number): boolean
local s = rshift(r, logp) local s = rshift(r, logp)
local ret = v < s local ret = v < s
if ret then if ret then
d.rng = s r = s
else else
d.val = v - s d.val = v - s
d.rng = r - s r -= s
end
d.rng = r
if r <= CODE_BOT then
normalize(d)
end end
normalize(d)
return ret return ret
end end
@@ -140,11 +144,13 @@ function RangeDecoder.icdf(d: Dec, icdf: { number }, off: number, ftb: number):
until v >= s until v >= s
d.val = v - s d.val = v - s
d.rng = t - s d.rng = t - s
normalize(d) if t - s <= CODE_BOT then
normalize(d)
end
return ret return ret
end end
function RangeDecoder.bits(d: Dec, bits: number): number local function bits(d: Dec, bits: number): number
local window = d.end_window local window = d.end_window
local available = d.nend_bits local available = d.nend_bits
if available < bits then if available < bits then
@@ -171,6 +177,7 @@ function RangeDecoder.bits(d: Dec, bits: number): number
d.nbits_total += bits d.nbits_total += bits
return ret return ret
end end
RangeDecoder.bits = bits
function RangeDecoder.uint(d: Dec, ft0: number): number function RangeDecoder.uint(d: Dec, ft0: number): number
local ft = ft0 - 1 local ft = ft0 - 1
@@ -178,17 +185,17 @@ function RangeDecoder.uint(d: Dec, ft0: number): number
if ftb > UINT_BITS then if ftb > UINT_BITS then
ftb -= UINT_BITS ftb -= UINT_BITS
local ft1 = rshift(ft, ftb) + 1 local ft1 = rshift(ft, ftb) + 1
local s = RangeDecoder.decode(d, ft1) local s = decode(d, ft1)
RangeDecoder.update(d, s, s + 1, ft1) update(d, s, s + 1, ft1)
local t = bor(lshift(s, ftb), RangeDecoder.bits(d, ftb)) local t = bor(lshift(s, ftb), bits(d, ftb))
if t <= ft then if t <= ft then
return t return t
end end
d.error = 1 d.error = 1
return ft return ft
else else
local s = RangeDecoder.decode(d, ft0) local s = decode(d, ft0)
RangeDecoder.update(d, s, s + 1, ft0) update(d, s, s + 1, ft0)
return s return s
end end
end end
+1
View File
@@ -1,4 +1,5 @@
--!strict --!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 -- 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 -- (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 / ...). -- boxes (moov / trak / mdia / minf / stbl / udta / meta / ilst items / moof / traf / iprp / ipco / iref / dinf / ...).
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- containers/IsoBmff/Demux: tracks and sample tables of an ISO BMFF / QuickTime file (ISO/IEC 14496-12 8.3 - 8.8), -- 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, -- 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. -- offsets absolute in the reader's buffer. Never throws.
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- containers/IsoBmff/Meta: the metadata boxes. HEIF / AVIF items (ISO/IEC 23008-12: pitm, iinf / infe, iloc -- 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 -- 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 / -- decoded, codec configurations av1C / hvcC / avcC kept raw) and the iTunes tags (udta / meta / ilst: text, trkn /
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- containers/IsoBmff/Mux: writes a progressive ISO BMFF / MP4 / M4A file (ISO/IEC 14496-12): ftyp, moov first ("fast -- 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 -- 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. -- sample entries with their configuration box, plus raw child boxes. Never throws: bad specs return nil, Err.ARG.
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- containers/IsoBmff/QtPalette: the depth and colour table of a QuickTime video sample description (Apple QuickTime -- 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). -- 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, -- Used by the MOV demuxer and by Matroska's V_QUICKTIME tracks (whose CodecPrivate is the same description). Depths 1,
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- containers/IsoBmff: ISO base media file format (ISO/IEC 14496-12) and its relatives: MP4 / M4A / M4V / MOV (QuickTime) -- 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, -- / 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. -- mov, heif, avif build on it. Written from the specifications; no third-party code.
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- music/669: Composer 669 / UNIS 669 modules ("if" / "JN"), ported from OpenMPT's Load_669.cpp (BSD, -- music/669: Composer 669 / UNIS 669 modules ("if" / "JN"), ported from OpenMPT's Load_669.cpp (BSD,
-- licenses/openmpt-LICENSE.txt). Supports: 8 channels, 64-row patterns, played as the "s3m" family with 669's quirks -- licenses/openmpt-LICENSE.txt). Supports: 8 channels, 64-row patterns, played as the "s3m" family with 669's quirks
-- (periods in Hz, auto portamentos, effects D..H, a fixed 78 BPM). Not supported: UNIS 669's speed 0, writing. -- (periods in Hz, auto portamentos, effects D..H, a fixed 78 BPM). Not supported: UNIS 669's speed 0, writing.
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- music/ahx: AHX (Abyss' Highest eXperience) 4-channel Amiga synth modules, "THX\0" .. "THX\2", rendered through -- music/ahx: AHX (Abyss' Highest eXperience) 4-channel Amiga synth modules, "THX\0" .. "THX\2", rendered through
-- codecs/audio/Hively (a port of HivelyTracker's hvl2wav, BSD-3-Clause; at 44.1 kHz, stereo 0, equal to hvl2wav). -- codecs/audio/Hively (a port of HivelyTracker's hvl2wav, BSD-3-Clause; at 44.1 kHz, stereo 0, equal to hvl2wav).
-- Supports: tracks, positions with transposes, PList instruments, subsongs. Not supported: writing. -- Supports: tracks, positions with transposes, PList instruments, subsongs. Not supported: writing.
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- music/far: Farandole Composer modules (FAR, 16 channels), ported from OpenMPT's Load_far.cpp (BSD, -- music/far: Farandole Composer modules (FAR, 16 channels), ported from OpenMPT's Load_far.cpp (BSD,
-- licenses/openmpt-LICENSE.txt). Plays as the "s3m" family with FAR's quirks (periods in Hz, a slide step of -- licenses/openmpt-LICENSE.txt). Plays as the "s3m" family with FAR's quirks (periods in Hz, a slide step of
-- 36318 / 1024 Hz, OpenMPT's fixed 80 BPM). Not supported: FAR's tempo effects (D / E), note offset (C), writing. -- 36318 / 1024 Hz, OpenMPT's fixed 80 BPM). Not supported: FAR's tempo effects (D / E), note offset (C), writing.
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- music/hmp: HMI SOS music: HMP ("HMIMIDIP", "HMIMIDIP013195") and HMI ("HMI-MIDISONG061595"), from the layout -- music/hmp: HMI SOS music: HMP ("HMIMIDIP", "HMIMIDIP013195") and HMI ("HMI-MIDISONG061595"), from the layout
-- notes (wildmidi only as a test reference). Decodes to a Types.Midi (format 1, a track per chunk; the tick rate at -- notes (wildmidi only as a test reference). Decodes to a Types.Midi (format 1, a track per chunk; the tick rate at
-- HMP 0x38 / HMI byte 212, as division 60). Not supported: writing, HMP branch tables. -- HMP 0x38 / HMI byte 212, as division 60). Not supported: writing, HMP branch tables.
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- music/hvl: HivelyTracker modules, "HVL\0" / "HVL\1" (AHX extended: 4..16 channels, two effect columns, ring -- music/hvl: HivelyTracker modules, "HVL\0" / "HVL\1" (AHX extended: 4..16 channels, two effect columns, ring
-- modulation, panning, stereo separation), rendered through codecs/audio/Hively (a port of hvl2wav, BSD-3-Clause; at -- modulation, panning, stereo separation), rendered through codecs/audio/Hively (a port of hvl2wav, BSD-3-Clause; at
-- 44.1 kHz equal to hvl2wav). Not supported: writing. -- 44.1 kHz equal to hvl2wav). Not supported: writing.
+1
View File
@@ -1,5 +1,6 @@
--!strict --!strict
--!native --!native
--!optimize 2
-- music/it/Itsex: IT 2.14 / 2.15 (double-delta) sample decompression, from ITTECH.TXT: 0x8000-byte output blocks, each -- music/it/Itsex: IT 2.14 / 2.15 (double-delta) sample decompression, from ITTECH.TXT: 0x8000-byte output blocks, each
-- a u16 length then an LSB-first bit stream of deltas with three width-change methods. -- a u16 length then an LSB-first bit stream of deltas with three width-change methods.
local readu8, readu16, writef32 = buffer.readu8, buffer.readu16, buffer.writef32 local readu8, readu16, writef32 = buffer.readu8, buffer.readu16, buffer.writef32
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- music/it: Impulse Tracker modules (IMPM, ITTECH.TXT), played through codecs/audio/Tracker. Supports: 64 channels, -- music/it: Impulse Tracker modules (IMPM, ITTECH.TXT), played through codecs/audio/Tracker. Supports: 64 channels,
-- instrument / sample mode, old and new instrument headers, envelopes, NNAs, resonant filters (default Zxx macros), -- instrument / sample mode, old and new instrument headers, envelopes, NNAs, resonant filters (default Zxx macros),
-- IT 2.14 / 2.15 compressed samples, the message. Not supported: embedded MIDI macros, OpenMPT extensions, writing. -- IT 2.14 / 2.15 compressed samples, the message. Not supported: embedded MIDI macros, OpenMPT extensions, writing.
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- music/med: MED / OctaMED modules (MMD0..MMD3), ported from OpenMPT's Load_med.cpp (BSD, -- music/med: MED / OctaMED modules (MMD0..MMD3), ported from OpenMPT's Load_med.cpp (BSD,
-- licenses/openmpt-LICENSE.txt); the first song plays as the "xm" family with Amiga periods. Supports: 1..64 tracks, -- licenses/openmpt-LICENSE.txt); the first song plays as the "xm" family with Amiga periods. Supports: 1..64 tracks,
-- play sequences, hold / decay, IFF multi-octave samples. Not supported: synth / MIDI instruments, echo, writing. -- play sequences, hold / decay, IFF multi-octave samples. Not supported: synth / MIDI instruments, echo, writing.
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- music/midi/Smf: SMF 1.0 MThd / MTrk <-> Types.Midi (running status also across meta / sysex, RIFF RMID unwrapped). -- music/midi/Smf: SMF 1.0 MThd / MTrk <-> Types.Midi (running status also across meta / sysex, RIFF RMID unwrapped).
-- Writes what python mido writes: running status reset after meta / sysex, one end-of-track, track names at tick 0. -- Writes what python mido writes: running status reset after meta / sysex, one end-of-track, track names at tick 0.
local Err = require("@rosetta/core/Err") local Err = require("@rosetta/core/Err")
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- music/midi: Standard MIDI Files (SMF 1.0 formats 0 / 1 / 2, PPQ and SMPTE; RIFF RMID read), from the spec. Supports: -- music/midi: Standard MIDI Files (SMF 1.0 formats 0 / 1 / 2, PPQ and SMPTE; RIFF RMID read), from the spec. Supports:
-- decode to a Types.Midi, .kar lyrics, encode (byte-identical to python mido by default), the tempo map, rendering -- decode to a Types.Midi, .kar lyrics, encode (byte-identical to python mido by default), the tempo map, rendering
-- through codecs/audio/SoundFont. Not supported: RMID write, XMF / DLS banks, system common bytes in tracks. -- through codecs/audio/SoundFont. Not supported: RMID write, XMF / DLS banks, system common bytes in tracks.
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- music/mod: ProTracker / NoiseTracker / StarTrekker MODs (M.K., M!K!, FLT4, xCHN, xxCH, xxCN, CD81, OKTA, TDZx; -- music/mod: ProTracker / NoiseTracker / StarTrekker MODs (M.K., M!K!, FLT4, xCHN, xxCH, xxCN, CD81, OKTA, TDZx;
-- 15-sample Soundtracker by name or extension), from the ProTracker 2.3 docs. Writes 31-sample MODs from "mod" modules -- 15-sample Soundtracker by name or extension), from the ProTracker 2.3 docs. Writes 31-sample MODs from "mod" modules
-- and XM ones that fit. Not supported: FLT8's split patterns (read as 8 channels), the E0x filter, PowerPacker files. -- and XM ones that fit. Not supported: FLT8's split patterns (read as 8 channels), the E0x filter, PowerPacker files.
+1
View File
@@ -1,4 +1,5 @@
--!strict --!strict
--!optimize 2
-- music/mtm: MultiTracker modules (MTM, 1..32 channels, patterns of shared tracks), ported from OpenMPT's Load_mtm.cpp -- music/mtm: MultiTracker modules (MTM, 1..32 channels, patterns of shared tracks), ported from OpenMPT's Load_mtm.cpp
-- (BSD, licenses/openmpt-LICENSE.txt); played as the "xm" family with Amiga periods, as OpenMPT does. Not supported: -- (BSD, licenses/openmpt-LICENSE.txt); played as the "xm" family with Amiga periods, as OpenMPT does. Not supported:
-- MultiTracker's E9x / EDx retrigger timing and vibrato start phase (played as in XM), writing. -- MultiTracker's E9x / EDx retrigger timing and vibrato start phase (played as in XM), writing.
Loaded 100 of 113 files, more files were not shown because too many files have changed in this diff. Show more