Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/quite/celt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jean-marc.valin@octasic.com>2010-06-29 01:22:37 +0400
committerJean-Marc Valin <jean-marc.valin@octasic.com>2010-06-29 01:22:37 +0400
commit2f6c5feae86a1648e20e251f19d6eb5ccb7a47c2 (patch)
tree1bcd6796c97a5fd27a80f04e60b61a8b3cc36dc9
parent71ae6d47147ed7b02db4b7025534c69e3e33a18f (diff)
Oops, fixed an uninitialized var errorv0.8.0
-rw-r--r--libcelt/modes.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/libcelt/modes.c b/libcelt/modes.c
index 6e81a2a..9baf2fe 100644
--- a/libcelt/modes.c
+++ b/libcelt/modes.c
@@ -183,7 +183,7 @@ static celt_int16 *compute_ebands(celt_int32 Fs, int frame_size, int res, int *n
static void compute_allocation_table(CELTMode *mode, int res)
{
- int i, j, nBark;
+ int i, j;
unsigned char *allocVectors;
int maxBands = sizeof(eband5ms)/sizeof(eband5ms[0])-1;
@@ -200,20 +200,16 @@ static void compute_allocation_table(CELTMode *mode, int res)
mode->allocVectors = allocVectors;
return;
}
-
/* If not the standard mode, interpolate */
- /* Find the number of critical bands supported by our sampling rate */
- for (nBark=1;nBark<maxBands;nBark++)
- if (eband5ms[j+1]*400 >= mode->Fs)
- break;
-
/* Compute per-codec-band allocation from per-critical-band matrix */
for (i=0;i<BITALLOC_SIZE;i++)
{
celt_int32 current = 0;
int eband = 0;
- for (j=0;j<nBark;j++)
+ /* We may be looping over too many bands, but eband will stop being
+ incremented once we reach the last band */
+ for (j=0;j<maxBands;j++)
{
int edge, low, high;
celt_int32 alloc;