Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Mark Harris
Opus
Commits
331130e0
Commit
331130e0
authored
May 23, 2009
by
Jean-Marc Valin
Browse files
Slightly increasing the range of value by making sure the "start fs" is even
(rounding towards zero).
parent
95400774
Changes
1
Hide whitespace changes
Inline
Side-by-side
libcelt/laplace.c
View file @
331130e0
...
...
@@ -37,7 +37,10 @@
int
ec_laplace_get_start_freq
(
int
decay
)
{
return
(((
ec_uint32
)
32768
)
*
(
16384
-
decay
))
/
(
16384
+
decay
);
int
fs
=
(((
ec_uint32
)
32768
)
*
(
16384
-
decay
))
/
(
16384
+
decay
);
/* Making fs even so we're sure that all the range is used for +/- values */
fs
-=
(
fs
&
1
);
return
fs
;
}
void
ec_laplace_encode_start
(
ec_enc
*
enc
,
int
*
value
,
int
decay
,
int
fs
)
...
...
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