]>
git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blob - drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/macc/macc_1.0/ia_css_macc_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_MACC_TYPES_H
16 #define __IA_CSS_MACC_TYPES_H
19 * CSS-API header file for Multi-Axis Color Correction (MACC) parameters.
22 /* Number of axes in the MACC table. */
23 #define IA_CSS_MACC_NUM_AXES 16
24 /* Number of coefficients per MACC axes. */
25 #define IA_CSS_MACC_NUM_COEFS 4
26 /* The number of planes in the morphing table. */
28 /* Multi-Axis Color Correction (MACC) table.
30 * ISP block: MACC1 (MACC by only matrix)
31 * MACC2 (MACC by matrix and exponent(ia_css_macc_config))
32 * ISP1: MACC1 is used.
33 * ISP2: MACC2 is used.
36 * OutU = (data00 * InU + data01 * InV) >> 13
37 * OutV = (data10 * InU + data11 * InV) >> 13
39 * default/ineffective:
40 * OutU = (8192 * InU + 0 * InV) >> 13
41 * OutV = ( 0 * InU + 8192 * InV) >> 13
44 * OutU = (data00 * InU + data01 * InV) >> (13 - exp)
45 * OutV = (data10 * InU + data11 * InV) >> (13 - exp)
47 * default/ineffective: (exp=1)
48 * OutU = (4096 * InU + 0 * InV) >> (13 - 1)
49 * OutV = ( 0 * InU + 4096 * InV) >> (13 - 1)
52 struct ia_css_macc_table
{
53 int16_t data
[IA_CSS_MACC_NUM_COEFS
* IA_CSS_MACC_NUM_AXES
];
55 MACC1: s2.13, [-65536,65535]
57 16 of "identity 2x2 matix" {8192,0,0,8192}
58 MACC2: s[macc_config.exp].[13-macc_config.exp], [-8192,8191]
59 default/ineffective: (s1.12)
60 16 of "identity 2x2 matix" {4096,0,0,4096} */
63 #endif /* __IA_CSS_MACC_TYPES_H */