mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] Mention in manual that 16-bit platform support has been dropped.
This commit is contained in:
parent
751cee5ef1
commit
b9ba8d6a57
13
CHANGES
13
CHANGES
@ -3803,12 +3803,13 @@ Version 1.6.0beta01 [December 15, 2011]
|
|||||||
(the other two required headers aren't used). Non-ANSI systems that don't
|
(the other two required headers aren't used). Non-ANSI systems that don't
|
||||||
have stddef.h or limits.h will have to provide an appropriate fake
|
have stddef.h or limits.h will have to provide an appropriate fake
|
||||||
containing the relevant types and #defines.
|
containing the relevant types and #defines.
|
||||||
The use of FAR/far has been eliminated and the definition of png_alloc_size_t
|
Dropped support for 16-bit platforms. The use of FAR/far has been eliminated
|
||||||
is now controlled by a flag so that 'small size_t' systems can select it
|
and the definition of png_alloc_size_t is now controlled by a flag so
|
||||||
if necessary. Libpng 1.6 may not currently work on such systems -- it
|
that 'small size_t' systems can select it if necessary. Libpng 1.6 may
|
||||||
seems likely that it will ask 'malloc' for more than 65535 bytes with any
|
not currently work on such systems -- it seems likely that it will
|
||||||
image that has a sufficiently large row size (rather than simply failing
|
ask 'malloc' for more than 65535 bytes with any image that has a
|
||||||
to read such images).
|
sufficiently large row size (rather than simply failing to read such
|
||||||
|
images).
|
||||||
New tools directory containing tools used to generate libpng code.
|
New tools directory containing tools used to generate libpng code.
|
||||||
Fixed race conditions in parallel make builds. With higher degrees of
|
Fixed race conditions in parallel make builds. With higher degrees of
|
||||||
parallelism during 'make' the use of the same temporary file names such
|
parallelism during 'make' the use of the same temporary file names such
|
||||||
|
@ -5046,9 +5046,9 @@ The signatures of many exported functions were changed, such that
|
|||||||
png_infop became png_inforp or png_const_inforp
|
png_infop became png_inforp or png_const_inforp
|
||||||
where "rp" indicates a "restricted pointer".
|
where "rp" indicates a "restricted pointer".
|
||||||
|
|
||||||
The support for FAR/far types has been eliminated and the definition of
|
Dropped support for 16-bit platforms. The support for FAR/far types has
|
||||||
png_alloc_size_t is now controlled by a flag so that 'small size_t' systems
|
been eliminated and the definition of png_alloc_size_t is now controlled
|
||||||
can select it if necessary.
|
by a flag so that 'small size_t' systems can select it if necessary.
|
||||||
|
|
||||||
Error detection in some chunks has improved; in particular the iCCP chunk
|
Error detection in some chunks has improved; in particular the iCCP chunk
|
||||||
reader now does pretty complete validation of the basic format. Some bad
|
reader now does pretty complete validation of the basic format. Some bad
|
||||||
|
6
libpng.3
6
libpng.3
@ -5554,9 +5554,9 @@ The signatures of many exported functions were changed, such that
|
|||||||
png_infop became png_inforp or png_const_inforp
|
png_infop became png_inforp or png_const_inforp
|
||||||
where "rp" indicates a "restricted pointer".
|
where "rp" indicates a "restricted pointer".
|
||||||
|
|
||||||
The support for FAR/far types has been eliminated and the definition of
|
Dropped support for 16-bit platforms. The support for FAR/far types has
|
||||||
png_alloc_size_t is now controlled by a flag so that 'small size_t' systems
|
been eliminated and the definition of png_alloc_size_t is now controlled
|
||||||
can select it if necessary.
|
by a flag so that 'small size_t' systems can select it if necessary.
|
||||||
|
|
||||||
Error detection in some chunks has improved; in particular the iCCP chunk
|
Error detection in some chunks has improved; in particular the iCCP chunk
|
||||||
reader now does pretty complete validation of the basic format. Some bad
|
reader now does pretty complete validation of the basic format. Some bad
|
||||||
|
10
png.c
10
png.c
@ -1512,10 +1512,10 @@ png_XYZ_normalize(png_XYZ *XYZ)
|
|||||||
* safe.
|
* safe.
|
||||||
*/
|
*/
|
||||||
Y = XYZ->red_Y;
|
Y = XYZ->red_Y;
|
||||||
if (0x7fffffff - Y < XYZ->green_X)
|
if (0x7fffffffL - Y < XYZ->green_X)
|
||||||
return 1;
|
return 1;
|
||||||
Y += XYZ->green_Y;
|
Y += XYZ->green_Y;
|
||||||
if (0x7fffffff - Y < XYZ->blue_X)
|
if (0x7fffffffL - Y < XYZ->blue_X)
|
||||||
return 1;
|
return 1;
|
||||||
Y += XYZ->blue_Y;
|
Y += XYZ->blue_Y;
|
||||||
|
|
||||||
@ -3673,10 +3673,10 @@ for (i=11;i>=0;--i){ print i, " ", (1 - e(-(2^i)/65536*l(2))) * 2^(32-i), "\n"}
|
|||||||
static png_uint_32
|
static png_uint_32
|
||||||
png_exp(png_fixed_point x)
|
png_exp(png_fixed_point x)
|
||||||
{
|
{
|
||||||
if (x > 0 && x <= 0xfffff) /* Else overflow or zero (underflow) */
|
if (x > 0 && x <= 0xfffffUL) /* Else overflow or zero (underflow) */
|
||||||
{
|
{
|
||||||
/* Obtain a 4-bit approximation */
|
/* Obtain a 4-bit approximation */
|
||||||
png_uint_32 e = png_32bit_exp[(x >> 12) & 0xf];
|
png_uint_32 e = png_32bit_exp[(x >> 12) & 0x0f];
|
||||||
|
|
||||||
/* Incorporate the low 12 bits - these decrease the returned value by
|
/* Incorporate the low 12 bits - these decrease the returned value by
|
||||||
* multiplying by a number less than 1 if the bit is set. The multiplier
|
* multiplying by a number less than 1 if the bit is set. The multiplier
|
||||||
@ -3729,7 +3729,7 @@ png_exp8bit(png_fixed_point lg2)
|
|||||||
* step.
|
* step.
|
||||||
*/
|
*/
|
||||||
x -= x >> 8;
|
x -= x >> 8;
|
||||||
return (png_byte)(((x + 0x7fffff) >> 24) & 0xff);
|
return (png_byte)(((x + 0x7fffffUL) >> 24) & 0xff);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PNG_16BIT_SUPPORTED
|
#ifdef PNG_16BIT_SUPPORTED
|
||||||
|
@ -3314,7 +3314,7 @@ png_do_compose(png_row_infop row_info, png_bytep row, png_structrp png_ptr)
|
|||||||
if ((png_uint_16)((*sp >> shift) & 0x0f)
|
if ((png_uint_16)((*sp >> shift) & 0x0f)
|
||||||
== png_ptr->trans_color.gray)
|
== png_ptr->trans_color.gray)
|
||||||
{
|
{
|
||||||
unsigned int tmp = *sp & (0xf0f >> (4 - shift));
|
unsigned int tmp = *sp & (0x0f0f >> (4 - shift));
|
||||||
tmp |= png_ptr->background.gray << shift;
|
tmp |= png_ptr->background.gray << shift;
|
||||||
*sp = (png_byte)(tmp & 0xff);
|
*sp = (png_byte)(tmp & 0xff);
|
||||||
}
|
}
|
||||||
@ -3324,7 +3324,7 @@ png_do_compose(png_row_infop row_info, png_bytep row, png_structrp png_ptr)
|
|||||||
unsigned int p = (*sp >> shift) & 0x0f;
|
unsigned int p = (*sp >> shift) & 0x0f;
|
||||||
unsigned int g = (gamma_table[p | (p << 4)] >> 4) &
|
unsigned int g = (gamma_table[p | (p << 4)] >> 4) &
|
||||||
0x0f;
|
0x0f;
|
||||||
unsigned int tmp = *sp & (0xf0f >> (4 - shift));
|
unsigned int tmp = *sp & (0x0f0f >> (4 - shift));
|
||||||
tmp |= g << shift;
|
tmp |= g << shift;
|
||||||
*sp = (png_byte)(tmp & 0xff);
|
*sp = (png_byte)(tmp & 0xff);
|
||||||
}
|
}
|
||||||
@ -3350,7 +3350,7 @@ png_do_compose(png_row_infop row_info, png_bytep row, png_structrp png_ptr)
|
|||||||
if ((png_uint_16)((*sp >> shift) & 0x0f)
|
if ((png_uint_16)((*sp >> shift) & 0x0f)
|
||||||
== png_ptr->trans_color.gray)
|
== png_ptr->trans_color.gray)
|
||||||
{
|
{
|
||||||
unsigned int tmp = *sp & (0xf0f >> (4 - shift));
|
unsigned int tmp = *sp & (0x0f0f >> (4 - shift));
|
||||||
tmp |= png_ptr->background.gray << shift;
|
tmp |= png_ptr->background.gray << shift;
|
||||||
*sp = (png_byte)(tmp & 0xff);
|
*sp = (png_byte)(tmp & 0xff);
|
||||||
}
|
}
|
||||||
|
12
pngrutil.c
12
pngrutil.c
@ -85,10 +85,10 @@ png_int_32 (PNGAPI
|
|||||||
png_get_int_32)(png_const_bytep buf)
|
png_get_int_32)(png_const_bytep buf)
|
||||||
{
|
{
|
||||||
png_uint_32 uval = png_get_uint_32(buf);
|
png_uint_32 uval = png_get_uint_32(buf);
|
||||||
if ((uval & 0x80000000) == 0) /* non-negative */
|
if ((uval & 0x80000000UL) == 0) /* non-negative */
|
||||||
return uval;
|
return uval;
|
||||||
|
|
||||||
uval = (uval ^ 0xffffffff) + 1; /* 2's complement: -x = ~x+1 */
|
uval = (uval ^ 0xffffffffUL) + 1; /* 2's complement: -x = ~x+1 */
|
||||||
return -(png_int_32)uval;
|
return -(png_int_32)uval;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3120,10 +3120,10 @@ png_combine_row(png_const_structrp png_ptr, png_bytep dp, int display)
|
|||||||
# define PNG_LSR(x,s) ((x)>>(s))
|
# define PNG_LSR(x,s) ((x)>>(s))
|
||||||
# define PNG_LSL(x,s) ((x)<<(s))
|
# define PNG_LSL(x,s) ((x)<<(s))
|
||||||
# endif
|
# endif
|
||||||
# define S_COPY(p,x) (((p)<4 ? PNG_LSR(0x80088822,(3-(p))*8+(7-(x))) :\
|
# define S_COPY(p,x) (((p)<4 ? PNG_LSR(0x80088822UL,(3-(p))*8+(7-(x))) :\
|
||||||
PNG_LSR(0xaa55ff00,(7-(p))*8+(7-(x)))) & 1)
|
PNG_LSR(0xaa55ff00UL,(7-(p))*8+(7-(x)))) & 1)
|
||||||
# define B_COPY(p,x) (((p)<4 ? PNG_LSR(0xff0fff33,(3-(p))*8+(7-(x))) :\
|
# define B_COPY(p,x) (((p)<4 ? PNG_LSR(0xff0fff33UL,(3-(p))*8+(7-(x))) :\
|
||||||
PNG_LSR(0xff55ff00,(7-(p))*8+(7-(x)))) & 1)
|
PNG_LSR(0xff55ff00UL,(7-(p))*8+(7-(x)))) & 1)
|
||||||
|
|
||||||
/* Return a mask for pass 'p' pixel 'x' at depth 'd'. The mask is
|
/* Return a mask for pass 'p' pixel 'x' at depth 'd'. The mask is
|
||||||
* little endian - the first pixel is at bit 0 - however the extra
|
* little endian - the first pixel is at bit 0 - however the extra
|
||||||
|
Loading…
x
Reference in New Issue
Block a user