diff --git a/config/external/lgpllibs/lgpllibs.def b/config/external/lgpllibs/lgpllibs.def new file mode 100644 index 000000000000..359d97e714eb --- /dev/null +++ b/config/external/lgpllibs/lgpllibs.def @@ -0,0 +1,10 @@ +; This Source Code Form is subject to the terms of the Mozilla Public +; License, v. 2.0. If a copy of the MPL was not distributed with this +; file, You can obtain one at http://mozilla.org/MPL/2.0/. + +LIBRARY lgpllibs.dll + +EXPORTS + av_rdft_init + av_rdft_calc + av_rdft_end diff --git a/config/external/lgpllibs/moz.build b/config/external/lgpllibs/moz.build index b1cc9420fbe8..9812b79c36e2 100644 --- a/config/external/lgpllibs/moz.build +++ b/config/external/lgpllibs/moz.build @@ -12,3 +12,7 @@ SharedLibrary('lgpllibs') SHARED_LIBRARY_NAME = 'lgpllibs' + +if CONFIG['MOZ_LIBAV_FFT']: + DIRS += ['/media/libav'] + DEFFILE = SRCDIR + '/lgpllibs.def' diff --git a/config/system-headers b/config/system-headers index 8e73df2f6ff3..bee35daf39a8 100644 --- a/config/system-headers +++ b/config/system-headers @@ -1258,6 +1258,9 @@ X11/Xutil.h zmouse.h soundtouch/SoundTouch.h soundtouch/SoundTouchFactory.h +#if MOZ_LIBAV_FFT==1 +libavcodec/avfft.h +#endif #if MOZ_NATIVE_PNG==1 png.h #endif diff --git a/configure.in b/configure.in index bd5da05aa3b2..886d35e934a2 100644 --- a/configure.in +++ b/configure.in @@ -6274,6 +6274,74 @@ elif test -n "$MOZ_LIBJPEG_TURBO"; then AC_MSG_WARN([No assembler or assembly support for libjpeg-turbo. Using unoptimized C routines.]) fi +dnl ======================================================== +dnl = libav-fft configuration +dnl ======================================================== + +MOZ_LIBAV_FFT= + +dnl Turn on libav-fft for 32-bit windows, and all 64-bit supported platforms. +dnl 32-bit linux/os x have text relocation issues. + +case "$OS_ARCH:$CPU_ARCH" in + Windows:x86) + MOZ_LIBAV_FFT=1 + ;; + *:x86_64) + MOZ_LIBAV_FFT=1 + ;; +esac + +dnl Detect if we can use yasm to compile libav's assembly + +if test -n "$MOZ_LIBAV_FFT"; then + AC_DEFINE(MOZ_LIBAV_FFT) + dnl Do we support libav-fft on this platform? + case "$OS_ARCH:$CPU_ARCH" in + Darwin:x86_64) + LIBAV_FFT_ASFLAGS="-f macho64 -rnasm -pnasm -D__x86_64__ -DPIC -DMACHO" + ;; + WINNT:x86) + LIBAV_FFT_ASFLAGS="-f win32 -rnasm -pnasm -DPIC -DWIN32" + ;; + WINNT:x86_64) + LIBAV_FFT_ASFLAGS="-f win64 -rnasm -pnasm -D__x86_64__ -DPIC -DWIN64 -DMSVC" + ;; + *:x86_64) + if $CC -E -dM -