[libpng15] Replaced a short but frequently-used memcpy() in png_combine_row()
with a loop.
This commit is contained in:
parent
a92a212925
commit
fa7d7934f6
5
ANNOUNCE
5
ANNOUNCE
@ -1,5 +1,5 @@
|
||||
|
||||
Libpng 1.5.6beta05 - October 5, 2011
|
||||
Libpng 1.5.6beta05 - October 6, 2011
|
||||
|
||||
This is not intended to be a public release. It will be replaced
|
||||
within a few weeks by a public version or by another test version.
|
||||
@ -55,7 +55,8 @@ Version 1.5.6beta03 [September 28, 2011]
|
||||
Version 1.5.6beta04 [October 5, 2011]
|
||||
Fixed typo in Makefile.in and Makefile.am ("-M Wl" should be "-M -Wl")."
|
||||
|
||||
Version 1.5.6beta05 [October 5, 2011]
|
||||
Version 1.5.6beta05 [October 6, 2011]
|
||||
Replaced a short but frequently-used memcpy() in png_combine_row() to a loop.
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net:
|
||||
(subscription required; visit
|
||||
|
3
CHANGES
3
CHANGES
@ -3616,7 +3616,8 @@ Version 1.5.6beta03 [September 28, 2011]
|
||||
Version 1.5.6beta04 [October 5, 2011]
|
||||
Fixed typo in Makefile.in and Makefile.am ("-M Wl" should be "-M -Wl")."
|
||||
|
||||
Version 1.5.6beta05 [October 5, 2011]
|
||||
Version 1.5.6beta05 [October 6, 2011]
|
||||
Replaced a short but frequently-used memcpy() in png_combine_row() to a loop.
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
|
16
pngrutil.c
16
pngrutil.c
@ -2994,11 +2994,21 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
|
||||
{
|
||||
if (m & mask)
|
||||
{
|
||||
png_memcpy(dp, sp, pixel_bytes);
|
||||
/* Prior to libpng-1.5.6 we used memcpy(), but limited
|
||||
* experiments show that this simple loop can be
|
||||
* significantly faster.
|
||||
*/
|
||||
int j;
|
||||
|
||||
for (j = pixel_bytes; j; --j)
|
||||
*(dp++) = *(sp++);
|
||||
}
|
||||
|
||||
sp += pixel_bytes;
|
||||
dp += pixel_bytes;
|
||||
else
|
||||
{
|
||||
sp += pixel_bytes;
|
||||
dp += pixel_bytes;
|
||||
}
|
||||
|
||||
if (m == 1)
|
||||
m = 0x80;
|
||||
|
Loading…
Reference in New Issue
Block a user