summaryrefslogtreecommitdiff
path: root/libavcodec/cos_tablegen.c
diff options
context:
space:
mode:
authorGanesh Ajjanagadde <gajjanagadde@gmail.com>2015-11-10 22:26:25 -0500
committerGanesh Ajjanagadde <gajjanagadde@gmail.com>2015-11-22 16:16:16 -0500
commit824ba897bdd17d158842263fbd34481a4a3c6c43 (patch)
treee28f15267ae034223717822bbaffa90899767dd9 /libavcodec/cos_tablegen.c
parent94565f37919699ff1c6eaf684be85764452c0adc (diff)
downloadffmpeg-824ba897bdd17d158842263fbd34481a4a3c6c43.tar.gz
avcodec/cos_tablegen: use M_PI instead of actual literal
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Diffstat (limited to 'libavcodec/cos_tablegen.c')
-rw-r--r--libavcodec/cos_tablegen.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/cos_tablegen.c b/libavcodec/cos_tablegen.c
index 9af83f4d7d..dbd0cc0d97 100644
--- a/libavcodec/cos_tablegen.c
+++ b/libavcodec/cos_tablegen.c
@@ -24,6 +24,8 @@
#include <string.h>
#include <math.h>
+#include "libavutil/mathematics.h"
+
#define BITS 16
#define FLOATFMT "%.18e"
#define FIXEDFMT "%6d"
@@ -61,7 +63,7 @@ int main(int argc, char *argv[])
printf("#include \"libavcodec/%s\"\n", do_sin ? "rdft.h" : "fft.h");
for (i = 4; i <= BITS; i++) {
int m = 1 << i;
- double freq = 2*3.14159265358979323846/m;
+ double freq = 2*M_PI/m;
printf("%s(%i) = {\n ", do_sin ? "SINTABLE" : "COSTABLE", m);
for (j = 0; j < m/2 - 1; j++) {
int idx = j > m/4 ? m/2 - j : j;