[FFmpeg-devel] [RFC] Cleanse swscale

Baptiste Coudurier baptiste.coudurier
Thu Jan 13 20:27:31 CET 2011


Hi Luca,

On 01/13/2011 02:36 AM, Luca Barbato wrote:
> On 1/13/11 4:28 AM, Baptiste Coudurier wrote:
>> Hummm Luca, can you clarify ? This seems huge to me as well.
>
> swscale for the *_template.c stuff adopts this approach
>
> RENAME(function){
>
> }
> ...
>
>
> RENAME(init){
> generic_function = RENAME(function);
>
> }
>
> so it duplicates functions.
>
> by untemplating the C code (the step I posted) you have to keep
> basically a duplicate of the C code for every arch that has already
> optimizations even if you might just keep a single copy. Right now you
> have duplicates in the binary.
>
> the next step would be refactor so there aren't unneeded duplicates.
>

Why do you need to untemplate the code ? The RENAME function is used to 
support more cpu caps like mmx/sse/etc.. isn't it ?
This code should go under x86 without being modified, or is there 
another problem ?

-- 
Baptiste COUDURIER
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer                                  http://www.ffmpeg.org



More information about the ffmpeg-devel mailing list