Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
6e507987
Commit
6e507987
authored
Apr 16, 2014
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
audiobargraph_v: simplify iec_scale
parent
680ef533
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
18 deletions
+15
-18
modules/video_filter/audiobargraph_v.c
modules/video_filter/audiobargraph_v.c
+15
-18
No files found.
modules/video_filter/audiobargraph_v.c
View file @
6e507987
...
...
@@ -160,24 +160,21 @@ static const char *const ppsz_filter_callbacks[] = {
*****************************************************************************/
static
float
iec_scale
(
float
dB
)
{
float
fScale
=
1
.
0
f
;
if
(
dB
<
-
70
.
0
f
)
fScale
=
0
.
0
f
;
else
if
(
dB
<
-
60
.
0
f
)
fScale
=
(
dB
+
70
.
0
f
)
*
0
.
0025
f
;
else
if
(
dB
<
-
50
.
0
f
)
fScale
=
(
dB
+
60
.
0
f
)
*
0
.
005
f
+
0
.
025
f
;
else
if
(
dB
<
-
40
.
0
)
fScale
=
(
dB
+
50
.
0
f
)
*
0
.
0075
f
+
0
.
075
f
;
else
if
(
dB
<
-
30
.
0
f
)
fScale
=
(
dB
+
40
.
0
f
)
*
0
.
015
f
+
0
.
15
f
;
else
if
(
dB
<
-
20
.
0
f
)
fScale
=
(
dB
+
30
.
0
f
)
*
0
.
02
f
+
0
.
3
f
;
else
if
(
dB
<
-
0
.
001
f
||
dB
>
0
.
001
f
)
/* if (dB < 0.0f) */
fScale
=
(
dB
+
20
.
0
f
)
*
0
.
025
f
+
0
.
5
f
;
return
fScale
;
if
(
dB
<
-
70
.
0
f
)
return
0
.
0
f
;
if
(
dB
<
-
60
.
0
f
)
return
(
dB
+
70
.
0
f
)
*
0
.
0025
f
;
if
(
dB
<
-
50
.
0
f
)
return
(
dB
+
60
.
0
f
)
*
0
.
005
f
+
0
.
025
f
;
if
(
dB
<
-
40
.
0
)
return
(
dB
+
50
.
0
f
)
*
0
.
0075
f
+
0
.
075
f
;
if
(
dB
<
-
30
.
0
f
)
return
(
dB
+
40
.
0
f
)
*
0
.
015
f
+
0
.
15
f
;
if
(
dB
<
-
20
.
0
f
)
return
(
dB
+
30
.
0
f
)
*
0
.
02
f
+
0
.
3
f
;
if
(
dB
<
-
0
.
001
f
||
dB
>
0
.
001
f
)
/* if (dB < 0.0f) */
return
(
dB
+
20
.
0
f
)
*
0
.
025
f
+
0
.
5
f
;
return
1
.
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