Making 16-bit compilers happy
authorJean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Tue, 4 Mar 2008 21:15:55 +0000 (08:15 +1100)
committerJean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Tue, 4 Mar 2008 21:15:55 +0000 (08:15 +1100)
libcelt/mdct.c

index 8cc6997..0784a8d 100644 (file)
@@ -73,7 +73,7 @@ void mdct_init(mdct_lookup *l,int N)
       l->trig[i] = SAMP_MAX*cos(2*M_PI*(i+1./8.)/N);
 #else
    for (i=0;i<N2;i++)
-      l->trig[i] = TRIG_UPSCALE*celt_cos_norm(DIV32(ADD32(SHL32(i,17),16386),N));
+      l->trig[i] = TRIG_UPSCALE*celt_cos_norm(DIV32(ADD32(SHL32(EXTEND32(i),17),16386),N));
 #endif
 #else
    for (i=0;i<N2;i++)