mirror of
https://github.com/patjak/facetimehd.git
synced 2026-04-09 11:02:31 +02:00
facetimehd: add functions to set saturation and hue
This commit is contained in:
28
fthd_isp.c
28
fthd_isp.c
@@ -1001,6 +1001,34 @@ int fthd_isp_cmd_channel_contrast_set(struct fthd_private *dev_priv, int channel
|
||||
return fthd_isp_cmd(dev_priv, CISP_CMD_CH_SCALER_CONTRAST_SET, &cmd, sizeof(cmd), &len);
|
||||
}
|
||||
|
||||
int fthd_isp_cmd_channel_saturation_set(struct fthd_private *dev_priv, int channel, int saturation)
|
||||
{
|
||||
struct isp_cmd_channel_saturation_set cmd;
|
||||
int len;
|
||||
|
||||
pr_debug("set saturation %d\n", saturation);
|
||||
|
||||
memset(&cmd, 0, sizeof(cmd));
|
||||
cmd.channel = channel;
|
||||
cmd.contrast = saturation;
|
||||
len = sizeof(cmd);
|
||||
return fthd_isp_cmd(dev_priv, CISP_CMD_CH_SCALER_SATURATION_SET, &cmd, sizeof(cmd), &len);
|
||||
}
|
||||
|
||||
int fthd_isp_cmd_channel_hue_set(struct fthd_private *dev_priv, int channel, int hue)
|
||||
{
|
||||
struct isp_cmd_channel_hue_set cmd;
|
||||
int len;
|
||||
|
||||
pr_debug("set hue %d\n", hue);
|
||||
|
||||
memset(&cmd, 0, sizeof(cmd));
|
||||
cmd.channel = channel;
|
||||
cmd.contrast = hue;
|
||||
len = sizeof(cmd);
|
||||
return fthd_isp_cmd(dev_priv, CISP_CMD_CH_SCALER_HUE_SET, &cmd, sizeof(cmd), &len);
|
||||
}
|
||||
|
||||
int fthd_start_channel(struct fthd_private *dev_priv, int channel)
|
||||
{
|
||||
int ret, x1 = 0, x2 = 0, pixelformat;
|
||||
|
||||
12
fthd_isp.h
12
fthd_isp.h
@@ -661,6 +661,16 @@ struct isp_cmd_channel_contrast_set {
|
||||
u32 contrast;
|
||||
};
|
||||
|
||||
struct isp_cmd_channel_saturation_set {
|
||||
u32 channel;
|
||||
u32 contrast;
|
||||
};
|
||||
|
||||
struct isp_cmd_channel_hue_set {
|
||||
u32 channel;
|
||||
u32 contrast;
|
||||
};
|
||||
|
||||
struct isp_cmd_channel_buffer_return {
|
||||
u32 channel;
|
||||
};
|
||||
@@ -714,6 +724,8 @@ extern int fthd_isp_cmd_channel_motion_history_stop(struct fthd_private *dev_pri
|
||||
extern int fthd_isp_cmd_channel_ae_metering_mode_set(struct fthd_private *dev_priv, int channel, int mode);
|
||||
extern int fthd_isp_cmd_channel_brightness_set(struct fthd_private *dev_priv, int channel, int brightness);
|
||||
extern int fthd_isp_cmd_channel_contrast_set(struct fthd_private *dev_priv, int channel, int contrast);
|
||||
extern int fthd_isp_cmd_channel_saturation_set(struct fthd_private *dev_priv, int channel, int saturation);
|
||||
extern int fthd_isp_cmd_channel_hue_set(struct fthd_private *dev_priv, int channel, int hue);
|
||||
extern int fthd_isp_cmd_channel_buffer_return(struct fthd_private *dev_priv, int channel);
|
||||
extern int fthd_start_channel(struct fthd_private *dev_priv, int channel);
|
||||
extern int fthd_stop_channel(struct fthd_private *dev_priv, int channel);
|
||||
|
||||
Reference in New Issue
Block a user