From f388fcc67e482ad44f1bcd805eee8efdcb1ea4e3 Mon Sep 17 00:00:00 2001 From: "kma@webrtc.org" Date: Tue, 7 Aug 2012 01:20:51 +0000 Subject: [PATCH] Added dynamic Neon detect in isac-fix for Android NDK build, and thus fixed a build error in the last version. Review URL: https://webrtc-codereview.appspot.com/726004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@2567 4adac7df-926f-26a2-2b94-8c16560cd09d --- .../codecs/iSAC/fix/source/filters_neon.c | 4 +-- .../codecs/iSAC/fix/source/isacfix.gypi | 26 +++++++++++++++++-- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/src/modules/audio_coding/codecs/iSAC/fix/source/filters_neon.c b/src/modules/audio_coding/codecs/iSAC/fix/source/filters_neon.c index 8270359b1d..93143fe432 100644 --- a/src/modules/audio_coding/codecs/iSAC/fix/source/filters_neon.c +++ b/src/modules/audio_coding/codecs/iSAC/fix/source/filters_neon.c @@ -95,8 +95,8 @@ int WebRtcIsacfix_AutocorrNeon( for (i = 1; i < order + 1; i++) { int32_t prod_lower = 0; int32_t prod_upper = 0; - int16_t* ptr0 = &x[0]; - int16_t* ptr1 = &x[i]; + const int16_t* ptr0 = &x[0]; + const int16_t* ptr1 = &x[i]; int32_t tmp = 0; // Initialize the sum (q9) to zero. diff --git a/src/modules/audio_coding/codecs/iSAC/fix/source/isacfix.gypi b/src/modules/audio_coding/codecs/iSAC/fix/source/isacfix.gypi index a13d1f568e..837b817a13 100644 --- a/src/modules/audio_coding/codecs/iSAC/fix/source/isacfix.gypi +++ b/src/modules/audio_coding/codecs/iSAC/fix/source/isacfix.gypi @@ -1,4 +1,4 @@ -# Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. +# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. # # Use of this source code is governed by a BSD-style license # that can be found in the LICENSE file in the root of the source @@ -13,6 +13,7 @@ 'type': '<(library)', 'dependencies': [ '<(webrtc_root)/common_audio/common_audio.gyp:signal_processing', + '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers', ], 'include_dirs': [ '../interface', @@ -63,16 +64,37 @@ 'settings.h', 'spectrum_ar_model_tables.h', 'structs.h', - ], + ], 'conditions': [ ['OS!="win"', { 'defines': [ 'WEBRTC_LINUX', ], }], + ['OS=="android"', { + 'dependencies': [ 'isac_neon', ], + }], ], }, ], + 'conditions': [ + ['OS=="android"', { + 'targets': [ + { + 'target_name': 'isac_neon', + 'type': '<(library)', + 'includes': ['../../../../../../build/arm_neon.gypi',], + 'dependencies': [ + '<(webrtc_root)/common_audio/common_audio.gyp:signal_processing', + ], + 'sources': [ + 'lattice_neon.S', + 'filters_neon.c', + ], + }, + ], + }], + ], } # Local Variables: