[FFmpeg-devel] [PATCH] swscale: Altivec does not depend on GPL.

Ramiro Polla ramiro.polla
Sun Apr 5 23:18:19 CEST 2009


On Sun, Apr 5, 2009 at 5:57 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Sun, Apr 05, 2009 at 02:09:27PM -0300, Ramiro Polla wrote:
>> Hi,
>>
>> This fixes a build error reported by a vlc dev in which
>> RUNTIME_CPUDETECT and GPL were specified.
>>
>> Ramiro Polla
>
>> From 268e024ce67174fd0f9aa7bc154ee39eec22e50c Mon Sep 17 00:00:00 2001
>> From: ramiro <ramiro at ramiro-q6600.(none)>
>> Date: Sun, 5 Apr 2009 14:02:16 -0300
>> Subject: [PATCH] swscale: Altivec does not depend on GPL.
>>
>> ---
>> ?swscale.c | ? 17 ++++++++---------
>> ?1 files changed, 8 insertions(+), 9 deletions(-)
>>
>> diff --git a/swscale.c b/swscale.c
>> index fbc5e1d..bcfc688 100644
>> --- a/swscale.c
>> +++ b/swscale.c
>
>> @@ -1096,13 +1096,12 @@ static void fillPlane(uint8_t* plane, int stride, int width, int height, int y,
>>
>> ?//Note: we have C, X86, MMX, MMX2, 3DNOW versions, there is no 3DNOW+MMX2 one
>> ?//Plain C versions
>> -#if !HAVE_MMX || defined (RUNTIME_CPUDETECT) || !CONFIG_GPL
>> +#if (!HAVE_MMX && !HAVE_ALTIVEC) || (HAVE_MMX && !CONFIG_GPL) || defined (RUNTIME_CPUDETECT)
>> ?#define COMPILE_C
>> ?#endif
>
> HAVE_MMX && !CONFIG_GPL should be false

If MMX is enabled, but GPL is not, then C should be the only one built
(unless I misunderstood the purpose of those flags). I attached a
little table that shows what should be built when.

Ramiro Polla
-------------- next part --------------
------------------------------------------------|----------------------------------------
|RUNTIME|  GPL  |  MMX  | MMX2  | 3DNOW |ALTIVEC|   C   |  MMX  | MMX2  | 3DNOW |ALTIVEC|
------------------------------------------------|----------------------------------------
|       |       |       |       |       |       |   X   |       |       |       |       |
|       |       |   X   |       |       |       |   X   |       |       |       |       |
|       |       |   X   |   X   |       |       |   X   |       |       |       |       |
|       |       |   X   |   X   |   X   |       |   X   |       |       |       |       |
|       |       |   X   |       |   X   |       |   X   |       |       |       |       |
|       |       |       |       |       |   X   |       |       |       |       |   X   |
|   X   |       |       |       |       |       |   X   |       |       |       |       |
|   X   |       |   X   |       |       |       |   X   |       |       |       |       |
|   X   |       |   X   |   X   |       |       |   X   |       |       |       |       |
|   X   |       |   X   |   X   |   X   |       |   X   |       |       |       |       |
|   X   |       |   X   |       |   X   |       |   X   |       |       |       |       |
|   X   |       |       |       |       |   X   |   X   |       |       |       |   X   |
--------------------------------------------------------|--------------------------------
|       |   X   |       |       |       |       |   X   |       |       |       |       |
|       |   X   |   X   |       |       |       |       |   X   |       |       |       |
|       |   X   |   X   |   X   |       |       |       |       |   X   |       |       |
|       |   X   |   X   |   X   |   X   |       |       |       |   X   |       |       |
|       |   X   |   X   |       |   X   |       |       |       |       |   X   |       |
|       |   X   |       |       |       |   X   |       |       |       |       |   X   |
|   X   |   X   |       |       |       |       |   X   |       |       |       |       |
|   X   |   X   |   X   |       |       |       |   X   |   X   |       |       |       |
|   X   |   X   |   X   |   X   |       |       |   X   |   X   |   X   |       |       |
|   X   |   X   |   X   |   X   |   X   |       |   X   |   X   |   X   |   X   |       |
|   X   |   X   |   X   |       |   X   |       |   X   |   X   |   X   |   X   |       |
|   X   |   X   |       |       |       |   X   |   X   |       |       |       |   X   |
------------------------------------------------|----------------------------------------



More information about the ffmpeg-devel mailing list