[FFmpeg-devel] [PATCH] Do not assume long is same width as x86 register in swscale.

Ramiro Polla ramiro.polla
Wed Mar 18 01:30:06 CET 2009


Hi,

On Tue, Mar 17, 2009 at 8:51 PM, Diego Biurrun <diego at biurrun.de> wrote:
> On Tue, Mar 17, 2009 at 07:23:18PM -0300, Ramiro Polla wrote:
>>
>> swscale_funnycode2.diff checks for VirtualAlloc in windows.h (os/2
>> could also use something similar then).
>>
>> --- a/configure
>> +++ b/configure
>
> OK
>
>> --- a/swscale.c
>> +++ b/swscale.c
>> @@ -68,6 +68,10 @@ untested special converters
>> ?#define MAP_ANONYMOUS MAP_ANON
>> ?#endif
>> ?#endif
>> +#ifdef HAVE_VIRTUALALLOC
>
> #if

Ah, I had forgotten about the switch to #if

>> +#define WIN32_LEAN_AND_MEAN
>
> Is this necessary?

It's a good idea, like Reimar pointed out.

>> @@ -2513,6 +2517,9 @@ SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, int d
>> +#elif defined(HAVE_VIRTUALALLOC)
>
> Leave out the 'defined'.
>
>> @@ -3161,6 +3168,9 @@ void sws_freeContext(SwsContext *c){
>> +#elif defined(HAVE_VIRTUALALLOC)
>
> ditto

Updated patch attached.

Ramiro Polla
-------------- next part --------------
A non-text attachment was scrubbed...
Name: swscale_funnycode_3.diff
Type: text/x-diff
Size: 2037 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090317/dd54a3e3/attachment.diff>



More information about the ffmpeg-devel mailing list