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

John Dalgliesh johnd
Fri Aug 11 14:51:22 CEST 2006

Hi Luca,

On Fri, 11 Aug 2006, Luca Abeni wrote:
> Hi John,
> On Fri, 2006-08-11 at 16:00 +1000, John Dalgliesh wrote:
>> - 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.

Cool, thanks.

>> 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...

Actually it should be converted to ASMALIGN(4) (assuming it came from 
.balign 16), check out my note quoted above for why.

> I'll see if adding a "#define ASMALIGN16 ASMALIGN(16)" somewhere in
> ffmpeg's tree fixes the problem.

Hmm, so how does this code compile right now? I can't find the definition 
anywhere after a normal ffmpeg svn update. And 'make' doesn't work so 
maybe I answered my own question: it depends on mplayer still.

In any case I can see that '#define ASMALIGN16 ASMALIGN(4)' is never going 
to get committed, so let's wait and see what a super-maintainer has to say 
about the ffmpeg-specific patch first. (Maybe he will prefer option 2 :). 
If it's just for your own testing then that define would be fine of 

As for breaking MPlayer, if my patch gets committed then the configure 
part should be copied to MPlayer's configure and its existing ASMALIGN16s 
switched over at leisure. (On the presumption that this is a better 
approach... since {acceptable to ffmpeg} subset of {acceptable to MPlayer} 
it seems).

> 			Thanks,
> 				Luca

Thank you for your attention to this patch!


More information about the ffmpeg-devel mailing list