diff --git a/libcelt/celt.c b/libcelt/celt.c index d1d01808..39194d45 100644 --- a/libcelt/celt.c +++ b/libcelt/celt.c @@ -53,8 +53,8 @@ #include #include "plc.h" -static const int trim_cdf[12] = {0, 2, 4, 9, 19, 41, 87, 109, 119, 124, 126, 128}; -static const int spread_cdf[5] = {0, 7, 9, 30, 32}; +static const unsigned trim_cdf[12] = {0, 2, 4, 9, 19, 41, 87, 109, 119, 124, 126, 128}; +static const unsigned spread_cdf[5] = {0, 7, 9, 30, 32}; #define COMBFILTER_MAXPERIOD 1024 #define COMBFILTER_MINPERIOD 16 diff --git a/libcelt/entdec.h b/libcelt/entdec.h index 7617f711..d4c06864 100644 --- a/libcelt/entdec.h +++ b/libcelt/entdec.h @@ -121,7 +121,7 @@ ec_uint32 ec_dec_uint(ec_dec *_this,ec_uint32 _ft); _ftb: The number of bits of precision in the cumulative distribution. Return: The decoded symbol s, which must have been encoded with ec_encode_bin(enc,_cdf[s],_cdf[s+1],_ftb).*/ -int ec_dec_cdf(ec_dec *_this,const int *_cdf,unsigned _ftb); +int ec_dec_cdf(ec_dec *_this,const unsigned *_cdf,unsigned _ftb); /* Decode a bit that has a _prob/65536 probability of being a one */ int ec_dec_bit_prob(ec_dec *_this,unsigned _prob); diff --git a/libcelt/rangedec.c b/libcelt/rangedec.c index 9e3f41ed..a0685544 100644 --- a/libcelt/rangedec.c +++ b/libcelt/rangedec.c @@ -187,7 +187,7 @@ int ec_dec_bit_logp(ec_dec *_this,unsigned _logp){ return val; } -int ec_dec_cdf(ec_dec *_this,const int *_cdf,unsigned _ftb){ +int ec_dec_cdf(ec_dec *_this,const unsigned *_cdf,unsigned _ftb){ ec_uint32 r; ec_uint32 d; ec_uint32 s; diff --git a/tests/ectest.c b/tests/ectest.c index 48f9fa47..190beef9 100644 --- a/tests/ectest.c +++ b/tests/ectest.c @@ -238,7 +238,7 @@ int main(int _argc,char **_argv){ sym=ec_dec_bit_logp(&dec,logp1[j]); }break; case 3:{ - int cdf[3]; + unsigned cdf[3]; cdf[0]=0; cdf[1]=(1<