1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * Support for Intel Camera Imaging ISP subsystem. 4 * Copyright (c) 2015, Intel Corporation. 5 * 6 * This program is free software; you can redistribute it and/or modify it 7 * under the terms and conditions of the GNU General Public License, 8 * version 2, as published by the Free Software Foundation. 9 * 10 * This program is distributed in the hope it will be useful, but WITHOUT 11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 13 * more details. 14 */ 15 16 #ifndef __IA_CSS_EED1_8_TYPES_H 17 #define __IA_CSS_EED1_8_TYPES_H 18 19 /* @file 20 * CSS-API header file for Edge Enhanced Demosaic parameters. 21 */ 22 23 #include "type_support.h" 24 25 /** 26 * \brief EED1_8 public parameters. 27 * \details Struct with all parameters for the EED1.8 kernel that can be set 28 * from the CSS API. 29 */ 30 31 /* parameter list is based on ISP261 CSS API public parameter list_all.xlsx from 28-01-2015 */ 32 33 /* Number of segments + 1 segment used in edge reliability enhancement 34 * Ineffective: N/A 35 * Default: 9 36 */ 37 #define IA_CSS_NUMBER_OF_DEW_ENHANCE_SEGMENTS 9 38 39 /* Edge Enhanced Demosaic configuration 40 * 41 * ISP2.6.1: EED1_8 is used. 42 */ 43 44 struct ia_css_eed1_8_config { 45 s32 rbzp_strength; /** Strength of zipper reduction. */ 46 47 s32 fcstrength; /** Strength of false color reduction. */ 48 s32 fcthres_0; /** Threshold to prevent chroma coring due to noise or green disparity in dark region. */ 49 s32 fcthres_1; /** Threshold to prevent chroma coring due to noise or green disparity in bright region. */ 50 s32 fc_sat_coef; /** How much color saturation to maintain in high color saturation region. */ 51 s32 fc_coring_prm; /** Chroma coring coefficient for tint color suppression. */ 52 53 s32 aerel_thres0; /** Threshold for Non-Directional Reliability at dark region. */ 54 s32 aerel_gain0; /** Gain for Non-Directional Reliability at dark region. */ 55 s32 aerel_thres1; /** Threshold for Non-Directional Reliability at bright region. */ 56 s32 aerel_gain1; /** Gain for Non-Directional Reliability at bright region. */ 57 58 s32 derel_thres0; /** Threshold for Directional Reliability at dark region. */ 59 s32 derel_gain0; /** Gain for Directional Reliability at dark region. */ 60 s32 derel_thres1; /** Threshold for Directional Reliability at bright region. */ 61 s32 derel_gain1; /** Gain for Directional Reliability at bright region. */ 62 63 s32 coring_pos0; /** Positive Edge Coring Threshold in dark region. */ 64 s32 coring_pos1; /** Positive Edge Coring Threshold in bright region. */ 65 s32 coring_neg0; /** Negative Edge Coring Threshold in dark region. */ 66 s32 coring_neg1; /** Negative Edge Coring Threshold in bright region. */ 67 68 s32 gain_exp; /** Common Exponent of Gain. */ 69 s32 gain_pos0; /** Gain for Positive Edge in dark region. */ 70 s32 gain_pos1; /** Gain for Positive Edge in bright region. */ 71 s32 gain_neg0; /** Gain for Negative Edge in dark region. */ 72 s32 gain_neg1; /** Gain for Negative Edge in bright region. */ 73 74 s32 pos_margin0; /** Margin for Positive Edge in dark region. */ 75 s32 pos_margin1; /** Margin for Positive Edge in bright region. */ 76 s32 neg_margin0; /** Margin for Negative Edge in dark region. */ 77 s32 neg_margin1; /** Margin for Negative Edge in bright region. */ 78 79 s32 dew_enhance_seg_x[IA_CSS_NUMBER_OF_DEW_ENHANCE_SEGMENTS]; /** Segment data for directional edge weight: X. */ 80 s32 dew_enhance_seg_y[IA_CSS_NUMBER_OF_DEW_ENHANCE_SEGMENTS]; /** Segment data for directional edge weight: Y. */ 81 s32 dew_enhance_seg_slope[(IA_CSS_NUMBER_OF_DEW_ENHANCE_SEGMENTS - 82 1)]; /** Segment data for directional edge weight: Slope. */ 83 s32 dew_enhance_seg_exp[(IA_CSS_NUMBER_OF_DEW_ENHANCE_SEGMENTS - 84 1)]; /** Segment data for directional edge weight: Exponent. */ 85 s32 dedgew_max; /** Max Weight for Directional Edge. */ 86 }; 87 88 #endif /* __IA_CSS_EED1_8_TYPES_H */ 89