summaryrefslogtreecommitdiffstats
path: root/camera/OMXCameraAdapter
diff options
context:
space:
mode:
authorKyle Repinski <repinski23@gmail.com>2015-01-07 23:40:29 -0600
committerZiyan <jaraidaniel@gmail.com>2015-04-11 20:24:53 +0200
commitfbc224e05ad87bed523eb548df2194da0696cc60 (patch)
treeaa9b46f3ea0f591279e423c8b5aeb8a354a3708e /camera/OMXCameraAdapter
parent0ebe625decc5a52c5534bedc5ed31da332f42f80 (diff)
downloaddevice_samsung_tuna-fbc224e05ad87bed523eb548df2194da0696cc60.zip
device_samsung_tuna-fbc224e05ad87bed523eb548df2194da0696cc60.tar.gz
device_samsung_tuna-fbc224e05ad87bed523eb548df2194da0696cc60.tar.bz2
camera: Forcefully add jpeg picture format to supported formats.
Also a few minor bugfixes/workarounds. All camera apps I've tested (including AOSP and Google Camera) function well now. Few issues left to fix, but this has been very successful so far. Signed-off-by: Kyle Repinski <repinski23@gmail.com>
Diffstat (limited to 'camera/OMXCameraAdapter')
-rw-r--r--camera/OMXCameraAdapter/OMXCapabilities.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/camera/OMXCameraAdapter/OMXCapabilities.cpp b/camera/OMXCameraAdapter/OMXCapabilities.cpp
index a21cc20..b339768 100644
--- a/camera/OMXCameraAdapter/OMXCapabilities.cpp
+++ b/camera/OMXCameraAdapter/OMXCapabilities.cpp
@@ -191,9 +191,14 @@ const CapPixelformat OMXCameraAdapter::mPixelformats [] = {
{ OMX_COLOR_FormatCbYCrY, android::CameraParameters::PIXEL_FORMAT_YUV422I },
{ OMX_COLOR_FormatYUV420SemiPlanar, android::CameraParameters::PIXEL_FORMAT_YUV420SP },
{ OMX_COLOR_Format16bitRGB565, android::CameraParameters::PIXEL_FORMAT_RGB565 },
+#if 0 /*def OMAP_TUNA*/
+ { OMX_COLOR_FormatRawBayer10bit, android::CameraParameters::PIXEL_FORMAT_BAYER_RGGB },
+ { OMX_COLOR_FormatYUV420SemiPlanar, android::CameraParameters::PIXEL_FORMAT_YUV420P },
+#else
{ OMX_COLOR_FormatYUV420SemiPlanar, android::CameraParameters::PIXEL_FORMAT_YUV420P },
{ OMX_COLOR_FormatUnused, TICameraParameters::PIXEL_FORMAT_UNUSED },
{ OMX_COLOR_FormatRawBayer10bit, android::CameraParameters::PIXEL_FORMAT_BAYER_RGGB },
+#endif
};
const userToOMX_LUT OMXCameraAdapter::mFrameLayout [] = {
@@ -969,6 +974,11 @@ status_t OMXCameraAdapter::insertImageFormats(CameraProperties::Properties* para
#endif
if ( NO_ERROR == ret ) {
+#ifdef OMAP_TUNA
+ //jpeg is not supported in (our) OMX capabilies
+ strncat(supported, PARAM_SEP, MAX_PROP_VALUE_LENGTH - 1);
+ strncat(supported, android::CameraParameters::PIXEL_FORMAT_JPEG, MAX_PROP_VALUE_LENGTH - 1);
+#endif
params->set(CameraProperties::SUPPORTED_PICTURE_FORMATS, supported);
}
@@ -1595,13 +1605,17 @@ status_t OMXCameraAdapter::insertRaw(CameraProperties::Properties* params, OMX_T
LOG_FUNCTION_NAME;
memset(supported, '\0', sizeof(supported));
-#ifndef OMAP_TUNA
+#ifdef OMAP_TUNA
+ sprintf(supported,"%d",int(caps.tImageResRange.nWidthMax));
+#else
sprintf(supported,"%d",int(caps.uSenNativeResWidth));
#endif
params->set(CameraProperties::RAW_WIDTH, supported);
memset(supported, '\0', sizeof(supported));
-#ifndef OMAP_TUNA
+#ifdef OMAP_TUNA
+ sprintf(supported,"%d",int(caps.tImageResRange.nHeightMax));
+#else
if (caps.bMechanicalMisalignmentSupported) {
sprintf(supported,"%d",int(caps.uSenNativeResHeight) * 2);
} else {