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
6d454d8d
Commit
6d454d8d
authored
Jun 30, 2009
by
Jean-Marc Valin
Browse files
This fixes a potential assertion failure with some very weak signals
parent
02428d6c
Changes
1
Hide whitespace changes
Inline
Side-by-side
libcelt/vq.c
View file @
6d454d8d
...
...
@@ -147,9 +147,17 @@ void alg_quant(celt_norm_t *X, celt_mask_t *W, int N, int K, celt_norm_t *P, ec_
j
=
0
;
do
{
sum
+=
X
[
j
];
}
while
(
++
j
<
N
);
if
(
sum
==
0
)
#ifdef FIXED_POINT
if
(
sum
<=
K
)
#else
if
(
sum
<=
EPSILON
)
#endif
{
X
[
0
]
=
16384
;
j
=
1
;
do
X
[
j
]
=
0
;
while
(
++
j
<
N
);
sum
=
16384
;
}
/* Do we have sufficient accuracy here? */
...
...
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