diff --git a/pngstruct.h b/pngstruct.h index 062f131d7..4d40d2d7b 100644 --- a/pngstruct.h +++ b/pngstruct.h @@ -342,10 +342,6 @@ struct png_struct_def #endif #ifdef PNG_WRITE_SUPPORTED - /* This is somewhat excessive, there is no obvious reason on write to - * allocate a buffer for each possible filtered row, only for the one being - * tested and the current best. - */ png_bytep try_row; /* buffer to save trial row when filtering */ #endif diff --git a/pngwutil.c b/pngwutil.c index 14822aacb..73a766ba7 100644 --- a/pngwutil.c +++ b/pngwutil.c @@ -3030,7 +3030,6 @@ png_write_find_filter(png_structrp png_ptr, png_row_infop row_info) if (best_filter_value != last_tested_row_value) { - /* TO DO: make this redundant code into functions? */ if (best_filter_value == PNG_FILTER_VALUE_SUB) png_setup_sub_row(png_ptr, bpp, row_buf, row_bytes); @@ -3042,7 +3041,6 @@ png_write_find_filter(png_structrp png_ptr, png_row_infop row_info) if (best_filter_value == PNG_FILTER_VALUE_PAETH) png_setup_paeth_row(png_ptr, bpp, row_buf, row_bytes); - } png_write_filtered_row(png_ptr, png_ptr->try_row, row_info->rowbytes+1);