--[[
History:
  2019-10-10 - [Teng Huang] created file

Copyright (c) 2019 Ambarella International LP

This file and its contents ("Software") are protected by intellectual
property rights including, without limitation, U.S. and/or foreign
copyrights. This Software is also the confidential and proprietary
information of Ambarella International LP and its licensors. You may not use, reproduce,
disclose, distribute, modify, or otherwise prepare derivative works of this
Software or any portion thereof except pursuant to a signed license agreement
or nondisclosure agreement with Ambarella International LP or its authorized affiliates.
In the absence of such an agreement, you agree to promptly notify and return
this Software to Ambarella International LP

THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL AMBARELLA INTERNATIONAL LP OR ITS AFFILIATES BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; COMPUTER FAILURE OR MALFUNCTION; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

--]]


global = {
	version = 0xffff, --the version of config file(hex format)
	mod = 0x202009011, --the modified date(hex format)
	amage_server_enable = 1, --1:enable Amage server; 0:disable Amage server
	preload_enable = 0, --0:disable preload and save; 1:enable preload and save
}

channel_0 ={
	load_adj_data_mode = 0, --0:load default binary; 1:load customer aeb binary below
	adj_param_binary_file_name = "/usr/share/ambarella/idsp/adj_param.bin",
	load_aeb_data_mode = 0, --0:load default binary; 1:load customer aeb binary below
	aeb_param_binary_file_name = "/usr/share/ambarella/idsp/aeb_param.bin",
	load_awb_calibration_load_mode = 0, --0: don't load; 1:load default binary; 2:load customer binary below
	awb_calibration_low_ct_binary_file_name = "/usr/share/ambarella/idsp/cali/low_ct_awb.bin",
	awb_calibration_high_ct_binary_file_name = "/usr/share/ambarella/idsp/cali/high_ct_awb.bin",
	load_sbp_calibration_load_mode = 0, --0: don't load; 1:load default binary; 2:load customer binary below
	sbp_calibration_binary_file_name = "/usr/share/ambarella/idsp/cali/bad_pixel.bin",
	load_vignette_calibration_load_mode = 0, --0: don't load; 1:load default binary; 2:load customer binary below 
	vignette_calibration_binary_file_name = "/usr/share/ambarella/idsp/cali/lens_shading.bin",
	vignette_calibration_compensation_ratio = 0, --0~1024, unit is 1024
	load_ca_calibration_load_mode = 0, --0: don't load; 1:load default binary; 2:load customer binary below
	ca_calibration_binary_file_name = "/usr/share/ambarella/idsp/cali/ca.bin",

	ir_proc_day_night_switch_enable = 0, --0:don't run the day and night switch; 1:run the day and night switch
	ir_proc_shield_warning_enable = 0, --0:don't run the shield warning; 1:run the shield warning
	ir_led_ctrl_enable = 0, --0:don't control the ir led; 1:control the ir led
	day_to_night_threshold = 9500,
	night_to_day_threshold = 19000,
	ir_day_to_night_viscosity = 30,
	ir_night_to_day_viscosity = 25,
	light_intensity_base = 4000,
	light_intensity_strength = 50,

	use_amba_default_aaa_config = 0, --0:use 3A config in this lua; 1:bypass this lua and use default 3A config
	debug_log_level = 0, --ae=0x1, awb=0x2, af=0x4, parser=0x8, main=0x10, hdr=0x20

	image_adjustment_config = {
		adj_enable = 1, --0: disable ADJ; 1:enable ADJ
		rgb2yuv_style = "tv", --options: "tv", "pc", "custom"
		img_property = {
			brightness = 0, --unit=1, range:-255-+255
			saturation = 64, --unit=64, range:0-255
			hue = 0, --unit=1, range:-15-+15
			contrast_config = {
				mode = 0,--0:curve based; 1:auto
				strength = 64, --unit=64, range:0-128, 128 means the greatest contrast
			},
		},
		sharpen_property = {
			cfa_noise_level_ratio = 64, --unit=8, range:24-192, lower value mean sharper effect
			cfa_extent_regular_ratio = 64, --unit=64
			both_max_change_ratio = 16, --unit=2, range:0-48, higher value mean sharper effect
			sharpen_CoringidxScale_ratio = 64, --unit=32, higher value mean sharper effect
			sharpen_fractionalBits = 3, --unit=1, range:1-3, lower value mean sharper effect
			asf_alpha_max_ratio = 64, --unit=64
			asf_level_str_adj_str_ratio = 64, --unit=64
			asf_directional_decide_ratio = 64, --unit=64
			final_sharpen_fir_specify_ratio = 64, --unit=64
			final_sharpen_fir_str_dir_ratio = 64, --unit=64
			final_sharpen_fir_str_iso_ratio = 64, --unit=64
			final_sharpen_sacle_coring_ratio = 64, --unit=64
		},
		mctf_property = {
			mctf_alpha_ratio = 64, --unit=8, range:24-256, lower value mean more dramatic effect
			mctf_threshold_ratio = 64, --unit=16, range0-256, higher value mean more dramatic effect
			mctf_adv_iso_noise_level_ratio = 64, --unit=16, range0-256, higher value mean more dramatic effect
			mctf_temporal_max_change_ratio = 64, --unit=16, range0-256, higher value mean more dramatic effect
			motion_detect_noise_base_ratio = 64, --unit=16, range0-256, higher value mean more dramatic effect
		},
		contrast_enhancement_input_table_cntl = {
			mode = 1, --1:auto; 0:manual
			input_strength = 128, --unit 128 range:1-255
			input_table = {
				0,0,0,0,
			},
		},
		contrast_enhancement_output_table_cntl = {
			mode = 1, --1:auto; 0:manual
			output_strength = 128, --unit 128 range:1-255
			output_table = {
				0,0,0,
			},
		},
		contrast_enhancement_boost_table_cntl = {
			mode = 1, --1:auto; 0:manual
			boost_strength = {
				128,128,128,128,
			},
			boost_table = {
				0,0,
			},
		},
		contrast_enhancement_input_output_config ={
			ce_gamma = 4096, --unit=1, invalid for linear, for biuldin is 4096 and for 2xHDR is 4916
			ce_offset = 50, --unit=1, invalid for linear, for biuldin is 50 and for 2xHDR is 100
		},
		blackwhite_mode = 0, --0:diable, 1:enable
		sharpen_strength_level = 6, --default=6, range:0-11
		mctf_strength_level = 6, --default=6 , range:0-11
		whitebalance_ratio = {
			whitebalance_r_ratio = 128,
			whitebalance_b_ratio = 128,
		},
	},
	awb_config = {
		awb_enable = 1,
		awb_environment = "automatic", --options: "indoor", "incandescent", "d4000", "d5000", "sunny", "cloudy", "flash", "fluorescent", "fluorescent_h", "underwater", "custom", "outdoor", "automatic"
		awb_mode = "automatic", --options: "automatic", "incandescent", "d4000", "d5000", "sunny", "cloudy", "flash", fluorescent", "fluorescent_h", "underwater", "custom", "outdoor"
		awb_method = "normal", --options: "normal", "manual", "grey_world"
		awb_failure_remedy = "fail_do_nothing", --options: "fail_do_nothing", "const_gain",
		awb_speed = 128, --unit=1, rang:1-255, higher value mean higher AWB speed, default for linear is 128 while 160 for buildin and 2xHDR
		custom_gain = {
			r_gain = 0,
			g_gain = 0,
			b_gain = 0,
		},
		awb_calibration_infomation = {
			awb_calibration_thre_r = 500,
			awb_calibration_thre_b = 300,
			awb_calibration_shift_org_gain_0 = {
				r_gain = 1024,
				g_gain = 1024,
				b_gain = 1024,
			},
			awb_calibration_shift_org_gain_1 = {
				r_gain = 1024,
				g_gain = 1024,
				b_gain = 1024,
			},
			awb_calibration_shift_ref_gain_0 = {
				r_gain = 1024,
				g_gain = 1024,
				b_gain = 1024,
			},
			awb_calibration_shift_ref_gain_1 = {
				r_gain = 1024,
				g_gain = 1024,
				b_gain = 1024,
			},
		},
	},
	ae_config = {
		ae_enable = 1, --0: disable AE; 1:enable AE
		ae_speed_level = 5, --unit=1, range:0-8, 8 is the fastest, default for linear is 5 while 8 for biuldin and 2xHDR
		ae_auto_knee = 128, --range:0-255, default for linear and biuldin is 128 while 64 for 2xHDR
		ae_target_ratio = 1024, --unit=1024, range:256-4096, 256 is 25%, 512 is 50%, 2048 is 200%
		ae_meter_config = {
			mode = 1, -- 0: spot, 1: center, 2: average, 3: customer, load ae_metering_table
			meter_roi = { -- it will be loaded only when ae_metering_mode = 3
				1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
				1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
				1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
				1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
				1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
				1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
				1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
				1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
			},
		},

	},
}

channel_1 ={
	load_adj_data_mode = 0, --0:load default binary; 1:load customer aeb binary below
	adj_param_binary_file_name = "/usr/share/ambarella/idsp/adj_param.bin",
	load_aeb_data_mode = 0, --0:load default binary; 1:load customer aeb binary below
	aeb_param_binary_file_name = "/usr/share/ambarella/idsp/aeb_param.bin",
	load_awb_calibration_load_mode = 0, --0: don't load; 1:load default binary; 2:load customer binary below
	awb_calibration_low_ct_binary_file_name = "/usr/share/ambarella/idsp/cali/low_ct_awb.bin",
	awb_calibration_high_ct_binary_file_name = "/usr/share/ambarella/idsp/cali/high_ct_awb.bin",
	load_sbp_calibration_load_mode = 0, --0: don't load; 1:load default binary; 2:load customer binary below
	sbp_calibration_binary_file_name = "/usr/share/ambarella/idsp/cali/bad_pixel.bin",
	load_vignette_calibration_load_mode = 0, --0: don't load; 1:load default binary; 2:load customer binary below 
	vignette_calibration_binary_file_name = "/usr/share/ambarella/idsp/cali/lens_shading.bin",
	vignette_calibration_compensation_ratio = 0, --0~1024, unit is 1024
	load_ca_calibration_load_mode = 0, --0: don't load; 1:load default binary; 2:load customer binary below
	ca_calibration_binary_file_name = "/usr/share/ambarella/idsp/cali/ca.bin",

	ir_proc_day_night_switch_enable = 0, --0:don't run the day and night switch; 1:run the day and night switch
	ir_proc_shield_warning_enable = 0, --0:don't run the shield warning; 1:run the shield warning
	ir_led_ctrl_enable = 0, --0:don't control the ir led; 1:control the ir led
	day_to_night_threshold = 9500,
	night_to_day_threshold = 19000,
	ir_day_to_night_viscosity = 30,
	ir_night_to_day_viscosity = 25,
	light_intensity_base = 4000,
	light_intensity_strength = 50,

	use_amba_default_aaa_config = 0, --0:use 3A config in this lua; 1:bypass this lua and use default 3A config
	debug_log_level = 0, --ae=0x1, awb=0x2, af=0x4, parser=0x8, main=0x10, hdr=0x20

	image_adjustment_config = {
		adj_enable = 1, --0: disable ADJ; 1:enable ADJ
		rgb2yuv_style = "tv", --options: "tv", "pc", "custom"
		img_property = {
			brightness = 0, --unit=1, range:-255-+255
			saturation = 64, --unit=64, range:0-255
			hue = 0, --unit=1, range:-15-+15
			contrast_config = {
				mode = 0,--0:curve based; 1:auto
				strength = 64, --unit=64, range:0-128, 128 means the greatest contrast
			},
		},
		sharpen_property = {
			cfa_noise_level_ratio = 64, --unit=8, range:24-192, lower value mean sharper effect
			cfa_extent_regular_ratio = 64, --unit=64
			both_max_change_ratio = 16, --unit=2, range:0-48, higher value mean sharper effect
			sharpen_CoringidxScale_ratio = 64, --unit=32, higher value mean sharper effect
			sharpen_fractionalBits = 3, --unit=1, range:1-3, lower value mean sharper effect
			asf_alpha_max_ratio = 64, --unit=64
			asf_level_str_adj_str_ratio = 64, --unit=64
			asf_directional_decide_ratio = 64, --unit=64
			final_sharpen_fir_specify_ratio = 64, --unit=64
			final_sharpen_fir_str_dir_ratio = 64, --unit=64
			final_sharpen_fir_str_iso_ratio = 64, --unit=64
			final_sharpen_sacle_coring_ratio = 64, --unit=64
		},
		mctf_property = {
			mctf_alpha_ratio = 64, --unit=8, range:24-256, lower value mean more dramatic effect
			mctf_threshold_ratio = 64, --unit=16, range0-256, higher value mean more dramatic effect
			mctf_adv_iso_noise_level_ratio = 64, --unit=16, range0-256, higher value mean more dramatic effect
			mctf_temporal_max_change_ratio = 64, --unit=16, range0-256, higher value mean more dramatic effect
			motion_detect_noise_base_ratio = 64, --unit=16, range0-256, higher value mean more dramatic effect
		},
		contrast_enhancement_input_table_cntl = {
			mode = 1, --1:auto; 0:manual
			input_strength = 128, --unit 128 range:1-255
			input_table = {
				0,0,0,0,
			},
		},
		contrast_enhancement_output_table_cntl = {
			mode = 1, --1:auto; 0:manual
			output_strength = 128, --unit 128 range:1-255
			output_table = {
				0,0,0,
			},
		},
		contrast_enhancement_boost_table_cntl = {
			mode = 1, --1:auto; 0:manual
			boost_strength = {
				128,128,128,128,
			},
			boost_table = {
				0,0,
			},
		},
		contrast_enhancement_input_output_config ={
			ce_gamma = 4096, --unit=1, invalid for linear, for biuldin is 4096 and for 2xHDR is 4916
			ce_offset = 50, --unit=1, invalid for linear, for biuldin is 50 and for 2xHDR is 100
		},
		blackwhite_mode = 0, --0:diable, 1:enable
		sharpen_strength_level = 6, --default=6, range:0-11
		mctf_strength_level = 6, --default=6 , range:0-11
		whitebalance_ratio = {
			whitebalance_r_ratio = 128,
			whitebalance_b_ratio = 128,
		},
	},
	awb_config = {
		awb_enable = 1,
		awb_environment = "automatic", --options: "indoor", "incandescent", "d4000", "d5000", "sunny", "cloudy", "flash", "fluorescent", "fluorescent_h", "underwater", "custom", "outdoor", "automatic"
		awb_mode = "automatic", --options: "automatic", "incandescent", "d4000", "d5000", "sunny", "cloudy", "flash", fluorescent", "fluorescent_h", "underwater", "custom", "outdoor"
		awb_method = "normal", --options: "normal", "manual", "grey_world"
		awb_failure_remedy = "fail_do_nothing", --options: "fail_do_nothing", "const_gain",
		awb_speed = 128, --unit=1, rang:1-255, higher value mean higher AWB speed, default for linear is 128 while 160 for buildin and 2xHDR
		custom_gain = {
			r_gain = 0,
			g_gain = 0,
			b_gain = 0,
		},
		awb_calibration_infomation = {
			awb_calibration_thre_r = 500,
			awb_calibration_thre_b = 300,
			awb_calibration_shift_org_gain_0 = {
				r_gain = 1024,
				g_gain = 1024,
				b_gain = 1024,
			},
			awb_calibration_shift_org_gain_1 = {
				r_gain = 1024,
				g_gain = 1024,
				b_gain = 1024,
			},
			awb_calibration_shift_ref_gain_0 = {
				r_gain = 1024,
				g_gain = 1024,
				b_gain = 1024,
			},
			awb_calibration_shift_ref_gain_1 = {
				r_gain = 1024,
				g_gain = 1024,
				b_gain = 1024,
			},
		},
	},
	ae_config = {
		ae_enable = 1, --0: disable AE; 1:enable AE
		ae_speed_level = 5, --unit=1, range:0-8, 8 is the fastest, default for linear is 5 while 8 for biuldin and 2xHDR
		ae_auto_knee = 128, --range:0-255, default for linear and biuldin is 128 while 64 for 2xHDR
		ae_target_ratio = 1024, --unit=1024, range:256-4096, 256 is 25%, 512 is 50%, 2048 is 200%
		ae_meter_config = {
			mode = 1, -- 0: spot, 1: center, 2: average, 3: customer, load ae_metering_table
			meter_roi = { -- it will be loaded only when ae_metering_mode = 3
				1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
				1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
				1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
				1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
				1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
				1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
				1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
				1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
			},
		},

	},
}

channel_2 ={
	load_adj_data_mode = 0, --0:load default binary; 1:load customer aeb binary below
	adj_param_binary_file_name = "/usr/share/ambarella/idsp/adj_param.bin",
	load_aeb_data_mode = 0, --0:load default binary; 1:load customer aeb binary below
	aeb_param_binary_file_name = "/usr/share/ambarella/idsp/aeb_param.bin",
	load_awb_calibration_load_mode = 0, --0: don't load; 1:load default binary; 2:load customer binary below
	awb_calibration_low_ct_binary_file_name = "/usr/share/ambarella/idsp/cali/low_ct_awb.bin",
	awb_calibration_high_ct_binary_file_name = "/usr/share/ambarella/idsp/cali/high_ct_awb.bin",
	load_sbp_calibration_load_mode = 0, --0: don't load; 1:load default binary; 2:load customer binary below
	sbp_calibration_binary_file_name = "/usr/share/ambarella/idsp/cali/bad_pixel.bin",
	load_vignette_calibration_load_mode = 0, --0: don't load; 1:load default binary; 2:load customer binary below 
	vignette_calibration_binary_file_name = "/usr/share/ambarella/idsp/cali/lens_shading.bin",
	vignette_calibration_compensation_ratio = 0, --0~1024, unit is 1024
	load_ca_calibration_load_mode = 0, --0: don't load; 1:load default binary; 2:load customer binary below
	ca_calibration_binary_file_name = "/usr/share/ambarella/idsp/cali/ca.bin",

	ir_proc_day_night_switch_enable = 0, --0:don't run the day and night switch; 1:run the day and night switch
	ir_proc_shield_warning_enable = 0, --0:don't run the shield warning; 1:run the shield warning
	ir_led_ctrl_enable = 0, --0:don't control the ir led; 1:control the ir led
	day_to_night_threshold = 9500,
	night_to_day_threshold = 19000,
	ir_day_to_night_viscosity = 30,
	ir_night_to_day_viscosity = 25,
	light_intensity_base = 4000,
	light_intensity_strength = 50,

	use_amba_default_aaa_config = 0, --0:use 3A config in this lua; 1:bypass this lua and use default 3A config
	debug_log_level = 0, --ae=0x1, awb=0x2, af=0x4, parser=0x8, main=0x10, hdr=0x20

	image_adjustment_config = {
		adj_enable = 1, --0: disable ADJ; 1:enable ADJ
		rgb2yuv_style = "tv", --options: "tv", "pc", "custom"
		img_property = {
			brightness = 0, --unit=1, range:-255-+255
			saturation = 64, --unit=64, range:0-255
			hue = 0, --unit=1, range:-15-+15
			contrast_config = {
				mode = 0,--0:curve based; 1:auto
				strength = 64, --unit=64, range:0-128, 128 means the greatest contrast
			},
		},
		sharpen_property = {
			cfa_noise_level_ratio = 64, --unit=8, range:24-192, lower value mean sharper effect
			cfa_extent_regular_ratio = 64, --unit=64
			both_max_change_ratio = 16, --unit=2, range:0-48, higher value mean sharper effect
			sharpen_CoringidxScale_ratio = 64, --unit=32, higher value mean sharper effect
			sharpen_fractionalBits = 3, --unit=1, range:1-3, lower value mean sharper effect
			asf_alpha_max_ratio = 64, --unit=64
			asf_level_str_adj_str_ratio = 64, --unit=64
			asf_directional_decide_ratio = 64, --unit=64
			final_sharpen_fir_specify_ratio = 64, --unit=64
			final_sharpen_fir_str_dir_ratio = 64, --unit=64
			final_sharpen_fir_str_iso_ratio = 64, --unit=64
			final_sharpen_sacle_coring_ratio = 64, --unit=64
		},
		mctf_property = {
			mctf_alpha_ratio = 64, --unit=8, range:24-256, lower value mean more dramatic effect
			mctf_threshold_ratio = 64, --unit=16, range0-256, higher value mean more dramatic effect
			mctf_adv_iso_noise_level_ratio = 64, --unit=16, range0-256, higher value mean more dramatic effect
			mctf_temporal_max_change_ratio = 64, --unit=16, range0-256, higher value mean more dramatic effect
			motion_detect_noise_base_ratio = 64, --unit=16, range0-256, higher value mean more dramatic effect
		},
		contrast_enhancement_input_table_cntl = {
			mode = 1, --1:auto; 0:manual
			input_strength = 128, --unit 128 range:1-255
			input_table = {
				0,0,0,0,
			},
		},
		contrast_enhancement_output_table_cntl = {
			mode = 1, --1:auto; 0:manual
			output_strength = 128, --unit 128 range:1-255
			output_table = {
				0,0,0,
			},
		},
		contrast_enhancement_boost_table_cntl = {
			mode = 1, --1:auto; 0:manual
			boost_strength = {
				128,128,128,128,
			},
			boost_table = {
				0,0,
			},
		},
		contrast_enhancement_input_output_config ={
			ce_gamma = 4096, --unit=1, invalid for linear, for biuldin is 4096 and for 2xHDR is 4916
			ce_offset = 50, --unit=1, invalid for linear, for biuldin is 50 and for 2xHDR is 100
		},
		blackwhite_mode = 0, --0:diable, 1:enable
		sharpen_strength_level = 6, --default=6, range:0-11
		mctf_strength_level = 6, --default=6 , range:0-11
		whitebalance_ratio = {
			whitebalance_r_ratio = 128,
			whitebalance_b_ratio = 128,
		},
	},
	awb_config = {
		awb_enable = 1,
		awb_environment = "automatic", --options: "indoor", "incandescent", "d4000", "d5000", "sunny", "cloudy", "flash", "fluorescent", "fluorescent_h", "underwater", "custom", "outdoor", "automatic"
		awb_mode = "automatic", --options: "automatic", "incandescent", "d4000", "d5000", "sunny", "cloudy", "flash", fluorescent", "fluorescent_h", "underwater", "custom", "outdoor"
		awb_method = "normal", --options: "normal", "manual", "grey_world"
		awb_failure_remedy = "fail_do_nothing", --options: "fail_do_nothing", "const_gain",
		awb_speed = 128, --unit=1, rang:1-255, higher value mean higher AWB speed, default for linear is 128 while 160 for buildin and 2xHDR
		custom_gain = {
			r_gain = 0,
			g_gain = 0,
			b_gain = 0,
		},
		awb_calibration_infomation = {
			awb_calibration_thre_r = 500,
			awb_calibration_thre_b = 300,
			awb_calibration_shift_org_gain_0 = {
				r_gain = 1024,
				g_gain = 1024,
				b_gain = 1024,
			},
			awb_calibration_shift_org_gain_1 = {
				r_gain = 1024,
				g_gain = 1024,
				b_gain = 1024,
			},
			awb_calibration_shift_ref_gain_0 = {
				r_gain = 1024,
				g_gain = 1024,
				b_gain = 1024,
			},
			awb_calibration_shift_ref_gain_1 = {
				r_gain = 1024,
				g_gain = 1024,
				b_gain = 1024,
			},
		},
	},
	ae_config = {
		ae_enable = 1, --0: disable AE; 1:enable AE
		ae_speed_level = 5, --unit=1, range:0-8, 8 is the fastest, default for linear is 5 while 8 for biuldin and 2xHDR
		ae_auto_knee = 128, --range:0-255, default for linear and biuldin is 128 while 64 for 2xHDR
		ae_target_ratio = 1024, --unit=1024, range:256-4096, 256 is 25%, 512 is 50%, 2048 is 200%
		ae_meter_config = {
			mode = 1, -- 0: spot, 1: center, 2: average, 3: customer, load ae_metering_table
			meter_roi = { -- it will be loaded only when ae_metering_mode = 3
				1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
				1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
				1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
				1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
				1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
				1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
				1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
				1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
			},
		},

	},
}

channel_3 ={
	load_adj_data_mode = 0, --0:load default binary; 1:load customer aeb binary below
	adj_param_binary_file_name = "/usr/share/ambarella/idsp/adj_param.bin",
	load_aeb_data_mode = 0, --0:load default binary; 1:load customer aeb binary below
	aeb_param_binary_file_name = "/usr/share/ambarella/idsp/aeb_param.bin",
	load_awb_calibration_load_mode = 0, --0: don't load; 1:load default binary; 2:load customer binary below
	awb_calibration_low_ct_binary_file_name = "/usr/share/ambarella/idsp/cali/low_ct_awb.bin",
	awb_calibration_high_ct_binary_file_name = "/usr/share/ambarella/idsp/cali/high_ct_awb.bin",
	load_sbp_calibration_load_mode = 0, --0: don't load; 1:load default binary; 2:load customer binary below
	sbp_calibration_binary_file_name = "/usr/share/ambarella/idsp/cali/bad_pixel.bin",
	load_vignette_calibration_load_mode = 0, --0: don't load; 1:load default binary; 2:load customer binary below 
	vignette_calibration_binary_file_name = "/usr/share/ambarella/idsp/cali/lens_shading.bin",
	vignette_calibration_compensation_ratio = 0, --0~1024, unit is 1024
	load_ca_calibration_load_mode = 0, --0: don't load; 1:load default binary; 2:load customer binary below
	ca_calibration_binary_file_name = "/usr/share/ambarella/idsp/cali/ca.bin",

	ir_proc_day_night_switch_enable = 0, --0:don't run the day and night switch; 1:run the day and night switch
	ir_proc_shield_warning_enable = 0, --0:don't run the shield warning; 1:run the shield warning
	ir_led_ctrl_enable = 0, --0:don't control the ir led; 1:control the ir led
	day_to_night_threshold = 9500,
	night_to_day_threshold = 19000,
	ir_day_to_night_viscosity = 30,
	ir_night_to_day_viscosity = 25,
	light_intensity_base = 4000,
	light_intensity_strength = 50,

	use_amba_default_aaa_config = 0, --0:use 3A config in this lua; 1:bypass this lua and use default 3A config
	debug_log_level = 0, --ae=0x1, awb=0x2, af=0x4, parser=0x8, main=0x10, hdr=0x20

	image_adjustment_config = {
		adj_enable = 1, --0: disable ADJ; 1:enable ADJ
		rgb2yuv_style = "tv", --options: "tv", "pc", "custom"
		img_property = {
			brightness = 0, --unit=1, range:-255-+255
			saturation = 64, --unit=64, range:0-255
			hue = 0, --unit=1, range:-15-+15
			contrast_config = {
				mode = 0,--0:curve based; 1:auto
				strength = 64, --unit=64, range:0-128, 128 means the greatest contrast
			},
		},
		sharpen_property = {
			cfa_noise_level_ratio = 64, --unit=8, range:24-192, lower value mean sharper effect
			cfa_extent_regular_ratio = 64, --unit=64
			both_max_change_ratio = 16, --unit=2, range:0-48, higher value mean sharper effect
			sharpen_CoringidxScale_ratio = 64, --unit=32, higher value mean sharper effect
			sharpen_fractionalBits = 3, --unit=1, range:1-3, lower value mean sharper effect
			asf_alpha_max_ratio = 64, --unit=64
			asf_level_str_adj_str_ratio = 64, --unit=64
			asf_directional_decide_ratio = 64, --unit=64
			final_sharpen_fir_specify_ratio = 64, --unit=64
			final_sharpen_fir_str_dir_ratio = 64, --unit=64
			final_sharpen_fir_str_iso_ratio = 64, --unit=64
			final_sharpen_sacle_coring_ratio = 64, --unit=64
		},
		mctf_property = {
			mctf_alpha_ratio = 64, --unit=8, range:24-256, lower value mean more dramatic effect
			mctf_threshold_ratio = 64, --unit=16, range0-256, higher value mean more dramatic effect
			mctf_adv_iso_noise_level_ratio = 64, --unit=16, range0-256, higher value mean more dramatic effect
			mctf_temporal_max_change_ratio = 64, --unit=16, range0-256, higher value mean more dramatic effect
			motion_detect_noise_base_ratio = 64, --unit=16, range0-256, higher value mean more dramatic effect
		},
		contrast_enhancement_input_table_cntl = {
			mode = 1, --1:auto; 0:manual
			input_strength = 128, --unit 128 range:1-255
			input_table = {
				0,0,0,0,
			},
		},
		contrast_enhancement_output_table_cntl = {
			mode = 1, --1:auto; 0:manual
			output_strength = 128, --unit 128 range:1-255
			output_table = {
				0,0,0,
			},
		},
		contrast_enhancement_boost_table_cntl = {
			mode = 1, --1:auto; 0:manual
			boost_strength = {
				128,128,128,128,
			},
			boost_table = {
				0,0,
			},
		},
		contrast_enhancement_input_output_config ={
			ce_gamma = 4096, --unit=1, invalid for linear, for biuldin is 4096 and for 2xHDR is 4916
			ce_offset = 50, --unit=1, invalid for linear, for biuldin is 50 and for 2xHDR is 100
		},
		blackwhite_mode = 0, --0:diable, 1:enable
		sharpen_strength_level = 6, --default=6, range:0-11
		mctf_strength_level = 6, --default=6 , range:0-11
		whitebalance_ratio = {
			whitebalance_r_ratio = 128,
			whitebalance_b_ratio = 128,
		},
	},
	awb_config = {
		awb_enable = 1,
		awb_environment = "automatic", --options: "indoor", "incandescent", "d4000", "d5000", "sunny", "cloudy", "flash", "fluorescent", "fluorescent_h", "underwater", "custom", "outdoor", "automatic"
		awb_mode = "automatic", --options: "automatic", "incandescent", "d4000", "d5000", "sunny", "cloudy", "flash", fluorescent", "fluorescent_h", "underwater", "custom", "outdoor"
		awb_method = "normal", --options: "normal", "manual", "grey_world"
		awb_failure_remedy = "fail_do_nothing", --options: "fail_do_nothing", "const_gain",
		awb_speed = 128, --unit=1, rang:1-255, higher value mean higher AWB speed, default for linear is 128 while 160 for buildin and 2xHDR
		custom_gain = {
			r_gain = 0,
			g_gain = 0,
			b_gain = 0,
		},
		awb_calibration_infomation = {
			awb_calibration_thre_r = 500,
			awb_calibration_thre_b = 300,
			awb_calibration_shift_org_gain_0 = {
				r_gain = 1024,
				g_gain = 1024,
				b_gain = 1024,
			},
			awb_calibration_shift_org_gain_1 = {
				r_gain = 1024,
				g_gain = 1024,
				b_gain = 1024,
			},
			awb_calibration_shift_ref_gain_0 = {
				r_gain = 1024,
				g_gain = 1024,
				b_gain = 1024,
			},
			awb_calibration_shift_ref_gain_1 = {
				r_gain = 1024,
				g_gain = 1024,
				b_gain = 1024,
			},
		},
	},
	ae_config = {
		ae_enable = 1, --0: disable AE; 1:enable AE
		ae_speed_level = 5, --unit=1, range:0-8, 8 is the fastest, default for linear is 5 while 8 for biuldin and 2xHDR
		ae_auto_knee = 128, --range:0-255, default for linear and biuldin is 128 while 64 for 2xHDR
		ae_target_ratio = 1024, --unit=1024, range:256-4096, 256 is 25%, 512 is 50%, 2048 is 200%
		ae_meter_config = {
			mode = 1, -- 0: spot, 1: center, 2: average, 3: customer, load ae_metering_table
			meter_roi = { -- it will be loaded only when ae_metering_mode = 3
				1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
				1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
				1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
				1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
				1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
				1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
				1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
				1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
			},
		},

	},
}

