renderscript

How to use ScriptIntrinsicConvolve5x5 in android?

回眸只為那壹抹淺笑 提交于 2019-12-11 11:07:28
问题 I'm trying to understand how convolution matrix works in android and I want to use ScriptIntrinsicConvolve5x5 class to change contrast of my image. I've multiple variations of this matrix: R G B A W R [c 0 0 0 0] G [0 c 0 0 0] B [0 0 c 0 0] A [0 0 0 1 0] W [t t t 0 1] c = contrast t = (1.0 - c) / 2.0 But it doesn't work in ScriptIntrinsicConvolve5x5, all i see is a black screen. I want to use a RenderScript because of performance I've been able to change contrast with ColorMatrix class, but

Use RenderScript to emboss a shape in android

[亡魂溺海] 提交于 2019-12-11 10:14:56
问题 This question is base on link. I tried out @miloslaw-smyk answer. However I could not get it to work. I am not sure what createPath(1) means. I am not sure how to create a path with a certain stroke width. We can do that using the fillpaint. Anyway below I have shown the complete code.Problem is I don't see any emboss effect shown by the original link (see output image below). Please let me know what I have done wrong. (I am using targetSdkVersion 23 and device is on updated 4.1.2 android)

How to force a render script kernel to run on only GPU on Nexus5 device, android-4.4.4_r1

时光毁灭记忆、已成空白 提交于 2019-12-11 09:28:44
问题 I am working on Nexus 5 device running android-4.4.4_r1. I am using a simple gray scale image application which converts a color image to gray scale using render script kernel. But I want to run the kernel only on the GPU. How can I make sure the kernel runs only on the GPU at run time from render script level of android frame work level. Please give me some pointers. I need this to compare performance between CPU GPU processing of the kernel. Regards Skuanr 回答1: You can't force RS to run on

Getting “cannot locate symbol _Z17rsMatrixTranslateP12rs_matrix4x4fff” using the RenderScript Support Library?

你。 提交于 2019-12-11 06:35:42
问题 so my app is crashing mainly on any device running less than 4.4 and this is what the crash log is reporting to me: android.support.v8.renderscript.RSRuntimeException: Loading of ScriptC script failed. at android.support.v8.renderscript.ScriptC.<init>(ScriptC.java:69) at com.apporio.glitchr.ScriptC_translate.<init>(ScriptC_translate.java:41) at com.apporio.glitchr.ImageEffects.fastTransform(ImageEffects.java:417) at com.apporio.glitchr.ImageEffects.doNewVHS(ImageEffects.java:308) at com

Android Renderscript Type mismatch with U8_4

倾然丶 夕夏残阳落幕 提交于 2019-12-11 06:26:52
问题 I tried to implement the Renderscript from this answer So my Renderscript looks like the following: #pragma version(1) #pragma rs java_package_name(bavarit.app.cinnac) rs_allocation inImage; int inWidth; int inHeight; uchar4 __attribute__ ((kernel)) rotate_90_clockwise (uchar4 in, uint32_t x, uint32_t y) { uint32_t inX = inWidth - 1 - y; uint32_t inY = x; const uchar4 *out = rsGetElementAt(inImage, inX, inY); return *out; } uchar4 __attribute__ ((kernel)) rotate_270_clockwise (uchar4 in,

Getting an error when compiling with RenderScript library: llvm-rs-cc.exe'' finished with non-zero exit value -1073741515

落爺英雄遲暮 提交于 2019-12-10 23:33:25
问题 As the title mentions, when I want to add RenderScript to my project, I get the following error (on Gradle Sync): Error:Execution failed for task ' :app:compileDebugRenderscript '. > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\Dries\AppData\Local\Android\sdk2\build-tools\23.0.1**llvm-rs-cc.exe'' finished with non-zero exit value -1073741515** I'm using Android Studio 1.3.2 This is my build.gradle: import com.android

Use custom RenderScript in system signed application

泪湿孤枕 提交于 2019-12-10 23:29:26
问题 How to use custom RenderScript script in an application which is signed by system certificate? LogCat output: E/RenderScript: Failed loading RS driver: dlopen failed: cannot locate symbol "_ZN7android12renderscript15RsdCpuReference6createEPNS0_7ContextEjjPFPKNS1_9CpuSymbolES3_PKcEPFPNS1_9CpuScriptES3_PKNS0_6ScriptEEPFPN4llvm6ModuleEPN3bcc8RSScriptESK_SK_EPFS8_S8_jES8_" referenced by "/system/vendor/lib/libRSDriver_adreno.so"... E/RenderScript: Failed to load runtime libRSDriver_adreno.so,

How to use ScriptIntrinsic3DLUT with a .cube file?

末鹿安然 提交于 2019-12-10 18:14:41
问题 first, I'm new to image processing in Android. I have a .cube file that was "Generated by Resolve" that is LUT_3D_SIZE 33. I'm trying to use android.support.v8.renderscript.ScriptIntrinsic3DLUT to apply the lookup table to process an image. I assume that I should use ScriptIntrinsic3DLUT and NOT android.support.v8.renderscript.ScriptIntrinsicLUT, correct? I'm having problems finding sample code to do this so this is what I've pieced together so far. The issue I'm having is how to create an

List of devices on which Renderscript doesn't work

倖福魔咒の 提交于 2019-12-10 17:37:58
问题 My app needs Renderscript since it performs some image processing that would take several seconds in Java. Before publishing I have tested it on a number of devices, even some older models (e.g. Samsung Galaxy Tab 2, API 17), and the app worked quite well, even on these devices. From this, I didn't see a reason to set the minimum API higher than 17. Now, some weeks after publishing on Google Play I see that the app crashes on certain devices such as Galaxy S3 (m0) with API 17 or Galaxy S3

Documentation for Androids Renderscript advanced rsForEach call

无人久伴 提交于 2019-12-10 15:30:54
问题 I've a question about how Androids Renderscript rsForEach function with the rs_script_call_t* argument works. In the examples only the other (simple) rsForEach function is used, so that doesn't help me. I'd like to change the xStart and xEnd of my array and experiment with the different RS_FOR_EACH_STRATEGYs. I understand that I've to construct a rs_script_call_t struct and set the fields to the proper values. However, any attempt to use this rsForEach call result in a SIGSEGV and a coredump.