[FFmpeg-devel] discussion around the best way to patch the swscale for Blackfin

Panagiotis Issaris takis.issaris
Fri Jun 22 14:06:49 CEST 2007


Hi Marc,

Op 22-jun-07, om 13:51 heeft Marc Hoffman het volgende geschreven:

> On 6/22/07, Reimar Doeffinger <Reimar.Doeffinger at stud.uni- 
> karlsruhe.de>
> wrote:
>>
>> Hello,
>> On Thu, Jun 21, 2007 at 11:00:28PM -0400, Marc Hoffman wrote:
>>> Does this look like a clean integration for the unscaled variant  
>>> for the
>>> swscale infrastructure?  Seems reasonably clean to me but another  
>>> set of
>>> eyes would be great.
>>
>> Looks good, except
>> 1) ff_bfin_get_unscaled_swscale (c); seems to be indented differently
>> than the other code.
>> 2) if (ENABLE_BFIN) ff_bfin_get_unscaled_swscale (c); avoids the  
>> #ifdef
>> and matches current dsputil
>
>
>
> Hi Reimar,
>
>    On #1 I can't see that the indentation is incorrect. I must be  
> missing
> your point.
>
> I'm actually not sure about this either do you mean this?
>
>
> #ifdef ARCH_BFIN
>     ff_bfin_get_unscaled_swscale (c);
> #endif
>
>
> converts into the following which to me is a reasonable idea
>
>     if (flags & SWS_CPU_CAPS_BFIN)
>        ff_bfin_get_unscaled_swscale (c);
>
> but this would still need to be wrapped inside of an ifdef  
> ARCH_BFIN because
> the function is defined for compilation only bfin.  Did I miss  
> something?

The ENABLE_BFIN define is set in config.h by the configure script.  
You can therefore use the if (ENABLE_BFIN) ... as Reimar pointed out;  
GCC will optimize the call out in case ENABLE_BFIN is zero.

With friendly regards,
Takis




More information about the ffmpeg-devel mailing list