Hello,
mplayer-r35150 fails to link on non-sse2 x86 cpu (Athlon-XP):
ffmpeg/libavcodec/libavcodec.a(ac3dsp_init.o): In function
`ff_ac3dsp_init_x86': ac3dsp_init.c:(.text.unlikely+0x6c): undefined
reference to `ff_ac3_exponent_min_sse2' ac3dsp_init.c:(.text.unlikely
+0x88): undefined reference to `ff_ac3_extract_exponents_sse2'
collect2: ld returned 1 exit status
The same stand-alone version of ffmpeg (as fetched by configure
script in mplayer) builds fine.
The problem is in different definition of
HAVE_${INSTRUCTION_SET}_EXTERNAL
flags in ffmpeg and mplayer: ffmpeg defines them unconditionally
(for a whole target architecture), while mplayer defines them
conditionally — only in an appropriate instruction set is present in
the target cpu.
For the issue I encountered libavcodec/x86/ac3dsp.asm contains:
%if HAVE_SSE2_EXTERNAL
INIT_XMM
AC3_EXPONENT_MIN sse2
%endif
This code is compiled by ffmpeg, used during linking, but not during
runtime, because of the following check in ac3dsp_init.c:
if (mm_flags & AV_CPU_FLAG_SSE2 && HAVE_SSE)
As a solution mplayer should mimic ffmpeg's behaviour for defining
HAVE_*_EXTERNAL cpu flags.
Best regards,
Andrew Savchenko