]>
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_GC2_TYPES_H | |
16 | #define __IA_CSS_GC2_TYPES_H | |
17 | ||
18 | #include "isp/kernels/ctc/ctc_1.0/ia_css_ctc_types.h" /* FIXME: needed for ia_css_vamem_type */ | |
19 | ||
d929fb4e | 20 | /* @file |
a49d2536 AC |
21 | * CSS-API header file for Gamma Correction parameters. |
22 | */ | |
23 | ||
d929fb4e | 24 | /* sRGB Gamma table, used for sRGB Gamma Correction. |
a49d2536 AC |
25 | * |
26 | * ISP block: GC2 (sRGB Gamma Correction) | |
27 | * (ISP1: GC1(YUV Gamma Correction) is used.) | |
28 | * ISP2: GC2 is used. | |
29 | */ | |
30 | ||
d929fb4e | 31 | /* Number of elements in the sRGB gamma table. */ |
a49d2536 AC |
32 | #define IA_CSS_VAMEM_1_RGB_GAMMA_TABLE_SIZE_LOG2 8 |
33 | #define IA_CSS_VAMEM_1_RGB_GAMMA_TABLE_SIZE (1U<<IA_CSS_VAMEM_1_RGB_GAMMA_TABLE_SIZE_LOG2) | |
34 | ||
d929fb4e | 35 | /* Number of elements in the sRGB gamma table. */ |
a49d2536 AC |
36 | #define IA_CSS_VAMEM_2_RGB_GAMMA_TABLE_SIZE_LOG2 8 |
37 | #define IA_CSS_VAMEM_2_RGB_GAMMA_TABLE_SIZE ((1U<<IA_CSS_VAMEM_2_RGB_GAMMA_TABLE_SIZE_LOG2) + 1) | |
38 | ||
d929fb4e | 39 | /** IA_CSS_VAMEM_TYPE_1(ISP2300) or |
a49d2536 AC |
40 | IA_CSS_VAMEM_TYPE_2(ISP2400) */ |
41 | union ia_css_rgb_gamma_data { | |
42 | uint16_t vamem_1[IA_CSS_VAMEM_1_RGB_GAMMA_TABLE_SIZE]; | |
d929fb4e | 43 | /** RGB Gamma table on vamem type1. This table is not used, |
a49d2536 AC |
44 | because sRGB Gamma Correction is not implemented for ISP2300. */ |
45 | uint16_t vamem_2[IA_CSS_VAMEM_2_RGB_GAMMA_TABLE_SIZE]; | |
d929fb4e | 46 | /** RGB Gamma table on vamem type2. u0.12, [0,4095] */ |
a49d2536 AC |
47 | }; |
48 | ||
49 | struct ia_css_rgb_gamma_table { | |
50 | enum ia_css_vamem_type vamem_type; | |
51 | union ia_css_rgb_gamma_data data; | |
52 | }; | |
53 | ||
54 | #endif /* __IA_CSS_GC2_TYPES_H */ |