mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[devel] Revised the new test
to run faster in the usual PNG_ALL_FILTERS case. The previous, more accurate test, would save some computation in uncommon cases, but is probably not worth while in the long run.
This commit is contained in:
parent
9d8b41ea6f
commit
4ace0e1530
@ -2135,9 +2135,7 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
|
|||||||
png_debug(1, "in png_write_find_filter");
|
png_debug(1, "in png_write_find_filter");
|
||||||
|
|
||||||
#ifndef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
|
#ifndef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
|
||||||
if ((png_ptr->row_number == 0) &&
|
if (png_ptr->row_number == 0 && filter_to_do == PNG_ALL_FILTERS)
|
||||||
(filter_to_do & PNG_FILTER_NONE) &&
|
|
||||||
(filter_to_do & PNG_FILTER_SUB))
|
|
||||||
{
|
{
|
||||||
/* These will never be selected so we need not test them. */
|
/* These will never be selected so we need not test them. */
|
||||||
filter_to_do &= ~(PNG_FILTER_UP | PNG_FILTER_PAETH);
|
filter_to_do &= ~(PNG_FILTER_UP | PNG_FILTER_PAETH);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user