ws-video2-flv: FLV writer test from ADTS AAC (MPEG-TS), bench lines (H.263 / Sorenson CIF fps), docs/guide/video.md FLV and H.263 section (inputs: tools/fixtures/docs_flv.py)

This commit is contained in:
4DBug committed 2026-10-31 15:13:14 -05:00
1 parent efc0812746
commit f23d0aa3e8
5 files changed
+105 -3

No files matched your search

+34
View File
@@ -1078,3 +1078,37 @@ do
jitTune(false)
end
end
-- ------------------------------------------------------------------------------------------- ws-video2-flv: fps
do
-- H.263 / Sorenson Spark (codecs/video/H263, tools/fixtures/h263.py): CIF mandelbrot zooms (1 Mbit/s, an I picture
-- every 12), one picture per decode, planes only (frameImage copies excluded) and with the yuv420p Image copies
local H263 = require("@formats/codecs/video/H263")
local Base64 = require("@formats/core/Base64")
local HB = require("@tests/gen/h263_bench")
local function run(tag: string)
for _, c in HB do
local file = Base64.decode(c.file) :: buffer
for _, images in { false, true } do
local n = #c.units
local dt = bench(string.format("%s %dx%d%s%s", c.name, c.width, c.height, if images then " +img" else "", tag), 3, c.width * c.height * 3 // 2 * n, function()
local dec = H263.new({ flv = c.flv })
for _, u in c.units do
if images then
dec:image(file, u[1], u[2])
else
dec:decode(file, u[1], u[2])
end
end
end)
print(string.format("%-8s %-30s %8.1f fps", runtime, " (" .. n .. " frames)", n / dt))
end
end
end
jitTune(false)
run("")
if runtime == "luajit" then
jitTune(true)
run(" (jit tuned)")
jitTune(false)
end
end