Modify the mdct library to enable using it outside rockbox - No functional changes.
[kugel-rb.git] / apps / codecs / lib / mdct2.h
blob3c25e03093e15725920fd998b98eb19ab0670839
1 /********************************************************************
2 * *
3 * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
4 * *
5 * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
6 * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
7 * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
8 * *
9 * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
10 * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
11 * *
12 ********************************************************************
14 function: modified discrete cosine transform prototypes
16 ********************************************************************/
18 #ifndef _OGG_mdct_H_
19 #define _OGG_mdct_H_
23 #ifdef _LOW_ACCURACY_
24 # define X(n) (((((n)>>22)+1)>>1) - ((((n)>>22)+1)>>9))
25 # //define LOOKUP_T const unsigned char
26 #else
27 # define X(n) (n)
28 # //define LOOKUP_T const ogg_int32_t
29 #endif
31 #ifdef ROCKBOX
32 #include <codecs.h>
33 #endif /* ROCKBOX */
35 #include "asm_arm.h"
36 #include "asm_mcf5249.h"
37 #include "codeclib_misc.h"
39 #ifndef ICONST_ATTR_TREMOR_WINDOW
40 #define ICONST_ATTR_TREMOR_WINDOW ICONST_ATTR
41 #endif
43 #ifndef ICODE_ATTR_TREMOR_MDCT
44 #define ICODE_ATTR_TREMOR_MDCT ICODE_ATTR
45 #endif
47 #ifndef ICODE_ATTR_TREMOR_NOT_MDCT
48 #define ICODE_ATTR_TREMOR_NOT_MDCT ICODE_ATTR
49 #endif
53 #ifdef _LOW_ACCURACY_
54 #define cPI3_8 (0x0062)
55 #define cPI2_8 (0x00b5)
56 #define cPI1_8 (0x00ed)
57 #else
58 #define cPI3_8 (0x30fbc54d)
59 #define cPI2_8 (0x5a82799a)
60 #define cPI1_8 (0x7641af3d)
61 #endif
64 extern void mdct_backward(int n, int32_t *in, int32_t *out);
66 #endif