1
0

machine.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /***************************************************************************\
  2. *
  3. * (C) copyright Fraunhofer - IIS (1998)
  4. * All Rights Reserved
  5. *
  6. * $Header: /cvs/root/winamp/aacdec/incs/mp4dec_helpers/machine.h,v 1.3 2012/05/08 20:16:50 audiodsp Exp $
  7. * project : MPEG-4 Audio Decoder
  8. * contents/description: machine dependent type definitions
  9. *
  10. * This software and/or program is protected by copyright law and
  11. * international treaties. Any reproduction or distribution of this
  12. * software and/or program, or any portion of it, may result in severe
  13. * civil and criminal penalties, and will be prosecuted to the maximum
  14. * extent possible under law.
  15. *
  16. \***************************************************************************/
  17. #ifndef __MACHINE_H
  18. #define __MACHINE_H
  19. #define inline __inline
  20. #include <math.h>
  21. #ifdef _MSC_VER
  22. #include <basetsd.h>
  23. #endif
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27. typedef signed char INT8;
  28. typedef signed short INT16;
  29. typedef signed int INT32;
  30. typedef signed int INT;
  31. typedef float FLOAT;
  32. typedef double DOUBLE;
  33. /* typedef long LONG; */
  34. /* typedef unsigned long ULONG; */
  35. /* typedef unsigned int UINT; */
  36. /* typedef signed int INT; */
  37. typedef unsigned char UINT8;
  38. typedef unsigned short UINT16;
  39. typedef unsigned int UINT32;
  40. #if defined _MSC_VER
  41. #define ALIGN16 __declspec(align(16))
  42. #elif defined __GNUC__ && !defined __sparc__ && !defined __sparc_v9__
  43. #define ALIGN16 __attribute__((aligned(16)))
  44. #else
  45. #define ALIGN16
  46. #endif
  47. #ifndef INT64
  48. #if !(defined(WIN32) || defined(WIN64))
  49. #define INT64 long long
  50. #else
  51. #define INT64 __int64
  52. #endif
  53. #endif
  54. static inline double FhgSqrt(DOUBLE a){
  55. return(sqrt(a));
  56. }
  57. static inline double FhgExp(DOUBLE a){
  58. return(exp((double) a));
  59. }
  60. static inline double FhgPow(DOUBLE a, DOUBLE b){
  61. return(pow((double) a, (double) b));
  62. }
  63. static inline double FhgSin(DOUBLE a){
  64. return(sin((double) a));
  65. }
  66. static inline double FhgFloor(DOUBLE a){
  67. return(floor((double) a));
  68. }
  69. static inline double FhgCos(DOUBLE a){
  70. return(cos((double) a));
  71. }
  72. static inline double FhgFabs(DOUBLE a){
  73. return(fabs((double) a));
  74. }
  75. static inline double FhgTan(DOUBLE a){
  76. return(tan((double) a));
  77. }
  78. static inline double FhgCeil(DOUBLE a){
  79. return(ceil((double) a));
  80. }
  81. static inline double FhgLog(DOUBLE a){
  82. return(log((double) a));
  83. }
  84. #ifdef __cplusplus
  85. }
  86. #endif
  87. #endif /* #define __MACHINE_H */