Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/celt-0.7.0.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jean-marc.valin@usherbrooke.ca>2009-05-19 18:12:34 +0400
committerJean-Marc Valin <jean-marc.valin@usherbrooke.ca>2009-05-19 18:12:34 +0400
commit381d05aa0b13843d931542cbb781fca1fb42172f (patch)
treef18140e720c6a8545a1191416248a75c84003150
parentfa4a3bf52c47bf97d157b3341d6f48c91c738dba (diff)
Make it possible to use more than 255 pulses (not used yet).
-rw-r--r--libcelt/cwrs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libcelt/cwrs.c b/libcelt/cwrs.c
index ef179bd..2733e0f 100644
--- a/libcelt/cwrs.c
+++ b/libcelt/cwrs.c
@@ -83,10 +83,10 @@ int log2_frac(ec_uint32 val, int frac)
int fits_in32(int _n, int _m)
{
static const celt_int16_t maxN[15] = {
- 255, 255, 255, 255, 255, 109, 60, 40,
+ 32767, 32767, 32767, 1476, 283, 109, 60, 40,
29, 24, 20, 18, 16, 14, 13};
static const celt_int16_t maxM[15] = {
- 255, 255, 255, 255, 255, 238, 95, 53,
+ 32767, 32767, 32767, 32767, 1172, 238, 95, 53,
36, 27, 22, 18, 16, 15, 13};
if (_n>=14)
{
@@ -208,7 +208,7 @@ celt_uint32_t ncwrs_u32(int _n,int _m,celt_uint32_t *_u){
len=_m+2;
_u[0]=0;
_u[1]=um2=1;
- if(_n<=6){
+ if(_n<=6 || _m>255){
/*If _n==0, _u[0] should be 1 and the rest should be 0.*/
/*If _n==1, _u[i] should be 1 for i>1.*/
celt_assert(_n>=2);