You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Computating order matters. Here we want to make sure pix is a dense memory with valid pointer. But we can compute it in one line, e.g., map(x->colors[x], @view(img[:, :, i])'). -- Vector and Matrix should be the same when you get the pointer of it so vec is needless.
The quantizers could possibly be improved, but doesn't have the bandwidth to check it 😢
Use MappedArrays to avoid allocating buffers for
res
at each iteration. This could be GC-heavy if the image itself is large.GIFImages.jl/src/decode.jl
Lines 62 to 65 in c3b84d0
[]
is equivalent toAny[]
and is slow. Use Concrete types, e.g.,UInt8[]
?GIFImages.jl/src/encode.jl
Line 35 in c3b84d0
colors
should also be a concret typeDict{RGB{N0f8}, UInt8}()
GIFImages.jl/src/encode.jl
Lines 48 to 51 in c3b84d0
Computating order matters. Here we want to make sure
pix
is a dense memory with valid pointer. But we can compute it in one line, e.g.,map(x->colors[x], @view(img[:, :, i])')
. --Vector
andMatrix
should be the same when you get the pointer of it sovec
is needless.GIFImages.jl/src/encode.jl
Lines 67 to 68 in c3b84d0
The text was updated successfully, but these errors were encountered: