提交 6cf32b46 编写于 作者: J John Bowler 提交者: Glenn Randers-Pehrson

[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.
上级 f758d6c8
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
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)
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)
that causes the MALLOC_MAX limit not to work (John Bowler)
Change png_warning() to png_app_error() in pngwrite.c and comment the
......
......@@ -4304,7 +4304,8 @@ Version 1.6.0beta32 [November 25, 2012]
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.
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)
that causes the MALLOC_MAX limit not to work (John Bowler)
Change png_warning() to png_app_error() in pngwrite.c and comment the
......
/* 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.
* Last changed in libpng 1.5.14 [(PENDING RELEASE)]
*
* This code is released under the libpng license.
* 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;
#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;
if (bpp == 3)
......
......@@ -3,6 +3,7 @@
*
* Copyright (c) 2011 Glenn Randers-Pehrson
* Written by Mans Rullgard, 2011.
* Last changed in libpng 1.5.7 [December 15, 2011]
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
......
......@@ -3865,6 +3865,14 @@ png_read_filter_row_paeth_multibyte_pixel(png_row_infop row_info, png_bytep row,
static void
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;
......@@ -3895,6 +3903,10 @@ void /* PRIVATE */
png_read_filter_row(png_structrp pp, png_row_infop row_info, png_bytep row,
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)
png_init_filter_functions(pp);
if (filter > PNG_FILTER_VALUE_NONE && filter < PNG_FILTER_VALUE_LAST)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册