Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tim-Philipp Müller
Opus
Commits
5bb3cbc3
Unverified
Commit
5bb3cbc3
authored
Jun 19, 2017
by
Jean-Marc Valin
Browse files
Add "f" suffix to float constants
parent
352786c9
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/analysis.c
View file @
5bb3cbc3
...
...
@@ -269,7 +269,7 @@ void tonality_get_info(TonalityAnalysisState *tonal, AnalysisInfo *info_out, int
tonality_avg
+=
tonal
->
info
[
pos
].
tonality
;
tonality_count
++
;
}
info_out
->
tonality
=
MAX32
(
tonality_avg
/
tonality_count
,
tonality_max
-
.
2
);
info_out
->
tonality
=
MAX32
(
tonality_avg
/
tonality_count
,
tonality_max
-
.
2
f
);
tonal
->
read_subframe
+=
len
/
(
tonal
->
Fs
/
400
);
while
(
tonal
->
read_subframe
>=
8
)
{
...
...
@@ -370,9 +370,9 @@ static void tonality_analysis(TonalityAnalysisState *tonal, const CELTMode *celt
if
(
tonal
->
count
<
4
)
{
if
(
tonal
->
application
==
OPUS_APPLICATION_VOIP
)
tonal
->
music_prob
=
.
1
;
tonal
->
music_prob
=
.
1
f
;
else
tonal
->
music_prob
=
.
625
;
tonal
->
music_prob
=
.
625
f
;
}
kfft
=
celt_mode
->
mdct
.
kfft
[
0
];
if
(
tonal
->
count
==
0
)
...
...
@@ -703,7 +703,7 @@ static void tonality_analysis(TonalityAnalysisState *tonal, const CELTMode *celt
frame_stationarity
/=
NB_TBANDS
;
relativeE
/=
NB_TBANDS
;
if
(
tonal
->
count
<
10
)
relativeE
=
.
5
;
relativeE
=
.
5
f
;
frame_noisiness
/=
NB_TBANDS
;
#if 1
info
->
activity
=
frame_noisiness
+
(
1
-
frame_noisiness
)
*
relativeE
;
...
...
@@ -833,9 +833,9 @@ static void tonality_analysis(TonalityAnalysisState *tonal, const CELTMode *celt
if
(
tonal
->
count
==
1
)
{
if
(
tonal
->
application
==
OPUS_APPLICATION_VOIP
)
tonal
->
pmusic
[
0
]
=
.
1
;
tonal
->
pmusic
[
0
]
=
.
1
f
;
else
tonal
->
pmusic
[
0
]
=
.
625
;
tonal
->
pmusic
[
0
]
=
.
625
f
;
tonal
->
pspeech
[
0
]
=
1
-
tonal
->
pmusic
[
0
];
}
/* Updated probability of having only speech (s0) or only music (m0),
...
...
Write
Preview
Supports
Markdown
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