Fast DCT test (JavaScript)