]> git.sesse.net Git - vlc/commit
equalizer: Enforce type correctness for M_PI as well
authorRonald Wright <logiconcepts819@gmail.com>
Sat, 6 Apr 2013 20:26:17 +0000 (15:26 -0500)
committerJean-Baptiste Kempf <jb@videolan.org>
Mon, 8 Apr 2013 10:29:29 +0000 (12:29 +0200)
commitfcdd5a13acdaf277178131d12d3be991acfd5c31
tree6e686477c338bbad797b642435e006f909d29bb0
parent3b1ecaf7ae893a53b1d8e4928824e10ca20ac2e9
equalizer: Enforce type correctness for M_PI as well

It was my expectation that M_PI in the EqzCoeffs function is automatically cast
to a float during compile time, but my expectation turned out to be incorrect.
Specifically, I noticed in GCC's assembly output of equalizer.c that GCC was
doing the inverse by making the program convert all single-precision terms
(excluding 2.0f * M_PI) in the line containing M_PI to double-precision, and
then making it convert the double-precision result to single-precision before
the assignment to f_theta_1.  As a result, M_PI must be explicitly cast to a
float.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/audio_filter/equalizer.c