![]() |
![]() |
![]() |
GStreamer Base Plugins 0.10 Library Reference Manual | ![]() |
---|---|---|---|---|
#include <gst/floatcast/floatcast.h> #define GDOUBLE_FROM_BE (val) #define GDOUBLE_FROM_LE (val) #define GDOUBLE_TO_BE (val) #define GDOUBLE_TO_LE (val) #define GFLOAT_FROM_BE (val) #define GFLOAT_FROM_LE (val) #define GFLOAT_TO_BE (val) #define GFLOAT_TO_LE (val) #define gst_cast_double (x) #define gst_cast_float (x)
The floatcast.h header file contains a couple of convenience macros for floating point numbers.
If you include this header, your application or library must link against libm (for maths.h support).
For optimal results, your application's or library's build system should check whether the C99 functions lrint and lrintf are supported and define the preprocessor symbols HAVE_LRINT and HAVE_LRINTF if so. If you are using autoconf, you can do this by using the AC_C99_FUNC_LRINT and AC_C99_FUNC_LRINTF checks in your configure.ac or configure.in file and including your application's config.h header before you include floatcast.h.
#define GDOUBLE_FROM_BE(val) (GDOUBLE_TO_BE (val))
Convert 64-bit floating point value (double) from big endian byte order into native byte order.
val : |
value |
#define GDOUBLE_FROM_LE(val) (GDOUBLE_TO_LE (val))
Convert 64-bit floating point value (double) from little endian byte order into native byte order.
val : |
value |
#define GDOUBLE_TO_BE(val)
Convert 64-bit floating point value (double) from native byte order into big endian byte order.
val : |
value |
#define GDOUBLE_TO_LE(val)
Convert 64-bit floating point value (double) from native byte order into little endian byte order.
val : |
value |
#define GFLOAT_FROM_BE(val) (GFLOAT_TO_BE (val))
Convert 32-bit floating point value (float) from big endian byte order into native byte order.
val : |
value |
#define GFLOAT_FROM_LE(val) (GFLOAT_TO_LE (val))
Convert 32-bit floating point value (float) from little endian byte order into native byte order.
val : |
value |
#define GFLOAT_TO_BE(val)
Convert 32-bit floating point value (float) from native byte order into big endian byte order.
val : |
value |
#define GFLOAT_TO_LE(val)
Convert 32-bit floating point value (float) from native byte order into little endian byte order.
val : |
value |
#define gst_cast_double(x)
Casts a 64-bit floating point value (double) to an integer without bias.
x : |
input value |