From cb66cb39703ae4199241931f7e0b3d92bbef3947 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Sat, 18 Jul 2020 11:19:55 +0530 Subject: silk: Fix incorrect ifdef in debug.c Signed-off-by: Mark Harris --- silk/debug.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'silk') diff --git a/silk/debug.c b/silk/debug.c index 71e69cc6..4f02912b 100644 --- a/silk/debug.c +++ b/silk/debug.c @@ -37,14 +37,13 @@ POSSIBILITY OF SUCH DAMAGE. #if SILK_TIC_TOC -#ifdef _WIN32 - #if (defined(_WIN32) || defined(_WINCE)) #include /* timer */ #else /* Linux or Mac*/ #include #endif +#ifdef _WIN32 unsigned long silk_GetHighResolutionTime(void) /* O time in usec*/ { /* Returns a time counter in microsec */ -- cgit v1.2.3 From 907a52315dd55811701fc6e778799e6d62f2c508 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Sat, 18 Jul 2020 11:18:23 +0530 Subject: Replace WIN32 with _WIN32 everywhere _WIN32 is defined on all Windows platforms by every compiler that targets Windows. We do not need WIN32 at all. Signed-off-by: Mark Harris Resolves https://github.com/xiph/opus/pull/104 --- silk/debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'silk') diff --git a/silk/debug.c b/silk/debug.c index 4f02912b..eb0c36ef 100644 --- a/silk/debug.c +++ b/silk/debug.c @@ -67,7 +67,7 @@ unsigned long GetHighResolutionTime(void) /* O time in usec*/ int silk_Timer_nTimers = 0; int silk_Timer_depth_ctr = 0; char silk_Timer_tags[silk_NUM_TIMERS_MAX][silk_NUM_TIMERS_MAX_TAG_LEN]; -#ifdef WIN32 +#ifdef _WIN32 LARGE_INTEGER silk_Timer_start[silk_NUM_TIMERS_MAX]; #else unsigned long silk_Timer_start[silk_NUM_TIMERS_MAX]; @@ -78,7 +78,7 @@ opus_int64 silk_Timer_sum[silk_NUM_TIMERS_MAX]; opus_int64 silk_Timer_max[silk_NUM_TIMERS_MAX]; opus_int64 silk_Timer_depth[silk_NUM_TIMERS_MAX]; -#ifdef WIN32 +#ifdef _WIN32 void silk_TimerSave(char *file_name) { if( silk_Timer_nTimers > 0 ) -- cgit v1.2.3 From c2b542b6c02bafbe7a83b2eeec6cb5a0bfa3ed0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sat, 19 Mar 2016 15:40:22 +0000 Subject: Add support for Meson build system Tested on: - Linux/x86* with gcc - Android armv7 arm64 x86 x86_64 with clang - Windows x86 x86_64 with Visual Studio 2017 - Windows x86 x86_64 with MinGW - macOS x86_64 with clang - iOS arm64 x86_64 with clang Co-authored by: Nirbheek Chauhan https://gitlab.xiph.org/xiph/opus/-/merge_requests/13 --- silk/meson.build | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++ silk/tests/meson.build | 8 ++++++++ 2 files changed, 61 insertions(+) create mode 100644 silk/meson.build create mode 100644 silk/tests/meson.build (limited to 'silk') diff --git a/silk/meson.build b/silk/meson.build new file mode 100644 index 00000000..70692372 --- /dev/null +++ b/silk/meson.build @@ -0,0 +1,53 @@ +silk_sources = sources['SILK_SOURCES'] + +silk_sources_sse4_1 = sources['SILK_SOURCES_SSE4_1'] + +silk_sources_neon_intr = sources['SILK_SOURCES_ARM_NEON_INTR'] + +silk_sources_fixed_neon_intr = sources['SILK_SOURCES_FIXED_ARM_NEON_INTR'] + +silk_sources_fixed = sources['SILK_SOURCES_FIXED'] + +silk_sources_fixed_sse4_1 = sources['SILK_SOURCES_FIXED_SSE4_1'] + +silk_sources_float = sources['SILK_SOURCES_FLOAT'] + +if opt_fixed_point + silk_sources += silk_sources_fixed +else + silk_sources += silk_sources_float +endif + +silk_includes = [opus_includes, include_directories('float', 'fixed')] +silk_static_libs = [] + +foreach intr_name : ['sse4_1', 'neon_intr'] + have_intr = get_variable('have_' + intr_name) + if not have_intr + continue + endif + + intr_sources = get_variable('silk_sources_' + intr_name) + if opt_fixed_point + intr_sources += get_variable('silk_sources_fixed_' + intr_name) + endif + + intr_args = get_variable('opus_@0@_args'.format(intr_name), []) + silk_static_libs += static_library('silk_' + intr_name, intr_sources, + c_args: intr_args, + include_directories: silk_includes, + install: false) +endforeach + +silk_c_args = [] +if host_machine.system() == 'windows' + silk_c_args += ['-DDLL_EXPORT'] +endif + +silk_lib = static_library('opus-silk', + silk_sources, + c_args: silk_c_args, + include_directories: silk_includes, + link_whole: silk_static_libs, + dependencies: libm, + install: false) diff --git a/silk/tests/meson.build b/silk/tests/meson.build new file mode 100644 index 00000000..b7c70f75 --- /dev/null +++ b/silk/tests/meson.build @@ -0,0 +1,8 @@ +exe = executable('test_unit_LPC_inv_pred_gain', + 'test_unit_LPC_inv_pred_gain.c', '../LPC_inv_pred_gain.c', + include_directories: opus_includes, + link_with: [celt_lib, celt_static_libs, silk_lib, silk_static_libs], + dependencies: libm, + install: false) + +test(test_name, exe) -- cgit v1.2.3