tests/codecs (a-m): comments: specs only

This commit is contained in:
4DBug committed 2026-11-01 01:50:19 -05:00
1 parent a80299dce0
commit 5f7f6005f6
24 files changed
+46 -181

No files matched your search

+2 -10
View File
@@ -1,7 +1,5 @@
-- codecs/audio/Aac tests: AudioSpecificConfig parsing (every fixture's esds, explicit SBR / PS signalling from fdkaac,
-- crafted configs: PCE channel counts, 960-sample frames, Main / LTP object types), ADTS headers, raw frames decoded
-- straight from ADTS against ffmpeg's float decode, the FIL extension hook on HE-AAC (implicit SBR), reset, errors,
-- the fuzz no-throw pass on raw frames. Fixtures: tools/fixtures/m4a.py.
-- codecs/audio/Aac tests: AudioSpecificConfig parsing, ADTS headers, raw frames against ffmpeg's float decode, errors.
-- Fixtures: tools/fixtures/m4a.py.
local T = require("@tests/T")
local Aac = require("@rosetta/codecs/audio/Aac")
local IsoBmff = require("@rosetta/containers/IsoBmff")
@@ -13,7 +11,6 @@ local He = require("@tests/gen/m4a_he")
local t = T.suite("aac-codec")
-- ADTS frames of a stream: { offset, size } of the raw blocks
local function frames(data: buffer): ({ { number } }, Aac.Adts?)
local out, p, first = {}, 0, nil
while true do
@@ -28,7 +25,6 @@ local function frames(data: buffer): ({ { number } }, Aac.Adts?)
return out, first
end
-- ASCs from the M4A fixtures
for _, c in Fx do
if c.container == "m4a" then
local r = Bytes.reader(buffer.fromstring(c.data))
@@ -49,7 +45,6 @@ for _, c in He do
end
end
-- crafted configs
do
local asc = Aac.asc(2, 4, 2)
local cfg = Aac.config(asc) :: Aac.Config
@@ -90,7 +85,6 @@ do
t:check(e4 and e4.code == Err.ARG, "decoder of a string")
end
-- ADTS headers + raw frames against ffmpeg
for _, c in Fx do
if c.container ~= "adts" then
continue
@@ -148,7 +142,6 @@ for _, c in He do
end
end
-- errors
do
local dec = Aac.decoder(Aac.asc(2, 4, 2)) :: Aac.Decoder
local _, e = dec:decode(buffer.fromstring("\x20\x00\x00\x00\x00"))
@@ -158,7 +151,6 @@ do
t:check(Aac.adts(buffer.fromstring("\255\241"), 0, 2) == nil, "short ADTS header")
end
-- fuzz raw frames (stereo with every tool, mono, 5.1)
do
local pick = {}
for _, c in Fx do