xref: /openbmc/linux/drivers/staging/media/atomisp/pci/isp/kernels/tdf/tdf_1.0/ia_css_tdf_types.h (revision 4b4193256c8d3bc3a5397b5cd9494c2ad386317d)
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_TDF_TYPES_H
17  #define __IA_CSS_TDF_TYPES_H
18  
19  /* @file
20  * CSS-API header file for Transform Domain Filter parameters.
21  */
22  
23  #include "type_support.h"
24  
25  /* Transform Domain Filter configuration
26   *
27   * \brief TDF public parameters.
28   * \details Struct with all parameters for the TDF kernel that can be set
29   * from the CSS API.
30   *
31   * ISP2.6.1: TDF is used.
32   */
33  struct ia_css_tdf_config {
34  	s32 thres_flat_table[64];	/** Final optimized strength table of NR for flat region. */
35  	s32 thres_detail_table[64];	/** Final optimized strength table of NR for detail region. */
36  	s32 epsilon_0;		/** Coefficient to control variance for dark area (for flat region). */
37  	s32 epsilon_1;		/** Coefficient to control variance for bright area (for flat region). */
38  	s32 eps_scale_text;		/** Epsilon scaling coefficient for texture region. */
39  	s32 eps_scale_edge;		/** Epsilon scaling coefficient for edge region. */
40  	s32 sepa_flat;		/** Threshold to judge flat (edge < m_Flat_thre). */
41  	s32 sepa_edge;		/** Threshold to judge edge (edge > m_Edge_thre). */
42  	s32 blend_flat;		/** Blending ratio at flat region. */
43  	s32 blend_text;		/** Blending ratio at texture region. */
44  	s32 blend_edge;		/** Blending ratio at edge region. */
45  	s32 shading_gain;		/** Gain of Shading control. */
46  	s32 shading_base_gain;	/** Base Gain of Shading control. */
47  	s32 local_y_gain;		/** Gain of local luminance control. */
48  	s32 local_y_base_gain;	/** Base gain of local luminance control. */
49  	s32 rad_x_origin;		/** Initial x coord. for radius computation. */
50  	s32 rad_y_origin;		/** Initial y coord. for radius computation. */
51  };
52  
53  #endif /* __IA_CSS_TDF_TYPES_H */
54