0

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.

genpfault
  • 51,148
  • 11
  • 85
  • 139
videoguy
  • 1,732
  • 2
  • 24
  • 49

1 Answers1

1

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/.

Markus S
  • 355
  • 2
  • 4
  • Thats a great link. I will give it a try. Imagine you have 900MHz ARM processor and a 1080p frame buffer that needs to be converted to YUV at 10-15 frames per sec, what is the cpu load with this library? Thanks – videoguy Sep 13 '13 at 02:34
  • I don't know what the CPU load would be. The easiest way to find out would be to try it out. An educated guess for 1080p @ 15 fps would be around 40 - 50% CPU load though the actual value depends on what else you do with the frames and how you get them. – Markus S Sep 13 '13 at 12:51