Renamed celt_word* to opus_val*
This commit is contained in:
parent
f9d14f8d77
commit
ff5f7228fd
31 changed files with 401 additions and 401 deletions
|
@ -37,16 +37,16 @@
|
|||
|
||||
|
||||
void _celt_lpc(
|
||||
celt_word16 *_lpc, /* out: [0...p-1] LPC coefficients */
|
||||
const celt_word32 *ac, /* in: [0...p] autocorrelation values */
|
||||
opus_val16 *_lpc, /* out: [0...p-1] LPC coefficients */
|
||||
const opus_val32 *ac, /* in: [0...p] autocorrelation values */
|
||||
int p
|
||||
)
|
||||
{
|
||||
int i, j;
|
||||
celt_word32 r;
|
||||
celt_word32 error = ac[0];
|
||||
opus_val32 r;
|
||||
opus_val32 error = ac[0];
|
||||
#ifdef FIXED_POINT
|
||||
celt_word32 lpc[LPC_ORDER];
|
||||
opus_val32 lpc[LPC_ORDER];
|
||||
#else
|
||||
float *lpc = _lpc;
|
||||
#endif
|
||||
|
@ -57,7 +57,7 @@ int p
|
|||
{
|
||||
for (i = 0; i < p; i++) {
|
||||
/* Sum up this iteration's reflection coefficient */
|
||||
celt_word32 rr = 0;
|
||||
opus_val32 rr = 0;
|
||||
for (j = 0; j < i; j++)
|
||||
rr += MULT32_32_Q31(lpc[j],ac[i - j]);
|
||||
rr += SHR32(ac[i + 1],3);
|
||||
|
@ -66,7 +66,7 @@ int p
|
|||
lpc[i] = SHR32(r,3);
|
||||
for (j = 0; j < (i+1)>>1; j++)
|
||||
{
|
||||
celt_word32 tmp1, tmp2;
|
||||
opus_val32 tmp1, tmp2;
|
||||
tmp1 = lpc[j];
|
||||
tmp2 = lpc[i-1-j];
|
||||
lpc[j] = tmp1 + MULT32_32_Q31(r,tmp2);
|
||||
|
@ -90,18 +90,18 @@ int p
|
|||
#endif
|
||||
}
|
||||
|
||||
void fir(const celt_word16 *x,
|
||||
const celt_word16 *num,
|
||||
celt_word16 *y,
|
||||
void fir(const opus_val16 *x,
|
||||
const opus_val16 *num,
|
||||
opus_val16 *y,
|
||||
int N,
|
||||
int ord,
|
||||
celt_word16 *mem)
|
||||
opus_val16 *mem)
|
||||
{
|
||||
int i,j;
|
||||
|
||||
for (i=0;i<N;i++)
|
||||
{
|
||||
celt_word32 sum = SHL32(EXTEND32(x[i]), SIG_SHIFT);
|
||||
opus_val32 sum = SHL32(EXTEND32(x[i]), SIG_SHIFT);
|
||||
for (j=0;j<ord;j++)
|
||||
{
|
||||
sum += MULT16_16(num[j],mem[j]);
|
||||
|
@ -115,17 +115,17 @@ void fir(const celt_word16 *x,
|
|||
}
|
||||
}
|
||||
|
||||
void iir(const celt_word32 *x,
|
||||
const celt_word16 *den,
|
||||
celt_word32 *y,
|
||||
void iir(const opus_val32 *x,
|
||||
const opus_val16 *den,
|
||||
opus_val32 *y,
|
||||
int N,
|
||||
int ord,
|
||||
celt_word16 *mem)
|
||||
opus_val16 *mem)
|
||||
{
|
||||
int i,j;
|
||||
for (i=0;i<N;i++)
|
||||
{
|
||||
celt_word32 sum = x[i];
|
||||
opus_val32 sum = x[i];
|
||||
for (j=0;j<ord;j++)
|
||||
{
|
||||
sum -= MULT16_16(den[j],mem[j]);
|
||||
|
@ -140,19 +140,19 @@ void iir(const celt_word32 *x,
|
|||
}
|
||||
|
||||
void _celt_autocorr(
|
||||
const celt_word16 *x, /* in: [0...n-1] samples x */
|
||||
celt_word32 *ac, /* out: [0...lag-1] ac values */
|
||||
const celt_word16 *window,
|
||||
const opus_val16 *x, /* in: [0...n-1] samples x */
|
||||
opus_val32 *ac, /* out: [0...lag-1] ac values */
|
||||
const opus_val16 *window,
|
||||
int overlap,
|
||||
int lag,
|
||||
int n
|
||||
)
|
||||
{
|
||||
celt_word32 d;
|
||||
opus_val32 d;
|
||||
int i;
|
||||
VARDECL(celt_word16, xx);
|
||||
VARDECL(opus_val16, xx);
|
||||
SAVE_STACK;
|
||||
ALLOC(xx, n, celt_word16);
|
||||
ALLOC(xx, n, opus_val16);
|
||||
for (i=0;i<n;i++)
|
||||
xx[i] = x[i];
|
||||
for (i=0;i<overlap;i++)
|
||||
|
@ -162,7 +162,7 @@ void _celt_autocorr(
|
|||
}
|
||||
#ifdef FIXED_POINT
|
||||
{
|
||||
celt_word32 ac0=0;
|
||||
opus_val32 ac0=0;
|
||||
int shift;
|
||||
for(i=0;i<n;i++)
|
||||
ac0 += SHR32(MULT16_16(xx[i],xx[i]),8);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue