Reputation: 1908
I am looking for h/w accelerated way to convert RGB frame to YUV (say YUV420) in android.
I do see Renderscript has intrisics to do this for YUV to RGB conversion. I am looking for the RGB to YUV though.
I need this for an embedded system (Android 4.0.3 based) with Cortex-A8 with SGX530 GPU core. I like to do this on a 720p ARGB frame that keeps changing at 10 frames per sec. Doing this on ARM A8 core is not acceptable. Thats why I am looking for a way to do this using GPU compute.
I am imagining Renderscript or OpenGL based implementation can solve this.But don't know how.
A blog post here http://www.mdk.org.pl/2007/11/17/gl-colorspace-conversions has example for doing RGB to YUV conversion using GStreamer and OpenGL.
I am looking for something that works on Android.
Edit: The link http://slouken.blogspot.com/2011/02/mpeg-acceleration-with-glsl.html has good pointers. Still researching.
Upvotes: 0
Views: 5159
Reputation: 365
Is using the GPU really necessary? Cortex-A8 has NEON support an can convert the frames as fast as the GPU could. There is a very nice c library that takes care of CPU h/w acceleration: http://code.google.com/p/libyuv/.
Upvotes: 2