better/upstreamable x86_msse2.patch

This commit is contained in:
Rex Dieter 2016-05-27 11:42:20 -05:00
parent 19762cbe8a
commit d28712d194
3 changed files with 54 additions and 31 deletions

View File

@ -1,15 +1,51 @@
diff -up webrtc-audio-processing-0.2/configure.ac.x86_sse2 webrtc-audio-processing-0.2/configure.ac
--- webrtc-audio-processing-0.2/configure.ac.x86_sse2 2015-11-04 01:49:34.000000000 -0600
+++ webrtc-audio-processing-0.2/configure.ac 2016-05-16 12:27:16.640796437 -0500
@@ -56,6 +56,11 @@ AS_CASE(["${host}"],
AC_SUBST(PLATFORM_CFLAGS)
diff -up webrtc-audio-processing-0.2/webrtc/common_audio/Makefile.am.x86_msse2 webrtc-audio-processing-0.2/webrtc/common_audio/Makefile.am
--- webrtc-audio-processing-0.2/webrtc/common_audio/Makefile.am.x86_msse2 2015-10-19 01:18:38.000000000 -0500
+++ webrtc-audio-processing-0.2/webrtc/common_audio/Makefile.am 2016-05-27 11:40:19.486145724 -0500
@@ -93,10 +93,17 @@ libcommon_audio_la_SOURCES = resampler/i
window_generator.cc
AS_CASE(["${host_cpu}"],
+ [i?86],
+ [
+ HAVE_X86=1
+ ARCH_CFLAGS="-msse2"
+ ],
[i?86|x86_64],
[
HAVE_X86=1
if HAVE_X86
-libcommon_audio_la_SOURCES += \
+noinst_LTLIBRARIES += libcommon_audio_sse2.la
+libcommon_audio_sse2_la_SOURCES = \
resampler/sinc_resampler_sse.cc \
fir_filter_sse.cc \
fir_filter_sse.h
+
+libcommon_audio_sse2_la_CFLAGS = $(AM_CFLAGS) $(COMMON_CFLAGS) -msse2
+libcommon_audio_sse2_la_CXXFLAGS = $(AM_CXXFLAGS) $(COMMON_CXXFLAGS) -msse2
+libcommon_audio_sse2_la_LDFLAGS = $(AM_LDFLAGS)
+
+libcommon_audio_la_LIBADD = libcommon_audio_sse2.la
endif
if HAVE_ARM
diff -up webrtc-audio-processing-0.2/webrtc/modules/audio_processing/Makefile.am.x86_msse2 webrtc-audio-processing-0.2/webrtc/modules/audio_processing/Makefile.am
--- webrtc-audio-processing-0.2/webrtc/modules/audio_processing/Makefile.am.x86_msse2 2016-05-27 11:40:19.484145715 -0500
+++ webrtc-audio-processing-0.2/webrtc/modules/audio_processing/Makefile.am 2016-05-27 11:40:45.627270507 -0500
@@ -147,9 +147,14 @@ libwebrtc_audio_processing_la_SOURCES +=
endif
if HAVE_X86
-libwebrtc_audio_processing_la_SOURCES += \
+noinst_LTLIBRARIES = libwebrtc_audio_processing_privatearch.la
+LIBWEBRTC_PRIVATEARCH=libwebrtc_audio_processing_privatearch.la
+libwebrtc_audio_processing_privatearch_la_SOURCES = \
aec/aec_core_sse2.c \
aec/aec_rdft_sse2.c
+libwebrtc_audio_processing_privatearch_la_CFLAGS = $(AM_CFLAGS) $(COMMON_CFLAGS) -msse2
+libwebrtc_audio_processing_privatearch_la_CXXFLAGS = $(AM_CXXFLAGS) $(COMMON_CXXFLAGS) -msse2
+libwebrtc_audio_processing_privatearch_la_LDFLAGS = $(AM_LDFLAGS)
endif
if HAVE_NEON
@@ -166,7 +171,8 @@ libwebrtc_audio_processing_la_LIBADD = $
$(top_builddir)/webrtc/base/libbase.la \
$(top_builddir)/webrtc/system_wrappers/libsystem_wrappers.la \
$(top_builddir)/webrtc/common_audio/libcommon_audio.la \
- $(top_builddir)/webrtc/modules/audio_coding/libaudio_coding.la -lpthread
+ $(top_builddir)/webrtc/modules/audio_coding/libaudio_coding.la -lpthread \
+ $(LIBWEBRTC_PRIVATEARCH)
libwebrtc_audio_processing_la_LDFLAGS = $(AM_LDFLAGS) -Wl,--no-undefined -version-info $(LIBWEBRTC_AUDIO_PROCESSING_VERSION_INFO)
# FIXME: The MIPS optimisations need to be hooked up once we have the

View File

@ -1,12 +0,0 @@
diff -up webrtc-audio-processing-0.2/webrtc/common_audio/fir_filter.cc.x86_sse2 webrtc-audio-processing-0.2/webrtc/common_audio/fir_filter.cc
--- webrtc-audio-processing-0.2/webrtc/common_audio/fir_filter.cc.x86_sse2 2015-11-19 06:41:44.000000000 -0600
+++ webrtc-audio-processing-0.2/webrtc/common_audio/fir_filter.cc 2016-05-16 12:31:21.558877588 -0500
@@ -45,7 +45,7 @@ FIRFilter* FIRFilter::Create(const float
FIRFilter* filter = NULL;
// If we know the minimum architecture at compile time, avoid CPU detection.
#if defined(WEBRTC_ARCH_X86_FAMILY)
-#if defined(__SSE2__)
+#if 0 //defined(__SSE2__)
filter =
new FIRFilterSSE2(coefficients, coefficients_length, max_input_length);
#else

View File

@ -1,7 +1,7 @@
Name: webrtc-audio-processing
Version: 0.2
Release: 6%{?dist}
Release: 7%{?dist}
Summary: Library for echo cancellation
License: BSD
@ -11,7 +11,6 @@ Patch0: webrtc-fix-typedefs-on-other-arches.patch
# https://bugs.freedesktop.org/show_bug.cgi?id=96244
Patch1: webrtc-audio-processing-0.2-no_undefined.patch
Patch2: webrtc-audio-processing-0.2-x86_msse2.patch
Patch3: webrtc-audio-processing-0.2-x86_sse2_runtime_detection.patch
# bz#1336466, https://bugs.freedesktop.org/show_bug.cgi?id=95738
Patch4: webrtc-audio-processing-0.2-big-endian.patch
@ -35,9 +34,6 @@ files for developing applications that use %{name}.
%patch0 -p1 -b .typedef
%patch1 -p1 -b .no_undefined
%patch2 -p1 -b .x86_msse2
%ifarch %{ix86}
%patch3 -p1 -b .x86_sse2_runtime_detection
%endif
%patch4 -p1 -b .bigendian
# for patch1/patch2
@ -83,6 +79,9 @@ rm -fv %{buildroot}%{_libdir}/lib*.la
%changelog
* Fri May 27 2016 Rex Dieter <rdieter@fedoraproject.org> - 0.2-7
- better/upstreamable x86_msse2.patch
* Fri May 27 2016 Rex Dieter <rdieter@fedoraproject.org> - 0.2-6
- simpler/upstreamable no_undefined.patch (fdo#96244)