Skip to content
Snippets Groups Projects
Commit 328b8bd7 authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

fixed a few trivial bugs: exporting celt_strerror(), changed DB_SCALING to a

shift and removed the chec for DISABLE_STEREO in the mode creation.
parent 234969c9
No related branches found
No related tags found
No related merge requests found
......@@ -96,8 +96,7 @@ typedef celt_word32 celt_mask;
#define PGAIN_SCALING_1 (1.f/32768.f)
#define PGAIN_SHIFT 15
#define DB_SCALING 256.f
#define DB_SCALING_1 (1.f/256.f)
#define DB_SHIFT 8
#define EPSILON 1
#define VERY_SMALL 0
......@@ -151,9 +150,6 @@ typedef float celt_mask;
#define PGAIN_SCALING 1.f
#define PGAIN_SCALING_1 1.f
#define DB_SCALING 1.f
#define DB_SCALING_1 1.f
#define EPSILON 1e-15f
#define VERY_SMALL 1e-15f
#define VERY_LARGE32 1e15f
......
......@@ -269,7 +269,7 @@ EXPORT int celt_decoder_ctl(CELTDecoder * st, int request, ...);
/* @} */
const char *celt_strerror(int error);
EXPORT const char *celt_strerror(int error);
#ifdef __cplusplus
......
......@@ -375,16 +375,6 @@ CELTMode *celt_mode_create(celt_int32 Fs, int frame_size, int *error)
#endif /* !STATIC_MODES */
#ifdef DISABLE_STEREO
if (channels > 1)
{
celt_warning("Stereo support was disable from this build");
if (error)
*error = CELT_BAD_ARG;
return NULL;
}
#endif
mdct_init(&mode->mdct, 2*mode->mdctSize);
mode->fft = pitch_state_alloc(MAX_PERIOD);
......
......@@ -136,7 +136,7 @@ unsigned quant_coarse_energy(const CELTMode *m, celt_word16 *eBands, celt_word16
ec_laplace_encode_start(enc, &qi, prob[2*i], prob[2*i+1]);
error[i+c*m->nbEBands] = f - SHL16(qi,8);
}
q = qi*DB_SCALING;
q = SHL16(qi,DB_SHIFT);
oldEBands[i+c*m->nbEBands] = MULT16_16_Q15(coef,oldEBands[i+c*m->nbEBands])+(mean+prev[c]+q);
prev[c] = mean+prev[c]+MULT16_16_Q15(Q15ONE-beta,q);
......@@ -252,7 +252,7 @@ void unquant_coarse_energy(const CELTMode *m, celt_ener *eBands, celt_word16 *ol
qi = -1;
else
qi = ec_laplace_decode_start(dec, prob[2*i], prob[2*i+1]);
q = qi*DB_SCALING;
q = SHL16(qi,DB_SHIFT);
oldEBands[i+c*m->nbEBands] = MULT16_16_Q15(coef,oldEBands[i+c*m->nbEBands])+(mean+prev[c]+q);
prev[c] = mean+prev[c]+MULT16_16_Q15(Q15ONE-beta,q);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment