[FFmpeg-devel] [RFC] Cleanse swscale

Michael Niedermayer michaelni
Wed Jan 12 17:26:58 CET 2011


On Wed, Jan 12, 2011 at 04:50:31PM +0100, Luca Barbato wrote:
> On 1/12/11 3:35 PM, Michael Niedermayer wrote:
>
>> if the code becomes 3000+ lines bigger then i dont like the idea
>
> It won't I'm halfway first I need to split then I need
>>
>> that said, the whole idea of spliting asm into its own directories is bikeshed
>
> No... more below
>
>> if people are fixed on that i wont stop them as long as things dont become
>> unreasonable bigger and not slower.
>
> Let me explain in simple term for everybody:
>
> function()
> {
> #if ARCH
> __asm__("gibberish");
> stuff
> __asm__("gibberish");
> #if feature
> MACRO
> __asm__("gibberish");
> #elif feature
> MACRO
> MACRO
> MACRO
> #elif variant
> #elif ARCH2
> inline_function_from_the_outer_space()
> #elif ARCH2
> __asm__("blah");
> #elif ARCH3
> MACRO
> #else
> for ( lines in image )
>     do stuff
> #endif
> #if ARCH
> __asm__("barrier sync");
> #endif
> }
>
> Iterated for all the 20 functions is wrong.

true, i did not mean to suggest that extreem, but rather something like:

function()
{
    FUNCTION_ASM
    for ( lines in image )
        do stuff
    BARRIER
}

and provide FUNCTION_ASM /BARRIER from #included files or provide empty defines
for C

its still the same code just restructured by the preprocessor
and that change could have been done 1 function at a time when someone wanted
to add optimizations NEON or otherwise

Now, iam not saying this should be done now but rather that it could have been
done when someone wanted to optimize function() into another asm and didnt
want to add another set of ifdefs

In the end its you who works on the cleanup and you have to decide what is the
most practical way to improve it

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No great genius has ever existed without some touch of madness. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20110112/7ea38842/attachment.pgp>



More information about the ffmpeg-devel mailing list