absorb: opus (audio/opus from opus-luau dd2b4e5, libopus port: direct containers/Ogg require, Types.Decoder open + decode to Audio, Err values); tests vs opusdec --float on 24 generated streams, CELT / SILK alone, PLC, seek, downmix, fuzz; bench lines
This commit is contained in:
1 parent
e3f9d0fb38
commit
d20ffd7388
17 files changed
+6611
-2
No files matched your search
+12
-1
@@ -1,11 +1,16 @@
|
||||
-- Throughput (bash tools/bench.sh): codec MB/s under both runtimes. MB/s are of decompressed output, best of n runs.
|
||||
-- Fixtures: tools/fixtures/deflate.py (a 6 MB corpus) and tools/fixtures/png.py (1024 x 768 images).
|
||||
-- Fixtures: tools/fixtures/deflate.py (a 6 MB corpus), tools/fixtures/png.py (1024 x 768 images), tools/fixtures/opus.py
|
||||
-- (3 s stereo files; MB/s of f32 output, 48 kHz stereo f32 is 0.384 MB/s of real time).
|
||||
local Deflate = require("@formats/codecs/Deflate")
|
||||
local Crc32 = require("@formats/core/Crc32")
|
||||
local Bytes = require("@formats/core/Bytes")
|
||||
local Png = require("@formats/image/png")
|
||||
local B = require("@tests/gen/deflate_bench")
|
||||
local PB = require("@tests/gen/png_bench")
|
||||
local Opus = require("@formats/audio/opus")
|
||||
local OpusCelt = require("@tests/gen/opus_celt_st_128")
|
||||
local OpusSilk = require("@tests/gen/opus_silk_wb_st")
|
||||
local OpusHybrid = require("@tests/gen/opus_hybrid_st")
|
||||
|
||||
local runtime = if (_G :: any).jit ~= nil then "luajit" else "luau"
|
||||
|
||||
@@ -56,3 +61,9 @@ do
|
||||
Png.encode(img)
|
||||
end)
|
||||
end
|
||||
for _, c in { { "celt 128k", OpusCelt }, { "silk wb", OpusSilk }, { "hybrid", OpusHybrid } } do
|
||||
local b = buffer.fromstring(c[2].data)
|
||||
bench("opus decode " .. c[1] .. " (3 s st)", 3, #c[2].ref, function()
|
||||
Opus.decode(Bytes.reader(b))
|
||||
end)
|
||||
end
|
||||
Reference in new issue
Block a user