ref: e0aa9d185abf61356989510f3106fbdfa64ec137
parent: e0ae980165e390943cf5d02a67da77d46a5a843c
author: Jean-Marc Valin <[email protected]>
date: Sun Oct 17 12:25:56 EDT 2010
Removing dead code found by LLVM's static analysis
--- a/libcelt/celt.c
+++ b/libcelt/celt.c
@@ -704,7 +704,6 @@
transient_time = -1;
transient_time_quant = -1;
transient_shift = 0;
- isTransient = 0;
resynth = optional_resynthesis!=NULL;
@@ -743,7 +742,6 @@
in[C*i+c] *= gain_1;
#endif
}
- has_fold = 1;
}
if (isTransient)
@@ -1352,7 +1350,6 @@
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 @@
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;
--- a/libcelt/entdec.c
+++ b/libcelt/entdec.c
@@ -61,21 +61,20 @@
}
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 @@
_ft++;
s=ec_decode(_this,(unsigned)_ft);
ec_dec_update(_this,s,s+1,(unsigned)_ft);
- t=t<<ftb|s;
- return t;
+ return s;
}
}
--- 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++)