Questions tagged [renderscript]

RenderScript is an Android-specific compute API offered by Google. It offers accelerated compute performance with portability between Android devices.

RenderScript is an Android compute API offered by Google. It offers accelerated compute performance with portability between Android devices.

The RenderScript runtime operates as an asynchronous low-level interface to the traditional Android application controlling it. Memory allocation and binding is performed by the controlling Android application, with both the application and runtime environment able to read and write the memory asynchronously.

For graphics operations, RenderScript is essentially a wrapper for the OpenGL ES 2.0 API's, guaranteed to run on all Android devices supporting an API level of 11 (3.0) or higher. It allows for the use of OpenGL ES 2.0's programmable pipeline while providing easy support for a fixed function pipeline if desired.

Documentation for RenderScript is currently very limited, however the example applications included in

sdk_root/samples/android-11/RenderScript

provide a great deal in the way of examples demonstrating the capabilities of RenderScript.

Some links of interest for RenderScript are:

727 questions
0
votes
1 answer

Renderscript with rs_allocation array can't run on GPU

My dev env is as follows: Device: Nexus 5 Android: 4.4.2 SDK Tools: 22.6.1 Platform Tools: 19.0.1 Build tools: 19.0.3 Build Target: level 19 Min Target: level 19 The problem is when I try to put rs_allocation arrays in .rs file such…
Jimmy Ren
  • 397
  • 3
  • 14
0
votes
1 answer

Can we use Renderscript to implement security oriented parts of a code?

It is recommended to implement sensitive or security oriented parts of an Android app code in C using NDK as it cannot be decompiled easily as Java code, you have more control of memory allocation etc. But now we have also Renderscript which code…
xsveda
  • 17,074
  • 2
  • 16
  • 16
0
votes
1 answer

Does NDK RenderScript support texture access?

The Java API allows a RenderScript Allocation to function as a SurfaceTexture provider. (Simple usage example) The C++ API seems to support only half of the methods necessary to bind an Allocation to a texture. Specifically, in rsCppStructs.h (lines…
Kietz
  • 1,186
  • 11
  • 19
0
votes
1 answer

calculating histogram using rsAtomicInc in Renderscript only returns address instead of the count

I am trying to write a program for histogram calculation. So i have created a random array of 10 numbers treating it as the image array in 1D. The following is my renderscript and Java code. I want the histogram o be returned as an array with counts…
0
votes
1 answer

How to pass a Float2 array from Java to Renderscript

I am trying to pass an array of Float2 variables to Renderscript using the copyfrom method using Android Studio with the following code. The first example for an integer is accepted by the IDE, but the next two for either a float or a float2 are…
AJR
  • 105
  • 6
0
votes
2 answers

ScriptIntrinsicBlur produces black bitmaps

I am trying to blur bitmaps in my app using RenderScript framework. I am using the following code: public static Bitmap apply(Context context, Bitmap sentBitmap, int radius) { Bitmap bitmap = sentBitmap.copy(sentBitmap.getConfig(), true); …
Bobrovsky
  • 13,789
  • 19
  • 80
  • 130
0
votes
1 answer

Can anyone help me on implementation of Android Blur on version 4.0 and above without learning Renderscript

Renderscript is too much C/C++ , i'm more comfortable with Java, can someone help me with a code that can be integrated over a layout to make the background image of the layout somewhat blurred.
0
votes
1 answer

Can I put the renderscript memory allocation inside a loop to process a series of variable size arrays?

I am trying to modify the parallel reduction algorithm. I am using a logic to divide an given array length into powers of 2. For example if i put in the number 26, I make array 1 of 16 elements, the next array of 8 elements and the last array of 2…
0
votes
1 answer

How to run Opengl or OpenGL ES for array processing in android

I have a requirement to process large array in my android app and currently it has become performance problem. To solve this my plan is to move the array processing in to GPU. I tried do this using Android Render script but that failed due to…
droidNDK
  • 85
  • 1
  • 9
0
votes
1 answer

Android Render Script Error when assigning to Out paramaeter

i am getting error Fatal signal 11 (SIGSEGV) at 0x51b71000 (code=1), thread 3696 (sssist.magnitab) Whenever i assign value to out parameter for send back the values main app , when i remove assignment error goes away , here is my code ,(below…
droidNDK
  • 85
  • 1
  • 9
0
votes
1 answer

rsSendToClient Fails with exception

'rsSendToClient' Fails with following error: 02-15 04:50:23.102: E/RenderScript(5147): Unable to open shared library (/data/data/com.isssist.magnitab//lib/librs.mono.so): Cannot load library: reloc_library[1306]: 1420 cannot locate…
droidNDK
  • 85
  • 1
  • 9
0
votes
2 answers

Android Blur with RenderScript

I try to make a gaussian blur on an android Bitmap but I get this error: rsAssert failed: !mTypes.size() and rsAssert failed: !mElements.size() Here is my code : public Bitmap blurBitmap(Bitmap src) { Bitmap outBitmap = src.copy(src.getConfig(),…
user3226992
  • 33
  • 1
  • 3
0
votes
1 answer

RS dependent on Dalvik?

How dependent is Renderscript on the framework being Dalvik or ART? I was testing a device with 4.4.2 running ART and the app kept crashing. Was only later that I realized it was on ART and switched back to Dalvik. On Dalvik it runs fine.
0
votes
1 answer

renderscript: accessing 'z' coordinate

I'm trying to write a simple kernel for image processing; I was planning on storing the channel of image in the 'z' coordinate of an allocation. I think this should be possible based on the documentation: A kernel may access the coordinates of the…
rjpower
  • 463
  • 4
  • 13
0
votes
3 answers

RenderScript: One ScriptC_XXXX can't be created twice?

This is my constructor of class RSBaseFilterEngine, and my program will create many instance of this class in different activity. public RSBaseFilterEngine(Context context) { rs = RenderScript.create(context); this.context = context; …
wxfred
  • 1
  • 4