annotate src/libvorbis-1.3.3/lib/mdct.h @ 83:ae30d91d2ffe

Replace these with versions built using an older toolset (so as to avoid ABI compatibilities when linking on Ubuntu 14.04 for packaging purposes)
author Chris Cannam
date Fri, 07 Feb 2020 11:51:13 +0000
parents 05aa0afa9217
children
rev   line source
Chris@1 1 /********************************************************************
Chris@1 2 * *
Chris@1 3 * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
Chris@1 4 * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
Chris@1 5 * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
Chris@1 6 * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
Chris@1 7 * *
Chris@1 8 * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
Chris@1 9 * by the Xiph.Org Foundation http://www.xiph.org/ *
Chris@1 10 * *
Chris@1 11 ********************************************************************
Chris@1 12
Chris@1 13 function: modified discrete cosine transform prototypes
Chris@1 14 last mod: $Id: mdct.h 16227 2009-07-08 06:58:46Z xiphmont $
Chris@1 15
Chris@1 16 ********************************************************************/
Chris@1 17
Chris@1 18 #ifndef _OGG_mdct_H_
Chris@1 19 #define _OGG_mdct_H_
Chris@1 20
Chris@1 21 #include "vorbis/codec.h"
Chris@1 22
Chris@1 23
Chris@1 24
Chris@1 25
Chris@1 26
Chris@1 27 /*#define MDCT_INTEGERIZED <- be warned there could be some hurt left here*/
Chris@1 28 #ifdef MDCT_INTEGERIZED
Chris@1 29
Chris@1 30 #define DATA_TYPE int
Chris@1 31 #define REG_TYPE register int
Chris@1 32 #define TRIGBITS 14
Chris@1 33 #define cPI3_8 6270
Chris@1 34 #define cPI2_8 11585
Chris@1 35 #define cPI1_8 15137
Chris@1 36
Chris@1 37 #define FLOAT_CONV(x) ((int)((x)*(1<<TRIGBITS)+.5))
Chris@1 38 #define MULT_NORM(x) ((x)>>TRIGBITS)
Chris@1 39 #define HALVE(x) ((x)>>1)
Chris@1 40
Chris@1 41 #else
Chris@1 42
Chris@1 43 #define DATA_TYPE float
Chris@1 44 #define REG_TYPE float
Chris@1 45 #define cPI3_8 .38268343236508977175F
Chris@1 46 #define cPI2_8 .70710678118654752441F
Chris@1 47 #define cPI1_8 .92387953251128675613F
Chris@1 48
Chris@1 49 #define FLOAT_CONV(x) (x)
Chris@1 50 #define MULT_NORM(x) (x)
Chris@1 51 #define HALVE(x) ((x)*.5f)
Chris@1 52
Chris@1 53 #endif
Chris@1 54
Chris@1 55
Chris@1 56 typedef struct {
Chris@1 57 int n;
Chris@1 58 int log2n;
Chris@1 59
Chris@1 60 DATA_TYPE *trig;
Chris@1 61 int *bitrev;
Chris@1 62
Chris@1 63 DATA_TYPE scale;
Chris@1 64 } mdct_lookup;
Chris@1 65
Chris@1 66 extern void mdct_init(mdct_lookup *lookup,int n);
Chris@1 67 extern void mdct_clear(mdct_lookup *l);
Chris@1 68 extern void mdct_forward(mdct_lookup *init, DATA_TYPE *in, DATA_TYPE *out);
Chris@1 69 extern void mdct_backward(mdct_lookup *init, DATA_TYPE *in, DATA_TYPE *out);
Chris@1 70
Chris@1 71 #endif