From ed4d32baa451c4e7f15f6b55d8e885083d4d85f5 Mon Sep 17 00:00:00 2001 From: John Bowler Date: Wed, 11 May 2011 23:02:28 -0500 Subject: [PATCH] [devel] Improve "pngvalid --speed" to exclude more of pngvalid from the time. --- ANNOUNCE | 5 +++-- CHANGES | 3 ++- pngvalid.c | 14 +++++++------- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index 0d573c53c..083ea2472 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -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 diff --git a/CHANGES b/CHANGES index 77625c766..57a2c8c69 100644 --- a/CHANGES +++ b/CHANGES @@ -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 diff --git a/pngvalid.c b/pngvalid.c index 75719f5bc..c365953a2 100644 --- a/pngvalid.c +++ b/pngvalid.c @@ -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; ythis.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);