Renamed some funciton that were likely to clash with other (non-Opus) code
This commit is contained in:
parent
4ee5753966
commit
7fc2fbdb14
6 changed files with 14 additions and 14 deletions
|
@ -41,7 +41,7 @@
|
|||
#include "mathops.h"
|
||||
#include "rate.h"
|
||||
|
||||
opus_uint32 lcg_rand(opus_uint32 seed)
|
||||
opus_uint32 celt_lcg_rand(opus_uint32 seed)
|
||||
{
|
||||
return 1664525 * seed + 1013904223;
|
||||
}
|
||||
|
@ -283,7 +283,7 @@ void anti_collapse(const CELTMode *m, celt_norm *_X, unsigned char *collapse_mas
|
|||
/* Fill with noise */
|
||||
for (j=0;j<N0;j++)
|
||||
{
|
||||
seed = lcg_rand(seed);
|
||||
seed = celt_lcg_rand(seed);
|
||||
X[(j<<LM)+k] = (seed&0x8000 ? r : -r);
|
||||
}
|
||||
renormalize = 1;
|
||||
|
@ -1082,7 +1082,7 @@ static unsigned quant_band(int encode, const CELTMode *m, int i, celt_norm *X, c
|
|||
/* Noise */
|
||||
for (j=0;j<N;j++)
|
||||
{
|
||||
*seed = lcg_rand(*seed);
|
||||
*seed = celt_lcg_rand(*seed);
|
||||
X[j] = (celt_norm)((opus_int32)*seed>>20);
|
||||
}
|
||||
cm = cm_mask;
|
||||
|
@ -1091,7 +1091,7 @@ static unsigned quant_band(int encode, const CELTMode *m, int i, celt_norm *X, c
|
|||
for (j=0;j<N;j++)
|
||||
{
|
||||
opus_val16 tmp;
|
||||
*seed = lcg_rand(*seed);
|
||||
*seed = celt_lcg_rand(*seed);
|
||||
/* About 48 dB below the "normal" folding level */
|
||||
tmp = QCONST16(1.0f/256, 10);
|
||||
tmp = (*seed)&0x8000 ? tmp : -tmp;
|
||||
|
|
|
@ -92,6 +92,6 @@ void anti_collapse(const CELTMode *m, celt_norm *_X, unsigned char *collapse_mas
|
|||
int start, int end, opus_val16 *logE, opus_val16 *prev1logE,
|
||||
opus_val16 *prev2logE, int *pulses, opus_uint32 seed);
|
||||
|
||||
opus_uint32 lcg_rand(opus_uint32 seed);
|
||||
opus_uint32 celt_lcg_rand(opus_uint32 seed);
|
||||
|
||||
#endif /* BANDS_H */
|
||||
|
|
|
@ -2038,7 +2038,7 @@ static void celt_decode_lost(CELTDecoder * restrict st, opus_val16 * restrict pc
|
|||
blen = (st->mode->eBands[i+1]-st->mode->eBands[i])<<LM;
|
||||
for (j=0;j<blen;j++)
|
||||
{
|
||||
seed = lcg_rand(seed);
|
||||
seed = celt_lcg_rand(seed);
|
||||
X[boffs+j] = (celt_norm)((opus_int32)seed>>20);
|
||||
}
|
||||
renormalise_vector(X+boffs, blen, Q15ONE);
|
||||
|
@ -2122,7 +2122,7 @@ static void celt_decode_lost(CELTDecoder * restrict st, opus_val16 * restrict pc
|
|||
}
|
||||
for (i=0;i<LPC_ORDER;i++)
|
||||
mem[i] = ROUND16(out_mem[c][MAX_PERIOD-1-i], SIG_SHIFT);
|
||||
fir(exc, lpc+c*LPC_ORDER, exc, MAX_PERIOD, LPC_ORDER, mem);
|
||||
celt_fir(exc, lpc+c*LPC_ORDER, exc, MAX_PERIOD, LPC_ORDER, mem);
|
||||
/*for (i=0;i<MAX_PERIOD;i++)printf("%d ", exc[i]); printf("\n");*/
|
||||
/* Check if the waveform is decaying (and if so how fast) */
|
||||
{
|
||||
|
@ -2159,7 +2159,7 @@ static void celt_decode_lost(CELTDecoder * restrict st, opus_val16 * restrict pc
|
|||
mem[i] = ROUND16(out_mem[c][MAX_PERIOD-1-i], SIG_SHIFT);
|
||||
for (i=0;i<len+st->mode->overlap;i++)
|
||||
e[i] = MULT16_32_Q15(fade, e[i]);
|
||||
iir(e, lpc+c*LPC_ORDER, e, len+st->mode->overlap, LPC_ORDER, mem);
|
||||
celt_iir(e, lpc+c*LPC_ORDER, e, len+st->mode->overlap, LPC_ORDER, mem);
|
||||
|
||||
{
|
||||
opus_val32 S2=0;
|
||||
|
|
|
@ -137,11 +137,11 @@ void pitch_downsample(celt_sig * restrict x[], opus_val16 * restrict x_lp,
|
|||
tmp = MULT16_16_Q15(QCONST16(.9f,15), tmp);
|
||||
lpc[i] = MULT16_16_Q15(lpc[i], tmp);
|
||||
}
|
||||
fir(x_lp, lpc, x_lp, len>>1, 4, mem);
|
||||
celt_fir(x_lp, lpc, x_lp, len>>1, 4, mem);
|
||||
|
||||
mem[0]=0;
|
||||
lpc[0]=QCONST16(.8f,12);
|
||||
fir(x_lp, lpc, x_lp, len>>1, 1, mem);
|
||||
celt_fir(x_lp, lpc, x_lp, len>>1, 1, mem);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ int p
|
|||
#endif
|
||||
}
|
||||
|
||||
void fir(const opus_val16 *x,
|
||||
void celt_fir(const opus_val16 *x,
|
||||
const opus_val16 *num,
|
||||
opus_val16 *y,
|
||||
int N,
|
||||
|
@ -112,7 +112,7 @@ void fir(const opus_val16 *x,
|
|||
}
|
||||
}
|
||||
|
||||
void iir(const opus_val32 *x,
|
||||
void celt_iir(const opus_val32 *x,
|
||||
const opus_val16 *den,
|
||||
opus_val32 *y,
|
||||
int N,
|
||||
|
|
|
@ -34,14 +34,14 @@
|
|||
|
||||
void _celt_lpc(opus_val16 *_lpc, const opus_val32 *ac, int p);
|
||||
|
||||
void fir(const opus_val16 *x,
|
||||
void celt_fir(const opus_val16 *x,
|
||||
const opus_val16 *num,
|
||||
opus_val16 *y,
|
||||
int N,
|
||||
int ord,
|
||||
opus_val16 *mem);
|
||||
|
||||
void iir(const opus_val32 *x,
|
||||
void celt_iir(const opus_val32 *x,
|
||||
const opus_val16 *den,
|
||||
opus_val32 *y,
|
||||
int N,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue