MT2523 API Reference  LinkIt SDK v4
hal_display_color.h
1 /* Copyright Statement:
2  *
3  * (C) 2005-2016 MediaTek Inc. All rights reserved.
4  *
5  * This software/firmware and related documentation ("MediaTek Software") are
6  * protected under relevant copyright laws. The information contained herein
7  * is confidential and proprietary to MediaTek Inc. ("MediaTek") and/or its licensors.
8  * Without the prior written permission of MediaTek and/or its licensors,
9  * any reproduction, modification, use or disclosure of MediaTek Software,
10  * and information contained herein, in whole or in part, shall be strictly prohibited.
11  * You may only use, reproduce, modify, or distribute (as applicable) MediaTek Software
12  * if you have agreed to and been bound by the applicable license agreement with
13  * MediaTek ("License Agreement") and been granted explicit permission to do so within
14  * the License Agreement ("Permitted User"). If you are not a Permitted User,
15  * please cease any access or use of MediaTek Software immediately.
16  * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
17  * THAT MEDIATEK SOFTWARE RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES
18  * ARE PROVIDED TO RECEIVER ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL
19  * WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
20  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
21  * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
22  * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
23  * SUPPLIED WITH MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH
24  * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES
25  * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES
26  * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK
27  * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
28  * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND
29  * CUMULATIVE LIABILITY WITH RESPECT TO MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
30  * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE MEDIATEK SOFTWARE AT ISSUE,
31  * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO
32  * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
33  */
34 
35 #ifndef __HAL_DISPLAY_COLOR_H__
36 #define __HAL_DISPLAY_COLOR_H__
37 
38 #include "hal_platform.h"
39 
40 #ifdef HAL_DISPLAY_COLOR_MODULE_ENABLED
41 
109 #ifdef __cplusplus
110 extern "C" {
111 #endif
112 
118 typedef enum {
124 
126 typedef enum {
131 
141 typedef struct {
142  uint8_t sharpness;
143  uint8_t contrast;
144  uint8_t saturation;
146 
148 typedef struct {
149  uint8_t gain;
150  uint8_t soft_ratio;
151  uint8_t limit;
152  uint8_t bound;
154 
156 typedef struct {
157  uint8_t point0;
158  uint8_t point1;
159  uint8_t gain0;
160  uint8_t gain1;
161  uint8_t gain2;
163 
165 typedef struct {
166  uint16_t ctrl_point;
167  uint8_t coef_a;
168  uint8_t gain;
170 
172 typedef struct {
173  hal_display_color_mode_t mode;
179 
192 
203 
214 
225 
236 
247 
258 
268 hal_display_color_status_t hal_display_color_set_mode(hal_display_color_mode_t mode);
269 
280 
281 #ifdef __cplusplus
282 }
283 #endif
284 
290 #endif /* HAL_DISPLAY_COLOR_MODULE_ENABLED */
291 #endif /* __HAL_DISPLAY_COLOR_H__ */
The display color saturation setting.
Definition: hal_display_color.h:165
hal_display_color_sharpness_t sharpness
Sharpness.
Definition: hal_display_color.h:174
uint16_t ctrl_point
Control point for saturation enhancement.
Definition: hal_display_color.h:166
The display color contrast setting.
Definition: hal_display_color.h:156
Invalid parameter.
Definition: hal_display_color.h:120
hal_display_color_contrast_t contrast
Contrast.
Definition: hal_display_color.h:175
uint8_t gain1
The gain of segment 1 of contrast enhancement.
Definition: hal_display_color.h:160
hal_display_color_mode_t
The display color mode options.
Definition: hal_display_color.h:126
Default mode.
Definition: hal_display_color.h:127
uint8_t contrast
Contrast index.
Definition: hal_display_color.h:143
hal_display_color_status_t hal_display_color_set_mode(hal_display_color_mode_t mode)
This function sets the color mode.
uint8_t saturation
Saturation index.
Definition: hal_display_color.h:144
hal_display_color_status_t hal_display_color_set_color_engine(bool enable)
This function enables or disables the color engine.
hal_display_color_status_t hal_display_color_set_saturation(hal_display_color_saturation_t *saturation)
This function sets the saturation settings to color settings.
hal_display_color_saturation_t saturation
Saturation.
Definition: hal_display_color.h:176
The color engine power configuration has failed.
Definition: hal_display_color.h:121
uint8_t coef_a
Coefficient A for saturation enhancement.
Definition: hal_display_color.h:167
hal_display_color_status_t hal_display_color_apply_color(uint32_t src_width)
This function applies the color settings to color hardware engine.
uint8_t gain
The gain of sharpness enhancement.
Definition: hal_display_color.h:149
bool bypass_config
Bypass the display color engine.
Definition: hal_display_color.h:177
uint8_t gain
The gain for saturation enhancement.
Definition: hal_display_color.h:168
The display color customization.
Definition: hal_display_color.h:141
uint8_t gain0
The gain of segment 0 of contrast enhancement.
Definition: hal_display_color.h:159
uint8_t point0
The control point 0 for contrast enhancement.
Definition: hal_display_color.h:157
hal_display_color_status_t hal_display_color_init(void)
This function initializes the display color settings.
uint8_t sharpness
Sharpness index.
Definition: hal_display_color.h:142
Successful.
Definition: hal_display_color.h:122
Initialization has failed.
Definition: hal_display_color.h:119
hal_display_color_status_t hal_display_color_set_sharpness(hal_display_color_sharpness_t *sharpness)
This function sets the sharpness settings to color settings.
uint8_t soft_ratio
The soft ratio of sharpness enhancement.
Definition: hal_display_color.h:150
hal_display_color_status_t hal_display_color_set_bypass(bool bypass)
This function sets the bypass settings to color settings.
hal_display_color_status_t hal_display_color_get_color_engine(bool *enable)
This function gets the color engine status (disable or enable), it then returns the bypass configurat...
uint8_t limit
The limit of sharpness enhancement.
Definition: hal_display_color.h:151
hal_display_color_mode_t mode
Mode setting.
Definition: hal_display_color.h:173
uint8_t point1
The control point 1 for contrast enhancement.
Definition: hal_display_color.h:158
The color parameters.
Definition: hal_display_color.h:172
Camera mode.
Definition: hal_display_color.h:128
uint8_t gain2
The gain of segment 2 of contrast enhancement.
Definition: hal_display_color.h:161
hal_display_color_status_t hal_display_color_set_contrast(hal_display_color_contrast_t *contrast)
This function sets the contrast settings to color settings.
hal_display_color_status_t
The return status of display color API.
Definition: hal_display_color.h:118
The display color sharpness setting.
Definition: hal_display_color.h:148
uint8_t bound
The bound of sharpness enhancement.
Definition: hal_display_color.h:152
The number of color modes.
Definition: hal_display_color.h:129