Writing an app which takes the preview frames from camera does some transformation to it and then displays it on screen.
in
public void onPreviewFrame(byte[] data, Camera camera) {}
I take the data do yuv2rgb and some pixel manipulation in JNI in another thread. Then I create bitmap from the RGB int array and draw it using
canvas.drawBitmap(bmp, 0, 0, null);
I get around 15-20FPS on HTC Nexus One at 640x480 and 30+ FPS on Samsung Galaxy S II
I am wondering if I could speed things up by doing the drawing using Android OpenGL ES? I would be following this guide: http://obviam.net/index.php/texture-mapping-opengl-android-displaying-images-using-opengl-and-squares/