ws-m4a: CELT-only Opus encoder in audio/opus (RangeEncoder + CeltEncoder ported from the libopus 1.6 encoder paths to mirror the absorbed decoder: 20 ms full-band CBR, mono and mid/side stereo, silence frames; Encode: Ogg Opus with OpusHead/OpusTags, end trimming, 48 kHz resampling); checked by opusdec / opusinfo / ffmpeg; Opus.caps.encode = true (opus test updated), deps += codecs/Mdct
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
c3cf73e29f
commit
c43c56eadd
13 files changed
+1761
-8
No files matched your search
@@ -0,0 +1,17 @@
|
||||
-- tools/fixtures/_opus_encode: run by tools/fixtures/opus_celt.py (luau, from the repo root): encodes
|
||||
-- tests/audio/_opus_cases with audio/opus's CELT encoder and prints "<name> <hex>" lines for opusdec / ffmpeg.
|
||||
local Opus = require("@formats/audio/opus")
|
||||
local Cases = require("@tests/audio/_opus_cases")
|
||||
|
||||
for _, c in Cases.list do
|
||||
local out, err = Opus.encode(Cases.signal(c), { bitrate = c.bitrate })
|
||||
if not out then
|
||||
print(c.name .. " ERROR " .. tostring(err))
|
||||
else
|
||||
local t = table.create(buffer.len(out))
|
||||
for i = 0, buffer.len(out) - 1 do
|
||||
t[i + 1] = string.format("%02x", buffer.readu8(out, i))
|
||||
end
|
||||
print(c.name .. " " .. table.concat(t))
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user