[MPlayer-dev-eng] [RFC] rc2

Michael Niedermayer michaelni at gmx.at
Mon Apr 9 03:36:43 CEST 2007


Hi

On Mon, Apr 09, 2007 at 09:26:44AM +0800, Zuxy Meng wrote:
> Hi,
> 
> 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.

you should be able to disable via AVCodecContext->dsp_mask though iam not
sure if all SSE code checks that ...

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

1. write clean, simple and working code
2. high level optimizations
3. low level optimizations
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070409/3e16bc68/attachment.pgp>


More information about the MPlayer-dev-eng mailing list