diff --git a/docs/changelog.md b/docs/changelog.md index 53b9c83f9..441d65537 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -9,6 +9,9 @@ Requires libvips v8.7.0. * Drop Node 4 support. [#1212](https://github.com/lovell/sharp/issues/1212) +* Enable SIMD convolution by default. + [#1213](https://github.com/lovell/sharp/issues/1213) + * Add experimental prebuilt binaries for musl-based Linux. [#1379](https://github.com/lovell/sharp/issues/1379) diff --git a/lib/utility.js b/lib/utility.js index 1cb26a61b..83c06d149 100644 --- a/lib/utility.js +++ b/lib/utility.js @@ -82,23 +82,20 @@ function counters () { * Improves the performance of `resize`, `blur` and `sharpen` operations * by taking advantage of the SIMD vector unit of the CPU, e.g. Intel SSE and ARM NEON. * - * This feature is currently off by default but future versions may reverse this. - * Versions of liborc prior to 0.4.25 are known to segfault under heavy load. - * * @example * const simd = sharp.simd(); - * // simd is `true` if SIMD is currently enabled + * // simd is `true` if the runtime use of liborc is currently enabled * @example - * const simd = sharp.simd(true); - * // attempts to enable the use of SIMD, returning true if available + * const simd = sharp.simd(false); + * // prevent libvips from using liborc at runtime * - * @param {Boolean} [simd=false] + * @param {Boolean} [simd=true] * @returns {Boolean} */ function simd (simd) { return sharp.simd(is.bool(simd) ? simd : null); } -simd(false); +simd(true); /** * Decorate the Sharp class with utility-related functions. diff --git a/test/fixtures/expected/extract-lch.jpg b/test/fixtures/expected/extract-lch.jpg index 8de27d15f..af8644dab 100644 Binary files a/test/fixtures/expected/extract-lch.jpg and b/test/fixtures/expected/extract-lch.jpg differ diff --git a/test/unit/extract.js b/test/unit/extract.js index c8aa4a421..9b9629f01 100644 --- a/test/unit/extract.js +++ b/test/unit/extract.js @@ -115,7 +115,7 @@ describe('Partial image extraction', function () { if (err) throw err; assert.strictEqual(280, info.width); assert.strictEqual(380, info.height); - fixtures.assertSimilar(fixtures.expected('rotate-extract.jpg'), data, { threshold: 6 }, done); + fixtures.assertSimilar(fixtures.expected('rotate-extract.jpg'), data, { threshold: 7 }, done); }); });