diff options
author | Linfeng Zhang <linfengz@google.com> | 2016-09-07 15:29:03 -0700 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2017-06-06 17:12:20 -0400 |
commit | a1ae821c964960ed659134e8f834ba31a3db1a6b (patch) | |
tree | ae52ad960f2089428d2aa115121f469513f55019 /celt/bands.c | |
parent | 1d7dea17d56be2a4a79725dd3ab7c906e2793c2b (diff) | |
download | opus-a1ae821c964960ed659134e8f834ba31a3db1a6b.tar.gz |
Replace call of celt_inner_prod_c() (step 1)
Should call celt_inner_prod().
This change is bit exact as original, except for x86 floating-point.
In x86 floating-point, it calls celt_inner_prod_sse() which may have
different output with the change of floating-point operations' orders.
Change-Id: Ia2381e2e198a84296ac28305183f15be842b3454
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
Diffstat (limited to 'celt/bands.c')
-rw-r--r-- | celt/bands.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/celt/bands.c b/celt/bands.c index d4348182..3b1f5cfb 100644 --- a/celt/bands.c +++ b/celt/bands.c @@ -92,10 +92,11 @@ int bitexact_log2tan(int isin,int icos) #ifdef FIXED_POINT /* Compute the amplitude (sqrt energy) in each of the bands */ -void compute_band_energies(const CELTMode *m, const celt_sig *X, celt_ener *bandE, int end, int C, int LM) +void compute_band_energies(const CELTMode *m, const celt_sig *X, celt_ener *bandE, int end, int C, int LM, int arch) { int i, c, N; const opus_int16 *eBands = m->eBands; + (void)arch; N = m->shortMdctSize<<LM; c=0; do { for (i=0;i<end;i++) @@ -155,7 +156,7 @@ void normalise_bands(const CELTMode *m, const celt_sig * OPUS_RESTRICT freq, cel #else /* FIXED_POINT */ /* Compute the amplitude (sqrt energy) in each of the bands */ -void compute_band_energies(const CELTMode *m, const celt_sig *X, celt_ener *bandE, int end, int C, int LM) +void compute_band_energies(const CELTMode *m, const celt_sig *X, celt_ener *bandE, int end, int C, int LM, int arch) { int i, c, N; const opus_int16 *eBands = m->eBands; @@ -164,7 +165,7 @@ void compute_band_energies(const CELTMode *m, const celt_sig *X, celt_ener *band for (i=0;i<end;i++) { opus_val32 sum; - sum = 1e-27f + celt_inner_prod_c(&X[c*N+(eBands[i]<<LM)], &X[c*N+(eBands[i]<<LM)], (eBands[i+1]-eBands[i])<<LM); + sum = 1e-27f + celt_inner_prod(&X[c*N+(eBands[i]<<LM)], &X[c*N+(eBands[i]<<LM)], (eBands[i+1]-eBands[i])<<LM, arch); bandE[i+c*m->nbEBands] = celt_sqrt(sum); /*printf ("%f ", bandE[i+c*m->nbEBands]);*/ } |