mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
arm: Rename all functions to the pattern png_*_neon; add debug traces
This commit is contained in:
parent
9c0d5c77bf
commit
82ae623ec9
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
/* Build an RGBA8 palette from the separate RGB and alpha palettes. */
|
/* Build an RGBA8 palette from the separate RGB and alpha palettes. */
|
||||||
void
|
void
|
||||||
png_riffle_palette_rgba8(png_structrp png_ptr)
|
png_riffle_palette_neon(png_structrp png_ptr)
|
||||||
{
|
{
|
||||||
png_const_colorp palette = png_ptr->palette;
|
png_const_colorp palette = png_ptr->palette;
|
||||||
png_bytep riffled_palette = png_ptr->riffled_palette;
|
png_bytep riffled_palette = png_ptr->riffled_palette;
|
||||||
@ -30,6 +30,8 @@ png_riffle_palette_rgba8(png_structrp png_ptr)
|
|||||||
int num_trans = png_ptr->num_trans;
|
int num_trans = png_ptr->num_trans;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
png_debug(1, "in png_riffle_palette_neon");
|
||||||
|
|
||||||
/* Initially black, opaque. */
|
/* Initially black, opaque. */
|
||||||
uint8x16x4_t w = {{
|
uint8x16x4_t w = {{
|
||||||
vdupq_n_u8(0x00),
|
vdupq_n_u8(0x00),
|
||||||
@ -57,7 +59,7 @@ png_riffle_palette_rgba8(png_structrp png_ptr)
|
|||||||
|
|
||||||
/* Expands a palettized row into RGBA8. */
|
/* Expands a palettized row into RGBA8. */
|
||||||
int
|
int
|
||||||
png_do_expand_palette_neon_rgba8(png_structrp png_ptr, png_row_infop row_info,
|
png_do_expand_palette_rgba8_neon(png_structrp png_ptr, png_row_infop row_info,
|
||||||
png_const_bytep row, png_bytepp ssp, png_bytepp ddp)
|
png_const_bytep row, png_bytepp ssp, png_bytepp ddp)
|
||||||
{
|
{
|
||||||
png_uint_32 row_width = row_info->width;
|
png_uint_32 row_width = row_info->width;
|
||||||
@ -66,6 +68,8 @@ png_do_expand_palette_neon_rgba8(png_structrp png_ptr, png_row_infop row_info,
|
|||||||
const png_int_32 pixels_per_chunk = 4;
|
const png_int_32 pixels_per_chunk = 4;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
png_debug(1, "in png_do_expand_palette_rgba8_neon");
|
||||||
|
|
||||||
if (row_width < pixels_per_chunk)
|
if (row_width < pixels_per_chunk)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@ -99,7 +103,7 @@ png_do_expand_palette_neon_rgba8(png_structrp png_ptr, png_row_infop row_info,
|
|||||||
|
|
||||||
/* Expands a palettized row into RGB8. */
|
/* Expands a palettized row into RGB8. */
|
||||||
int
|
int
|
||||||
png_do_expand_palette_neon_rgb8(png_structrp png_ptr, png_row_infop row_info,
|
png_do_expand_palette_rgb8_neon(png_structrp png_ptr, png_row_infop row_info,
|
||||||
png_const_bytep row, png_bytepp ssp, png_bytepp ddp)
|
png_const_bytep row, png_bytepp ssp, png_bytepp ddp)
|
||||||
{
|
{
|
||||||
png_uint_32 row_width = row_info->width;
|
png_uint_32 row_width = row_info->width;
|
||||||
@ -107,6 +111,8 @@ png_do_expand_palette_neon_rgb8(png_structrp png_ptr, png_row_infop row_info,
|
|||||||
const png_uint_32 pixels_per_chunk = 8;
|
const png_uint_32 pixels_per_chunk = 8;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
png_debug(1, "in png_do_expand_palette_rgb8_neon");
|
||||||
|
|
||||||
if (row_width <= pixels_per_chunk)
|
if (row_width <= pixels_per_chunk)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -2119,11 +2119,11 @@ PNG_INTERNAL_FUNCTION(png_uint_32, png_check_keyword, (png_structrp png_ptr,
|
|||||||
|
|
||||||
#if PNG_ARM_NEON_IMPLEMENTATION == 1
|
#if PNG_ARM_NEON_IMPLEMENTATION == 1
|
||||||
PNG_INTERNAL_FUNCTION(void,
|
PNG_INTERNAL_FUNCTION(void,
|
||||||
png_riffle_palette_rgba8,
|
png_riffle_palette_neon,
|
||||||
(png_structrp),
|
(png_structrp),
|
||||||
PNG_EMPTY);
|
PNG_EMPTY);
|
||||||
PNG_INTERNAL_FUNCTION(int,
|
PNG_INTERNAL_FUNCTION(int,
|
||||||
png_do_expand_palette_neon_rgba8,
|
png_do_expand_palette_rgba8_neon,
|
||||||
(png_structrp,
|
(png_structrp,
|
||||||
png_row_infop,
|
png_row_infop,
|
||||||
png_const_bytep,
|
png_const_bytep,
|
||||||
@ -2131,7 +2131,7 @@ PNG_INTERNAL_FUNCTION(int,
|
|||||||
const png_bytepp),
|
const png_bytepp),
|
||||||
PNG_EMPTY);
|
PNG_EMPTY);
|
||||||
PNG_INTERNAL_FUNCTION(int,
|
PNG_INTERNAL_FUNCTION(int,
|
||||||
png_do_expand_palette_neon_rgb8,
|
png_do_expand_palette_rgb8_neon,
|
||||||
(png_structrp,
|
(png_structrp,
|
||||||
png_row_infop,
|
png_row_infop,
|
||||||
png_const_bytep,
|
png_const_bytep,
|
||||||
|
@ -1169,7 +1169,7 @@ png_init_palette_transformations(png_structrp png_ptr)
|
|||||||
if ((png_ptr->num_trans > 0) && (png_ptr->bit_depth == 8))
|
if ((png_ptr->num_trans > 0) && (png_ptr->bit_depth == 8))
|
||||||
{
|
{
|
||||||
png_ptr->riffled_palette = (png_bytep)png_malloc(png_ptr, 256 * 4);
|
png_ptr->riffled_palette = (png_bytep)png_malloc(png_ptr, 256 * 4);
|
||||||
png_riffle_palette_rgba8(png_ptr);
|
png_riffle_palette_neon(png_ptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* PNG_ARM_NEON_INTRINSICS_AVAILABLE */
|
#endif /* PNG_ARM_NEON_INTRINSICS_AVAILABLE */
|
||||||
@ -4334,7 +4334,7 @@ png_do_expand_palette(png_structrp png_ptr, png_row_infop row_info,
|
|||||||
* but sometimes row_info->bit_depth has been changed to 8.
|
* but sometimes row_info->bit_depth has been changed to 8.
|
||||||
* In these cases, the palette hasn't been riffled.
|
* In these cases, the palette hasn't been riffled.
|
||||||
*/
|
*/
|
||||||
i = png_do_expand_palette_neon_rgba8(png_ptr, row_info, row,
|
i = png_do_expand_palette_rgba8_neon(png_ptr, row_info, row,
|
||||||
&sp, &dp);
|
&sp, &dp);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
@ -4365,7 +4365,7 @@ png_do_expand_palette(png_structrp png_ptr, png_row_infop row_info,
|
|||||||
dp = row + (size_t)(row_width * 3) - 1;
|
dp = row + (size_t)(row_width * 3) - 1;
|
||||||
i = 0;
|
i = 0;
|
||||||
#ifdef PNG_ARM_NEON_INTRINSICS_AVAILABLE
|
#ifdef PNG_ARM_NEON_INTRINSICS_AVAILABLE
|
||||||
i = png_do_expand_palette_neon_rgb8(png_ptr, row_info, row,
|
i = png_do_expand_palette_rgb8_neon(png_ptr, row_info, row,
|
||||||
&sp, &dp);
|
&sp, &dp);
|
||||||
#else
|
#else
|
||||||
PNG_UNUSED(png_ptr)
|
PNG_UNUSED(png_ptr)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user