From 2f7d1473b6f2f92c7a31dd4bcf63ff59ed8536a2 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Thu, 22 Mar 2012 16:50:42 +0100 Subject: [PATCH] Added multicore option for MS --- src/org/linphone/LinphoneManager.java | 4 ++++ src/org/linphone/core/LinphoneCoreImpl.java | 6 ++++++ submodules/externals/build/libvpx/Android.mk | 8 ++++---- submodules/externals/build/libvpx/vpx_config.h | 2 +- submodules/linphone | 2 +- 5 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/org/linphone/LinphoneManager.java b/src/org/linphone/LinphoneManager.java index 9334c2834..406110e2a 100644 --- a/src/org/linphone/LinphoneManager.java +++ b/src/org/linphone/LinphoneManager.java @@ -469,6 +469,10 @@ public final class LinphoneManager implements LinphoneCoreListener { mLc.setPlayFile(mPauseSoundFile); mLc.setVideoPolicy(isAutoInitiateVideoCalls(), isAutoAcceptCamera()); + int availableCores = Runtime.getRuntime().availableProcessors(); + Log.w("MediaStreamer : " + availableCores + " cores detected and configured"); + mLc.setCpuCount(availableCores); + try { initFromConf(); } catch (LinphoneException e) { diff --git a/src/org/linphone/core/LinphoneCoreImpl.java b/src/org/linphone/core/LinphoneCoreImpl.java index 939a022d2..92faacc55 100644 --- a/src/org/linphone/core/LinphoneCoreImpl.java +++ b/src/org/linphone/core/LinphoneCoreImpl.java @@ -706,4 +706,10 @@ class LinphoneCoreImpl implements LinphoneCore { public void setUserAgent(String name, String version) { setUserAgent(nativePtr,name,version); } + + private native void setCpuCountNative(int count); + public void setCpuCount(int count) + { + setCpuCountNative(count); + } } diff --git a/submodules/externals/build/libvpx/Android.mk b/submodules/externals/build/libvpx/Android.mk index 631a67d3d..39e61d162 100755 --- a/submodules/externals/build/libvpx/Android.mk +++ b/submodules/externals/build/libvpx/Android.mk @@ -86,7 +86,7 @@ VP8_CX_SRCS += vp8/encoder/encodeframe.c VP8_CX_SRCS += vp8/encoder/encodeintra.c VP8_CX_SRCS += vp8/encoder/encodemb.c VP8_CX_SRCS += vp8/encoder/encodemv.c -#VP8_CX_SRCS += vp8/encoder/ethreading.c +VP8_CX_SRCS += vp8/encoder/ethreading.c # VP8_CX_SRCS += vp8/encoder/generic/csystemdependent.c VP8_CX_SRCS += vp8/encoder/lookahead.c VP8_CX_SRCS += vp8/encoder/mcomp.c @@ -210,10 +210,10 @@ VP8_DX_SRCS += vp8/decoder/dequantize.c VP8_DX_SRCS += vp8/decoder/detokenize.c VP8_DX_SRCS += vp8/decoder/error_concealment.c VP8_DX_SRCS += vp8/decoder/generic/dsystemdependent.c +VP8_DX_SRCS += vp8/decoder/reconintra_mt.c # +VP8_DX_SRCS += vp8/decoder/threading.c # VP8_DX_SRCS += vp8/decoder/onyxd_if.c -#VP8_DX_SRCS += vp8/decoder/threading.c VP8_DX_SRCS += vp8/decoder/idct_blk.c -#VP8_DX_SRCS += vp8/decoder/reconintra_mt.c ### vpx_codec API_SRCS = vpx/src/vpx_decoder.c @@ -235,7 +235,7 @@ LOCAL_MODULE_CLASS := STATIC_LIBRARIES LOCAL_C_INCLUDES += \ $(LOCAL_PATH) \ - $(LOCAL_PATH)/vpx_ports \ + $(LOCAL_PATH)/vpx_ports \ $(LOCAL_PATH)/vp8/common \ $(LOCAL_PATH)/vp8/encoder \ $(LOCAL_PATH)/vp8/decoder \ diff --git a/submodules/externals/build/libvpx/vpx_config.h b/submodules/externals/build/libvpx/vpx_config.h index 421b189e9..3839abb57 100644 --- a/submodules/externals/build/libvpx/vpx_config.h +++ b/submodules/externals/build/libvpx/vpx_config.h @@ -51,7 +51,7 @@ #define CONFIG_DC_RECON 0 #define CONFIG_RUNTIME_CPU_DETECT 1 #define CONFIG_POSTPROC 0 -#define CONFIG_MULTITHREAD 0 +#define CONFIG_MULTITHREAD 1 #define CONFIG_INTERNAL_STATS 0 #define CONFIG_VP8_ENCODER 1 #define CONFIG_VP8_DECODER 1 diff --git a/submodules/linphone b/submodules/linphone index 7f873403b..0a21e2c32 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 7f873403bf99fd29ae6c6d5ed957522ac69d60f6 +Subproject commit 0a21e2c322aad67fe75a6f42d6c7dd535946dfff