diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-03-28 14:39:18 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-05-01 12:13:56 +0200 |
commit | d9ae982816edb51d4def8e58d2bbdade900acf33 (patch) | |
tree | 1f01dc3e60715d0c20a633bd80140a2fb48bc586 | |
parent | 97036161f78b336d9778460335d8fedb42259e5f (diff) |
iq: Add manual saturation setting
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rw-r--r-- | iq.c | 2 | ||||
-rw-r--r-- | iq.h | 2 | ||||
-rw-r--r-- | live.c | 6 | ||||
-rw-r--r-- | snapshot.c | 6 |
4 files changed, 16 insertions, 0 deletions
@@ -116,6 +116,7 @@ void iq_params_init(struct iq_params *params) params->gain_min = 8; params->gain_max = 1024; params->black_level = 64; + params->saturation = 1.0; } /** @@ -213,6 +214,7 @@ struct iq_tuning *iq_init(struct omap3_isp_device *isp, omap3_isp_sensor_set_gain(isp, iq->params.gain); omap3_isp_sensor_set_exposure(isp, iq->params.exposure); omap3_isp_ccdc_set_black_level(isp, iq->params.black_level); + omap3_isp_preview_set_saturation(isp, iq->params.saturation); omap3_isp_stats_get_format(isp, &format); window.left = params->window.left * format.width; @@ -40,6 +40,7 @@ struct omap3_isp_aewb_stats; * @gain_min: Minimum gain value * @gain_max: Maximum gain value * @black_level: Black level offset + * @saturation: Color saturation */ struct iq_params { struct { @@ -63,6 +64,7 @@ struct iq_params { unsigned int gain_max; unsigned int black_level; + float saturation; }; void iq_aewb_process(struct iq_tuning *iq, @@ -326,6 +326,7 @@ static void usage(const char *argv0) printf("-h, --help Show this help screen\n"); printf("-s, --skip n Skip display of n frames out of n+1\n"); printf(" --aewb param=value Set AEWB algorithm parameter 'param' to 'value'\n"); + printf(" --saturation value Set the saturation value [0.0-2.0]\n"); printf("\nSupported AEWB parameters are:\n"); printf("- ae-delay Number of frames to skip at stream start before enabling AE\n"); printf("- ae-interval Number of frames between AE algorithm runs (>= 1)\n"); @@ -343,10 +344,12 @@ static void usage(const char *argv0) } #define OPT_AEWB_PARAM 256 +#define OPT_SATURATION 257 static struct option opts[] = { { "aewb", 1, 0, OPT_AEWB_PARAM }, { "help", 0, 0, 'h' }, + { "saturation", 1, 0, OPT_SATURATION }, { "skip", 1, 0, 's' }, { 0, 0, 0, 0 } }; @@ -388,6 +391,9 @@ int main(int argc __attribute__((__unused__)), char *argv[] __attribute__((__unu return 1; } break; + case OPT_SATURATION: + iq_params.saturation = strtof(optarg, NULL); + break; default: printf("Invalid option -%c\n", c); printf("Run %s -h for help.\n", argv[0]); @@ -438,6 +438,7 @@ static void usage(const char *argv0) printf("-s, --size wxh Set the snapshot capture size\n"); printf("-v, --view Enable viewfinder\n"); printf(" --aewb param=value Set AEWB algorithm parameter 'param' to 'value'\n"); + printf(" --saturation value Set the saturation value [0.0-2.0]\n"); printf("\nSupported AEWB parameters are:\n"); printf("- ae-delay Number of frames to skip at stream start before enabling AE\n"); printf("- ae-interval Number of frames between AE algorithm runs (>= 1)\n"); @@ -455,6 +456,7 @@ static void usage(const char *argv0) } #define OPT_AEWB_PARAM 256 +#define OPT_SATURATION 257 static struct option opts[] = { { "aewb", 1, 0, OPT_AEWB_PARAM }, @@ -465,6 +467,7 @@ static struct option opts[] = { #if USE_LIBJPEG { "jpeg", 0, 0, 'j' }, #endif + { "saturation", 1, 0, OPT_SATURATION }, { "save", 0, 0, 'S' }, { "size", 1, 0, 's' }, { "snap-frames", 1, 0, 'N' }, @@ -565,6 +568,9 @@ int main(int argc __attribute__((__unused__)), char *argv[] __attribute__((__unu return 1; } break; + case OPT_SATURATION: + iq_params.saturation = strtof(optarg, NULL); + break; default: printf("Invalid option -%c\n", c); printf("Run %s -h for help.\n", argv[0]); |