xiph
/
opus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c803ee1
)
Trying to prevent PVQ-level splits
author
Jean-Marc Valin
<jean-marc.valin@usherbrooke.ca>
Fri, 14 May 2010 11:47:30 +0000
(07:47 -0400)
committer
Jean-Marc Valin
<jean-marc.valin@usherbrooke.ca>
Fri, 14 May 2010 11:47:30 +0000
(07:47 -0400)
We prevent as many as possible, but they can still occur if we
manage to reach the LN limit
libcelt/bands.c
patch
|
blob
|
history
diff --git
a/libcelt/bands.c
b/libcelt/bands.c
index
54d79f5
..
452ad89
100644
(file)
--- a/
libcelt/bands.c
+++ b/
libcelt/bands.c
@@
-457,7
+457,7
@@
void quant_band(const CELTMode *m, int i, celt_norm *X, celt_norm *Y, int N, int
split = stereo = Y != NULL;
- if (
b>(32<<BITRES) && !stereo && LM>0
)
+ if (
!stereo && LM>0 && !fits_in32(N, get_pulses(bits2pulses(m, m->bits[LM][i], N, b)))
)
{
N /= 2;
Y = X+N;
@@
-667,7
+667,7
@@
void unquant_band(const CELTMode *m, int i, celt_norm *X, celt_norm *Y, int N, i
split = stereo = Y != NULL;
- if (
b>(32<<BITRES) && !stereo && LM>0
)
+ if (
!stereo && LM>0 && !fits_in32(N, get_pulses(bits2pulses(m, m->bits[LM][i], N, b)))
)
{
N /= 2;
Y = X+N;