Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mediastreamer2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
External Wiki
External Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
BC
public
mediastreamer2
Commits
2f5bff8c
Commit
2f5bff8c
authored
Apr 06, 2016
by
Gautier Pelloux-Prayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msresample.c: fix NEON detection for ios arm64
parent
2463515a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
200 additions
and
16 deletions
+200
-16
msresample.c
src/audiofilters/msresample.c
+14
-16
project.pbxproj
src/src.xcodeproj/project.pbxproj
+186
-0
No files found.
src/audiofilters/msresample.c
View file @
2f5bff8c
...
...
@@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifdef ANDROID
#include "cpu-features.h"
#endif
typedef
struct
_ResampleData
{
MSBufferizer
*
bz
;
uint32_t
ts
;
...
...
@@ -63,9 +63,8 @@ static void resample_data_destroy(ResampleData *obj){
static
void
resample_init
(
MSFilter
*
obj
){
ResampleData
*
data
=
resample_data_new
();
#ifdef SPEEX_LIB_SET_CPU_FEATURES
#if defined(__arm__) || defined(_M_ARM)
#ifdef ANDROID
if
(
android_getCpuFamily
()
==
ANDROID_CPU_FAMILY_ARM
if
(
android_getCpuFamily
()
==
ANDROID_CPU_FAMILY_ARM
&&
(
android_getCpuFeatures
()
&
ANDROID_CPU_ARM_FEATURE_NEON
)
!=
0
)
{
data
->
cpuFeatures
=
SPEEX_LIB_CPU_FEATURE_NEON
;
}
...
...
@@ -73,7 +72,6 @@ static void resample_init(MSFilter *obj){
data
->
cpuFeatures
=
SPEEX_LIB_CPU_FEATURE_NEON
;
#endif
ms_message
(
"speex_lib_ctl init with neon ? %d"
,
(
data
->
cpuFeatures
==
SPEEX_LIB_CPU_FEATURE_NEON
));
#endif
speex_lib_ctl
(
SPEEX_LIB_SET_CPU_FEATURES
,
&
data
->
cpuFeatures
);
#else
ms_message
(
"speex_lib_ctl does not support SPEEX_LIB_CPU_FEATURE_NEON"
);
...
...
@@ -82,7 +80,7 @@ static void resample_init(MSFilter *obj){
}
static
void
resample_uninit
(
MSFilter
*
obj
){
resample_data_destroy
((
ResampleData
*
)
obj
->
data
);
resample_data_destroy
((
ResampleData
*
)
obj
->
data
);
}
static
int
resample_channel_adapt
(
int
in_nchannels
,
int
out_nchannels
,
mblk_t
*
im
,
mblk_t
**
om
)
{
...
...
@@ -130,7 +128,7 @@ static void resample_preprocess(MSFilter *obj){
static
void
resample_process_ms2
(
MSFilter
*
obj
){
ResampleData
*
dt
=
(
ResampleData
*
)
obj
->
data
;
mblk_t
*
im
,
*
om
=
NULL
,
*
om_chan
=
NULL
;
if
(
dt
->
output_rate
==
dt
->
input_rate
){
while
((
im
=
ms_queue_get
(
obj
->
inputs
[
0
]))
!=
NULL
){
if
(
resample_channel_adapt
(
dt
->
in_nchannels
,
dt
->
out_nchannels
,
im
,
&
om
)
==
0
)
{
...
...
@@ -155,7 +153,7 @@ static void resample_process_ms2(MSFilter *obj){
resample_init_speex
(
dt
);
}
while
((
im
=
ms_queue_get
(
obj
->
inputs
[
0
]))
!=
NULL
){
spx_uint32_t
inlen
=
(
spx_uint32_t
)((
im
->
b_wptr
-
im
->
b_rptr
)
/
(
2
*
dt
->
in_nchannels
));
spx_uint32_t
outlen
=
(
spx_uint32_t
)(((
inlen
*
dt
->
output_rate
)
/
dt
->
input_rate
)
+
1
);
...
...
@@ -163,17 +161,17 @@ static void resample_process_ms2(MSFilter *obj){
om
=
allocb
(
outlen
*
2
*
dt
->
in_nchannels
,
0
);
mblk_meta_copy
(
im
,
om
);
if
(
dt
->
in_nchannels
==
1
){
speex_resampler_process_int
(
dt
->
handle
,
0
,
(
spx_int16_t
*
)
im
->
b_rptr
,
&
inlen
,
(
spx_int16_t
*
)
om
->
b_wptr
,
speex_resampler_process_int
(
dt
->
handle
,
0
,
(
spx_int16_t
*
)
im
->
b_rptr
,
&
inlen
,
(
spx_int16_t
*
)
om
->
b_wptr
,
&
outlen
);
}
else
{
speex_resampler_process_interleaved_int
(
dt
->
handle
,
(
int16_t
*
)
im
->
b_rptr
,
&
inlen
,
(
int16_t
*
)
om
->
b_wptr
,
speex_resampler_process_interleaved_int
(
dt
->
handle
,
(
int16_t
*
)
im
->
b_rptr
,
&
inlen
,
(
int16_t
*
)
om
->
b_wptr
,
&
outlen
);
}
if
(
inlen_orig
!=
inlen
){
...
...
src/src.xcodeproj/project.pbxproj
0 → 100644
View file @
2f5bff8c
// !$*UTF8*$!
{
archiveVersion
=
1
;
classes
=
{
};
objectVersion
=
46
;
objects
=
{
/* Begin PBXFileReference section */
631C40021CB5029400EAE960
/* .DS_Store */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file
;
path
=
.DS_Store
;
sourceTree
=
"<group>"
;
};
631C40031CB5029400EAE960
/* .gitignore */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
text
;
path
=
.gitignore
;
sourceTree
=
"<group>"
;
};
631C40041CB5029400EAE960
/* android */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
folder
;
path
=
android
;
sourceTree
=
"<group>"
;
};
631C40051CB5029400EAE960
/* audiofilters */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
folder
;
path
=
audiofilters
;
sourceTree
=
"<group>"
;
};
631C40061CB5029400EAE960
/* base */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
folder
;
path
=
base
;
sourceTree
=
"<group>"
;
};
631C40071CB5029400EAE960
/* CMakeLists.txt */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
text
;
path
=
CMakeLists.txt
;
sourceTree
=
"<group>"
;
};
631C40081CB5029400EAE960
/* crypto */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
folder
;
path
=
crypto
;
sourceTree
=
"<group>"
;
};
631C40091CB5029400EAE960
/* dxfilter.cpp */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.cpp.cpp
;
path
=
dxfilter.cpp
;
sourceTree
=
"<group>"
;
};
631C400A1CB5029400EAE960
/* dxfilter.h */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
dxfilter.h
;
sourceTree
=
"<group>"
;
};
631C400B1CB5029400EAE960
/* filter-template.c */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.c
;
path
=
"filter-template.c"
;
sourceTree
=
"<group>"
;
};
631C400C1CB5029400EAE960
/* generate_descs_header.cmake */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
text
;
path
=
generate_descs_header.cmake
;
sourceTree
=
"<group>"
;
};
631C400D1CB5029400EAE960
/* generate_yuv2rgb_header.cmake */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
text
;
path
=
generate_yuv2rgb_header.cmake
;
sourceTree
=
"<group>"
;
};
631C400E1CB5029400EAE960
/* gitversion.cmake */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
text
;
path
=
gitversion.cmake
;
sourceTree
=
"<group>"
;
};
631C400F1CB5029400EAE960
/* gitversion.h.in */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
text
;
path
=
gitversion.h.in
;
sourceTree
=
"<group>"
;
};
631C40101CB5029400EAE960
/* libsrtp.map */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
"sourcecode.module-map"
;
path
=
libsrtp.map
;
sourceTree
=
"<group>"
;
};
631C40111CB5029400EAE960
/* Makefile.am */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
text
;
path
=
Makefile.am
;
sourceTree
=
"<group>"
;
};
631C40121CB5029400EAE960
/* ortp-deps */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
folder
;
path
=
"ortp-deps"
;
sourceTree
=
"<group>"
;
};
631C40131CB5029400EAE960
/* otherfilters */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
folder
;
path
=
otherfilters
;
sourceTree
=
"<group>"
;
};
631C40141CB5029400EAE960
/* upnp */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
folder
;
path
=
upnp
;
sourceTree
=
"<group>"
;
};
631C40151CB5029400EAE960
/* utils */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
folder
;
path
=
utils
;
sourceTree
=
"<group>"
;
};
631C40161CB5029400EAE960
/* videofilters */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
folder
;
path
=
videofilters
;
sourceTree
=
"<group>"
;
};
631C40171CB5029400EAE960
/* voip */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
folder
;
path
=
voip
;
sourceTree
=
"<group>"
;
};
631C40181CB5029400EAE960
/* yuv2rgb.fs */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.glsl
;
path
=
yuv2rgb.fs
;
sourceTree
=
"<group>"
;
};
631C40191CB5029400EAE960
/* yuv2rgb.fs.h */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
yuv2rgb.fs.h
;
sourceTree
=
"<group>"
;
};
631C401A1CB5029400EAE960
/* yuv2rgb.vs */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.glsl
;
path
=
yuv2rgb.vs
;
sourceTree
=
"<group>"
;
};
631C401B1CB5029400EAE960
/* yuv2rgb.vs.h */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
yuv2rgb.vs.h
;
sourceTree
=
"<group>"
;
};
/* End PBXFileReference section */
/* Begin PBXGroup section */
631C3FFC1CB5029400EAE960
=
{
isa
=
PBXGroup
;
children
=
(
631C40021CB5029400EAE960
/* .DS_Store */
,
631C40031CB5029400EAE960
/* .gitignore */
,
631C40041CB5029400EAE960
/* android */
,
631C40051CB5029400EAE960
/* audiofilters */
,
631C40061CB5029400EAE960
/* base */
,
631C40071CB5029400EAE960
/* CMakeLists.txt */
,
631C40081CB5029400EAE960
/* crypto */
,
631C40091CB5029400EAE960
/* dxfilter.cpp */
,
631C400A1CB5029400EAE960
/* dxfilter.h */
,
631C400B1CB5029400EAE960
/* filter-template.c */
,
631C400C1CB5029400EAE960
/* generate_descs_header.cmake */
,
631C400D1CB5029400EAE960
/* generate_yuv2rgb_header.cmake */
,
631C400E1CB5029400EAE960
/* gitversion.cmake */
,
631C400F1CB5029400EAE960
/* gitversion.h.in */
,
631C40101CB5029400EAE960
/* libsrtp.map */
,
631C40111CB5029400EAE960
/* Makefile.am */
,
631C40121CB5029400EAE960
/* ortp-deps */
,
631C40131CB5029400EAE960
/* otherfilters */
,
631C40141CB5029400EAE960
/* upnp */
,
631C40151CB5029400EAE960
/* utils */
,
631C40161CB5029400EAE960
/* videofilters */
,
631C40171CB5029400EAE960
/* voip */
,
631C40181CB5029400EAE960
/* yuv2rgb.fs */
,
631C40191CB5029400EAE960
/* yuv2rgb.fs.h */
,
631C401A1CB5029400EAE960
/* yuv2rgb.vs */
,
631C401B1CB5029400EAE960
/* yuv2rgb.vs.h */
,
);
sourceTree
=
"<group>"
;
};
/* End PBXGroup section */
/* Begin PBXLegacyTarget section */
631C40011CB5029400EAE960
/* src */
=
{
isa
=
PBXLegacyTarget
;
buildArgumentsString
=
"$(ACTION)"
;
buildConfigurationList
=
631C401C1CB5029400EAE960
/* Build configuration list for PBXLegacyTarget "src" */
;
buildPhases
=
(
);
buildToolPath
=
/usr/bin/make
;
buildWorkingDirectory
=
"/Users/gpelloux/code/ios/linphone-iphone/submodules/linphone/mediastreamer2/src"
;
dependencies
=
(
);
name
=
src
;
passBuildSettingsInEnvironment
=
1
;
productName
=
src
;
};
/* End PBXLegacyTarget section */
/* Begin PBXProject section */
631C3FFD1CB5029400EAE960
/* Project object */
=
{
isa
=
PBXProject
;
attributes
=
{
};
buildConfigurationList
=
631C40001CB5029400EAE960
/* Build configuration list for PBXProject "src" */
;
compatibilityVersion
=
"Xcode 3.2"
;
developmentRegion
=
English
;
hasScannedForEncodings
=
0
;
knownRegions
=
(
en
,
);
mainGroup
=
631C3FFC1CB5029400EAE960
;
projectDirPath
=
""
;
projectRoot
=
""
;
targets
=
(
631C40011CB5029400EAE960
/* src */
,
);
};
/* End PBXProject section */
/* Begin XCBuildConfiguration section */
631C3FFE1CB5029400EAE960
/* Debug */
=
{
isa
=
XCBuildConfiguration
;
buildSettings
=
{
ARCHS
=
"$(ARCHS_STANDARD_32_BIT)"
;
COPY_PHASE_STRIP
=
NO
;
GCC_WARN_ABOUT_RETURN_TYPE
=
YES
;
GCC_WARN_UNUSED_VARIABLE
=
YES
;
ONLY_ACTIVE_ARCH
=
YES
;
SDKROOT
=
macosx10.6
;
};
name
=
Debug
;
};
631C3FFF1CB5029400EAE960
/* Release */
=
{
isa
=
XCBuildConfiguration
;
buildSettings
=
{
ARCHS
=
"$(ARCHS_STANDARD_32_BIT)"
;
COPY_PHASE_STRIP
=
YES
;
GCC_WARN_ABOUT_RETURN_TYPE
=
YES
;
GCC_WARN_UNUSED_VARIABLE
=
YES
;
SDKROOT
=
macosx10.6
;
};
name
=
Release
;
};
631C401D1CB5029400EAE960
/* Debug */
=
{
isa
=
XCBuildConfiguration
;
buildSettings
=
{
COPY_PHASE_STRIP
=
NO
;
DEBUGGING_SYMBOLS
=
YES
;
GCC_DYNAMIC_NO_PIC
=
NO
;
GCC_ENABLE_FIX_AND_CONTINUE
=
YES
;
GCC_GENERATE_DEBUGGING_SYMBOLS
=
YES
;
GCC_OPTIMIZATION_LEVEL
=
0
;
OTHER_CFLAGS
=
""
;
OTHER_LDFLAGS
=
""
;
PRODUCT_NAME
=
src
;
};
name
=
Debug
;
};
631C401E1CB5029400EAE960
/* Release */
=
{
isa
=
XCBuildConfiguration
;
buildSettings
=
{
COPY_PHASE_STRIP
=
YES
;
DEBUG_INFORMATION_FORMAT
=
"dwarf-with-dsym"
;
GCC_ENABLE_FIX_AND_CONTINUE
=
NO
;
OTHER_CFLAGS
=
""
;
OTHER_LDFLAGS
=
""
;
PRODUCT_NAME
=
src
;
};
name
=
Release
;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
631C40001CB5029400EAE960
/* Build configuration list for PBXProject "src" */
=
{
isa
=
XCConfigurationList
;
buildConfigurations
=
(
631C3FFE1CB5029400EAE960
/* Debug */
,
631C3FFF1CB5029400EAE960
/* Release */
,
);
defaultConfigurationIsVisible
=
0
;
defaultConfigurationName
=
Release
;
};
631C401C1CB5029400EAE960
/* Build configuration list for PBXLegacyTarget "src" */
=
{
isa
=
XCConfigurationList
;
buildConfigurations
=
(
631C401D1CB5029400EAE960
/* Debug */
,
631C401E1CB5029400EAE960
/* Release */
,
);
defaultConfigurationIsVisible
=
0
;
defaultConfigurationName
=
Release
;
};
/* End XCConfigurationList section */
};
rootObject
=
631C3FFD1CB5029400EAE960
/* Project object */
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment