зеркало из https://github.com/mozilla/gecko-dev.git
Bug 830247 - Make sure NEON version of some libraries gets built. r=jesup
This commit is contained in:
Родитель
7beeb2ef63
Коммит
d50cf6c655
|
@ -285,11 +285,11 @@ DEFINES += -D__linux__
|
||||||
|
|
||||||
# For cpu-features.h
|
# For cpu-features.h
|
||||||
LOCAL_INCLUDES += -I$(ANDROID_NDK)/sources/android/cpufeatures
|
LOCAL_INCLUDES += -I$(ANDROID_NDK)/sources/android/cpufeatures
|
||||||
|
ifndef MOZ_WEBRTC
|
||||||
# For cpu-features.c
|
# For cpu-features.c
|
||||||
VPATH += $(ANDROID_NDK)/sources/android/cpufeatures
|
VPATH += $(ANDROID_NDK)/sources/android/cpufeatures
|
||||||
|
|
||||||
CSRCS += cpu-features.c
|
CSRCS += cpu-features.c
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CSRCS += \
|
CSRCS += \
|
||||||
|
|
|
@ -46,12 +46,19 @@ WEBRTC_LIBS += \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
endif
|
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
|
# neon for ARM
|
||||||
ifeq ($(HAVE_ARM_NEON),1)
|
ifeq ($(HAVE_ARM_NEON),1)
|
||||||
WEBRTC_LIBS += \
|
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)
|
$(NULL)
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
# If you enable one of these codecs in webrtc_config.gypi, you'll need to re-add the
|
# 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)
|
CXXFLAGS += $(CPPFLAGS_Debug) $(CXXFLAGS_Debug)
|
||||||
DEFINES += $(DEFINES_Debug)
|
DEFINES += $(DEFINES_Debug)
|
||||||
LOCAL_INCLUDES += $(INCLUDES_Debug)
|
LOCAL_INCLUDES += $(INCLUDES_Debug)
|
||||||
|
ASFLAGS += $(ASFLAGS_Debug)
|
||||||
else # non-MOZ_DEBUG
|
else # non-MOZ_DEBUG
|
||||||
CFLAGS += $(CPPFLAGS_Release) $(CFLAGS_Release)
|
CFLAGS += $(CPPFLAGS_Release) $(CFLAGS_Release)
|
||||||
CXXFLAGS += $(CPPFLAGS_Release) $(CXXFLAGS_Release)
|
CXXFLAGS += $(CPPFLAGS_Release) $(CXXFLAGS_Release)
|
||||||
DEFINES += $(DEFINES_Release)
|
DEFINES += $(DEFINES_Release)
|
||||||
LOCAL_INCLUDES += $(INCLUDES_Release)
|
LOCAL_INCLUDES += $(INCLUDES_Release)
|
||||||
|
ASFLAGS += $(ASFLAGS_Release)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq (WINNT,$(OS_TARGET))
|
ifeq (WINNT,$(OS_TARGET))
|
||||||
|
@ -166,6 +168,10 @@ def striplib(name):
|
||||||
return name[3:]
|
return name[3:]
|
||||||
return name
|
return name
|
||||||
|
|
||||||
|
AS_EXTENSIONS = set([
|
||||||
|
'.s',
|
||||||
|
'.S'
|
||||||
|
])
|
||||||
CPLUSPLUS_EXTENSIONS = set([
|
CPLUSPLUS_EXTENSIONS = set([
|
||||||
'.cc',
|
'.cc',
|
||||||
'.cpp',
|
'.cpp',
|
||||||
|
@ -320,12 +326,15 @@ class MakefileGenerator(object):
|
||||||
cflags_mozilla = config.get('cflags_mozilla')
|
cflags_mozilla = config.get('cflags_mozilla')
|
||||||
if cflags_mozilla:
|
if cflags_mozilla:
|
||||||
data['CPPFLAGS_%s' % configname] = cflags_mozilla
|
data['CPPFLAGS_%s' % configname] = cflags_mozilla
|
||||||
|
asflags_mozilla = config.get('asflags_mozilla')
|
||||||
|
if asflags_mozilla:
|
||||||
|
data['ASFLAGS_%s' % configname] = asflags_mozilla
|
||||||
sources = {
|
sources = {
|
||||||
'CPPSRCS': {'exts': CPLUSPLUS_EXTENSIONS, 'files': []},
|
'CPPSRCS': {'exts': CPLUSPLUS_EXTENSIONS, 'files': []},
|
||||||
'CSRCS': {'exts': ['.c'], 'files': []},
|
'CSRCS': {'exts': ['.c'], 'files': []},
|
||||||
'CMSRCS': {'exts': ['.m'], 'files': []},
|
'CMSRCS': {'exts': ['.m'], 'files': []},
|
||||||
'CMMSRCS': {'exts': ['.mm'], 'files': []},
|
'CMMSRCS': {'exts': ['.mm'], 'files': []},
|
||||||
'ASFILES': {'exts': ['.s'], 'files': []},
|
'SSRCS': {'exts': AS_EXTENSIONS, 'files': []},
|
||||||
}
|
}
|
||||||
copy_srcs = []
|
copy_srcs = []
|
||||||
for s in spec.get('sources', []):
|
for s in spec.get('sources', []):
|
||||||
|
|
|
@ -34,4 +34,19 @@
|
||||||
'-mfpu=neon',
|
'-mfpu=neon',
|
||||||
'-flax-vector-conversions',
|
'-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',],
|
'defines': ['WEBRTC_ARCH_ARM_V7',],
|
||||||
'conditions': [
|
'conditions': [
|
||||||
['arm_neon==1', {
|
['arm_neon==1', {
|
||||||
'defines': ['WEBRTC_ARCH_ARM_NEON',],
|
'defines': ['WEBRTC_ARCH_ARM_NEON',
|
||||||
}, {
|
'WEBRTC_BUILD_NEON_LIBS',
|
||||||
'defines': ['WEBRTC_DETECT_ARM_NEON',],
|
'WEBRTC_DETECT_ARM_NEON'],
|
||||||
}],
|
}],
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
|
|
|
@ -64,6 +64,7 @@ AudioDeviceAndroidOpenSLES::AudioDeviceAndroidOpenSLES(const WebRtc_Word32 id)
|
||||||
playout_delay_(0),
|
playout_delay_(0),
|
||||||
recording_delay_(0),
|
recording_delay_(0),
|
||||||
agc_enabled_(false),
|
agc_enabled_(false),
|
||||||
|
rec_thread_(NULL),
|
||||||
rec_timer_(*EventWrapper::Create()),
|
rec_timer_(*EventWrapper::Create()),
|
||||||
mic_sampling_rate_(N_REC_SAMPLES_PER_SEC * 1000),
|
mic_sampling_rate_(N_REC_SAMPLES_PER_SEC * 1000),
|
||||||
speaker_sampling_rate_(N_PLAY_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) {
|
void AudioDeviceAndroidOpenSLES::CheckErr(SLresult res) {
|
||||||
if (res != SL_RESULT_SUCCESS) {
|
if (res != SL_RESULT_SUCCESS) {
|
||||||
WEBRTC_OPENSL_TRACE(kTraceError, kTraceAudioDevice, id_,
|
WEBRTC_OPENSL_TRACE(kTraceError, kTraceAudioDevice, id_,
|
||||||
" AudioDeviceAndroidOpenSLES::CheckErr(%d)", res);
|
" AudioDeviceAndroidOpenSLES::CheckErr(%lu)", res);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ const WebRtc_UWord32 PLAY_MAX_TEMP_BUF_SIZE_PER_10ms =
|
||||||
const WebRtc_UWord16 N_PLAY_QUEUE_BUFFERS = 8;
|
const WebRtc_UWord16 N_PLAY_QUEUE_BUFFERS = 8;
|
||||||
// Number of buffers in recording queue
|
// Number of buffers in recording queue
|
||||||
// TODO(xian): Reduce the numbers of buffers to improve the latency.
|
// 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
|
// Some values returned from getMinBufferSize
|
||||||
// (Nexus S playout 72ms, recording 64ms)
|
// (Nexus S playout 72ms, recording 64ms)
|
||||||
// (Galaxy, 167ms, 44ms)
|
// (Galaxy, 167ms, 44ms)
|
||||||
|
|
|
@ -177,11 +177,14 @@
|
||||||
'audio_processing_offsets',
|
'audio_processing_offsets',
|
||||||
],
|
],
|
||||||
# TODO(kma): port this block from Android into other build systems.
|
# 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',
|
'aecm/aecm_core_neon.S',
|
||||||
'ns/nsx_core_neon.S',
|
'ns/nsx_core_neon.S',
|
||||||
],
|
],
|
||||||
'sources!': [
|
'sources': [
|
||||||
'aecm/aecm_core_neon.c',
|
'aecm/aecm_core_neon.c',
|
||||||
'ns/nsx_core_neon.c',
|
'ns/nsx_core_neon.c',
|
||||||
],
|
],
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
'enable_protobuf': 0,
|
'enable_protobuf': 0,
|
||||||
'include_pulse_audio': 0,
|
'include_pulse_audio': 0,
|
||||||
'include_tests': 0,
|
'include_tests': 0,
|
||||||
|
'enable_android_opensl': 1,
|
||||||
# use_system_lib* still seems to be in use in trunk/build
|
# use_system_lib* still seems to be in use in trunk/build
|
||||||
'use_system_libjpeg': 0,
|
'use_system_libjpeg': 0,
|
||||||
'use_system_libvpx': 0,
|
'use_system_libvpx': 0,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче