]>
Commit | Line | Data |
---|---|---|
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_CSC_TYPES_H | |
16 | #define __IA_CSS_CSC_TYPES_H | |
17 | ||
d929fb4e | 18 | /* @file |
a49d2536 AC |
19 | * CSS-API header file for Color Space Conversion parameters. |
20 | */ | |
21 | ||
d929fb4e | 22 | /* Color Correction configuration. |
a49d2536 AC |
23 | * |
24 | * This structure is used for 3 cases. | |
25 | * ("YCgCo" is the output format of Demosaic.) | |
26 | * | |
27 | * 1. Color Space Conversion (YCgCo to YUV) for ISP1. | |
28 | * ISP block: CSC1 (Color Space Conversion) | |
29 | * struct ia_css_cc_config *cc_config | |
30 | * | |
31 | * 2. Color Correction Matrix (YCgCo to RGB) for ISP2. | |
32 | * ISP block: CCM2 (Color Correction Matrix) | |
33 | * struct ia_css_cc_config *yuv2rgb_cc_config | |
34 | * | |
35 | * 3. Color Space Conversion (RGB to YUV) for ISP2. | |
36 | * ISP block: CSC2 (Color Space Conversion) | |
37 | * struct ia_css_cc_config *rgb2yuv_cc_config | |
38 | * | |
39 | * default/ineffective: | |
40 | * 1. YCgCo -> YUV | |
41 | * 1 0.174 0.185 | |
42 | * 0 -0.66252 -0.66874 | |
43 | * 0 -0.83738 0.58131 | |
44 | * | |
45 | * fraction_bits = 12 | |
46 | * 4096 713 758 | |
47 | * 0 -2714 -2739 | |
48 | * 0 -3430 2381 | |
49 | * | |
50 | * 2. YCgCo -> RGB | |
51 | * 1 -1 1 | |
52 | * 1 1 0 | |
53 | * 1 -1 -1 | |
54 | * | |
55 | * fraction_bits = 12 | |
56 | * 4096 -4096 4096 | |
57 | * 4096 4096 0 | |
58 | * 4096 -4096 -4096 | |
59 | * | |
60 | * 3. RGB -> YUV | |
61 | * 0.299 0.587 0.114 | |
62 | * -0.16874 -0.33126 0.5 | |
63 | * 0.5 -0.41869 -0.08131 | |
64 | * | |
65 | * fraction_bits = 13 | |
66 | * 2449 4809 934 | |
67 | * -1382 -2714 4096 | |
68 | * 4096 -3430 -666 | |
69 | */ | |
70 | struct ia_css_cc_config { | |
d929fb4e | 71 | uint32_t fraction_bits;/** Fractional bits of matrix. |
a49d2536 | 72 | u8.0, [0,13] */ |
d929fb4e | 73 | int32_t matrix[3 * 3]; /** Conversion matrix. |
a49d2536 AC |
74 | s[13-fraction_bits].[fraction_bits], |
75 | [-8192,8191] */ | |
76 | }; | |
77 | ||
78 | #endif /* __IA_CSS_CSC_TYPES_H */ |