diff --git a/libavcodec/cos_tablegen.c b/libavcodec/cos_tablegen.c
index dbd0cc0d9758f877873169ca3f25179de0822002..7206aad5dd86538b04446ea3303d1fc7b559e33c 100644
--- a/libavcodec/cos_tablegen.c
+++ b/libavcodec/cos_tablegen.c
@@ -26,7 +26,7 @@
 
 #include "libavutil/mathematics.h"
 
-#define BITS 16
+#define BITS 17
 #define FLOATFMT "%.18e"
 #define FIXEDFMT "%6d"