[vlc-commits] compressor: really use single precision
Rémi Denis-Courmont
git at videolan.org
Wed Aug 13 22:23:08 CEST 2014
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Aug 13 23:03:06 2014 +0300| [7fd52159f8464a6e377249fb0e7ca0cfdb64f9b8] | committer: Rémi Denis-Courmont
compressor: really use single precision
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7fd52159f8464a6e377249fb0e7ca0cfdb64f9b8
---
modules/audio_filter/compressor.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/modules/audio_filter/compressor.c b/modules/audio_filter/compressor.c
index 29f819c..e154fb5 100644
--- a/modules/audio_filter/compressor.c
+++ b/modules/audio_filter/compressor.c
@@ -549,8 +549,8 @@ static void RoundToZero( float *pf_x )
static float Max( float f_x, float f_a )
{
f_x -= f_a;
- f_x += fabs( f_x );
- f_x *= 0.5;
+ f_x += fabsf( f_x );
+ f_x *= 0.5f;
f_x += f_a;
return f_x;
@@ -558,12 +558,12 @@ static float Max( float f_x, float f_a )
static float Clamp( float f_x, float f_a, float f_b )
{
- const float f_x1 = fabs( f_x - f_a );
- const float f_x2 = fabs( f_x - f_b );
+ const float f_x1 = fabsf( f_x - f_a );
+ const float f_x2 = fabsf( f_x - f_b );
f_x = f_x1 + f_a + f_b;
f_x -= f_x2;
- f_x *= 0.5;
+ f_x *= 0.5f;
return f_x;
}
@@ -589,7 +589,7 @@ static float RmsEnvProcess( rms_env * p_r, const float f_x )
p_r->f_sum += f_x;
/* If the sum is small enough, make it zero */
- if( p_r->f_sum < 1.0e-6 )
+ if( p_r->f_sum < 1.0e-6f )
{
p_r->f_sum = 0.0f;
}
More information about the vlc-commits
mailing list