ws-webp: codec tests (vp8, vp8l), bench lines, type fixes
This commit is contained in:
1 parent
ef8262d767
commit
ced18478df
7 files changed
+226
-5
No files matched your search
@@ -96,7 +96,7 @@ function Vp8L.encode(rgba: buffer, width: number, height: number, opts: EncodeOp
|
||||
if buffer.len(rgba) < width * height * 4 then
|
||||
return nil, Err.new(Err.ARG, "encode: pixel buffer too small")
|
||||
end
|
||||
local o = opts or {}
|
||||
local o: EncodeOptions = opts or {} :: EncodeOptions
|
||||
local effort = o.effort or 5
|
||||
if type(effort) ~= "number" or effort < 0 or effort > 9 then
|
||||
return nil, Err.new(Err.ARG, "encode: effort must be 0..9")
|
||||
|
||||
Reference in new issue
Block a user