/* Copyright Statement:
*
* This software/firmware and related documentation ("MediaTek Software") are
* protected under relevant copyright laws. The information contained herein
* is confidential and proprietary to MediaTek Inc. and/or its licensors.
* Without the prior written permission of MediaTek inc. and/or its licensors,
* any reproduction, modification, use or disclosure of MediaTek Software,
* and information contained herein, in whole or in part, shall be strictly prohibited.
*/
/* MediaTek Inc. (C) 2019. All rights reserved.
*
* BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
* RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER ON
* AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
* NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
* SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
* SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH
* THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES
* THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES
* CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK
* SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
* STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND
* CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
* AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
* OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO
* MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
*
* The following software/firmware and/or related documentation ("MediaTek Software")
* have been modified by MediaTek Inc. All revisions are subject to any receiver's
* applicable license agreements with MediaTek Inc.
*/
/********************************************************************************************
* LEGAL DISCLAIMER
*
* (Header of MediaTek Software/Firmware Release or Documentation)
*
* BY OPENING OR USING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") RECEIVED
* FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON AN "AS-IS" BASIS
* ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR
* A PARTICULAR PURPOSE OR NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY
* WHATSOEVER WITH RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY,
* INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK
* ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
* NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S SPECIFICATION
* OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
*
* BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE LIABILITY WITH
* RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, AT MEDIATEK'S OPTION,
* TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE
* FEES OR SERVICE CHARGE PAID BY BUYER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
*
* THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE WITH THE LAWS
* OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF LAWS PRINCIPLES.
************************************************************************************************/
#include "camera_custom_nvram.h"
#include "camera_custom_isp_nvram.h"
#include "inc.h"
#define COLOR_PARAM_BASE COLOR_PARAM_COLOR_BASE
#define COLOR_BASE COLOR_COLOR_BASE
const ISP_NVRAM_COLOR_PARAM_T COLOR_PARAM_BASE[1] = {
// IDX_0
{
0, //DC OFFSET
4, //LUM SPEED
4, //HUE SPEED
4, //SAT SPEED
30, //LSP LV TH
0, //OUTDOOR EN
4, //OUTDOOR SPEED
16 //OUTDOOR RATIO
},
};
const ISP_NVRAM_SCOLOR_PARAM_T COLOR_BASE[60] = {
// IDX_0
{
.FD_COLOR = {
0,//FD_CM_EN
0,//Priority
0,//Range_W1_Y
0,//Range_W1_S
0,//Range_W1_H
0,//Offset_W1_Y
0,//Offset_W1_S
0,//Offset_W1_H
0,//Range_W2_Y
0,//Range_W2_S
0,//Range_W2_H
0,//Offset_W2_Y
0,//Offset_W2_S
0,//Offset_W2_H
0,//Range_W3_Y
0,//Range_W3_S
0,//Range_W3_H
0,//Offset_W3_Y
0,//Offset_W3_S
0,//Offset_W3_H
0,//Backup_0
0,//Backup_1
0,//Backup_2
0,//Backup_3
0,//Backup_4
0,//Backup_5
0,//Backup_6
0,//Backup_7
0,//Backup_8
0,//Backup_9
0,//Backup_10
0,//Backup_11
0,//Backup_12
0,//Backup_13
0,//Backup_14
0,//Backup_15
0,//Backup_16
0,//Backup_17
0,//Backup_18
0,//Backup_19
0,//Backup_20
0,//Backup_21
0,//Backup_22
0 //Backup_23
},
.COLOR_TBL = {
.cfg_main ={.bits ={.COLOR_c2p_bypass=0, .COLOR_p2c_bypass=0, .COLOR_yeng_bypass=0, .COLOR_seng_bypass=0, .COLOR_heng_bypass=0, .rsv_5=0, .COLOR_all_bypass=0, .COLOR_wide_gamut_en=0, .rsv_9=0, .COLOR_seq_sel=0, .rsv_14=0, .COLOR_s_g_y_en=1, .COLOR_c_pp_cm_dbg_sel=0, .COLOR_lsp_en=1, .COLOR_lsp_sat_limit=1, .COLOR_lsp_ink_en=0, .COLOR_lsp_sat_src=1, .rsv_24=0}},
.c_boost_main={.bits ={.COLOR_c_boost_gain=128, .rsv_8=0, .COLOR_c_new_boost_en=0, .rsv_14=0, .COLOR_c_new_boost_lmt_l=64, .COLOR_c_new_boost_lmt_u=255}},
.c_boost_main_2={.bits ={.COLOR_color_cboost_yoffset=0, .rsv_8=0, .COLOR_color_cboost_yoffset_sel=0, .rsv_18=0, .COLOR_color_cboost_yconst=128}},
.luma_adj ={.bits ={.COLOR_y_level_adj=64, .rsv_7=0, .COLOR_y_slope_lmt=255, .rsv_16=0}},
.g_pic_adj_main_1={.bits ={.COLOR_g_contrast=128, .rsv_10=0, .COLOR_g_brightness=1024, .rsv_27=0}},
.g_pic_adj_main_2={.bits ={.COLOR_g_saturation=128, .rsv_10=0}},
.y_slope_1_0_main={.bits ={.COLOR_y_slope_0=128, .rsv_8=0, .COLOR_y_slope_1=128, .rsv_24=0}},
.y_slope_3_2_main={.bits ={.COLOR_y_slope_2=128, .rsv_8=0, .COLOR_y_slope_3=128, .rsv_24=0}},
.y_slope_5_4_main={.bits ={.COLOR_y_slope_4=128, .rsv_8=0, .COLOR_y_slope_5=128, .rsv_24=0}},
.y_slope_7_6_main={.bits ={.COLOR_y_slope_6=128, .rsv_8=0, .COLOR_y_slope_7=128, .rsv_24=0}},
.y_slope_9_8_main={.bits ={.COLOR_y_slope_8=128, .rsv_8=0, .COLOR_y_slope_9=128, .rsv_24=0}},
.y_slope_11_10_main={.bits ={.COLOR_y_slope_10=128, .rsv_8=0, .COLOR_y_slope_11=128, .rsv_24=0}},
.y_slope_13_12_main={.bits ={.COLOR_y_slope_12=128, .rsv_8=0, .COLOR_y_slope_13=128, .rsv_24=0}},
.y_slope_15_14_main={.bits ={.COLOR_y_slope_14=128, .rsv_8=0, .COLOR_y_slope_15=128, .rsv_24=0}},
.local_hue_cd_0={.bits ={.COLOR_hue_to_hue_0=128, .COLOR_hue_to_hue_1=128, .COLOR_hue_to_hue_2=128, .COLOR_hue_to_hue_3=128}},
.local_hue_cd_1={.bits ={.COLOR_hue_to_hue_4=128, .COLOR_hue_to_hue_5=128, .COLOR_