[MPlayer-dev-eng] [RFC] rc2

Arpi arpi at thot.banki.hu
Mon Apr 9 02:23:09 CEST 2007


Hi,

> theres nothing lavc specific here, SSE* code needs aligned data outside
> lavc too
> 
> 
> > (win only? 
> 
> > can it happen with mplayer?)
> 
> if (gcc doesnt maintain alignment || main or another entry point like thread
> stuff is called with missalged stack && gcc doesnt align the stack) && the
> stack is used for something which needs proper alignment
> 
> the gcc behavior depends on version and flags given to it (and no i dont know
> the details RTFgccM )

it was (and probably still is) a problem with mingw32-compiled win32
mplayer binaries. cygwin has no problem, it uses own memory allocator,
but mingw relies on windows' memory functions which has no memalign() :(

there was 2 ideas to solve this, one is using some 3rd-party memory library
when compiling with mingw, the other is changing all the code (mostly in
libavcodec) which needs alignment to do the alignment for itself, like:
  buffer1_base=malloc(buffer1_size+15);
  buffer1=(buffer1_base+15)&(~15);
but it's quite ugly and hackish, and as only win32/mingw needs it nobody
would support it...   the workaround is/was to disable sse in mingw builds :(

A'rpi



More information about the MPlayer-dev-eng mailing list