aboutsummaryrefslogtreecommitdiff
path: root/celt/float_cast.h
diff options
context:
space:
mode:
authorRalph Giles <giles@thaumas.net>2011-10-26 20:24:49 -0700
committerRalph Giles <giles@thaumas.net>2011-10-26 20:24:49 -0700
commitda025d5632be80dad0af54af70d2cb0a286802d8 (patch)
tree6b0739d9c6d09418fdc60577f15c6702462703c7 /celt/float_cast.h
parent4923f3f80ecd77e8f3c549a7fca31c4fd83c9c4d (diff)
downloadlibopus-da025d5632be80dad0af54af70d2cb0a286802d8.tar.gz
Convert tabs to spaces in the opus and celt code.
Also reformat some, but by no means all, of the opus code for line length and three-character indents.
Diffstat (limited to 'celt/float_cast.h')
-rw-r--r--celt/float_cast.h120
1 files changed, 60 insertions, 60 deletions
diff --git a/celt/float_cast.h b/celt/float_cast.h
index 1b3f1991..39f63d42 100644
--- a/celt/float_cast.h
+++ b/celt/float_cast.h
@@ -30,98 +30,98 @@
#define FLOAT_CAST_H
/*============================================================================
-** On Intel Pentium processors (especially PIII and probably P4), converting
-** from float to int is very slow. To meet the C specs, the code produced by
-** most C compilers targeting Pentium needs to change the FPU rounding mode
-** before the float to int conversion is performed.
+** On Intel Pentium processors (especially PIII and probably P4), converting
+** from float to int is very slow. To meet the C specs, the code produced by
+** most C compilers targeting Pentium needs to change the FPU rounding mode
+** before the float to int conversion is performed.
**
-** Changing the FPU rounding mode causes the FPU pipeline to be flushed. It
-** is this flushing of the pipeline which is so slow.
+** Changing the FPU rounding mode causes the FPU pipeline to be flushed. It
+** is this flushing of the pipeline which is so slow.
**
-** Fortunately the ISO C99 specifications define the functions lrint, lrintf,
-** llrint and llrintf which fix this problem as a side effect.
+** Fortunately the ISO C99 specifications define the functions lrint, lrintf,
+** llrint and llrintf which fix this problem as a side effect.
**
-** On Unix-like systems, the configure process should have detected the
-** presence of these functions. If they weren't found we have to replace them
-** here with a standard C cast.
+** On Unix-like systems, the configure process should have detected the
+** presence of these functions. If they weren't found we have to replace them
+** here with a standard C cast.
*/
-/*
-** The C99 prototypes for lrint and lrintf are as follows:
-**
-** long int lrintf (float x) ;
-** long int lrint (double x) ;
+/*
+** The C99 prototypes for lrint and lrintf are as follows:
+**
+** long int lrintf (float x) ;
+** long int lrint (double x) ;
*/
-/* The presence of the required functions are detected during the configure
-** process and the values HAVE_LRINT and HAVE_LRINTF are set accordingly in
-** the config.h file.
+/* The presence of the required functions are detected during the configure
+** process and the values HAVE_LRINT and HAVE_LRINTF are set accordingly in
+** the config.h file.
*/
#if (HAVE_LRINTF)
-/* These defines enable functionality introduced with the 1999 ISO C
-** standard. They must be defined before the inclusion of math.h to
-** engage them. If optimisation is enabled, these functions will be
-** inlined. With optimisation switched off, you have to link in the
-** maths library using -lm.
+/* These defines enable functionality introduced with the 1999 ISO C
+** standard. They must be defined before the inclusion of math.h to
+** engage them. If optimisation is enabled, these functions will be
+** inlined. With optimisation switched off, you have to link in the
+** maths library using -lm.
*/
-#define _ISOC9X_SOURCE 1
-#define _ISOC99_SOURCE 1
+#define _ISOC9X_SOURCE 1
+#define _ISOC99_SOURCE 1
-#define __USE_ISOC9X 1
-#define __USE_ISOC99 1
+#define __USE_ISOC9X 1
+#define __USE_ISOC99 1
-#include <math.h>
+#include <math.h>
#define float2int(x) lrintf(x)
#elif (defined(HAVE_LRINT))
-#define _ISOC9X_SOURCE 1
-#define _ISOC99_SOURCE 1
+#define _ISOC9X_SOURCE 1
+#define _ISOC99_SOURCE 1
-#define __USE_ISOC9X 1
-#define __USE_ISOC99 1
+#define __USE_ISOC9X 1
+#define __USE_ISOC99 1
-#include <math.h>
+#include <math.h>
#define float2int(x) lrint(x)
#elif (defined (WIN64) || defined (_WIN64))
- #include <xmmintrin.h>
+ #include <xmmintrin.h>
- __inline long int float2int(float value)
- {
- return _mm_cvtss_si32(_mm_load_ss(&value));
- }
+ __inline long int float2int(float value)
+ {
+ return _mm_cvtss_si32(_mm_load_ss(&value));
+ }
#elif (defined (WIN32) || defined (_WIN32))
- #include <math.h>
-
- /* Win32 doesn't seem to have these functions.
- ** Therefore implement inline versions of these functions here.
- */
-
- __inline long int
- float2int (float flt)
- { int intgr;
-
- _asm
- { fld flt
- fistp intgr
- } ;
-
- return intgr ;
- }
+ #include <math.h>
+
+ /* Win32 doesn't seem to have these functions.
+ ** Therefore implement inline versions of these functions here.
+ */
+
+ __inline long int
+ float2int (float flt)
+ { int intgr;
+
+ _asm
+ { fld flt
+ fistp intgr
+ } ;
+
+ return intgr ;
+ }
#else
#if (defined(__GNUC__) && defined(__STDC__) && __STDC__ && __STDC_VERSION__ >= 199901L)
/* supported by gcc in C99 mode, but not by all other compilers */
- #warning "Don't have the functions lrint() and lrintf ()."
- #warning "Replacing these functions with a standard C cast."
+ #warning "Don't have the functions lrint() and lrintf ()."
+ #warning "Replacing these functions with a standard C cast."
#endif /* __STDC_VERSION__ >= 199901L */
- #include <math.h>
- #define float2int(flt) ((int)(floor(.5+flt)))
+ #include <math.h>
+ #define float2int(flt) ((int)(floor(.5+flt)))
#endif
static inline opus_int16 FLOAT2INT16(float x)