提交 4ace0e15 编写于 作者: G Glenn Randers-Pehrson

[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.
上级 9d8b41ea
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册