From da67f66eedd38a1576e182f74d354e12949608f9 Mon Sep 17 00:00:00 2001 From: Andree Buschmann Date: Sat, 6 Oct 2012 14:51:01 +0200 Subject: opus: slight speedup of deemphasis MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hoist load of coefficients out of the loop. Speeds up decoding of a 64kbps test file by 0.6MHz on h300 (cf) 0.2MHz on c200 (pp) and 0.1MHz on fuzev1 (amsv1) Signed-off-by: Nils Wallménius Change-Id: I4be0059fc2a77748575f5fc9378f7f348d64f1c4 --- lib/rbcodec/codecs/libopus/celt/celt.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'lib/rbcodec/codecs/libopus') diff --git a/lib/rbcodec/codecs/libopus/celt/celt.c b/lib/rbcodec/codecs/libopus/celt/celt.c index a4e5131a04..4a09cc9905 100644 --- a/lib/rbcodec/codecs/libopus/celt/celt.c +++ b/lib/rbcodec/codecs/libopus/celt/celt.c @@ -466,16 +466,21 @@ static void deemphasis(celt_sig *in[], opus_val16 *pcm, int N, int C, /* int dow int j; celt_sig * OPUS_RESTRICT x; opus_val16 * OPUS_RESTRICT y; + opus_val16 coef0 = coef[0]; +#ifdef CUSTOM_MODES + opus_val16 coef1 = coef[1]; + opus_val16 coef3 = coef[3]; +#endif celt_sig m = mem[c]; x =in[c]; y = pcm+c; for (j=0;j