summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorLars Petter Endresen <lars.petter.endresen@gmail.com>2018-11-12 12:03:53 +0100
committerSebastian Dröge <slomo@coaxion.net>2018-11-15 08:44:12 +0000
commite6c56ec014fa2e1f6ea49f2deb2c89f0b0dd10b4 (patch)
treea88093336afc827428f9a11064b3266ae9fc190b /gst
parent29d48ce8a1714cbbdc1781429dc7f0043c3c018c (diff)
downloadgstreamer-plugins-bad-e6c56ec014fa2e1f6ea49f2deb2c89f0b0dd10b4.tar.gz
siren: Fix floating point invalid operation
Mix of single and double precision leads to zero-by-zero divide for upper 64-bit of the xmm register, even though they are not used.
Diffstat (limited to 'gst')
-rw-r--r--gst/siren/common.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gst/siren/common.c b/gst/siren/common.c
index ee77c7026..2e0774857 100644
--- a/gst/siren/common.c
+++ b/gst/siren/common.c
@@ -62,7 +62,7 @@ static int siren_initialized = 0;
/*
STEPSIZE = 2.0 * log(sqrt(2));
*/
-#define STEPSIZE 0.3010299957
+#define STEPSIZE 0.3010299957f
void
siren_init (void)
@@ -77,9 +77,9 @@ siren_init (void)
region_size_inverse = 1.0f / region_size;
for (i = 0; i < 64; i++) {
- region_power = (float) pow (10, (i - 24) * STEPSIZE);
- standard_deviation[i] = (float) sqrt (region_power);
- deviation_inverse[i] = (float) 1.0 / standard_deviation[i];
+ region_power = powf (10.0f, (i - 24) * STEPSIZE);
+ standard_deviation[i] = sqrtf (region_power);
+ deviation_inverse[i] = 1.0f / standard_deviation[i];
}
for (i = 0; i < 63; i++)