OV5640 Camera Preview Strech for 800x480 screen resolution

We designed our customized board based on sabresdq platform, ported android 4.4.2. It has 5MP OV5640 Mipi auto focus camera. According to our baord layout we had changed setprop back_camera_orient 270 in init.rc file. We are able to capture images. During preview image is stretched , however captured image is not stretched.

One suggestion is that you can try to change the parameters in Android camera source code. please check the Ov5640Mipi.* in hardware/imx/mx6/libcamera2. Attached is the Android FAQ document. please read the section 25, 26 for more details about how to config the camera in Android.

Or you can add the resolution 800x480 in the ov5640 driver in kernel. But this you need to understand the ov5640 registers setting first. You may need to get the datasheet from OV.