Skip to content

Commit

Permalink
Fix builds for removal of copyrighted files
Browse files Browse the repository at this point in the history
Signed-off-by: John Bowler <jbowler@acm.org>
  • Loading branch information
jbowler committed Sep 8, 2024
1 parent ccfdb23 commit 409cc37
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 33 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,7 @@ if(PNG_TARGET_ARCHITECTURE MATCHES "^(arm|aarch)")
elseif(NOT PNG_ARM_NEON STREQUAL "off")
set(libpng_arm_sources
arm/arm_init.c
arm/filter_neon_intrinsics.c
arm/palette_neon_intrinsics.c)
arm/filter_neon_intrinsics.c)
if(PNG_ARM_NEON STREQUAL "on")
add_definitions(-DPNG_ARM_NEON_OPT=2)
elseif(PNG_ARM_NEON STREQUAL "check")
Expand Down
3 changes: 1 addition & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,7 @@ libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = png.c pngerror.c\

if PNG_ARM_NEON
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += arm/arm_init.c\
arm/filter_neon_intrinsics.c \
arm/palette_neon_intrinsics.c
arm/filter_neon_intrinsics.c
endif

if PNG_MIPS_MSA
Expand Down
29 changes: 0 additions & 29 deletions pngrtran.c
Original file line number Diff line number Diff line change
Expand Up @@ -4309,19 +4309,7 @@ png_do_expand_palette(png_structrp png_ptr, png_row_infop row_info,
dp = row + ((size_t)row_width << 2) - 1;

i = 0;
#ifdef PNG_ARM_NEON_INTRINSICS_AVAILABLE
if (png_ptr->riffled_palette != NULL)
{
/* The RGBA optimization works with png_ptr->bit_depth == 8
* but sometimes row_info->bit_depth has been changed to 8.
* In these cases, the palette hasn't been riffled.
*/
i = png_do_expand_palette_rgba8_neon(png_ptr, row_info, row,
&sp, &dp);
}
#else
PNG_UNUSED(png_ptr)
#endif

for (; i < row_width; i++)
{
Expand All @@ -4346,12 +4334,7 @@ png_do_expand_palette(png_structrp png_ptr, png_row_infop row_info,
sp = row + (size_t)row_width - 1;
dp = row + (size_t)(row_width * 3) - 1;
i = 0;
#ifdef PNG_ARM_NEON_INTRINSICS_AVAILABLE
i = png_do_expand_palette_rgb8_neon(png_ptr, row_info, row,
&sp, &dp);
#else
PNG_UNUSED(png_ptr)
#endif

for (; i < row_width; i++)
{
Expand Down Expand Up @@ -4767,18 +4750,6 @@ png_do_read_transformations(png_structrp png_ptr, png_row_infop row_info)
{
if (row_info->color_type == PNG_COLOR_TYPE_PALETTE)
{
#ifdef PNG_ARM_NEON_INTRINSICS_AVAILABLE
if ((png_ptr->num_trans > 0) && (png_ptr->bit_depth == 8))
{
if (png_ptr->riffled_palette == NULL)
{
/* Initialize the accelerated palette expansion. */
png_ptr->riffled_palette =
(png_bytep)png_malloc(png_ptr, 256 * 4);
png_riffle_palette_neon(png_ptr);
}
}
#endif
png_do_expand_palette(png_ptr, row_info, png_ptr->row_buf + 1,
png_ptr->palette, png_ptr->trans_alpha, png_ptr->num_trans);
}
Expand Down

0 comments on commit 409cc37

Please sign in to comment.