[devel] Improve "pngvalid --speed" to exclude more of pngvalid from the time.

This commit is contained in:
John Bowler 2011-05-11 23:02:28 -05:00 committed by Glenn Randers-Pehrson
parent d83530f45d
commit ed4d32baa4
3 changed files with 12 additions and 10 deletions

View File

@ -1,5 +1,5 @@
Libpng 1.5.3beta08 - May 11, 2011
Libpng 1.5.3beta08 - May 12, 2011
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.
@ -112,7 +112,8 @@ Version 1.5.3beta07 [May 11, 2011]
Check for up->location !PNG_AFTER_IDAT when writing unknown chunks
before IDAT.
Version 1.5.3beta08 [May 11, 2011]
Version 1.5.3beta08 [May 12, 2011]
Improve "pngvalid --speed" to exclude more of pngvalid from the time.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net:
(subscription required; visit

View File

@ -3371,7 +3371,8 @@ Version 1.5.3beta07 [May 11, 2011]
Check for up->location !PNG_AFTER_IDAT when writing unknown chunks
before IDAT.
Version 1.5.3beta08 [May 11, 2011]
Version 1.5.3beta08 [May 12, 2011]
Improve "pngvalid --speed" to exclude more of pngvalid from the time.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

View File

@ -6110,7 +6110,6 @@ gamma_image_validate(gamma_display *dp, png_structp pp, png_infop pi,
png_const_bytep pRow)
{
/* Get some constants derived from the input and output file formats: */
PNG_CONST int speed = dp->speed;
PNG_CONST png_byte in_ct = dp->this.colour_type;
PNG_CONST png_byte in_bd = dp->this.bit_depth;
PNG_CONST png_uint_32 w = dp->this.w;
@ -6165,9 +6164,8 @@ gamma_image_validate(gamma_display *dp, png_structp pp, png_infop pi,
init_validate_info(&vi, dp, pp, out_bd);
processing = (vi.gamma_correction > 0 && !dp->threshold_test
&& !speed && in_ct != 3) || in_bd != out_bd || in_ct != out_ct ||
vi.do_background;
processing = (vi.gamma_correction > 0 && !dp->threshold_test && in_ct != 3)
|| in_bd != out_bd || in_ct != out_ct || vi.do_background;
for (y=0; y<h; ++y, pRow += cbRow)
{
@ -6229,7 +6227,7 @@ gamma_image_validate(gamma_display *dp, png_structp pp, png_infop pi,
}
}
else if (!speed && memcmp(std, pRow, cbRow) != 0)
else if (memcmp(std, pRow, cbRow) != 0)
{
char msg[64];
@ -6248,7 +6246,8 @@ gamma_end(png_structp pp, png_infop pi)
{
gamma_display *dp = png_get_progressive_ptr(pp);
gamma_image_validate(dp, pp, pi, dp->this.ps->image);
if (!dp->speed)
gamma_image_validate(dp, pp, pi, dp->this.ps->image);
}
/* A single test run checking a gamma transformation.
@ -6319,7 +6318,8 @@ gamma_test(png_modifier *pmIn, PNG_CONST png_byte colour_typeIn,
sequential_row(&d.this, pp, pi, NULL, d.this.ps->image);
gamma_image_validate(&d, pp, pi, d.this.ps->image);
if (!d.speed)
gamma_image_validate(&d, pp, pi, d.this.ps->image);
}
modifier_reset(d.pm);