[CELT-dev] WIN64 issue

Jean-Marc Valin jean-marc.valin at usherbrooke.ca
Sat Oct 16 15:03:49 PDT 2010


Thanks for the patch. It's in the git repo now.

	Jean-Marc

On 10-10-16 12:17 PM, John Ridges wrote:
>   Hi Jean-Marc,
> 
> I've been compiling CELT for 64-bit Windows and it all seems to work 
> fine (with the occasional benign warning message) except for one place, 
> and that is in "float_cast.h" where there is some inline assembly 
> language that gets complied for Windows. Since the Microsoft 64-bit 
> compiler won't allow inline assembly language (and *still* doesn't have 
> "lrintf"), I suggest the following change to use intrinsics for the 
> 64-bit compiler:
> 
>   --- float_cast.h    Sat Oct 17 19:51:32 2009
> +++ new\float_cast.h    Fri Oct 15 12:09:38 2010
> @@ -72,8 +72,14 @@
>   #include <math.h>
>   #define float2int(x) lrint(x)
> 
> -#elif (defined (WIN32) || defined (_WIN32))
> +#elif (defined (WIN64) || defined (_WIN64))
> +    #include <xmmintrin.h>
> 
> +    __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.
> 
> 
> BTW, I have also compiled CELT for 64-bit Mac OS X with no problems.
> 
> Cheers,
> 
> John Ridges
> 
> 
> 
> 
> _______________________________________________
> celt-dev mailing list
> celt-dev at xiph.org
> http://lists.xiph.org/mailman/listinfo/celt-dev
> 
> 



More information about the celt-dev mailing list