[libpng16] Revised pngvalid to generate size images with as many filters as
it can manage, limited by the number of rows.
This commit is contained in:
parent
681b731151
commit
9e9977e153
6
ANNOUNCE
6
ANNOUNCE
@ -1,5 +1,5 @@
|
||||
|
||||
Libpng 1.6.7beta03 - October 14, 2013
|
||||
Libpng 1.6.7beta03 - October 17, 2013
|
||||
|
||||
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.
|
||||
@ -72,10 +72,12 @@ Version 1.6.7beta02 [October 12, 2013]
|
||||
Make autogen.sh work with automake 1.13 as well as 1.14. Do this by always
|
||||
removing the 1.14 'compile' script but never checking for it.
|
||||
|
||||
Version 1.6.7beta03 [October 14, 2013]
|
||||
Version 1.6.7beta03 [October 17, 2013]
|
||||
Added ARMv8 support (James Yu <james.yu at linaro.org>). Added file
|
||||
arm/filter_neon_intrinsics.c; enable with configuration flag
|
||||
PNG_ARM_NEON_INTRINSICS.
|
||||
Revised pngvalid to generate size images with as many filters as it can
|
||||
manage, limited by the number of rows.
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
|
4
CHANGES
4
CHANGES
@ -4686,10 +4686,12 @@ Version 1.6.7beta02 [October 12, 2013]
|
||||
Make autogen.sh work with automake 1.13 as well as 1.14. Do this by always
|
||||
removing the 1.14 'compile' script but never checking for it.
|
||||
|
||||
Version 1.6.7beta03 [October 14, 2013]
|
||||
Version 1.6.7beta03 [October 17, 2013]
|
||||
Added ARMv8 support (James Yu <james.yu at linaro.org>). Added file
|
||||
arm/filter_neon_intrinsics.c; enable with configuration flag
|
||||
PNG_ARM_NEON_INTRINSICS.
|
||||
Revised pngvalid to generate size images with as many filters as it can
|
||||
manage, limited by the number of rows.
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
|
@ -324,3 +324,8 @@ uninstall-hook:
|
||||
rm -f '$(DESTDIR)$(libdir)/libpng.sl'
|
||||
rm -f '$(DESTDIR)$(libdir)/libpng.dylib'
|
||||
rm -f '$(DESTDIR)$(libdir)/libpng.dll.a'
|
||||
|
||||
# The following addition ensures that 'make all' always builds the test programs
|
||||
# too. It used to, but some change either in libpng or configure stopped this
|
||||
# working.
|
||||
all-am: $(check_PROGRAMS)
|
||||
|
@ -2945,6 +2945,12 @@ sbit_modification_init(sbit_modification *me, png_modifier *pm, png_byte sbit)
|
||||
* height of 16 rows. The width and height are stored in the FILEID and, being
|
||||
* non-zero, indicate a size file.
|
||||
*
|
||||
* Because the PNG filter code is typically the largest CPU consumer within
|
||||
* libpng itself there is a tendency to attempt to optimize it. This results in
|
||||
* special case code which needs to be validated. To cause this to happen the
|
||||
* 'size' images are made to use each possible filter, in so far as this is
|
||||
* possible for smaller images.
|
||||
*
|
||||
* For palette image (colour type 3) multiple transform images are stored with
|
||||
* the same bit depth to allow testing of more colour combinations -
|
||||
* particularly important for testing the gamma code because libpng uses a
|
||||
@ -3660,6 +3666,7 @@ make_size_image(png_store* PNG_CONST ps, png_byte PNG_CONST colour_type,
|
||||
int npasses = npasses_from_interlace_type(pp, interlace_type);
|
||||
png_uint_32 y;
|
||||
int pass;
|
||||
int nfilter = PNG_FILTER_VALUE_LAST;
|
||||
png_byte image[16][SIZE_ROWMAX];
|
||||
|
||||
/* To help consistent error detection make the parts of this buffer
|
||||
@ -3713,7 +3720,22 @@ make_size_image(png_store* PNG_CONST ps, png_byte PNG_CONST colour_type,
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Only get to here if the row has some pixels in it. */
|
||||
/* Only get to here if the row has some pixels in it, set the
|
||||
* filters to 'all' for the very first row and thereafter to a
|
||||
* single filter. It isn't well documented, but png_set_filter
|
||||
* does accept a filter number (per the spec) as well as a bit
|
||||
* mask.
|
||||
*
|
||||
* The apparent wackiness of decrementing nfilter rather than
|
||||
* incrementing is so that Paeth gets used in all images bigger
|
||||
* than 1 row - it's the tricky one.
|
||||
*/
|
||||
png_set_filter(pp, 0/*method*/,
|
||||
nfilter >= PNG_FILTER_VALUE_LAST ? PNG_ALL_FILTERS : nfilter);
|
||||
|
||||
if (nfilter-- == 0)
|
||||
nfilter = PNG_FILTER_VALUE_LAST-1;
|
||||
|
||||
png_write_row(pp, row);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user