9494#define b16tob8 (b ) (b8_t)(((b)+0x0080)>>8)
9595#define ub16toub8 (b ) (ub8_t)(((b)+0x0080)>>8)
9696
97- #ifdef CONFIG_HAVE_LONG_LONG
9897# define b8tob32 (b ) (((b32_t)(b)) << 24)
9998# define ub8toub32 (b ) (((ub32_t)(b)) << 24)
10099# define b16tob32 (b ) (((b32_t)(b)) << 16)
101100# define ub16toub32 (b ) (((ub32_t)(b)) << 16)
102101# define b32tob16 (b ) (b16_t)(((b) + 0x0000000000008000)>>16)
103102# define ub32toub16 (b ) (ub16_t)(((b) + 0x0000000000008000)>>16)
104103# define b32tob8 (b ) (b8_t)(((b) + 0x0000000000000080)>>8)
105- #endif
106104
107105/* 16-bit values with 8 bits of precision ***********************************/
108106
168166#define b16abs (b ) ((b < 0) ? (-b) : (b)) /* Get the absolute value */
169167#define b16sign (b ) ((b > 0) ? (b16ONE) : (-b16ONE))
170168
171- #ifdef CONFIG_HAVE_LONG_LONG
172169/* Multiplication operators */
173170
174171# define b16mulb16 (a ,b ) b32tob16((b32_t)(a)*(b32_t)(b))
187184/* Square root operators */
188185
189186# define ub16sqrtub16 (a ) ub32sqrtub16(ub16toub32(a))
190- #else
191- # define ub16sqrtub16 (a ) ub8toub16(ub16sqrtub8(a))
192- #endif
193187
194188/* 64-bit values with 32 bits of precision **********************************/
195189
196- #ifdef CONFIG_HAVE_LONG_LONG
197190/* Conversions */
198191
199192#define b32toi (a ) ((a) >> 32) /* Conversion to integer */
206199#define b32frac (a ) ((a) & 0x00000000ffffffff) /* Take fractional part */
207200#define b32abs (b ) ((b < 0) ? (-b) : (b)) /* Get the absolute value */
208201#define b32sign (b ) ((b > 0) ? (b32ONE) : (-b32ONE))
209- #endif
210202
211203/****************************************************************************
212204 * Public Types
@@ -216,10 +208,8 @@ typedef int16_t b8_t;
216208typedef uint16_t ub8_t ;
217209typedef int32_t b16_t ;
218210typedef uint32_t ub16_t ;
219- #ifdef CONFIG_HAVE_LONG_LONG
220211typedef int64_t b32_t ;
221212typedef uint64_t ub32_t ;
222- #endif
223213
224214/****************************************************************************
225215 * Public Function Prototypes
@@ -234,23 +224,6 @@ extern "C"
234224#define EXTERN extern
235225#endif
236226
237- #ifndef CONFIG_HAVE_LONG_LONG
238- /* Multiplication operators */
239-
240- b16_t b16mulb16 (b16_t m1 , b16_t m2 );
241- ub16_t ub16mulub16 (ub16_t m1 , ub16_t m2 );
242-
243- /* Square operators */
244-
245- b16_t b16sqr (b16_t a );
246- ub16_t ub16sqr (ub16_t a );
247-
248- /* Division operators */
249-
250- b16_t b16divb16 (b16_t num , b16_t denom );
251- ub16_t ub16divub16 (ub16_t num , ub16_t denom );
252- #endif
253-
254227/* Trigonometric Functions */
255228
256229b16_t b16sin (b16_t rad );
@@ -259,9 +232,7 @@ b16_t b16atan2(b16_t y, b16_t x);
259232
260233/* Square root operators */
261234
262- #ifdef CONFIG_HAVE_LONG_LONG
263235ub16_t ub32sqrtub16 (ub32_t a );
264- #endif
265236ub8_t ub16sqrtub8 (ub16_t a );
266237
267238#undef EXTERN
0 commit comments