Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
7fd52159
Commit
7fd52159
authored
Aug 13, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compressor: really use single precision
parent
1ba32fb7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
modules/audio_filter/compressor.c
modules/audio_filter/compressor.c
+6
-6
No files found.
modules/audio_filter/compressor.c
View file @
7fd52159
...
...
@@ -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
+=
fabs
f
(
f_x
);
f_x
*=
0
.
5
f
;
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
=
fabs
f
(
f_x
-
f_a
);
const
float
f_x2
=
fabs
f
(
f_x
-
f_b
);
f_x
=
f_x1
+
f_a
+
f_b
;
f_x
-=
f_x2
;
f_x
*=
0
.
5
;
f_x
*=
0
.
5
f
;
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-6
f
)
{
p_r
->
f_sum
=
0
.
0
f
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment