[FFmpeg-devel] [PATCH] split-radix FFT

Uoti Urpala uoti.urpala
Tue Jul 29 20:47:40 CEST 2008

On Tue, 2008-07-29 at 20:02 +0200, Michael Niedermayer wrote:
> On Tue, Jul 29, 2008 at 07:14:02PM +0300, Uoti Urpala wrote:
> > > > And how does using MANGLE improve things? 
> > > 
> > > It makes the code run faster and makes it smaller, but i said that already.
> > 
> > As would just omitting -fPIC, without the ugliness of MANGLE. 
> First this is not always possible (x86-64 and distro policies)
> Second the ugliness is actually debateable
> "mov "MANGLE(cos_pi)", %%eax"
> is actually more readable than
> "mov %7, %%eax"
> because cos_pi makes sense and %7 requires one to check what it is actually.

Using named asm arguments would give better readability. Of course when
talking about named asm args you claim that using the "%d" names is no
readability problem and even if it were macros could be used to give
them symbolic names equally easily - nobody just ever does that...

> > But my
> > question was about the distribution case. I'll rephrase it if if the
> > original wasn't clear enough:
> > You said that MANGLE helps with distributions that have a policy that
> > requires using -fPIC. How does it actually help? 
> You misunderstood my intention, what i meant was MANGLE helps the users
> of the binary package of distributions as the application (ffmpeg) is faster.
> Which is an advantage for the user.

So you think the distros will be OK with textrels or fill fail to notice
them as long as the command line nominally says "-fPIC".

> > It just creates
> > textrels with a different (and uglier) method. Is the benefit that it's
> > easier to break the policy without anyone noticing (there's a -fPIC on
> > the command line... it's just using another method to negate it). Or do
> > you think that someone will count the textrels and say "well breaking
> > the policy by this amount of textrels from the asm is ok, even though a
> > larger number from the C parts wouldn't be"?
> Which policy of which distribution forbids textrels? debians says -fPIC must
> be there thats not the same thing.

If it was meant that literally you could use "-fPIC -fno-PIC" on the
command line. Look, that command line has '-fPIC' like the policy
requires, everything is fine! And in the concrete case of the Debian
policy it does not absolutely forbid creating libraries without -fPIC,
and indeed FFmpeg is currently compiled without -fPIC in Debian/x86.

> It was you IIRC who equated -fPIC with no textrels in one of our previous
> "discussions".

I'm not sure what kind of "equating" you mean. IIRC no interpretation of
any formal outside policy was discussed. The closest thing I can think
of is an argument along the lines that if the user really doesn't want
textrels then forcing their use is wrong; and if the user is OK with
textrels then just don't compile the file with -fPIC.

More information about the ffmpeg-devel mailing list