renderscript

RenderScript Support Library crashes on x86 devices

℡╲_俬逩灬. 提交于 2019-12-05 10:46:45
I'm getting FATAL EXCEPTION running android.support.v8.renderscript.* on Razor i, a x86 device. The problem goes away if I use android.renderscript.* Also there is not problem with ARM devices. Here is the exception: 03-03 18:35:26.009 25011-25011/com.example.app E/AndroidRuntime﹕ FATAL EXCEPTION: main java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.app/com.example.app.MainActivity}: android.support.v8.renderscript.RSRuntimeException: Error loading RS jni library: java.lang.UnsatisfiedLinkError: Cannot load library: reloc_library[1306]: 143 cannot locate '_

Using SurfaceTexture in combination with RenderScript

岁酱吖の 提交于 2019-12-05 09:59:14
问题 I want to do camera image processing on the GPU on android. In my current set-up I use a SurfaceTexture to capture frames from the camera image stream as an OpenGL ES texture. This is an efficient way to get the camera stream accesible in my shaders. (http://developer.android.com/reference/android/graphics/SurfaceTexture.html) Now i would like to start using the new RenderScript API instead of direct OenGL ES usage. (http://developer.android.com/guide/topics/renderscript/index.html) But to

RenderScript speedup 10x when forcing default CPU implementation

霸气de小男生 提交于 2019-12-05 04:27:11
问题 I have implemented a CNN in RenderScript, described in a previous question which spawned this one. Basically, when running adb shell setprop debug.rs.default-CPU-driver 1 there is a 10x speedup on both Nvidia Shield and Nexus 7. The average computation time goes from around 50ms to 5ms, the test app goes from around 50fps to 130 or more. There are two convolution algorithms: (1) moving kernel (2) im2col and GEMM from RenderScriptIntrinsicsBLAS. Both experience similar speedup. The question is

Problems with the Renderscript support library

浪尽此生 提交于 2019-12-04 22:44:46
问题 I am trying to use the Android Renderscript support library on devices of API 16 and up, following the steps described here. So far things have not gone smoothly. My Renderscript code is listed below. #pragma version(1) #pragma rs java_package_name(com.xxx.renderscript.test) #include "rs_time.rsh" rs_script flipScript; rs_allocation gIn; rs_allocation gOut; int width; int height; int direction = 0; void root(uchar4 *v_out, const void *usrData, uint32_t x, uint32_t y) { if(direction == 0) { //

How to allocate the LUT to use on ScriptIntrinsic3DLUT?

旧城冷巷雨未停 提交于 2019-12-04 17:18:41
working with RenderScript, I'm trying to use the ScriptIntrinsic3DLUT ( http://developer.android.com/reference/android/renderscript/ScriptIntrinsic3DLUT.html ) In general this scrip works just like any other renderscript create RS context create script with this context create input and output allocations set script parameters call the kernel may problem is on the set script parameters step, from the docs I should call script.setLUT (Allocation lut) , but what is the appropriate way of generating/setting values for this allocation? sample of the code I have is: // create RS context

Android Renderscript with Gradle

為{幸葍}努か 提交于 2019-12-04 14:56:16
I'm building a Renderscript processing and for the life of me I can't make it work on gingerbread through Gradle. The processing uses both Intrinsics and custom Kernels. using renderscriptTargetApi 18 and renderscriptSupportMode true with the latest build tools buildToolsVersion "19.0.1" and classpath 'com.android.tools.build:gradle:0.8.+' and gradle 1.10 it compiles fine and it runs fine on ICS+ devices, but it crashes on Gingerbread with the following stack trace: Caused by: android.support.v8.renderscript.RSRuntimeException: Error loading RS jni library: java.lang.UnsatisfiedLinkError:

Why does those Google image processing sample Renderscript runs slower on GPU in Nexus 5

三世轮回 提交于 2019-12-04 13:16:34
问题 I'd like to thank Stephen for the very quick reply in a previous post. This is a follow up question for this post Why very simple Renderscript runs 3 times slower in GPU than in CPU My dev platform is as follows Development OS: Windows 7 32-bit Phone: Nexus 5 Phone OS version: Android 4.4 SDK bundle: adt-bundle-windows-x86-20131030 Build-tool version: 19 SDK tool version: 22.3 Platform tool version: 19 In order to evaluate the performance of Renderscript GPU compute and to grasp the general

Can't find ScriptC_saturation in BasicRenderScript Sample

吃可爱长大的小学妹 提交于 2019-12-04 12:09:18
I've imported Basic RenderScript Sample project from Android Samples . Android Studio is showing error: cannot find symbol class ScriptC_saturation This is the imports. import android.app.Activity; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.AsyncTask; import android.os.Bundle; import android.widget.ImageView; import android.widget.SeekBar; import android.widget.SeekBar.OnSeekBarChangeListener; import android.support.v8.renderscript.*; I've searched around but can't find much about it. What am I missing ? [EDIT] This is my build.gradle file.

Google Plus tile animation

纵然是瞬间 提交于 2019-12-04 07:46:27
问题 I'm trying to figure out how I could make a similar layout as in Google plus timeline view. There's an animation while scrolling in timeline and I really like it. Any idea how to do that? 回答1: You need to set a TranslateAnimation to the view and that would do the trick for you. TranslateAnimation translateAnim = new TranslateAnimation(200, 0, 0, 0 ); //Use (0, 0, 200, 0 ) if you would like to animate this in a mobile device rather than a tab listView.clearAnimation(); translateAnim

Renderscript c style pointer usage performance issue

↘锁芯ラ 提交于 2019-12-04 06:55:55
问题 In render script, I am using bound pointers to iterate over a large image. The problem is in the array access performance. ... for(int i=0; i < channels; i++) { sum += (input[i*input_size]) * mulValue; } ... For example, when the input_size is 12288 it takes 1.5 seconds to complete script, but when the input_size is 12280 it takes ~0.5 seconds. What can cause such a mystery behavior? 回答1: Understanding the performance implications of what you write in RenderScript (or openCL) is complex. Just