2 * Support for Intel Camera Imaging ISP subsystem.
3 * Copyright (c) 2015, Intel Corporation.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 #ifndef __IA_CSS_BNLM_TYPES_H
16 #define __IA_CSS_BNLM_TYPES_H
19 * CSS-API header file for Bayer Non-Linear Mean parameters.
22 #include "type_support.h" /* int32_t */
24 /** Bayer Non-Linear Mean configuration
26 * \brief BNLM public parameters.
27 * \details Struct with all parameters for the BNLM kernel that can be set
30 * ISP2.6.1: BNLM is used.
32 struct ia_css_bnlm_config {
33 bool rad_enable; /**< Enable a radial dependency in a weight calculation */
34 int32_t rad_x_origin; /**< Initial x coordinate for a radius calculation */
35 int32_t rad_y_origin; /**< Initial x coordinate for a radius calculation */
36 /* a threshold for average of weights if this < Th, do not denoise pixel */
38 /* minimum weight for denoising if max < th, do not denoise pixel */
42 /** Coefficient for approximation, in the form of (1 + x / N)^N,
43 * that fits the first-order exp() to default exp_lut in BNLM sheet
48 uint32_t exp_exponent;
51 int32_t nl_th[3]; /**< Detail thresholds */
53 /** Index for n-th maximum candidate weight for each detail group */
54 int32_t match_quality_max_idx[4];
57 /** A lookup table for 1/sqrt(1+mu) approximation */
58 int32_t mu_root_lut_thr[15];
59 int32_t mu_root_lut_val[16];
62 /** A lookup table for SAD normalization */
63 int32_t sad_norm_lut_thr[15];
64 int32_t sad_norm_lut_val[16];
67 /** A lookup table that models a weight's dependency on textures */
68 int32_t sig_detail_lut_thr[15];
69 int32_t sig_detail_lut_val[16];
72 /** A lookup table that models a weight's dependency on a pixel's radial distance */
73 int32_t sig_rad_lut_thr[15];
74 int32_t sig_rad_lut_val[16];
77 /** A lookup table to control denoise power depending on a pixel's radial distance */
78 int32_t rad_pow_lut_thr[15];
79 int32_t rad_pow_lut_val[16];
82 /** Non linear transfer functions to calculate the blending coefficient depending on detail group */
85 int32_t nl_0_lut_thr[15];
86 int32_t nl_0_lut_val[16];
90 int32_t nl_1_lut_thr[15];
91 int32_t nl_1_lut_val[16];
95 int32_t nl_2_lut_thr[15];
96 int32_t nl_2_lut_val[16];
100 int32_t nl_3_lut_thr[15];
101 int32_t nl_3_lut_val[16];
106 #endif /* __IA_CSS_BNLM_TYPES_H */