[libpng16] Removed #if/#else/#endif from inside two pow() calls in pngvalid.c

because they were handled improperly by Portland Group's PGI-14.1 - PGI-14.3
when using its "__builtin_pow()" function.
This commit is contained in:
Glenn Randers-Pehrson
2014-03-17 15:29:25 -05:00
parent 23646318e4
commit a518abd582
3 changed files with 12 additions and 9 deletions

View File

@@ -6776,14 +6776,13 @@ image_transform_png_set_rgb_to_gray_ini(PNG_CONST image_transform *this,
* conversion adds another +/-2 in the 16-bit case and
* +/-(1<<(15-PNG_MAX_GAMMA_8)) in the 8-bit case.
*/
that->pm->limit += pow(
# if PNG_MAX_GAMMA_8 < 14
(that->this.bit_depth == 16 ? 8. :
6. + (1<<(15-PNG_MAX_GAMMA_8)))
that->pm->limit += pow((that->this.bit_depth == 16 ? 8. :
6. + (1<<(15-PNG_MAX_GAMMA_8)))/65535, data.gamma);
# else
8.
that->pm->limit += pow((that->this.bit_depth == 16 ? 8. :
8. + (1<<(15-PNG_MAX_GAMMA_8)))/65535, data.gamma);
# endif
/65535, data.gamma);
}
else
@@ -6801,13 +6800,11 @@ image_transform_png_set_rgb_to_gray_ini(PNG_CONST image_transform *this,
* internal calculation errors, not the actual limit imposed by
* pngvalid on the output errors.
*/
that->pm->limit += pow(
# if DIGITIZE
1.1
that->pm->limit += pow(1.1 /255, data.gamma);
# else
1.
that->pm->limit += pow(1.0 /255, data.gamma);
# endif
/255, data.gamma);
}
}