blob: c9199352a84b381055a61729fea3e455b5231eb7 [file] [log] [blame]
Gloria Wang37fe1582010-03-12 14:53:20 -08001/************************************************************************
2 * Copyright (C) 2010, The Android Open Source Project
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met:
8 *
9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * * Redistributions in binary form must reproduce the above
12 * copyright notice, this list of conditions and the following disclaimer
13 * in the documentation and/or other materials provided with the
14 * distribution.
15 * * Neither the name of the Android Open Source Project nor the
16 * names of its contributors may be used to endorse or promote products
17 * derived from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 ************************************************************************
Gloria Wang79130732010-02-08 14:41:04 -080031
32 function: modified discrete cosine transform prototypes
33
Gloria Wang37fe1582010-03-12 14:53:20 -080034 ************************************************************************/
Gloria Wang79130732010-02-08 14:41:04 -080035
36#ifndef _OGG_mdct_H_
37#define _OGG_mdct_H_
38
39#include "ivorbiscodec.h"
40#include "misc.h"
41
42#define DATA_TYPE ogg_int32_t
43#define REG_TYPE register ogg_int32_t
44
45#ifdef _LOW_ACCURACY_
46#define cPI3_8 (0x0062)
47#define cPI2_8 (0x00b5)
48#define cPI1_8 (0x00ed)
49#else
50#define cPI3_8 (0x30fbc54d)
51#define cPI2_8 (0x5a82799a)
52#define cPI1_8 (0x7641af3d)
53#endif
54
55extern void mdct_backward(int n, DATA_TYPE *in);
56extern void mdct_shift_right(int n, DATA_TYPE *in, DATA_TYPE *right);
57extern void mdct_unroll_lap(int n0,int n1,
58 int lW,int W,
59 DATA_TYPE *in,DATA_TYPE *right,
60 LOOKUP_T *w0,LOOKUP_T *w1,
61 ogg_int16_t *out,
62 int step,
63 int start,int end /* samples, this frame */);
64
65#endif
66
67
68
69
70
71
72
73
74
75
76
77