summaryrefslogtreecommitdiff
path: root/apps/codecs
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs')
-rw-r--r--apps/codecs/lib/fft-ffmpeg.c13
-rw-r--r--apps/codecs/lib/mdct.c6
2 files changed, 16 insertions, 3 deletions
diff --git a/apps/codecs/lib/fft-ffmpeg.c b/apps/codecs/lib/fft-ffmpeg.c
index 23cf8b8aed..203a82e7d4 100644
--- a/apps/codecs/lib/fft-ffmpeg.c
+++ b/apps/codecs/lib/fft-ffmpeg.c
@@ -57,6 +57,10 @@
57/* asm-optimised functions and/or macros */ 57/* asm-optimised functions and/or macros */
58#include "fft-ffmpeg_arm.h" 58#include "fft-ffmpeg_arm.h"
59 59
60#ifndef ICODE_ATTR_TREMOR_MDCT
61#define ICODE_ATTR_TREMOR_MDCT ICODE_ATTR
62#endif
63
60#if 0 64#if 0
61static int split_radix_permutation(int i, int n, int inverse) 65static int split_radix_permutation(int i, int n, int inverse)
62{ 66{
@@ -268,7 +272,8 @@ static inline void TRANSFORM_ZERO(FFTComplex * z, unsigned int n)
268#endif 272#endif
269 273
270/* z[0...8n-1], w[1...2n-1] */ 274/* z[0...8n-1], w[1...2n-1] */
271static void pass(FFTComplex *z_arg, unsigned int STEP_arg, unsigned int n_arg) 275void pass(FFTComplex *z_arg, unsigned int STEP_arg, unsigned int n_arg) ICODE_ATTR_TREMOR_MDCT;
276void pass(FFTComplex *z_arg, unsigned int STEP_arg, unsigned int n_arg)
272{ 277{
273 register FFTComplex * z = z_arg; 278 register FFTComplex * z = z_arg;
274 register unsigned int STEP = STEP_arg; 279 register unsigned int STEP = STEP_arg;
@@ -314,7 +319,8 @@ static void pass(FFTComplex *z_arg, unsigned int STEP_arg, unsigned int n_arg)
314 8192/16 (from "ff_cos_16") is 512 bytes. 319 8192/16 (from "ff_cos_16") is 512 bytes.
315 i.e. for fft16, STEP = 8192/16 */ 320 i.e. for fft16, STEP = 8192/16 */
316#define DECL_FFT(n,n2,n4)\ 321#define DECL_FFT(n,n2,n4)\
317static void fft##n(FFTComplex *z)\ 322void fft##n(FFTComplex *z) ICODE_ATTR_TREMOR_MDCT;\
323void fft##n(FFTComplex *z)\
318{\ 324{\
319 fft##n2(z);\ 325 fft##n2(z);\
320 fft##n4(z+n4*2);\ 326 fft##n4(z+n4*2);\
@@ -374,7 +380,8 @@ static void fft8_dispatch(FFTComplex *z)
374} 380}
375 381
376#ifndef CONFIG_SMALL 382#ifndef CONFIG_SMALL
377static void fft16(FFTComplex *z) 383void fft16(FFTComplex *z) ICODE_ATTR_TREMOR_MDCT;
384void fft16(FFTComplex *z)
378{ 385{
379 fft8(z); 386 fft8(z);
380 fft4(z+8); 387 fft4(z+8);
diff --git a/apps/codecs/lib/mdct.c b/apps/codecs/lib/mdct.c
index 3c9fe41f20..aefd553f25 100644
--- a/apps/codecs/lib/mdct.c
+++ b/apps/codecs/lib/mdct.c
@@ -25,6 +25,10 @@
25#include "codeclib_misc.h" 25#include "codeclib_misc.h"
26#include "mdct_lookup.h" 26#include "mdct_lookup.h"
27 27
28#ifndef ICODE_ATTR_TREMOR_MDCT
29#define ICODE_ATTR_TREMOR_MDCT ICODE_ATTR
30#endif
31
28/** 32/**
29 * Compute the middle half of the inverse MDCT of size N = 2^nbits 33 * Compute the middle half of the inverse MDCT of size N = 2^nbits
30 * thus excluding the parts that can be derived by symmetry 34 * thus excluding the parts that can be derived by symmetry
@@ -34,6 +38,7 @@
34 * NOTE - CANNOT CURRENTLY OPERATE IN PLACE (input and output must 38 * NOTE - CANNOT CURRENTLY OPERATE IN PLACE (input and output must
35 * not overlap or intersect at all) 39 * not overlap or intersect at all)
36 */ 40 */
41void ff_imdct_half(unsigned int nbits, fixed32 *output, const fixed32 *input) ICODE_ATTR_TREMOR_MDCT;
37void ff_imdct_half(unsigned int nbits, fixed32 *output, const fixed32 *input) 42void ff_imdct_half(unsigned int nbits, fixed32 *output, const fixed32 *input)
38{ 43{
39 int n8, n4, n2, n, j; 44 int n8, n4, n2, n, j;
@@ -244,6 +249,7 @@ void ff_imdct_half(unsigned int nbits, fixed32 *output, const fixed32 *input)
244 * <-----------output-----------> 249 * <-----------output----------->
245 * 250 *
246 */ 251 */
252void ff_imdct_calc(unsigned int nbits, fixed32 *output, const fixed32 *input) ICODE_ATTR_TREMOR_MDCT;
247void ff_imdct_calc(unsigned int nbits, fixed32 *output, const fixed32 *input) 253void ff_imdct_calc(unsigned int nbits, fixed32 *output, const fixed32 *input)
248{ 254{
249 const int n = (1<<nbits); 255 const int n = (1<<nbits);