[MPlayer-dev-eng] [RFC] rc2

Zuxy Meng zuxy.meng at gmail.com
Mon Apr 9 03:26:44 CEST 2007


2007/4/9, Arpi <arpi at thot.banki.hu>:
> 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 :(

FFmpeg uses its own routine to detect CPU capabilities at runtime so
SSE can't be completely disabled unless something is also done from
ffmpeg's side.
Beauty is truth,
While truth is beauty.
PGP KeyID: E8555ED6

More information about the MPlayer-dev-eng mailing list