diff options
author | Haibo Huang <hhb@google.com> | 2019-06-10 15:47:49 -0700 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2019-06-10 15:47:49 -0700 |
commit | df3dc85d2ff9d18f15ff7a217a1ed52a3eb7b6bf (patch) | |
tree | 478f3db238be7e08885ac80ac8ef1be9935441bb /contrib/intel/intel_sse.patch | |
parent | 4813fb533a80d139fb8139369cd6c25947d1017d (diff) | |
parent | 54ca51b2ee6da088d5eb1c7ef6430b1c83019977 (diff) |
Merge "Merge tag 'v1.6.37' into HEAD" am: 7794b22253 am: aa0ce810a6 am: 490afb6c02
am: 54ca51b2ee
Change-Id: Ie28ab673ec855738e26ca3ba06a061856ca07045
Diffstat (limited to 'contrib/intel/intel_sse.patch')
-rw-r--r-- | contrib/intel/intel_sse.patch | 190 |
1 files changed, 0 insertions, 190 deletions
diff --git a/contrib/intel/intel_sse.patch b/contrib/intel/intel_sse.patch deleted file mode 100644 index a852538ed..000000000 --- a/contrib/intel/intel_sse.patch +++ /dev/null @@ -1,190 +0,0 @@ -diff --git a/configure.ac b/configure.ac ---- a/configure.ac 2016-08-29 11:46:27.000000000 -0400 -+++ b/configure.ac 2016-08-29 16:57:03.866355018 -0400 -@@ -386,16 +386,51 @@ AC_ARG_ENABLE([mips-msa], - # future host CPU does not match 'mips*') - - AM_CONDITIONAL([PNG_MIPS_MSA], - [test "$enable_mips_msa" != 'no' && - case "$host_cpu" in - mipsel*|mips64el*) :;; - esac]) - -+# INTEL -+# ===== -+# -+# INTEL SSE (SIMD) support. -+ -+AC_ARG_ENABLE([intel-sse], -+ AS_HELP_STRING([[[--enable-intel-sse]]], -+ [Enable Intel SSE optimizations: =no/off, yes/on:] -+ [no/off: disable the optimizations;] -+ [yes/on: enable the optimizations.] -+ [If not specified: determined by the compiler.]), -+ [case "$enableval" in -+ no|off) -+ # disable the default enabling: -+ AC_DEFINE([PNG_INTEL_SSE_OPT], [0], -+ [Disable Intel SSE optimizations]) -+ # Prevent inclusion of the assembler files below: -+ enable_intel_sse=no;; -+ yes|on) -+ AC_DEFINE([PNG_INTEL_SSE_OPT], [1], -+ [Enable Intel SSE optimizations]);; -+ *) -+ AC_MSG_ERROR([--enable-intel-sse=${enable_intel_sse}: invalid value]) -+ esac]) -+ -+# Add Intel specific files to all builds where the host_cpu is Intel ('x86*') -+# or where Intel optimizations were explicitly requested (this allows a -+# fallback if a future host CPU does not match 'x86*') -+AM_CONDITIONAL([PNG_INTEL_SSE], -+ [test "$enable_intel_sse" != 'no' && -+ case "$host_cpu" in -+ i?86|x86_64) :;; -+ *) test "$enable_intel_sse" != '';; -+ esac]) -+ - AC_MSG_NOTICE([[Extra options for compiler: $PNG_COPTS]]) - - # Config files, substituting as above - AC_CONFIG_FILES([Makefile libpng.pc:libpng.pc.in]) - AC_CONFIG_FILES([libpng-config:libpng-config.in], - [chmod +x libpng-config]) - - AC_OUTPUT -diff --git a/Makefile.am b/Makefile.am ---- a/Makefile.am 2016-08-29 11:46:27.000000000 -0400 -+++ b/Makefile.am 2016-08-29 16:57:45.955528215 -0400 -@@ -97,16 +97,21 @@ libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SO - arm/filter_neon.S arm/filter_neon_intrinsics.c - endif - - if PNG_MIPS_MSA - libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += mips/mips_init.c\ - mips/filter_msa_intrinsics.c - endif - -+if PNG_INTEL_SSE -+libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += contrib/intel/intel_init.c\ -+ contrib/intel/filter_sse2_intrinsics.c -+endif -+ - nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = pnglibconf.h - - libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS = -no-undefined -export-dynamic \ - -version-number @PNGLIB_MAJOR@@PNGLIB_MINOR@:@PNGLIB_RELEASE@:0 - - if HAVE_LD_VERSION_SCRIPT - # Versioned symbols and restricted exports - if HAVE_SOLARIS_LD -diff --git a/pngpriv.h b/pngpriv.h ---- debug16/pngpriv.h 2016-08-30 10:46:36.000000000 -0400 -+++ libpng16/pngpriv.h 2016-08-30 11:57:25.672280202 -0400 -@@ -185,16 +185,52 @@ - #ifndef PNG_MIPS_MSA_OPT - # if defined(__mips_msa) && (__mips_isa_rev >= 5) && defined(PNG_ALIGNED_MEMORY_SUPPORTED) - # define PNG_MIPS_MSA_OPT 2 - # else - # define PNG_MIPS_MSA_OPT 0 - # endif - #endif - -+#ifndef PNG_INTEL_SSE_OPT -+# ifdef PNG_INTEL_SSE -+ /* Only check for SSE if the build configuration has been modified to -+ * enable SSE optimizations. This means that these optimizations will -+ * be off by default. See contrib/intel for more details. -+ */ -+# if defined(__SSE4_1__) || defined(__AVX__) || defined(__SSSE3__) || \ -+ defined(__SSE2__) || defined(_M_X64) || defined(_M_AMD64) || \ -+ (defined(_M_IX86_FP) && _M_IX86_FP >= 2) -+# define PNG_INTEL_SSE_OPT 1 -+# endif -+# endif -+#endif -+ -+#if PNG_INTEL_SSE_OPT > 0 -+# ifndef PNG_INTEL_SSE_IMPLEMENTATION -+# if defined(__SSE4_1__) || defined(__AVX__) -+ /* We are not actually using AVX, but checking for AVX is the best -+ way we can detect SSE4.1 and SSSE3 on MSVC. -+ */ -+# define PNG_INTEL_SSE_IMPLEMENTATION 3 -+# elif defined(__SSSE3__) -+# define PNG_INTEL_SSE_IMPLEMENTATION 2 -+# elif defined(__SSE2__) || defined(_M_X64) || defined(_M_AMD64) || \ -+ (defined(_M_IX86_FP) && _M_IX86_FP >= 2) -+# define PNG_INTEL_SSE_IMPLEMENTATION 1 -+# else -+# define PNG_INTEL_SSE_IMPLEMENTATION 0 -+# endif -+# endif -+ -+# if PNG_INTEL_SSE_IMPLEMENTATION > 0 -+# define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_sse2 -+# endif -+#endif -+ - #if PNG_MIPS_MSA_OPT > 0 - # define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_msa - # ifndef PNG_MIPS_MSA_IMPLEMENTATION - # if defined(__mips_msa) - # if defined(__clang__) - # elif defined(__GNUC__) - # if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) - # define PNG_MIPS_MSA_IMPLEMENTATION 2 -@@ -1232,16 +1268,31 @@ PNG_INTERNAL_FUNCTION(void,png_read_filt - PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg4_msa,(png_row_infop - row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); - PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth3_msa,(png_row_infop - row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); - PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth4_msa,(png_row_infop - row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); - #endif - -+#if PNG_INTEL_SSE_IMPLEMENTATION > 0 -+PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub3_sse2,(png_row_infop -+ row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); -+PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub4_sse2,(png_row_infop -+ row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); -+PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg3_sse2,(png_row_infop -+ row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); -+PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg4_sse2,(png_row_infop -+ row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); -+PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth3_sse2,(png_row_infop -+ row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); -+PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth4_sse2,(png_row_infop -+ row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); -+#endif -+ - /* Choose the best filter to use and filter the row data */ - PNG_INTERNAL_FUNCTION(void,png_write_find_filter,(png_structrp png_ptr, - png_row_infop row_info),PNG_EMPTY); - - #ifdef PNG_SEQUENTIAL_READ_SUPPORTED - PNG_INTERNAL_FUNCTION(void,png_read_IDAT_data,(png_structrp png_ptr, - png_bytep output, png_alloc_size_t avail_out),PNG_EMPTY); - /* Read 'avail_out' bytes of data from the IDAT stream. If the output buffer -@@ -1967,16 +2018,21 @@ PNG_INTERNAL_FUNCTION(void, PNG_FILTER_O - PNG_INTERNAL_FUNCTION(void, png_init_filter_functions_neon, - (png_structp png_ptr, unsigned int bpp), PNG_EMPTY); - #endif - - #if PNG_MIPS_MSA_OPT > 0 - PNG_INTERNAL_FUNCTION(void, png_init_filter_functions_msa, - (png_structp png_ptr, unsigned int bpp), PNG_EMPTY); - #endif -+ -+# if PNG_INTEL_SSE_IMPLEMENTATION > 0 -+PNG_INTERNAL_FUNCTION(void, png_init_filter_functions_sse2, -+ (png_structp png_ptr, unsigned int bpp), PNG_EMPTY); -+# endif - #endif - - PNG_INTERNAL_FUNCTION(png_uint_32, png_check_keyword, (png_structrp png_ptr, - png_const_charp key, png_bytep new_key), PNG_EMPTY); - - /* Maintainer: Put new private prototypes here ^ */ - - #include "pngdebug.h" |