Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Mark Harris
Opus
Commits
c163fc62
Commit
c163fc62
authored
Mar 21, 2008
by
Jean-Marc Valin
Browse files
local var name maxval was shadowing the TI function used to compute it
parent
03de605e
Changes
1
Hide whitespace changes
Inline
Side-by-side
libcelt/pitch.c
View file @
c163fc62
...
...
@@ -63,14 +63,14 @@ void pitch_state_free(kiss_fftr_cfg st)
static
void
normalise16
(
celt_word16_t
*
x
,
int
len
,
celt_word16_t
val
)
{
int
i
;
celt_word16_t
max
val
;
max
val
=
celt_maxabs16
(
x
,
len
);
if
(
max
val
>
val
)
celt_word16_t
max
abs
;
max
abs
=
celt_maxabs16
(
x
,
len
);
if
(
max
abs
>
val
)
{
int
shift
=
0
;
while
(
max
val
>
val
)
while
(
max
abs
>
val
)
{
max
val
>>=
1
;
max
abs
>>=
1
;
shift
++
;
}
if
(
shift
==
0
)
...
...
@@ -79,10 +79,10 @@ static void normalise16(celt_word16_t *x, int len, celt_word16_t val)
x
[
i
]
=
SHR16
(
x
[
i
],
shift
);
}
else
{
int
shift
=
0
;
if
(
max
val
==
0
)
if
(
max
abs
==
0
)
return
;
val
>>=
1
;
while
(
max
val
<
val
)
while
(
max
abs
<
val
)
{
val
>>=
1
;
shift
++
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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