forgot to change the cosine offset to match the 1024 lut size
authorJohn Tsiombikas <nuclear@member.fsf.org>
Mon, 17 May 2021 22:51:41 +0000 (01:51 +0300)
committerJohn Tsiombikas <nuclear@member.fsf.org>
Mon, 17 May 2021 22:51:41 +0000 (01:51 +0300)
src/util.h

index 6880649..d1f81eb 100644 (file)
@@ -15,7 +15,7 @@ typedef unsigned int uint32_t;
 extern int sinlut[];
 
 #define SIN(x) sinlut[(x) & 0x3ff]
-#define COS(x) sinlut[((x) + 512) & 0x3ff]
+#define COS(x) sinlut[((x) + 256) & 0x3ff]
 
 int mask_to_shift(unsigned int mask);