diff options
Diffstat (limited to 'camera/smdk4x12_utils.c')
-rw-r--r-- | camera/smdk4x12_utils.c | 16 |
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; + } +} |