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