summaryrefslogtreecommitdiffstats
path: root/third_party
diff options
context:
space:
mode:
authormostynb@opera.com <mostynb@opera.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-20 12:45:01 +0000
committermostynb@opera.com <mostynb@opera.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-20 12:45:01 +0000
commit290f156afaf5f6f92148e94f544d1bb75784cf01 (patch)
tree3e3894fa3bbd8fae7cfbe30c3c5291fc0e3ff9f9 /third_party
parent3e6bf353d760b275f095b9e1528082f53d5aff65 (diff)
downloadchromium_src-290f156afaf5f6f92148e94f544d1bb75784cf01.zip
chromium_src-290f156afaf5f6f92148e94f544d1bb75784cf01.tar.gz
chromium_src-290f156afaf5f6f92148e94f544d1bb75784cf01.tar.bz2
skip neon code in libwebp when neon is explicitly unavailable
This patch makes it possible to build libwebp without runtime neon detection/usage. Review URL: https://codereview.chromium.org/95873002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242079 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rw-r--r--third_party/libwebp/dsp/dec.c2
-rw-r--r--third_party/libwebp/dsp/dsp.h5
-rw-r--r--third_party/libwebp/dsp/enc.c2
-rw-r--r--third_party/libwebp/libwebp.gyp2
4 files changed, 10 insertions, 1 deletions
diff --git a/third_party/libwebp/dsp/dec.c b/third_party/libwebp/dsp/dec.c
index 2fbd6b1..a6d8519 100644
--- a/third_party/libwebp/dsp/dec.c
+++ b/third_party/libwebp/dsp/dec.c
@@ -697,7 +697,9 @@ VP8SimpleFilterFunc VP8SimpleVFilter16i;
VP8SimpleFilterFunc VP8SimpleHFilter16i;
extern void VP8DspInitSSE2(void);
+#if defined(WEBP_USE_NEON)
extern void VP8DspInitNEON(void);
+#endif
void VP8DspInit(void) {
DspInitTables();
diff --git a/third_party/libwebp/dsp/dsp.h b/third_party/libwebp/dsp/dsp.h
index 01a9589..31bda89 100644
--- a/third_party/libwebp/dsp/dsp.h
+++ b/third_party/libwebp/dsp/dsp.h
@@ -160,8 +160,10 @@ extern WebPUpsampleLinePairFunc WebPUpsamplers[/* MODE_LAST */];
// Initializes SSE2 version of the fancy upsamplers.
void WebPInitUpsamplersSSE2(void);
+#if defined(WEBP_USE_NEON)
// NEON version
void WebPInitUpsamplersNEON(void);
+#endif
#endif // FANCY_UPSAMPLING
@@ -204,7 +206,10 @@ extern void (*WebPApplyAlphaMultiply4444)(
void WebPInitPremultiply(void);
void WebPInitPremultiplySSE2(void); // should not be called directly.
+
+#if defined(WEBP_USE_NEON)
void WebPInitPremultiplyNEON(void);
+#endif
//------------------------------------------------------------------------------
diff --git a/third_party/libwebp/dsp/enc.c b/third_party/libwebp/dsp/enc.c
index 552807a..068ff141 100644
--- a/third_party/libwebp/dsp/enc.c
+++ b/third_party/libwebp/dsp/enc.c
@@ -689,7 +689,9 @@ VP8QuantizeBlock VP8EncQuantizeBlock;
VP8BlockCopy VP8Copy4x4;
extern void VP8EncDspInitSSE2(void);
+#if defined(WEBP_USE_NEON)
extern void VP8EncDspInitNEON(void);
+#endif
void VP8EncDspInit(void) {
InitTables();
diff --git a/third_party/libwebp/libwebp.gyp b/third_party/libwebp/libwebp.gyp
index 1ec6d65..997515f 100644
--- a/third_party/libwebp/libwebp.gyp
+++ b/third_party/libwebp/libwebp.gyp
@@ -66,7 +66,7 @@
{
'target_name': 'libwebp_dsp_neon',
'conditions': [
- ['target_arch == "arm" and arm_version >= 7', {
+ ['target_arch == "arm" and arm_version >= 7 and (arm_neon == 1 or arm_neon_optional == 1)', {
'type': 'static_library',
'include_dirs': ['.'],
'sources': [