📄 isp_if.h
字号:
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
*
* removed!
* removed!
*------------------------------------------------------------------------------
* Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*============================================================================
****************************************************************************/
#ifndef _ISP_IF_H
#define _ISP_IF_H
#include "reg_base.h"
#if (!defined(MT6219))
#define CAMERA_base (0x80620000) /* Camera Interface */
#endif
#if (defined(MT6219)||defined(MT6226)||defined(MT6226M)||defined(MT6227)||defined(MT6228)||defined(MT6229)||defined(MT6230))
#define CAMERA_ISP_IDLE_EVENT 0x00000001
#define CAMERA_ISP_FRAME_READY_EVENT 0x00000002
#define CAMERA_JPEG_ENCODE_EVENT 0x00000004
#define CAMERA_ISP_VD_READY_EVENT 0x00000008
#define ISP_START_GRAB_X 3
#define ISP_START_GRAB_Y 5
#define ISP_MAX_DIGITAL_ZOOM_FACTOR 40 /* 4X zoom */
#define ISP_MIN_DIGITAL_ZOOM_FACTOR 10 /* 1X zoom */
#define ISP_DIGITAL_ZOOM_INTERVAL 10
#define ISP_INC_DIGITAL_ZOOM 0
#define ISP_DEC_DIGITAL_ZOOM 1
#define ISP_INC_CONTRAST 0
#define ISP_DEC_CONTRAST 1
#define ISP_INC_BRIGHTNESS 0
#define ISP_DEC_BRIGHTNESS 1
typedef enum
{
CAMERA_SYSTEM_NORMAL_MODE=0,
CAMERA_SYSTEM_META_MODE
} CAMERA_SYSTEM_ENUM;
typedef enum
{
ISP_IDLE_STATE=0,
ISP_STANDBY_STATE,
ISP_PREVIEW_STATE,
ISP_CAPTURE_JPEG_STATE,
ISP_CAPTURE_MEM_STATE,
ISP_MPEG4_ENCODE_STATE,
ISP_CAPTURE_BARCODE_STATE
} ISP_OPERATION_STATE_ENUM;
enum
{
IMAGE_NORMAL=0,
IMAGE_H_MIRROR,
IMAGE_V_MIRROR,
IMAGE_HV_MIRROR
};
#if (defined(MT6219))
enum
{
BAYER_Gr=0,
BAYER_R,
BAYER_B,
BAYER_Gb
};
#elif (defined(MT6226)||defined(MT6226M)||defined(MT6227)||defined(MT6229)||defined(MT6230))
enum
{
BAYER_B=0,
BAYER_Gb,
BAYER_Gr,
BAYER_R
};
#elif (defined(MT6228))
enum
{
BAYER_R=0,
BAYER_Gr,
BAYER_Gb,
BAYER_B
};
#endif
enum
{
INPUT_BAYER=0,
INPUT_YUV422=1,
INPUT_RGB=2,
INPUT_YCbCr=5
};
enum
{
INPUT_ORDER_CbYCrY1=0,
INPUT_ORDER_CrYCbY1,
INPUT_ORDER_YCbY1Cr,
INPUT_ORDER_YCrY1Cb
};
enum
{
ISP_DRIVING_2MA=0,
ISP_DRIVING_4MA,
ISP_DRIVING_6MA,
ISP_DRIVING_8MA
};
#if (!defined(MT6219))
typedef enum
{
AF_ENABLE=0,
AF_METERING,
SHUTTER_PRIORITY,
APERTURE_PRIORITY,
SCENE_MODE
} LENS_OPERATION_ENUM;
#endif
#define ISP_INT_FRAME_READY 0x0001
#define ISP_INT_IDLE 0x0002
#define ISP_INT_RESIZER_OVERRUN 0x0004
#if (defined(MT6226)||defined(MT6226M)||defined(MT6227)||defined(MT6228)||defined(MT6229)||defined(MT6230))
#define ISP_INT_ISP_DONE 0x0010
#define ISP_INT_AE_DONE 0x0020
#define ISP_INT_ATF_DONE 0x0040
#define ISP_INT_TG_DONE 0x0080
#define ISP_INT_VD_DONE 0x0100
#endif
#define CAMERA_IDLE_MODE 0
#define CAMERA_PREVIEW_MODE 1
#define CAMERA_CAPTURE_MODE 2
#define CAMERA_SUB_SAMPLE_1_1 0x0
#define CAMERA_SUB_SAMPLE_1_2 0x1
#define CAMERA_SUB_SAMPLE_1_4 0x2
#define CAMERA_SUB_SAMPLE_1_8 0x4
#define CAMERA_TEST_AE_COUNT 3
#define CAMERA_TEST_HISTOGRAM_COUNT 3
#define CAMERA_TEST_OPD_RESULT_COUNT 3
#define ISP_TG_PHASE_COUNTER_REG (CAMERA_base + 0x0000)
#define ISP_CMOS_SENSOR_SIZE_CONFIG_REG (CAMERA_base + 0x0004)
#define ISP_TG_GRAB_RANGE_PIXEL_CONFIG_REG (CAMERA_base + 0x0008)
#define ISP_TG_GRAB_RANGE_LINE_CONFIG_REG (CAMERA_base + 0x000C)
#define ISP_CMOS_SENSOR_MODE_CONFIG_REG (CAMERA_base + 0x0010)
#define ISP_RGB_OFFSET_ADJUS_REG (CAMERA_base + 0x0014)
#define ISP_VIEW_FINDER_MODE_CTRL_REG (CAMERA_base + 0x0018)
#define ISP_INT_ENABLE_REG (CAMERA_base + 0x001C)
#define ISP_INT_STATUS_REG (CAMERA_base + 0x0020)
#if (defined(MT6226)||defined(MT6226M)||defined(MT6227)||defined(MT6228)||defined(MT6229)||defined(MT6230))
#define ISP_PATH_CONFIG_REG (CAMERA_base + 0x0024)
#define ISP_INPUT_ADDR_REG (CAMERA_base + 0x0028)
#define ISP_OUTPUT_ADDR_REG (CAMERA_base + 0x002C)
#endif
#define ISP_PREPROCESS_CTRL1_REG (CAMERA_base + 0x0030)
#define ISP_RGB_GAIN_CTRL1_REG (CAMERA_base + 0x0034)
#define ISP_RGB_GAIN_CTRL2_REG (CAMERA_base + 0x0038)
#define ISP_HISTOGRAM_BOUNDARY_CTRL1_REG (CAMERA_base + 0x003C)
#define ISP_HISTOGRAM_BOUNDARY_CTRL2_REG (CAMERA_base + 0x0040)
#define ISP_PREPROCESS_CTRL2_REG (CAMERA_base + 0x0044)
#if (!(defined(MT6228)))
#define ISP_AE_WINDOW1_REG (CAMERA_base + 0x0048)
#define ISP_AE_WINDOW2_REG (CAMERA_base + 0x004C)
#define ISP_AE_WINDOW3_REG (CAMERA_base + 0x0050)
#define ISP_AE_WINDOW4_REG (CAMERA_base + 0x0054)
#endif
#define ISP_AE_WINDOW5_REG (CAMERA_base + 0x0058)
#define ISP_AE_WINDOW6_REG (CAMERA_base + 0x005C)
#define ISP_AE_WINDOW7_REG (CAMERA_base + 0x0060)
#define ISP_AE_WINDOW8_REG (CAMERA_base + 0x0064)
#define ISP_AE_WINDOW9_REG (CAMERA_base + 0x0068)
#define ISP_AWB_WINDOW_REG (CAMERA_base + 0x006C)
#define ISP_COLOR_PROCESS_STAGE_CTRL1_REG (CAMERA_base + 0x0070)
#define ISP_INTERPOLATION1_REG (CAMERA_base + 0x0074)
#define ISP_INTERPOLATION2_REG (CAMERA_base + 0x0078)
#define ISP_EDGE_CORE_REG (CAMERA_base + 0x007C)
#define ISP_EDGE_GAIN1_REG (CAMERA_base + 0x0080)
#define ISP_EDGE_GAIN2_REG (CAMERA_base + 0x0084)
#define ISP_EDGE_THRESHOLD_REG (CAMERA_base + 0x0088)
#define ISP_EDGE_VERTICAL_CTRL_REG (CAMERA_base + 0x008C)
#define ISP_AXIS_RGB_GAIN_REG (CAMERA_base + 0x0090)
#define ISP_OPD_CONFIG_REG (CAMERA_base + 0x0094)
#define ISP_OPD_COMP_PARAMETER_REG (CAMERA_base + 0x0098)
#define ISP_COLOR_MATRIX1_REG (CAMERA_base + 0x009C)
#define ISP_COLOR_MATRIX2_REG (CAMERA_base + 0x00A0)
#define ISP_COLOR_MATRIX3_REG (CAMERA_base + 0x00A4)
#define ISP_COLOR_MATRIX_RGB_GAIN_REG (CAMERA_base + 0x00A8)
#define ISP_COLOR_PROCESS_STAGE_CTRL2_REG (CAMERA_base + 0x00AC)
#define ISP_AWB_GAIN_REG (CAMERA_base + 0x00B0)
#define ISP_GAMMA_RGB_FLARE_REG (CAMERA_base + 0x00B4)
#define ISP_Y_CH_CONFIG_REG (CAMERA_base + 0x00B8)
#define ISP_UV_CH_CONFIG_REG (CAMERA_base + 0x00BC)
#define ISP_SPACE_CONVERT_YUV1_REG (CAMERA_base + 0x00C0)
#define ISP_SPACE_CONVERT_YUV2_REG (CAMERA_base + 0x00C4)
#define ISP_GAMMA_OPERATION1_REG (CAMERA_base + 0x00C8)
#define ISP_GAMMA_OPERATION2_REG (CAMERA_base + 0x00CC)
#define ISP_GAMMA_OPERATION3_REG (CAMERA_base + 0x00D0)
#define ISP_OPD_Y_RESULT_REG (CAMERA_base + 0x00D4)
#define ISP_OPD_MG_RESULT_REG (CAMERA_base + 0x00D8)
#define ISP_OPD_RB_RESULT_REG (CAMERA_base + 0x00DC)
#define ISP_OPD_PIXEL_COUNT_REG (CAMERA_base + 0x00E0)
#if (!defined(MT6228))
#define ISP_AE_WINDOW1_RESULT_REG (CAMERA_base + 0x00E4)
#define ISP_AE_WINDOW2_RESULT_REG (CAMERA_base + 0x00E8)
#define ISP_AE_WINDOW3_RESULT_REG (CAMERA_base + 0x00EC)
#define ISP_AE_WINDOW4_RESULT_REG (CAMERA_base + 0x00F0)
#endif
#define ISP_AE_WINDOW5_RESULT_REG (CAMERA_base + 0x00F4)
#define ISP_AE_WINDOW6_RESULT_REG (CAMERA_base + 0x00F8)
#define ISP_AE_WINDOW7_RESULT_REG (CAMERA_base + 0x00FC)
#define ISP_AE_WINDOW8_RESULT_REG (CAMERA_base + 0x0100)
#define ISP_AE_WINDOW9_RESULT_REG (CAMERA_base + 0x0104)
#define ISP_AE_A_NUMBER_RESULT_REG (CAMERA_base + 0x0108)
#define ISP_AE_B_NUMBER_RESULT_REG (CAMERA_base + 0x010C)
#define ISP_AE_C_NUMBER_RESULT_REG (CAMERA_base + 0x0110)
#define ISP_AE_D_NUMBER_RESULT_REG (CAMERA_base + 0x0114)
#define ISP_AE_E_NUMBER_RESULT_REG (CAMERA_base + 0x0118)
#define ISP_LPF_CTRL_REG (CAMERA_base + 0x011C)
#if (defined(MT6226)||defined(MT6226M)||defined(MT6227)||defined(MT6228)||defined(MT6229)||defined(MT6230))
#define ISP_Y_LPF_CTRL_REG (CAMERA_base + 0x0120)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -