From b592a7a8a52bc2b61108570afff943b7e9afdc3d Mon Sep 17 00:00:00 2001 From: Nils Wallménius Date: Fri, 30 Aug 2013 23:27:12 +0200 Subject: Put two hot silk arrays on real stack (iram) Speeds up decoding of 16kbps test file by 16.7MHz on H300. Change-Id: I39c90e3b423ae8e2ee5c2b88c5dcec8d48807f77 --- lib/rbcodec/codecs/libopus/silk/resampler_private_IIR_FIR.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'lib/rbcodec/codecs/libopus/silk/resampler_private_IIR_FIR.c') diff --git a/lib/rbcodec/codecs/libopus/silk/resampler_private_IIR_FIR.c b/lib/rbcodec/codecs/libopus/silk/resampler_private_IIR_FIR.c index 04246257e7..ce9aff0907 100644 --- a/lib/rbcodec/codecs/libopus/silk/resampler_private_IIR_FIR.c +++ b/lib/rbcodec/codecs/libopus/silk/resampler_private_IIR_FIR.c @@ -72,10 +72,13 @@ void silk_resampler_private_IIR_FIR( silk_resampler_state_struct *S = (silk_resampler_state_struct *)SS; opus_int32 nSamplesIn; opus_int32 max_index_Q16, index_increment_Q16; - VARDECL( opus_int16, buf ); - SAVE_STACK; +/* VARDECL( opus_int16, buf ); + SAVE_STACK; */ - ALLOC( buf, 2 * S->batchSize + RESAMPLER_ORDER_FIR_12, opus_int16 ); +/* ALLOC( buf, 2 * S->batchSize + RESAMPLER_ORDER_FIR_12, opus_int16 ); */ + + /* worst case = 2*16*10+8 = 328 * 2 = 656bytes */ + opus_int16 buf[2 * S->batchSize + RESAMPLER_ORDER_FIR_12]; /* Copy buffered samples to start of buffer */ silk_memcpy( buf, S->sFIR.i16, RESAMPLER_ORDER_FIR_12 * sizeof( opus_int16 ) ); @@ -103,5 +106,5 @@ void silk_resampler_private_IIR_FIR( /* Copy last part of filtered signal to the state for the next call */ silk_memcpy( S->sFIR.i16, &buf[ nSamplesIn << 1 ], RESAMPLER_ORDER_FIR_12 * sizeof( opus_int16 ) ); - RESTORE_STACK; +/* RESTORE_STACK; */ } -- cgit v1.2.3