diff --git a/ChangeLog.md b/ChangeLog.md index ff40d4bf..37379518 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -56,7 +56,7 @@ using the `tjLoadImage()` function. decompress a specially-crafted malformed JPEG image to a 256-color BMP using djpeg. -4. Fixed a floating-point exception that occurred when attempting to +4. Fixed a floating point exception that occurred when attempting to decompress a specially-crafted malformed JPEG image with a specified image width or height of 0 using the C version of TJBench. diff --git a/appveyor.yml b/appveyor.yml index f3bf8b1c..cee15e91 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,10 +1,10 @@ install: - cmd: >- - mkdir c:\installers + if not exist c:\installers mkdir c:\installers mkdir c:\temp - curl -fSL -o c:\installers\nasm-2.10.01-win32.zip http://www.nasm.us/pub/nasm/releasebuilds/2.10.01/win32/nasm-2.10.01-win32.zip + if not exist c:\installers\nasm-2.10.01-win32.zip curl -fSL -o c:\installers\nasm-2.10.01-win32.zip http://www.nasm.us/pub/nasm/releasebuilds/2.10.01/win32/nasm-2.10.01-win32.zip 7z x c:\installers\nasm-2.10.01-win32.zip -oc:\ > c:\installers\nasm.install.log @@ -22,6 +22,9 @@ install: git clone --depth=1 https://github.com/libjpeg-turbo/buildscripts.git -b %APPVEYOR_REPO_BRANCH% c:/buildscripts +cache: + - c:\installers\nasm-2.10.01-win32.zip -> appveyor.yml + build_script: - cmd: >- for /f %%i in ('"cygpath %CD%"') do set MINGWPATH=%%i diff --git a/simd/arm/jsimd.c b/simd/arm/jsimd.c index 0fb81976..45f9b047 100644 --- a/simd/arm/jsimd.c +++ b/simd/arm/jsimd.c @@ -5,6 +5,7 @@ * Copyright (C) 2011, Nokia Corporation and/or its subsidiary(-ies). * Copyright (C) 2009-2011, 2013-2014, 2016, 2018, D. R. Commander. * Copyright (C) 2015-2016, 2018, Matthieu Darbois. + * Copyright (C) 2019, Google LLC. * * Based on the x86 SIMD extension for IJG JPEG library, * Copyright (C) 1999-2006, MIYASAKA Masaru. @@ -30,7 +31,7 @@ static unsigned int simd_support = ~0; static unsigned int simd_huffman = 1; -#if defined(__linux__) || defined(ANDROID) || defined(__ANDROID__) +#if !defined(__ARM_NEON__) && (defined(__linux__) || defined(ANDROID) || defined(__ANDROID__)) #define SOMEWHAT_SANE_PROC_CPUINFO_SIZE_LIMIT (1024 * 1024) @@ -105,7 +106,7 @@ init_simd(void) #ifndef NO_GETENV char *env = NULL; #endif -#if !defined(__ARM_NEON__) && defined(__linux__) || defined(ANDROID) || defined(__ANDROID__) +#if !defined(__ARM_NEON__) && (defined(__linux__) || defined(ANDROID) || defined(__ANDROID__)) int bufsize = 1024; /* an initial guess for the line buffer size limit */ #endif diff --git a/turbojpeg.c b/turbojpeg.c index b3caa0d4..f57f981a 100644 --- a/turbojpeg.c +++ b/turbojpeg.c @@ -237,7 +237,9 @@ static int setCompDefaults(struct jpeg_compress_struct *cinfo, int pixelFormat, int subsamp, int jpegQual, int flags) { int retval = 0; +#ifndef NO_GETENV char *env = NULL; +#endif cinfo->in_color_space = pf2cs[pixelFormat]; cinfo->input_components = tjPixelSize[pixelFormat];