Bug 830247 - Make sure NEON version of some libraries gets built. r=jesup

This commit is contained in:
Gian-Carlo Pascutto 2013-02-27 15:44:42 +01:00
Родитель 7beeb2ef63
Коммит d50cf6c655
9 изменённых файлов: 47 добавлений и 11 удалений

Просмотреть файл

@ -285,11 +285,11 @@ DEFINES += -D__linux__
# For cpu-features.h
LOCAL_INCLUDES += -I$(ANDROID_NDK)/sources/android/cpufeatures
ifndef MOZ_WEBRTC
# For cpu-features.c
VPATH += $(ANDROID_NDK)/sources/android/cpufeatures
CSRCS += cpu-features.c
endif
endif
CSRCS += \

Просмотреть файл

@ -46,12 +46,19 @@ WEBRTC_LIBS += \
$(NULL)
endif
ifeq ($(CPU_ARCH), arm)
# extra ARM libs
WEBRTC_LIBS += \
$(call EXPAND_LIBNAME_PATH,cpu_features_android,$(DEPTH)/media/webrtc/trunk/webrtc/system_wrappers/source/system_wrappers_cpu_features_android) \
$(NULL)
# neon for ARM
ifeq ($(HAVE_ARM_NEON),1)
WEBRTC_LIBS += \
$(call EXPAND_LIBNAME_PATH,aecm_neon,$(DEPTH)/media/webrtc/trunk/webrtc/modules/modules_aecm_neon) \
$(call EXPAND_LIBNAME_PATH,signal_processing_neon,$(DEPTH)/media/webrtc/trunk/webrtc/common_audio/common_audio_signal_processing_neon) \
$(call EXPAND_LIBNAME_PATH,audio_processing_neon,$(DEPTH)/media/webrtc/trunk/webrtc/modules/modules_audio_processing_neon) \
$(NULL)
endif
endif
# If you enable one of these codecs in webrtc_config.gypi, you'll need to re-add the

Просмотреть файл

@ -55,11 +55,13 @@ CFLAGS += $(CPPFLAGS_Debug) $(CFLAGS_Debug)
CXXFLAGS += $(CPPFLAGS_Debug) $(CXXFLAGS_Debug)
DEFINES += $(DEFINES_Debug)
LOCAL_INCLUDES += $(INCLUDES_Debug)
ASFLAGS += $(ASFLAGS_Debug)
else # non-MOZ_DEBUG
CFLAGS += $(CPPFLAGS_Release) $(CFLAGS_Release)
CXXFLAGS += $(CPPFLAGS_Release) $(CXXFLAGS_Release)
DEFINES += $(DEFINES_Release)
LOCAL_INCLUDES += $(INCLUDES_Release)
ASFLAGS += $(ASFLAGS_Release)
endif
ifeq (WINNT,$(OS_TARGET))
@ -166,6 +168,10 @@ def striplib(name):
return name[3:]
return name
AS_EXTENSIONS = set([
'.s',
'.S'
])
CPLUSPLUS_EXTENSIONS = set([
'.cc',
'.cpp',
@ -320,12 +326,15 @@ class MakefileGenerator(object):
cflags_mozilla = config.get('cflags_mozilla')
if cflags_mozilla:
data['CPPFLAGS_%s' % configname] = cflags_mozilla
asflags_mozilla = config.get('asflags_mozilla')
if asflags_mozilla:
data['ASFLAGS_%s' % configname] = asflags_mozilla
sources = {
'CPPSRCS': {'exts': CPLUSPLUS_EXTENSIONS, 'files': []},
'CSRCS': {'exts': ['.c'], 'files': []},
'CMSRCS': {'exts': ['.m'], 'files': []},
'CMMSRCS': {'exts': ['.mm'], 'files': []},
'ASFILES': {'exts': ['.s'], 'files': []},
'SSRCS': {'exts': AS_EXTENSIONS, 'files': []},
}
copy_srcs = []
for s in spec.get('sources', []):

Просмотреть файл

@ -34,4 +34,19 @@
'-mfpu=neon',
'-flax-vector-conversions',
],
'asflags!': [
'-mfpu=vfpv3-d16',
],
'asflags_mozilla!': [
'-mfpu=vfpv3-d16',
],
'asflags': [
'-mfpu=neon',
'-flax-vector-conversions',
],
'asflags_mozilla': [
'-mfpu=neon',
'-flax-vector-conversions',
],
}

Просмотреть файл

@ -202,9 +202,9 @@
'defines': ['WEBRTC_ARCH_ARM_V7',],
'conditions': [
['arm_neon==1', {
'defines': ['WEBRTC_ARCH_ARM_NEON',],
}, {
'defines': ['WEBRTC_DETECT_ARM_NEON',],
'defines': ['WEBRTC_ARCH_ARM_NEON',
'WEBRTC_BUILD_NEON_LIBS',
'WEBRTC_DETECT_ARM_NEON'],
}],
],
}],

Просмотреть файл

@ -64,6 +64,7 @@ AudioDeviceAndroidOpenSLES::AudioDeviceAndroidOpenSLES(const WebRtc_Word32 id)
playout_delay_(0),
recording_delay_(0),
agc_enabled_(false),
rec_thread_(NULL),
rec_timer_(*EventWrapper::Create()),
mic_sampling_rate_(N_REC_SAMPLES_PER_SEC * 1000),
speaker_sampling_rate_(N_PLAY_SAMPLES_PER_SEC * 1000),
@ -1396,7 +1397,7 @@ void AudioDeviceAndroidOpenSLES::RecorderSimpleBufferQueueCallbackHandler(
void AudioDeviceAndroidOpenSLES::CheckErr(SLresult res) {
if (res != SL_RESULT_SUCCESS) {
WEBRTC_OPENSL_TRACE(kTraceError, kTraceAudioDevice, id_,
" AudioDeviceAndroidOpenSLES::CheckErr(%d)", res);
" AudioDeviceAndroidOpenSLES::CheckErr(%lu)", res);
exit(-1);
}
}

Просмотреть файл

@ -51,7 +51,7 @@ const WebRtc_UWord32 PLAY_MAX_TEMP_BUF_SIZE_PER_10ms =
const WebRtc_UWord16 N_PLAY_QUEUE_BUFFERS = 8;
// Number of buffers in recording queue
// TODO(xian): Reduce the numbers of buffers to improve the latency.
const WebRtc_UWord16 N_REC_QUEUE_BUFFERS = 8;
const WebRtc_UWord16 N_REC_QUEUE_BUFFERS = 16;
// Some values returned from getMinBufferSize
// (Nexus S playout 72ms, recording 64ms)
// (Galaxy, 167ms, 44ms)

Просмотреть файл

@ -177,11 +177,14 @@
'audio_processing_offsets',
],
# TODO(kma): port this block from Android into other build systems.
'sources': [
#
# We disable the ASM source, because our gyp->Makefile translator
# does not support the build steps to get the asm offsets.
'sources!': [
'aecm/aecm_core_neon.S',
'ns/nsx_core_neon.S',
],
'sources!': [
'sources': [
'aecm/aecm_core_neon.c',
'ns/nsx_core_neon.c',
],

Просмотреть файл

@ -16,6 +16,7 @@
'enable_protobuf': 0,
'include_pulse_audio': 0,
'include_tests': 0,
'enable_android_opensl': 1,
# use_system_lib* still seems to be in use in trunk/build
'use_system_libjpeg': 0,
'use_system_libvpx': 0,