[libpng16] Added PNG_FAST_FILTERS macro (defined as

PNG_FILTER_NONE|PNG_FILTER_SUB|PNG_FILTER_UP).
This commit is contained in:
Glenn Randers-Pehrson 2016-04-11 08:23:16 -05:00
parent daf2169797
commit fa551df95e
5 changed files with 48 additions and 28 deletions

View File

@ -1,4 +1,4 @@
Libpng 1.6.22beta05 - April 5, 2016
Libpng 1.6.22beta05 - April 11, 2016
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.
@ -83,7 +83,9 @@ Version 1.6.22beta04 [April 5, 2016]
memcpy-free implementations of load3() / store3().
call load3() only when needed at the end of a scanline.
Version 1.6.22beta05 [April 5, 2016]
Version 1.6.22beta05 [April 11, 2016]
Added PNG_FAST_FILTERS macro (defined as
PNG_FILTER_NONE|PNG_FILTER_SUB|PNG_FILTER_UP).
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

View File

@ -5543,7 +5543,9 @@ Version 1.6.22beta04 [April 5, 2016]
memcpy-free implementations of load3() / store3().
call load3() only when needed at the end of a scanline.
Version 1.6.22beta05 [April 5, 2016]
Version 1.6.22beta05 [April 11, 2016]
Added PNG_FAST_FILTERS macro (defined as
PNG_FILTER_NONE|PNG_FILTER_SUB|PNG_FILTER_UP).
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

View File

@ -1,6 +1,6 @@
libpng-manual.txt - A description on how to use and modify libpng
libpng version 1.6.22beta05 - April 5, 2016
libpng version 1.6.22beta05 - April 11, 2016
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2016 Glenn Randers-Pehrson
@ -11,7 +11,7 @@ libpng-manual.txt - A description on how to use and modify libpng
Based on:
libpng versions 0.97, January 1998, through 1.6.22beta05 - April 5, 2016
libpng versions 0.97, January 1998, through 1.6.22beta05 - April 11, 2016
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2016 Glenn Randers-Pehrson
@ -2842,7 +2842,7 @@ filter types.
PNG_FILTER_UP | PNG_FILTER_VALUE_UP |
PNG_FILTER_AVG | PNG_FILTER_VALUE_AVG |
PNG_FILTER_PAETH | PNG_FILTER_VALUE_PAETH|
PNG_ALL_FILTERS);
PNG_ALL_FILTERS | PNG_FAST_FILTERS);
If an application wants to start and stop using particular filters during
compression, it should start out with all of the filters (to ensure that
@ -4387,8 +4387,9 @@ for any images with bit depths less than 8 bits/pixel.
The 'method' parameter sets the main filtering method, which is
currently only '0' in the PNG 1.2 specification. The 'filters'
parameter sets which filter(s), if any, should be used for each
scanline. Possible values are PNG_ALL_FILTERS and PNG_NO_FILTERS
to turn filtering on and off, respectively.
scanline. Possible values are PNG_ALL_FILTERS, PNG_NO_FILTERS,
or PNG_FAST_FILTERS to turn filtering on and off, or to turn on
just the fast-decoding subset of filters, respectively.
Individual filter types are PNG_FILTER_NONE, PNG_FILTER_SUB,
PNG_FILTER_UP, PNG_FILTER_AVG, PNG_FILTER_PAETH, which can be bitwise
@ -4402,12 +4403,19 @@ means the first row must always be adaptively filtered, because libpng
currently does not allocate the filter buffers until png_write_row()
is called for the first time.)
filters = PNG_FILTER_NONE | PNG_FILTER_SUB
filters = PNG_NO_FILTERS;
filters = PNG_ALL_FILTERS;
filters = PNG_FAST_FILTERS;
or
filters = PNG_FILTER_NONE | PNG_FILTER_SUB |
PNG_FILTER_UP | PNG_FILTER_AVG |
PNG_FILTER_PAETH | PNG_ALL_FILTERS;
PNG_FILTER_PAETH;
png_set_filter(png_ptr, PNG_FILTER_TYPE_BASE,
filters);
The second parameter can also be
PNG_INTRAPIXEL_DIFFERENCING if you are
writing a PNG to be embedded in a MNG

View File

@ -1,4 +1,4 @@
.TH LIBPNG 3 "April 5, 2016"
.TH LIBPNG 3 "April 11, 2016"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.6.22beta05
.SH SYNOPSIS
@ -510,7 +510,7 @@ Following is a copy of the libpng-manual.txt file that accompanies libpng.
.SH LIBPNG.TXT
libpng-manual.txt - A description on how to use and modify libpng
libpng version 1.6.22beta05 - April 5, 2016
libpng version 1.6.22beta05 - April 11, 2016
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2016 Glenn Randers-Pehrson
@ -521,7 +521,7 @@ libpng-manual.txt - A description on how to use and modify libpng
Based on:
libpng versions 0.97, January 1998, through 1.6.22beta05 - April 5, 2016
libpng versions 0.97, January 1998, through 1.6.22beta05 - April 11, 2016
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2016 Glenn Randers-Pehrson
@ -3352,7 +3352,7 @@ filter types.
PNG_FILTER_UP | PNG_FILTER_VALUE_UP |
PNG_FILTER_AVG | PNG_FILTER_VALUE_AVG |
PNG_FILTER_PAETH | PNG_FILTER_VALUE_PAETH|
PNG_ALL_FILTERS);
PNG_ALL_FILTERS | PNG_FAST_FILTERS);
If an application wants to start and stop using particular filters during
compression, it should start out with all of the filters (to ensure that
@ -4897,8 +4897,9 @@ for any images with bit depths less than 8 bits/pixel.
The 'method' parameter sets the main filtering method, which is
currently only '0' in the PNG 1.2 specification. The 'filters'
parameter sets which filter(s), if any, should be used for each
scanline. Possible values are PNG_ALL_FILTERS and PNG_NO_FILTERS
to turn filtering on and off, respectively.
scanline. Possible values are PNG_ALL_FILTERS, PNG_NO_FILTERS,
or PNG_FAST_FILTERS to turn filtering on and off, or to turn on
just the fast-decoding subset of filters, respectively.
Individual filter types are PNG_FILTER_NONE, PNG_FILTER_SUB,
PNG_FILTER_UP, PNG_FILTER_AVG, PNG_FILTER_PAETH, which can be bitwise
@ -4912,12 +4913,19 @@ means the first row must always be adaptively filtered, because libpng
currently does not allocate the filter buffers until png_write_row()
is called for the first time.)
filters = PNG_FILTER_NONE | PNG_FILTER_SUB
filters = PNG_NO_FILTERS;
filters = PNG_ALL_FILTERS;
filters = PNG_FAST_FILTERS;
or
filters = PNG_FILTER_NONE | PNG_FILTER_SUB |
PNG_FILTER_UP | PNG_FILTER_AVG |
PNG_FILTER_PAETH | PNG_ALL_FILTERS;
PNG_FILTER_PAETH;
png_set_filter(png_ptr, PNG_FILTER_TYPE_BASE,
filters);
The second parameter can also be
PNG_INTRAPIXEL_DIFFERENCING if you are
writing a PNG to be embedded in a MNG
@ -6005,7 +6013,7 @@ possible without all of you.
Thanks to Frank J. T. Wojcik for helping with the documentation.
Libpng version 1.6.22beta05 - April 5, 2016:
Libpng version 1.6.22beta05 - April 11, 2016:
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
@ -6030,7 +6038,7 @@ this sentence.
This code is released under the libpng license.
libpng versions 1.0.7, July 1, 2000 through 1.6.22beta05, April 5, 2016 are
libpng versions 1.0.7, July 1, 2000 through 1.6.22beta05, April 11, 2016 are
Copyright (c) 2000-2002, 2004, 2006-2016 Glenn Randers-Pehrson, are
derived from libpng-1.0.6, and are distributed according to the same
disclaimer and license as libpng-1.0.6 with the following individuals
@ -6155,7 +6163,7 @@ files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31).
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
April 5, 2016
April 11, 2016
.\" end of man page

14
png.h
View File

@ -1,7 +1,7 @@
/* png.h - header file for PNG reference library
*
* libpng version 1.6.22beta05, April 5, 2016
* libpng version 1.6.22beta05, April 11, 2016
*
* Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@ -12,7 +12,7 @@
* Authors and maintainers:
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
* libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger
* libpng versions 0.97, January 1998, through 1.6.22beta05, April 5, 2016:
* libpng versions 0.97, January 1998, through 1.6.22beta05, April 11, 2016:
* Glenn Randers-Pehrson.
* See also "Contributing Authors", below.
*/
@ -29,7 +29,7 @@
* files that are distributed with libpng have other copyright owners and
* are released under other open source licenses.
*
* libpng versions 1.0.7, July 1, 2000 through 1.6.22beta05, April 5, 2016 are
* libpng versions 1.0.7, July 1, 2000 through 1.6.22beta05, April 11, 2016 are
* Copyright (c) 2000-2002, 2004, 2006-2016 Glenn Randers-Pehrson, are
* derived from libpng-1.0.6, and are distributed according to the same
* disclaimer and license as libpng-1.0.6 with the following individuals
@ -245,7 +245,7 @@
* Y2K compliance in libpng:
* =========================
*
* April 5, 2016
* April 11, 2016
*
* Since the PNG Development group is an ad-hoc body, we can't make
* an official declaration.
@ -315,7 +315,7 @@
/* Version information for png.h - this should match the version in png.c */
#define PNG_LIBPNG_VER_STRING "1.6.22beta05"
#define PNG_HEADER_VERSION_STRING \
" libpng version 1.6.22beta05 - April 5, 2016\n"
" libpng version 1.6.22beta05 - April 11, 2016\n"
#define PNG_LIBPNG_VER_SONUM 16
#define PNG_LIBPNG_VER_DLLNUM 16
@ -1502,8 +1502,8 @@ PNG_EXPORT(67, void, png_set_filter, (png_structrp png_ptr, int method,
#define PNG_FILTER_UP 0x20
#define PNG_FILTER_AVG 0x40
#define PNG_FILTER_PAETH 0x80
#define PNG_ALL_FILTERS (PNG_FILTER_NONE | PNG_FILTER_SUB | PNG_FILTER_UP | \
PNG_FILTER_AVG | PNG_FILTER_PAETH)
#define PNG_FAST_FILTERS (PNG_FILTER_NONE | PNG_FILTER_SUB | PNG_FILTER_UP)
#define PNG_ALL_FILTERS (PNG_FAST_FILTERS | PNG_FILTER_AVG | PNG_FILTER_PAETH)
/* Filter values (not flags) - used in pngwrite.c, pngwutil.c for now.
* These defines should NOT be changed.