[devel] Avoid some tests while selecting a filter.
The AVG and PAETH filters will never be selected for the first row, so we need not test them.
This commit is contained in:
parent
ee100094e4
commit
ae4af5600d
5
ANNOUNCE
5
ANNOUNCE
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
Libpng 1.4.0beta68 - July 7, 2009
|
Libpng 1.4.0beta68 - July 18, 2009
|
||||||
|
|
||||||
This is not intended to be a public release. It will be replaced
|
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.
|
within a few weeks by a public version or by another test version.
|
||||||
@ -499,7 +499,8 @@ version 1.4.0beta67 [July 6, 2009]
|
|||||||
Added high-level API transform PNG_TRANSFORM_GRAY_TO_RGB.
|
Added high-level API transform PNG_TRANSFORM_GRAY_TO_RGB.
|
||||||
Added an "xcode" project to the projects directory (Alam Arias).
|
Added an "xcode" project to the projects directory (Alam Arias).
|
||||||
|
|
||||||
version 1.4.0beta68 [July 7, 2009]
|
version 1.4.0beta68 [July 18, 2009]
|
||||||
|
Avoid some tests in filter selection in pngwutil.c
|
||||||
|
|
||||||
version 1.4.0betaN [future]
|
version 1.4.0betaN [future]
|
||||||
Build shared libraries with -lz and sometimes -lm.
|
Build shared libraries with -lz and sometimes -lm.
|
||||||
|
3
CHANGES
3
CHANGES
@ -2176,7 +2176,8 @@ version 1.4.0beta67 [July 6, 2009]
|
|||||||
Added high-level API transform PNG_TRANSFORM_GRAY_TO_RGB.
|
Added high-level API transform PNG_TRANSFORM_GRAY_TO_RGB.
|
||||||
Added an "xcode" project to the projects directory (Alam Arias).
|
Added an "xcode" project to the projects directory (Alam Arias).
|
||||||
|
|
||||||
version 1.4.0beta68 [July 7, 2009]
|
version 1.4.0beta68 [July 18, 2009]
|
||||||
|
Avoid some tests in filter selection in pngwutil.c
|
||||||
|
|
||||||
version 1.4.0betaN [future]
|
version 1.4.0betaN [future]
|
||||||
Build shared libraries with -lz and sometimes -lm.
|
Build shared libraries with -lz and sometimes -lm.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngwutil.c - utilities to write a PNG file
|
/* pngwutil.c - utilities to write a PNG file
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.4.0 [July 7, 2009]
|
* Last changed in libpng 1.4.0 [July 18, 2009]
|
||||||
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@ -2130,6 +2130,12 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
|
|||||||
png_uint_32 row_bytes = row_info->rowbytes;
|
png_uint_32 row_bytes = row_info->rowbytes;
|
||||||
#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED)
|
#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED)
|
||||||
int num_p_filters = (int)png_ptr->num_prev_filters;
|
int num_p_filters = (int)png_ptr->num_prev_filters;
|
||||||
|
#else
|
||||||
|
if (png_ptr->row_number == 0)
|
||||||
|
{
|
||||||
|
/* These will never be selected so we need not test them. */
|
||||||
|
filter_to_do &= ~(PNG_FILTER_UP | PNG_FILTER_PAETH);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
png_debug(1, "in png_write_find_filter");
|
png_debug(1, "in png_write_find_filter");
|
||||||
|
Loading…
Reference in New Issue
Block a user