From 8b5a0093ee14f1a977c94f2566d5aa2ffebfe5e3 Mon Sep 17 00:00:00 2001 From: DRC Date: Wed, 21 Jan 2015 17:42:28 +0000 Subject: [PATCH] Oops. The MIPS SIMD implementations of h2v1 and h2v2 upsampling were not checking for DSPr2 support, so running 'djpeg -nosmooth' on a non-DSPr2-enabled platform caused an "illegal instruction" error. git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1523 632fc199-4ca6-4c93-a231-07263d6284db --- ChangeLog.txt | 5 +++++ simd/jsimd_mips.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog.txt b/ChangeLog.txt index 5e05a38..139bcca 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -27,6 +27,11 @@ which speeds up the compression of RGB and CMYK JPEGs by 5-20% when using 64-bit code and 0-3% when using 32-bit code, and the decompression of those images by 10-30% when using 64-bit code and 3-12% when using 32-bit code. +[5] Fixed an "illegal instruction" error that occurred when djpeg from a +SIMD-enabled libjpeg-turbo MIPS build was executed with the -nosmooth option on +a MIPS machine that lacked DSPr2 support. The MIPS SIMD routines for h2v1 and +h2v2 merged upsampling were not properly checking for the existence of DSPr2. + 1.4.0 ===== diff --git a/simd/jsimd_mips.c b/simd/jsimd_mips.c index abcd19f..cf87b32 100644 --- a/simd/jsimd_mips.c +++ b/simd/jsimd_mips.c @@ -562,6 +562,8 @@ jsimd_h2v1_fancy_upsample (j_decompress_ptr cinfo, GLOBAL(int) jsimd_can_h2v2_merged_upsample (void) { + init_simd(); + if (BITS_IN_JSAMPLE != 8) return 0; if (sizeof(JDIMENSION) != 4) @@ -576,6 +578,8 @@ jsimd_can_h2v2_merged_upsample (void) GLOBAL(int) jsimd_can_h2v1_merged_upsample (void) { + init_simd(); + if (BITS_IN_JSAMPLE != 8) return 0; if (sizeof(JDIMENSION) != 4) -- 2.40.0