firmware/br-ext-chip-xiongmai/package/xiongmai-osdrv-xm530/files/include/xm/IspTools.h

1217 lines
55 KiB
C
Raw Blame History

/******************************************************************************
Copyright (C), 2015-2020, XM. Co., Ltd.
******************************************************************************
File Name : ispTool.h
Version : Initial Draft
Author : XM Isp software group
Created : 2015/12/04
Description : The common data type defination
Function List :
History :
1.Date : 2015/12/04
Author : Lycai
Modification : creat
******************************************************************************/
#ifndef _ISP_TOOL_H_
#define _ISP_TOOL_H_
#define ISP_TOOLS_MASK 0xFF000000
#define ISP_TOOLS_BASE 0xF8D00000
#define ISP_TOOLS_MASK_CFG 0xFFF00000
#define CMD_CONNECT 0xFFFF0000
#define CMD_ISP_DEV 0xFFFF0080
#define FLASH_ADDR_ISP 0x18000
// 1.NR
#define NR2D_MASK (ISP_TOOLS_MASK_CFG+0xF00)
#define TOOLS_NR_BASE (ISP_TOOLS_BASE+0x000)
#define NR2D_ALL (TOOLS_NR_BASE+0x000)
#define NR2D_ENABLE (TOOLS_NR_BASE+0x002)
#define NR2D_OPTYPE (TOOLS_NR_BASE+0x004)
#define NR2D_MANUAL_THR (TOOLS_NR_BASE+0x006)
#define NR2D_AUTO_THR0 (TOOLS_NR_BASE+0x008)
#define NR2D_AUTO_THR1 (TOOLS_NR_BASE+0x00A)
#define NR2D_AUTO_THR2 (TOOLS_NR_BASE+0x00C)
#define NR2D_AUTO_THR3 (TOOLS_NR_BASE+0x00E)
#define NR2D_AUTO_THR4 (TOOLS_NR_BASE+0x010)
#define NR2D_AUTO_THR5 (TOOLS_NR_BASE+0x012)
#define NR2D_AUTO_THR6 (TOOLS_NR_BASE+0x014)
#define NR2D_AUTO_THR7 (TOOLS_NR_BASE+0x016)
#define NR2D_AUTO_THR8 (TOOLS_NR_BASE+0x018)
#define NR2D_AUTO_THR9 (TOOLS_NR_BASE+0x01A)
#define NR2D_AUTO_THR10 (TOOLS_NR_BASE+0x01C)
#define NR2D_AUTO_THR11 (TOOLS_NR_BASE+0x01E)
#define NR2D_AUTO_THR12 (TOOLS_NR_BASE+0x020)
#define NR2D_AUTO_THR13 (TOOLS_NR_BASE+0x022)
#define NR2D_AUTO_THR14 (TOOLS_NR_BASE+0x024)
#define NR2D_AUTO_THR15 (TOOLS_NR_BASE+0x026)
#define NR2D_GLOBAL (TOOLS_NR_BASE+0x028)
// 1.2 NR(3D)
#define NR3D_MASK (ISP_TOOLS_MASK_CFG+0xF00)
#define TOOLS_NR3D_BASE (ISP_TOOLS_BASE+0x030)
#define NR3D_ALL (TOOLS_NR3D_BASE+0x000)
#define NR3D_ENABLE (TOOLS_NR3D_BASE+0x002)
#define NR3D_OPTYPE (TOOLS_NR3D_BASE+0x004)
#define NR3D_MANUAL_TF (TOOLS_NR3D_BASE+0x006)
#define NR3D_MANUAL_SF (TOOLS_NR3D_BASE+0x008)
#define NR3D_AUTO_TF0 (TOOLS_NR3D_BASE+0x00A)
#define NR3D_AUTO_TF1 (TOOLS_NR3D_BASE+0x00C)
#define NR3D_AUTO_TF2 (TOOLS_NR3D_BASE+0x00E)
#define NR3D_AUTO_TF3 (TOOLS_NR3D_BASE+0x010)
#define NR3D_AUTO_TF4 (TOOLS_NR3D_BASE+0x012)
#define NR3D_AUTO_TF5 (TOOLS_NR3D_BASE+0x014)
#define NR3D_AUTO_TF6 (TOOLS_NR3D_BASE+0x016)
#define NR3D_AUTO_TF7 (TOOLS_NR3D_BASE+0x018)
#define NR3D_AUTO_TF8 (TOOLS_NR3D_BASE+0x01A)
#define NR3D_AUTO_TF9 (TOOLS_NR3D_BASE+0x01C)
#define NR3D_AUTO_TF10 (TOOLS_NR3D_BASE+0x01E)
#define NR3D_AUTO_TF11 (TOOLS_NR3D_BASE+0x020)
#define NR3D_AUTO_TF12 (TOOLS_NR3D_BASE+0x022)
#define NR3D_AUTO_TF13 (TOOLS_NR3D_BASE+0x024)
#define NR3D_AUTO_TF14 (TOOLS_NR3D_BASE+0x026)
#define NR3D_AUTO_TF15 (TOOLS_NR3D_BASE+0x028)
#define NR3D_AUTO_SF0 (TOOLS_NR3D_BASE+0x02A)
#define NR3D_AUTO_SF1 (TOOLS_NR3D_BASE+0x02C)
#define NR3D_AUTO_SF2 (TOOLS_NR3D_BASE+0x02E)
#define NR3D_AUTO_SF3 (TOOLS_NR3D_BASE+0x030)
#define NR3D_AUTO_SF4 (TOOLS_NR3D_BASE+0x032)
#define NR3D_AUTO_SF5 (TOOLS_NR3D_BASE+0x034)
#define NR3D_AUTO_SF6 (TOOLS_NR3D_BASE+0x036)
#define NR3D_AUTO_SF7 (TOOLS_NR3D_BASE+0x038)
#define NR3D_AUTO_SF8 (TOOLS_NR3D_BASE+0x03A)
#define NR3D_AUTO_SF9 (TOOLS_NR3D_BASE+0x03C)
#define NR3D_AUTO_SF10 (TOOLS_NR3D_BASE+0x03E)
#define NR3D_AUTO_SF11 (TOOLS_NR3D_BASE+0x040)
#define NR3D_AUTO_SF12 (TOOLS_NR3D_BASE+0x042)
#define NR3D_AUTO_SF13 (TOOLS_NR3D_BASE+0x044)
#define NR3D_AUTO_SF14 (TOOLS_NR3D_BASE+0x046)
#define NR3D_AUTO_SF15 (TOOLS_NR3D_BASE+0x048)
#define NR3D_TF_NOW (TOOLS_NR3D_BASE+0x04A)
#define NR3D_SF_NOW (TOOLS_NR3D_BASE+0x04C)
#define NR3D_GLOBAL (TOOLS_NR3D_BASE+0x04E)
//2.Sharpness
#define SHARP_MASK (ISP_TOOLS_MASK_CFG+0xF00)
#define TOOLS_SHARP_BASE (ISP_TOOLS_BASE+0x100)
#define SHARP_ALL (TOOLS_SHARP_BASE+0x000)
#define SHARP_ENABLE (TOOLS_SHARP_BASE+0x002)
#define SHARP_OPTYPE (TOOLS_SHARP_BASE+0x004)
#define SHARP_AUTO_GLOBAL (TOOLS_SHARP_BASE+0x070)
#define SHARP_MANUAL_D (TOOLS_SHARP_BASE+0x006)
#define SHARP_MANUAL_UD (TOOLS_SHARP_BASE+0x008)
#define SHARP_MANUAL_KD (TOOLS_SHARP_BASE+0x00A)
#define SHARP_AUTO_D0 (TOOLS_SHARP_BASE+0x00C)
#define SHARP_AUTO_D1 (TOOLS_SHARP_BASE+0x00E)
#define SHARP_AUTO_D2 (TOOLS_SHARP_BASE+0x010)
#define SHARP_AUTO_D3 (TOOLS_SHARP_BASE+0x012)
#define SHARP_AUTO_D4 (TOOLS_SHARP_BASE+0x014)
#define SHARP_AUTO_D5 (TOOLS_SHARP_BASE+0x016)
#define SHARP_AUTO_D6 (TOOLS_SHARP_BASE+0x018)
#define SHARP_AUTO_D7 (TOOLS_SHARP_BASE+0x01A)
#define SHARP_AUTO_D8 (TOOLS_SHARP_BASE+0x01C)
#define SHARP_AUTO_D9 (TOOLS_SHARP_BASE+0x01E)
#define SHARP_AUTO_D10 (TOOLS_SHARP_BASE+0x020)
#define SHARP_AUTO_D11 (TOOLS_SHARP_BASE+0x022)
#define SHARP_AUTO_D12 (TOOLS_SHARP_BASE+0x024)
#define SHARP_AUTO_D13 (TOOLS_SHARP_BASE+0x026)
#define SHARP_AUTO_D14 (TOOLS_SHARP_BASE+0x028)
#define SHARP_AUTO_D15 (TOOLS_SHARP_BASE+0x02A)
#define SHARP_AUTO_UD0 (TOOLS_SHARP_BASE+0x02C)
#define SHARP_AUTO_UD1 (TOOLS_SHARP_BASE+0x02E)
#define SHARP_AUTO_UD2 (TOOLS_SHARP_BASE+0x030)
#define SHARP_AUTO_UD3 (TOOLS_SHARP_BASE+0x032)
#define SHARP_AUTO_UD4 (TOOLS_SHARP_BASE+0x034)
#define SHARP_AUTO_UD5 (TOOLS_SHARP_BASE+0x036)
#define SHARP_AUTO_UD6 (TOOLS_SHARP_BASE+0x038)
#define SHARP_AUTO_UD7 (TOOLS_SHARP_BASE+0x03A)
#define SHARP_AUTO_UD8 (TOOLS_SHARP_BASE+0x03C)
#define SHARP_AUTO_UD9 (TOOLS_SHARP_BASE+0x03E)
#define SHARP_AUTO_UD10 (TOOLS_SHARP_BASE+0x040)
#define SHARP_AUTO_UD11 (TOOLS_SHARP_BASE+0x042)
#define SHARP_AUTO_UD12 (TOOLS_SHARP_BASE+0x044)
#define SHARP_AUTO_UD13 (TOOLS_SHARP_BASE+0x046)
#define SHARP_AUTO_UD14 (TOOLS_SHARP_BASE+0x048)
#define SHARP_AUTO_UD15 (TOOLS_SHARP_BASE+0x04A)
#define SHARP_AUTO_KD0 (TOOLS_SHARP_BASE+0x04C)
#define SHARP_AUTO_KD1 (TOOLS_SHARP_BASE+0x04E)
#define SHARP_AUTO_KD2 (TOOLS_SHARP_BASE+0x050)
#define SHARP_AUTO_KD3 (TOOLS_SHARP_BASE+0x052)
#define SHARP_AUTO_KD4 (TOOLS_SHARP_BASE+0x054)
#define SHARP_AUTO_KD5 (TOOLS_SHARP_BASE+0x056)
#define SHARP_AUTO_KD6 (TOOLS_SHARP_BASE+0x058)
#define SHARP_AUTO_KD7 (TOOLS_SHARP_BASE+0x05A)
#define SHARP_AUTO_KD8 (TOOLS_SHARP_BASE+0x05C)
#define SHARP_AUTO_KD9 (TOOLS_SHARP_BASE+0x05E)
#define SHARP_AUTO_KD10 (TOOLS_SHARP_BASE+0x060)
#define SHARP_AUTO_KD11 (TOOLS_SHARP_BASE+0x062)
#define SHARP_AUTO_KD12 (TOOLS_SHARP_BASE+0x064)
#define SHARP_AUTO_KD13 (TOOLS_SHARP_BASE+0x066)
#define SHARP_AUTO_KD14 (TOOLS_SHARP_BASE+0x068)
#define SHARP_AUTO_KD15 (TOOLS_SHARP_BASE+0x06A)
//3.DPC
#define DDPC_MASK (ISP_TOOLS_MASK_CFG+0xF00)
#define DPC_BASE (ISP_TOOLS_BASE+0x200)
#define DDPC_ALL (DPC_BASE+0x000)
#define DDPC_OP_TYPE (DPC_BASE+0x002)
#define DDPC_MANUAL_STH (DPC_BASE+0x004)
#define DDPC_AUTO_STH0 (DPC_BASE+0x006)
#define DDPC_AUTO_STH1 (DPC_BASE+0x008)
#define DDPC_AUTO_STH2 (DPC_BASE+0x00A)
#define DDPC_AUTO_STH3 (DPC_BASE+0x00C)
#define DDPC_AUTO_STH4 (DPC_BASE+0x00E)
#define DDPC_AUTO_STH5 (DPC_BASE+0x010)
#define DDPC_AUTO_STH6 (DPC_BASE+0x012)
#define DDPC_AUTO_STH7 (DPC_BASE+0x014)
#define DDPC_AUTO_STH8 (DPC_BASE+0x016)
#define DDPC_AUTO_STH9 (DPC_BASE+0x018)
#define DDPC_AUTO_STH10 (DPC_BASE+0x01A)
#define DDPC_AUTO_STH11 (DPC_BASE+0x01C)
#define DDPC_AUTO_STH12 (DPC_BASE+0x01E)
#define DDPC_AUTO_STH13 (DPC_BASE+0x020)
#define DDPC_AUTO_STH14 (DPC_BASE+0x022)
#define DDPC_AUTO_STH15 (DPC_BASE+0x024)
//14.DRC
#define DRC_BASE (ISP_TOOLS_BASE+0x240)
#define DRC_ALL (DRC_BASE+0x000)
#define DRC_ENABLE (DRC_BASE+0x002)
#define DRC_OP_TYPE (DRC_BASE+0x004)
#define DRC_MANUAL_STH (DRC_BASE+0x006)
#define DRC_GLOBAL_STH (DRC_BASE+0x008)
#define DRC_AUTO_STH0 (DRC_BASE+0x010)
#define DRC_AUTO_STH1 (DRC_BASE+0x012)
#define DRC_AUTO_STH2 (DRC_BASE+0x014)
#define DRC_AUTO_STH3 (DRC_BASE+0x016)
#define DRC_AUTO_STH4 (DRC_BASE+0x018)
#define DRC_AUTO_STH5 (DRC_BASE+0x01A)
#define DRC_AUTO_STH6 (DRC_BASE+0x01C)
#define DRC_AUTO_STH7 (DRC_BASE+0x01E)
#define DRC_AUTO_STH8 (DRC_BASE+0x020)
#define DRC_AUTO_STH9 (DRC_BASE+0x022)
#define DRC_AUTO_STH10 (DRC_BASE+0x024)
#define DRC_AUTO_STH11 (DRC_BASE+0x026)
#define DRC_AUTO_STH12 (DRC_BASE+0x028)
#define DRC_AUTO_STH13 (DRC_BASE+0x02A)
#define DRC_AUTO_STH14 (DRC_BASE+0x02C)
#define DRC_AUTO_STH15 (DRC_BASE+0x02E)
//14.DEFOG
#define DEFOG_BASE (ISP_TOOLS_BASE+0x340)
#define DEFOG_ALL (DEFOG_BASE+0x000)
#define DEFOG_ENABLE (DEFOG_BASE+0x002)
#define DEFOG_OP_TYPE (DEFOG_BASE+0x004)
#define DEFOG_MANUAL_STH (DEFOG_BASE+0x006)
#define DEFOG_GLOBAL_STH (DEFOG_BASE+0x008)
#define DEFOG_AUTO_STH0 (DEFOG_BASE+0x010)
#define DEFOG_AUTO_STH1 (DEFOG_BASE+0x012)
#define DEFOG_AUTO_STH2 (DEFOG_BASE+0x014)
#define DEFOG_AUTO_STH3 (DEFOG_BASE+0x016)
#define DEFOG_AUTO_STH4 (DEFOG_BASE+0x018)
#define DEFOG_AUTO_STH5 (DEFOG_BASE+0x01A)
#define DEFOG_AUTO_STH6 (DEFOG_BASE+0x01C)
#define DEFOG_AUTO_STH7 (DEFOG_BASE+0x01E)
#define DEFOG_AUTO_STH8 (DEFOG_BASE+0x020)
#define DEFOG_AUTO_STH9 (DEFOG_BASE+0x022)
#define DEFOG_AUTO_STH10 (DEFOG_BASE+0x024)
#define DEFOG_AUTO_STH11 (DEFOG_BASE+0x026)
#define DEFOG_AUTO_STH12 (DEFOG_BASE+0x028)
#define DEFOG_AUTO_STH13 (DEFOG_BASE+0x02A)
#define DEFOG_AUTO_STH14 (DEFOG_BASE+0x02C)
#define DEFOG_AUTO_STH15 (DEFOG_BASE+0x02E)
//4.BlackLevel
#define BLC_MASK (ISP_TOOLS_MASK_CFG+0xF00)
#define BLC_BASE (ISP_TOOLS_BASE+0x300)
#define BLC_ALL (BLC_BASE+0x000)
#define BLC_OPTYPE (BLC_BASE+0x002)
#define BLC_MANUAL_BLC (BLC_BASE+0x004)
#define BLC_AUTO_BLC0 (BLC_BASE+0x006)
#define BLC_AUTO_BLC1 (BLC_BASE+0x008)
#define BLC_AUTO_BLC2 (BLC_BASE+0x00A)
#define BLC_AUTO_BLC3 (BLC_BASE+0x00C)
#define BLC_AUTO_BLC4 (BLC_BASE+0x00E)
#define BLC_AUTO_BLC5 (BLC_BASE+0x010)
#define BLC_AUTO_BLC6 (BLC_BASE+0x012)
#define BLC_AUTO_BLC7 (BLC_BASE+0x014)
#define BLC_AUTO_BLC8 (BLC_BASE+0x016)
#define BLC_AUTO_BLC9 (BLC_BASE+0x018)
#define BLC_AUTO_BLC10 (BLC_BASE+0x01A)
#define BLC_AUTO_BLC11 (BLC_BASE+0x01C)
#define BLC_AUTO_BLC12 (BLC_BASE+0x01E)
#define BLC_AUTO_BLC13 (BLC_BASE+0x020)
#define BLC_AUTO_BLC14 (BLC_BASE+0x022)
#define BLC_AUTO_BLC15 (BLC_BASE+0x024)
//5.Gamma
#define GAM_MASK (ISP_TOOLS_MASK_CFG+0xF00)
#define GAM_BASE (ISP_TOOLS_BASE+0x400)
#define GAM_ALL (GAM_BASE+0x000)
#define GAM_ENABLE (GAM_BASE+0x002)
#define GAM_TYPE (GAM_BASE+0x004)
#define GAM_TAB0 (GAM_BASE+0x006)
#define GAM_TAB1 (GAM_BASE+0x008)
#define GAM_TAB2 (GAM_BASE+0x00A)
#define GAM_TAB3 (GAM_BASE+0x00C)
#define GAM_TAB4 (GAM_BASE+0x00E)
#define GAM_TAB5 (GAM_BASE+0x010)
#define GAM_TAB6 (GAM_BASE+0x012)
#define GAM_TAB7 (GAM_BASE+0x014)
#define GAM_TAB8 (GAM_BASE+0x016)
#define GAM_TAB9 (GAM_BASE+0x018)
#define GAM_TAB10 (GAM_BASE+0x01A)
#define GAM_TAB11 (GAM_BASE+0x01C)
#define GAM_TAB12 (GAM_BASE+0x01E)
#define GAM_TAB13 (GAM_BASE+0x020)
#define GAM_TAB14 (GAM_BASE+0x022)
#define GAM_TAB15 (GAM_BASE+0x024)
#define GAM_TAB16 (GAM_BASE+0x026)
#define GAM_TAB17 (GAM_BASE+0x028)
#define GAM_TAB18 (GAM_BASE+0x02A)
#define GAM_TAB19 (GAM_BASE+0x02C)
#define GAM_TAB20 (GAM_BASE+0x02E)
#define GAM_TAB21 (GAM_BASE+0x030)
#define GAM_TAB22 (GAM_BASE+0x032)
#define GAM_TAB23 (GAM_BASE+0x034)
#define GAM_TAB24 (GAM_BASE+0x036)
#define GAM_TAB25 (GAM_BASE+0x038)
#define GAM_TAB26 (GAM_BASE+0x03A)
#define GAM_TAB27 (GAM_BASE+0x03C)
#define GAM_TAB28 (GAM_BASE+0x03E)
#define GAM_TAB29 (GAM_BASE+0x040)
#define GAM_TAB30 (GAM_BASE+0x042)
#define GAM_TAB31 (GAM_BASE+0x044)
#define GAM_TAB32 (GAM_BASE+0x046)
#define GAM_TAB33 (GAM_BASE+0x048)
#define GAM_TAB34 (GAM_BASE+0x04A)
#define GAM_TAB35 (GAM_BASE+0x04C)
#define GAM_TAB36 (GAM_BASE+0x04E)
#define GAM_TAB37 (GAM_BASE+0x050)
#define GAM_TAB38 (GAM_BASE+0x052)
#define GAM_TAB39 (GAM_BASE+0x054)
#define GAM_TAB40 (GAM_BASE+0x056)
#define GAM_TAB41 (GAM_BASE+0x058)
#define GAM_TAB42 (GAM_BASE+0x05A)
#define GAM_TAB43 (GAM_BASE+0x05C)
#define GAM_TAB44 (GAM_BASE+0x05E)
#define GAM_TAB45 (GAM_BASE+0x060)
#define GAM_TAB46 (GAM_BASE+0x062)
#define GAM_TAB47 (GAM_BASE+0x064)
#define GAM_TAB48 (GAM_BASE+0x066)
#define GAM_TAB49 (GAM_BASE+0x068)
#define GAM_TAB50 (GAM_BASE+0x06A)
#define GAM_TAB51 (GAM_BASE+0x06C)
#define GAM_TAB52 (GAM_BASE+0x06E)
#define GAM_TAB53 (GAM_BASE+0x070)
#define GAM_TAB54 (GAM_BASE+0x072)
#define GAM_TAB55 (GAM_BASE+0x074)
#define GAM_TAB56 (GAM_BASE+0x076)
#define GAM_TAB57 (GAM_BASE+0x078)
#define GAM_TAB58 (GAM_BASE+0x07A)
#define GAM_TAB59 (GAM_BASE+0x07C)
#define GAM_TAB60 (GAM_BASE+0x07E)
#if(defined CHIPID_XM350) || (defined CHIPID_XM530) || (defined CHIPID_XM350AI)
#define GAM_TAB61 (GAM_BASE+0x080)
#define GAM_TAB62 (GAM_BASE+0x082)
#define GAM_TAB63 (GAM_BASE+0x084)
#define GAM_TAB64 (GAM_BASE+0x086)
#define GAM_TAB65 (GAM_BASE+0x088)
#define GAM_TAB66 (GAM_BASE+0x08A)
#define GAM_TAB67 (GAM_BASE+0x08C)
#define GAM_TAB68 (GAM_BASE+0x08E)
#define GAM_TAB69 (GAM_BASE+0x090)
#define GAM_TAB70 (GAM_BASE+0x092)
#define GAM_TAB71 (GAM_BASE+0x094)
#define GAM_TAB72 (GAM_BASE+0x096)
#define GAM_TAB73 (GAM_BASE+0x098)
#define GAM_TAB74 (GAM_BASE+0x09A)
#define GAM_TAB75 (GAM_BASE+0x09C)
#define GAM_TAB76 (GAM_BASE+0x09E)
#define GAM_TAB77 (GAM_BASE+0x0A0)
#define GAM_TAB78 (GAM_BASE+0x0A2)
#define GAM_TAB79 (GAM_BASE+0x0A4)
#define GAM_TAB80 (GAM_BASE+0x0A6)
#define GAM_TAB81 (GAM_BASE+0x0A8)
#define GAM_TAB82 (GAM_BASE+0x0AA)
#define GAM_TAB83 (GAM_BASE+0x0AC)
#define GAM_TAB84 (GAM_BASE+0x0AE)
#define GAM_TAB85 (GAM_BASE+0x0B0)
#define GAM_TAB86 (GAM_BASE+0x0B2)
#define GAM_TAB87 (GAM_BASE+0x0B4)
#define GAM_TAB88 (GAM_BASE+0x0B6)
#define GAM_TAB89 (GAM_BASE+0x0B8)
#define GAM_TAB90 (GAM_BASE+0x0BA)
#define GAM_TAB91 (GAM_BASE+0x0BC)
#define GAM_TAB92 (GAM_BASE+0x0BE)
#define GAM_TAB93 (GAM_BASE+0x0C0)
#define GAM_TAB94 (GAM_BASE+0x0C2)
#define GAM_TAB95 (GAM_BASE+0x0C4)
#define GAM_TAB96 (GAM_BASE+0x0C6)
#define GAM_TAB97 (GAM_BASE+0x0C8)
#endif
// 6.CCM
#define CCM_MASK (ISP_TOOLS_MASK_CFG+0xF80)
#if (defined CHIPID_XM510)
#define TOOLS_CCM_BASE (ISP_TOOLS_BASE+0x500)
#else
#define TOOLS_CCM_BASE (ISP_TOOLS_BASE+0xE00)
#endif
#define CCM_ALL (TOOLS_CCM_BASE+0x000)
#define CCM_BYPASS (TOOLS_CCM_BASE+0x002)
#define CCM_OPTYPE (TOOLS_CCM_BASE+0x004)
#define CCM_MANUAL_R_OFST (TOOLS_CCM_BASE+0x006)
#define CCM_MANUAL_R_R (TOOLS_CCM_BASE+0x008)
#define CCM_MANUAL_R_G (TOOLS_CCM_BASE+0x00A)
#define CCM_MANUAL_R_B (TOOLS_CCM_BASE+0x00C)
#define CCM_MANUAL_G_OFST (TOOLS_CCM_BASE+0x00E)
#define CCM_MANUAL_G_R (TOOLS_CCM_BASE+0x010)
#define CCM_MANUAL_G_G (TOOLS_CCM_BASE+0x012)
#define CCM_MANUAL_G_B (TOOLS_CCM_BASE+0x014)
#define CCM_MANUAL_B_OFST (TOOLS_CCM_BASE+0x016)
#define CCM_MANUAL_B_R (TOOLS_CCM_BASE+0x018)
#define CCM_MANUAL_B_G (TOOLS_CCM_BASE+0x01A)
#define CCM_MANUAL_B_B (TOOLS_CCM_BASE+0x01C)
#define CCM_HIGH_CT (TOOLS_CCM_BASE+0x020)
#define CCM_AUTO1_R_OFST (TOOLS_CCM_BASE+0x022)
#define CCM_AUTO1_R_R (TOOLS_CCM_BASE+0x024)
#define CCM_AUTO1_R_G (TOOLS_CCM_BASE+0x026)
#define CCM_AUTO1_R_B (TOOLS_CCM_BASE+0x028)
#define CCM_AUTO1_G_OFST (TOOLS_CCM_BASE+0x02A)
#define CCM_AUTO1_G_R (TOOLS_CCM_BASE+0x02C)
#define CCM_AUTO1_G_G (TOOLS_CCM_BASE+0x02E)
#define CCM_AUTO1_G_B (TOOLS_CCM_BASE+0x030)
#define CCM_AUTO1_B_OFST (TOOLS_CCM_BASE+0x032)
#define CCM_AUTO1_B_R (TOOLS_CCM_BASE+0x034)
#define CCM_AUTO1_B_G (TOOLS_CCM_BASE+0x036)
#define CCM_AUTO1_B_B (TOOLS_CCM_BASE+0x038)
#define CCM_MID_CT (TOOLS_CCM_BASE+0x040)
#define CCM_AUTO2_R_OFST (TOOLS_CCM_BASE+0x042)
#define CCM_AUTO2_R_R (TOOLS_CCM_BASE+0x044)
#define CCM_AUTO2_R_G (TOOLS_CCM_BASE+0x046)
#define CCM_AUTO2_R_B (TOOLS_CCM_BASE+0x048)
#define CCM_AUTO2_G_OFST (TOOLS_CCM_BASE+0x04A)
#define CCM_AUTO2_G_R (TOOLS_CCM_BASE+0x04C)
#define CCM_AUTO2_G_G (TOOLS_CCM_BASE+0x04E)
#define CCM_AUTO2_G_B (TOOLS_CCM_BASE+0x050)
#define CCM_AUTO2_B_OFST (TOOLS_CCM_BASE+0x052)
#define CCM_AUTO2_B_R (TOOLS_CCM_BASE+0x054)
#define CCM_AUTO2_B_G (TOOLS_CCM_BASE+0x056)
#define CCM_AUTO2_B_B (TOOLS_CCM_BASE+0x058)
#define CCM_LOW_CT (TOOLS_CCM_BASE+0x060)
#define CCM_AUTO3_R_OFST (TOOLS_CCM_BASE+0x062)
#define CCM_AUTO3_R_R (TOOLS_CCM_BASE+0x064)
#define CCM_AUTO3_R_G (TOOLS_CCM_BASE+0x066)
#define CCM_AUTO3_R_B (TOOLS_CCM_BASE+0x068)
#define CCM_AUTO3_G_OFST (TOOLS_CCM_BASE+0x06A)
#define CCM_AUTO3_G_R (TOOLS_CCM_BASE+0x06C)
#define CCM_AUTO3_G_G (TOOLS_CCM_BASE+0x06E)
#define CCM_AUTO3_G_B (TOOLS_CCM_BASE+0x070)
#define CCM_AUTO3_B_OFST (TOOLS_CCM_BASE+0x072)
#define CCM_AUTO3_B_R (TOOLS_CCM_BASE+0x074)
#define CCM_AUTO3_B_G (TOOLS_CCM_BASE+0x076)
#define CCM_AUTO3_B_B (TOOLS_CCM_BASE+0x078)
//7.Chroma
#define CHROMA_MASK (ISP_TOOLS_MASK_CFG+0xFE0)
#if (defined CHIPID_XM510)
#define TOOLS_CHROMA_BASE (ISP_TOOLS_BASE+0x580)
#else
#define TOOLS_CHROMA_BASE (ISP_TOOLS_BASE+0x5C0)
#endif
#define CHROMA_ALL (TOOLS_CHROMA_BASE+0x000)
#define CHROMA_ENABLE (TOOLS_CHROMA_BASE+0x002)
#define CHROMA_OFST_PP (TOOLS_CHROMA_BASE+0x004)
#define CHROMA_OFST_R (TOOLS_CHROMA_BASE+0x006)
#define CHROMA_OFST_YE (TOOLS_CHROMA_BASE+0x008)
#define CHROMA_OFST_G (TOOLS_CHROMA_BASE+0x00A)
#define CHROMA_OFST_CY (TOOLS_CHROMA_BASE+0x00C)
#define CHROMA_OFST_B (TOOLS_CHROMA_BASE+0x00E)
#define CHROMA_STH_PP (TOOLS_CHROMA_BASE+0x014)
#define CHROMA_STH_R (TOOLS_CHROMA_BASE+0x016)
#define CHROMA_STH_YE (TOOLS_CHROMA_BASE+0x018)
#define CHROMA_STH_G (TOOLS_CHROMA_BASE+0x01A)
#define CHROMA_STH_CY (TOOLS_CHROMA_BASE+0x01C)
#define CHROMA_STH_B (TOOLS_CHROMA_BASE+0x01E)
//9.AntiFalseColor
#define AFC_MASK (ISP_TOOLS_MASK_CFG+0xFE0)
#define TOOLS_ANTIFC_BASE (ISP_TOOLS_BASE+0x5E0)
#define AFC_ENABLE (TOOLS_ANTIFC_BASE+0x002)
#define AFC_STH (TOOLS_ANTIFC_BASE+0x004)
//10.Saturation
#define SAT_MASK (ISP_TOOLS_MASK_CFG+0xFC0)
#define TOOLS_SAT_BASE (ISP_TOOLS_BASE+0x600)
#define SAT_ALL (TOOLS_SAT_BASE+0x000)
#define SAT_OPTYPE (TOOLS_SAT_BASE+0x002)
#define SAT_MANUAL_SAT (TOOLS_SAT_BASE+0x004)
#define SAT_AUTO_SAT0 (TOOLS_SAT_BASE+0x006)
#define SAT_AUTO_SAT1 (TOOLS_SAT_BASE+0x008)
#define SAT_AUTO_SAT2 (TOOLS_SAT_BASE+0x00A)
#define SAT_AUTO_SAT3 (TOOLS_SAT_BASE+0x00C)
#define SAT_AUTO_SAT4 (TOOLS_SAT_BASE+0x00E)
#define SAT_AUTO_SAT5 (TOOLS_SAT_BASE+0x010)
#define SAT_AUTO_SAT6 (TOOLS_SAT_BASE+0x012)
#define SAT_AUTO_SAT7 (TOOLS_SAT_BASE+0x014)
#define SAT_AUTO_SAT8 (TOOLS_SAT_BASE+0x016)
#define SAT_AUTO_SAT9 (TOOLS_SAT_BASE+0x018)
#define SAT_AUTO_SAT10 (TOOLS_SAT_BASE+0x01A)
#define SAT_AUTO_SAT11 (TOOLS_SAT_BASE+0x01C)
#define SAT_AUTO_SAT12 (TOOLS_SAT_BASE+0x01E)
#define SAT_AUTO_SAT13 (TOOLS_SAT_BASE+0x020)
#define SAT_AUTO_SAT14 (TOOLS_SAT_BASE+0x022)
#define SAT_AUTO_SAT15 (TOOLS_SAT_BASE+0x024)
#define SAT_MODE (TOOLS_SAT_BASE+0x030)
// 11.other
#define OTHER_MASK (ISP_TOOLS_MASK_CFG+0xFC0)
#define OTHER_BASE (ISP_TOOLS_BASE+0x640)
#define ISPFLASH_EN (ISP_TOOLS_BASE+0x640)
//Gain limit
#define OTHER_GAIN50 (OTHER_BASE+0x002)
#define OTHER_GAIN100 (OTHER_BASE+0x004)
//Lum
#define OTHER_LUM_DAY (OTHER_BASE+0x006)
#define OTHER_LUM_NIT (OTHER_BASE+0x008)
//EEShutter
#define OTHER_EE_OPN (OTHER_BASE+0x00A)
#define OTHER_EE_CLS (OTHER_BASE+0x00C)
//TDN
#define OTHER_TDN_DAY1 (OTHER_BASE+0x010)
#define OTHER_TDN_NIT1 (OTHER_BASE+0x012)
#define OTHER_TDN_DAY2 (OTHER_BASE+0x014)
#define OTHER_TDN_NIT2 (OTHER_BASE+0x016)
#define OTHER_TDN_DAY3 (OTHER_BASE+0x018)
#define OTHER_TDN_NIT3 (OTHER_BASE+0x01A)
#define OTHER_TDN_DAY4 (OTHER_BASE+0x01C)
#define OTHER_TDN_NIT4 (OTHER_BASE+0x01E)
#define OTHER_TDN_DAY5 (OTHER_BASE+0x020)
#define OTHER_TDN_NIT5 (OTHER_BASE+0x022)
#define OTHER_VERSION_EN (OTHER_BASE+0x030)
#define OTHER_YEAR (OTHER_BASE+0x038)
#define OTHER_MON (OTHER_BASE+0x03A)
#define OTHER_DAY (OTHER_BASE+0x03C)
#define OTHER_CUSTOMER (OTHER_BASE+0x03E)
//12.Ae
#define AE_MASK (ISP_TOOLS_MASK_CFG+0xF80)
#define AE_BASE (ISP_TOOLS_BASE+0x680)
#define AE_T_MIN (AE_BASE+0x002)
#define AE_T_MAX (AE_BASE+0x004)
#define AE_AGAIN_MIN (AE_BASE+0x006)
#define AE_AGAIN_MAX (AE_BASE+0x008)
#define AE_DGAIN_MIN (AE_BASE+0x00A)
#define AE_DGAIN_MAX (AE_BASE+0x00C)
#define AE_ISPDGAIN_MIN (AE_BASE+0x00E)
#define AE_ISPDGAIN_MAX (AE_BASE+0x010)
#define AE_ALLGAIN_MAX1 (AE_BASE+0x012)
#define AE_ALLGAIN_MAX2 (AE_BASE+0x014)
#define AE_TARGET_NUM (AE_BASE+0x020)
#define AE_EXP0_H (AE_BASE+0x022)
#define AE_EXP0_L (AE_BASE+0x024)
#define AE_EXP1_H (AE_BASE+0x026)
#define AE_EXP1_L (AE_BASE+0x028)
#define AE_EXP2_H (AE_BASE+0x02A)
#define AE_EXP2_L (AE_BASE+0x02C)
#define AE_EXP3_H (AE_BASE+0x02E)
#define AE_EXP3_L (AE_BASE+0x030)
#define AE_LUMTGT0 (AE_BASE+0x032)
#define AE_LUMTGT1 (AE_BASE+0x034)
#define AE_LUMTGT2 (AE_BASE+0x036)
#define AE_LUMTGT3 (AE_BASE+0x038)
#define GAMMA_BY_AGC (AE_BASE+0x040)
#define GAMMA_THRESHOLD_1 (AE_BASE+0x042)
#define GAMMA_THRESHOLD_2 (AE_BASE+0x044)
// 13.CSC
#define CSC_CFG_MASK (ISP_TOOLS_MASK_CFG+0xF80)
#define CSC_CFG_BASE (ISP_TOOLS_BASE+0x780)
#define CSC_CFG_LUM (CSC_CFG_BASE+0x000)
#define CSC_CFG_CON (CSC_CFG_BASE+0x002)
#define CSC_CFG_AUTANCE (CSC_CFG_BASE+0x004)
#define CSC_CFG_HUE (CSC_CFG_BASE+0x006)
#define CSC_CFG_SAT (CSC_CFG_BASE+0x008)
#define CSC_CFG_AUTO_CON0 (CSC_CFG_BASE+0x010)
#define CSC_CFG_AUTO_CON1 (CSC_CFG_BASE+0x012)
#define CSC_CFG_AUTO_CON2 (CSC_CFG_BASE+0x014)
#define CSC_CFG_AUTO_CON3 (CSC_CFG_BASE+0x016)
#define CSC_CFG_AUTO_CON4 (CSC_CFG_BASE+0x018)
#define CSC_CFG_AUTO_CON5 (CSC_CFG_BASE+0x01A)
#define CSC_CFG_AUTO_CON6 (CSC_CFG_BASE+0x01C)
#define CSC_CFG_AUTO_CON7 (CSC_CFG_BASE+0x01E)
#define CSC_CFG_AUTO_CON8 (CSC_CFG_BASE+0x020)
#define CSC_CFG_AUTO_CON9 (CSC_CFG_BASE+0x022)
#define CSC_CFG_AUTO_CON10 (CSC_CFG_BASE+0x024)
#define CSC_CFG_AUTO_CON11 (CSC_CFG_BASE+0x026)
#define CSC_CFG_AUTO_CON12 (CSC_CFG_BASE+0x028)
#define CSC_CFG_AUTO_CON13 (CSC_CFG_BASE+0x02A)
#define CSC_CFG_AUTO_CON14 (CSC_CFG_BASE+0x02C)
#define CSC_CFG_AUTO_CON15 (CSC_CFG_BASE+0x02E)
// DCI
#define TOOLS_DCI_BASE (ISP_TOOLS_BASE+0x7C0)
#define DCI_MASK (ISP_TOOLS_MASK_CFG+0xFC0)
#define DCI_ALL (TOOLS_DCI_BASE+0x000)
#define DCI_ENABLE (TOOLS_DCI_BASE+0x002)
#define DCI_OPTYPE (TOOLS_DCI_BASE+0x004)
#define DCI_MANUAL_THR (TOOLS_DCI_BASE+0x006)
#define DCI_AUTO_THR0 (TOOLS_DCI_BASE+0x008)
#define DCI_AUTO_THR1 (TOOLS_DCI_BASE+0x00A)
#define DCI_AUTO_THR2 (TOOLS_DCI_BASE+0x00C)
#define DCI_AUTO_THR3 (TOOLS_DCI_BASE+0x00E)
#define DCI_AUTO_THR4 (TOOLS_DCI_BASE+0x010)
#define DCI_AUTO_THR5 (TOOLS_DCI_BASE+0x012)
#define DCI_AUTO_THR6 (TOOLS_DCI_BASE+0x014)
#define DCI_AUTO_THR7 (TOOLS_DCI_BASE+0x016)
#define DCI_AUTO_THR8 (TOOLS_DCI_BASE+0x018)
#define DCI_AUTO_THR9 (TOOLS_DCI_BASE+0x01A)
#define DCI_AUTO_THR10 (TOOLS_DCI_BASE+0x01C)
#define DCI_AUTO_THR11 (TOOLS_DCI_BASE+0x01E)
#define DCI_AUTO_THR12 (TOOLS_DCI_BASE+0x020)
#define DCI_AUTO_THR13 (TOOLS_DCI_BASE+0x022)
#define DCI_AUTO_THR14 (TOOLS_DCI_BASE+0x024)
#define DCI_AUTO_THR15 (TOOLS_DCI_BASE+0x026)
// SharpnessV2
#define TOOLS_SHARPV2_BASE (ISP_TOOLS_BASE+0x800)
#define SHARPV2_MASK (ISP_TOOLS_MASK_CFG+0xF00)
#define SHARPV2_ALL (TOOLS_SHARPV2_BASE+0x000)
#define SHARPV2_CHOICE (TOOLS_SHARPV2_BASE+0x002)
#define SHARPV2_ENABLE (TOOLS_SHARPV2_BASE+0x004)
#define SHARPV2_OPTYPE (TOOLS_SHARPV2_BASE+0x006)
#define SHARPV2_GLOBAL (TOOLS_SHARPV2_BASE+0x008)
#define SHARPV2_MANUAL_THR (TOOLS_SHARPV2_BASE+0x010)
#define SHARPV2_MANUAL_D (TOOLS_SHARPV2_BASE+0x012)
#define SHARPV2_MANUAL_UD (TOOLS_SHARPV2_BASE+0x014)
#define SHARPV2_MANUAL_KD (TOOLS_SHARPV2_BASE+0x016)
#define SHARPV2_MANUAL_DTTHR (TOOLS_SHARPV2_BASE+0x018)
#define SHARPV2_MANUAL_DTCTRL (TOOLS_SHARPV2_BASE+0x01A)
#define SHARPV2_AUTO_THR0 (TOOLS_SHARPV2_BASE+0x040)
#define SHARPV2_AUTO_THR1 (TOOLS_SHARPV2_BASE+0x042)
#define SHARPV2_AUTO_THR2 (TOOLS_SHARPV2_BASE+0x044)
#define SHARPV2_AUTO_THR3 (TOOLS_SHARPV2_BASE+0x046)
#define SHARPV2_AUTO_THR4 (TOOLS_SHARPV2_BASE+0x048)
#define SHARPV2_AUTO_THR5 (TOOLS_SHARPV2_BASE+0x04A)
#define SHARPV2_AUTO_THR6 (TOOLS_SHARPV2_BASE+0x04C)
#define SHARPV2_AUTO_THR7 (TOOLS_SHARPV2_BASE+0x04E)
#define SHARPV2_AUTO_THR8 (TOOLS_SHARPV2_BASE+0x050)
#define SHARPV2_AUTO_THR9 (TOOLS_SHARPV2_BASE+0x052)
#define SHARPV2_AUTO_D0 (TOOLS_SHARPV2_BASE+0x054)
#define SHARPV2_AUTO_D1 (TOOLS_SHARPV2_BASE+0x056)
#define SHARPV2_AUTO_D2 (TOOLS_SHARPV2_BASE+0x058)
#define SHARPV2_AUTO_D3 (TOOLS_SHARPV2_BASE+0x05A)
#define SHARPV2_AUTO_D4 (TOOLS_SHARPV2_BASE+0x05C)
#define SHARPV2_AUTO_D5 (TOOLS_SHARPV2_BASE+0x05E)
#define SHARPV2_AUTO_D6 (TOOLS_SHARPV2_BASE+0x060)
#define SHARPV2_AUTO_D7 (TOOLS_SHARPV2_BASE+0x062)
#define SHARPV2_AUTO_D8 (TOOLS_SHARPV2_BASE+0x064)
#define SHARPV2_AUTO_D9 (TOOLS_SHARPV2_BASE+0x066)
#define SHARPV2_AUTO_UD0 (TOOLS_SHARPV2_BASE+0x068)
#define SHARPV2_AUTO_UD1 (TOOLS_SHARPV2_BASE+0x06A)
#define SHARPV2_AUTO_UD2 (TOOLS_SHARPV2_BASE+0x06C)
#define SHARPV2_AUTO_UD3 (TOOLS_SHARPV2_BASE+0x06E)
#define SHARPV2_AUTO_UD4 (TOOLS_SHARPV2_BASE+0x070)
#define SHARPV2_AUTO_UD5 (TOOLS_SHARPV2_BASE+0x072)
#define SHARPV2_AUTO_UD6 (TOOLS_SHARPV2_BASE+0x074)
#define SHARPV2_AUTO_UD7 (TOOLS_SHARPV2_BASE+0x076)
#define SHARPV2_AUTO_UD8 (TOOLS_SHARPV2_BASE+0x078)
#define SHARPV2_AUTO_UD9 (TOOLS_SHARPV2_BASE+0x07A)
#define SHARPV2_AUTO_KD0 (TOOLS_SHARPV2_BASE+0x07C)
#define SHARPV2_AUTO_KD1 (TOOLS_SHARPV2_BASE+0x07E)
#define SHARPV2_AUTO_KD2 (TOOLS_SHARPV2_BASE+0x080)
#define SHARPV2_AUTO_KD3 (TOOLS_SHARPV2_BASE+0x082)
#define SHARPV2_AUTO_KD4 (TOOLS_SHARPV2_BASE+0x084)
#define SHARPV2_AUTO_KD5 (TOOLS_SHARPV2_BASE+0x086)
#define SHARPV2_AUTO_KD6 (TOOLS_SHARPV2_BASE+0x088)
#define SHARPV2_AUTO_KD7 (TOOLS_SHARPV2_BASE+0x08A)
#define SHARPV2_AUTO_KD8 (TOOLS_SHARPV2_BASE+0x08C)
#define SHARPV2_AUTO_KD9 (TOOLS_SHARPV2_BASE+0x08E)
#define SHARPV2_AUTO_DTTHR0 (TOOLS_SHARPV2_BASE+0x090)
#define SHARPV2_AUTO_DTTHR1 (TOOLS_SHARPV2_BASE+0x092)
#define SHARPV2_AUTO_DTTHR2 (TOOLS_SHARPV2_BASE+0x094)
#define SHARPV2_AUTO_DTTHR3 (TOOLS_SHARPV2_BASE+0x096)
#define SHARPV2_AUTO_DTTHR4 (TOOLS_SHARPV2_BASE+0x098)
#define SHARPV2_AUTO_DTTHR5 (TOOLS_SHARPV2_BASE+0x09A)
#define SHARPV2_AUTO_DTTHR6 (TOOLS_SHARPV2_BASE+0x09C)
#define SHARPV2_AUTO_DTTHR7 (TOOLS_SHARPV2_BASE+0x09E)
#define SHARPV2_AUTO_DTTHR8 (TOOLS_SHARPV2_BASE+0x0A0)
#define SHARPV2_AUTO_DTTHR9 (TOOLS_SHARPV2_BASE+0x0A2)
#define SHARPV2_AUTO_DTCTRL0 (TOOLS_SHARPV2_BASE+0x0A4)
#define SHARPV2_AUTO_DTCTRL1 (TOOLS_SHARPV2_BASE+0x0A6)
#define SHARPV2_AUTO_DTCTRL2 (TOOLS_SHARPV2_BASE+0x0A8)
#define SHARPV2_AUTO_DTCTRL3 (TOOLS_SHARPV2_BASE+0x0AA)
#define SHARPV2_AUTO_DTCTRL4 (TOOLS_SHARPV2_BASE+0x0AC)
#define SHARPV2_AUTO_DTCTRL5 (TOOLS_SHARPV2_BASE+0x0AE)
#define SHARPV2_AUTO_DTCTRL6 (TOOLS_SHARPV2_BASE+0x0B0)
#define SHARPV2_AUTO_DTCTRL7 (TOOLS_SHARPV2_BASE+0x0B2)
#define SHARPV2_AUTO_DTCTRL8 (TOOLS_SHARPV2_BASE+0x0B4)
#define SHARPV2_AUTO_DTCTRL9 (TOOLS_SHARPV2_BASE+0x0B6)
//14. Menu
#define MENU_BASE (ISP_TOOLS_BASE+0x4000)
#define MENU_MASK (ISP_TOOLS_BASE+0xF000)
#define MENU_ENABLE (MENU_BASE+0x000)
#define MENU_EXP_MODE (MENU_BASE+0x002)
#define MENU_DNC_MODE (MENU_BASE+0x004)
#define MENU_BLC_EN (MENU_BASE+0x006)
#define MENU_AE_TGT (MENU_BASE+0x008)
#define MENU_DNC_THR (MENU_BASE+0x00A)
#define MENU_WDR_STH (MENU_BASE+0x00C)
#define MENU_IMG_STYLE (MENU_BASE+0x00E)
#define MENU_AGC_EN (MENU_BASE+0x010)
#define MENU_AGC_MAX (MENU_BASE+0x012)
#define MENU_NRLVL_COL (MENU_BASE+0x014)
#define MENU_NRLVL_BW (MENU_BASE+0x016)
#define MENU_IRCUTMODE (MENU_BASE+0x018)
#define MENU_WB_RB (MENU_BASE+0x01A)
#define MENU_WB_GM (MENU_BASE+0x01C)
#define MENU_MIRROR (MENU_BASE+0x01E)
#define MENU_FLIP (MENU_BASE+0x020)
#define MENU_ANTIFLICKER (MENU_BASE+0x022)
#define MENU_IRCUTSWAP (MENU_BASE+0x024)
#define MENU_BRIGHTNESS (MENU_BASE+0x026)
#define MENU_CONTRAST (MENU_BASE+0x028)
#define MENU_SATURATION (MENU_BASE+0x02A)
#define MENU_HUE (MENU_BASE+0x02C)
#define MENU_ACUTANCE (MENU_BASE+0x02E)
#define MENU_SAWTOOTH (MENU_BASE+0x030)
#define MENU_ANTIFC (MENU_BASE+0x032)
#define MENU_BW_BURST (MENU_BASE+0x034)
#define MENU_VSTD_TYPE (MENU_BASE+0x036)
#define MENU_VENC_TYPE (MENU_BASE+0x038)
#define MENU_CFGUSE_OFST (0x1000)
//15.YCNr
#define YCNR_MASK (ISP_TOOLS_BASE+0xF00)
#define TOOLS_YCNR_BASE (ISP_TOOLS_BASE+0x900)
#define TOOLS_YCNR_BASE2 (ISP_TOOLS_BASE+0xA00)
#define YCNR_ENABLE (TOOLS_YCNR_BASE+0x000)
#define YCNR_OPTYPE (TOOLS_YCNR_BASE+0x002)
#define YCNR_MANUAL_NR_SMP (TOOLS_YCNR_BASE+0x010)
#define YCNR_MANUAL_NR_KM1 (TOOLS_YCNR_BASE+0x012)
#define YCNR_MANUAL_NR_KM2 (TOOLS_YCNR_BASE+0x014)
#define YCNR_MANUAL_NR_KH1 (TOOLS_YCNR_BASE+0x016)
#define YCNR_MANUAL_NR_KH2 (TOOLS_YCNR_BASE+0x018)
#define YCNR_MANUAL_SP_KM1 (TOOLS_YCNR_BASE+0x01A)
#define YCNR_MANUAL_SP_KM2 (TOOLS_YCNR_BASE+0x01C)
#define YCNR_MANUAL_SP_KH1 (TOOLS_YCNR_BASE+0x01E)
#define YCNR_MANUAL_SP_KH2 (TOOLS_YCNR_BASE+0x020)
#define YCNR_AUTO_SMP_THR0 (TOOLS_YCNR_BASE+0x030)
#define YCNR_AUTO_NRKM1_THR0 (TOOLS_YCNR_BASE+0x050)
#define YCNR_AUTO_NRKH1_THR0 (TOOLS_YCNR_BASE+0x070)
#define YCNR_AUTO_NRKM2_THR0 (TOOLS_YCNR_BASE+0x090)
#define YCNR_AUTO_NRKH2_THR0 (TOOLS_YCNR_BASE+0x0B0)
#define YCNR_AUTO_SPKM1_THR0 (TOOLS_YCNR_BASE+0x0D0)
#define YCNR_AUTO_SPKH1_THR0 (TOOLS_YCNR_BASE+0x0F0)
#define YCNR_AUTO_SPKM2_THR0 (TOOLS_YCNR_BASE+0x110)
#define YCNR_AUTO_SPKH2_THR0 (TOOLS_YCNR_BASE+0x130)
// 16.PQ_Awb
#define PQTOOLS_AWB_MASK (ISP_TOOLS_BASE+0xF00)
#define PQTOOLS_AWB_BASE (ISP_TOOLS_BASE+0xD00)
#define PQ_AWB_BYPASS (PQTOOLS_AWB_BASE+0x000)
#define PQ_AWB_OPTYPE (PQTOOLS_AWB_BASE+0x002)
#define PQ_AWB_MANUAL_R (PQTOOLS_AWB_BASE+0x004)
#define PQ_AWB_MANUAL_G (PQTOOLS_AWB_BASE+0x006)
#define PQ_AWB_MANUAL_B (PQTOOLS_AWB_BASE+0x008)
#define PQ_AWB_AUTO_GM_OFST (PQTOOLS_AWB_BASE+0x010)
#define PQ_AWB_AUTO_RB_OFST (PQTOOLS_AWB_BASE+0x012)
#define PQ_AWB_AUTO_R_OFST (PQTOOLS_AWB_BASE+0x014)
#define PQ_AWB_AUTO_B_OFST (PQTOOLS_AWB_BASE+0x016)
#define PQ_AWB_AUTO_SPEED2H (PQTOOLS_AWB_BASE+0x018)
#define PQ_AWB_AUTO_SPEED2L (PQTOOLS_AWB_BASE+0x01A)
#define PQ_AWB_AUTO_CTMAX (PQTOOLS_AWB_BASE+0x01C)
#define PQ_AWB_AUTO_CTMIN (PQTOOLS_AWB_BASE+0x01E)
#define PQ_AWB_DEG_CAL_A0 (PQTOOLS_AWB_BASE+0x030)
#define PQ_AWB_DEG_CAL_B0 (PQTOOLS_AWB_BASE+0x040)
#define PQ_AWB_DEG_CAL_C0 (PQTOOLS_AWB_BASE+0x050)
#define PQ_AWB_DEG_CAL_KEY (PQTOOLS_AWB_BASE+0x060)
#define PQ_AWB_DEG_CAL_X (PQTOOLS_AWB_BASE+0x062)
#define PQ_AWB_DEG_CAL_Y (PQTOOLS_AWB_BASE+0x064)
#define PQ_AWB_DEG_DIS_MIN (PQTOOLS_AWB_BASE+0x066)
#define PQ_AWB_DEG_DIS_MAX (PQTOOLS_AWB_BASE+0x068)
#define PQ_AWB_DEG_DIS0 (PQTOOLS_AWB_BASE+0x070)
#define PQ_AWB_DEG_VAL0 (PQTOOLS_AWB_BASE+0x090)
#define PQ_AWB_DEG_INIT_GAIN0 (PQTOOLS_AWB_BASE+0x0B0)
#define PQ_AWB_DEG_INIT_GAIN3 (PQTOOLS_AWB_BASE+0x0B6)
// 17.PQ_VecTx
#define PQTOOLS_TX_MASK (ISP_TOOLS_BASE+0xFF0)
#define PQTOOLS_TX_BASE (ISP_TOOLS_BASE+0xDD0)
#define PQTOOLS_TX_BASE2 (ISP_TOOLS_BASE+0xDE0)
#define PQ_TX_EN (PQTOOLS_TX_BASE+0x000)
#define PQ_TX_TEST (PQTOOLS_TX_BASE+0x002)
#define PQ_TX_BLANKVAL_PAL (PQTOOLS_TX_BASE+0x004)
#define PQ_TX_SYNCVAL_PAL (PQTOOLS_TX_BASE+0x006)
#define PQ_TX_CSYNCVAL_PAL (PQTOOLS_TX_BASE+0x008)
#define PQ_TX_SUBCARRIER_H_PAL (PQTOOLS_TX_BASE+0x00A)
#define PQ_TX_SUBCARRIER_L_PAL (PQTOOLS_TX_BASE+0x00C)
#define PQ_TX_BLANKVAL_NTSC (PQTOOLS_TX_BASE+0x014)
#define PQ_TX_SYNCVAL_NTSC (PQTOOLS_TX_BASE+0x016)
#define PQ_TX_CSYNCVAL_NTSC (PQTOOLS_TX_BASE+0x018)
#define PQ_TX_SUBCARRIER_H_NTSC (PQTOOLS_TX_BASE+0x01A)
#define PQ_TX_SUBCARRIER_L_NTSC (PQTOOLS_TX_BASE+0x01C)
// Tools_AE
#define TOOLS_AE_BASE 0xF8000000
#define TOOLS_AE_MASK 0xFFF00000
#define AE_BYPASS (TOOLS_AE_BASE+0x00000)
#define AE_OPTYPE (TOOLS_AE_BASE+0x00004)
#define AE_MANUAL_AGAIN (TOOLS_AE_BASE+0x00008)
#define AE_MANUAL_DGAIN (TOOLS_AE_BASE+0x0000C)
#define AE_MANUAL_ISPGAIN (TOOLS_AE_BASE+0x00140)
#define AE_MANUAL_EXPTIMER (TOOLS_AE_BASE+0x00010)
#define AE_MANUAL_EXPENABLE (TOOLS_AE_BASE+0x00014)
#define AE_MANUAL_AGENABLE (TOOLS_AE_BASE+0x00018)
#define AE_MANUAL_DGENABLE (TOOLS_AE_BASE+0x0001c)
#define AE_MANUAL_ISPDGENABLE (TOOLS_AE_BASE+0x00144)
#define AE_RANGEEXP_MAX (TOOLS_AE_BASE+0x00020)
#define AE_RANGEEXP_MIN (TOOLS_AE_BASE+0x00024)
#define AE_RANGEAGAIN_MAX (TOOLS_AE_BASE+0x00028)
#define AE_RANGEAGAIN_MIN (TOOLS_AE_BASE+0x0008C) // add
#define AE_RANGEDGAIN_MIN (TOOLS_AE_BASE+0x0002C)
#define AE_RANGEDGAIN_MAX (TOOLS_AE_BASE+0x00030)
#define AE_RANGEISPDGAIN_MIN (TOOLS_AE_BASE+0x00034)
#define AE_RANGEISPDGAIN_MAX (TOOLS_AE_BASE+0x00038)
#define AE_RANGESYSDGAIN_MIN (TOOLS_AE_BASE+0x0003C)
#define AE_RANGESYSDGAIN_MAX (TOOLS_AE_BASE+0x00040)
#define AE_GAINTHRESHOLD (TOOLS_AE_BASE+0x00044)
#define AE_SPEED (TOOLS_AE_BASE+0x00048)
#define AE_TOLERANCE (TOOLS_AE_BASE+0x0004C)
#define AE_COMPENSATION (TOOLS_AE_BASE+0x00050)
#define AE_EVBIAS (TOOLS_AE_BASE+0x00054)
#define AE_AESTRATEGYMODE (TOOLS_AE_BASE+0x00058)
#define AE_HISTRATIOSLOPE (TOOLS_AE_BASE+0x0005C)
#define AE_MAXHISTOFST (TOOLS_AE_BASE+0x00060)
#define AE_AEMODE (TOOLS_AE_BASE+0x00064)
#define AE_DEFLICKERENABLE (TOOLS_AE_BASE+0x00068)
#define AE_DEFLICKERFRE (TOOLS_AE_BASE+0x0006C)
#define AE_DEFLICKERMODE (TOOLS_AE_BASE+0x00070)
#define AE_ISPGAINEX (TOOLS_AE_BASE+0x00148)
#define AE_SHUTTER (TOOLS_AE_BASE+0x00074)
#define AE_AGAIN (TOOLS_AE_BASE+0x00078)
#define AE_DGAIN (TOOLS_AE_BASE+0x0007C)
#define AE_ISPGAIN (TOOLS_AE_BASE+0x0011C)
#define AE_ALLGAIN (TOOLS_AE_BASE+0x00080)
#define AE_EXPOSURE (TOOLS_AE_BASE+0x00084)
#define AE_AVE_LUM (TOOLS_AE_BASE+0x00088)
#define AE_EXP_HIST16_0 (TOOLS_AE_BASE+0x00090)
#define AE_EXP_HIST16_1 (TOOLS_AE_BASE+0x00094)
#define AE_EXP_HIST16_2 (TOOLS_AE_BASE+0x00098)
#define AE_EXP_HIST16_3 (TOOLS_AE_BASE+0x0009C)
#define AE_EXP_HIST16_4 (TOOLS_AE_BASE+0x000A0)
#define AE_EXP_HIST16_5 (TOOLS_AE_BASE+0x000A4)
#define AE_EXP_HIST16_6 (TOOLS_AE_BASE+0x000A8)
#define AE_EXP_HIST16_7 (TOOLS_AE_BASE+0x000AC)
#define AE_EXP_HIST16_8 (TOOLS_AE_BASE+0x000B0)
#define AE_EXP_HIST16_9 (TOOLS_AE_BASE+0x000B4)
#define AE_EXP_HIST16_10 (TOOLS_AE_BASE+0x000B8)
#define AE_EXP_HIST16_11 (TOOLS_AE_BASE+0x000BC)
#define AE_EXP_HIST16_12 (TOOLS_AE_BASE+0x000C0)
#define AE_EXP_HIST16_13 (TOOLS_AE_BASE+0x000C4)
#define AE_EXP_HIST16_14 (TOOLS_AE_BASE+0x000C8)
#define AE_EXP_HIST16_15 (TOOLS_AE_BASE+0x000CC)
#define AE_TGT_HIST16_0 (TOOLS_AE_BASE+0x000D0)
#define AE_TGT_HIST16_1 (TOOLS_AE_BASE+0x000D4)
#define AE_TGT_HIST16_2 (TOOLS_AE_BASE+0x000D8)
#define AE_TGT_HIST16_3 (TOOLS_AE_BASE+0x000DC)
#define AE_TGT_HIST16_4 (TOOLS_AE_BASE+0x000E0)
#define AE_TGT_HIST16_5 (TOOLS_AE_BASE+0x000E4)
#define AE_TGT_HIST16_6 (TOOLS_AE_BASE+0x000E8)
#define AE_TGT_HIST16_7 (TOOLS_AE_BASE+0x000EC)
#define AE_TGT_HIST16_8 (TOOLS_AE_BASE+0x000F0)
#define AE_TGT_HIST16_9 (TOOLS_AE_BASE+0x000F4)
#define AE_TGT_HIST16_10 (TOOLS_AE_BASE+0x000F8)
#define AE_TGT_HIST16_11 (TOOLS_AE_BASE+0x000FC)
#define AE_TGT_HIST16_12 (TOOLS_AE_BASE+0x00100)
#define AE_TGT_HIST16_13 (TOOLS_AE_BASE+0x00104)
#define AE_TGT_HIST16_14 (TOOLS_AE_BASE+0x00108)
#define AE_TGT_HIST16_15 (TOOLS_AE_BASE+0x0010C)
#define AE_HIST_TGT (TOOLS_AE_BASE+0x00110)
#define AE_HIST_NOW (TOOLS_AE_BASE+0x00114)
#define AE_HIST_ERR (TOOLS_AE_BASE+0x00118)
#define AE_DELAY_B2D (TOOLS_AE_BASE+0x00120)
#define AE_DELAY_D2B (TOOLS_AE_BASE+0x00124)
#define AE_IS_MAX (TOOLS_AE_BASE+0x00128)
#define AE_ALL_QISI (TOOLS_AE_BASE+0x0012C)
#define AE_ALL_EXPOSURE (TOOLS_AE_BASE+0x00130)
#define AE_WEIGHT (TOOLS_AE_BASE+0x00134)
#define AE_LUM_WIN0 (TOOLS_AE_BASE+0x00150)
// Tools_AWB
#define TOOLS_AWB_BASE 0xF8300000
#define TOOLS_AWB_MASK 0xFFF00000
#define AWB_BYPASS (TOOLS_AWB_BASE+0x00000)
#define AWB_OPTYPE (TOOLS_AWB_BASE+0x00004)
#define AWB_MANUAL_R (TOOLS_AWB_BASE+0x00008)
#define AWB_MANUAL_G (TOOLS_AWB_BASE+0x0000C)
#define AWB_MANUAL_B (TOOLS_AWB_BASE+0x00010)
#define AWB_AUTO_GM_OFST (TOOLS_AWB_BASE+0x00020)
#define AWB_AUTO_RB_OFST (TOOLS_AWB_BASE+0x00024)
#define AWB_AUTO_R_OFST (TOOLS_AWB_BASE+0x00028)
#define AWB_AUTO_B_OFST (TOOLS_AWB_BASE+0x0002C)
#define AWB_AUTO_SPEED2H (TOOLS_AWB_BASE+0x00030)
#define AWB_AUTO_SPEED2L (TOOLS_AWB_BASE+0x00034)
#define AWB_AUTO_ZONE (TOOLS_AWB_BASE+0x00038)
#define AWB_AUTO_CTMAX (TOOLS_AWB_BASE+0x00040)
#define AWB_AUTO_CTMIN (TOOLS_AWB_BASE+0x00044)
#define AWB_INFO_RGAIN (TOOLS_AWB_BASE+0x00080)
#define AWB_INFO_GGAIN (TOOLS_AWB_BASE+0x00084)
#define AWB_INFO_BGAIN (TOOLS_AWB_BASE+0x00088)
#define AWB_INFO_CT (TOOLS_AWB_BASE+0x0008C)
#define AWB_INFO_GM_OFST (TOOLS_AWB_BASE+0x00090)
#define AWB_INFO_RB_OFST (TOOLS_AWB_BASE+0x00094)
#define AWB_WP_NUM_LIMIT (TOOLS_AWB_BASE+0x00098)
#define AWB_DBG_MODE (TOOLS_AWB_BASE+0x000A0)
#define AWB_DBG_MN_MODE (TOOLS_AWB_BASE+0x000A4)
#define AWB_DBG_CURVE (TOOLS_AWB_BASE+0x000A8)
#define AWB_DBG_KG (TOOLS_AWB_BASE+0x000AC)
#define AWB_ALL (TOOLS_AWB_BASE+0x000F0)
#define AWBCAL_ALL (TOOLS_AWB_BASE+0x000F2)
#define AWB_DEG_CAL_A0 (TOOLS_AWB_BASE+0x00100)
#define AWB_DEG_CAL_A1 (TOOLS_AWB_BASE+0x00104)
#define AWB_DEG_CAL_A7 (TOOLS_AWB_BASE+0x0011C)
#define AWB_DEG_CAL_B0 (TOOLS_AWB_BASE+0x00120)
#define AWB_DEG_CAL_B7 (TOOLS_AWB_BASE+0x0013C)
#define AWB_DEG_CAL_C0 (TOOLS_AWB_BASE+0x00140)
#define AWB_DEG_CAL_C7 (TOOLS_AWB_BASE+0x0015C)
#define AWB_DEG_CAL_KEY (TOOLS_AWB_BASE+0x00160)
#define AWB_DEG_CAL_X (TOOLS_AWB_BASE+0x00164)
#define AWB_DEG_CAL_Y (TOOLS_AWB_BASE+0x00168)
#define AWB_DEG_DIS_MIN (TOOLS_AWB_BASE+0x0016C)
#define AWB_DEG_DIS_MAX (TOOLS_AWB_BASE+0x00170)
#define AWB_DEG_DIS0 (TOOLS_AWB_BASE+0x00180)
#define AWB_DEG_VAL0 (TOOLS_AWB_BASE+0x001C0)
#define AWB_DEG_INIT_GAIN0 (TOOLS_AWB_BASE+0x00200)
#define AWB_DEG_INIT_GAIN3 (TOOLS_AWB_BASE+0x0020C)
#define AWB_STAT_RGBG_0_0 (TOOLS_AWB_BASE+0x02000)
#define AWB_STAT_RGBG_1_0 (TOOLS_AWB_BASE+0x02080)
#define AWB_STAT_RGBG_2_0 (TOOLS_AWB_BASE+0x02100)
#define AWB_STAT_RGBG_3_0 (TOOLS_AWB_BASE+0x02180)
#define AWB_STAT_RGBG_4_0 (TOOLS_AWB_BASE+0x02200)
#define AWB_STAT_RGBG_5_0 (TOOLS_AWB_BASE+0x02280)
#define AWB_STAT_RGBG_6_0 (TOOLS_AWB_BASE+0x02300)
#define AWB_STAT_RGBG_7_0 (TOOLS_AWB_BASE+0x02380)
#define AWB_STAT_RGBG_8_0 (TOOLS_AWB_BASE+0x02400)
#define AWB_STAT_RGBG_9_0 (TOOLS_AWB_BASE+0x02480)
#define AWB_STAT_RGBG_10_0 (TOOLS_AWB_BASE+0x02500)
#define AWB_STAT_RGBG_11_0 (TOOLS_AWB_BASE+0x02580)
#define AWB_STAT_RGBG_12_0 (TOOLS_AWB_BASE+0x02600)
#define AWB_STAT_RGBG_13_0 (TOOLS_AWB_BASE+0x02680)
#define AWB_STAT_RGBG_14_0 (TOOLS_AWB_BASE+0x02700)
#define AWB_STAT_RGBG_15_0 (TOOLS_AWB_BASE+0x02780)
#define AWB_STAT_RGBG_15_31 (TOOLS_AWB_BASE+0x027FC)
// Tools_GAMMA
#define TOOLS_GAMMA_BASE 0xF8400000
#define GAMMA_EN (TOOLS_GAMMA_BASE+0x00000)
#define GAMMA_CHOICE (TOOLS_GAMMA_BASE+0x00004)
// Tools_YUV CSC
#define TOOLS_CSC_BASE 0xF8500000
#define TOOLS_CSC_MASK 0xFFF00F00
#define CSC_ALL (TOOLS_CSC_BASE+0x00012)
#define CSC_TYPE (TOOLS_CSC_BASE+0x00000)
#define CSC_OP (TOOLS_CSC_BASE+0x00002)
#define CSC_LUM (TOOLS_CSC_BASE+0x00004)
#define CSC_CONTRAST (TOOLS_CSC_BASE+0x00008)
#define CSC_HUE (TOOLS_CSC_BASE+0x0000C)
#define CSC_SATURATION (TOOLS_CSC_BASE+0x00010)
#define Csc_Ctr_Map0 (TOOLS_CSC_BASE+0x00014)
#define Csc_Ctr_Map1 (TOOLS_CSC_BASE+0x00016)
#define Csc_Ctr_Map2 (TOOLS_CSC_BASE+0x00018)
#define Csc_Ctr_Map3 (TOOLS_CSC_BASE+0x0001a)
#define Csc_Ctr_Map4 (TOOLS_CSC_BASE+0x0001c)
#define Csc_Ctr_Map5 (TOOLS_CSC_BASE+0x0001e)
#define Csc_Ctr_Map6 (TOOLS_CSC_BASE+0x00020)
#define Csc_Ctr_Map7 (TOOLS_CSC_BASE+0x00022)
#define Csc_Ctr_Map8 (TOOLS_CSC_BASE+0x00024)
#define Csc_Ctr_Map9 (TOOLS_CSC_BASE+0x00026)
#define Csc_Ctr_Map10 (TOOLS_CSC_BASE+0x00028)
#define Csc_Ctr_Map11 (TOOLS_CSC_BASE+0x0002a)
#define Csc_Ctr_Map12 (TOOLS_CSC_BASE+0x0002c)
#define Csc_Ctr_Map13 (TOOLS_CSC_BASE+0x0002e)
#define Csc_Ctr_Map14 (TOOLS_CSC_BASE+0x00030)
#define Csc_Ctr_Map15 (TOOLS_CSC_BASE+0x00032)
// Camera <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#define CAMERA_BASE 0xF8F00000
#define CAMERA_MASK 0xFFF00000
#define CAMERA_EXP_MODE (CAMERA_BASE+0x00000)
#define CAMERA_EXP_AUTO_LMT (CAMERA_BASE+0x00004)
#define CAMERA_DN_MODE (CAMERA_BASE+0x00008)
#define CAMERA_BLC (CAMERA_BASE+0x0000C)
#define CAMERA_SCENE_MODE (CAMERA_BASE+0x00010)
#define CAMERA_AE_TGT (CAMERA_BASE+0x00014)
#define CAMERA_DN_THR (CAMERA_BASE+0x00018)
#define CAMERA_DWDR_EN (CAMERA_BASE+0x0001C)
#define CAMERA_DWDR_STR (CAMERA_BASE+0x00020)
#define CAMERA_AE_SENSITIVITY (CAMERA_BASE+0x00024)
#define CAMERA_STYLE (CAMERA_BASE+0x00028)
#define CAMERA_AUTO_GAIN (CAMERA_BASE+0x0002C)
#define CAMERA_AUTO_GAIN_STR (CAMERA_BASE+0x00030)
#define CAMERA_ESHUTTER (CAMERA_BASE+0x00034)
#define CAMERA_IRCUT_MODE (CAMERA_BASE+0x00038)
#define CAMERA_NR_DAY (CAMERA_BASE+0x0003C)
#define CAMERA_NR_NIGHT (CAMERA_BASE+0x00040)
#define CAMERA_MIRROR (CAMERA_BASE+0x00044)
#define CAMERA_FLIP (CAMERA_BASE+0x00048)
#define CAMERA_DEFLICKER (CAMERA_BASE+0x0004C)
#define CAMERA_IRCUT_SWAP (CAMERA_BASE+0x00050)
// Webͼ<62><CDBC><EFBFBD><EFBFBD>ɫ<EFBFBD><C9AB><EFBFBD><EFBFBD>
#define CAMERA_LUM (CAMERA_BASE+0x00054)
#define CAMERA_CONTRAST (CAMERA_BASE+0x00058)
#define CAMERA_SATURATION (CAMERA_BASE+0x0005C)
#define CAMERA_HUE (CAMERA_BASE+0x00060)
#define CAMERA_SHARPEN (CAMERA_BASE+0x00064)
#define CAMERA_ATFALSECOL (CAMERA_BASE+0x00070)
#define CAMERA_SAWTOOTH (CAMERA_BASE+0x00074)
#define CAMERA_AE_SENSITIVITY2 (CAMERA_BASE+0x00080)
#define CAMERA_GAMMA (CAMERA_BASE+0x00084)
#define CAMERA_VSTD (CAMERA_BASE+0x00088)
#define CAMERA_FPS_NOW (CAMERA_BASE+0x0008C)
#define CAMERA_ESHUTTER_EX (CAMERA_BASE+0x00090)
#define CAMERA_BURST_BW (CAMERA_BASE+0x00094)
#define CAMERA_WB_RB (CAMERA_BASE+0x00098)
#define CAMERA_WB_GM (CAMERA_BASE+0x0009C)
#define CAMERA_VENC (CAMERA_BASE+0x000A0)
#define CAMERA_RESOLUTION (CAMERA_BASE+0x000A4)
#define CAMERA_XVI_EN (CAMERA_BASE+0x000F0)
#define CAMERA_DEBUG (CAMERA_BASE+0x000F1)
#define CAMERA_TT (CAMERA_BASE+0x000F2)
#define CAMERA_DN_STATUS (CAMERA_BASE+0x000F3)
#define CAMERA_PRINT_EN (CAMERA_BASE+0x000F4)
#define CAMERA_GET_PRODUCT (CAMERA_BASE+0x000F5)
#define CAMERA_KEY (CAMERA_BASE+0x000FF)
#define CAMERA_CONFIG_SAVE (CAMERA_BASE+0x00800)
#define CAMERA_CONFIG_DEFAULT (CAMERA_BASE+0x007FC)
// Static DPC
#define TOOL_SDPC_BASE (0xF8C00000)
#define SDPC_BP_THR_MIN (TOOL_SDPC_BASE+0x080)
#define SDPC_BP_THR_MAX (TOOL_SDPC_BASE+0x082)
#define SDPC_BP_THR (TOOL_SDPC_BASE+0x084)
// General Function I
#define TOOLS_FUN1_BASE 0xF8500100
#define FUN1_MASK 0xFFF00F00
#define FUN1_ALL (TOOLS_FUN1_BASE+0x00000)
#define FUN1_ATFALSECOLOR_EN (TOOLS_FUN1_BASE+0x00002)
#define FUN1_ATFALSECOLOR_STH (TOOLS_FUN1_BASE+0x00004)
#define FUN1_SLOWFRAME_STH (TOOLS_FUN1_BASE+0x00006)
#define FUN1_DEFLICKER_EN (TOOLS_FUN1_BASE+0x00008)
#define FUN1_DEFLICKER_FRE (TOOLS_FUN1_BASE+0x0000A)
#define FUN1_DEFLICKER_MODE (TOOLS_FUN1_BASE+0x0000C)
#define FUN1_WIDTH (TOOLS_FUN1_BASE+0x00010)
#define FUN1_HEIGHT (TOOLS_FUN1_BASE+0x00012)
#define FUN1_FPS (TOOLS_FUN1_BASE+0x00014)
// I2C Edit
#define TOOLS_I2C_BASE 0xF8500200
#define I2C_MASK 0xFFF00F00
#define I2C_ALL (TOOLS_I2C_BASE+0x00000)
#define I2C_DEVID (TOOLS_I2C_BASE+0x00002)
#define I2C_ADDR_BYTES (TOOLS_I2C_BASE+0x00004)
#define I2C_DATA_BYTES (TOOLS_I2C_BASE+0x00006)
// Extra Component
#define TOOLS_EXTRA_BASE 0xF8500300
#define TOOLS_EXTRA_MASK 0xFFF00F00
#define EXTRA_RAW_CAP (TOOLS_EXTRA_BASE+0x00000)
// Nr3D_V2
#define TOOLS_NR3DV2_BASE 0xF8600000
#define TOOLS_NR3DV2_MASK 0xFFF00000
#define NR3DV2_ALL (TOOLS_NR3DV2_BASE+0x00)
#define NR3DV2_OPTYPE (TOOLS_NR3DV2_BASE+0x02)
#define NR3DV2_ALGCHOICE (TOOLS_NR3DV2_BASE+0x04)
#define NR3DV2_M_MDTH (TOOLS_NR3DV2_BASE+0x06)
#define NR3DV2_M_TFS (TOOLS_NR3DV2_BASE+0x08)
#define NR3DV2_M_TFM (TOOLS_NR3DV2_BASE+0x0a)
#define NR3DV2_M_SFS (TOOLS_NR3DV2_BASE+0x0C)
#define NR3DV2_M_SFM (TOOLS_NR3DV2_BASE+0x0E)
#define NR3DV2_A_MDSTH0 (TOOLS_NR3DV2_BASE+0x010)
#define NR3DV2_A_MDSTH1 (TOOLS_NR3DV2_BASE+0x012)
#define NR3DV2_A_MDSTH2 (TOOLS_NR3DV2_BASE+0x014)
#define NR3DV2_A_MDSTH3 (TOOLS_NR3DV2_BASE+0x016)
#define NR3DV2_A_MDSTH4 (TOOLS_NR3DV2_BASE+0x018)
#define NR3DV2_A_MDSTH5 (TOOLS_NR3DV2_BASE+0x01a)
#define NR3DV2_A_MDSTH6 (TOOLS_NR3DV2_BASE+0x01c)
#define NR3DV2_A_MDSTH7 (TOOLS_NR3DV2_BASE+0x01E)
#define NR3DV2_A_MDSTH8 (TOOLS_NR3DV2_BASE+0x020)
#define NR3DV2_A_MDSTH9 (TOOLS_NR3DV2_BASE+0x022)
#define NR3DV2_A_MDSTH10 (TOOLS_NR3DV2_BASE+0x024)
#define NR3DV2_A_MDSTH11 (TOOLS_NR3DV2_BASE+0x026)
#define NR3DV2_A_MDSTH12 (TOOLS_NR3DV2_BASE+0x028)
#define NR3DV2_A_MDSTH13 (TOOLS_NR3DV2_BASE+0x02a)
#define NR3DV2_A_MDSTH14 (TOOLS_NR3DV2_BASE+0x02c)
#define NR3DV2_A_MDSTH15 (TOOLS_NR3DV2_BASE+0x02E)
#define NR3DV2_A_TFS0 (TOOLS_NR3DV2_BASE+0x030)
#define NR3DV2_A_TFS1 (TOOLS_NR3DV2_BASE+0x032)
#define NR3DV2_A_TFS2 (TOOLS_NR3DV2_BASE+0x034)
#define NR3DV2_A_TFS3 (TOOLS_NR3DV2_BASE+0x036)
#define NR3DV2_A_TFS4 (TOOLS_NR3DV2_BASE+0x038)
#define NR3DV2_A_TFS5 (TOOLS_NR3DV2_BASE+0x03a)
#define NR3DV2_A_TFS6 (TOOLS_NR3DV2_BASE+0x03c)
#define NR3DV2_A_TFS7 (TOOLS_NR3DV2_BASE+0x03E)
#define NR3DV2_A_TFS8 (TOOLS_NR3DV2_BASE+0x040)
#define NR3DV2_A_TFS9 (TOOLS_NR3DV2_BASE+0x042)
#define NR3DV2_A_TFS10 (TOOLS_NR3DV2_BASE+0x044)
#define NR3DV2_A_TFS11 (TOOLS_NR3DV2_BASE+0x046)
#define NR3DV2_A_TFS12 (TOOLS_NR3DV2_BASE+0x048)
#define NR3DV2_A_TFS13 (TOOLS_NR3DV2_BASE+0x04a)
#define NR3DV2_A_TFS14 (TOOLS_NR3DV2_BASE+0x04c)
#define NR3DV2_A_TFS15 (TOOLS_NR3DV2_BASE+0x04E)
#define NR3DV2_A_TFM0 (TOOLS_NR3DV2_BASE+0x050)
#define NR3DV2_A_TFM1 (TOOLS_NR3DV2_BASE+0x052)
#define NR3DV2_A_TFM2 (TOOLS_NR3DV2_BASE+0x054)
#define NR3DV2_A_TFM3 (TOOLS_NR3DV2_BASE+0x056)
#define NR3DV2_A_TFM4 (TOOLS_NR3DV2_BASE+0x058)
#define NR3DV2_A_TFM5 (TOOLS_NR3DV2_BASE+0x05a)
#define NR3DV2_A_TFM6 (TOOLS_NR3DV2_BASE+0x05c)
#define NR3DV2_A_TFM7 (TOOLS_NR3DV2_BASE+0x05E)
#define NR3DV2_A_TFM8 (TOOLS_NR3DV2_BASE+0x060)
#define NR3DV2_A_TFM9 (TOOLS_NR3DV2_BASE+0x062)
#define NR3DV2_A_TFM10 (TOOLS_NR3DV2_BASE+0x064)
#define NR3DV2_A_TFM11 (TOOLS_NR3DV2_BASE+0x066)
#define NR3DV2_A_TFM12 (TOOLS_NR3DV2_BASE+0x068)
#define NR3DV2_A_TFM13 (TOOLS_NR3DV2_BASE+0x06a)
#define NR3DV2_A_TFM14 (TOOLS_NR3DV2_BASE+0x06c)
#define NR3DV2_A_TFM15 (TOOLS_NR3DV2_BASE+0x06E)
#define NR3DV2_A_SFS0 (TOOLS_NR3DV2_BASE+0x070)
#define NR3DV2_A_SFS1 (TOOLS_NR3DV2_BASE+0x072)
#define NR3DV2_A_SFS2 (TOOLS_NR3DV2_BASE+0x074)
#define NR3DV2_A_SFS3 (TOOLS_NR3DV2_BASE+0x076)
#define NR3DV2_A_SFS4 (TOOLS_NR3DV2_BASE+0x078)
#define NR3DV2_A_SFS5 (TOOLS_NR3DV2_BASE+0x07a)
#define NR3DV2_A_SFS6 (TOOLS_NR3DV2_BASE+0x07c)
#define NR3DV2_A_SFS7 (TOOLS_NR3DV2_BASE+0x07E)
#define NR3DV2_A_SFS8 (TOOLS_NR3DV2_BASE+0x080)
#define NR3DV2_A_SFS9 (TOOLS_NR3DV2_BASE+0x082)
#define NR3DV2_A_SFS10 (TOOLS_NR3DV2_BASE+0x084)
#define NR3DV2_A_SFS11 (TOOLS_NR3DV2_BASE+0x086)
#define NR3DV2_A_SFS12 (TOOLS_NR3DV2_BASE+0x088)
#define NR3DV2_A_SFS13 (TOOLS_NR3DV2_BASE+0x08a)
#define NR3DV2_A_SFS14 (TOOLS_NR3DV2_BASE+0x08c)
#define NR3DV2_A_SFS15 (TOOLS_NR3DV2_BASE+0x08E)
#define NR3DV2_A_SFM0 (TOOLS_NR3DV2_BASE+0x090)
#define NR3DV2_A_SFM1 (TOOLS_NR3DV2_BASE+0x092)
#define NR3DV2_A_SFM2 (TOOLS_NR3DV2_BASE+0x094)
#define NR3DV2_A_SFM3 (TOOLS_NR3DV2_BASE+0x096)
#define NR3DV2_A_SFM4 (TOOLS_NR3DV2_BASE+0x098)
#define NR3DV2_A_SFM5 (TOOLS_NR3DV2_BASE+0x09a)
#define NR3DV2_A_SFM6 (TOOLS_NR3DV2_BASE+0x09c)
#define NR3DV2_A_SFM7 (TOOLS_NR3DV2_BASE+0x09E)
#define NR3DV2_A_SFM8 (TOOLS_NR3DV2_BASE+0x0a0)
#define NR3DV2_A_SFM9 (TOOLS_NR3DV2_BASE+0x0a2)
#define NR3DV2_A_SFM10 (TOOLS_NR3DV2_BASE+0x0a4)
#define NR3DV2_A_SFM11 (TOOLS_NR3DV2_BASE+0x0a6)
#define NR3DV2_A_SFM12 (TOOLS_NR3DV2_BASE+0x0a8)
#define NR3DV2_A_SFM13 (TOOLS_NR3DV2_BASE+0x0aa)
#define NR3DV2_A_SFM14 (TOOLS_NR3DV2_BASE+0x0ac)
#define NR3DV2_A_SFM15 (TOOLS_NR3DV2_BASE+0x0aE)
#endif