ref: 50bf8b0121378ae259b98549d015a8b48ab2db57
parent: dff9b7eb65586dcd5065cc7a5f5447d2c603071b
author: Jean-Marc Valin <[email protected]>
date: Mon Apr 21 08:14:16 EDT 2008
Removing some unnecessary initialisations to zero.
--- a/libcelt/bands.c
+++ b/libcelt/bands.c
@@ -138,8 +138,6 @@
} while (++j<eBands[i+1]);
} while (++i<m->nbEBands);
}
- for (i=C*eBands[m->nbEBands];i<C*eBands[m->nbEBands+1];i++)
- X[i] = 0;
}
#ifndef DISABLE_STEREO
@@ -196,8 +194,6 @@
X[j*C+c] = freq[j*C+c]*g;
}
}
- for (i=C*eBands[m->nbEBands];i<C*eBands[m->nbEBands+1];i++)
- X[i] = 0;
}
#ifndef DISABLE_STEREO
@@ -353,8 +349,6 @@
for (j=C*eBands[i];j<C*eBands[i+1];j++)
norm[j] = MULT16_16_Q15(n,X[j]);
}
- for (i=C*eBands[m->nbEBands];i<C*eBands[m->nbEBands+1];i++)
- X[i] = 0;
RESTORE_STACK;
}
@@ -410,8 +404,6 @@
for (j=C*eBands[i];j<C*eBands[i+1];j++)
norm[j] = MULT16_16_Q15(n,X[j]);
}
- for (i=C*eBands[m->nbEBands];i<C*eBands[m->nbEBands+1];i++)
- X[i] = 0;
RESTORE_STACK;
}
@@ -444,7 +436,5 @@
X[j*C+1] = MULT16_16_Q14(a1,r) - MULT16_16_Q14(a2,l);
}
}
- for (i=C*eBands[m->nbEBands];i<C*eBands[m->nbEBands+1];i++)
- X[i] = 0;
}
#endif
--- a/libcelt/celt.c
+++ b/libcelt/celt.c
@@ -356,7 +356,7 @@
/*for (i=0;i<B*N;i++) printf("%f ",P[i]);printf("\n");*/
/* Compute residual that we're going to encode */
- for (i=0;i<C*N;i++)
+ for (i=0;i<C*st->mode->eBands[st->mode->nbEBands];i++)
X[i] -= P[i];
/* Residual quantisation */
--- a/libcelt/rate.c
+++ b/libcelt/rate.c
@@ -165,7 +165,7 @@
lo = 0;
hi = MAX_PULSES-1;
- /* Instead of using the "bisection confition" we use a fixed number of
+ /* Instead of using the "bisection condition" we use a fixed number of
iterations because it should be faster */
/*while (hi-lo != 1)*/
for (i=0;i<LOG_MAX_PULSES;i++)