summaryrefslogtreecommitdiffstats
path: root/camera/smdk4x12_utils.c
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2014-07-01 16:40:54 (GMT)
committerPaul Kocialkowski <contact@paulk.fr>2014-07-01 16:40:54 (GMT)
commit6ae9fdf827e93f1843c846f7daa5e23831d6fc19 (patch)
tree4152c1fe97496c8bf4deca2a608b27495594db8c /camera/smdk4x12_utils.c
parent0e028ac00134ad05bfca03d277dc3b3fee325e87 (diff)
downloaddevice_samsung_smdk4412-common-replicant-4.2.zip
device_samsung_smdk4412-common-replicant-4.2.tar.gz
device_samsung_smdk4412-common-replicant-4.2.tar.bz2
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Diffstat (limited to 'camera/smdk4x12_utils.c')
-rw-r--r--camera/smdk4x12_utils.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/camera/smdk4x12_utils.c b/camera/smdk4x12_utils.c
index 7f8fc40..90d2167 100644
--- a/camera/smdk4x12_utils.c
+++ b/camera/smdk4x12_utils.c
@@ -156,3 +156,19 @@ void smdk4x12_camera_yuv_planes(int width, int height, int format, int address,
break;
}
}
+
+int smdk4x12_gralloc_format(int format)
+{
+ switch (format) {
+ case V4L2_PIX_FMT_NV21:
+ return HAL_PIXEL_FORMAT_YCrCb_420_SP;
+ case V4L2_PIX_FMT_YUV420:
+ return HAL_PIXEL_FORMAT_YV12;
+ case V4L2_PIX_FMT_RGB565:
+ return HAL_PIXEL_FORMAT_RGB_565;
+ case V4L2_PIX_FMT_RGB32:
+ return HAL_PIXEL_FORMAT_RGBX_8888;
+ default:
+ return HAL_PIXEL_FORMAT_YCrCb_420_SP;
+ }
+}