6

I'm working with the Camera2 API and I'm using Renderscript to perform some image processing. Everything works as expected on a range of devices(Nexus 5/5x, Pixel, Pixel 2, S8+, Note 8) except for the S9+.

Basically what I'm doing is creating an Allocation to receive camera data and another Allocation that will use the camera data, apply a transformation and the display the result on a Surface which will act as the camera preview. On the S9+ I get a black screen (no preview) and LogCat shows the following error:

renderscript error

I read the other posts regarding this type of error and they do not apply for my case because the code works as expected on other devices!

I managed to track down the error to a native library loading issue: Stacktrace

This is only happening on the S9, the other Samsung devices work without any issues.

The S8+ is on Android Nougat(24) and the S9+ is on Oreo(26), both have OpenGL ES 3.2.

Does anyone have any idea on how to fix this?

PS: tested on other devices running Oreo without any issues

Edit

I updated the S9+ to the latest version (R16NW.G965FXXU1ARCC) but the issue still remains. Also, based on comment suggestion, I checked the /vendor/lib64 folder to check if the libbccArm and libccc are present, but only one of them is present:

enter image description here

LATER EDIT

libbcc.so found on the system but the S9+ seems to be missing the 32-bit version (S8+ on the left, S9+ on the right)

enter image description here

Andrew T.
  • 4,701
  • 8
  • 43
  • 62
Stelian Morariu
  • 505
  • 7
  • 16

2 Answers2

1

Latest update fixes renderscript issues ( I can now process 1920x1080 images).

Tested on Galaxy S9+, build number R16NW.G965FXXU1BRE5

Stelian Morariu
  • 505
  • 7
  • 16
0

I have the same problem on the same phone.

Testing with code adapted from https://android.googlesource.com/platform/frameworks/base/+/dd6c8b3/tests/RenderScriptTests/LivePreview/src/com/android/rs/livepreview/, it looks like renderscripts are working on S9+ for lower resolutions (176x144 and 256x144 tested), but nothing above that. Probably due to restrictions of the Non-GPU renderscript driver, which is loaded as a fallback. Not much of a solution for most of us, but at least you get something on the screen.