Implemented intensity stereo, which required changes all over the place

to make sure that stereo coupling is done at the band level. Previously
the stereo coupling was done all at once, but there were all kinds of
interactions with the prediction and folding.
This commit is contained in:
Jean-Marc Valin 2008-05-23 16:57:34 +10:00
parent 7bd2b9e001
commit bf2d648bbd
8 changed files with 123 additions and 96 deletions

View file

@ -364,8 +364,9 @@ CELTMode EXPORT *celt_mode_create(celt_int32_t Fs, int channels, int frame_size,
#endif
mode->window = window;
mode->bits = (const celt_int16_t **)compute_alloc_cache(mode, mode->nbChannels);
mode->bits = (const celt_int16_t **)compute_alloc_cache(mode, 1);
mode->bits_stereo = NULL;
#ifndef SHORTCUTS
psydecay_init(&mode->psy, MAX_PERIOD/2, mode->Fs);
#endif
@ -379,6 +380,9 @@ CELTMode EXPORT *celt_mode_create(celt_int32_t Fs, int channels, int frame_size,
mode->prob = quant_prob_alloc(mode);
compute_energy_allocation_table(mode);
if (mode->nbChannels>=2)
mode->bits_stereo = (const celt_int16_t **)compute_alloc_cache(mode, mode->nbChannels);
if (error)
*error = CELT_OK;
return mode;