I am observing a strange visual glitch when using a GLSurfaceView to render a camera preview on Android.
The reds and blues appear to be swapped in the Camera preview feed - greens seem ok. See the screen capture below.
I am only seeing this problem on a few devices (all variants of the Samsung Galaxy S4).
The glitch only occurs when using certain resolutions - 720x960 upwards is fine, anything below this exhibits the problem (e.g 640x480).
The problem occurs on both the front and rear camera.
The issue is reproducible in the Grafika Sample application (assuming you have a Samsung Galaxy S4 handy) by changing line 185 of CameraCaptureActivity.java like so:
// openCamera(1280, 720); // change this ...
openCamera(640, 480); // to this
I need to encode H264 at 640x480. I thought I could work around the problem by using a higher resolution (same aspect ratio) but still setting my encoder to run at 640x480 - unfortunately this leads to a horrible blocky video feed, presumably due to re-sampling.