ws-tex: image/exr (read NONE/RLE/ZIPS/ZIP/PIZ, half/float/uint, scanline + tiled + multipart, mips; write NONE/ZIPS/ZIP)
Tested against the OpenEXR 3.5 python bindings, exrmaketiled (one level / mipmap / ripmap / round up), exrmultipart, a hand-written subsampled file; PXR24 / B44 / DWAA give UNSUPPORTED; our files read back by the bindings and exrheader. Broken / zeroed offset tables are rebuilt (exrmultipart writes them zeroed).
This commit is contained in:
1 parent
ef2cd93c88
commit
abd01270f0
11 files changed
+1661
No files matched your search
@@ -1102,3 +1102,20 @@ do
|
||||
Bcn.decode("bc6h", b6, 0, w, h)
|
||||
end)
|
||||
end
|
||||
do
|
||||
-- OpenEXR (ws-tex): a 512 x 256 half RGBA image from the OpenEXR bindings (tools/fixtures/exr.py), ZIP and PIZ;
|
||||
-- MB/s of rgbaf32 output; our ZIP encoder on the decoded floats
|
||||
local Exr = require("@formats/image/exr")
|
||||
local EB = require("@tests/gen/exr_bench")
|
||||
local n = 512 * 256 * 16
|
||||
for _, k in { "zip", "piz" } do
|
||||
local data = buffer.fromstring(EB[k])
|
||||
bench("exr decode " .. k .. " 512x256 half", 3, n, function()
|
||||
Exr.decode(Bytes.reader(data), { native = true })
|
||||
end)
|
||||
end
|
||||
local img = Exr.decode(Bytes.reader(buffer.fromstring(EB.zip)), { native = true }) :: any
|
||||
bench("exr encode zip 512x256 half", 2, n, function()
|
||||
Exr.encode(img)
|
||||
end)
|
||||
end
|
||||
Reference in new issue
Block a user