[x264-devel] [PATCH] osdep: make aware of MSVC

Steven Walters kemuri9 at gmail.com
Tue May 20 23:13:25 CEST 2014


On Tue, May 20, 2014 at 4:59 PM, Diego Biurrun <diego at biurrun.de> wrote:
> On Tue, May 20, 2014 at 01:29:47PM -0500, Steve Borho wrote:
>> # HG changeset patch
>> # User Steve Borho <steve at borho.org>
>> # Date 1400609639 18000
>> #      Tue May 20 13:13:59 2014 -0500
>> # Node ID 0dc8611d2feec2d44ffba2a79472694a61fb0e66
>> # Parent  b07a2ecf2c00fe76b497c3909bce5efb79ec4635
>
> WTH?
>
>> osdep: make aware of MSVC
>
> What else is needed for full MSVC support?

I have a branch for "full" MSVS 2013 support at

https://github.com/kemuri-9/x264-devel/tree/msvs2013

I've been waiting on Update 2 to finalize (since it took about 5 weeks
from the RC?),
though been a bit busy since it's recent release.
I can probably get to wrapping it up this weekend for getting into the
official dev-stream.

>
>> --- a/common/osdep.h  Wed Apr 09 03:33:06 2014 -0300
>> +++ b/common/osdep.h  Tue May 20 13:13:59 2014 -0500
>> @@ -146,27 +146,33 @@
>>
>>  #if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 0)
>> -#define UNUSED __attribute__((unused))
>> -#define ALWAYS_INLINE __attribute__((always_inline)) inline
>> -#define NOINLINE __attribute__((noinline))
>> -#define MAY_ALIAS __attribute__((may_alias))
>> -#define x264_constant_p(x) __builtin_constant_p(x)
>> -#define x264_nonconstant_p(x) (!__builtin_constant_p(x))
>> +# define UNUSED __attribute__((unused))
>> +# define ALWAYS_INLINE __attribute__((always_inline)) inline
>> +# define NOINLINE __attribute__((noinline))
>> +# define MAY_ALIAS __attribute__((may_alias))
>> +# define x264_constant_p(x) __builtin_constant_p(x)
>> +# define x264_nonconstant_p(x) (!__builtin_constant_p(x))
>> +#elif defined(__ICL) || defined(_MSC_VER)
>> +# define ALWAYS_INLINE __forceinline
>> +# define NOINLINE __declspec(noinline)
>> +# define UNUSED
>> +# define MAY_ALIAS
>> +# define x264_constant_p(x) 0
>> +# define x264_nonconstant_p(x) 0
>>  #else
>> -#ifdef __ICL
>> -#define ALWAYS_INLINE __forceinline
>> -#define NOINLINE __declspec(noinline)
>> -#else
>> -#define ALWAYS_INLINE inline
>> -#define NOINLINE
>> -#endif
>> -#define UNUSED
>> -#define MAY_ALIAS
>> -#define x264_constant_p(x) 0
>> -#define x264_nonconstant_p(x) 0
>> +# define ALWAYS_INLINE inline
>> +# define NOINLINE
>> +# define UNUSED
>> +# define MAY_ALIAS
>> +# define x264_constant_p(x) 0
>> +# define x264_nonconstant_p(x) 0
>>  #endif
>
> Dunno what the policy for whitespace changes folded into functional
> changes is around here, but the rest of the file does not have spaces
> after '#', so IMO you're just creating formatting inconsistencies.
>
> Diego
> _______________________________________________
> x264-devel mailing list
> x264-devel at videolan.org
> https://mailman.videolan.org/listinfo/x264-devel


More information about the x264-devel mailing list