Log in or register to post comments

Samsung Galaxy S5 Running Slow

August 4, 2014 - 2:45am #1

Description of the issue:

I've got a Unity3D game in which I followed the BackgroundTextureAccess sample to get the camera feed as game background,the problem is that on Samsung Galaxy S5 the game runs very slow despide it running at 40+ fps on Galaxy S4 and S3. On the android forum I saw that S5 takes pictures slower when image stabilization is on,maybe this is the problem.Is there a way to turn image stabilization off?

Exact Device Model number:

Samsung Galaxy S5 (probably Asia version since my client is from Bangladesh)

Installed OS version:

Android 4.1.2

Vuforia SDK version

Vuforia SDK 3.0.9

Back/Front Camera:

The issue occurs with Back camera.

Camera Mode:

The issue occurs when using  MODE_OPTIMIZE_SPEED.

Concurrent camera access:

I am not aware of any other software running on my device that may try to access the Camera while Vuforia is running. I would tend to exclude this.

 

If you need other informations I will talk to my client to get a logcat from him.I would like to try to turn off galaxy s5 image stabilization off,can I do that with Vuforia or do I need to search for another solution to turn off image stabilization?

Samsung Galaxy S5 Running Slow

September 4, 2014 - 7:24am #4

Hi Mihailout, you mentioned in your post

despide it running at 40+ fps on Galaxy S4 and S3

I'm very interested in this result. since per my measurement I've never achieved a frame rate larger than 30fps in average.

I set VideoBackgroundConfig.setSynchronous(false) and sums the total calls of onFrame() method in 1 seconds. This way I get the average frame rate in every seconds.

How did you compute your frame rate?

btw I tested the image stabilization function on Samsung S5. It has a little improvement in the speed BUT I've never experienced memory problem on S5 yet. Could it be that your texture pngs are too large?

Samsung Galaxy S5 Running Slow

August 10, 2014 - 5:38am #3

Told my cliend to do that but no luck. I managed to get a logcat from him,take a look plz maybe you see something from vuforia that it's cpu/gpu heavy.

The device is a samsung - SM-G900H .Thanks for the help.

00:02 W/ContextImpl: Failed to ensure directory: /storage/extSdCard/Android/obb/com.IOnCompany.Oreogiv
00:02 I/System.out: pool-1-thread-1 calls detatch()
00:04 W/linker: libVuforia.so has text relocations. This is wasting memory and is a security risk. Please fix.
00:04 D/QCAR: Found unity version file in activity assets.
00:04 D/QCAR: Could not find unity version file in internal file dir: /data/data/com.IOnCompany.Oreogiv/files/unity.txt: open failed: ENOENT (No such file or directory)
00:04 D/QCAR: Could not find unity version file in external file dir: /storage/emulated/0/Android/data/com.IOnCompany.Oreogiv/files/unity.txt: open failed: ENOENT (No such file or directory)
00:04 D/QCAR: Setting Unity version 4.5.2
00:04 D/QCAR: QCAR Extension version 3.0.9
00:04 I/AR: QCAR has been initialized successfully
00:04 I/AR: QCAR SDK version 3.0.9
00:06 I/QCAR: QCAR initialization successful
00:06 I/QCAR: Initializing UnityPlayer
00:06 I/System.out: FinalizerDaemon calls detatch()
00:06 D/Unity: GL_EXT_debug_marker GL_ARM_rgba8 GL_ARM_mali_shader_binary GL_OES_depth24 GL_OES_depth_texture GL_OES_depth_texture_cube_map GL_OES_packed_depth_stencil GL_OES_rgb8_rgba8 GL_EXT_read_format_bgra GL_OES_compressed_paletted_texture GL_OES_compressed_ETC1_RGB8_texture GL_OES_standard_derivatives GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_texture_npot GL_OES_vertex_half_float GL_OES_required_internalformat GL_OES_vertex_array_object GL_OES_mapbuffer GL_EXT_texture_format_BGRA8888 GL_EXT_texture_rg GL_EXT_texture_type_2_10_10_10_REV GL_OES_fbo_render_mipmap GL_OES_element_index_uint GL_EXT_shadow_samplers GL_OES_texture_compression_astc GL_KHR_texture_compression_astc_ldr GL_KHR_texture_compression_astc_hdr GL_KHR_debug GL_EXT_occlusion_query_boolean GL_EXT_blend_minmax GL_EXT_discard_framebuffer GL_OES_get_program_binary GL_OES_texture_3D GL_EXT_texture_storage GL_EXT_multisampled_render_to_texture GL_OES_surfaceless_context GL_ARM_shader_local_storage GL_ARM_shader_framebuffer_fetch GL_AR
00:06 D/Unity: M_shader_framebuffer_fetch_depth_stencil GL_ARM_mali_program_binary 
00:06 I/Unity: Default GameObject Tag: Player already registered
00:06 I/Unity:  
00:06 I/Unity: (Filename:  Line: 66)
00:06 I/Unity: 
00:06 I/dalvikvm-heap: Grow heap (frag case) to 26.283MB for 8294416-byte allocation
00:07 I/System.out: pool-4-thread-1 calls detatch()
00:08 I/Unity: Can't add component because class 'PremiumObjectFactoryStarterBehaviour' doesn't exist!
00:08 I/Unity:  
00:08 I/Unity: (Filename:  Line: 38)
00:08 I/Unity: 
00:08 I/Unity: Can't add component because class 'PremiumComponentFactoryStarterBehaviour' doesn't exist!
00:08 I/Unity:  
00:08 I/Unity: (Filename:  Line: 38)
00:08 I/Unity: 
00:08 I/Unity: QCARWrapper.Start
00:08 I/Unity:  
00:08 I/Unity: (Filename: ./artifacts/AndroidManagedGenerated/UnityEngineDebug.cpp Line: 49)
00:08 I/Unity: 
00:08 D/QCAR: trackerManagerInitTracker
00:08 D/QCAR: trackerManagerInitTracker
00:08 I/Unity: SetHint
00:08 I/Unity:  
00:08 I/Unity: (Filename: ./artifacts/AndroidManagedGenerated/UnityEngineDebug.cpp Line: 49)
00:08 I/Unity: 
00:08 D/QCAR: Setting Unity version 4.5.2
00:08 I/Unity: StartQCAR
00:08 I/Unity:  
00:08 I/Unity: (Filename: ./artifacts/AndroidManagedGenerated/UnityEngineDebug.cpp Line: 49)
00:08 I/Unity: 
00:08 D/QCAR: cameraDeviceInitCamera
00:09 D/QCAR: cameraDeviceGetVideoMode
00:09 D/QCAR: cameraDeviceSelectVideoMode
00:09 D/QCAR: cameraDeviceStartCamera
00:09 D/QCAR: markerTrackerStart
00:09 D/QCAR: imageTrackerStart
00:10 I/Unity: Using SDK 5.1.0, Build 140401.725cc2ecbc9002a
00:10 I/Unity:  
00:10 I/Unity: (Filename: ./artifacts/AndroidManagedGenerated/UnityEngineDebug.cpp Line: 49)
00:10 I/Unity: 
00:10 D/QCAR: cameraDeviceGetVideoMode
00:10 D/QCAR: cameraDeviceGetVideoMode
00:12 I/System.out: pool-6-thread-1 calls detatch()
00:12 I/Unity: Setting camera clear flags to depth only
00:12 I/Unity:  
00:12 I/Unity: (Filename: ./artifacts/AndroidManagedGenerated/UnityEngineDebug.cpp Line: 49)
00:12 I/Unity: 
00:14 I/System.out: pool-7-thread-1 calls detatch()
00:17 I/Unity: Login
00:17 I/Unity:  
00:17 I/Unity: (Filename: ./artifacts/AndroidManagedGenerated/UnityEngineDebug.cpp Line: 49)
00:17 I/Unity: 
00:18 I/Unity: Login called
00:18 I/Unity:  
00:18 I/Unity: (Filename: ./artifacts/AndroidManagedGenerated/UnityEngineDebug.cpp Line: 49)
00:18 I/Unity: 
00:18 I/Unity: Fade out 1st-Splash-Screen
00:18 I/Unity:  
00:18 I/Unity: (Filename: ./artifacts/AndroidManagedGenerated/UnityEngineDebug.cpp Line: 49)
00:18 I/Unity: 
00:18 I/Unity: fade in Frontmenu
00:18 I/Unity:  
00:18 I/Unity: (Filename: ./artifacts/AndroidManagedGenerated/UnityEngineDebug.cpp Line: 49)
00:18 I/Unity: 
00:18 I/Unity: fade in Background
00:18 I/Unity:  
00:18 I/Unity: (Filename: ./artifacts/AndroidManagedGenerated/UnityEngineDebug.cpp Line: 49)
00:18 I/Unity: 
00:18 I/Unity: StopQCAR
00:18 I/Unity:  
00:18 I/Unity: (Filename: ./artifacts/AndroidManagedGenerated/UnityEngineDebug.cpp Line: 49)
00:18 I/Unity: 
00:18 D/QCAR: markerTrackerStop
00:18 D/QCAR: imageTrackerStop
00:18 D/QCAR: cameraDeviceStopCamera
00:18 D/QCAR: cameraDeviceDeinitCamera
00:18 D/skia: GFXPNG PNG bitmap created width:72 height:72 bitmap id is 291 
00:19 D/ProgressBar: updateDrawableBounds: left = 0
00:19 D/ProgressBar: updateDrawableBounds: top = 3
00:19 D/ProgressBar: updateDrawableBounds: right = 144
00:19 D/ProgressBar: updateDrawableBounds: bottom = 147
00:20 D/FBUnitySDK: KeyHash: J6Ij1CB6I/YW83NY2p0yR0qEBeE=
00:20 D/ProgressBar: updateDrawableBounds: left = 0
00:20 D/ProgressBar: updateDrawableBounds: top = 3
00:20 D/ProgressBar: updateDrawableBounds: right = 144
00:20 D/ProgressBar: updateDrawableBounds: bottom = 147
00:20 I/System.out: pool-8-thread-1 calls detatch()
00:21 I/PersonaManager: getPersonaService() name persona_policy
00:22 I/System.out: pool-9-thread-1 calls detatch()
00:25 I/System.out: Thread-5856(HTTPLog):isShipBuild true
00:25 I/System.out: Thread-5856(HTTPLog):SmartBonding Enabling is false, SHIP_BUILD is true, log to file is false, DBG is false
00:27 W/CursorWrapperInner: Cursor finalized without prior close()
00:27 W/CursorWrapperInner: Cursor finalized without prior close()
00:27 I/Unity: StartQCAR
00:27 I/Unity:  
00:27 I/Unity: (Filename: ./artifacts/AndroidManagedGenerated/UnityEngineDebug.cpp Line: 49)
00:27 I/Unity: 
00:27 D/QCAR: cameraDeviceInitCamera
00:27 D/QCAR: cameraDeviceGetVideoMode
00:27 D/QCAR: cameraDeviceSelectVideoMode
00:27 E/libEGL: call to OpenGL ES API with no current context (logged once per thread)
00:27 D/QCAR: cameraDeviceStartCamera
00:28 D/QCAR: markerTrackerStart
00:28 D/QCAR: imageTrackerStart
00:28 D/QCAR: cameraDeviceGetVideoMode
00:28 D/QCAR: cameraDeviceGetVideoMode

Samsung Galaxy S5 Running Slow

August 4, 2014 - 4:25pm #2

If you suspect that image stabilization may be a factor in the S5 drawing performance, then disabling it would probably be a good initial troubleshooting step. A quick search produced this article with steps on how to do it:

http://www.androidcentral.com/samsung-galaxy-s5-camera-tip-turn-picture-stabilization-unless-you-really-need-it

 

Log in or register to post comments