[Mplayer-cvslog] CVS: main/liba52 parse.c,1.5,1.6

Dominik 'Rathann' Mierzejewski dominik at rangers.eu.org
Thu Apr 1 14:14:43 CEST 2004


On Thursday, 01 April 2004 at 14:10, Arpi wrote:
> Hi,
> 
> > > +#if defined(__MINGW32__) && defined(HAVE_SSE) 
> > > +    for(i=0;i<10;i++){
> > > +      if((int)samples%16){
> > > +        sample_t* samplestmp=malloc(256 * 12 * sizeof (sample_t));   
> > > +        free(samples);
> > > +        samples = samplestmp;    
> > > +      }
> > > +      else break;
> > > +    }
> 
> uhh, this is fuckin ugly hack

Definitely.

> > > +    if((int)samples%16){
> > > +      printf("unable to get 16 bit aligned memory => expect crashes
> > when using SSE instructions\n");
> > > +    }
> > > +#endif
> 
> and this is unacceptable
> at least disable sse support in this case, insteda of expecting crash
> 
> > memalign(2,...) doesn't work? Because that's what you should use to get 16
> > _bit_ (==2 byte) aligned memory. Besides, according to the manpage:
> > 
> > "GNU libc malloc() always returns 8-byte aligned memory addresses, so
> > these routines are only needed if you require larger alignment values."
> 
> it's for win32/mingw stuff, where no glibc nor memalign() at all.

Right. I haven't noticed that both MINGW and SSE have to be defined
for that code to be compiled.

Perhaps someone should port memalign to MinGW? ;)

PS. I thought you don't read MPlayer lists anymore?

-- 
"The third principle of sentient life is its capacity for self-sacrifice.
 For a cause, a loved one, for a friend."
        -- Delenn to Draal in Babylon 5:"A Voice in the Wilderness #2"




More information about the MPlayer-cvslog mailing list