blur algorithms for Lua and LuaJIT