From 499f25411549d345c427bd4794b9636b3631015f Mon Sep 17 00:00:00 2001 From: alex-guo Date: Wed, 20 Jul 2022 17:47:45 +0800 Subject: [PATCH] add IMX385 config file and update IMX385 ae calc accuracy --- package/encode_app/encode_app.mk | 2 + package/encode_app/src/imx385_0.conf | 531 ++++++++++++++++++ .../src/imx385_video_1920x1080.conf | 322 +++++++++++ package/mediactl_lib/src/config/imx385_0.conf | 531 ++++++++++++++++++ .../src/config/imx385_video_1920x1080.conf | 322 +++++++++++ .../0018-update-imx385-ae-calc-accuracy.patch | 124 ++++ 6 files changed, 1832 insertions(+) create mode 100644 package/encode_app/src/imx385_0.conf create mode 100644 package/encode_app/src/imx385_video_1920x1080.conf create mode 100644 package/mediactl_lib/src/config/imx385_0.conf create mode 100644 package/mediactl_lib/src/config/imx385_video_1920x1080.conf create mode 100644 package/patches/linux/0018-update-imx385-ae-calc-accuracy.patch diff --git a/package/encode_app/encode_app.mk b/package/encode_app/encode_app.mk index fa8ce93..fc97f56 100644 --- a/package/encode_app/encode_app.mk +++ b/package/encode_app/encode_app.mk @@ -25,6 +25,8 @@ define ENCODE_APP_INSTALL_TARGET_CMDS $(INSTALL) -D -m 0755 $(@D)/imx219_0.conf $(TARGET_DIR)/app/encode_app/imx219_0.conf $(INSTALL) -D -m 0755 $(@D)/imx219_1.conf $(TARGET_DIR)/app/encode_app/imx219_1.conf $(INSTALL) -D -m 0755 $(@D)/roi_1920x1080.conf $(TARGET_DIR)/app/encode_app/roi_1920x1080.conf + $(INSTALL) -D -m 0755 $(@D)/imx385_0.conf $(TARGET_DIR)/app/encode_app/imx385_0.conf + $(INSTALL) -D -m 0755 $(@D)/imx385_video_1920x1080.conf $(TARGET_DIR)/app/encode_app/imx385_video_1920x1080.conf endef $(eval $(generic-package)) diff --git a/package/encode_app/src/imx385_0.conf b/package/encode_app/src/imx385_0.conf new file mode 100644 index 0000000..348dd2a --- /dev/null +++ b/package/encode_app/src/imx385_0.conf @@ -0,0 +1,531 @@ +{ + "isp_general":{ + "isp_out_sel":0, + "dvp_ch_mode":1, + "hist_3a_out_en":0, + "main_out":{ + "out_img_format":1, + "out_yuv_in_format":0, + "out_yuv422_pxl_order":0, + "out_pxl_width":0, + "out_frame_buf_size":2048 + }, + "out0":{ + "ds0_out_img_format":1, + "ds0_out_yuv_in_format":0, + "ds0_out_yuv422_pxl_order":0, + "ds0_out_pxl_width":0, + "ds0_frame_buf_size":2048 + }, + "out1":{ + "ds1_out_img_format":1, + "ds1_out_yuv_in_format":0, + "ds1_out_yuv422_pxl_order":0, + "ds1_out_pxl_width":0, + "ds1_frame_buf_size":2048 + }, + "out2":{ + "ds2_out_img_format":0, + "ds2_out_yuv_in_format":0, + "ds2_out_yuv422_pxl_order":0, + "ds2_out_pxl_width":0, + "ds2_frame_buf_size":2048 + }, + "wdr":{ + "wdr_mode":0, + "wdr_long_ch_mode":0, + "wdr_long_l2_buf_en":0, + "wdr_short_s1_buf_en":0, + "wdr_dynamic_switch_en":0, + "wdr_long_l2_buf_depth":0, + "wdr_long_img_format":0, + "wdr_long_yuv_in_format":0, + "wdr_long_img_out_format":0, + "wdr_long_yuv422_pxl_order":0, + "wdr_long_pixel_width":2, + "wdr_buf_base":0, + "wdr_line_stride":0, + "wdr_frame_buf_size":0 + }, + "nr3d":{ + "nr3d_en":0, + "nr3d_fbcd_en":0, + "nr3d_mv_out_en":0, + "nr3d_y_img_format":0, + "nr3d_y_yuv_in_format":0, + "nr3d_y_img_out_format":0, + "nr3d_y_yuv422_pxl_order":0, + "nr3d_y_pixel_width":2, + "nr3d_uv_img_format":0, + "nr3d_uv_yuv_in_format":0, + "nr3d_uv_mig_out_format":0, + "nr3d_uv_yuv422_pxl_order":0, + "nr3d_uv_pixel_width":2, + "nr3d_frame_buf_size":0 + }, + "ldc":{ + "ldc_line_stride":2048, + "ldc_frame_buf_size":2048 + } + }, + "isp_core": { + "itc": { + "hsync_pol":0, + "vsync_pol":0, + "hsync_input_timing":2, + "vsync_input_timing":1, + "flip_ctl" :0, + "video_fmt_sl":0, + "itc_ttl_h" :2199, + "itc_ttl_v" :1124, + "itc_stt_hr" :0, + "itc_stt_vr" :1 + }, + "tpg": { + "tpg_en":0, + "bayer_mode_sel":3, + "motion_mode_sel":0, + "tpg_sel":9, + "wdr_l_mul_data":0, + "wdr_m_mul_data":0, + "wdr_s_mul_data":0 + }, + "blc":{ + "blc_en" :1, + "blc_offset" :224, + "blc_ratio" :271 + }, + "lsc":{ + "lsc_en" :1, + "lsc_h_center" :900, + "lsc_v_center" :580, + "lsc_r_ratio" :4, + "lsc_g_ratio":4, + "lsc_b_ratio" :4, + "lsc_ir_ratio" :4 + }, + "ae":{ + "ae_as_en" :1, + "ae_ag_en" :1, + "ae_airis_en" :0, + "ae_enter_ls_sel" :0, + "ae_exit_ls_sel" :1, + "ae_win_mode_sel" :0, + "ae_back_light_mode_sel" :0, + "ae_day_change_en" :0, + "ae_day_change_sel" :0, + "ae_win_stth" :0, + "ae_win_sttv" :0, + "ae_win_endh" :1919, + "ae_win_endv" :1079, + "ae_yobj" :100, + "ae_av_rg" :14, + "ae_l_ex_time" :168, + "ae_m_ex_time" :32, + "ae_s_ex_time" :32, + "ae_agc" :256, + "ae_ad_shuttle_freq" :2, + "ae_ad_gain_freq" :0, + "ae_adjust_step_max":36, + "ae_ex_value_max" :168, + "ae_ex_value_mid" :100, + "ae_ex_value_min" :1, + "ae_gain_value_max" :768, + "ae_gain_value_mid" :512, + "ae_gain_value_min" :256, + "ae_dn_switch_ad_step_max" :512, + "ae_dn_switch_wait_time" :255, + "ape_max_diff" :12, + "ape_drv_signal_max" :3840, + "ape_coeff_distance" :0, + "ape_coeff_speed" :0, + "ape_coeff_acceleration" :0, + "ape_drv_manual_value" :4095, + "ape_damp_manual_value" :2048 + }, + "awb":{ + "awb_d65_en" :1, + "awb_ccm_en" :1, + "awb_en" :1, + "awb_mode_sel" :1, + "awb_hist_mode_sel" :0, + "awb_veri_en" :0, + "awb_fb_en" :0, + "awb_value_save_en" :0, + "awb_ccm_adp_adjust_en" :0, + "awb_stab_en" :1, + "awb_d65_red_gain" :508, + "awb_d65_blue_gain" :423, + "ccm_rr" :256, + "ccm_rg" :0, + "ccm_rb" :0, + "ccm_gr" :83, + "ccm_gg" :361, + "ccm_gb" :22, + "ccm_br" :0, + "ccm_bg" :44, + "ccm_bb" :300, + "ccm_correct_coff" :256, + "awb_win_stth" :0, + "awb_win_sttv" :0, + "awb_win_endh" :1919, + "awb_win_endv" :1079, + "awb_correct_diff_th" :8, + "awb_color_changeres_time" :8, + "awb_historgram_th" :4, + "awb_red_gain_adjust" :256, + "awb_green_gain_adjust" :256, + "awb_blue_gain_adjust" :256, + "awb_red_max_value" :252, + "awb_blue_max_value" :423, + "awb_red_min_value" :174, + "awb_blue_min_value" :265, + "awb_red_obj_value" :256, + "awb_blue_obj_value" :256 + }, + "wdr":{ + "wdr_fusion_en" :0, + "wdr_frame_sel" :0, + "wdr_adp_adjust_en" :0, + "wdr_stab_en" :0, + "wdr_en" :0, + "wdr_ghost_remove_en" :0, + "wdr_3frame_out_mode" :0, + "wdr_mode_sel" :0, + "wdr_2frame_ex_ratio" :1, + "wdr_3frame_ex_ratio" :1, + "wdr_stat_img_sel" :1, + "wdr_ltm_data_sel" :1, + "wdr_tz_data_sel" :1, + "wdr_remove_purple_en" :0, + "wdr_over_ex_ratio_th1" :384, + "wdr_over_ex_ratio_th2" :32, + "wdr_fusion_ratio_th" :192, + "wdr_fusion_value1" :64, + "wdr_fusion_value2" :16 + }, + "csc":{ + "rgb2yuv_00":153, + "rgb2yuv_01":256, + "rgb2yuv_02":86, + "rgb2yuv_10":301, + "rgb2yuv_11":214, + "rgb2yuv_12":170, + "rgb2yuv_20":58, + "rgb2yuv_21":42, + "rgb2yuv_22":256 + }, + "ada":{ + "gm_rgb_en" :1, + "gm_yuv_en" :0, + "ada_en" :0, + "ada_sbz_en" :0, + "ada_ccr_en" :0, + "ada_adp_en" :0, + "ada_adp_ccr_en" :0, + "ada_stat_mode_sel" :0, + "ada_enh_mode_sel" :0, + "ada_hist_max" :128, + "ada_ttl_max" :152, + "ada_win_stth" :0, + "ada_win_sttv" :0, + "ada_win_endh" :1919, + "ada_win_endv" :1079 + }, + "rgb-ir":{ + "raw_fmt" :0, + "rgbir_rct_en" :0, + "dfc_en" :0, + "rgbir_fs_en" :0, + "rgbir_ot_sl" :0, + "rgbir_fs_max" :256, + "dfc_krb" :0, + "dfc_ky" :0, + "dfc_th" :256, + "dfc_th_1" :256 + }, + "2dnr":{ + "dpeak_en" :1, + "nr2d_raw_en" :1, + "nr2d_eg_en" :1, + "nr2d_jl_en" :1, + "nr2d_av_en" :1, + "nr2d_c_en" :1, + "dpeak_adp_en" :0, + "nr2d_raw_adp_en":0, + "nr2d_y_adp_en" :0, + "nr2d_c_adp_en" :1, + "nr2d_raw_kl" :16, + "nr2d_jl_th" :128, + "nr2d_eg_k" :32, + "nr2d_y_k" :32, + "nr2d_c_k" :1 + }, + "3dnr":{ + "nr3d_en" :1, + "nr3dp_y_en" :1, + "nr3dp_c_en" :1, + "nr3dm_y_en" :1, + "nr3dm_c_en" :1, + "nr3db_y_en" :1, + "nr3db_c_en" :1, + "nr3dm_nr2d_y_en" :1, + "nr3dm_nr2d_c_en" :1, + "core_3dnr_wb_en" :0, + "core_3dnr_wb_sel" :0, + "core_3dnr_adp_luma_en" :0, + "core_3dnr_adp_chroma_en" :0, + "nr3dp_thy" :255, + "nr3dp_thyp" :255, + "nr3dp_thcp" :32, + "nr3dm_mid_th" :128, + "nr3dm_mtp_th" :8, + "nr3dm_mtc_th" :128, + "nr3dm_ym_k" :8, + "nr3dm_thy" :64, + "nr3dm_min" :0, + "nr3dm_thw0" :128, + "core_3dnr_chroma_intensity" :16, + "nr3db_nr2d_eg_th" :64, + "nr3db_thyp" :64, + "nr3db_thcp" :32 + }, + "enh":{ + "ltm":{ + "enh_ltm_en" :1, + "enh_adp_ltm_en" :0, + "ltm_gain" :128, + "ltm_mm_th" :128 + }, + "sharp":{ + "enh_sharp_en" :1, + "enh_adp_sharp_en" :0, + "shp_core" :4, + "shp_th1" :3840, + "shp_th2" :4095, + "shp_gain" :160 + }, + "cc":{ + "enh_cc_en" :0, + "enh_adp_cc_en" :0 + } + }, + "post_ctl":{ + "otc_ctl":{ + "otc_en" :0, + "otc_yc_sl" :0, + "otc_uv_sl" :1, + "otc_hs_plt_sl" :0, + "otc_vs_plt_sl" :0, + "otc_stt_vr" :0, + "otc_stt_hr" :0 + }, + "ctrst":{ + "ctrst_en" :1, + "ctrst_gain":128 + }, + "luma":{ + "luma_en" :1, + "luma_gain":128 + }, + "strt":{ + "strt_en" :1, + "strt_gain":220 + } + }, + "ldc":{ + "ldc_en" :0, + "ldc_rct_en" :0, + "ldc_rq_frq" :128, + "ldc_stt_ln" :540, + "ldc_ch" :960, + "ldc_cv" :540, + "ldc_cr" :684, + "ldc_cz" :684 + }, + "af":{ + "af_stat_en" :1, + "af_stat_mode_sel" :0, + "af_stat_win_h_start":0, + "af_stat_win_v_start":0, + "af_stat_win_h_end" :1919, + "af_stat_win_v_end" :1079 + } + }, + "isp_post":{ + "rgb2yuv":{ + "osd_rgb2yuv_coeff00":306, + "osd_rgb2yuv_coeff01":601, + "osd_rgb2yuv_coeff02":117, + "osd_rgb2yuv_coeff03":0, + "osd_rgb2yuv_coeff10":3920, + "osd_rgb2yuv_coeff11":3749, + "osd_rgb2yuv_coeff12":523, + "osd_rgb2yuv_coeff13":128, + "osd_rgb2yuv_coeff20":523, + "osd_rgb2yuv_coeff21":3658, + "osd_rgb2yuv_coeff22":4011, + "osd_rgb2yuv_coeff23":128 + }, + "yuv2rgb":{ + "out_yuv2rgb_coeff00":1024, + "out_yuv2rgb_coeff01":0, + "out_yuv2rgb_coeff02":1441, + "out_yuv2rgb_coeff03":3916, + "out_yuv2rgb_coeff10":1024, + "out_yuv2rgb_coeff11":3742, + "out_yuv2rgb_coeff12":3362, + "out_yuv2rgb_coeff13":136, + "out_yuv2rgb_coeff20":1024, + "out_yuv2rgb_coeff21":1822, + "out_yuv2rgb_coeff22":0, + "out_yuv2rgb_coeff23":3868 + }, + "ds0":{ + "ds0_out_rgb_mode":0, + "ds0_out_rgb_en":0, + "ds0_out_yuv_mode":0, + "ds0_out_uv_swap":0, + "ds0_osd0":{ + "ds0_osd0_enable":0, + "ds0_osd0_type":0, + "ds0_osd0_alpha_tpye":0, + "ds0_osd0_vst":0, + "ds0_osd0_hst":0, + "ds0_osd0_vend":0, + "ds0_osd0_hend":0, + "ds0_osd0_dma_request_length":0, + "ds0_osd0_dma_map":0, + "ds0_osd0_rgb_rev":0, + "ds0_osd0_global_alpha":0, + "ds0_osd0_swap_64":0, + "ds0_osd0_outstanding_num":0, + "ds0_osd0_bd_limit_en":0 + }, + "ds0_osd1":{ + "ds0_osd1_enable":0, + "ds0_osd1_type":0, + "ds0_osd1_alpha_tpye":0, + "ds0_osd1_vst":0, + "ds0_osd1_hst":0, + "ds0_osd1_vend":0, + "ds0_osd1_hend":0, + "ds0_osd1_dma_request_length":0, + "ds0_osd1_dma_map":0, + "ds0_osd1_rgb_rev":0, + "ds0_osd1_global_alpha":0, + "ds0_osd1_swap_64":0, + "ds0_osd1_outstanding_num":0, + "ds0_osd1_bd_limit_en":0 + }, + "ds0_osd2":{ + "ds0_osd2_enable":0, + "ds0_osd2_type":0, + "ds0_osd2_alpha_tpye":0, + "ds0_osd2_vst":0, + "ds0_osd2_hst":0, + "ds0_osd2_vend":0, + "ds0_osd2_hend":0, + "ds0_osd2_dma_request_length":0, + "ds0_osd2_dma_map":0, + "ds0_osd2_rgb_rev":0, + "ds0_osd2_global_alpha":0, + "ds0_osd2_swap_64":0, + "ds0_osd2_outstanding_num":0, + "ds0_osd2_bd_limit_en":0 + } + }, + "ds1":{ + "ds1_out_rgb_mode":0, + "ds1_out_rgb_en":0, + "ds1_out_yuv_mode":0, + "ds1_out_uv_swap":0, + "ds1_osd0":{ + "ds1_osd0_enable":0, + "ds1_osd0_type":0, + "ds1_osd0_alpha_tpye":0, + "ds1_osd0_vst":0, + "ds1_osd0_hst":0, + "ds1_osd0_vend":0, + "ds1_osd0_hend":0, + "ds1_osd0_dma_request_length":0, + "ds1_osd0_dma_map":0, + "ds1_osd0_rgb_rev":0, + "ds1_osd0_global_alpha":0, + "ds1_osd0_swap_64":0, + "ds1_osd0_outstanding_num":0, + "ds1_osd0_bd_limit_en":0 + }, + "ds1_osd1":{ + "ds1_osd1_enable":0, + "ds1_osd1_type":0, + "ds1_osd1_alpha_tpye":0, + "ds1_osd1_vst":0, + "ds1_osd1_hst":0, + "ds1_osd1_vend":0, + "ds1_osd1_hend":0, + "ds1_osd1_dma_request_length":0, + "ds1_osd1_dma_map":0, + "ds1_osd1_rgb_rev":0, + "ds1_osd1_global_alpha":0, + "ds1_osd1_swap_64":0, + "ds1_osd1_outstanding_num":0, + "ds1_osd1_bd_limit_en":0 + }, + "ds1_osd2":{ + "ds1_osd2_enable":0, + "ds1_osd2_type":0, + "ds1_osd2_alpha_tpye":0, + "ds1_osd2_vst":0, + "ds1_osd2_hst":0, + "ds1_osd2_vend":0, + "ds1_osd2_hend":0, + "ds1_osd2_dma_request_length":0, + "ds1_osd2_dma_map":0, + "ds1_osd2_rgb_rev":0, + "ds1_osd2_global_alpha":0, + "ds1_osd2_swap_64":0, + "ds1_osd2_outstanding_num":0, + "ds1_osd2_bd_limit_en":0 + } + }, + "ds2":{ + "ds2_out_rgb_mode":0, + "ds2_out_rgb_en":1, + "ds2_out_yuv_mode":0, + "ds2_out_uv_swap":0, + "ds2_osd0":{ + "ds2_osd0_enable":0, + "ds2_osd0_type":0, + "ds2_osd0_alpha_tpye":0, + "ds2_osd0_vst":0, + "ds2_osd0_hst":0, + "ds2_osd0_vend":0, + "ds2_osd0_hend":0, + "ds2_osd0_dma_request_length":0, + "ds2_osd0_dma_map":0, + "ds2_osd0_rgb_rev":0, + "ds2_osd0_global_alpha":0, + "ds2_osd0_swap_64":0, + "ds2_osd0_outstanding_num":0, + "ds2_osd0_bd_limit_en":0 + }, + "ds2_osd1":{ + "ds2_osd1_enable":0, + "ds2_osd1_type":0, + "ds2_osd1_alpha_tpye":0, + "ds2_osd1_vst":0, + "ds2_osd1_hst":0, + "ds2_osd1_vend":0, + "ds2_osd1_hend":0, + "ds2_osd1_dma_request_length":0, + "ds2_osd1_dma_map":0, + "ds2_osd1_rgb_rev":0, + "ds2_osd1_global_alpha":0, + "ds2_osd1_swap_64":0, + "ds2_osd1_outstanding_num":0, + "ds2_osd1_bd_limit_en":0 + } + } + } +} \ No newline at end of file diff --git a/package/encode_app/src/imx385_video_1920x1080.conf b/package/encode_app/src/imx385_video_1920x1080.conf new file mode 100644 index 0000000..ec857fe --- /dev/null +++ b/package/encode_app/src/imx385_video_1920x1080.conf @@ -0,0 +1,322 @@ +{ + "sensor0":{ + "sensor0_name":"m00_f_IMX385 0-001a", + "sensor0_cfg_file":"imx385_0.conf", + "sensor0_total_size":{ + "sensor0_total_width":2200, + "sensor0_total_height":1125 + }, + "sensor0_active_size":{ + "sensor0_active_width":1920, + "sensor0_active_height":1080 + }, + "/dev/video2":{ + "video2_used":0, + "video2_width":1920, + "video2_height":1080, + "video2_out_format":1 + }, + "/dev/video3":{ + "video3_used":1, + "video3_width":1080, + "video3_height":720, + "video3_out_format":1 + }, + "/dev/video4":{ + "video4_used":0, + "video4_width":640, + "video4_height":480, + "video4_out_format":1 + }, + "/dev/video5":{ + "video5_used":0, + "video5_width":320, + "video5_height":320, + "video5_height_r":240, + "video5_out_format":1, + "video5_pitch":320 + } + }, + "sensor1":{ + "sensor1_name":"m01_f_imx219_1 3-0010", + "sensor1_cfg_file":"imx219_1.conf", + "sensor1_total_size":{ + "sensor1_total_width":3476, + "sensor1_total_height":1166 + }, + "sensor1_active_size":{ + "sensor1_active_width":1920, + "sensor1_active_height":1080 + }, + "/dev/video6":{ + "video6_used":0, + "video6_width":1920, + "video6_height":1080, + "video6_out_format":1 + }, + "/dev/video7":{ + "video7_used":0, + "video7_width":1080, + "video7_height":720, + "video7_out_format":1 + }, + "/dev/video8":{ + "video8_used":0, + "video8_width":640, + "video8_height":480, + "video8_out_format":1 + }, + "/dev/video9":{ + "video9_used":0, + "video9_width":320, + "video9_height":240, + "video9_height_r":240, + "video9_out_format":1, + "video9_pitch":320 + } + }, + "mipi_csi2":{ + "csi0_used":1, + "csi0_sony_wdr":0, + "csi0_lane_nb":2, + "csi0_dl0_map":1, + "csi0_dl1_map":2, + "csi0_dl2_map":3, + "csi0_dl3_map":4, + "csi00_datatype_select0":44, + "csi00_datatype_select1":42, + "csi00_vc_select":1, + "csi01_datatype_select0":44, + "csi01_datatype_select1":42, + "csi01_vc_select":2, + "csi02_datatype_select0":44, + "csi02_datatype_select1":42, + "csi02_vc_select":4, + "csi1_used":1, + "csi1_sony_wdr":0, + "csi1_lane_nb":2, + "csi1_dl0_map":3, + "csi1_dl1_map":4, + "csi1_dl2_map":1, + "csi1_dl3_map":2, + "csi10_datatype_select0":44, + "csi10_datatype_select1":42, + "csi10_vc_select":1 + }, + "isp_vi":{ + "vi_wrap":{ + "dphy_mode":0, + "sony_mode":0, + "sensor0_interface_en":1, + "sensor0_tpg_w_en":0, + "sensor0_tpg_r_en":0, + "sensor0_wdr_sensor_vendor":0, + "sensor0_wdr_mode":0, + "sensor0_mipi_mode":0, + "sensor0_isp_pipeline":1, + "sensor1_interface_en":1, + "sensor1_tpg_w_en":0, + "sensor1_tpg_r_en":0, + "sensor1_wdr_sensor_vendor":0, + "sensor1_wdr_mode":0, + "sensor1_mipi_mode":0, + "sensor1_isp_pipeline":2, + "sensor2_interface_en":0, + "sensor2_tpg_w_en":0, + "sensor2_tpg_r_en":0, + "sensor2_wdr_sensor_vendor":0, + "sensor2_wdr_mode":0, + "sensor2_mipi_mode":0, + "sensor2_isp_pipeline":2 + }, + "vi_pipe00":{ + "p00_win_mode_en":1, + "p00_input_ch_sel":1, + "p00_ch_mode_sel":1, + "p00_pixel_type":0, + "p00_yuv_in_format":0, + "p00_yuv_out_format":0, + "p00_yuv422_order":0, + "p00_pixel_width":2, + "p00_data_out_timming_ctrl":3, + "p00_sync_pulse_mode":0, + "p00_sen_mipi_clk_pol":1, + "p00_sen_mipi_vsync_pol":0, + "p00_sen_mipi_hsync_pol":0, + "p00_sen_mipi_field_pol":1, + "p00_isp_clk_pol":1, + "p00_isp_vsync_pol":1, + "p00_isp_hsync_pol":1, + "p00_isp_field_pol":1, + "p00_tpg_w_en":0, + "p00_tpg_r_en":0, + "p00_w_st_width":0, + "p00_w_st_height":16383, + "p00_r_st_width":279, + "p00_r_st_height":44, + "p00_tof_mode_enable":0, + "p00_vi_pipe_tpg_tof_frm_num":3, + "p00_vi_pipe_tpg_tof_frm_stride":66432 + }, + "vi_pipe01":{ + "p01_win_mode_en":1, + "p01_input_ch_sel":1, + "p01_ch_mode_sel":1, + "p01_pixel_type":0, + "p01_yuv_in_format":0, + "p01_yuv_out_format":0, + "p01_yuv422_order":0, + "p01_pixel_width":2, + "p01_data_out_timming_ctrl":3, + "p01_sync_pulse_mode":0, + "p01_sen_mipi_clk_pol":1, + "p01_sen_mipi_vsync_pol":0, + "p01_sen_mipi_hsync_pol":0, + "p01_sen_mipi_field_pol":1, + "p01_isp_clk_pol":1, + "p01_isp_vsync_pol":1, + "p01_isp_hsync_pol":1, + "p01_isp_field_pol":1, + "p01_tpg_w_en":0, + "p01_tpg_r_en":0, + "p01_total_width":2200, + "p01_total_height":1125, + "p01_in_width":1920, + "p01_in_height":1080, + "p01_w_st_width":0, + "p01_w_st_height":16383, + "p01_r_st_width":279, + "p01_r_st_height":44, + "p01_vi_pipe_w_addr_y0 ":0, + "p01_vi_pipe_w_addr_y1 ":0, + "p01_vi_pipe_w_addr_uv0":0, + "p01_vi_pipe_w_addr_uv1":0, + "p01_vi_pipe_r_addr_y0 ":0, + "p01_vi_pipe_r_addr_y1 ":0, + "p01_vi_pipe_addr_stride":0, + "p01_tof_mode_enable":0, + "p01_vi_pipe_tpg_tof_frm_num":3, + "p01_vi_pipe_tpg_tof_frm_stride":66432 + }, + "vi_pipe02":{ + "p02_win_mode_en":1, + "p02_input_ch_sel":1, + "p02_ch_mode_sel":1, + "p02_pixel_type":0, + "p02_yuv_in_format":0, + "p02_yuv_out_format":0, + "p02_yuv422_order":0, + "p02_pixel_width":2, + "p02_data_out_timming_ctrl":3, + "p02_sync_pulse_mode":0, + "p02_sen_mipi_clk_pol":1, + "p02_sen_mipi_vsync_pol":0, + "p02_sen_mipi_hsync_pol":0, + "p02_sen_mipi_field_pol":1, + "p02_isp_clk_pol":1, + "p02_isp_vsync_pol":1, + "p02_isp_hsync_pol":1, + "p02_isp_field_pol":1, + "p02_tpg_w_en":0, + "p02_tpg_r_en":0, + "p02_total_width":2200, + "p02_total_height":1125, + "p02_in_width":1920, + "p02_in_height":1080, + "p02_w_st_width":0, + "p02_w_st_height":16383, + "p02_r_st_width":279, + "p02_r_st_height":44, + "p02_vi_pipe_w_addr_y0 ":0, + "p02_vi_pipe_w_addr_y1 ":0, + "p02_vi_pipe_w_addr_uv0":0, + "p02_vi_pipe_w_addr_uv1":0, + "p02_vi_pipe_r_addr_y0 ":0, + "p02_vi_pipe_r_addr_y1 ":0, + "p02_vi_pipe_addr_stride":0, + "p02_tof_mode_enable":0, + "p02_vi_pipe_tpg_tof_frm_num":3, + "p02_vi_pipe_tpg_tof_frm_stride":66432 + }, + "vi_pipe10":{ + "p10_win_mode_en":1, + "p10_input_ch_sel":1, + "p10_ch_mode_sel":1, + "p10_pixel_type":0, + "p10_yuv_in_format":0, + "p10_yuv_out_format":0, + "p10_yuv422_order":0, + "p10_pixel_width":2, + "p10_data_out_timming_ctrl":3, + "p10_sync_pulse_mode":0, + "p10_sen_mipi_clk_pol":1, + "p10_sen_mipi_vsync_pol":0, + "p10_sen_mipi_hsync_pol":0, + "p10_sen_mipi_field_pol":1, + "p10_isp_clk_pol":1, + "p10_isp_vsync_pol":1, + "p10_isp_hsync_pol":1, + "p10_isp_field_pol":1, + "p10_tpg_w_en":0, + "p10_tpg_r_en":0, + "p10_total_width":2200, + "p10_total_height":1125, + "p10_in_width":1920, + "p10_in_height":1080, + "p10_w_st_width":0, + "p10_w_st_height":16383, + "p10_r_st_width":279, + "p10_r_st_height":44, + "p10_vi_pipe_w_addr_y0 ":0, + "p10_vi_pipe_w_addr_y1 ":0, + "p10_vi_pipe_w_addr_uv0":0, + "p10_vi_pipe_w_addr_uv1":0, + "p10_vi_pipe_r_addr_y0 ":0, + "p10_vi_pipe_r_addr_y1 ":0, + "p10_vi_pipe_addr_stride":0, + "p10_tof_mode_enable":0, + "p10_vi_pipe_tpg_tof_frm_num":3, + "p10_vi_pipe_tpg_tof_frm_stride":66432 + }, + "vi_dvp00":{ + "dvp00_win_mode_en":1, + "dvp00_input_ch_sel":1, + "dvp00_ch_mode_sel":1, + "dvp00_pixel_type":0, + "dvp00_yuv_in_format":0, + "dvp00_yuv_out_format":0, + "dvp00_yuv422_order":0, + "dvp00_pixel_width":2, + "dvp00_data_out_timming_ctrl":3, + "dvp00_sync_pulse_mode":0, + "dvp00_sen_mipi_clk_pol":1, + "dvp00_sen_mipi_vsync_pol":0, + "dvp00_sen_mipi_hsync_pol":0, + "dvp00_sen_mipi_field_pol":1, + "dvp00_isp_clk_pol":1, + "dvp00_isp_vsync_pol":1, + "dvp00_isp_hsync_pol":1, + "dvp00_isp_field_pol":1, + "dvp00_tpg_w_en":0, + "dvp00_tpg_r_en":0, + "dvp00_total_width":2200, + "dvp00_total_height":1125, + "dvp00_in_width":1920, + "dvp00_in_height":1080, + "dvp00_w_st_width":0, + "dvp00_w_st_height":16383, + "dvp00_r_st_width":279, + "dvp00_r_st_height":44, + "dvp00_vi_pipe_w_addr_y0 ":0, + "dvp00_vi_pipe_w_addr_y1 ":0, + "dvp00_vi_pipe_w_addr_uv0":0, + "dvp00_vi_pipe_w_addr_uv1":0, + "dvp00_vi_pipe_r_addr_y0 ":0, + "dvp00_vi_pipe_r_addr_y1 ":0, + "dvp00_vi_pipe_addr_stride":0, + "dvp00_tof_mode_enable":0, + "dvp00_vi_pipe_tpg_tof_frm_num":3, + "dvp00_vi_pipe_tpg_tof_frm_stride":66432 + } + } +} \ No newline at end of file diff --git a/package/mediactl_lib/src/config/imx385_0.conf b/package/mediactl_lib/src/config/imx385_0.conf new file mode 100644 index 0000000..348dd2a --- /dev/null +++ b/package/mediactl_lib/src/config/imx385_0.conf @@ -0,0 +1,531 @@ +{ + "isp_general":{ + "isp_out_sel":0, + "dvp_ch_mode":1, + "hist_3a_out_en":0, + "main_out":{ + "out_img_format":1, + "out_yuv_in_format":0, + "out_yuv422_pxl_order":0, + "out_pxl_width":0, + "out_frame_buf_size":2048 + }, + "out0":{ + "ds0_out_img_format":1, + "ds0_out_yuv_in_format":0, + "ds0_out_yuv422_pxl_order":0, + "ds0_out_pxl_width":0, + "ds0_frame_buf_size":2048 + }, + "out1":{ + "ds1_out_img_format":1, + "ds1_out_yuv_in_format":0, + "ds1_out_yuv422_pxl_order":0, + "ds1_out_pxl_width":0, + "ds1_frame_buf_size":2048 + }, + "out2":{ + "ds2_out_img_format":0, + "ds2_out_yuv_in_format":0, + "ds2_out_yuv422_pxl_order":0, + "ds2_out_pxl_width":0, + "ds2_frame_buf_size":2048 + }, + "wdr":{ + "wdr_mode":0, + "wdr_long_ch_mode":0, + "wdr_long_l2_buf_en":0, + "wdr_short_s1_buf_en":0, + "wdr_dynamic_switch_en":0, + "wdr_long_l2_buf_depth":0, + "wdr_long_img_format":0, + "wdr_long_yuv_in_format":0, + "wdr_long_img_out_format":0, + "wdr_long_yuv422_pxl_order":0, + "wdr_long_pixel_width":2, + "wdr_buf_base":0, + "wdr_line_stride":0, + "wdr_frame_buf_size":0 + }, + "nr3d":{ + "nr3d_en":0, + "nr3d_fbcd_en":0, + "nr3d_mv_out_en":0, + "nr3d_y_img_format":0, + "nr3d_y_yuv_in_format":0, + "nr3d_y_img_out_format":0, + "nr3d_y_yuv422_pxl_order":0, + "nr3d_y_pixel_width":2, + "nr3d_uv_img_format":0, + "nr3d_uv_yuv_in_format":0, + "nr3d_uv_mig_out_format":0, + "nr3d_uv_yuv422_pxl_order":0, + "nr3d_uv_pixel_width":2, + "nr3d_frame_buf_size":0 + }, + "ldc":{ + "ldc_line_stride":2048, + "ldc_frame_buf_size":2048 + } + }, + "isp_core": { + "itc": { + "hsync_pol":0, + "vsync_pol":0, + "hsync_input_timing":2, + "vsync_input_timing":1, + "flip_ctl" :0, + "video_fmt_sl":0, + "itc_ttl_h" :2199, + "itc_ttl_v" :1124, + "itc_stt_hr" :0, + "itc_stt_vr" :1 + }, + "tpg": { + "tpg_en":0, + "bayer_mode_sel":3, + "motion_mode_sel":0, + "tpg_sel":9, + "wdr_l_mul_data":0, + "wdr_m_mul_data":0, + "wdr_s_mul_data":0 + }, + "blc":{ + "blc_en" :1, + "blc_offset" :224, + "blc_ratio" :271 + }, + "lsc":{ + "lsc_en" :1, + "lsc_h_center" :900, + "lsc_v_center" :580, + "lsc_r_ratio" :4, + "lsc_g_ratio":4, + "lsc_b_ratio" :4, + "lsc_ir_ratio" :4 + }, + "ae":{ + "ae_as_en" :1, + "ae_ag_en" :1, + "ae_airis_en" :0, + "ae_enter_ls_sel" :0, + "ae_exit_ls_sel" :1, + "ae_win_mode_sel" :0, + "ae_back_light_mode_sel" :0, + "ae_day_change_en" :0, + "ae_day_change_sel" :0, + "ae_win_stth" :0, + "ae_win_sttv" :0, + "ae_win_endh" :1919, + "ae_win_endv" :1079, + "ae_yobj" :100, + "ae_av_rg" :14, + "ae_l_ex_time" :168, + "ae_m_ex_time" :32, + "ae_s_ex_time" :32, + "ae_agc" :256, + "ae_ad_shuttle_freq" :2, + "ae_ad_gain_freq" :0, + "ae_adjust_step_max":36, + "ae_ex_value_max" :168, + "ae_ex_value_mid" :100, + "ae_ex_value_min" :1, + "ae_gain_value_max" :768, + "ae_gain_value_mid" :512, + "ae_gain_value_min" :256, + "ae_dn_switch_ad_step_max" :512, + "ae_dn_switch_wait_time" :255, + "ape_max_diff" :12, + "ape_drv_signal_max" :3840, + "ape_coeff_distance" :0, + "ape_coeff_speed" :0, + "ape_coeff_acceleration" :0, + "ape_drv_manual_value" :4095, + "ape_damp_manual_value" :2048 + }, + "awb":{ + "awb_d65_en" :1, + "awb_ccm_en" :1, + "awb_en" :1, + "awb_mode_sel" :1, + "awb_hist_mode_sel" :0, + "awb_veri_en" :0, + "awb_fb_en" :0, + "awb_value_save_en" :0, + "awb_ccm_adp_adjust_en" :0, + "awb_stab_en" :1, + "awb_d65_red_gain" :508, + "awb_d65_blue_gain" :423, + "ccm_rr" :256, + "ccm_rg" :0, + "ccm_rb" :0, + "ccm_gr" :83, + "ccm_gg" :361, + "ccm_gb" :22, + "ccm_br" :0, + "ccm_bg" :44, + "ccm_bb" :300, + "ccm_correct_coff" :256, + "awb_win_stth" :0, + "awb_win_sttv" :0, + "awb_win_endh" :1919, + "awb_win_endv" :1079, + "awb_correct_diff_th" :8, + "awb_color_changeres_time" :8, + "awb_historgram_th" :4, + "awb_red_gain_adjust" :256, + "awb_green_gain_adjust" :256, + "awb_blue_gain_adjust" :256, + "awb_red_max_value" :252, + "awb_blue_max_value" :423, + "awb_red_min_value" :174, + "awb_blue_min_value" :265, + "awb_red_obj_value" :256, + "awb_blue_obj_value" :256 + }, + "wdr":{ + "wdr_fusion_en" :0, + "wdr_frame_sel" :0, + "wdr_adp_adjust_en" :0, + "wdr_stab_en" :0, + "wdr_en" :0, + "wdr_ghost_remove_en" :0, + "wdr_3frame_out_mode" :0, + "wdr_mode_sel" :0, + "wdr_2frame_ex_ratio" :1, + "wdr_3frame_ex_ratio" :1, + "wdr_stat_img_sel" :1, + "wdr_ltm_data_sel" :1, + "wdr_tz_data_sel" :1, + "wdr_remove_purple_en" :0, + "wdr_over_ex_ratio_th1" :384, + "wdr_over_ex_ratio_th2" :32, + "wdr_fusion_ratio_th" :192, + "wdr_fusion_value1" :64, + "wdr_fusion_value2" :16 + }, + "csc":{ + "rgb2yuv_00":153, + "rgb2yuv_01":256, + "rgb2yuv_02":86, + "rgb2yuv_10":301, + "rgb2yuv_11":214, + "rgb2yuv_12":170, + "rgb2yuv_20":58, + "rgb2yuv_21":42, + "rgb2yuv_22":256 + }, + "ada":{ + "gm_rgb_en" :1, + "gm_yuv_en" :0, + "ada_en" :0, + "ada_sbz_en" :0, + "ada_ccr_en" :0, + "ada_adp_en" :0, + "ada_adp_ccr_en" :0, + "ada_stat_mode_sel" :0, + "ada_enh_mode_sel" :0, + "ada_hist_max" :128, + "ada_ttl_max" :152, + "ada_win_stth" :0, + "ada_win_sttv" :0, + "ada_win_endh" :1919, + "ada_win_endv" :1079 + }, + "rgb-ir":{ + "raw_fmt" :0, + "rgbir_rct_en" :0, + "dfc_en" :0, + "rgbir_fs_en" :0, + "rgbir_ot_sl" :0, + "rgbir_fs_max" :256, + "dfc_krb" :0, + "dfc_ky" :0, + "dfc_th" :256, + "dfc_th_1" :256 + }, + "2dnr":{ + "dpeak_en" :1, + "nr2d_raw_en" :1, + "nr2d_eg_en" :1, + "nr2d_jl_en" :1, + "nr2d_av_en" :1, + "nr2d_c_en" :1, + "dpeak_adp_en" :0, + "nr2d_raw_adp_en":0, + "nr2d_y_adp_en" :0, + "nr2d_c_adp_en" :1, + "nr2d_raw_kl" :16, + "nr2d_jl_th" :128, + "nr2d_eg_k" :32, + "nr2d_y_k" :32, + "nr2d_c_k" :1 + }, + "3dnr":{ + "nr3d_en" :1, + "nr3dp_y_en" :1, + "nr3dp_c_en" :1, + "nr3dm_y_en" :1, + "nr3dm_c_en" :1, + "nr3db_y_en" :1, + "nr3db_c_en" :1, + "nr3dm_nr2d_y_en" :1, + "nr3dm_nr2d_c_en" :1, + "core_3dnr_wb_en" :0, + "core_3dnr_wb_sel" :0, + "core_3dnr_adp_luma_en" :0, + "core_3dnr_adp_chroma_en" :0, + "nr3dp_thy" :255, + "nr3dp_thyp" :255, + "nr3dp_thcp" :32, + "nr3dm_mid_th" :128, + "nr3dm_mtp_th" :8, + "nr3dm_mtc_th" :128, + "nr3dm_ym_k" :8, + "nr3dm_thy" :64, + "nr3dm_min" :0, + "nr3dm_thw0" :128, + "core_3dnr_chroma_intensity" :16, + "nr3db_nr2d_eg_th" :64, + "nr3db_thyp" :64, + "nr3db_thcp" :32 + }, + "enh":{ + "ltm":{ + "enh_ltm_en" :1, + "enh_adp_ltm_en" :0, + "ltm_gain" :128, + "ltm_mm_th" :128 + }, + "sharp":{ + "enh_sharp_en" :1, + "enh_adp_sharp_en" :0, + "shp_core" :4, + "shp_th1" :3840, + "shp_th2" :4095, + "shp_gain" :160 + }, + "cc":{ + "enh_cc_en" :0, + "enh_adp_cc_en" :0 + } + }, + "post_ctl":{ + "otc_ctl":{ + "otc_en" :0, + "otc_yc_sl" :0, + "otc_uv_sl" :1, + "otc_hs_plt_sl" :0, + "otc_vs_plt_sl" :0, + "otc_stt_vr" :0, + "otc_stt_hr" :0 + }, + "ctrst":{ + "ctrst_en" :1, + "ctrst_gain":128 + }, + "luma":{ + "luma_en" :1, + "luma_gain":128 + }, + "strt":{ + "strt_en" :1, + "strt_gain":220 + } + }, + "ldc":{ + "ldc_en" :0, + "ldc_rct_en" :0, + "ldc_rq_frq" :128, + "ldc_stt_ln" :540, + "ldc_ch" :960, + "ldc_cv" :540, + "ldc_cr" :684, + "ldc_cz" :684 + }, + "af":{ + "af_stat_en" :1, + "af_stat_mode_sel" :0, + "af_stat_win_h_start":0, + "af_stat_win_v_start":0, + "af_stat_win_h_end" :1919, + "af_stat_win_v_end" :1079 + } + }, + "isp_post":{ + "rgb2yuv":{ + "osd_rgb2yuv_coeff00":306, + "osd_rgb2yuv_coeff01":601, + "osd_rgb2yuv_coeff02":117, + "osd_rgb2yuv_coeff03":0, + "osd_rgb2yuv_coeff10":3920, + "osd_rgb2yuv_coeff11":3749, + "osd_rgb2yuv_coeff12":523, + "osd_rgb2yuv_coeff13":128, + "osd_rgb2yuv_coeff20":523, + "osd_rgb2yuv_coeff21":3658, + "osd_rgb2yuv_coeff22":4011, + "osd_rgb2yuv_coeff23":128 + }, + "yuv2rgb":{ + "out_yuv2rgb_coeff00":1024, + "out_yuv2rgb_coeff01":0, + "out_yuv2rgb_coeff02":1441, + "out_yuv2rgb_coeff03":3916, + "out_yuv2rgb_coeff10":1024, + "out_yuv2rgb_coeff11":3742, + "out_yuv2rgb_coeff12":3362, + "out_yuv2rgb_coeff13":136, + "out_yuv2rgb_coeff20":1024, + "out_yuv2rgb_coeff21":1822, + "out_yuv2rgb_coeff22":0, + "out_yuv2rgb_coeff23":3868 + }, + "ds0":{ + "ds0_out_rgb_mode":0, + "ds0_out_rgb_en":0, + "ds0_out_yuv_mode":0, + "ds0_out_uv_swap":0, + "ds0_osd0":{ + "ds0_osd0_enable":0, + "ds0_osd0_type":0, + "ds0_osd0_alpha_tpye":0, + "ds0_osd0_vst":0, + "ds0_osd0_hst":0, + "ds0_osd0_vend":0, + "ds0_osd0_hend":0, + "ds0_osd0_dma_request_length":0, + "ds0_osd0_dma_map":0, + "ds0_osd0_rgb_rev":0, + "ds0_osd0_global_alpha":0, + "ds0_osd0_swap_64":0, + "ds0_osd0_outstanding_num":0, + "ds0_osd0_bd_limit_en":0 + }, + "ds0_osd1":{ + "ds0_osd1_enable":0, + "ds0_osd1_type":0, + "ds0_osd1_alpha_tpye":0, + "ds0_osd1_vst":0, + "ds0_osd1_hst":0, + "ds0_osd1_vend":0, + "ds0_osd1_hend":0, + "ds0_osd1_dma_request_length":0, + "ds0_osd1_dma_map":0, + "ds0_osd1_rgb_rev":0, + "ds0_osd1_global_alpha":0, + "ds0_osd1_swap_64":0, + "ds0_osd1_outstanding_num":0, + "ds0_osd1_bd_limit_en":0 + }, + "ds0_osd2":{ + "ds0_osd2_enable":0, + "ds0_osd2_type":0, + "ds0_osd2_alpha_tpye":0, + "ds0_osd2_vst":0, + "ds0_osd2_hst":0, + "ds0_osd2_vend":0, + "ds0_osd2_hend":0, + "ds0_osd2_dma_request_length":0, + "ds0_osd2_dma_map":0, + "ds0_osd2_rgb_rev":0, + "ds0_osd2_global_alpha":0, + "ds0_osd2_swap_64":0, + "ds0_osd2_outstanding_num":0, + "ds0_osd2_bd_limit_en":0 + } + }, + "ds1":{ + "ds1_out_rgb_mode":0, + "ds1_out_rgb_en":0, + "ds1_out_yuv_mode":0, + "ds1_out_uv_swap":0, + "ds1_osd0":{ + "ds1_osd0_enable":0, + "ds1_osd0_type":0, + "ds1_osd0_alpha_tpye":0, + "ds1_osd0_vst":0, + "ds1_osd0_hst":0, + "ds1_osd0_vend":0, + "ds1_osd0_hend":0, + "ds1_osd0_dma_request_length":0, + "ds1_osd0_dma_map":0, + "ds1_osd0_rgb_rev":0, + "ds1_osd0_global_alpha":0, + "ds1_osd0_swap_64":0, + "ds1_osd0_outstanding_num":0, + "ds1_osd0_bd_limit_en":0 + }, + "ds1_osd1":{ + "ds1_osd1_enable":0, + "ds1_osd1_type":0, + "ds1_osd1_alpha_tpye":0, + "ds1_osd1_vst":0, + "ds1_osd1_hst":0, + "ds1_osd1_vend":0, + "ds1_osd1_hend":0, + "ds1_osd1_dma_request_length":0, + "ds1_osd1_dma_map":0, + "ds1_osd1_rgb_rev":0, + "ds1_osd1_global_alpha":0, + "ds1_osd1_swap_64":0, + "ds1_osd1_outstanding_num":0, + "ds1_osd1_bd_limit_en":0 + }, + "ds1_osd2":{ + "ds1_osd2_enable":0, + "ds1_osd2_type":0, + "ds1_osd2_alpha_tpye":0, + "ds1_osd2_vst":0, + "ds1_osd2_hst":0, + "ds1_osd2_vend":0, + "ds1_osd2_hend":0, + "ds1_osd2_dma_request_length":0, + "ds1_osd2_dma_map":0, + "ds1_osd2_rgb_rev":0, + "ds1_osd2_global_alpha":0, + "ds1_osd2_swap_64":0, + "ds1_osd2_outstanding_num":0, + "ds1_osd2_bd_limit_en":0 + } + }, + "ds2":{ + "ds2_out_rgb_mode":0, + "ds2_out_rgb_en":1, + "ds2_out_yuv_mode":0, + "ds2_out_uv_swap":0, + "ds2_osd0":{ + "ds2_osd0_enable":0, + "ds2_osd0_type":0, + "ds2_osd0_alpha_tpye":0, + "ds2_osd0_vst":0, + "ds2_osd0_hst":0, + "ds2_osd0_vend":0, + "ds2_osd0_hend":0, + "ds2_osd0_dma_request_length":0, + "ds2_osd0_dma_map":0, + "ds2_osd0_rgb_rev":0, + "ds2_osd0_global_alpha":0, + "ds2_osd0_swap_64":0, + "ds2_osd0_outstanding_num":0, + "ds2_osd0_bd_limit_en":0 + }, + "ds2_osd1":{ + "ds2_osd1_enable":0, + "ds2_osd1_type":0, + "ds2_osd1_alpha_tpye":0, + "ds2_osd1_vst":0, + "ds2_osd1_hst":0, + "ds2_osd1_vend":0, + "ds2_osd1_hend":0, + "ds2_osd1_dma_request_length":0, + "ds2_osd1_dma_map":0, + "ds2_osd1_rgb_rev":0, + "ds2_osd1_global_alpha":0, + "ds2_osd1_swap_64":0, + "ds2_osd1_outstanding_num":0, + "ds2_osd1_bd_limit_en":0 + } + } + } +} \ No newline at end of file diff --git a/package/mediactl_lib/src/config/imx385_video_1920x1080.conf b/package/mediactl_lib/src/config/imx385_video_1920x1080.conf new file mode 100644 index 0000000..ec857fe --- /dev/null +++ b/package/mediactl_lib/src/config/imx385_video_1920x1080.conf @@ -0,0 +1,322 @@ +{ + "sensor0":{ + "sensor0_name":"m00_f_IMX385 0-001a", + "sensor0_cfg_file":"imx385_0.conf", + "sensor0_total_size":{ + "sensor0_total_width":2200, + "sensor0_total_height":1125 + }, + "sensor0_active_size":{ + "sensor0_active_width":1920, + "sensor0_active_height":1080 + }, + "/dev/video2":{ + "video2_used":0, + "video2_width":1920, + "video2_height":1080, + "video2_out_format":1 + }, + "/dev/video3":{ + "video3_used":1, + "video3_width":1080, + "video3_height":720, + "video3_out_format":1 + }, + "/dev/video4":{ + "video4_used":0, + "video4_width":640, + "video4_height":480, + "video4_out_format":1 + }, + "/dev/video5":{ + "video5_used":0, + "video5_width":320, + "video5_height":320, + "video5_height_r":240, + "video5_out_format":1, + "video5_pitch":320 + } + }, + "sensor1":{ + "sensor1_name":"m01_f_imx219_1 3-0010", + "sensor1_cfg_file":"imx219_1.conf", + "sensor1_total_size":{ + "sensor1_total_width":3476, + "sensor1_total_height":1166 + }, + "sensor1_active_size":{ + "sensor1_active_width":1920, + "sensor1_active_height":1080 + }, + "/dev/video6":{ + "video6_used":0, + "video6_width":1920, + "video6_height":1080, + "video6_out_format":1 + }, + "/dev/video7":{ + "video7_used":0, + "video7_width":1080, + "video7_height":720, + "video7_out_format":1 + }, + "/dev/video8":{ + "video8_used":0, + "video8_width":640, + "video8_height":480, + "video8_out_format":1 + }, + "/dev/video9":{ + "video9_used":0, + "video9_width":320, + "video9_height":240, + "video9_height_r":240, + "video9_out_format":1, + "video9_pitch":320 + } + }, + "mipi_csi2":{ + "csi0_used":1, + "csi0_sony_wdr":0, + "csi0_lane_nb":2, + "csi0_dl0_map":1, + "csi0_dl1_map":2, + "csi0_dl2_map":3, + "csi0_dl3_map":4, + "csi00_datatype_select0":44, + "csi00_datatype_select1":42, + "csi00_vc_select":1, + "csi01_datatype_select0":44, + "csi01_datatype_select1":42, + "csi01_vc_select":2, + "csi02_datatype_select0":44, + "csi02_datatype_select1":42, + "csi02_vc_select":4, + "csi1_used":1, + "csi1_sony_wdr":0, + "csi1_lane_nb":2, + "csi1_dl0_map":3, + "csi1_dl1_map":4, + "csi1_dl2_map":1, + "csi1_dl3_map":2, + "csi10_datatype_select0":44, + "csi10_datatype_select1":42, + "csi10_vc_select":1 + }, + "isp_vi":{ + "vi_wrap":{ + "dphy_mode":0, + "sony_mode":0, + "sensor0_interface_en":1, + "sensor0_tpg_w_en":0, + "sensor0_tpg_r_en":0, + "sensor0_wdr_sensor_vendor":0, + "sensor0_wdr_mode":0, + "sensor0_mipi_mode":0, + "sensor0_isp_pipeline":1, + "sensor1_interface_en":1, + "sensor1_tpg_w_en":0, + "sensor1_tpg_r_en":0, + "sensor1_wdr_sensor_vendor":0, + "sensor1_wdr_mode":0, + "sensor1_mipi_mode":0, + "sensor1_isp_pipeline":2, + "sensor2_interface_en":0, + "sensor2_tpg_w_en":0, + "sensor2_tpg_r_en":0, + "sensor2_wdr_sensor_vendor":0, + "sensor2_wdr_mode":0, + "sensor2_mipi_mode":0, + "sensor2_isp_pipeline":2 + }, + "vi_pipe00":{ + "p00_win_mode_en":1, + "p00_input_ch_sel":1, + "p00_ch_mode_sel":1, + "p00_pixel_type":0, + "p00_yuv_in_format":0, + "p00_yuv_out_format":0, + "p00_yuv422_order":0, + "p00_pixel_width":2, + "p00_data_out_timming_ctrl":3, + "p00_sync_pulse_mode":0, + "p00_sen_mipi_clk_pol":1, + "p00_sen_mipi_vsync_pol":0, + "p00_sen_mipi_hsync_pol":0, + "p00_sen_mipi_field_pol":1, + "p00_isp_clk_pol":1, + "p00_isp_vsync_pol":1, + "p00_isp_hsync_pol":1, + "p00_isp_field_pol":1, + "p00_tpg_w_en":0, + "p00_tpg_r_en":0, + "p00_w_st_width":0, + "p00_w_st_height":16383, + "p00_r_st_width":279, + "p00_r_st_height":44, + "p00_tof_mode_enable":0, + "p00_vi_pipe_tpg_tof_frm_num":3, + "p00_vi_pipe_tpg_tof_frm_stride":66432 + }, + "vi_pipe01":{ + "p01_win_mode_en":1, + "p01_input_ch_sel":1, + "p01_ch_mode_sel":1, + "p01_pixel_type":0, + "p01_yuv_in_format":0, + "p01_yuv_out_format":0, + "p01_yuv422_order":0, + "p01_pixel_width":2, + "p01_data_out_timming_ctrl":3, + "p01_sync_pulse_mode":0, + "p01_sen_mipi_clk_pol":1, + "p01_sen_mipi_vsync_pol":0, + "p01_sen_mipi_hsync_pol":0, + "p01_sen_mipi_field_pol":1, + "p01_isp_clk_pol":1, + "p01_isp_vsync_pol":1, + "p01_isp_hsync_pol":1, + "p01_isp_field_pol":1, + "p01_tpg_w_en":0, + "p01_tpg_r_en":0, + "p01_total_width":2200, + "p01_total_height":1125, + "p01_in_width":1920, + "p01_in_height":1080, + "p01_w_st_width":0, + "p01_w_st_height":16383, + "p01_r_st_width":279, + "p01_r_st_height":44, + "p01_vi_pipe_w_addr_y0 ":0, + "p01_vi_pipe_w_addr_y1 ":0, + "p01_vi_pipe_w_addr_uv0":0, + "p01_vi_pipe_w_addr_uv1":0, + "p01_vi_pipe_r_addr_y0 ":0, + "p01_vi_pipe_r_addr_y1 ":0, + "p01_vi_pipe_addr_stride":0, + "p01_tof_mode_enable":0, + "p01_vi_pipe_tpg_tof_frm_num":3, + "p01_vi_pipe_tpg_tof_frm_stride":66432 + }, + "vi_pipe02":{ + "p02_win_mode_en":1, + "p02_input_ch_sel":1, + "p02_ch_mode_sel":1, + "p02_pixel_type":0, + "p02_yuv_in_format":0, + "p02_yuv_out_format":0, + "p02_yuv422_order":0, + "p02_pixel_width":2, + "p02_data_out_timming_ctrl":3, + "p02_sync_pulse_mode":0, + "p02_sen_mipi_clk_pol":1, + "p02_sen_mipi_vsync_pol":0, + "p02_sen_mipi_hsync_pol":0, + "p02_sen_mipi_field_pol":1, + "p02_isp_clk_pol":1, + "p02_isp_vsync_pol":1, + "p02_isp_hsync_pol":1, + "p02_isp_field_pol":1, + "p02_tpg_w_en":0, + "p02_tpg_r_en":0, + "p02_total_width":2200, + "p02_total_height":1125, + "p02_in_width":1920, + "p02_in_height":1080, + "p02_w_st_width":0, + "p02_w_st_height":16383, + "p02_r_st_width":279, + "p02_r_st_height":44, + "p02_vi_pipe_w_addr_y0 ":0, + "p02_vi_pipe_w_addr_y1 ":0, + "p02_vi_pipe_w_addr_uv0":0, + "p02_vi_pipe_w_addr_uv1":0, + "p02_vi_pipe_r_addr_y0 ":0, + "p02_vi_pipe_r_addr_y1 ":0, + "p02_vi_pipe_addr_stride":0, + "p02_tof_mode_enable":0, + "p02_vi_pipe_tpg_tof_frm_num":3, + "p02_vi_pipe_tpg_tof_frm_stride":66432 + }, + "vi_pipe10":{ + "p10_win_mode_en":1, + "p10_input_ch_sel":1, + "p10_ch_mode_sel":1, + "p10_pixel_type":0, + "p10_yuv_in_format":0, + "p10_yuv_out_format":0, + "p10_yuv422_order":0, + "p10_pixel_width":2, + "p10_data_out_timming_ctrl":3, + "p10_sync_pulse_mode":0, + "p10_sen_mipi_clk_pol":1, + "p10_sen_mipi_vsync_pol":0, + "p10_sen_mipi_hsync_pol":0, + "p10_sen_mipi_field_pol":1, + "p10_isp_clk_pol":1, + "p10_isp_vsync_pol":1, + "p10_isp_hsync_pol":1, + "p10_isp_field_pol":1, + "p10_tpg_w_en":0, + "p10_tpg_r_en":0, + "p10_total_width":2200, + "p10_total_height":1125, + "p10_in_width":1920, + "p10_in_height":1080, + "p10_w_st_width":0, + "p10_w_st_height":16383, + "p10_r_st_width":279, + "p10_r_st_height":44, + "p10_vi_pipe_w_addr_y0 ":0, + "p10_vi_pipe_w_addr_y1 ":0, + "p10_vi_pipe_w_addr_uv0":0, + "p10_vi_pipe_w_addr_uv1":0, + "p10_vi_pipe_r_addr_y0 ":0, + "p10_vi_pipe_r_addr_y1 ":0, + "p10_vi_pipe_addr_stride":0, + "p10_tof_mode_enable":0, + "p10_vi_pipe_tpg_tof_frm_num":3, + "p10_vi_pipe_tpg_tof_frm_stride":66432 + }, + "vi_dvp00":{ + "dvp00_win_mode_en":1, + "dvp00_input_ch_sel":1, + "dvp00_ch_mode_sel":1, + "dvp00_pixel_type":0, + "dvp00_yuv_in_format":0, + "dvp00_yuv_out_format":0, + "dvp00_yuv422_order":0, + "dvp00_pixel_width":2, + "dvp00_data_out_timming_ctrl":3, + "dvp00_sync_pulse_mode":0, + "dvp00_sen_mipi_clk_pol":1, + "dvp00_sen_mipi_vsync_pol":0, + "dvp00_sen_mipi_hsync_pol":0, + "dvp00_sen_mipi_field_pol":1, + "dvp00_isp_clk_pol":1, + "dvp00_isp_vsync_pol":1, + "dvp00_isp_hsync_pol":1, + "dvp00_isp_field_pol":1, + "dvp00_tpg_w_en":0, + "dvp00_tpg_r_en":0, + "dvp00_total_width":2200, + "dvp00_total_height":1125, + "dvp00_in_width":1920, + "dvp00_in_height":1080, + "dvp00_w_st_width":0, + "dvp00_w_st_height":16383, + "dvp00_r_st_width":279, + "dvp00_r_st_height":44, + "dvp00_vi_pipe_w_addr_y0 ":0, + "dvp00_vi_pipe_w_addr_y1 ":0, + "dvp00_vi_pipe_w_addr_uv0":0, + "dvp00_vi_pipe_w_addr_uv1":0, + "dvp00_vi_pipe_r_addr_y0 ":0, + "dvp00_vi_pipe_r_addr_y1 ":0, + "dvp00_vi_pipe_addr_stride":0, + "dvp00_tof_mode_enable":0, + "dvp00_vi_pipe_tpg_tof_frm_num":3, + "dvp00_vi_pipe_tpg_tof_frm_stride":66432 + } + } +} \ No newline at end of file diff --git a/package/patches/linux/0018-update-imx385-ae-calc-accuracy.patch b/package/patches/linux/0018-update-imx385-ae-calc-accuracy.patch new file mode 100644 index 0000000..23a30a0 --- /dev/null +++ b/package/patches/linux/0018-update-imx385-ae-calc-accuracy.patch @@ -0,0 +1,124 @@ +From a7c1ec1d93cfb4ca773947e5ac4e29a1b1b81bcb Mon Sep 17 00:00:00 2001 +From: alex-guo +Date: Wed, 20 Jul 2022 17:44:59 +0800 +Subject: [PATCH] update imx385 ae calc accuracy + +--- + .../media/i2c/soc_camera/canaanchip/imx385.c | 83 +++++++++++++++++++ + 1 file changed, 83 insertions(+) + +diff --git a/drivers/media/i2c/soc_camera/canaanchip/imx385.c b/drivers/media/i2c/soc_camera/canaanchip/imx385.c +index 9be1d979..ae7a1304 100755 +--- a/drivers/media/i2c/soc_camera/canaanchip/imx385.c ++++ b/drivers/media/i2c/soc_camera/canaanchip/imx385.c +@@ -31,6 +31,12 @@ + #include + #include + ++#include ++#include ++#include ++#include ++#include ++ + #define DRIVER_VERSION KERNEL_VERSION(0, 0x01, 0x0) + + /* IMX385 supported geometry */ +@@ -648,6 +654,61 @@ static void imx385_reset(struct imx385 *priv, int rst) + * @param ctrl + * @return int + */ ++ ++ ++static int IMX385_GaindB[481] = ++{ ++ 0, 3, 5, 8, 10, 13, 15, 17, 19, 22, ++ 24, 26, 28, 30, 32, 33, 35, 37, 39, 40, ++ 42, 44, 45, 47, 49, 50, 52, 53, 55, 56, ++ 57, 59, 60, 62, 63, 64, 65, 67, 68, 69, ++ 70, 72, 73, 74, 75, 76, 77, 78, 80, 81, ++ 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, ++ 92, 93, 94, 95, 95, 96, 97, 98, 99, 100, ++ 101, 102, 102, 103, 104, 105, 106, 106, 107, 108, ++ 109, 110, 110, 111, 112, 113, 113, 114, 115, 116, ++ 116, 117, 118, 118, 119, 120, 120, 121, 122, 122, ++ 123, 124, 124, 125, 126, 126, 127, 128, 128, 129, ++ 129, 130, 131, 131, 132, 132, 133, 134, 134, 135, ++ 135, 136, 136, 137, 138, 138, 139, 139, 140, 140, ++ 141, 141, 142, 142, 143, 144, 144, 145, 145, 146, ++ 146, 147, 147, 148, 148, 149, 149, 150, 150, 151, ++ 151, 151, 152, 152, 153, 153, 154, 154, 155, 155, ++ 156, 156, 157, 157, 157, 158, 158, 159, 159, 160, ++ 160, 160, 161, 161, 162, 162, 163, 163, 163, 164, ++ 164, 165, 165, 165, 166, 166, 167, 167, 167, 168, ++ 168, 169, 169, 169, 170, 170, 171, 171, 171, 172, ++ 172, 172, 173, 173, 174, 174, 174, 175, 175, 175, ++ 176, 176, 176, 177, 177, 178, 178, 178, 179, 179, ++ 179, 180, 180, 180, 181, 181, 181, 182, 182, 182, ++ 183, 183, 183, 184, 184, 184, 185, 185, 185, 186, ++ 186, 186, 187, 187, 187, 187, 188, 188, 188, 189, ++ 189, 189, 190, 190, 190, 191, 191, 191, 191, 192, ++ 192, 192, 193, 193, 193, 194, 194, 194, 194, 195, ++ 195, 195, 196, 196, 196, 196, 197, 197, 197, 198, ++ 198, 198, 198, 199, 199, 199, 199, 200, 200, 200, ++ 201, 201, 201, 201, 202, 202, 202, 202, 203, 203, ++ 203, 203, 204, 204, 204, 204, 205, 205, 205, 206, ++ 206, 206, 206, 207, 207, 207, 207, 208, 208, 208, ++ 208, 209, 209, 209, 209, 210, 210, 210, 210, 210, ++ 211, 211, 211, 211, 212, 212, 212, 212, 213, 213, ++ 213, 213, 214, 214, 214, 214, 214, 215, 215, 215, ++ 215, 216, 216, 216, 216, 217, 217, 217, 217, 217, ++ 218, 218, 218, 218, 219, 219, 219, 219, 219, 220, ++ 220, 220, 220, 220, 221, 221, 221, 221, 222, 222, ++ 222, 222, 222, 223, 223, 223, 223, 223, 224, 224, ++ 224, 224, 224, 225, 225, 225, 225, 225, 226, 226, ++ 226, 226, 226, 227, 227, 227, 227, 227, 228, 228, ++ 228, 228, 228, 229, 229, 229, 229, 229, 230, 230, ++ 230, 230, 230, 231, 231, 231, 231, 231, 232, 232, ++ 232, 232, 232, 232, 233, 233, 233, 233, 233, 234, ++ 234, 234, 234, 234, 234, 235, 235, 235, 235, 235, ++ 236, 236, 236, 236, 236, 236, 237, 237, 237, 237, ++ 237, 238, 238, 238, 238, 238, 238, 239, 239, 239, ++ 239, 239, 239, 240, 240, 240, 240, 240, 240, 241, ++ 241, ++}; ++ + static int imx385_s_ctrl(struct v4l2_ctrl *ctrl) + { + struct imx385 *priv = +@@ -669,10 +730,32 @@ static int imx385_s_ctrl(struct v4l2_ctrl *ctrl) + + case V4L2_CID_ANALOGUE_GAIN: + case V4L2_CID_GAIN: ++ ++ #if 0 + priv->digital_gain = ctrl->val*5; + ret |= reg_write(client, 0x3015, (priv->digital_gain&0x3000) >> 12); + ret |= reg_write(client, 0x3014, (priv->digital_gain/16) & 0xff); ++ #else ++ priv->digital_gain = (ctrl->val + 7)>>3; ++ if(priv->digital_gain<=32) ++ { ++ priv->digital_gain = 0; ++ } ++ else ++ { ++ priv->digital_gain -= 32; ++ if(priv->digital_gain>480) ++ { ++ priv->digital_gain = 480; ++ } ++ } + ++ priv->digital_gain = IMX385_GaindB[priv->digital_gain]; ++ ret |= reg_write(client, 0x3015, (priv->digital_gain&0x300) >> 8); ++ ret |= reg_write(client, 0x3014, (priv->digital_gain) & 0xff); ++ ++ ++ #endif + return ret; + + case V4L2_CID_EXPOSURE: +-- +2.36.1 +