[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");
|
||||
|
||||
#ifndef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
|
||||
if ((png_ptr->row_number == 0) &&
|
||||
(filter_to_do & PNG_FILTER_NONE) &&
|
||||
(filter_to_do & PNG_FILTER_SUB))
|
||||
if (png_ptr->row_number == 0 && filter_to_do == PNG_ALL_FILTERS)
|
||||
{
|
||||
/* These will never be selected so we need not test them. */
|
||||
filter_to_do &= ~(PNG_FILTER_UP | PNG_FILTER_PAETH);
|
||||
|
Loading…
Reference in New Issue
Block a user