[MPlayer-dev-eng] Compilation problem with fft_sse.c

Guillaume POIRIER poirierg at gmail.com
Sun Aug 12 22:12:45 CEST 2007


Hi,

On 8/9/07, Xuebin Wu <bangbangbear at gmail.com> wrote:
> Hello.
> The recent svn version of MPlayer suffers from a segment fault error when
> initializing audio codec ffcook. I comile MPlayer in Windows, using MinGW.
> My gcc's version is 3.4.2.
>
> After a deep debug, I fould the problem happens in fft_sse.c, in the
> function ff_imdct_calc_sse
>
> void ff_imdct_calc_sse(MDCTContext *s, FFTSample *output,
>                        const FFTSample *input, FFTSample *tmp)
> {
>     long k, n8, n4, n2, n;
>     const uint16_t *revtab = s->fft.revtab;
>     const FFTSample *tcos = s->tcos;
>     const FFTSample *tsin = s->tsin;
>     const FFTSample *in1, *in2;
>     FFTComplex *z = (FFTComplex *)tmp;
> .................
>
> I use objdump to see the compliation result, and I think the above code is
> compliled as the following assemble code:
> 00000140 <_ff_imdct_calc_sse>:
>  140: 55                    push   %ebp
>  141: b8 01 00 00 00        mov    $0x1,%eax
>  146: 57                    push   %edi
>  147: 56                    push   %esi
>  148: 53                    push   %ebx
>  149: 83 ec 2c              sub    $0x2c,%esp
>  14c: 66 0f 6e 64 24 40     movd   0x40(%esp),%xmm4
>  152: 89 44 24 1c           mov    %eax,0x1c(%esp)
>  156: 66 0f 6e 5c 24 48     movd   0x48(%esp),%xmm3
>  15c: 66 0f 6e 44 24 4c     movd   0x4c(%esp),%xmm0
>  162: 66 0f 7e e7           movd   %xmm4,%edi
>
> I think the mmx registers xmms are employed as the pointer rev_tab, tcos and
> other variables. But they are also used in the implementation of fft
> algorithms. and so segment fault happens.
>
> My question is, How to solve this problem? I think it should be a problem of
> GCC...

That's possible. You could probably rule out this possibility by
testing with another compiler version

The same code works well here both on Linux and OSX

Guillaume
-- 
A soldier will fight long and hard for a bit of colored ribbon.
 -- Napoleon Bonaparte



More information about the MPlayer-dev-eng mailing list