[FFmpeg-devel] [PATCH] swr: compile mmx2 s16p functions only on x86-32.
michaelni at gmx.at
Sun Jun 15 14:18:24 CEST 2014
On Sat, Jun 14, 2014 at 06:26:16PM -0300, James Almer wrote:
> On 14/06/14 5:34 PM, Ronald S. Bultje wrote:
> > Hi,
> > On Sat, Jun 14, 2014 at 4:15 PM, Michael Niedermayer <michaelni at gmx.at>
> > wrote:
> >> On Sat, Jun 14, 2014 at 02:55:49PM -0400, Ronald S. Bultje wrote:
> >>> ---
> >>> libswresample/x86/resample_x86_dsp.c | 2 ++
> >>> 1 file changed, 2 insertions(+)
> >>> diff --git a/libswresample/x86/resample_x86_dsp.c
> >> b/libswresample/x86/resample_x86_dsp.c
> >>> index 02a7db5..c9b2bef 100644
> >>> --- a/libswresample/x86/resample_x86_dsp.c
> >>> +++ b/libswresample/x86/resample_x86_dsp.c
> >>> @@ -33,9 +33,11 @@
> >>> #include "resample_mmx.h"
> >>> +#if ARCH_X86_32
> >>> #define TEMPLATE_RESAMPLE_S16_MMX2
> >>> #include "libswresample/resample_template.c"
> >>> #undef TEMPLATE_RESAMPLE_S16_MMX2
> >>> +#endif
> >> make distclean ; ./configure && make -j12
> >> produces:
> >> libswresample/x86/resample_x86_dsp.c: In function
> >> ‘swresample_dsp_x86_init’:
> >> libswresample/x86/resample_x86_dsp.c:74:61: error:
> >> ‘resample_common_int16_mmx2’ undeclared (first use in this function)
> >> libswresample/x86/resample_x86_dsp.c:74:61: note: each undeclared
> >> identifier is reported only once for each function it appears in
> >> libswresample/x86/resample_x86_dsp.c:75:61: error:
> >> ‘resample_linear_int16_mmx2’ undeclared (first use in this function)
> >> make: *** [libswresample/x86/resample_x86_dsp.o] Error 1
> > On 64bit? Deadcode elim takes place after compilation I guess... Ohwell
> > it's static so let's just leave the function as-is then... The assignment
> > is already using the proper if.
> > Ronald
> MSVC builds are broken because of this as well. DCE taking place after
> compilation when the relevant version of resample_template.c was not
> included generates undeclared function errors.
> Adding prototypes fixes it. I'll send a patch in a moment.
patch works now
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 181 bytes
Desc: Digital signature
More information about the ffmpeg-devel