Commit 824ba897 authored by Ganesh Ajjanagadde's avatar Ganesh Ajjanagadde

avcodec/cos_tablegen: use M_PI instead of actual literal

Signed-off-by: 's avatarGanesh Ajjanagadde <gajjanagadde@gmail.com>
parent 94565f37
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment