[libpng16] Fixed cut-and-paste errors in the new intel_sse.patch

and added PNG_NO_INTEL_SSE_3BPP macro.
This commit is contained in:
Glenn Randers-Pehrson 2016-02-22 18:48:10 -06:00
parent 6c3d5bd2a0
commit b4f9f5d041
2 changed files with 12 additions and 11 deletions

View File

@ -32,10 +32,12 @@ png_init_filter_functions_sse2(png_structp pp, unsigned int bpp)
png_debug(1, "in png_init_filter_functions_sse2"); png_debug(1, "in png_init_filter_functions_sse2");
if (bpp == 3) if (bpp == 3)
{ {
#ifndef PNG_NO_INTEL_SSE_3BPP
pp->read_filter[PNG_FILTER_VALUE_SUB-1] = png_read_filter_row_sub3_sse2; pp->read_filter[PNG_FILTER_VALUE_SUB-1] = png_read_filter_row_sub3_sse2;
pp->read_filter[PNG_FILTER_VALUE_AVG-1] = png_read_filter_row_avg3_sse2; pp->read_filter[PNG_FILTER_VALUE_AVG-1] = png_read_filter_row_avg3_sse2;
pp->read_filter[PNG_FILTER_VALUE_PAETH-1] = pp->read_filter[PNG_FILTER_VALUE_PAETH-1] =
png_read_filter_row_paeth3_sse2; png_read_filter_row_paeth3_sse2;
#endif
} }
else if (bpp == 4) else if (bpp == 4)
{ {

View File

@ -1,6 +1,6 @@
diff --git a/configure.ac b/configure.ac diff --git a/configure.ac b/configure.ac
--- a/configure.ac 2016-02-22 14:31:48.000000000 -0600 --- a/configure.ac 2016-02-22 17:24:25.000000000 -0600
+++ b/configure.ac 2016-02-22 14:40:13.665955674 -0600 +++ b/configure.ac 2016-02-22 17:30:36.949159871 -0600
@@ -1,10 +1,13 @@ @@ -1,10 +1,13 @@
# configure.ac # configure.ac
@ -15,8 +15,7 @@ diff --git a/configure.ac b/configure.ac
# and license in png.h # and license in png.h
dnl Process this file with autoconf to produce a configure script. dnl Process this file with autoconf to produce a configure script.
@@ -314,16 +317,50 @@ AC_ARG_ENABLE([arm-neon], @@ -316,16 +319,50 @@ AC_ARG_ENABLE([arm-neon],
# future host CPU does not match 'arm*')
AM_CONDITIONAL([PNG_ARM_NEON], AM_CONDITIONAL([PNG_ARM_NEON],
[test "$enable_arm_neon" != 'no' && [test "$enable_arm_neon" != 'no' &&
@ -24,7 +23,7 @@ diff --git a/configure.ac b/configure.ac
arm*|aarch64*) :;; arm*|aarch64*) :;;
*) test "$enable_arm_neon" != '';; *) test "$enable_arm_neon" != '';;
esac]) esac])
+
+# INTEL +# INTEL
+# ===== +# =====
+# +#
@ -58,17 +57,18 @@ diff --git a/configure.ac b/configure.ac
+ case "$host_cpu" in + case "$host_cpu" in
+ i?86|x86_64) :;; + i?86|x86_64) :;;
+ *) test "$enable_intel_sse" != '';; + *) test "$enable_intel_sse" != '';;
esac]) + esac])
AC_MSG_NOTICE([[Extra options for compiler: $PNG_COPTS]]) AC_MSG_NOTICE([[Extra options for compiler: $PNG_COPTS]])
# Config files, substituting as above # Config files, substituting as above
AC_CONFIG_FILES([Makefile libpng.pc:libpng.pc.in]) AC_CONFIG_FILES([Makefile libpng.pc:libpng.pc.in])
AC_CONFIG_FILES([libpng-config:libpng-config.in], AC_CONFIG_FILES([libpng-config:libpng-config.in],
[chmod +x libpng-config]) [chmod +x libpng-config])
AC_OUTPUT
diff --git a/Makefile.am b/Makefile.am diff --git a/Makefile.am b/Makefile.am
--- a/Makefile.am 2016-02-22 14:31:47.000000000 -0600 --- a/Makefile.am 2016-02-22 17:24:24.000000000 -0600
+++ b/Makefile.am 2016-02-22 14:42:40.380041684 -0600 +++ b/Makefile.am 2016-02-22 17:32:18.387223996 -0600
@@ -1,10 +1,13 @@ @@ -1,10 +1,13 @@
# Makefile.am, the source file for Makefile.in (and hence Makefile), is # Makefile.am, the source file for Makefile.in (and hence Makefile), is
# #
@ -83,7 +83,7 @@ diff --git a/Makefile.am b/Makefile.am
# and license in png.h # and license in png.h
PNGLIB_BASENAME= libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ PNGLIB_BASENAME= libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@
@@ -83,16 +88,21 @@ libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SO @@ -83,16 +86,20 @@ libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SO
pngset.c pngtrans.c pngwio.c pngwrite.c pngwtran.c pngwutil.c\ pngset.c pngtrans.c pngwio.c pngwrite.c pngwtran.c pngwutil.c\
png.h pngconf.h pngdebug.h pnginfo.h pngpriv.h pngstruct.h pngusr.dfa png.h pngconf.h pngdebug.h pnginfo.h pngpriv.h pngstruct.h pngusr.dfa
@ -96,7 +96,6 @@ diff --git a/Makefile.am b/Makefile.am
+libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += contrib/intel/intel_init.c\ +libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += contrib/intel/intel_init.c\
+ contrib/intel/filter_sse2_intrinsics.c + contrib/intel/filter_sse2_intrinsics.c
+endif +endif
+
nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = pnglibconf.h nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = pnglibconf.h
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS = -no-undefined -export-dynamic \ libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS = -no-undefined -export-dynamic \