mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] Rearranged the ARM-NEON optimizations: Isolated the machine specific
code to the hardware subdirectory and added comments to pngrutil.c so that implementors of other optimizations know what to do.
This commit is contained in:
parent
f758d6c813
commit
6cf32b460f
4
ANNOUNCE
4
ANNOUNCE
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
Libpng 1.6.0beta33 - December 13, 2012
|
Libpng 1.6.0beta33 - December 15, 2012
|
||||||
|
|
||||||
This is not intended to be a public release. It will be replaced
|
This is not intended to be a public release. It will be replaced
|
||||||
within a few weeks by a public version or by another test version.
|
within a few weeks by a public version or by another test version.
|
||||||
@ -552,7 +552,7 @@ Version 1.6.0beta32 [November 25, 2012]
|
|||||||
Fixed error checking in the simplified write API (Olaf van der Spek)
|
Fixed error checking in the simplified write API (Olaf van der Spek)
|
||||||
Made png_user_version_check() ok to use with libpng version 1.10.x and later.
|
Made png_user_version_check() ok to use with libpng version 1.10.x and later.
|
||||||
|
|
||||||
Version 1.6.0beta33 [December 13, 2012]
|
Version 1.6.0beta33 [December 15, 2012]
|
||||||
Fixed typo in png.c (PNG_SET_CHUNK_MALLOC_MAX should be PNG_CHUNK_MALLOC_MAX)
|
Fixed typo in png.c (PNG_SET_CHUNK_MALLOC_MAX should be PNG_CHUNK_MALLOC_MAX)
|
||||||
that causes the MALLOC_MAX limit not to work (John Bowler)
|
that causes the MALLOC_MAX limit not to work (John Bowler)
|
||||||
Change png_warning() to png_app_error() in pngwrite.c and comment the
|
Change png_warning() to png_app_error() in pngwrite.c and comment the
|
||||||
|
|||||||
3
CHANGES
3
CHANGES
@ -4304,7 +4304,8 @@ Version 1.6.0beta32 [November 25, 2012]
|
|||||||
Fixed error checking in the simplified write API (Olaf van der Spek)
|
Fixed error checking in the simplified write API (Olaf van der Spek)
|
||||||
Made png_user_version_check() ok to use with libpng version 1.10.x and later.
|
Made png_user_version_check() ok to use with libpng version 1.10.x and later.
|
||||||
|
|
||||||
Version 1.6.0beta33 [December 13, 2012]
|
Fixed cases of unquoted DESTDIR in Makefile.am
|
||||||
|
Version 1.6.0beta33 [December 15, 2012]
|
||||||
Fixed typo in png.c (PNG_SET_CHUNK_MALLOC_MAX should be PNG_CHUNK_MALLOC_MAX)
|
Fixed typo in png.c (PNG_SET_CHUNK_MALLOC_MAX should be PNG_CHUNK_MALLOC_MAX)
|
||||||
that causes the MALLOC_MAX limit not to work (John Bowler)
|
that causes the MALLOC_MAX limit not to work (John Bowler)
|
||||||
Change png_warning() to png_app_error() in pngwrite.c and comment the
|
Change png_warning() to png_app_error() in pngwrite.c and comment the
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
|
|
||||||
/* filter_neon.S - NEON optimised filter functions
|
/* arm_init.c - NEON optimised filter functions
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011 Glenn Randers-Pehrson
|
* Copyright (c) 2012 Glenn Randers-Pehrson
|
||||||
* Written by Mans Rullgard, 2011.
|
* Written by Mans Rullgard, 2011.
|
||||||
|
* Last changed in libpng 1.5.14 [(PENDING RELEASE)]
|
||||||
*
|
*
|
||||||
* This code is released under the libpng license.
|
* This code is released under the libpng license.
|
||||||
* For conditions of distribution and use, see the disclaimer
|
* For conditions of distribution and use, see the disclaimer
|
||||||
@ -50,6 +51,17 @@ png_init_filter_functions_neon(png_structp pp, unsigned int bpp)
|
|||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* IMPORTANT: any new external functions used here must be declared using
|
||||||
|
* PNG_INTERNAL_FUNCTION in ../pngpriv.h. This is required so that the
|
||||||
|
* 'prefix' option to configure works:
|
||||||
|
*
|
||||||
|
* ./configure --with-libpng-prefix=foobar_
|
||||||
|
*
|
||||||
|
* Verify you have got this right by running the above command, doing a build
|
||||||
|
* and examining pngprefix.h; it must contain a #define for every external
|
||||||
|
* function you add. (Notice that this happens automatically for the
|
||||||
|
* initialization function.)
|
||||||
|
*/
|
||||||
pp->read_filter[PNG_FILTER_VALUE_UP-1] = png_read_filter_row_up_neon;
|
pp->read_filter[PNG_FILTER_VALUE_UP-1] = png_read_filter_row_up_neon;
|
||||||
|
|
||||||
if (bpp == 3)
|
if (bpp == 3)
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2011 Glenn Randers-Pehrson
|
* Copyright (c) 2011 Glenn Randers-Pehrson
|
||||||
* Written by Mans Rullgard, 2011.
|
* Written by Mans Rullgard, 2011.
|
||||||
|
* Last changed in libpng 1.5.7 [December 15, 2011]
|
||||||
*
|
*
|
||||||
* This code is released under the libpng license.
|
* This code is released under the libpng license.
|
||||||
* For conditions of distribution and use, see the disclaimer
|
* For conditions of distribution and use, see the disclaimer
|
||||||
|
|||||||
12
pngrutil.c
12
pngrutil.c
@ -3865,6 +3865,14 @@ png_read_filter_row_paeth_multibyte_pixel(png_row_infop row_info, png_bytep row,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
png_init_filter_functions(png_structrp pp)
|
png_init_filter_functions(png_structrp pp)
|
||||||
|
/* This function is called once for every PNG image to set the
|
||||||
|
* implementations required to reverse the filtering of PNG rows. Reversing
|
||||||
|
* the filter is the first transformation performed on the row data. It is
|
||||||
|
* performed in place, therefore an implementation can be selected based on
|
||||||
|
* the image pixel format. If the implementation depends on image width then
|
||||||
|
* take care to ensure that it works corretly if the image is interlaced -
|
||||||
|
* interlacing causes the actual row width to vary.
|
||||||
|
*/
|
||||||
{
|
{
|
||||||
unsigned int bpp = (pp->pixel_depth + 7) >> 3;
|
unsigned int bpp = (pp->pixel_depth + 7) >> 3;
|
||||||
|
|
||||||
@ -3895,6 +3903,10 @@ void /* PRIVATE */
|
|||||||
png_read_filter_row(png_structrp pp, png_row_infop row_info, png_bytep row,
|
png_read_filter_row(png_structrp pp, png_row_infop row_info, png_bytep row,
|
||||||
png_const_bytep prev_row, int filter)
|
png_const_bytep prev_row, int filter)
|
||||||
{
|
{
|
||||||
|
/* OPTIMIZATION: DO NOT MODIFY THIS FUNCTION, instead #define
|
||||||
|
* PNG_FILTER_OPTIMIZATIONS to a function that overrides the generic
|
||||||
|
* implementations. See png_init_filter_functions above.
|
||||||
|
*/
|
||||||
if (pp->read_filter[0] == NULL)
|
if (pp->read_filter[0] == NULL)
|
||||||
png_init_filter_functions(pp);
|
png_init_filter_functions(pp);
|
||||||
if (filter > PNG_FILTER_VALUE_NONE && filter < PNG_FILTER_VALUE_LAST)
|
if (filter > PNG_FILTER_VALUE_NONE && filter < PNG_FILTER_VALUE_LAST)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user