summaryrefslogtreecommitdiff
path: root/simd
diff options
context:
space:
mode:
authorHaibo Huang <hhb@google.com>2021-01-28 21:53:14 -0800
committerHaibo Huang <hhb@google.com>2021-01-28 21:53:14 -0800
commitf7bb80dc5eb581060f92d9f27e7326e1c03a0cdc (patch)
treef616cbf164716ee566a2b186cfc40a4d23540fdf /simd
parent8091842bf92addd9e7f089a5a13f913c5596d502 (diff)
parentfa0de07678c9828cc57b3eb086c03771912ba527 (diff)
Upgrade libjpeg-turbo to fa0de07678c9828cc57b3eb086c03771912ba527
Test: make Change-Id: I5de273521ea963ae8720779874e9796e94433cd9
Diffstat (limited to 'simd')
-rw-r--r--simd/arm/aarch64/jchuff-neon.c6
-rw-r--r--simd/arm/aarch64/jsimd.c3
-rw-r--r--simd/arm/jcphuff-neon.c4
-rw-r--r--simd/arm/neon-compat.h6
-rw-r--r--simd/arm/neon-compat.h.in6
5 files changed, 11 insertions, 14 deletions
diff --git a/simd/arm/aarch64/jchuff-neon.c b/simd/arm/aarch64/jchuff-neon.c
index a0a57a6..f13fd1b 100644
--- a/simd/arm/aarch64/jchuff-neon.c
+++ b/simd/arm/aarch64/jchuff-neon.c
@@ -1,7 +1,7 @@
/*
* jchuff-neon.c - Huffman entropy encoding (64-bit Arm Neon)
*
- * Copyright (C) 2020, Arm Limited. All Rights Reserved.
+ * Copyright (C) 2020-2021, Arm Limited. All Rights Reserved.
* Copyright (C) 2020, D. R. Commander. All Rights Reserved.
*
* This software is provided 'as-is', without any express or implied
@@ -331,7 +331,7 @@ JOCTET *jsimd_huff_encode_one_block_neon(void *state, JOCTET *buffer,
vst1q_u16(block_diff + 7 * DCTSIZE, row7_diff);
while (bitmap != 0) {
- r = BUILTIN_CLZL(bitmap);
+ r = BUILTIN_CLZLL(bitmap);
i += r;
bitmap <<= r;
nbits = block_nbits[i];
@@ -370,7 +370,7 @@ JOCTET *jsimd_huff_encode_one_block_neon(void *state, JOCTET *buffer,
/* Same as above but must mask diff bits and compute nbits on demand. */
while (bitmap != 0) {
- r = BUILTIN_CLZL(bitmap);
+ r = BUILTIN_CLZLL(bitmap);
i += r;
bitmap <<= r;
lz = BUILTIN_CLZ(block_abs[i]);
diff --git a/simd/arm/aarch64/jsimd.c b/simd/arm/aarch64/jsimd.c
index 4991bc0..8570b82 100644
--- a/simd/arm/aarch64/jsimd.c
+++ b/simd/arm/aarch64/jsimd.c
@@ -977,8 +977,6 @@ jsimd_idct_float(j_decompress_ptr cinfo, jpeg_component_info *compptr,
GLOBAL(int)
jsimd_can_huff_encode_one_block(void)
{
-/* Disable for Windows on Arm compiled with Clang-cl: crbug.com/1160249 */
-#if !(defined(_MSC_VER) && defined(__clang__))
init_simd();
if (DCTSIZE != 8)
@@ -988,7 +986,6 @@ jsimd_can_huff_encode_one_block(void)
if (simd_support & JSIMD_NEON && simd_huffman)
return 1;
-#endif
return 0;
}
diff --git a/simd/arm/jcphuff-neon.c b/simd/arm/jcphuff-neon.c
index 8b6d53b..86a263f 100644
--- a/simd/arm/jcphuff-neon.c
+++ b/simd/arm/jcphuff-neon.c
@@ -1,7 +1,7 @@
/*
* jcphuff-neon.c - prepare data for progressive Huffman encoding (Arm Neon)
*
- * Copyright (C) 2020, Arm Limited. All Rights Reserved.
+ * Copyright (C) 2020-2021, Arm Limited. All Rights Reserved.
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -572,7 +572,7 @@ int jsimd_encode_mcu_AC_refine_prepare_neon
/* EOB position is defined to be 0 if all coefficients != 1. */
return 0;
} else {
- return 63 - BUILTIN_CLZL(bitmap);
+ return 63 - BUILTIN_CLZLL(bitmap);
}
#else
/* Move bitmap to two 32-bit scalar registers. */
diff --git a/simd/arm/neon-compat.h b/simd/arm/neon-compat.h
index 3ce3bcb..543d860 100644
--- a/simd/arm/neon-compat.h
+++ b/simd/arm/neon-compat.h
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2020, D. R. Commander. All Rights Reserved.
- * Copyright (C) 2020, Arm Limited. All Rights Reserved.
+ * Copyright (C) 2020-2021, Arm Limited. All Rights Reserved.
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -28,10 +28,10 @@
/* Define compiler-independent count-leading-zeros macros */
#if defined(_MSC_VER) && !defined(__clang__)
#define BUILTIN_CLZ(x) _CountLeadingZeros(x)
-#define BUILTIN_CLZL(x) _CountLeadingZeros64(x)
+#define BUILTIN_CLZLL(x) _CountLeadingZeros64(x)
#elif defined(__clang__) || defined(__GNUC__)
#define BUILTIN_CLZ(x) __builtin_clz(x)
-#define BUILTIN_CLZL(x) __builtin_clzl(x)
+#define BUILTIN_CLZLL(x) __builtin_clzll(x)
#else
#error "Unknown compiler"
#endif
diff --git a/simd/arm/neon-compat.h.in b/simd/arm/neon-compat.h.in
index e2347b9..23d6d28 100644
--- a/simd/arm/neon-compat.h.in
+++ b/simd/arm/neon-compat.h.in
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2020, D. R. Commander. All Rights Reserved.
- * Copyright (C) 2020, Arm Limited. All Rights Reserved.
+ * Copyright (C) 2020-2021, Arm Limited. All Rights Reserved.
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -26,10 +26,10 @@
/* Define compiler-independent count-leading-zeros macros */
#if defined(_MSC_VER) && !defined(__clang__)
#define BUILTIN_CLZ(x) _CountLeadingZeros(x)
-#define BUILTIN_CLZL(x) _CountLeadingZeros64(x)
+#define BUILTIN_CLZLL(x) _CountLeadingZeros64(x)
#elif defined(__clang__) || defined(__GNUC__)
#define BUILTIN_CLZ(x) __builtin_clz(x)
-#define BUILTIN_CLZL(x) __builtin_clzl(x)
+#define BUILTIN_CLZLL(x) __builtin_clzll(x)
#else
#error "Unknown compiler"
#endif