Revert 2241 - Enable aecm neon optimized code in android build

Description:
This cl enables cpu detection and aecm optimized code in android build.

BUG=
TEST=build on all platforms
Review URL: https://webrtc-codereview.appspot.com/575008

TBR=leozwang@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/566013

git-svn-id: http://webrtc.googlecode.com/svn/trunk@2249 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
kjellander@webrtc.org 2012-05-16 11:49:45 +00:00
parent 0290a7a827
commit 7e4a72a78a
5 changed files with 17 additions and 35 deletions

View File

@ -94,9 +94,16 @@
'..','../..', # common_types.h, typedefs.h
],
'defines': [
#'WEBRTC_SVNREVISION="n/a"',
#'WEBRTC_SVNREVISION="<(webrtc_version)"',
'WEBRTC_SVNREVISION="<!(python <(DEPTH)/src/build/version.py)"',
# TODO(leozwang): Temporally disable it because we cannot assume svn
# is installed by default, it will break Chromium build. The problem
# could happen on Gentoo which download and build tar ball directly,
# it also could happen when developer downloads Chromium tar ball and
# build inside source tree without svn installed. The solution is to
# have a script to deal with these cases and support git-svn.
# Two similar issues have been filed at
# WebRTC http://code.google.com/p/webrtc/issues/detail?id=496
# Chromium http://code.google.com/p/chromium/issues/detail?id=126452
'WEBRTC_SVNREVISION="n/a"',
],
'conditions': [
['build_with_chromium==1', {
@ -161,7 +168,6 @@
'WEBRTC_ANDROID',
# TODO(leozwang): move WEBRTC_ARCH_ARM to typedefs.h.
'WEBRTC_ARCH_ARM',
'WEBRTC_DETECT_ARM_NEON',
# TODO(leozwang): Investigate CLOCK_REALTIME and CLOCK_MONOTONIC
# support on Android. Keep WEBRTC_CLOCK_TYPE_REALTIME for now,
# remove it after I verify that CLOCK_MONOTONIC is fully functional

View File

@ -30,28 +30,6 @@
'aecm_core.c',
'aecm_core.h',
],
'conditions': [
['OS=="android"', {
'dependencies': [ 'aecm_neon', ],
}],
],
},
],
'conditions': [
['OS=="android"', {
'targets': [
{
'target_name': 'aecm_neon',
'type': '<(library)',
'includes': [ '../../../build/arm_neon.gypi', ],
'dependencies': [
'<(webrtc_root)/common_audio/common_audio.gyp:signal_processing',
],
'sources': [
'aecm_core_neon.c',
],
},
],
}],
],
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
* Copyright (c) 2011 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
@ -16,7 +16,7 @@
// Square root of Hanning window in Q14.
static const WebRtc_Word16 kSqrtHanningReversed[] __attribute__((aligned(8))) = {
16384, 16373, 16354, 16325,
16384, 16373, 16354, 16325,
16286, 16237, 16179, 16111,
16034, 15947, 15851, 15746,
15631, 15506, 15373, 15231,
@ -92,6 +92,7 @@ static void InverseFFTAndWindowNeon(AecmCore_t* aecm,
WebRtc_Word16* output,
const WebRtc_Word16* nearendClean) {
int i, j, outCFFT;
WebRtc_Word32 tmp32no1;
// Synthesis
for (i = 0, j = 0; i < PART_LEN; i += 4, j += 8) {
@ -197,6 +198,7 @@ static void CalcLinearEnergiesNeon(AecmCore_t* aecm,
register WebRtc_UWord32 far_energy_r;
register WebRtc_UWord32 echo_energy_stored_r;
register WebRtc_UWord32 echo_energy_adapt_r;
uint32x4_t tmp32x4_0;
__asm__("vmov.i32 q14, #0" : : : "q14"); // far_energy
__asm__("vmov.i32 q8, #0" : : : "q8"); // echo_energy_stored

View File

@ -57,6 +57,9 @@
'conditions': [
['OS=="android"', {
'dependencies': [ 'ns_neon', ],
'defines': [
'WEBRTC_DETECT_ARM_NEON'
],
}],
],
},

View File

@ -142,12 +142,6 @@ LOCAL_SRC_FILES := \
$(MY_LIBS_PATH)/src/modules/libaecm.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libaecm_neon
LOCAL_SRC_FILES := \
$(MY_LIBS_PATH)/src/modules/libaecm_neon.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libbitrate_controller
LOCAL_SRC_FILES := \
@ -318,7 +312,6 @@ LOCAL_STATIC_LIBRARIES := \
libagc \
libaec \
libaecm \
libaecm_neon \
libbitrate_controller \
libresampler \
libsignal_processing \