search for: op_float2int

Displaying 1 result from an estimated 1 matches for "op_float2int".

2015 Mar 21
0
use xmm intrinsics for lrintf() with mingw-w64
...*This implementation is largely based off of libvorbisfile. @@ -2961,8 +2963,11 @@ int op_read_float_stereo(OggOpusFile *_of,float *_pcm,int _buf_size){ #else -# if defined(OP_HAVE_LRINTF) -# include <math.h> +# if (defined(__GNUC__) && defined(_WIN64)) + static __inline long int op_float2int(float _x) { + return _mm_cvtss_si32(_mm_load_ss(&_x)); + } +# elif defined(OP_HAVE_LRINTF) # define op_float2int(_x) (lrintf(_x)) # else # define op_float2int(_x) ((int)((_x)+((_x)<0?-0.5F:0.5F)))