diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-07-03 00:50:31 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-10-20 21:28:23 +0200 |
commit | 673222f6f296cf4b9785cd9a1f445f5790cd8e01 (patch) | |
tree | bed8e2e4b143fa62e5175b24ab36b76aa88a53fb /snapshot.c | |
parent | 23b31323e49efd89d1ef40ceb9488579069929e6 (diff) |
live, snapshot: Add option to disable AEWB
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'snapshot.c')
-rw-r--r-- | snapshot.c | 17 |
1 files changed, 13 insertions, 4 deletions
@@ -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(" --disable-aewb Disable AEWB\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"); @@ -457,10 +458,12 @@ static void usage(const char *argv0) #define OPT_AEWB_PARAM 256 #define OPT_SATURATION 257 +#define OPT_AEWB_DISABLE 258 static struct option opts[] = { { "aewb", 1, 0, OPT_AEWB_PARAM }, { "crop", 1, 0, 'c' }, + { "disable-aewb", 0, 0, OPT_AEWB_DISABLE }, { "format", 1, 0, 'f' }, { "help", 0, 0, 'h' }, { "interval", 1, 0, 'i' }, @@ -484,6 +487,7 @@ int main(int argc __attribute__((__unused__)), char *argv[] __attribute__((__unu struct timespec start, end; struct iq_params iq_params; int exit_code = EXIT_FAILURE; + bool enable_aewb = true; float fps; int ret; int c; @@ -559,6 +563,9 @@ int main(int argc __attribute__((__unused__)), char *argv[] __attribute__((__unu vf.enabled = true; snap.trigger = SNAPSHOT_TRIGGER_MANUAL; break; + case OPT_AEWB_DISABLE: + enable_aewb = false; + break; case OPT_AEWB_PARAM: ret = iq_params_parse(&iq_params, optarg); if (ret < 0) { @@ -610,10 +617,12 @@ int main(int argc __attribute__((__unused__)), char *argv[] __attribute__((__unu if (ret < 0) goto cleanup; - iq = iq_init(isp, &iq_params); - if (iq == NULL) { - printf("error: unable to initialize image quality tuning\n"); - goto cleanup; + if (enable_aewb) { + iq = iq_init(isp, &iq_params); + if (iq == NULL) { + printf("error: unable to initialize image quality tuning\n"); + goto cleanup; + } } /* Start the viewfinder if needed. */ |