mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] Avoid runtime checks when converting integer to png_byte with
Visual Studio (Sergey Kosarevsky)
This commit is contained in:
parent
494e75ac83
commit
9a3de48b48
8
ANNOUNCE
8
ANNOUNCE
@ -1,4 +1,4 @@
|
||||
Libpng 1.6.17beta06 - February 25, 2015
|
||||
Libpng 1.6.17beta06 - February 28, 2015
|
||||
|
||||
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.
|
||||
@ -59,7 +59,11 @@ Version 1.6.17beta04 [February 21, 2015]
|
||||
Version 1.6.17beta05 [February 25, 2015]
|
||||
Restored compiling of png_reciprocal2 with PNG_NO_16BIT.
|
||||
|
||||
Version 1.6.17beta06 [February 25, 2015]
|
||||
Version 1.6.17beta06 [February 28, 2015]
|
||||
Moved png_set_filter() prototype into a PNG_WRITE_SUPPORTED block
|
||||
of png.h.
|
||||
Avoid runtime checks when converting integer to png_byte with
|
||||
Visual Studio (Sergey Kosarevsky)
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
|
6
CHANGES
6
CHANGES
@ -5160,7 +5160,11 @@ Version 1.6.17beta04 [February 21, 2015]
|
||||
Version 1.6.17beta05 [February 25, 2015]
|
||||
Restored compiling of png_reciprocal2 with PNG_NO_16BIT.
|
||||
|
||||
Version 1.6.17beta06 [February 25, 2015]
|
||||
Version 1.6.17beta06 [February 28, 2015]
|
||||
Moved png_set_filter() prototype into a PNG_WRITE_SUPPORTED block
|
||||
of png.h.
|
||||
Avoid runtime checks when converting integer to png_byte with
|
||||
Visual Studio (Sergey Kosarevsky)
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
|
@ -748,8 +748,8 @@
|
||||
* systems where (char) is more than 8 bits.
|
||||
*/
|
||||
#define PNG_STRING_FROM_CHUNK(s,c)\
|
||||
(void)(((char*)(s))[0]=(char)((c)>>24), ((char*)(s))[1]=(char)((c)>>16),\
|
||||
((char*)(s))[2]=(char)((c)>>8), ((char*)(s))[3]=(char)((c)))
|
||||
(void)(((char*)(s))[0]=(char)(((c)>>24)&0xFF), ((char*)(s))[1]=(char)(((c)>>16)&0xFF),\
|
||||
((char*)(s))[2]=(char)(((c)>>8)&0xFF), ((char*)(s))[3]=(char)((c&0xFF)))
|
||||
|
||||
/* Do the same but terminate with a null character. */
|
||||
#define PNG_CSTRING_FROM_CHUNK(s,c)\
|
||||
|
@ -3850,7 +3850,7 @@ png_read_filter_row_paeth_multibyte_pixel(png_row_infop row_info, png_bytep row,
|
||||
while (row < rp_end)
|
||||
{
|
||||
int a = *row + *prev_row++;
|
||||
*row++ = (png_byte)a;
|
||||
*row++ = (png_byte)(a&0xFF);
|
||||
}
|
||||
|
||||
/* Remainder */
|
||||
@ -3881,7 +3881,7 @@ png_read_filter_row_paeth_multibyte_pixel(png_row_infop row_info, png_bytep row,
|
||||
if (pc < pa) a = c;
|
||||
|
||||
a += *row;
|
||||
*row++ = (png_byte)a;
|
||||
*row++ = (png_byte)(a&0xFF);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user