[Ffmpeg-devel] Mac OS X Intel last part: balign directives

Luca Abeni lucabe72
Fri Aug 11 12:48:01 CEST 2006


Hi John,

On Fri, 2006-08-11 at 16:00 +1000, John Dalgliesh wrote:
[...]
> Thanks, patch attached: balign-generalise.patch.
> Determines whether .align's arg is power-of-two or not, then defines 
> ASMALIGN appropriately in config.h. Changes all .baligns to ASMALIGNs.
> 
> Notes:
> - doesn't bother with .balign or .p2align; may as well use the standard 
> .align directive (once we know what it does) if we're going to the trouble 
> of testing for stuff.
> - ASMALIGN's arg is ZEROBITS, i.e. num of low bits in addr to make zero. I 
> wanted a general ASMALIGN macro, and 1<< is easier than log2/cntlzw/bsr.
I cannot comment about the .align vs .balign / .p2align stuff (I hope
Michael or someone else will say if it is ok or not), but I tested the
patch on linux/x86 (with gcc 2.95) and I can confirm that the .o files
are identical and the regression tests are ok.

> Oh and I have left the commented-out .baligns in libswscale alone... not 
> sure how being in an external repo complicates things, and, well they are 
> commented out already.
Well, libswscale uses ASMALIGN16 (defined in the mplayer's asmalign.h
file). If I understand well, this should be converted in ASMALIGN(16),
but this would break mplayer...
I'll see if adding a "#define ASMALIGN16 ASMALIGN(16)" somewhere in
ffmpeg's tree fixes the problem.


			Thanks,
				Luca
-- 
_____________________________________________________________________________
Copy this in your signature, if you think it is important:
                               N O    W A R ! ! !





More information about the ffmpeg-devel mailing list