diff --git a/libcelt/celt.c b/libcelt/celt.c index fc67db52d623911c9b5908fd0cb3c7e7c305f063..fcd4293b0cc09aeb738b6621c87f111bf7a62083 100644 --- a/libcelt/celt.c +++ b/libcelt/celt.c @@ -704,7 +704,6 @@ int celt_encode_with_ec_float(CELTEncoder * restrict st, const celt_sig * pcm, c transient_time = -1; transient_time_quant = -1; transient_shift = 0; - isTransient = 0; resynth = optional_resynthesis!=NULL; @@ -743,7 +742,6 @@ int celt_encode_with_ec_float(CELTEncoder * restrict st, const celt_sig * pcm, c in[C*i+c] *= gain_1; #endif } - has_fold = 1; } if (isTransient) @@ -1352,7 +1350,6 @@ static void celt_decode_lost(CELTDecoder * restrict st, celt_word16 * restrict p celt_sig *decode_mem[2]; celt_sig *overlap_mem[2]; celt_word16 *lpc; - celt_word16 *oldBandE; SAVE_STACK; for (c=0;c<C;c++) @@ -1362,7 +1359,6 @@ static void celt_decode_lost(CELTDecoder * restrict st, celt_word16 * restrict p overlap_mem[c] = decode_mem[c]+DECODE_BUFFER_SIZE; } lpc = (celt_word16*)(st->_decode_mem+(DECODE_BUFFER_SIZE+st->overlap)*C); - oldBandE = lpc+C*LPC_ORDER; len = N+st->mode->overlap; diff --git a/libcelt/entdec.c b/libcelt/entdec.c index c57eee301fbb12e0552b2f76841aa9256a625d93..d7f4aa7ecca912bcfd76da10ca47391a5f572cd5 100644 --- a/libcelt/entdec.c +++ b/libcelt/entdec.c @@ -61,21 +61,20 @@ int ec_byte_read1(ec_byte_buffer *_b){ } ec_uint32 ec_dec_uint(ec_dec *_this,ec_uint32 _ft){ - ec_uint32 t; unsigned ft; unsigned s; int ftb; - t=0; /*In order to optimize EC_ILOG(), it is undefined for the value 0.*/ celt_assert(_ft>1); _ft--; ftb=EC_ILOG(_ft); if(ftb>EC_UNIT_BITS){ + ec_uint32 t; ftb-=EC_UNIT_BITS; ft=(unsigned)(_ft>>ftb)+1; s=ec_decode(_this,ft); ec_dec_update(_this,s,s+1,ft); - t=t<<EC_UNIT_BITS|s; + t=s; t = t<<ftb|ec_dec_bits(_this,ftb&(1<<ftb)-1); if (t>_ft) { @@ -87,8 +86,7 @@ ec_uint32 ec_dec_uint(ec_dec *_this,ec_uint32 _ft){ _ft++; s=ec_decode(_this,(unsigned)_ft); ec_dec_update(_this,s,s+1,(unsigned)_ft); - t=t<<ftb|s; - return t; + return s; } } diff --git a/libcelt/mdct.c b/libcelt/mdct.c index 428a980072208fa86367e4a955f17b8df12eb757..f7fd58b6ff8ba98d1eaeb9750161ac2f601991a3 100644 --- a/libcelt/mdct.c +++ b/libcelt/mdct.c @@ -66,10 +66,9 @@ void clt_mdct_init(mdct_lookup *l,int N, int maxshift) { int i; - int N2, N4; + int N4; kiss_twiddle_scalar *trig; l->n = N; - N2 = N>>1; N4 = N>>2; l->maxshift = maxshift; for (i=0;i<=maxshift;i++)