2
* Machine dependent defines/includes for LAME.
4
* Copyright (c) 1999 A.L. Faber
6
* This library is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU Library General Public
8
* License as published by the Free Software Foundation; either
9
* version 2 of the License, or (at your option) any later version.
11
* This library is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* Library General Public License for more details.
16
* You should have received a copy of the GNU Library General Public
17
* License along with this library; if not, write to the
18
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19
* Boston, MA 02110-1301, USA.
22
#ifndef LAME_MACHINE_H
23
#define LAME_MACHINE_H
30
#if defined(__riscos__) && defined(FPA10)
45
#if defined(macintosh)
49
# include <sys/types.h>
50
# include <sys/stat.h>
54
* 3 different types of pow() functions:
57
* - exp() on some machines this is claimed to be faster than pow()
60
#define POW20(x) (assert(-Q_MAX2 <= x && x < Q_MAX), pow20[x+Q_MAX2])
61
/*#define POW20(x) pow(2.0,((double)(x)-210)*.25) */
62
/*#define POW20(x) exp( ((double)(x)-210)*(.25*LOG2) ) */
64
#define IPOW20(x) (assert(0 <= x && x < Q_MAX), ipow20[x])
65
/*#define IPOW20(x) exp( -((double)(x)-210)*.1875*LOG2 ) */
66
/*#define IPOW20(x) pow(2.0,-((double)(x)-210)*.1875) */
68
#define IIPOW20(x) (assert(0 <= x && x < Q_MAX2), iipow20[x])
70
/* in case this is used without configure */
77
# define inline _inline
78
#elif defined(__SASC) || defined(__GNUC__) || defined(__ICC) || defined(__ECC)
79
/* if __GNUC__ we always want to inline, not only if the user requests it */
81
# define inline __inline
85
# pragma warning( disable : 4244 )
86
/*# pragma warning( disable : 4305 ) */
90
* FLOAT for variables which require at least 32 bits
91
* FLOAT8 for variables which require at least 64 bits
93
* On some machines, 64 bit will be faster than 32 bit. Also, some math
94
* routines require 64 bit float, so setting FLOAT=float will result in a
100
#ifndef FLOAT8 /* NOTE: RH: 7/00: if FLOAT8=float, it breaks resampling and VBR code */
101
typedef double FLOAT8;
103
# define FLOAT8_MAX DBL_MAX
105
# define FLOAT8_MAX 1e99 /* approx */
109
# define FLOAT8_MAX FLT_MAX
111
# define FLOAT8_MAX 1e37 /* approx */
115
/* sample_t must be floating point, at least 32 bits */
116
typedef FLOAT sample_t;
117
typedef sample_t stereo_t [2];
121
/* end of machine.h */