diff options
author | codewalker <codewalker@hardkernel.com> | 2014-08-19 18:20:50 +0900 |
---|---|---|
committer | Dongjin Kim <tobetter@gmail.com> | 2014-08-19 18:47:59 +0900 |
commit | 500214a10db4a78d4eee9649ced413716b7c2fbb (patch) | |
tree | 5731fbcab43476265d26996e5be9e6fe50545f8b /libcamera | |
parent | 6414706ded5e58737ec115a9963d24627e02f8e1 (diff) | |
download | android_hardware_samsung_slsi_exynos5430-500214a10db4a78d4eee9649ced413716b7c2fbb.tar.gz android_hardware_samsung_slsi_exynos5430-500214a10db4a78d4eee9649ced413716b7c2fbb.tar.xz android_hardware_samsung_slsi_exynos5430-500214a10db4a78d4eee9649ced413716b7c2fbb.zip |
Samsung Patch (05/27/2014) - RTM 1.00
Change-Id: I013f933ac0a52c4cc1b5e5b550a92b06534a0a34
Diffstat (limited to 'libcamera')
-rw-r--r-- | libcamera/Android.mk | 142 | ||||
-rw-r--r-- | libcamera/ExynosCameraConfig.h | 382 | ||||
-rw-r--r-- | libcamera/ExynosCameraSensorInfo.cpp | 1750 | ||||
-rw-r--r-- | libcamera/ExynosCameraSensorInfo.h | 562 | ||||
-rw-r--r-- | libcamera/Vendor/SecCameraConfig.h | 28 |
5 files changed, 2864 insertions, 0 deletions
diff --git a/libcamera/Android.mk b/libcamera/Android.mk new file mode 100644 index 0000000..0f5e33c --- /dev/null +++ b/libcamera/Android.mk @@ -0,0 +1,142 @@ +# Copyright (C) 2012 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +ifeq ($(TARGET_BOOTLOADER_BOARD_NAME), xyref5422) + +LOCAL_PATH:= $(call my-dir) + +################# +# libexynoscamera + +include $(CLEAR_VARS) + +LOCAL_PRELINK_MODULE := false + +LOCAL_SHARED_LIBRARIES:= libutils libcutils libbinder liblog libcamera_client libhardware +LOCAL_SHARED_LIBRARIES += libexynosutils libhwjpeg libexynosv4l2 libexynosgscaler libion_exynos libcsc +LOCAL_SHARED_LIBRARIES += libexpat libstlport +LOCAL_SHARED_LIBRARIES += libpower + +LOCAL_CFLAGS += -DGAIA_FW_BETA +LOCAL_CFLAGS += -DMAIN_CAMERA_SENSOR_NAME=$(BOARD_BACK_CAMERA_SENSOR) +LOCAL_CFLAGS += -DFRONT_CAMERA_SENSOR_NAME=$(BOARD_FRONT_CAMERA_SENSOR) +ifeq ($(BOARD_CAMERA_DISPLAY_WQHD), true) + LOCAL_CFLAGS += -DCAMERA_DISPLAY_WQHD +endif +LOCAL_CFLAGS += -DUSE_CAMERA_ESD_RESET +LOCAL_CFLAGS += -DBACK_ROTATION=$(BOARD_BACK_CAMERA_ROTATION) +LOCAL_CFLAGS += -DFRONT_ROTATION=$(BOARD_FRONT_CAMERA_ROTATION) + +LOCAL_C_INCLUDES += \ + $(LOCAL_PATH)/../include \ + $(LOCAL_PATH)/../libcamera \ + $(TOP)/hardware/samsung_slsi/exynos/libcamera/54xx \ + $(TOP)/hardware/samsung_slsi/exynos/libcamera/54xx/JpegEncoderForCamera \ + $(TOP)/hardware/samsung_slsi/exynos/libcamera/common \ + $(TOP)/hardware/samsung_slsi/exynos/libcamera/common/Pipes \ + $(TOP)/hardware/samsung_slsi/exynos/libcamera/common/Activities \ + $(TOP)/hardware/samsung_slsi/exynos/libcamera/common/Buffers \ + $(LOCAL_PATH)/../libcamera/Vendor \ + $(TOP)/hardware/samsung_slsi/exynos/include \ + $(TOP)/hardware/samsung_slsi/$(TARGET_SOC)/include \ + $(TOP)/hardware/samsung_slsi/$(TARGET_BOARD_PLATFORM)/include \ + $(TOP)/hardware/samsung_slsi/$(TARGET_BOARD_PLATFORM)/libcamera \ + $(TOP)/hardware/libhardware_legacy/include/hardware_legacy \ + $(TOP)/vendor/samsung/feature/CscFeature/libsecnativefeature \ + $(TOP)/bionic \ + $(TOP)/external/expat/lib \ + $(TOP)/external/stlport/stlport + +LOCAL_SRC_FILES:= \ + ExynosCameraSensorInfo.cpp \ + ../../exynos/libcamera/common/ExynosCameraFrame.cpp \ + ../../exynos/libcamera/common/ExynosCameraMemory.cpp \ + ../../exynos/libcamera/common/ExynosCameraUtils.cpp \ + ../../exynos/libcamera/common/ExynosCameraNode.cpp \ + ../../exynos/libcamera/common/ExynosCameraFrameSelector.cpp \ + ../../exynos/libcamera/common/Pipes/ExynosCameraPipe.cpp \ + ../../exynos/libcamera/common/Pipes/ExynosCameraPipeFlite.cpp \ + ../../exynos/libcamera/common/Pipes/ExynosCameraPipe3AA_ISP.cpp \ + ../../exynos/libcamera/common/Pipes/ExynosCameraPipeSCC.cpp \ + ../../exynos/libcamera/common/Pipes/ExynosCameraPipeSCP.cpp \ + ../../exynos/libcamera/common/Pipes/ExynosCameraPipeGSC.cpp \ + ../../exynos/libcamera/common/Pipes/ExynosCameraPipeJpeg.cpp \ + ../../exynos/libcamera/common/Pipes/ExynosCameraPipe3AA.cpp \ + ../../exynos/libcamera/common/Pipes/ExynosCameraPipe3AC.cpp \ + ../../exynos/libcamera/common/Pipes/ExynosCameraPipeISP.cpp \ + ../../exynos/libcamera/common/Buffers/ExynosCameraBufferManager.cpp \ + ../../exynos/libcamera/common/Buffers/ExynosCameraBufferLocker.cpp \ + ../../exynos/libcamera/common/Activities/ExynosCameraActivityBase.cpp \ + ../../exynos/libcamera/common/Activities/ExynosCameraActivityAutofocus.cpp \ + ../../exynos/libcamera/common/Activities/ExynosCameraActivityFlash.cpp \ + ../../exynos/libcamera/common/Activities/ExynosCameraActivitySpecialCapture.cpp \ + ../../exynos/libcamera/common/Activities/ExynosCameraActivityUCTL.cpp \ + ../../exynos/libcamera/54xx/JpegEncoderForCamera/ExynosJpegEncoderForCamera.cpp \ + ../../exynos/libcamera/54xx/ExynosCamera.cpp \ + ../../exynos/libcamera/54xx/ExynosCameraParameters.cpp \ + ../../exynos/libcamera/54xx/ExynosCameraFrameFactory.cpp \ + ../../exynos/libcamera/54xx/ExynosCameraFrameReprocessingFactory.cpp \ + ../../exynos/libcamera/54xx/ExynosCameraFrameFactoryFront.cpp \ + ../../exynos/libcamera/54xx/ExynosCameraActivityControl.cpp\ + ../../exynos/libcamera/54xx/ExynosCameraUtilsModule.cpp \ + ../../exynos/libcamera/54xx/ExynosCameraScalableSensor.cpp + +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE := libexynoscamera + +include $(BUILD_SHARED_LIBRARY) + +################# +# libcamera + +include $(CLEAR_VARS) + +# HAL module implemenation stored in +# hw/<COPYPIX_HARDWARE_MODULE_ID>.<ro.product.board>.so +LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw + +LOCAL_C_INCLUDES += \ + $(LOCAL_PATH)/../include \ + $(LOCAL_PATH)/../libcamera \ + $(LOCAL_PATH)/../libcamera/Vendor \ + $(TOP)/hardware/samsung_slsi/exynos/libcamera/54xx \ + $(TOP)/hardware/samsung_slsi/exynos/libcamera/54xx/JpegEncoderForCamera \ + $(TOP)/hardware/samsung_slsi/exynos/libcamera/common \ + $(TOP)/hardware/samsung_slsi/exynos/libcamera/common/Pipes \ + $(TOP)/hardware/samsung_slsi/exynos/libcamera/common/Activities \ + $(TOP)/hardware/samsung_slsi/exynos/libcamera/common/Buffers \ + $(TOP)/hardware/samsung_slsi/exynos/include \ + $(TOP)/hardware/samsung_slsi/$(TARGET_SOC)/include \ + $(TOP)/hardware/samsung_slsi/$(TARGET_BOARD_PLATFORM)/include \ + $(TOP)/hardware/samsung_slsi/$(TARGET_BOARD_PLATFORM)/libcamera \ + frameworks/native/include \ + system/media/camera/include + +LOCAL_SRC_FILES:= \ + ../../exynos/libcamera/common/ExynosCameraInterface.cpp + +LOCAL_CFLAGS += -DGAIA_FW_BETA +LOCAL_CFLAGS += -DBACK_ROTATION=$(BOARD_BACK_CAMERA_ROTATION) +LOCAL_CFLAGS += -DFRONT_ROTATION=$(BOARD_FRONT_CAMERA_ROTATION) + +LOCAL_SHARED_LIBRARIES:= libutils libcutils libbinder liblog libcamera_client libhardware +LOCAL_SHARED_LIBRARIES += libexynosutils libhwjpeg libexynosv4l2 libcsc libion_exynos libexynoscamera + +LOCAL_MODULE := camera.$(TARGET_BOOTLOADER_BOARD_NAME) + +LOCAL_MODULE_TAGS := optional + +include $(BUILD_SHARED_LIBRARY) + +endif diff --git a/libcamera/ExynosCameraConfig.h b/libcamera/ExynosCameraConfig.h new file mode 100644 index 0000000..8692730 --- /dev/null +++ b/libcamera/ExynosCameraConfig.h @@ -0,0 +1,382 @@ +/* + * Copyright 2013, Samsung Electronics Co. LTD + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed toggle an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/*! + * \file ExynosCameraConfig.h + * \brief hearder file for ExynosCameraConfig + * \author Pilsun Jang(pilsun.jang@samsung.com) + * \date 2013/7/15 + * + */ + +#ifndef EXYNOS_CAMERA_CONFIG_H__ +#define EXYNOS_CAMERA_CONFIG_H__ + +#include <math.h> + +#define BUILD_DATE() ALOGE("Build Date is (%s) (%s) ", __DATE__, __TIME__) +#define WHERE_AM_I() ALOGE("[(%s)%d] ", __FUNCTION__, __LINE__) +#define LOG_DELAY() usleep(100000) + +#define TARGET_ANDROID_VER_MAJ 4 +#define TARGET_ANDROID_VER_MIN 4 + +#define XPaste(s) s +#define Paste2(a, b) XPaste(a)b +#define ID "[%s]-" +#define ID_PARM m_name + +#define CLOGD(fmt, ...) \ + ALOGD(Paste2(ID, fmt), ID_PARM, ##__VA_ARGS__) + +#define CLOGV(fmt, ...) \ + ALOGV(Paste2(ID, fmt), ID_PARM, ##__VA_ARGS__) + +#define CLOGW(fmt, ...) \ + ALOGW(Paste2(ID, fmt), ID_PARM, ##__VA_ARGS__) + +#define CLOGE(fmt, ...) \ + ALOGE(Paste2(ID, fmt), ID_PARM, ##__VA_ARGS__) + +#define CLOGI(fmt, ...) \ + ALOGI(Paste2(ID, fmt), ID_PARM, ##__VA_ARGS__) + +#define CLOGT(cnt, fmt, ...) \ + if (cnt != 0) CLOGI(Paste2("#TRACE#", fmt), ##__VA_ARGS__) \ + +#define CLOG_ASSERT(fmt, ...) \ + android_printAssert(NULL, LOG_TAG, Paste2(ID, fmt), ID_PARM, ##__VA_ARGS__); + +#define ROUND_UP(x, a) (((x) + ((a)-1)) / (a) * (a)) +#define ROUND_OFF_HALF(x, dig) ((float)(floor((x) * pow(10.0f, dig) + 0.5) / pow(10.0f, dig))) + +#define CAMERA_ISP_ALIGN (8) +#define CAMERA_MAGIC_ALIGN (16) +/* This value for GSC alignment refer to "csc.h" */ +#define GSCALER_IMG_ALIGN (16) + +#define INITIAL_SKIP_FRAME (8) +#define EFFECT_SKIP_FRAME (1) +#define SMART_STAY_SKIP_COMPENSATION (1) + +/* Functions tobe enable */ +/* #define START_PICTURE_THREAD */ +/* #define SET_SETFILE_BY_SHOT */ + +#define SET_SETFILE_BY_SET_CTRL +#ifdef SET_SETFILE_BY_SET_CTRL +#define SET_SETFILE_BY_SET_CTRL_3AA_ISP (true) +#define SET_SETFILE_BY_SET_CTRL_ISP (true) +#define SET_SETFILE_BY_SET_CTRL_SCP (true) +#endif + +/* #define USE_DVFS_LOCK */ +/* #define SENSOR_NAME_GET_FROM_FILE */ +/* #define RESERVED_MEMORY_ENABLE */ +#define RESERVED_BUFFER_COUNT_MAX (5) +/* #define USE_BNS_RECORDING */ +/* #define FPS_CHECK */ +#define USE_FD_AE +#define FD_ROTATION (true) + +#define SHOT_RECOVERY (true) +#ifdef SHOT_RECOVERY +#define SHOT_RECOVERY_COUNT (0) +#else +#define SHOT_RECOVERY_COUNT (0) +#endif + +#define USE_ADAPTIVE_CSC_RECORDING (false) +#define USE_HIGHSPEED_RECORDING (false) + +#define USE_FASTEN_AE_STABLE (false) +#define FASTEN_AE_WIDTH (1312) +#define FASTEN_AE_HEIGHT (738) +#define FASTEN_AE_FPS (120) +#define DEFAULT_BNS_RATIO (2) +#define USE_CAMERA_SIZE_TABLE (true) + +#define USE_PURE_BAYER_REPROCESSING (true) + +/* This USE_DYNAMIC_BAYER define is for default scenario. + * See <ExynosCameraParameter.cpp> for details of dynamic bayer setting + */ +#define USE_DYNAMIC_BAYER (false) + +enum REPROCESSING_BAYER_MODE { + REPROCESSING_BAYER_MODE_NONE = 0, /* This means capture do not use reprocessing */ + REPROCESSING_BAYER_MODE_PURE_ALWAYS_ON, + REPROCESSING_BAYER_MODE_DIRTY_ALWAYS_ON, + REPROCESSING_BAYER_MODE_PURE_DYNAMIC, + REPROCESSING_BAYER_MODE_DIRTY_DYNAMIC, + REPROCESSING_BAYER_MODE_MAX, +}; + +#define USE_DYNAMIC_SCC_REAR (false) +#define USE_DYNAMIC_SCC_FRONT (false) + +#define USE_GSC_FOR_CAPTURE_BACK (false) +#define USE_GSC_FOR_CAPTURE_FRONT (true) + +#define MAX_SERIES_SHOT_COUNT (21) + +#ifdef SENSOR_NAME_GET_FROM_FILE +#define SENSOR_NAME_PATH_BACK "vendor specifics" +#define SSENSOR_NAME_PATH_BACK "vendor specifics" +#endif + +#define EXYNOS_CAMERA_NAME_STR_SIZE (256) +#define CAMERA_PACKED_BAYER_ENABLE +#define USE_BUFFER_WITH_STRIDE + +#define MAIN_CAMERA_FLITE_NUM FIMC_IS_VIDEO_SS0_NUM +#define MAIN_CAMERA_3AA_NUM FIMC_IS_VIDEO_3A0_NUM +#define MAIN_CAMERA_3AP_NUM FIMC_IS_VIDEO_3A0P_NUM +#define MAIN_CAMERA_3AC_NUM FIMC_IS_VIDEO_3A0C_NUM +#define MAIN_CAMERA_3AA_OTF (1) +#define MAIN_CAMERA_REPROCESSING (true) +#define MAIN_CAMERA_SCC_CAPTURE (false) + +#define FRONT_CAMERA_FLITE_NUM FIMC_IS_VIDEO_SS1_NUM +#define FRONT_CAMERA_3AA_NUM FIMC_IS_VIDEO_3A1_NUM +#define FRONT_CAMERA_3AP_NUM FIMC_IS_VIDEO_3A1P_NUM +#define FRONT_CAMERA_3AA_OTF (0) +#define FRONT_CAMERA_REPROCESSING (false) +#define FRONT_CAMERA_SCC_CAPTURE (true) + +#define REPROCESSING_3AA_NUM FIMC_IS_VIDEO_3A1_NUM + +#define REPROCESSING_SHIFT (28) +#define OTF_3AA_SHIFT (24) +#define SSX_VINDEX_SHIFT (16) +#define TAX_VINDEX_SHIFT (8) + +#define SENSOR_NOBLOCK_SHIFT (28) +#define SENSOR_INSTANT_SHIFT (16) +#define SENSOR_SSTREAM_SHIFT (0) + +#define NODE_PREFIX "/dev/video" + +#define PREVIEW_GSC_NODE_NUM (4) /* 4 = MSC from Exynos5420 */ +#define PICTURE_GSC_NODE_NUM (5) /* 0,1,2 = GSC */ +#define VIDEO_GSC_NODE_NUM (4) + +#define MAX_BUFFERS (32) +#define NUM_BAYER_BUFFERS (6 + REPROCESSING_BAYER_HOLD_COUNT + SHOT_RECOVERY_COUNT) +#define INIT_BAYER_BUFFERS (5 + SHOT_RECOVERY_COUNT) +#define NUM_PREVIEW_BUFFERS (9 + SHOT_RECOVERY_COUNT) +#define NUM_PREVIEW_SPARE_BUFFERS (3) +#define NUM_PICTURE_BUFFERS NUM_BAYER_BUFFERS +#define NUM_REPROCESSING_BUFFERS (1) +#define NUM_RECORDING_BUFFERS (8) +#define NUM_FASTAESTABLE_BUFFER (10) +#define NUM_PREVIEW_BUFFERS_MARGIN (2) +#define NUM_FRAME_PREPARE_COUNT (6) +#define NUM_BURST_GSC_JPEG_INIT_BUFFER (4) /* Number of pre-allicated buffer for burst shot + Increasing this number will increase takePicture()'s + response time. Currently it is defined as + (# of JPEG save thread) + 1 */ + +/* TO DO : will remove */ +#define REPROCESSING_BAYER_HOLD_COUNT (1) +#define FRONT_NUM_BAYER_BUFFERS (6) +#define FRONT_NUM_PICTURE_BUFFERS FRONT_NUM_BAYER_BUFFERS + +#define MFC_7X_BUFFER_OFFSET (256) + +#define V4L2_CAMERA_MEMORY_TYPE (V4L2_MEMORY_DMABUF) /* (V4L2_MEMORY_USERPTR) */ +#define JPEG_INPUT_COLOR_FMT (V4L2_PIX_FMT_YUYV) +#define CAMERA_BAYER_FORMAT (V4L2_PIX_FMT_SBGGR12) + +#define ERROR_POLLING_DETECTED (-1001) +#define ERROR_DQ_BLOCKED_DETECTED (-1002) +#define ERROR_DQ_BLOCKED_COUNT (20) +#define WARNING_3AA_THREAD_INTERVAL (100000) +#define WARNING_SCP_THREAD_INTERVAL (100000) +#define MONITOR_THREAD_INTERVAL (200000) + +#define FRAME_MIN_NUM (3) + +#define EXYNOS_CAMERA_BUFFER_MAX_PLANES (4) /* img buffer 3 + metadata 1 */ +#define EXYNOS_CAMERA_META_PLANE_SIZE (32 * 1024) +#define GRALLOC_LOCK_FOR_CAMERA (GRALLOC_SET_USAGE_FOR_CAMERA) + +#define EXYNOS_CAMERA_PREVIEW_FPS_REFERENCE (60) + +#define NUM_OF_DETECTED_FACES (16) +#define NUM_OF_DETECTED_FACES_THRESHOLD (0) + +#define PERFRAME_NODE_GROUP_MAX (3) +#define PERFRAME_NODE_GROUP_0 (0) +#define PERFRAME_NODE_GROUP_1 (1) +#define PERFRAME_NODE_GROUP_2 (2) + +#define PERFRAME_INFO_INDEX_MAX (3) +#define PERFRAME_INFO_INDEX_0 (0) +#define PERFRAME_INFO_INDEX_1 (1) +#define PERFRAME_INFO_INDEX_2 (2) + +#define PERFRAME_CONTROL_NODE_3AA +/* #define PERFRAME_CONTROL_NODE_ISP */ +#define PERFRAME_INFO_3AA PERFRAME_INFO_INDEX_0 +#define PERFRAME_INFO_ISP PERFRAME_INFO_INDEX_1 +#define PERFRAME_INFO_DIRTY_REPROCESSING_ISP PERFRAME_INFO_INDEX_0 + +#define PERFRAME_INFO_PURE_REPROCESSING_3AA PERFRAME_INFO_INDEX_0 +#define PERFRAME_INFO_PURE_REPROCESSING_ISP PERFRAME_INFO_INDEX_1 + +#define PERFRAME_3AA_POS PER_FRAME_GROUP_0 +#define PERFRAME_ISP_POS PER_FRAME_GROUP_1 + +#define PERFRAME_BACK_3AC_POS (0) +#define PERFRAME_BACK_3AP_POS (1) +#define PERFRAME_BACK_SCC_POS (0) +#define PERFRAME_BACK_SCP_POS (0) + +#define PERFRAME_REPROCESSING_3AP_POS (0) +#define PERFRAME_REPROCESSING_SCC_POS (0) +#define PERFRAME_FRONT_3AP_POS (0) +#define PERFRAME_FRONT_SCC_POS (0) +#define PERFRAME_FRONT_SCP_POS (1) + +#define WAITING_TIME (5000) /* 5msec */ +#define TOTAL_WAITING_TIME (3000 * 1000) /* 3000msec */ +#define TOTAL_WAITING_COUNT (3) +#define TOTAL_FLASH_WATING_COUNT (10) + +#define DM_WAITING_TIME (30 * 1000) /* 30msec */ +#define DM_WAITING_COUNT (10) + +/* callback state */ +#define CALLBACK_STATE_PREVIEW_META (1) +#define CALLBACK_STATE_PREVIEW_FRAME (2) +#define CALLBACK_STATE_RAW_IMAGE (3) +#define CALLBACK_STATE_POSTVIEW_FRAME (4) +#define CALLBACK_STATE_COMPRESSED_IMAGE (5) + +#define GRALLOC_SET_USAGE_FOR_CAMERA \ + (GRALLOC_USAGE_SW_READ_OFTEN | \ + GRALLOC_USAGE_SW_WRITE_OFTEN | \ + GRALLOC_USAGE_HW_TEXTURE | \ + GRALLOC_USAGE_HW_COMPOSER | \ + GRALLOC_USAGE_EXTERNAL_DISP) + +enum YUV_RANGE { + YUV_FULL_RANGE = 0, + YUV_LIMITED_RANGE = 1, +}; + +enum pipeline { + PIPE_FLITE = 0, + PIPE_3AC, + PIPE_ISP, + PIPE_3AA_ISP, + PIPE_SCC, + PIPE_SCP, + PIPE_GSC, + PIPE_GSC_VIDEO, + PIPE_GSC_PICTURE, + PIPE_JPEG, + MAX_PIPE_NUM, + + PIPE_FLITE_FRONT = 100, + PIPE_3AA_FRONT, + PIPE_3AC_FRONT, + PIPE_ISP_FRONT, + PIPE_SCC_FRONT, + PIPE_SCP_FRONT, + PIPE_GSC_FRONT, + PIPE_GSC_PICTURE_FRONT, + PIPE_GSC_VIDEO_FRONT, + PIPE_JPEG_FRONT, + MAX_PIPE_NUM_FRONT, + + PIPE_3AA_REPROCESSING = 200, + PIPE_3AC_REPROCESSING, + PIPE_ISP_REPROCESSING, + PIPE_SCC_REPROCESSING, + PIPE_SCP_REPROCESSING, + PIPE_GSC_REPROCESSING, + PIPE_JPEG_REPROCESSING, + MAX_PIPE_NUM_REPROCESSING +}; + +enum fimc_is_video_dev_num { + FIMC_IS_VIDEO_SS0_NUM = 100, + FIMC_IS_VIDEO_SS1_NUM = 101, + FIMC_IS_VIDEO_SS2_NUM = 102, + FIMC_IS_VIDEO_SS3_NUM = 103, + FIMC_IS_VIDEO_3A0_NUM = 110, + FIMC_IS_VIDEO_3A0C_NUM = 111, + FIMC_IS_VIDEO_3A0P_NUM = 112, + FIMC_IS_VIDEO_3A1_NUM = 114, + FIMC_IS_VIDEO_3A1C_NUM = 115, + FIMC_IS_VIDEO_3A1P_NUM = 116, + FIMC_IS_VIDEO_ISP_NUM = 130, + FIMC_IS_VIDEO_SCC_NUM = 134, + FIMC_IS_VIDEO_SCP_NUM = 137, + FIMC_IS_VIDEO_VDC_NUM = 140, + FIMC_IS_VIDEO_VDO_NUM = 141, + FIMC_IS_VIDEO_FD_NUM = 146, + FIMC_IS_VIDEO_MAX_NUM = 149, +}; + +typedef enum +{ + SENSOR_NAME_NOTHING = 0, + SENSOR_NAME_S5K3H2 = 1, // 1 ~ 100, SLSI sensors + SENSOR_NAME_S5K6A3 = 2, + SENSOR_NAME_S5K3H5 = 3, + SENSOR_NAME_S5K3H7 = 4, + SENSOR_NAME_S5K3H7_SUNNY = 5, + SENSOR_NAME_S5K3H7_SUNNY_2M = 6, + SENSOR_NAME_S5K6B2 = 7, + SENSOR_NAME_S5K3L2 = 8, + SENSOR_NAME_S5K4E5 = 9, + SENSOR_NAME_S5K2P2 = 10, + SENSOR_NAME_S5K8B1 = 11, + SENSOR_NAME_S5K1P2 = 12, + + SENSOR_NAME_IMX135 = 101, // 101 ~ 200 Sony sensors + + SENSOR_NAME_SR261 = 201, // 201 ~ 300 Other vendor sensors + + SENSOR_NAME_END, + SENSOR_NAME_CUSTOM = 301, +/* HACK: Remove this define after Driver commonized */ + SENSOR_NAME_IMX134, + SENSOR_NAME_S5K4H5, + SENSOR_NAME_IMX175, +/* End of HACK */ +}IS_SensorNameEnum; + + +/* This struct used in recording callback */ +/* This struct passes to OMX */ +struct addrs { + uint32_t type; /* make sure that this is 4 byte. */ + unsigned int fdPlaneY; + unsigned int fdPlaneCbcr; + unsigned int bufIndex; + unsigned int reserved; +}; + +/* for test */ +/* #define SCALABLE_ON */ +/* #define TEST_GED_HIGH_SPEED_RECORDING */ +/* #define TEST_APP_HIGH_SPEED_RECORDING */ /* for ArtCamera */ + +#endif /* EXYNOS_CAMERA_CONFIG_H__ */ diff --git a/libcamera/ExynosCameraSensorInfo.cpp b/libcamera/ExynosCameraSensorInfo.cpp new file mode 100644 index 0000000..eec870d --- /dev/null +++ b/libcamera/ExynosCameraSensorInfo.cpp @@ -0,0 +1,1750 @@ +/* +** +** Copyright 2013, Samsung Electronics Co. LTD +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ + +/*#define LOG_NDEBUG 0 */ +#define LOG_TAG "ExynosCameraUtils" +#include <cutils/log.h> + +#include "ExynosCameraSensorInfo.h" + +namespace android { + +#ifdef SENSOR_NAME_GET_FROM_FILE +int g_rearSensorId = -1; +int g_frontSensorId = -1; +#endif + +struct ExynosSensorInfo *createSensorInfo(int camId) +{ + struct ExynosSensorInfo *sensorInfo = NULL; + int sensorName = getSensorId(camId); + if (sensorName < 0) { + ALOGE("ERR(%s[%d]): Inavalid camId, sensor name is nothing", __FUNCTION__, __LINE__); + sensorName = SENSOR_NAME_NOTHING; + } + + switch (sensorName) { + case SENSOR_NAME_S5K6B2: + sensorInfo = new ExynosSensorS5K6B2(); + break; + case SENSOR_NAME_S5K3L2: + sensorInfo = new ExynosSensorS5K3L2(); + break; + case SENSOR_NAME_S5K2P2: + sensorInfo = new ExynosSensorS5K2P2(); + break; + case SENSOR_NAME_IMX135: + sensorInfo = new ExynosSensorIMX135(); + break; + case SENSOR_NAME_IMX134: + sensorInfo = new ExynosSensorIMX134(); + break; + case SENSOR_NAME_S5K6A3: + sensorInfo = new ExynosSensorS5K6A3(); + break; + case SENSOR_NAME_S5K3H5: + sensorInfo = new ExynosSensorS5K3H5(); + break; + case SENSOR_NAME_S5K4H5: + sensorInfo = new ExynosSensorS5K4H5(); + break; + case SENSOR_NAME_S5K3H7: + case SENSOR_NAME_S5K3H7_SUNNY: + sensorInfo = new ExynosSensorS5K3H7(); + break; + case SENSOR_NAME_IMX175: + sensorInfo = new ExynosSensorIMX175(); + break; + case SENSOR_NAME_S5K8B1: + sensorInfo = new ExynosSensorS5K8B1(); + break; + default: + ALOGW("WRN(%s[%d]): Unknown sensor, create default sensor", __FUNCTION__, __LINE__); + sensorInfo = new ExynosSensorInfo(); + break; + } + + return sensorInfo; +} + +bool needGSCForCapture(int camId) +{ + return (camId == CAMERA_ID_BACK) ? USE_GSC_FOR_CAPTURE_BACK : USE_GSC_FOR_CAPTURE_FRONT; +} + +int getSensorId(int camId) +{ + int sensorId = -1; + +#ifdef SENSOR_NAME_GET_FROM_FILE + int &curSensorId = (camId == CAMERA_ID_BACK) ? g_rearSensorId : g_frontSensorId; + + if (curSensorId < 0) { + curSensorId = getSensorIdFromFile(camId); + if (curSensorId < 0) { + ALOGE("ERR(%s): invalid sensor ID %d", __FUNCTION__, sensorId); + } + } + + sensorId = curSensorId; +#else + if (camId == CAMERA_ID_BACK) { + sensorId = MAIN_CAMERA_SENSOR_NAME; + } else if (camId == CAMERA_ID_FRONT) { + sensorId = FRONT_CAMERA_SENSOR_NAME; + } else { + ALOGE("ERR(%s):Unknown camera ID(%d)", __FUNCTION__, camId); + } +#endif + + return sensorId; +} + +ExynosSensorInfo::ExynosSensorInfo() +{ + maxPreviewW = 1920; + maxPreviewH = 1080; + maxPictureW = 4128; + maxPictureH = 3096; + maxVideoW = 1920; + maxVideoH = 1080; + maxSensorW = 4128; + maxSensorH = 3096; + maxThumbnailW = 512; + maxThumbnailH = 384; + + fNumberNum = 22; + fNumberDen = 10; + focalLengthNum = 420; + focalLengthDen = 100; + focusDistanceNum = 0; + focusDistanceDen = 0; + apertureNum = 227; + apertureDen = 100; + horizontalViewAngle = 51.2f; + verticalViewAngle = 39.4f; + focalLengthIn35mmLength = 31; + + minExposureCompensation = -4; + maxExposureCompensation = 4; + exposureCompensationStep = 0.5f; + maxNumDetectedFaces = 16; + maxNumFocusAreas = 1; + maxNumMeteringAreas = 1; + maxZoomLevel = ZOOM_LEVEL_MAX; + maxZoomRatio = 400; + + zoomSupport = true; + smoothZoomSupport = false; + videoSnapshotSupport = true; + videoStabilizationSupport = true; + autoWhiteBalanceLockSupport = true; + autoExposureLockSupport = true; + + antiBandingList = + ANTIBANDING_AUTO + | ANTIBANDING_50HZ + | ANTIBANDING_60HZ + | ANTIBANDING_OFF + ; + + effectList = + EFFECT_NONE + | EFFECT_MONO + | EFFECT_NEGATIVE + | EFFECT_SOLARIZE + | EFFECT_SEPIA + | EFFECT_POSTERIZE + | EFFECT_WHITEBOARD + | EFFECT_BLACKBOARD + | EFFECT_AQUA; + + flashModeList = + FLASH_MODE_OFF + | FLASH_MODE_AUTO + | FLASH_MODE_ON + | FLASH_MODE_RED_EYE + | FLASH_MODE_TORCH; + + focusModeList = + FOCUS_MODE_AUTO + | FOCUS_MODE_INFINITY + | FOCUS_MODE_MACRO + | FOCUS_MODE_FIXED + | FOCUS_MODE_EDOF + | FOCUS_MODE_CONTINUOUS_VIDEO + | FOCUS_MODE_CONTINUOUS_PICTURE + | FOCUS_MODE_TOUCH; + + sceneModeList = + SCENE_MODE_AUTO + | SCENE_MODE_ACTION + | SCENE_MODE_PORTRAIT + | SCENE_MODE_LANDSCAPE + | SCENE_MODE_NIGHT + | SCENE_MODE_NIGHT_PORTRAIT + | SCENE_MODE_THEATRE + | SCENE_MODE_BEACH + | SCENE_MODE_SNOW + | SCENE_MODE_SUNSET + | SCENE_MODE_STEADYPHOTO + | SCENE_MODE_FIREWORKS + | SCENE_MODE_SPORTS + | SCENE_MODE_PARTY + | SCENE_MODE_CANDLELIGHT; + + whiteBalanceList = + WHITE_BALANCE_AUTO + | WHITE_BALANCE_INCANDESCENT + | WHITE_BALANCE_FLUORESCENT + | WHITE_BALANCE_WARM_FLUORESCENT + | WHITE_BALANCE_DAYLIGHT + | WHITE_BALANCE_CLOUDY_DAYLIGHT + | WHITE_BALANCE_TWILIGHT + | WHITE_BALANCE_SHADE; + + previewSizeLutMax = 0; + pictureSizeLutMax = 0; + videoSizeLutMax = 0; + previewSizeLut = NULL; + pictureSizeLut = NULL; + videoSizeLut = NULL; + videoSizeLutHighSpeed = NULL; + sizeTableSupport = false; + + /* vendor specifics */ + highResolutionCallbackW = 3264; + highResolutionCallbackH = 1836; + highSpeedRecording60WFHD = 1920; + highSpeedRecording60HFHD = 1080; + highSpeedRecording60W = 1008; + highSpeedRecording60H = 566; + highSpeedRecording120W = 1008; + highSpeedRecording120H = 566; + scalableSensorSupport = true; + bnsSupport = false; + minFps = 0; + maxFps = 30; +} + +ExynosSensorIMX135::ExynosSensorIMX135() +{ + maxPreviewW = 1920; + maxPreviewH = 1080; + maxPictureW = 4128; + maxPictureH = 3096; + maxVideoW = 1920; + maxVideoH = 1080; + maxSensorW = 4128; + maxSensorH = 3096; + maxThumbnailW = 512; + maxThumbnailH = 384; + + fNumberNum = 22; + fNumberDen = 10; + focalLengthNum = 420; + focalLengthDen = 100; + focusDistanceNum = 0; + focusDistanceDen = 0; + apertureNum = 227; + apertureDen = 100; + horizontalViewAngle = 51.2f; + verticalViewAngle = 39.4f; + focalLengthIn35mmLength = 31; + + minFps = 1; + maxFps = 30; + + minExposureCompensation = -4; + maxExposureCompensation = 4; + exposureCompensationStep = 0.5f; + maxNumDetectedFaces = 16; + maxNumFocusAreas = 2; + maxNumMeteringAreas = 32; + maxZoomLevel = ZOOM_LEVEL_MAX; + maxZoomRatio = 400; + + zoomSupport = true; + smoothZoomSupport = false; + videoSnapshotSupport = true; + videoStabilizationSupport = true; + autoWhiteBalanceLockSupport = true; + autoExposureLockSupport = true; + + antiBandingList = + ANTIBANDING_AUTO + | ANTIBANDING_50HZ + | ANTIBANDING_60HZ + | ANTIBANDING_OFF + ; + + effectList = + EFFECT_NONE + | EFFECT_MONO + | EFFECT_NEGATIVE + /*| EFFECT_SOLARIZE*/ + | EFFECT_SEPIA + | EFFECT_POSTERIZE + /*| EFFECT_WHITEBOARD*/ + /*| EFFECT_BLACKBOARD*/ + | EFFECT_AQUA + ; + + flashModeList = + FLASH_MODE_OFF + | FLASH_MODE_AUTO + | FLASH_MODE_ON + /*| FLASH_MODE_RED_EYE*/ + | FLASH_MODE_TORCH; + + focusModeList = + FOCUS_MODE_AUTO + /*| FOCUS_MODE_INFINITY*/ + | FOCUS_MODE_MACRO + /*| FOCUS_MODE_FIXED*/ + /*| FOCUS_MODE_EDOF*/ + | FOCUS_MODE_CONTINUOUS_VIDEO + | FOCUS_MODE_CONTINUOUS_PICTURE + | FOCUS_MODE_TOUCH; + + sceneModeList = + SCENE_MODE_AUTO + | SCENE_MODE_ACTION + | SCENE_MODE_PORTRAIT + | SCENE_MODE_LANDSCAPE + | SCENE_MODE_NIGHT + | SCENE_MODE_NIGHT_PORTRAIT + | SCENE_MODE_THEATRE + | SCENE_MODE_BEACH + | SCENE_MODE_SNOW + | SCENE_MODE_SUNSET + | SCENE_MODE_STEADYPHOTO + | SCENE_MODE_FIREWORKS + | SCENE_MODE_SPORTS + | SCENE_MODE_PARTY + | SCENE_MODE_CANDLELIGHT; + + whiteBalanceList = + WHITE_BALANCE_AUTO + | WHITE_BALANCE_INCANDESCENT + | WHITE_BALANCE_FLUORESCENT + /*| WHITE_BALANCE_WARM_FLUORESCENT*/ + | WHITE_BALANCE_DAYLIGHT + | WHITE_BALANCE_CLOUDY_DAYLIGHT + /*| WHITE_BALANCE_TWILIGHT*/ + /*| WHITE_BALANCE_SHADE*/ + ; + + previewSizeLutMax = 0; + pictureSizeLutMax = 0; + videoSizeLutMax = 0; + previewSizeLut = NULL; + pictureSizeLut = NULL; + videoSizeLut = NULL; + videoSizeLutHighSpeed = NULL; + sizeTableSupport = false; + + /* vendor specifics */ + highResolutionCallbackW = 3264; + highResolutionCallbackH = 1836; + highSpeedRecording60WFHD = 1920; + highSpeedRecording60HFHD = 1080; + highSpeedRecording60W = 1008; + highSpeedRecording60H = 566; + highSpeedRecording120W = 1008; + highSpeedRecording120H = 566; + scalableSensorSupport = true; + bnsSupport = false; +}; + +ExynosSensorIMX134::ExynosSensorIMX134() +{ + maxPreviewW = 1920; + maxPreviewH = 1080; + maxPictureW = 3264; + maxPictureH = 2448; + maxVideoW = 1920; + maxVideoH = 1080; + maxSensorW = 3264; + maxSensorH = 2448; + + maxThumbnailW = 512; + maxThumbnailH = 384; + + fNumberNum = 22; + fNumberDen = 10; + focalLengthNum = 420; + focalLengthDen = 100; + focusDistanceNum = 0; + focusDistanceDen = 0; + apertureNum = 227; + apertureDen = 100; + horizontalViewAngle = 51.2f; + verticalViewAngle = 39.4f; + focalLengthIn35mmLength = 31; + + minFps = 1; + maxFps = 30; + + minExposureCompensation = -4; + maxExposureCompensation = 4; + exposureCompensationStep = 0.5f; + maxNumDetectedFaces = 16; + maxNumFocusAreas = 2; + maxNumMeteringAreas = 32; + maxZoomLevel = ZOOM_LEVEL_MAX; + maxZoomRatio = 400; + + zoomSupport = true; + smoothZoomSupport = false; + videoSnapshotSupport = true; + videoStabilizationSupport = false; + autoWhiteBalanceLockSupport = false; + autoExposureLockSupport = true; + + antiBandingList = + ANTIBANDING_AUTO + | ANTIBANDING_50HZ + | ANTIBANDING_60HZ + | ANTIBANDING_OFF + ; + + effectList = + EFFECT_NONE + | EFFECT_MONO + | EFFECT_NEGATIVE + /*| EFFECT_SOLARIZE*/ + | EFFECT_SEPIA + | EFFECT_POSTERIZE + /*| EFFECT_WHITEBOARD*/ + /*| EFFECT_BLACKBOARD*/ + | EFFECT_AQUA + ; + + flashModeList = + FLASH_MODE_OFF + | FLASH_MODE_AUTO + | FLASH_MODE_ON + /*| FLASH_MODE_RED_EYE*/ + | FLASH_MODE_TORCH; + + focusModeList = + FOCUS_MODE_AUTO + /*| FOCUS_MODE_INFINITY*/ + | FOCUS_MODE_MACRO + /*| FOCUS_MODE_FIXED*/ + /*| FOCUS_MODE_EDOF*/ + | FOCUS_MODE_CONTINUOUS_VIDEO + | FOCUS_MODE_CONTINUOUS_PICTURE + | FOCUS_MODE_TOUCH; + + sceneModeList = + SCENE_MODE_AUTO + | SCENE_MODE_ACTION + | SCENE_MODE_PORTRAIT + | SCENE_MODE_LANDSCAPE + | SCENE_MODE_NIGHT + | SCENE_MODE_NIGHT_PORTRAIT + | SCENE_MODE_THEATRE + | SCENE_MODE_BEACH + | SCENE_MODE_SNOW + | SCENE_MODE_SUNSET + | SCENE_MODE_STEADYPHOTO + | SCENE_MODE_FIREWORKS + | SCENE_MODE_SPORTS + | SCENE_MODE_PARTY + | SCENE_MODE_CANDLELIGHT; + + whiteBalanceList = + WHITE_BALANCE_AUTO + | WHITE_BALANCE_INCANDESCENT + | WHITE_BALANCE_FLUORESCENT + /*| WHITE_BALANCE_WARM_FLUORESCENT*/ + | WHITE_BALANCE_DAYLIGHT + | WHITE_BALANCE_CLOUDY_DAYLIGHT + /*| WHITE_BALANCE_TWILIGHT*/ + /*| WHITE_BALANCE_SHADE*/ + ; + + previewSizeLutMax = 0; + pictureSizeLutMax = 0; + videoSizeLutMax = 0; + previewSizeLut = NULL; + pictureSizeLut = NULL; + videoSizeLut = NULL; + videoSizeLutHighSpeed = NULL; + sizeTableSupport = false; + + /* vendor specifics */ + /* + burstPanoramaW = 3264; + burstPanoramaH = 1836; + highSpeedRecording60WFHD = 1920; + highSpeedRecording60HFHD = 1080; + highSpeedRecording60W = 1008; + highSpeedRecording60H = 566; + highSpeedRecording120W = 1008; + highSpeedRecording120H = 566; + scalableSensorSupport = true; + */ + bnsSupport = false; +}; + +ExynosSensorS5K3L2::ExynosSensorS5K3L2() +{ + maxPreviewW = 1920; + maxPreviewH = 1080; + maxPictureW = 4128; + maxPictureH = 3096; + maxVideoW = 1920; + maxVideoH = 1080; + maxSensorW = 4128; + maxSensorH = 3096; + maxThumbnailW = 512; + maxThumbnailH = 384; + + fNumberNum = 22; + fNumberDen = 10; + focalLengthNum = 420; + focalLengthDen = 100; + focusDistanceNum = 0; + focusDistanceDen = 0; + apertureNum = 227; + apertureDen = 100; + horizontalViewAngle = 51.2f; + verticalViewAngle = 39.4f; + focalLengthIn35mmLength = 31; + + minFps = 1; + maxFps = 30; + + minExposureCompensation = -4; + maxExposureCompensation = 4; + exposureCompensationStep = 0.5f; + maxNumDetectedFaces = 16; + maxNumFocusAreas = 2; + maxNumMeteringAreas = 32; + maxZoomLevel = ZOOM_LEVEL_MAX; + maxZoomRatio = 400; + + zoomSupport = true; + smoothZoomSupport = false; + videoSnapshotSupport = true; + videoStabilizationSupport = true; + autoWhiteBalanceLockSupport = true; + autoExposureLockSupport = true; + + antiBandingList = + ANTIBANDING_AUTO + | ANTIBANDING_50HZ + | ANTIBANDING_60HZ + | ANTIBANDING_OFF + ; + + effectList = + EFFECT_NONE + | EFFECT_MONO + | EFFECT_NEGATIVE + /*| EFFECT_SOLARIZE*/ + | EFFECT_SEPIA + | EFFECT_POSTERIZE + /*| EFFECT_WHITEBOARD*/ + /*| EFFECT_BLACKBOARD*/ + | EFFECT_AQUA + ; + + flashModeList = + FLASH_MODE_OFF + | FLASH_MODE_AUTO + | FLASH_MODE_ON + /*| FLASH_MODE_RED_EYE*/ + | FLASH_MODE_TORCH; + + focusModeList = + FOCUS_MODE_AUTO + /*| FOCUS_MODE_INFINITY*/ + | FOCUS_MODE_MACRO + /*| FOCUS_MODE_FIXED*/ + /*| FOCUS_MODE_EDOF*/ + | FOCUS_MODE_CONTINUOUS_VIDEO + | FOCUS_MODE_CONTINUOUS_PICTURE + | FOCUS_MODE_TOUCH; + + sceneModeList = + SCENE_MODE_AUTO + | SCENE_MODE_ACTION + | SCENE_MODE_PORTRAIT + | SCENE_MODE_LANDSCAPE + | SCENE_MODE_NIGHT + | SCENE_MODE_NIGHT_PORTRAIT + | SCENE_MODE_THEATRE + | SCENE_MODE_BEACH + | SCENE_MODE_SNOW + | SCENE_MODE_SUNSET + | SCENE_MODE_STEADYPHOTO + | SCENE_MODE_FIREWORKS + | SCENE_MODE_SPORTS + | SCENE_MODE_PARTY + | SCENE_MODE_CANDLELIGHT; + + whiteBalanceList = + WHITE_BALANCE_AUTO + | WHITE_BALANCE_INCANDESCENT + | WHITE_BALANCE_FLUORESCENT + /*| WHITE_BALANCE_WARM_FLUORESCENT*/ + | WHITE_BALANCE_DAYLIGHT + | WHITE_BALANCE_CLOUDY_DAYLIGHT + /*| WHITE_BALANCE_TWILIGHT*/ + /*| WHITE_BALANCE_SHADE*/ + ; + + /* vendor specifics */ + highResolutionCallbackW = 3264; + highResolutionCallbackH = 1836; + highSpeedRecording60WFHD = 1920; + highSpeedRecording60HFHD = 1080; + highSpeedRecording60W = 2056; + highSpeedRecording60H = 1152; + highSpeedRecording120W = 1024; + highSpeedRecording120H = 574; + scalableSensorSupport = true; + bnsSupport = false; + + if (bnsSupport == true) { + previewSizeLutMax = sizeof(PREVIEW_SIZE_LUT_3L2_BNS) / (sizeof(int) * SIZE_OF_LUT); + videoSizeLutMax = sizeof(VIDEO_SIZE_LUT_3L2_BNS) / (sizeof(int) * SIZE_OF_LUT); + previewSizeLut = PREVIEW_SIZE_LUT_3L2_BNS; + videoSizeLut = VIDEO_SIZE_LUT_3L2_BNS; + } else { + previewSizeLutMax = sizeof(PREVIEW_SIZE_LUT_3L2) / (sizeof(int) * SIZE_OF_LUT); + videoSizeLutMax = sizeof(VIDEO_SIZE_LUT_3L2) / (sizeof(int) * SIZE_OF_LUT); + previewSizeLut = PREVIEW_SIZE_LUT_3L2; + videoSizeLut = VIDEO_SIZE_LUT_3L2; + } + pictureSizeLutMax = sizeof(PICTURE_SIZE_LUT_3L2) / (sizeof(int) * SIZE_OF_LUT); + pictureSizeLut = PICTURE_SIZE_LUT_3L2; + videoSizeLutHighSpeed = VIDEO_SIZE_LUT_HIGH_SPEED_3L2; + sizeTableSupport = true; +}; + +ExynosSensorS5K2P2::ExynosSensorS5K2P2() +{ + maxPreviewW = 3840; + maxPreviewH = 2160; + maxPictureW = 5312; + maxPictureH = 2988; + maxVideoW = 3840; + maxVideoH = 2160; + maxSensorW = 5312; + maxSensorH = 2990; + maxThumbnailW = 512; + maxThumbnailH = 384; + + fNumberNum = 22; + fNumberDen = 10; + focalLengthNum = 420; + focalLengthDen = 100; + focusDistanceNum = 0; + focusDistanceDen = 0; + apertureNum = 227; + apertureDen = 100; + horizontalViewAngle = 51.2f; + verticalViewAngle = 39.4f; + focalLengthIn35mmLength = 31; + + minFps = 1; + maxFps = 30; + + minExposureCompensation = -4; + maxExposureCompensation = 4; + exposureCompensationStep = 0.5f; + maxNumDetectedFaces = 16; + maxNumFocusAreas = 2; + maxNumMeteringAreas = 32; + maxZoomLevel = ZOOM_LEVEL_MAX; + maxZoomRatio = 400; + + zoomSupport = true; + smoothZoomSupport = false; + videoSnapshotSupport = true; + videoStabilizationSupport = true; + autoWhiteBalanceLockSupport = true; + autoExposureLockSupport = true; + + antiBandingList = + ANTIBANDING_AUTO + | ANTIBANDING_50HZ + | ANTIBANDING_60HZ + | ANTIBANDING_OFF + ; + + effectList = + EFFECT_NONE + | EFFECT_MONO + | EFFECT_NEGATIVE + /*| EFFECT_SOLARIZE*/ + | EFFECT_SEPIA + | EFFECT_POSTERIZE + /*| EFFECT_WHITEBOARD*/ + /*| EFFECT_BLACKBOARD*/ + | EFFECT_AQUA + ; + + flashModeList = + FLASH_MODE_OFF + | FLASH_MODE_AUTO + | FLASH_MODE_ON + //| FLASH_MODE_RED_EYE + | FLASH_MODE_TORCH; + + focusModeList = + FOCUS_MODE_AUTO + //| FOCUS_MODE_INFINITY + | FOCUS_MODE_MACRO + //| FOCUS_MODE_FIXED + //| FOCUS_MODE_EDOF + | FOCUS_MODE_CONTINUOUS_VIDEO + | FOCUS_MODE_CONTINUOUS_PICTURE + | FOCUS_MODE_TOUCH; + + sceneModeList = + SCENE_MODE_AUTO + | SCENE_MODE_ACTION + | SCENE_MODE_PORTRAIT + | SCENE_MODE_LANDSCAPE + | SCENE_MODE_NIGHT + | SCENE_MODE_NIGHT_PORTRAIT + | SCENE_MODE_THEATRE + | SCENE_MODE_BEACH + | SCENE_MODE_SNOW + | SCENE_MODE_SUNSET + | SCENE_MODE_STEADYPHOTO + | SCENE_MODE_FIREWORKS + | SCENE_MODE_SPORTS + | SCENE_MODE_PARTY + | SCENE_MODE_CANDLELIGHT; + + whiteBalanceList = + WHITE_BALANCE_AUTO + | WHITE_BALANCE_INCANDESCENT + | WHITE_BALANCE_FLUORESCENT + //| WHITE_BALANCE_WARM_FLUORESCENT + | WHITE_BALANCE_DAYLIGHT + | WHITE_BALANCE_CLOUDY_DAYLIGHT + //| WHITE_BALANCE_TWILIGHT + //| WHITE_BALANCE_SHADE + ; + + /* vendor specifics */ + highResolutionCallbackW = 3264; + highResolutionCallbackH = 1836; + highSpeedRecording60WFHD = 1920; + highSpeedRecording60HFHD = 1080; + highSpeedRecording60W = 1008; + highSpeedRecording60H = 566; + highSpeedRecording120W = 1008; + highSpeedRecording120H = 566; + scalableSensorSupport = true; + bnsSupport = true; + + if (bnsSupport == true) { + previewSizeLutMax = sizeof(PREVIEW_SIZE_LUT_2P2_BNS) / (sizeof(int) * SIZE_OF_LUT); + videoSizeLutMax = sizeof(VIDEO_SIZE_LUT_2P2_BNS) / (sizeof(int) * SIZE_OF_LUT); + pictureSizeLutMax = sizeof(PICTURE_SIZE_LUT_2P2) / (sizeof(int) * SIZE_OF_LUT); + previewSizeLut = PREVIEW_SIZE_LUT_2P2_BNS; + videoSizeLut = VIDEO_SIZE_LUT_2P2_BNS; + pictureSizeLut = PICTURE_SIZE_LUT_2P2; + videoSizeLutHighSpeed = VIDEO_SIZE_LUT_HIGH_SPEED_2P2_BNS; + sizeTableSupport = true; + } else { + previewSizeLutMax = 0; + pictureSizeLutMax = 0; + videoSizeLutMax = 0; + previewSizeLut = NULL; + pictureSizeLut = NULL; + videoSizeLut = NULL; + videoSizeLutHighSpeed = NULL; + sizeTableSupport = false; + } +}; + +ExynosSensorS5K6B2::ExynosSensorS5K6B2() +{ + maxPreviewW = 1920; + maxPreviewH = 1080; + maxPictureW = 1920; + maxPictureH = 1080; + maxVideoW = 1920; + maxVideoH = 1080; + maxSensorW = 1920; + maxSensorH = 1080; + maxThumbnailW = 512; + maxThumbnailH = 384; + + fNumberNum = 22; + fNumberDen = 10; + focalLengthNum = 420; + focalLengthDen = 100; + focusDistanceNum = 0; + focusDistanceDen = 0; + apertureNum = 227; + apertureDen = 100; + horizontalViewAngle = 51.2f; + verticalViewAngle = 39.4f; + focalLengthIn35mmLength = 31; + + minFps = 1; + maxFps = 30; + + minExposureCompensation = -4; + maxExposureCompensation = 4; + exposureCompensationStep = 0.5f; + maxNumDetectedFaces = 16; + maxNumFocusAreas = 1; + maxNumMeteringAreas = 32; + maxZoomLevel = ZOOM_LEVEL_MAX; + maxZoomRatio = 400; + + zoomSupport = true; + smoothZoomSupport = false; + videoSnapshotSupport = true; + videoStabilizationSupport = true; + autoWhiteBalanceLockSupport = true; + autoExposureLockSupport = true; + + antiBandingList = + ANTIBANDING_AUTO + | ANTIBANDING_50HZ + | ANTIBANDING_60HZ + | ANTIBANDING_OFF + ; + + effectList = + EFFECT_NONE + | EFFECT_MONO + | EFFECT_NEGATIVE + /*| EFFECT_SOLARIZE*/ + | EFFECT_SEPIA + | EFFECT_POSTERIZE + /*| EFFECT_WHITEBOARD*/ + /*| EFFECT_BLACKBOARD*/ + | EFFECT_AQUA + ; + + flashModeList = + FLASH_MODE_OFF + /*| FLASH_MODE_AUTO*/ + /*| FLASH_MODE_ON*/ + /*| FLASH_MODE_RED_EYE*/ + /*| FLASH_MODE_TORCH*/ + ; + + focusModeList = + /* FOCUS_MODE_AUTO*/ + FOCUS_MODE_INFINITY + /*| FOCUS_MODE_MACRO*/ + /*| FOCUS_MODE_FIXED*/ + /*| FOCUS_MODE_EDOF*/ + /*| FOCUS_MODE_CONTINUOUS_VIDEO*/ + /*| FOCUS_MODE_CONTINUOUS_PICTURE*/ + /*| FOCUS_MODE_TOUCH*/ + ; + + sceneModeList = + SCENE_MODE_AUTO + | SCENE_MODE_ACTION + | SCENE_MODE_PORTRAIT + | SCENE_MODE_LANDSCAPE + | SCENE_MODE_NIGHT + | SCENE_MODE_NIGHT_PORTRAIT + | SCENE_MODE_THEATRE + | SCENE_MODE_BEACH + | SCENE_MODE_SNOW + | SCENE_MODE_SUNSET + | SCENE_MODE_STEADYPHOTO + | SCENE_MODE_FIREWORKS + | SCENE_MODE_SPORTS + | SCENE_MODE_PARTY + | SCENE_MODE_CANDLELIGHT; + + whiteBalanceList = + WHITE_BALANCE_AUTO + | WHITE_BALANCE_INCANDESCENT + | WHITE_BALANCE_FLUORESCENT + /* WHITE_BALANCE_WARM_FLUORESCENT*/ + | WHITE_BALANCE_DAYLIGHT + | WHITE_BALANCE_CLOUDY_DAYLIGHT + /* WHITE_BALANCE_TWILIGHT*/ + /* WHITE_BALANCE_SHADE*/ + ; + + previewSizeLutMax = 0; + pictureSizeLutMax = 0; + videoSizeLutMax = 0; + previewSizeLut = NULL; + pictureSizeLut = NULL; + videoSizeLut = NULL; + videoSizeLutHighSpeed = NULL; + sizeTableSupport = false; + + /* vendor specifics */ + highResolutionCallbackW = 3264; + highResolutionCallbackH = 1836; + highSpeedRecording60WFHD = 1920; + highSpeedRecording60HFHD = 1080; + highSpeedRecording60W = 1008; + highSpeedRecording60H = 566; + highSpeedRecording120W = 1008; + highSpeedRecording120H = 566; + scalableSensorSupport = true; + bnsSupport = false; +}; + + +ExynosSensorS5K3H7::ExynosSensorS5K3H7() +{ + maxPreviewW = 1920; + maxPreviewH = 1080; + maxPictureW = 3248; + maxPictureH = 2438; + maxVideoW = 1920; + maxVideoH = 1080; + maxSensorW = 3248; + maxSensorH = 2438; + + maxThumbnailW = 512; + maxThumbnailH = 384; + + fNumberNum = 22; + fNumberDen = 10; + focalLengthNum = 420; + focalLengthDen = 100; + focusDistanceNum = 0; + focusDistanceDen = 0; + apertureNum = 227; + apertureDen = 100; + horizontalViewAngle = 51.2f; + verticalViewAngle = 39.4f; + focalLengthIn35mmLength = 31; + + minFps = 1; + maxFps = 30; + + minExposureCompensation = -4; + maxExposureCompensation = 4; + exposureCompensationStep = 0.5f; + maxNumDetectedFaces = 16; + maxNumFocusAreas = 2; + maxNumMeteringAreas = 32; + maxZoomLevel = ZOOM_LEVEL_MAX; + maxZoomRatio = 400; + + zoomSupport = true; + smoothZoomSupport = false; + videoSnapshotSupport = true; + videoStabilizationSupport = false; + autoWhiteBalanceLockSupport = true; + autoExposureLockSupport = true; + + antiBandingList = + ANTIBANDING_AUTO + | ANTIBANDING_50HZ + | ANTIBANDING_60HZ + | ANTIBANDING_OFF + ; + + effectList = + EFFECT_NONE + | EFFECT_MONO + | EFFECT_NEGATIVE + /*| EFFECT_SOLARIZE*/ + | EFFECT_SEPIA + | EFFECT_POSTERIZE + /*| EFFECT_WHITEBOARD*/ + /*| EFFECT_BLACKBOARD*/ + | EFFECT_AQUA + ; + + flashModeList = + FLASH_MODE_OFF + | FLASH_MODE_AUTO + | FLASH_MODE_ON + /*| FLASH_MODE_RED_EYE*/ + | FLASH_MODE_TORCH; + + focusModeList = + FOCUS_MODE_AUTO + /*| FOCUS_MODE_INFINITY*/ + | FOCUS_MODE_MACRO + /*| FOCUS_MODE_FIXED*/ + /*| FOCUS_MODE_EDOF*/ + | FOCUS_MODE_CONTINUOUS_VIDEO + | FOCUS_MODE_CONTINUOUS_PICTURE + | FOCUS_MODE_TOUCH; + + sceneModeList = + SCENE_MODE_AUTO + | SCENE_MODE_ACTION + | SCENE_MODE_PORTRAIT + | SCENE_MODE_LANDSCAPE + | SCENE_MODE_NIGHT + | SCENE_MODE_NIGHT_PORTRAIT + | SCENE_MODE_THEATRE + | SCENE_MODE_BEACH + | SCENE_MODE_SNOW + | SCENE_MODE_SUNSET + | SCENE_MODE_STEADYPHOTO + | SCENE_MODE_FIREWORKS + | SCENE_MODE_SPORTS + | SCENE_MODE_PARTY + | SCENE_MODE_CANDLELIGHT; + + whiteBalanceList = + WHITE_BALANCE_AUTO + | WHITE_BALANCE_INCANDESCENT + | WHITE_BALANCE_FLUORESCENT + /*| WHITE_BALANCE_WARM_FLUORESCENT*/ + | WHITE_BALANCE_DAYLIGHT + | WHITE_BALANCE_CLOUDY_DAYLIGHT + /*| WHITE_BALANCE_TWILIGHT*/ + /*| WHITE_BALANCE_SHADE*/ + ; + + /* vendor specifics */ + /* + burstPanoramaW = 3264; + burstPanoramaH = 1836; + highSpeedRecording60WFHD = 1920; + highSpeedRecording60HFHD = 1080; + highSpeedRecording60W = 1008; + highSpeedRecording60H = 566; + highSpeedRecording120W = 1008; + highSpeedRecording120H = 566; + scalableSensorSupport = true; + */ + bnsSupport = false; + + if (bnsSupport == true) { + previewSizeLutMax = 0; + pictureSizeLutMax = 0; + videoSizeLutMax = 0; + previewSizeLut = NULL; + pictureSizeLut = NULL; + videoSizeLut = NULL; + videoSizeLutHighSpeed = NULL; + sizeTableSupport = false; + } else { + previewSizeLutMax = sizeof(PREVIEW_SIZE_LUT_3H7) / (sizeof(int) * SIZE_OF_LUT); + videoSizeLutMax = sizeof(VIDEO_SIZE_LUT_3H7) / (sizeof(int) * SIZE_OF_LUT); + pictureSizeLutMax = sizeof(PICTURE_SIZE_LUT_3H7) / (sizeof(int) * SIZE_OF_LUT); + previewSizeLut = PREVIEW_SIZE_LUT_3H7; + videoSizeLut = VIDEO_SIZE_LUT_3H7; + pictureSizeLut = PICTURE_SIZE_LUT_3H7; + videoSizeLutHighSpeed = VIDEO_SIZE_LUT_HIGH_SPEED_3H7; + sizeTableSupport = true; + } +}; + +ExynosSensorS5K3H5::ExynosSensorS5K3H5() +{ + maxPreviewW = 1920; + maxPreviewH = 1080; + maxPictureW = 3248; + maxPictureH = 2438; + maxVideoW = 1920; + maxVideoH = 1080; + maxSensorW = 3248; + maxSensorH = 2438; + + maxThumbnailW = 512; + maxThumbnailH = 384; + + fNumberNum = 22; + fNumberDen = 10; + focalLengthNum = 420; + focalLengthDen = 100; + focusDistanceNum = 0; + focusDistanceDen = 0; + apertureNum = 227; + apertureDen = 100; + horizontalViewAngle = 51.2f; + verticalViewAngle = 39.4f; + focalLengthIn35mmLength = 31; + + minFps = 1; + maxFps = 30; + + minExposureCompensation = -4; + maxExposureCompensation = 4; + exposureCompensationStep = 0.5f; + maxNumDetectedFaces = 16; + maxNumFocusAreas = 2; + maxNumMeteringAreas = 32; + maxZoomLevel = ZOOM_LEVEL_MAX; + maxZoomRatio = 400; + + zoomSupport = true; + smoothZoomSupport = false; + videoSnapshotSupport = true; + videoStabilizationSupport = false; + autoWhiteBalanceLockSupport = true; + autoExposureLockSupport = true; + + antiBandingList = + ANTIBANDING_AUTO + | ANTIBANDING_50HZ + | ANTIBANDING_60HZ + | ANTIBANDING_OFF + ; + + effectList = + EFFECT_NONE + | EFFECT_MONO + | EFFECT_NEGATIVE + /*| EFFECT_SOLARIZE*/ + | EFFECT_SEPIA + | EFFECT_POSTERIZE + /*| EFFECT_WHITEBOARD*/ + /*| EFFECT_BLACKBOARD*/ + | EFFECT_AQUA + ; + + flashModeList = + FLASH_MODE_OFF + | FLASH_MODE_AUTO + | FLASH_MODE_ON + /*| FLASH_MODE_RED_EYE*/ + | FLASH_MODE_TORCH; + + focusModeList = + FOCUS_MODE_AUTO + /*| FOCUS_MODE_INFINITY*/ + | FOCUS_MODE_MACRO + /*| FOCUS_MODE_FIXED*/ + /*| FOCUS_MODE_EDOF*/ + | FOCUS_MODE_CONTINUOUS_VIDEO + | FOCUS_MODE_CONTINUOUS_PICTURE + | FOCUS_MODE_TOUCH; + + sceneModeList = + SCENE_MODE_AUTO + | SCENE_MODE_ACTION + | SCENE_MODE_PORTRAIT + | SCENE_MODE_LANDSCAPE + | SCENE_MODE_NIGHT + | SCENE_MODE_NIGHT_PORTRAIT + | SCENE_MODE_THEATRE + | SCENE_MODE_BEACH + | SCENE_MODE_SNOW + | SCENE_MODE_SUNSET + | SCENE_MODE_STEADYPHOTO + | SCENE_MODE_FIREWORKS + | SCENE_MODE_SPORTS + | SCENE_MODE_PARTY + | SCENE_MODE_CANDLELIGHT; + + whiteBalanceList = + WHITE_BALANCE_AUTO + | WHITE_BALANCE_INCANDESCENT + | WHITE_BALANCE_FLUORESCENT + /*| WHITE_BALANCE_WARM_FLUORESCENT*/ + | WHITE_BALANCE_DAYLIGHT + | WHITE_BALANCE_CLOUDY_DAYLIGHT + /*| WHITE_BALANCE_TWILIGHT*/ + /*| WHITE_BALANCE_SHADE*/ + ; + + previewSizeLutMax = 0; + pictureSizeLutMax = 0; + videoSizeLutMax = 0; + previewSizeLut = NULL; + pictureSizeLut = NULL; + videoSizeLut = NULL; + videoSizeLutHighSpeed = NULL; + sizeTableSupport = false; + + /* vendor specifics */ + /* + burstPanoramaW = 3264; + burstPanoramaH = 1836; + highSpeedRecording60WFHD = 1920; + highSpeedRecording60HFHD = 1080; + highSpeedRecording60W = 1008; + highSpeedRecording60H = 566; + highSpeedRecording120W = 1008; + highSpeedRecording120H = 566; + scalableSensorSupport = true; + */ + bnsSupport = false; +}; + +ExynosSensorS5K4H5::ExynosSensorS5K4H5() +{ + maxPreviewW = 1920; + maxPreviewH = 1080; + maxPictureW = 3264; + maxPictureH = 2448; + maxVideoW = 1920; + maxVideoH = 1080; + maxSensorW = 3264; + maxSensorH = 2448; + + maxThumbnailW = 512; + maxThumbnailH = 384; + + fNumberNum = 22; + fNumberDen = 10; + focalLengthNum = 420; + focalLengthDen = 100; + focusDistanceNum = 0; + focusDistanceDen = 0; + apertureNum = 227; + apertureDen = 100; + horizontalViewAngle = 51.2f; + verticalViewAngle = 39.4f; + focalLengthIn35mmLength = 31; + + minFps = 1; + maxFps = 30; + + minExposureCompensation = -4; + maxExposureCompensation = 4; + exposureCompensationStep = 0.5f; + maxNumDetectedFaces = 16; + maxNumFocusAreas = 2; + maxNumMeteringAreas = 32; + maxZoomLevel = ZOOM_LEVEL_MAX; + maxZoomRatio = 400; + + zoomSupport = true; + smoothZoomSupport = false; + videoSnapshotSupport = true; + videoStabilizationSupport = false; + autoWhiteBalanceLockSupport = false; + autoExposureLockSupport = true; + + antiBandingList = + ANTIBANDING_AUTO + | ANTIBANDING_50HZ + | ANTIBANDING_60HZ + | ANTIBANDING_OFF + ; + + effectList = + EFFECT_NONE + | EFFECT_MONO + | EFFECT_NEGATIVE + /*| EFFECT_SOLARIZE*/ + | EFFECT_SEPIA + | EFFECT_POSTERIZE + /*| EFFECT_WHITEBOARD*/ + /*| EFFECT_BLACKBOARD*/ + | EFFECT_AQUA + ; + + flashModeList = + FLASH_MODE_OFF + | FLASH_MODE_AUTO + | FLASH_MODE_ON + /*| FLASH_MODE_RED_EYE*/ + | FLASH_MODE_TORCH; + + focusModeList = + FOCUS_MODE_AUTO + /*| FOCUS_MODE_INFINITY*/ + | FOCUS_MODE_MACRO + /*| FOCUS_MODE_FIXED*/ + /*| FOCUS_MODE_EDOF*/ + | FOCUS_MODE_CONTINUOUS_VIDEO + | FOCUS_MODE_CONTINUOUS_PICTURE + | FOCUS_MODE_TOUCH; + + sceneModeList = + SCENE_MODE_AUTO + | SCENE_MODE_ACTION + | SCENE_MODE_PORTRAIT + | SCENE_MODE_LANDSCAPE + | SCENE_MODE_NIGHT + | SCENE_MODE_NIGHT_PORTRAIT + | SCENE_MODE_THEATRE + | SCENE_MODE_BEACH + | SCENE_MODE_SNOW + | SCENE_MODE_SUNSET + | SCENE_MODE_STEADYPHOTO + | SCENE_MODE_FIREWORKS + | SCENE_MODE_SPORTS + | SCENE_MODE_PARTY + | SCENE_MODE_CANDLELIGHT; + + whiteBalanceList = + WHITE_BALANCE_AUTO + | WHITE_BALANCE_INCANDESCENT + | WHITE_BALANCE_FLUORESCENT + /*| WHITE_BALANCE_WARM_FLUORESCENT*/ + | WHITE_BALANCE_DAYLIGHT + | WHITE_BALANCE_CLOUDY_DAYLIGHT + /*| WHITE_BALANCE_TWILIGHT*/ + /*| WHITE_BALANCE_SHADE*/ + ; + + /* vendor specifics */ + /* + burstPanoramaW = 3264; + burstPanoramaH = 1836; + highSpeedRecording60WFHD = 1920; + highSpeedRecording60HFHD = 1080; + highSpeedRecording60W = 1008; + highSpeedRecording60H = 566; + highSpeedRecording120W = 1008; + highSpeedRecording120H = 566; + scalableSensorSupport = true; + */ + bnsSupport = false; + + if (bnsSupport == true) { + previewSizeLutMax = 0; + pictureSizeLutMax = 0; + videoSizeLutMax = 0; + previewSizeLut = NULL; + pictureSizeLut = NULL; + videoSizeLut = NULL; + videoSizeLutHighSpeed = NULL; + sizeTableSupport = false; + } else { + previewSizeLutMax = sizeof(PREVIEW_SIZE_LUT_4H5) / (sizeof(int) * SIZE_OF_LUT); + videoSizeLutMax = sizeof(VIDEO_SIZE_LUT_4H5) / (sizeof(int) * SIZE_OF_LUT); + pictureSizeLutMax = sizeof(PICTURE_SIZE_LUT_4H5) / (sizeof(int) * SIZE_OF_LUT); + previewSizeLut = PREVIEW_SIZE_LUT_4H5; + videoSizeLut = VIDEO_SIZE_LUT_4H5; + pictureSizeLut = PICTURE_SIZE_LUT_4H5; + videoSizeLutHighSpeed = VIDEO_SIZE_LUT_HIGH_SPEED_4H5; + sizeTableSupport = true; + } +}; + +ExynosSensorS5K6A3::ExynosSensorS5K6A3() +{ + maxPreviewW = 1280; + maxPreviewH = 720; + maxPictureW = 1392; + maxPictureH = 1402; + maxVideoW = 1920; + maxVideoH = 1080; + maxSensorW = 1392; + maxSensorH = 1402; + + maxThumbnailW = 512; + maxThumbnailH = 384; + + fNumberNum = 22; + fNumberDen = 10; + focalLengthNum = 420; + focalLengthDen = 100; + focusDistanceNum = 0; + focusDistanceDen = 0; + apertureNum = 227; + apertureDen = 100; + horizontalViewAngle = 51.2f; + verticalViewAngle = 39.4f; + focalLengthIn35mmLength = 31; + + minFps = 1; + maxFps = 30; + + minExposureCompensation = -4; + maxExposureCompensation = 4; + exposureCompensationStep = 0.5f; + maxNumDetectedFaces = 16; + maxNumFocusAreas = 2; + maxNumMeteringAreas = 32; + maxZoomLevel = ZOOM_LEVEL_MAX; + maxZoomRatio = 400; + + zoomSupport = true; + smoothZoomSupport = false; + videoSnapshotSupport = true; + videoStabilizationSupport = false; + autoWhiteBalanceLockSupport = false; + autoExposureLockSupport = true; + + antiBandingList = + ANTIBANDING_AUTO + | ANTIBANDING_50HZ + | ANTIBANDING_60HZ + | ANTIBANDING_OFF + ; + + effectList = + EFFECT_NONE + | EFFECT_MONO + | EFFECT_NEGATIVE + /*| EFFECT_SOLARIZE*/ + | EFFECT_SEPIA + | EFFECT_POSTERIZE + /*| EFFECT_WHITEBOARD*/ + /*| EFFECT_BLACKBOARD*/ + | EFFECT_AQUA + ; + + flashModeList = + FLASH_MODE_OFF; + /*| FLASH_MODE_AUTO*/ + /*| FLASH_MODE_ON*/ + /*| FLASH_MODE_RED_EYE*/ + /*| FLASH_MODE_TORCH;*/ + + focusModeList = + /*FOCUS_MODE_AUTO*/ + FOCUS_MODE_INFINITY; + /*| FOCUS_MODE_INFINITY*/ + /*| FOCUS_MODE_MACRO*/ + /*| FOCUS_MODE_FIXED*/ + /*| FOCUS_MODE_EDOF*/ + /*| FOCUS_MODE_CONTINUOUS_VIDEO*/ + /*| FOCUS_MODE_CONTINUOUS_PICTURE*/ + /*| FOCUS_MODE_TOUCH*/ + ; + + sceneModeList = + SCENE_MODE_AUTO + | SCENE_MODE_ACTION + | SCENE_MODE_PORTRAIT + | SCENE_MODE_LANDSCAPE + | SCENE_MODE_NIGHT + | SCENE_MODE_NIGHT_PORTRAIT + | SCENE_MODE_THEATRE + | SCENE_MODE_BEACH + | SCENE_MODE_SNOW + | SCENE_MODE_SUNSET + | SCENE_MODE_STEADYPHOTO + | SCENE_MODE_FIREWORKS + | SCENE_MODE_SPORTS + | SCENE_MODE_PARTY + | SCENE_MODE_CANDLELIGHT; + + whiteBalanceList = + WHITE_BALANCE_AUTO + | WHITE_BALANCE_INCANDESCENT + | WHITE_BALANCE_FLUORESCENT + /*| WHITE_BALANCE_WARM_FLUORESCENT*/ + | WHITE_BALANCE_DAYLIGHT + | WHITE_BALANCE_CLOUDY_DAYLIGHT + /*| WHITE_BALANCE_TWILIGHT*/ + /*| WHITE_BALANCE_SHADE*/ + ; + + previewSizeLutMax = 0; + pictureSizeLutMax = 0; + videoSizeLutMax = 0; + previewSizeLut = NULL; + pictureSizeLut = NULL; + videoSizeLut = NULL; + videoSizeLutHighSpeed = NULL; + sizeTableSupport = false; + + /* vendor specifics */ + /* + burstPanoramaW = 3264; + burstPanoramaH = 1836; + highSpeedRecording60WFHD = 1920; + highSpeedRecording60HFHD = 1080; + highSpeedRecording60W = 1008; + highSpeedRecording60H = 566; + highSpeedRecording120W = 1008; + highSpeedRecording120H = 566; + scalableSensorSupport = true; + */ + bnsSupport = false; +}; + +ExynosSensorIMX175::ExynosSensorIMX175() +{ + maxPreviewW = 1920; + maxPreviewH = 1080; + maxPictureW = 3264; + maxPictureH = 2448; + maxVideoW = 1920; + maxVideoH = 1080; + maxSensorW = 3264; + maxSensorH = 2448; + + maxThumbnailW = 512; + maxThumbnailH = 384; + + fNumberNum = 26; + fNumberDen = 10; + focalLengthNum = 370; + focalLengthDen = 100; + focusDistanceNum = 0; + focusDistanceDen = 0; + apertureNum = 276; + apertureDen = 100; + horizontalViewAngle = 51.2f; + verticalViewAngle = 39.4f; + focalLengthIn35mmLength = 31; + + minFps = 1; + maxFps = 30; + + minExposureCompensation = -4; + maxExposureCompensation = 4; + exposureCompensationStep = 0.5f; + maxNumDetectedFaces = 16; + maxNumFocusAreas = 2; + maxNumMeteringAreas = 32; + maxZoomLevel = ZOOM_LEVEL_MAX; + maxZoomRatio = 400; + + zoomSupport = true; + smoothZoomSupport = false; + videoSnapshotSupport = true; + videoStabilizationSupport = false; + autoWhiteBalanceLockSupport = true; + autoExposureLockSupport = true; + + antiBandingList = + ANTIBANDING_AUTO + | ANTIBANDING_50HZ + | ANTIBANDING_60HZ + | ANTIBANDING_OFF + ; + + effectList = + EFFECT_NONE + | EFFECT_MONO + | EFFECT_NEGATIVE + /*| EFFECT_SOLARIZE*/ + | EFFECT_SEPIA + | EFFECT_POSTERIZE + /*| EFFECT_WHITEBOARD*/ + /*| EFFECT_BLACKBOARD*/ + | EFFECT_AQUA + ; + + flashModeList = + FLASH_MODE_OFF + | FLASH_MODE_AUTO + | FLASH_MODE_ON + /*| FLASH_MODE_RED_EYE*/ + | FLASH_MODE_TORCH; + + focusModeList = + FOCUS_MODE_AUTO + /*| FOCUS_MODE_INFINITY*/ + | FOCUS_MODE_MACRO + /*| FOCUS_MODE_FIXED*/ + /*| FOCUS_MODE_EDOF*/ + | FOCUS_MODE_CONTINUOUS_VIDEO + | FOCUS_MODE_CONTINUOUS_PICTURE + | FOCUS_MODE_TOUCH; + + sceneModeList = + SCENE_MODE_AUTO + | SCENE_MODE_ACTION + | SCENE_MODE_PORTRAIT + | SCENE_MODE_LANDSCAPE + | SCENE_MODE_NIGHT + | SCENE_MODE_NIGHT_PORTRAIT + | SCENE_MODE_THEATRE + | SCENE_MODE_BEACH + | SCENE_MODE_SNOW + | SCENE_MODE_SUNSET + | SCENE_MODE_STEADYPHOTO + | SCENE_MODE_FIREWORKS + | SCENE_MODE_SPORTS + | SCENE_MODE_PARTY + | SCENE_MODE_CANDLELIGHT; + + whiteBalanceList = + WHITE_BALANCE_AUTO + | WHITE_BALANCE_INCANDESCENT + | WHITE_BALANCE_FLUORESCENT + /*| WHITE_BALANCE_WARM_FLUORESCENT*/ + | WHITE_BALANCE_DAYLIGHT + | WHITE_BALANCE_CLOUDY_DAYLIGHT + /*| WHITE_BALANCE_TWILIGHT*/ + /*| WHITE_BALANCE_SHADE*/ + ; + + /* vendor specifics */ + /* + burstPanoramaW = 3264; + burstPanoramaH = 1836; + highSpeedRecording60WFHD = 1920; + highSpeedRecording60HFHD = 1080; + highSpeedRecording60W = 1008; + highSpeedRecording60H = 566; + highSpeedRecording120W = 1008; + highSpeedRecording120H = 566; + scalableSensorSupport = true; + */ + bnsSupport = false; + + if (bnsSupport == true) { + previewSizeLutMax = 0; + pictureSizeLutMax = 0; + videoSizeLutMax = 0; + previewSizeLut = NULL; + pictureSizeLut = NULL; + videoSizeLut = NULL; + videoSizeLutHighSpeed = NULL; + sizeTableSupport = false; + } else { + previewSizeLutMax = sizeof(PREVIEW_SIZE_LUT_IMX175) / (sizeof(int) * SIZE_OF_LUT); + videoSizeLutMax = sizeof(VIDEO_SIZE_LUT_IMX175) / (sizeof(int) * SIZE_OF_LUT); + pictureSizeLutMax = sizeof(PICTURE_SIZE_LUT_IMX175) / (sizeof(int) * SIZE_OF_LUT); + previewSizeLut = PREVIEW_SIZE_LUT_IMX175; + videoSizeLut = VIDEO_SIZE_LUT_IMX175; + pictureSizeLut = PICTURE_SIZE_LUT_IMX175; + videoSizeLutHighSpeed = VIDEO_SIZE_LUT_HIGH_SPEED_IMX175; + sizeTableSupport = true; + } +}; + +ExynosSensorS5K8B1::ExynosSensorS5K8B1() +{ + maxPreviewW = 1920; + maxPreviewH = 1080; + maxPictureW = 1920; + maxPictureH = 1080; + maxVideoW = 1920; + maxVideoH = 1080; + maxSensorW = 1920; + maxSensorH = 1080; + maxThumbnailW = 512; + maxThumbnailH = 384; + + fNumberNum = 22; + fNumberDen = 10; + focalLengthNum = 420; + focalLengthDen = 100; + focusDistanceNum = 0; + focusDistanceDen = 0; + apertureNum = 227; + apertureDen = 100; + horizontalViewAngle = 51.2f; + verticalViewAngle = 39.4f; + focalLengthIn35mmLength = 31; + + minFps = 1; + maxFps = 30; + + minExposureCompensation = -4; + maxExposureCompensation = 4; + exposureCompensationStep = 0.5f; + maxNumDetectedFaces = 16; + maxNumFocusAreas = 1; + maxNumMeteringAreas = 32; + maxZoomLevel = ZOOM_LEVEL_MAX; + maxZoomRatio = 400; + + zoomSupport = true; + smoothZoomSupport = false; + videoSnapshotSupport = true; + videoStabilizationSupport = true; + autoWhiteBalanceLockSupport = true; + autoExposureLockSupport = true; + + antiBandingList = + ANTIBANDING_AUTO + | ANTIBANDING_50HZ + | ANTIBANDING_60HZ + | ANTIBANDING_OFF + ; + + effectList = + EFFECT_NONE + | EFFECT_MONO + | EFFECT_NEGATIVE + /*| EFFECT_SOLARIZE*/ + | EFFECT_SEPIA + | EFFECT_POSTERIZE + /*| EFFECT_WHITEBOARD*/ + /*| EFFECT_BLACKBOARD*/ + | EFFECT_AQUA + ; + + flashModeList = + FLASH_MODE_OFF + /*| FLASH_MODE_AUTO*/ + /*| FLASH_MODE_ON*/ + /*| FLASH_MODE_RED_EYE*/ + /*| FLASH_MODE_TORCH*/ + ; + + focusModeList = + /* FOCUS_MODE_AUTO*/ + FOCUS_MODE_INFINITY + /*| FOCUS_MODE_MACRO*/ + /*| FOCUS_MODE_FIXED*/ + /*| FOCUS_MODE_EDOF*/ + /*| FOCUS_MODE_CONTINUOUS_VIDEO*/ + /*| FOCUS_MODE_CONTINUOUS_PICTURE*/ + /*| FOCUS_MODE_TOUCH*/ + ; + + sceneModeList = + SCENE_MODE_AUTO + | SCENE_MODE_ACTION + | SCENE_MODE_PORTRAIT + | SCENE_MODE_LANDSCAPE + | SCENE_MODE_NIGHT + | SCENE_MODE_NIGHT_PORTRAIT + | SCENE_MODE_THEATRE + | SCENE_MODE_BEACH + | SCENE_MODE_SNOW + | SCENE_MODE_SUNSET + | SCENE_MODE_STEADYPHOTO + | SCENE_MODE_FIREWORKS + | SCENE_MODE_SPORTS + | SCENE_MODE_PARTY + | SCENE_MODE_CANDLELIGHT; + + whiteBalanceList = + WHITE_BALANCE_AUTO + | WHITE_BALANCE_INCANDESCENT + | WHITE_BALANCE_FLUORESCENT + /* WHITE_BALANCE_WARM_FLUORESCENT*/ + | WHITE_BALANCE_DAYLIGHT + | WHITE_BALANCE_CLOUDY_DAYLIGHT + /* WHITE_BALANCE_TWILIGHT*/ + /* WHITE_BALANCE_SHADE*/ + ; + + previewSizeLutMax = 0; + pictureSizeLutMax = 0; + videoSizeLutMax = 0; + previewSizeLut = NULL; + pictureSizeLut = NULL; + videoSizeLut = NULL; + videoSizeLutHighSpeed = NULL; + sizeTableSupport = false; + + /* vendor specifics */ + highResolutionCallbackW = 3264; + highResolutionCallbackH = 1836; + highSpeedRecording60WFHD = 1920; + highSpeedRecording60HFHD = 1080; + highSpeedRecording60W = 1008; + highSpeedRecording60H = 566; + highSpeedRecording120W = 1008; + highSpeedRecording120H = 566; + scalableSensorSupport = true; + bnsSupport = false; +}; + +}; /* namespace android */ diff --git a/libcamera/ExynosCameraSensorInfo.h b/libcamera/ExynosCameraSensorInfo.h new file mode 100644 index 0000000..7d97808 --- /dev/null +++ b/libcamera/ExynosCameraSensorInfo.h @@ -0,0 +1,562 @@ +/* +** +** Copyright 2013, Samsung Electronics Co. LTD +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ + +#ifndef EXYNOS_CAMERA_SENSOR_INFO_H +#define EXYNOS_CAMERA_SENSOR_INFO_H + +#include <videodev2.h> +#include <videodev2_exynos_camera.h> +#include "ExynosCameraConfig.h" +#include "ExynosCameraSizeTable.h" +#include "fimc-is-metadata.h" + +/*TODO: This values will be changed */ +#define BACK_CAMERA_AUTO_FOCUS_DISTANCES_STR "0.10,1.20,Infinity" +#define FRONT_CAMERA_FOCUS_DISTANCES_STR "0.20,0.25,Infinity" + +#define BACK_CAMERA_MACRO_FOCUS_DISTANCES_STR "0.10,0.20,Infinity" +#define BACK_CAMERA_INFINITY_FOCUS_DISTANCES_STR "0.10,1.20,Infinity" + +#define BACK_CAMERA_FOCUS_DISTANCE_INFINITY "Infinity" +#define FRONT_CAMERA_FOCUS_DISTANCE_INFINITY "Infinity" + +#define UNIQUE_ID_BUF_SIZE (32) + +#define EFFECTMODE_META_2_HAL(x) (1 << x) + +namespace android { + +#ifdef SENSOR_NAME_GET_FROM_FILE +int getSensorIdFromFile(int camId); +#endif + +struct exynos_camera_info { +public: + int previewW; + int previewH; + int previewFormat; + int previewStride; + + int pictureW; + int pictureH; + int pictureFormat; + + int videoW; + int videoH; + + /* This size for internal */ + int hwSensorW; + int hwSensorH; + int hwPreviewW; + int hwPreviewH; + int previewSizeRatioId; + int hwPictureW; + int hwPictureH; + int pictureSizeRatioId; + int hwDisW; + int hwDisH; + int videoSizeRatioId; + int hwPreviewFormat; + + int hwBayerCropW; + int hwBayerCropH; + int hwBayerCropX; + int hwBayerCropY; + + int bnsW; + int bnsH; + + int jpegQuality; + int thumbnailW; + int thumbnailH; + int thumbnailQuality; + + int intelligentMode; + bool visionMode; + int visionModeFps; + int visionModeAeTarget; + + bool recordingHint; + bool dualMode; + bool dualRecordingHint; + bool effectHint; + bool highSpeedRecording; + bool videoStabilization; + bool swVdisMode; + bool swVdisUIMode; + bool highResolutionCallbackMode; + bool is3dnrMode; + bool isDrcMode; + bool isOdcMode; + + int zoom; + int rotation; + int flipHorizontal; + int flipVertical; + bool autoExposureLock; + + int meteringMode; + bool isTouchMetering; + + int sceneMode; + int focusMode; + int flashMode; + int whiteBalanceMode; + bool autoWhiteBalanceLock; + int numValidFocusArea; + + double gpsLatitude; + double gpsLongitude; + double gpsAltitude; + long gpsTimeStamp; + + long long int cityId; + unsigned char weatherId; + + bool hdrMode; + bool wdrMode; + int shotMode; + bool antiShake; + int vtMode; + bool gamma; + bool slowAe; + int seriesShotCount; + + bool scalableSensorMode; + char imageUniqueId[UNIQUE_ID_BUF_SIZE]; + bool samsungCamera; + + int autoFocusMacroPosition; + int deviceOrientation; + uint32_t bnsScaleRatio; + + int seriesShotMode; +#ifdef BURST_CAPTURE + int seriesShotSaveLocation; + char seriesShotFilePath[100]; +#endif +}; + +struct ExynosSensorInfo { +public: + int maxPreviewW; + int maxPreviewH; + int maxPictureW; + int maxPictureH; + int maxVideoW; + int maxVideoH; + int maxSensorW; + int maxSensorH; + + int maxThumbnailW; + int maxThumbnailH; + + int fNumberNum; + int fNumberDen; + int focalLengthNum; + int focalLengthDen; + int focusDistanceNum; + int focusDistanceDen; + int apertureNum; + int apertureDen; + float horizontalViewAngle; + float verticalViewAngle; + int focalLengthIn35mmLength; + + int minFps; + int maxFps; + + int minExposureCompensation; + int maxExposureCompensation; + float exposureCompensationStep; + int maxNumDetectedFaces; + uint32_t maxNumFocusAreas; + uint32_t maxNumMeteringAreas; + int maxZoomLevel; + int maxZoomRatio; + + bool zoomSupport; + bool smoothZoomSupport; + bool videoSnapshotSupport; + bool videoStabilizationSupport; + bool autoWhiteBalanceLockSupport; + bool autoExposureLockSupport; + + int antiBandingList; + int effectList; + int flashModeList; + int focusModeList; + int sceneModeList; + int whiteBalanceList; + + int previewSizeLutMax; + int pictureSizeLutMax; + int videoSizeLutMax; + int (*previewSizeLut)[SIZE_OF_LUT]; + int (*pictureSizeLut)[SIZE_OF_LUT]; + int (*videoSizeLut)[SIZE_OF_LUT]; + int (*videoSizeLutHighSpeed)[SIZE_OF_LUT]; + bool sizeTableSupport; + + /* vendor specifics */ + int highResolutionCallbackW; + int highResolutionCallbackH; + int highSpeedRecording60WFHD; + int highSpeedRecording60HFHD; + int highSpeedRecording60W; + int highSpeedRecording60H; + int highSpeedRecording120W; + int highSpeedRecording120H; + bool scalableSensorSupport; + bool bnsSupport; +public: + ExynosSensorInfo(); +}; + +struct ExynosSensorIMX135 : public ExynosSensorInfo { +public: + ExynosSensorIMX135(); +}; + +struct ExynosSensorIMX134 : public ExynosSensorInfo { +public: + ExynosSensorIMX134(); +}; + +struct ExynosSensorS5K3L2 : public ExynosSensorInfo { +public: + ExynosSensorS5K3L2(); +}; + +struct ExynosSensorS5K2P2 : public ExynosSensorInfo { +public: + ExynosSensorS5K2P2(); +}; + +struct ExynosSensorS5K6B2 : public ExynosSensorInfo { +public: + ExynosSensorS5K6B2(); +}; + +struct ExynosSensorS5K3H7 : public ExynosSensorInfo { +public: + ExynosSensorS5K3H7(); +}; + +struct ExynosSensorS5K3H5 : public ExynosSensorInfo { +public: + ExynosSensorS5K3H5(); +}; + +struct ExynosSensorS5K4H5 : public ExynosSensorInfo { +public: + ExynosSensorS5K4H5(); +}; + +struct ExynosSensorS5K6A3 : public ExynosSensorInfo { +public: + ExynosSensorS5K6A3(); +}; + +struct ExynosSensorIMX175 : public ExynosSensorInfo { +public: + ExynosSensorIMX175(); +}; + +struct ExynosSensorS5K8B1 : public ExynosSensorInfo { +public: + ExynosSensorS5K8B1(); +}; + +/* Helpper functions */ +struct ExynosSensorInfo *createSensorInfo(int sensorName); +int getSensorId(int camId); + +bool needGSCForCapture(int camId); + +static int PREVIEW_LIST[][SIZE_OF_RESOLUTION] = +{ + { 5312, 2988, SIZE_RATIO_16_9}, + { 4128, 3096, SIZE_RATIO_4_3}, + { 4096, 3072, SIZE_RATIO_4_3}, + { 3840, 2160, SIZE_RATIO_16_9}, + { 3200, 2400, SIZE_RATIO_4_3}, + { 3072, 1728, SIZE_RATIO_16_9}, + { 2592, 1944, SIZE_RATIO_4_3}, + { 2592, 1936, SIZE_RATIO_4_3}, /* not exactly matched ratio */ + { 2560, 1920, SIZE_RATIO_4_3}, + { 2560, 1440, SIZE_RATIO_16_9}, + { 2048, 1536, SIZE_RATIO_4_3}, + { 1920, 1440, SIZE_RATIO_4_3}, + { 1920, 1080, SIZE_RATIO_16_9}, + { 1600, 1200, SIZE_RATIO_4_3}, +/* { 1446, 1080, SIZE_RATIO_4_3}, *//* preview ratio for 2592x1936 */ +/* remove for CTS */ + { 1440, 1080, SIZE_RATIO_4_3}, + /* { 1392, 1392, SIZE_RATIO_1_1}, */ /* remove for CTS */ + { 1280, 960, SIZE_RATIO_4_3}, + { 1280, 720, SIZE_RATIO_16_9}, +/* { 1080, 1080, SIZE_RATIO_1_1}, */ + { 1056, 864, SIZE_RATIO_11_9}, + { 1024, 768, SIZE_RATIO_4_3}, + { 960, 720, SIZE_RATIO_4_3}, +/* { 1024, 574, SIZE_RATIO_16_9}, vendor specific *//* not exactly matched ratio */ +/* { 1008, 568, SIZE_RATIO_16_9}, vendor specific *//* not exactly matched ratio */ + { 800, 600, SIZE_RATIO_4_3}, + { 800, 480, SIZE_RATIO_5_3}, + { 800, 450, SIZE_RATIO_16_9}, + { 720, 720, SIZE_RATIO_1_1}, + { 720, 480, SIZE_RATIO_3_2}, + { 640, 480, SIZE_RATIO_4_3}, + { 528, 432, SIZE_RATIO_11_9}, + { 480, 320, SIZE_RATIO_3_2}, + { 480, 270, SIZE_RATIO_16_9}, + { 352, 288, SIZE_RATIO_11_9}, + { 320, 240, SIZE_RATIO_4_3}, +/* SCP can support up to 1/16 x 1/16 scale down. */ +/* { 176, 144, SIZE_RATIO_11_9} */ +}; + +static int PICTURE_LIST[][SIZE_OF_RESOLUTION] = +{ + { 5312, 2988, SIZE_RATIO_16_9}, + { 4128, 3096, SIZE_RATIO_4_3}, + { 4128, 2322, SIZE_RATIO_16_9}, + { 4096, 3072, SIZE_RATIO_4_3}, + { 4096, 2304, SIZE_RATIO_16_9}, + { 3840, 2160, SIZE_RATIO_16_9}, + { 3264, 2448, SIZE_RATIO_4_3}, + { 3264, 1836, SIZE_RATIO_16_9}, + { 3200, 2400, SIZE_RATIO_4_3}, + { 3072, 1728, SIZE_RATIO_16_9}, + { 2988, 2988, SIZE_RATIO_1_1}, + { 2592, 1944, SIZE_RATIO_4_3}, + { 2592, 1936, SIZE_RATIO_4_3}, /* not exactly matched ratio */ + { 2560, 1920, SIZE_RATIO_4_3}, + { 2448, 2448, SIZE_RATIO_1_1}, + { 2048, 1536, SIZE_RATIO_4_3}, + { 2048, 1152, SIZE_RATIO_16_9}, + { 1920, 1080, SIZE_RATIO_16_9}, + { 1600, 1200, SIZE_RATIO_4_3}, + { 1440, 1080, SIZE_RATIO_4_3}, + /* { 1392, 1392, SIZE_RATIO_1_1}, */ /* remove for CTS */ + { 1280, 960, SIZE_RATIO_4_3}, + { 1280, 720, SIZE_RATIO_16_9}, + { 1024, 768, SIZE_RATIO_4_3}, +/* { 1024, 574, SIZE_RATIO_16_9}, vendor specific *//* not exactly matched ratio */ +/* { 1008, 568, SIZE_RATIO_16_9}, vendor specific *//* not exactly matched ratio */ + { 800, 600, SIZE_RATIO_4_3}, + { 800, 480, SIZE_RATIO_5_3}, + { 800, 450, SIZE_RATIO_16_9}, + { 720, 480, SIZE_RATIO_3_2}, + { 640, 480, SIZE_RATIO_4_3}, + /* { 528, 432, SIZE_RATIO_11_9}, */ /* remove for CTS */ + { 512, 384, SIZE_RATIO_4_3}, + { 512, 288, SIZE_RATIO_11_9}, + { 480, 320, SIZE_RATIO_3_2}, + /* { 352, 288, SIZE_RATIO_16_9}, */ /* remove for CTS */ + { 320, 240, SIZE_RATIO_4_3}, + { 320, 180, SIZE_RATIO_16_9}, +/* TODO : will be support after enable REPROCESSING */ +/* { 176, 144, SIZE_RATIO_11_9} */ +}; + +static int THUMBNAIL_LIST[][SIZE_OF_RESOLUTION] = +{ + { 512, 384, SIZE_RATIO_4_3}, + { 320, 240, SIZE_RATIO_4_3}, + { 0, 0, SIZE_RATIO_1_1} +}; + +static int VIDEO_LIST[][SIZE_OF_RESOLUTION] = +{ +/* + * When GED camera App goes into Recording mode, + * App set the Preview size to the 1st size of the video list. + * In case the 1st size of the list is UHD, + * although App do FHD recording, App do preview with UHD. + * So, the useless electric current is wasted. + * Conclusion: The 1st of the list set the LCD size until GED camera App is modified. + */ + { 1920, 1080, SIZE_RATIO_16_9}, + { 3840, 2160, SIZE_RATIO_16_9}, + { 1440, 1080, SIZE_RATIO_4_3}, + { 1280, 720, SIZE_RATIO_16_9}, + { 960, 720, SIZE_RATIO_4_3}, + { 800, 450, SIZE_RATIO_16_9}, + { 720, 480, SIZE_RATIO_3_2}, + { 640, 480, SIZE_RATIO_4_3}, + { 480, 320, SIZE_RATIO_3_2}, + { 352, 288, SIZE_RATIO_11_9}, + { 320, 240, SIZE_RATIO_4_3}, + { 176, 144, SIZE_RATIO_11_9} +}; + +static int FPS_RANGE_LIST[][2] = +{ + { 5000, 5000}, + { 7000, 7000}, + { 15000, 15000}, + { 24000, 24000}, + { 27000, 27000}, + { 4000, 30000}, + { 10000, 30000}, + { 15000, 30000}, + { 30000, 30000}, + { 30000, 60000}, + { 60000, 60000}, + { 60000, 120000}, + { 120000, 120000}, +}; + +enum CAMERA_ID { + CAMERA_ID_BACK = 0, + CAMERA_ID_FRONT = 1, + CAMERA_ID_MAX, +}; + +enum MODE { + MODE_PREVIEW = 0, + MODE_PICTURE, + MODE_VIDEO, + MODE_THUMBNAIL, +}; + +enum { + ANTIBANDING_AUTO = (1 << 0), + ANTIBANDING_50HZ = (1 << 1), + ANTIBANDING_60HZ = (1 << 2), + ANTIBANDING_OFF = (1 << 3), +}; + +enum { + SCENE_MODE_AUTO = (1 << 0), + SCENE_MODE_ACTION = (1 << 1), + SCENE_MODE_PORTRAIT = (1 << 2), + SCENE_MODE_LANDSCAPE = (1 << 3), + SCENE_MODE_NIGHT = (1 << 4), + SCENE_MODE_NIGHT_PORTRAIT = (1 << 5), + SCENE_MODE_THEATRE = (1 << 6), + SCENE_MODE_BEACH = (1 << 7), + SCENE_MODE_SNOW = (1 << 8), + SCENE_MODE_SUNSET = (1 << 9), + SCENE_MODE_STEADYPHOTO = (1 << 10), + SCENE_MODE_FIREWORKS = (1 << 11), + SCENE_MODE_SPORTS = (1 << 12), + SCENE_MODE_PARTY = (1 << 13), + SCENE_MODE_CANDLELIGHT = (1 << 14), +}; + +enum { + FOCUS_MODE_AUTO = (1 << 0), + FOCUS_MODE_INFINITY = (1 << 1), + FOCUS_MODE_MACRO = (1 << 2), + FOCUS_MODE_FIXED = (1 << 3), + FOCUS_MODE_EDOF = (1 << 4), + FOCUS_MODE_CONTINUOUS_VIDEO = (1 << 5), + FOCUS_MODE_CONTINUOUS_PICTURE = (1 << 6), + FOCUS_MODE_TOUCH = (1 << 7), + FOCUS_MODE_CONTINUOUS_PICTURE_MACRO = (1 << 8), +}; + +enum { + WHITE_BALANCE_AUTO = (1 << 0), + WHITE_BALANCE_INCANDESCENT = (1 << 1), + WHITE_BALANCE_FLUORESCENT = (1 << 2), + WHITE_BALANCE_WARM_FLUORESCENT = (1 << 3), + WHITE_BALANCE_DAYLIGHT = (1 << 4), + WHITE_BALANCE_CLOUDY_DAYLIGHT = (1 << 5), + WHITE_BALANCE_TWILIGHT = (1 << 6), + WHITE_BALANCE_SHADE = (1 << 7), +}; + +enum { + FLASH_MODE_OFF = (1 << 0), + FLASH_MODE_AUTO = (1 << 1), + FLASH_MODE_ON = (1 << 2), + FLASH_MODE_RED_EYE = (1 << 3), + FLASH_MODE_TORCH = (1 << 4), +}; + +enum { + EFFECT_NONE = (1 << COLORCORRECTION_MODE_FAST), + EFFECT_MONO = (1 << COLORCORRECTION_MODE_EFFECT_MONO), + EFFECT_NEGATIVE = (1 << COLORCORRECTION_MODE_EFFECT_NEGATIVE), + EFFECT_SOLARIZE = (1 << COLORCORRECTION_MODE_EFFECT_SOLARIZE), + EFFECT_SEPIA = (1 << COLORCORRECTION_MODE_EFFECT_SEPIA), + EFFECT_POSTERIZE = (1 << COLORCORRECTION_MODE_EFFECT_POSTERIZE), + EFFECT_WHITEBOARD = (1 << COLORCORRECTION_MODE_EFFECT_WHITEBOARD), + EFFECT_BLACKBOARD = (1 << COLORCORRECTION_MODE_EFFECT_BLACKBOARD), + EFFECT_AQUA = (1 << COLORCORRECTION_MODE_EFFECT_AQUA), +}; + +/* Metering */ +enum { + METERING_MODE_AVERAGE = (1 << 0), + METERING_MODE_CENTER = (1 << 1), + METERING_MODE_MATRIX = (1 << 2), + METERING_MODE_SPOT = (1 << 3), +}; + +/* Contrast */ +enum { + CONTRAST_AUTO = (1 << 0), + CONTRAST_MINUS_2 = (1 << 1), + CONTRAST_MINUS_1 = (1 << 2), + CONTRAST_DEFAULT = (1 << 3), + CONTRAST_PLUS_1 = (1 << 4), + CONTRAST_PLUS_2 = (1 << 5), +}; + +/* Shot mode */ +enum SHOT_MODE { + SHOT_MODE_NORMAL = 0x00, + SHOT_MODE_AUTO = 0x01, + SHOT_MODE_BEAUTY_FACE = 0x02, + SHOT_MODE_BEST_PHOTO = 0x03, + SHOT_MODE_DRAMA = 0x04, + SHOT_MODE_BEST_FACE = 0x05, + SHOT_MODE_ERASER = 0x06, + SHOT_MODE_PANORAMA = 0x07, + SHOT_MODE_3D_PANORAMA = 0x08, + SHOT_MODE_RICH_TONE = 0x09, + SHOT_MODE_NIGHT = 0x0A, + SHOT_MODE_STORY = 0x0B, + SHOT_MODE_AUTO_PORTRAIT = 0x0C, + SHOT_MODE_PET = 0x0D, + SHOT_MODE_GOLF = 0x0E, + SHOT_MODE_ANIMATED_SCENE = 0x0F, + SHOT_MODE_NIGHT_SCENE = 0x10, + SHOT_MODE_SPORTS = 0x11, + SHOT_MODE_SLOWMOTION = 0x12, + SHOT_MODE_MAGIC = 0x13, + SHOT_MODE_MAX, +}; + +enum SERIES_SHOT_MODE { + SERIES_SHOT_MODE_NONE = 0, + SERIES_SHOT_MODE_LLS = 1, + SERIES_SHOT_MODE_SIS = 2, + SERIES_SHOT_MODE_BURST = 3, + SERIES_SHOT_MODE_ERASER = 4, + SERIES_SHOT_MODE_BEST_FACE = 5, + SERIES_SHOT_MODE_BEST_PHOTO = 6, + SERIES_SHOT_MODE_MAGIC = 7, + SERIES_SHOT_MODE_MAX, +}; +}; /* namespace android */ +#endif diff --git a/libcamera/Vendor/SecCameraConfig.h b/libcamera/Vendor/SecCameraConfig.h new file mode 100644 index 0000000..5eedfbd --- /dev/null +++ b/libcamera/Vendor/SecCameraConfig.h @@ -0,0 +1,28 @@ +/* + * Copyright 2013, Samsung Electronics Co. LTD + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed toggle an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/*! + * \file SecCameraConfig.h + * \brief hearder file for SecCameraConfig + * \author Pilsun Jang(pilsun.jang@samsung.com) + * \date 2013/7/15 + * + */ + +#ifndef SEC_CAMERA_CONFIG_H__ +#define SEC_CAMERA_CONFIG_H__ + +#endif /* EXYNOS_CAMERA_CONFIG_H__ */ |