summaryrefslogtreecommitdiff
path: root/thirdparty/opus/celt/quant_bands.c
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-11-18 09:56:18 +0100
committerRémi Verschelde <rverschelde@gmail.com>2019-11-18 09:56:48 +0100
commit46ae64cd60166ead412bacc1bf03e9c8f8965e2c (patch)
tree9e592667ffa91e55491a66733e5e3d7de0b666c9 /thirdparty/opus/celt/quant_bands.c
parent974646309bfe09c48c8a72bf751b0ea6ad8b5bc5 (diff)
Revert "Update opus to 1.3.1 and opusfile to 0.11"
This reverts commit e00426c512a7905f5f925d382c443bab7a0ca693. The way we handle platform-specific intrinsics is not good, so the current state will not compile on armv8. This commit also requires SSE4.1 support, which is likely not a good idea for portable binaries. We'll have to redo this with more caution after 3.2 is released, or we might simply drop opus as we're only using it as dependency for theora right now. Fixes #33606.
Diffstat (limited to 'thirdparty/opus/celt/quant_bands.c')
-rw-r--r--thirdparty/opus/celt/quant_bands.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/thirdparty/opus/celt/quant_bands.c b/thirdparty/opus/celt/quant_bands.c
index 39a221eda5..95076e0af2 100644
--- a/thirdparty/opus/celt/quant_bands.c
+++ b/thirdparty/opus/celt/quant_bands.c
@@ -418,7 +418,6 @@ void quant_energy_finalise(const CELTMode *m, int start, int end, opus_val16 *ol
offset = (q2-.5f)*(1<<(14-fine_quant[i]-1))*(1.f/16384);
#endif
oldEBands[i+c*m->nbEBands] += offset;
- error[i+c*m->nbEBands] -= offset;
bits_left--;
} while (++c < C);
}
@@ -457,7 +456,7 @@ void unquant_coarse_energy(const CELTMode *m, int start, int end, opus_val16 *ol
/* It would be better to express this invariant as a
test on C at function entry, but that isn't enough
to make the static analyzer happy. */
- celt_sig_assert(c<2);
+ celt_assert(c<2);
tell = ec_tell(dec);
if(budget-tell>=15)
{
@@ -548,15 +547,9 @@ void amp2Log2(const CELTMode *m, int effEnd, int end,
c=0;
do {
for (i=0;i<effEnd;i++)
- {
bandLogE[i+c*m->nbEBands] =
- celt_log2(bandE[i+c*m->nbEBands])
+ celt_log2(SHL32(bandE[i+c*m->nbEBands],2))
- SHL16((opus_val16)eMeans[i],6);
-#ifdef FIXED_POINT
- /* Compensate for bandE[] being Q12 but celt_log2() taking a Q14 input. */
- bandLogE[i+c*m->nbEBands] += QCONST16(2.f, DB_SHIFT);
-#endif
- }
for (i=effEnd;i<end;i++)
bandLogE[c*m->nbEBands+i] = -QCONST16(14.f,DB_SHIFT);
} while (++c < C);