ws-3d3: codecs/model/Draco: kd-tree point clouds (bitstream 2.3, levels 0 - 6)
Byte-exact against libdraco on all 206 test files, kd-tree point clouds included.
This commit is contained in:
1 parent
de2695b87d
commit
4f2a388a6d
4 files changed
+388
-19
No files matched your search
@@ -1,7 +1,7 @@
|
||||
-- codecs/model/Draco tests: Google's Draco test data (bitstreams 0.9 - 2.2) and files encoded by draco_encoder 1.5.7
|
||||
-- at every compression level, quantization and as point clouds, decoded and compared byte for byte (points, faces,
|
||||
-- every attribute's values per point, as CRCs) with libdraco's own decoder (tools/fixtures/_draco_dump.cc); kd-tree
|
||||
-- point clouds report UNSUPPORTED; argument errors; the fuzz no-throw pass (which also fails on any internal error the
|
||||
-- every attribute's values per point, as CRCs) with libdraco's own decoder (tools/fixtures/_draco_dump.cc), kd-tree
|
||||
-- point clouds included; argument errors; the fuzz no-throw pass (which also fails on any internal error the
|
||||
-- decoder's safety net caught). Fixtures: tools/fixtures/draco.py.
|
||||
local T = require("@tests/T")
|
||||
local Draco = require("@formats/codecs/model/Draco")
|
||||
@@ -11,15 +11,13 @@ local Cases = require("@tests/gen/draco_cases")
|
||||
|
||||
local t = T.suite("draco")
|
||||
|
||||
local counts = { exact = 0, unsupported = 0, rejected = 0 }
|
||||
local counts = { exact = 0, rejected = 0, kd = 0 }
|
||||
local samples = {}
|
||||
for _, c in Cases do
|
||||
local g, err = Draco.decode(c.data)
|
||||
if c.error then
|
||||
t:check(g == nil and err ~= nil, c.name .. ": libdraco rejects it, so do we")
|
||||
counts.rejected += 1
|
||||
elseif not g and err and err.code == Err.UNSUPPORTED and string.find(err.message, "kd-tree", 1, true) then
|
||||
counts.unsupported += 1
|
||||
else
|
||||
t:check(g, c.name .. ": decode: " .. tostring(err))
|
||||
if g then
|
||||
@@ -41,13 +39,16 @@ for _, c in Cases do
|
||||
end
|
||||
end
|
||||
counts.exact += 1
|
||||
if g.method == "kdtree" then
|
||||
counts.kd += 1
|
||||
end
|
||||
if #c.data < 4000 then
|
||||
table.insert(samples, c.data)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
t:note("%d files decoded exactly like libdraco, %d kd-tree point clouds unsupported, %d rejected by both", counts.exact, counts.unsupported, counts.rejected)
|
||||
t:note("%d files decoded exactly like libdraco (%d kd-tree point clouds), %d rejected by both", counts.exact, counts.kd, counts.rejected)
|
||||
|
||||
-- the attribute lookup and the header
|
||||
local first = Cases[1]
|
||||
|
||||
Reference in new issue
Block a user