]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/blame - drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/macc/macc_1.0/ia_css_macc_types.h
Merge remote-tracking branch 'asoc/topic/pcm512x' into asoc-next
[mirror_ubuntu-focal-kernel.git] / drivers / staging / media / atomisp / pci / atomisp2 / css2400 / isp / kernels / macc / macc_1.0 / ia_css_macc_types.h
CommitLineData
a49d2536
AC
1/*
2 * Support for Intel Camera Imaging ISP subsystem.
3 * Copyright (c) 2015, Intel Corporation.
4 *
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.
8 *
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
12 * more details.
13 */
14
15#ifndef __IA_CSS_MACC_TYPES_H
16#define __IA_CSS_MACC_TYPES_H
17
d929fb4e 18/* @file
a49d2536
AC
19* CSS-API header file for Multi-Axis Color Correction (MACC) parameters.
20*/
21
d929fb4e 22/* Number of axes in the MACC table. */
a49d2536 23#define IA_CSS_MACC_NUM_AXES 16
d929fb4e 24/* Number of coefficients per MACC axes. */
a49d2536 25#define IA_CSS_MACC_NUM_COEFS 4
d929fb4e 26/* The number of planes in the morphing table. */
a49d2536 27
d929fb4e 28/* Multi-Axis Color Correction (MACC) table.
a49d2536
AC
29 *
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.
34 *
35 * [MACC1]
36 * OutU = (data00 * InU + data01 * InV) >> 13
37 * OutV = (data10 * InU + data11 * InV) >> 13
38 *
39 * default/ineffective:
40 * OutU = (8192 * InU + 0 * InV) >> 13
41 * OutV = ( 0 * InU + 8192 * InV) >> 13
42 *
43 * [MACC2]
44 * OutU = (data00 * InU + data01 * InV) >> (13 - exp)
45 * OutV = (data10 * InU + data11 * InV) >> (13 - exp)
46 *
47 * default/ineffective: (exp=1)
48 * OutU = (4096 * InU + 0 * InV) >> (13 - 1)
49 * OutV = ( 0 * InU + 4096 * InV) >> (13 - 1)
50 */
51
52struct ia_css_macc_table {
53 int16_t data[IA_CSS_MACC_NUM_COEFS * IA_CSS_MACC_NUM_AXES];
d929fb4e 54 /** 16 of 2x2 matix
a49d2536
AC
55 MACC1: s2.13, [-65536,65535]
56 default/ineffective:
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} */
61};
62
63#endif /* __IA_CSS_MACC_TYPES_H */