From 19d3972f1673c5cb5fe6bd0521044b3d95f4bff6 Mon Sep 17 00:00:00 2001 From: md5 Date: Sat, 19 Mar 2011 02:29:22 +0200 Subject: VIDEO: Changed several places that use PI to use M_PI instead --- video/codecs/qdm2.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'video/codecs/qdm2.cpp') diff --git a/video/codecs/qdm2.cpp b/video/codecs/qdm2.cpp index d592548580..c7e1ffe54f 100644 --- a/video/codecs/qdm2.cpp +++ b/video/codecs/qdm2.cpp @@ -448,7 +448,7 @@ float *ff_cos_tabs[] = { void initCosineTables(int index) { int m = 1 << index; - double freq = 2 * PI / m; + double freq = 2 * M_PI / m; float *tab = ff_cos_tabs[index]; for (int i = 0; i <= m / 4; i++) @@ -776,7 +776,7 @@ int fftInit(FFTContext *s, int nbits, int inverse) { s->tmpBuf = (FFTComplex *)malloc(n * sizeof(FFTComplex)); } else { for (i = 0; i < n / 2; i++) { - alpha = 2 * PI * (float)i / (float)n; + alpha = 2 * M_PI * (float)i / (float)n; c1 = cos(alpha); s1 = sin(alpha) * s2; s->exptab[i].re = c1; @@ -814,7 +814,7 @@ int fftInit(FFTContext *s, int nbits, int inverse) { */ int rdftInit(RDFTContext *s, int nbits, RDFTransformType trans) { int n = 1 << nbits; - const double theta = (trans == RDFT || trans == IRIDFT ? -1 : 1) * 2 * PI / n; + const double theta = (trans == RDFT || trans == IRIDFT ? -1 : 1) * 2 * M_PI / n; s->nbits = nbits; s->inverse = trans == IRDFT || trans == IRIDFT; @@ -3009,7 +3009,7 @@ void QDM2Stream::qdm2_fft_generate_tone(FFTTone *tone) float level, f[6]; int i; QDM2Complex c; - const double iscale = 2.0 * PI / 512.0; + const double iscale = 2.0 * M_PI / 512.0; tone->phase += tone->phase_shift; @@ -3050,7 +3050,7 @@ void QDM2Stream::qdm2_fft_generate_tone(FFTTone *tone) void QDM2Stream::qdm2_fft_tone_synthesizer(uint8 sub_packet) { int i, j, ch; - const double iscale = 0.25 * PI; + const double iscale = 0.25 * M_PI; for (ch = 0; ch < _channels; ch++) { memset(_fft.complex[ch], 0, _frameSize * sizeof(QDM2Complex)); -- cgit v1.2.3