ws-h264: tests (bit-exact vs ffmpeg, AVCC, NAL-at-a-time, unsupported, fuzz), bench lines; LuaJIT speedups (no table-allocating if-expressions, arithmetic bit reads, branch-free CABAC decisions, split MC filters)
This commit is contained in:
1 parent
e53ad35620
commit
6fcf717214
12 files changed
+648
-408
No files matched your search
@@ -535,3 +535,15 @@ do
|
||||
Webp.encode(img, { effort = 1 })
|
||||
end)
|
||||
end
|
||||
do
|
||||
-- H.264: frames per second over whole streams (decode + output copies); MB/s of yuv420p output
|
||||
local H264 = require("@formats/codecs/H264")
|
||||
local HB = require("@tests/gen/h264_bench")
|
||||
for _, c in HB do
|
||||
local n = c.width * c.height * 3 // 2 * #c.frames
|
||||
local dt = bench("h264 " .. c.name .. " " .. #c.frames .. "f", 2, n, function()
|
||||
H264.decodeAll(c.data)
|
||||
end)
|
||||
print(string.format("%-8s h264 %s: %.1f fps at %dx%d", runtime, c.name, #c.frames / dt, c.width, c.height))
|
||||
end
|
||||
end
|
||||
@@ -61,6 +61,10 @@ BENCH = [
|
||||
("qvga_baseline", "testsrc2", 320, 240, 30, "cabac=0:bframes=0:ref=1:8x8dct=0:crf=23"),
|
||||
("nhd_cabac_b", "testsrc2", 640, 360, 30, "cabac=1:bframes=3:ref=3:crf=23"),
|
||||
("nhd_baseline", "testsrc2", 640, 360, 30, "cabac=0:bframes=0:ref=1:8x8dct=0:crf=23"),
|
||||
("qvga_mandel_high", "mandel", 320, 240, 30, "cabac=1:bframes=3:ref=3:8x8dct=1:crf=23"),
|
||||
("qvga_mandel_base", "mandel", 320, 240, 30, "cabac=0:bframes=0:ref=1:8x8dct=0:crf=23"),
|
||||
("nhd_mandel_high", "mandel", 640, 360, 30, "cabac=1:bframes=3:ref=3:8x8dct=1:crf=23"),
|
||||
("nhd_mandel_base", "mandel", 640, 360, 30, "cabac=0:bframes=0:ref=1:8x8dct=0:crf=23"),
|
||||
]
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user