Rename h100 specific screenshots so they are used again
[kugel-rb.git] / apps / plugins / lib / fixedpoint.h
blobdfabbad8dc17557e3580c75e910cf8d1f7d3ea20
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2006 Jens Arnold
12 * Fixed point library for plugins
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * as published by the Free Software Foundation; either version 2
17 * of the License, or (at your option) any later version.
19 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
20 * KIND, either express or implied.
22 ****************************************************************************/
24 long fsincos(unsigned long phase, long *cos);
25 long fsqrt(long a, unsigned int fracbits);
26 long cos_int(int val);
27 long sin_int(int val);
28 long flog(int x);
30 /* fast unsigned multiplication (16x16bit->32bit or 32x32bit->32bit,
31 * whichever is faster for the architecture) */
32 #ifdef CPU_ARM
33 #define FMULU(a, b) ((uint32_t) (((uint32_t) (a)) * ((uint32_t) (b))))
34 #else /* SH1, coldfire */
35 #define FMULU(a, b) ((uint32_t) (((uint16_t) (a)) * ((uint16_t) (b))))
36 #endif