diff options
author | Campbell Barton <campbell@blender.org> | 2022-05-05 03:38:19 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-05-05 03:44:25 +0300 |
commit | d3c895fc41d7a2d4ec677c4cd70f656a28f8edb1 (patch) | |
tree | 1a1da5c90e3ab8994f9058752a21ed64a5495c6d /source/blender/imbuf/intern/jpeg.c | |
parent | 777b72b5cbbc582fb7b028f66c406285e0eb5370 (diff) |
Cleanup: shadow and format warnings
Diffstat (limited to 'source/blender/imbuf/intern/jpeg.c')
-rw-r--r-- | source/blender/imbuf/intern/jpeg.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/imbuf/intern/jpeg.c b/source/blender/imbuf/intern/jpeg.c index 0ec4e5a3ba8..d76bd00df57 100644 --- a/source/blender/imbuf/intern/jpeg.c +++ b/source/blender/imbuf/intern/jpeg.c @@ -290,7 +290,7 @@ static ImBuf *ibJpegImageFromCinfo(struct jpeg_decompress_struct *cinfo, * while libjpeg-turbo can also do 3/8, 5/8, etc. But max is 1/8. */ float scale = (float)max_size / MAX2(cinfo->image_width, cinfo->image_height); cinfo->scale_denom = 8; - cinfo->scale_num = MAX2(1, MIN2(8, ceill(scale * (float)cinfo->scale_denom))); + cinfo->scale_num = max_uu(1, min_uu(8, ceill(scale * (float)cinfo->scale_denom))); cinfo->dct_method = JDCT_FASTEST; cinfo->dither_mode = JDITHER_ORDERED; } @@ -529,7 +529,7 @@ struct ImBuf *imb_thumbnail_jpeg(const char *filepath, if (i > 0 && !feof(infile)) { /* We found a JPEG thumbnail inside this image. */ ImBuf *ibuf = NULL; - unsigned char *buffer = (char *)MEM_callocN(JPEG_APP1_MAX, "thumbbuffer"); + uchar *buffer = MEM_callocN(JPEG_APP1_MAX, "thumbbuffer"); /* Just put SOI directly in buffer rather than seeking back 2 bytes. */ buffer[0] = JPEG_MARKER_MSB; buffer[1] = JPEG_MARKER_SOI; |