]>
git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blob - drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/macc/macc1_5/ia_css_macc1_5_types.h
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_MACC1_5_TYPES_H
16 #define __IA_CSS_MACC1_5_TYPES_H
19 * CSS-API header file for Multi-Axis Color Conversion algorithm parameters.
22 /* Multi-Axis Color Conversion configuration
24 * ISP2.6.1: MACC1_5 is used.
28 /* Number of axes in the MACC table. */
29 #define IA_CSS_MACC_NUM_AXES 16
30 /* Number of coefficients per MACC axes. */
31 #define IA_CSS_MACC_NUM_COEFS 4
33 /* Multi-Axes Color Correction (MACC) table.
35 * ISP block: MACC (MACC by only matrix)
36 * MACC1_5 (MACC by matrix and exponent(ia_css_macc_config))
38 * ISP2: MACC1_5 is used.
41 * OutU = (data00 * InU + data01 * InV) >> 13
42 * OutV = (data10 * InU + data11 * InV) >> 13
44 * default/ineffective:
45 * OutU = (8192 * InU + 0 * InV) >> 13
46 * OutV = ( 0 * InU + 8192 * InV) >> 13
49 * OutU = (data00 * InU + data01 * InV) >> (13 - exp)
50 * OutV = (data10 * InU + data11 * InV) >> (13 - exp)
52 * default/ineffective: (exp=1)
53 * OutU = (4096 * InU + 0 * InV) >> (13 - 1)
54 * OutV = ( 0 * InU + 4096 * InV) >> (13 - 1)
56 struct ia_css_macc1_5_table
{
57 int16_t data
[IA_CSS_MACC_NUM_COEFS
* IA_CSS_MACC_NUM_AXES
];
59 MACC1_5: s[macc_config.exp].[13-macc_config.exp], [-8192,8191]
60 default/ineffective: (s1.12)
61 16 of "identity 2x2 matix" {4096,0,0,4096} */
64 /* Multi-Axes Color Correction (MACC) configuration.
66 * ISP block: MACC1_5 (MACC by matrix and exponent(ia_css_macc_config))
67 * ISP2: MACC1_5 is used.
69 struct ia_css_macc1_5_config
{
70 uint8_t exp
; /** Common exponent of ia_css_macc_table.
71 u8.0, [0,13], default 1, ineffective 1 */
74 #endif /* __IA_CSS_MACC1_5_TYPES_H */