[libpng16] Eliminate PNG_NO_INTEL_SSE_3BPP from intel INSTALL

This commit is contained in:
Glenn Randers-Pehrson
2016-04-05 12:33:17 -05:00
parent f47e1d4995
commit 5765a22249
2 changed files with 7 additions and 15 deletions

View File

@@ -1,7 +1,9 @@
Enabling SSE support
Copyright (c) 2016 Google, Inc.
Written by Mike Klein and Matt Sarett
Written by Mike Klein, Matt Sarett
This INSTALL file written by Glenn Randers-Pehrson, 2016.
If you have moved intel_init.c and filter_sse2_intrinsics.c to a different
directory, be sure to update the '#include "../../pngpriv.h"' line in both
@@ -24,26 +26,24 @@ distribution, remove any existing pre-built configure scripts:
make maintainer-clean
./autogen.sh --maintainer --clean
Finally, configure libpng with -DPNG_INTEL_SSE in CPPFLAGS. If you only
want to optimize reading 4bpp images, also use -DPNG_NO_INTEL_SSE_3BPP:
Finally, configure libpng with -DPNG_INTEL_SSE in CPPFLAGS:
./autogen.sh --maintainer
CPPFLAGS="-DPNG_INTEL_SSE -DPNG_NO_INTEL_SSE_3BPP" ./configure [options]
CPPFLAGS="-DPNG_INTEL_SSE" ./configure [options]
make
II. Using a custom makefile:
If you are using a custom makefile makefile, you will have to update it
manually to include contrib/intel/*.o in the dependencies, and to define
PNG_INTEL_SSE and possibly PNG_NO_INTEL_SSE_3BPP.
PNG_INTEL_SSE.
III. Using manually updated "configure" scripts:
If you prefer, manually edit configure.ac and Makefile.am, following the
instructions below, then follow the instructions in section II of INSTALL
in the main libpng directory, then configure libpng with -DPNG_INTEL_SSE
in CPPFLAGS. If you only want to optimize reading 4bpp images, also use
-DPNG_NO_INTEL_SSE_3BPP.
in CPPFLAGS.
1. Insert the following lines above the copyright line near the top of
configure.ac:

View File

@@ -37,7 +37,6 @@ static void store4(void* p, __m128i v) {
*(int*)p = _mm_cvtsi128_si32(v);
}
#ifndef PNG_NO_INTEL_SSE_3BPP
static __m128i load3(const void* p) {
/* We'll load 2 bytes, then 1 byte,
* then mask them together, and finally load into SSE.
@@ -62,9 +61,7 @@ static void store3(void* p, __m128i v) {
*p01 = v012;
*p2 = v012 >> 16;
}
#endif
#ifndef PNG_NO_INTEL_SSE_3BPP
void png_read_filter_row_sub3_sse2(png_row_infop row_info, png_bytep row,
png_const_bytep prev)
{
@@ -93,7 +90,6 @@ void png_read_filter_row_sub3_sse2(png_row_infop row_info, png_bytep row,
rb -= 3;
}
}
#endif
void png_read_filter_row_sub4_sse2(png_row_infop row_info, png_bytep row,
png_const_bytep prev)
@@ -116,7 +112,6 @@ void png_read_filter_row_sub4_sse2(png_row_infop row_info, png_bytep row,
}
}
#ifndef PNG_NO_INTEL_SSE_3BPP
void png_read_filter_row_avg3_sse2(png_row_infop row_info, png_bytep row,
png_const_bytep prev)
{
@@ -165,7 +160,6 @@ void png_read_filter_row_avg3_sse2(png_row_infop row_info, png_bytep row,
rb -= 3;
}
}
#endif
void png_read_filter_row_avg4_sse2(png_row_infop row_info, png_bytep row,
png_const_bytep prev)
@@ -228,7 +222,6 @@ static __m128i if_then_else(__m128i c, __m128i t, __m128i e) {
#endif
}
#ifndef PNG_NO_INTEL_SSE_3BPP
void png_read_filter_row_paeth3_sse2(png_row_infop row_info, png_bytep row,
png_const_bytep prev)
{
@@ -322,7 +315,6 @@ void png_read_filter_row_paeth3_sse2(png_row_infop row_info, png_bytep row,
rb -= 3;
}
}
#endif
void png_read_filter_row_paeth4_sse2(png_row_infop row_info, png_bytep row,
png_const_bytep prev)