303 lines
6.8 KiB
C
303 lines
6.8 KiB
C
/*
|
|
* Copyright (c) 2019 Amlogic, Inc. All rights reserved.
|
|
*
|
|
* This source code is subject to the terms and conditions defined in the
|
|
* file 'LICENSE' which is part of this source code package.
|
|
*
|
|
* Description:
|
|
*/
|
|
#ifndef __COMMON_H__
|
|
#define __COMMON_H__
|
|
|
|
#define MAX_WB_GAMMA_POINT (21)
|
|
|
|
#ifndef __SOURCE_INPUT_PARAM__
|
|
#define __SOURCE_INPUT_PARAM__
|
|
typedef struct source_input_param_s {
|
|
int source_input;
|
|
int sig_fmt;
|
|
int trans_fmt;
|
|
} source_input_param_t;
|
|
#endif
|
|
|
|
#ifndef __TVIN_CUTWIN__
|
|
#define __TVIN_CUTWIN__
|
|
typedef struct tvin_cutwin_s {
|
|
unsigned short hs;
|
|
unsigned short he;
|
|
unsigned short vs;
|
|
unsigned short ve;
|
|
} tvin_cutwin_t;
|
|
#endif
|
|
|
|
#ifndef __NOLINE_PARAMS__
|
|
#define __NOLINE_PARAMS__
|
|
typedef struct noline_params_s {
|
|
int osd0;
|
|
int osd25;
|
|
int osd50;
|
|
int osd75;
|
|
int osd100;
|
|
} noline_params_t;
|
|
#endif
|
|
|
|
#ifndef __NOLINE_PARAMS_TYPE__
|
|
#define __NOLINE_PARAMS_TYPE__
|
|
typedef enum noline_params_type_e {
|
|
NOLINE_PARAMS_TYPE_BRIGHTNESS,
|
|
NOLINE_PARAMS_TYPE_CONTRAST,
|
|
NOLINE_PARAMS_TYPE_SATURATION,
|
|
NOLINE_PARAMS_TYPE_HUE,
|
|
NOLINE_PARAMS_TYPE_SHARPNESS,
|
|
NOLINE_PARAMS_TYPE_VOLUME,
|
|
NOLINE_PARAMS_TYPE_BACKLIGHT,
|
|
NOLINE_PARAMS_TYPE_MAX,
|
|
} noline_params_type_t;
|
|
#endif
|
|
|
|
#ifndef __TVAPP_RGB_OGO__
|
|
#define __TVAPP_RGB_OGO__
|
|
typedef struct tvpq_rgb_ogo_s {
|
|
unsigned int en;
|
|
int r_pre_offset;
|
|
int g_pre_offset;
|
|
int b_pre_offset;
|
|
unsigned int r_gain;
|
|
unsigned int g_gain;
|
|
unsigned int b_gain;
|
|
int r_post_offset;
|
|
int g_post_offset;
|
|
int b_post_offset;
|
|
} tvpq_rgb_ogo_t;
|
|
#endif
|
|
|
|
#ifndef __VPP_COLOR_TEMPERATURE_MODE__
|
|
#define __VPP_COLOR_TEMPERATURE_MODE__
|
|
typedef enum vpp_color_temperature_mode_e {
|
|
VPP_COLOR_TEMPERATURE_MODE_STANDARD,
|
|
VPP_COLOR_TEMPERATURE_MODE_WARM,
|
|
VPP_COLOR_TEMPERATURE_MODE_COLD,
|
|
VPP_COLOR_TEMPERATURE_MODE_USER,
|
|
VPP_COLOR_TEMPERATURE_MODE_MAX,
|
|
} vpp_color_temperature_mode_t;
|
|
#endif
|
|
|
|
#ifndef __DISPLAY_MODE_
|
|
#define __DISPLAY_MODE_
|
|
typedef enum vpp_display_mode_e {
|
|
VPP_DISPLAY_MODE_169,
|
|
VPP_DISPLAY_MODE_PERSON,
|
|
VPP_DISPLAY_MODE_MOVIE,
|
|
VPP_DISPLAY_MODE_CAPTION,
|
|
VPP_DISPLAY_MODE_MODE43,
|
|
VPP_DISPLAY_MODE_FULL,
|
|
VPP_DISPLAY_MODE_NORMAL,
|
|
VPP_DISPLAY_MODE_NOSCALEUP,
|
|
VPP_DISPLAY_MODE_CROP_FULL,
|
|
VPP_DISPLAY_MODE_CROP,
|
|
VPP_DISPLAY_MODE_ZOOM,
|
|
VPP_DISPLAY_MODE_FULL_STRETCH,
|
|
VPP_DISPLAY_MODE_43_IGNORE,
|
|
VPP_DISPLAY_MODE_43_LETTER_BOX,
|
|
VPP_DISPLAY_MODE_43_PAN_SCAN,
|
|
VPP_DISPLAY_MODE_43_COMBINED,
|
|
VPP_DISPLAY_MODE_169_IGNORE,
|
|
VPP_DISPLAY_MODE_169_LETTER_BOX,
|
|
VPP_DISPLAY_MODE_169_PAN_SCAN,
|
|
VPP_DISPLAY_MODE_169_COMBINED,
|
|
VPP_DISPLAY_MODE_MAX,
|
|
} vpp_display_mode_t;
|
|
#endif
|
|
|
|
#ifndef __SHARPNESS_TIMING__
|
|
#define __SHARPNESS_TIMING__
|
|
typedef enum sharpness_timing_e {
|
|
SHARPNESS_TIMING_SD = 0,
|
|
SHARPNESS_TIMING_HD,
|
|
} sharpness_timing_t;
|
|
#endif
|
|
|
|
#ifndef __PQ_TYPE__
|
|
#define __PQ_TYPE__
|
|
typedef enum pq_type_e {
|
|
ALL,
|
|
COLOR,
|
|
SHARPNESS_SD,
|
|
SHARPNESS_HD,
|
|
_3D_NR_GAIN,
|
|
_2D_NR_GAIN,
|
|
DCI,
|
|
GAMMA,
|
|
FMD,
|
|
CTI_SR0,
|
|
CTI_SR1,
|
|
DEJAGGY_SR0,
|
|
DEJAGGY_SR1,
|
|
DRT_SR0,
|
|
DRT_SR1,
|
|
BLACK_STRETCH,
|
|
} pq_type_t;
|
|
#endif
|
|
|
|
#ifndef __CMS_CM_PARAM__
|
|
#define __CMS_CM_PARAM__
|
|
typedef struct vpp_single_color_param_cm_s {
|
|
int sat;
|
|
int hue;
|
|
int luma;
|
|
} vpp_single_color_param_cm_t;
|
|
#endif
|
|
|
|
#ifndef __CMS_3DLUT_PARAM__
|
|
#define __CMS_3DLUT_PARAM__
|
|
typedef struct vpp_single_color_param_3dlut_s {
|
|
int red;
|
|
int green;
|
|
int blue;
|
|
} vpp_single_color_param_3dlut_t;
|
|
#endif
|
|
|
|
#ifndef __PQ_DB_VERSION_INFO__
|
|
#define __PQ_DB_VERSION_INFO__
|
|
typedef struct tvpq_databaseinfo_s {
|
|
char version[32];
|
|
}tvpq_databaseinfo_t;
|
|
#endif
|
|
|
|
typedef struct _pq_mode_parameters {
|
|
int backlight;
|
|
int brightness;
|
|
int contrast;
|
|
int saturation;
|
|
int sharpness;
|
|
int gamma;
|
|
int dynamic_backlight;
|
|
int local_contrast;
|
|
int dynamic_contrast;
|
|
int super_resolution;
|
|
int color_temperature;
|
|
int hue;
|
|
int eye_protection;
|
|
int hdr_tone_mapping;
|
|
int color_gamut;
|
|
int display_mode;
|
|
int noise_reduction;
|
|
int MPEG_noise_reduction;
|
|
int smooth_plus;
|
|
}pq_mode_parameters;
|
|
|
|
typedef enum _WB_GAMMA_MODE {
|
|
WB_GAMMA_MODE_2POINT,
|
|
WB_GAMMA_MODE_10POINT,
|
|
WB_GAMMA_MODE_11POINT,
|
|
WB_GAMMA_MODE_20POINT,
|
|
WB_GAMMA_MODE_MAX,
|
|
} WB_GAMMA_MODE;
|
|
|
|
typedef struct _WB_GAMMA_TABLE_DATA {
|
|
int R_OFFSET[MAX_WB_GAMMA_POINT];
|
|
int G_OFFSET[MAX_WB_GAMMA_POINT];
|
|
int B_OFFSET[MAX_WB_GAMMA_POINT];
|
|
} WB_GAMMA_TABLE_DATA;
|
|
|
|
typedef enum vpp_cms_color_e {
|
|
VPP_COLOR_9_PURPLE = 0,
|
|
VPP_COLOR_9_RED,
|
|
VPP_COLOR_9_SKIN,
|
|
VPP_COLOR_9_YELLOW,
|
|
VPP_COLOR_9_YELLOW_GREEN,
|
|
VPP_COLOR_9_GREEN,
|
|
VPP_COLOR_9_BLUE_GREEN,
|
|
VPP_COLOR_9_CYAN,
|
|
VPP_COLOR_9_BLUE,
|
|
VPP_COLOR_9_MAX,
|
|
} vpp_cms_color_t;
|
|
|
|
typedef struct vpp_cms_cm_param_e {
|
|
vpp_single_color_param_cm_t data[VPP_COLOR_9_MAX];
|
|
} vpp_cms_cm_param_t;
|
|
|
|
typedef struct _all_pq_parameters {
|
|
pq_mode_parameters PictureModeData;
|
|
WB_GAMMA_TABLE_DATA WBGammaData;
|
|
vpp_cms_cm_param_t color_tune;
|
|
} all_pq_parameters;
|
|
|
|
typedef enum _pq_case_func_e {
|
|
PQ_CASE_FUNC_PICTURE_MODE = 0,
|
|
PQ_CASE_FUNC_BACKLIGHT,
|
|
PQ_CASE_FUNC_CONTRAST,
|
|
PQ_CASE_FUNC_BRIGHTNESS,
|
|
PQ_CASE_FUNC_SATURATION,
|
|
PQ_CASE_FUNC_HUE,
|
|
PQ_CASE_FUNC_SHARPNESS,
|
|
PQ_CASE_FUNC_ASPECT_RATIO,
|
|
PQ_CASE_FUNC_AI_PQ,
|
|
PQ_CASE_FUNC_AI_COLOR,
|
|
PQ_CASE_FUNC_AI_SR,
|
|
PQ_CASE_FUNC_GAMMA,
|
|
PQ_CASE_FUNC_MANUAL_GAMMA,
|
|
PQ_CASE_FUNC_COLOR_TEMP,
|
|
PQ_CASE_FUNC_COLOR_MANAGEMENT,
|
|
PQ_CASE_FUNC_COLOR_CUSTOMIZE,
|
|
PQ_CASE_FUNC_COLOR_RANGE_MODE,
|
|
PQ_CASE_FUNC_COLOR_SPACE,
|
|
PQ_CASE_FUNC_GLOBAL_DIMMING,
|
|
PQ_CASE_FUNC_LOCAL_DIMMING,
|
|
PQ_CASE_FUNC_BLACK_STRETCH,
|
|
PQ_CASE_FUNC_DNLP,
|
|
PQ_CASE_FUNC_LOCAL_CONTRAST,
|
|
PQ_CASE_FUNC_SR,
|
|
PQ_CASE_FUNC_DNR,
|
|
PQ_CASE_FUNC_DEBLOCK,
|
|
PQ_CASE_FUNC_DEMOSQUITO,
|
|
PQ_CASE_FUNC_DECONTOUR,
|
|
PQ_CASE_FUNC_MEMC,
|
|
PQ_CASE_FUNC_FILM_MODE,
|
|
PQ_CASE_FUNC_AISR_DEMO_LR_SHOW,
|
|
PQ_CASE_FUNC_WHITE_STRETCH,
|
|
PQ_CASE_FUNC_RESET,
|
|
PQ_CASE_FUNC_EYEPROTECTION_MODE,
|
|
PQ_CASE_FUNC_MAX,
|
|
} pq_case_func_e;
|
|
|
|
typedef struct pq_module_demo_aisr_axis_s
|
|
{
|
|
unsigned int xstart;
|
|
unsigned int ystart;
|
|
unsigned int xend;
|
|
unsigned int yend;
|
|
} pq_module_demo_aisr_axis_t;
|
|
|
|
enum pq_vdin_cn_type_e {
|
|
PQ_CN_TYPE_GRAPHICS = 0,
|
|
PQ_CN_TYPE_PHOTO,
|
|
PQ_CN_TYPE_CINEMA,
|
|
PQ_CN_TYPE_GAME,
|
|
};
|
|
|
|
enum pq_vdin_vrr_mode_e {
|
|
PQ_VRR_OFF = 0,
|
|
PQ_VRR_BASIC,
|
|
PQ_VRR_FREESYNC,
|
|
PQ_VRR_FREESYNC_PREMIUM,
|
|
PQ_VRR_FREESYNC_PREMIUM_PRO,
|
|
PQ_VRR_FREESYNC_PREMIUM_G_SYNC,
|
|
PQ_VRR_LATENCY,
|
|
PQ_VRR_NUM
|
|
};
|
|
|
|
typedef struct vdin_sig_info_s {
|
|
unsigned int fps;
|
|
|
|
//allm info
|
|
unsigned int allm_mode; /* bit0:hdmi allm, bit1:dv allm*/
|
|
unsigned int it_content;
|
|
enum pq_vdin_cn_type_e cn_type;
|
|
|
|
//vrr info
|
|
enum pq_vdin_vrr_mode_e vrr_mode;
|
|
} vdin_sig_info_t;
|
|
|
|
#endif
|