diff options
Diffstat (limited to 'live.c')
-rw-r--r-- | live.c | 17 |
1 files changed, 13 insertions, 4 deletions
@@ -371,6 +371,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(" --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"); @@ -390,9 +391,11 @@ 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 }, + { "disable-aewb", 0, 0, OPT_AEWB_DISABLE }, { "help", 0, 0, 'h' }, { "saturation", 1, 0, OPT_SATURATION }, { "skip", 1, 0, 's' }, @@ -411,6 +414,7 @@ int main(int argc __attribute__((__unused__)), char *argv[] __attribute__((__unu int exit_code = EXIT_FAILURE; const char *vo_devname; unsigned int colorkey; + bool enable_aewb = true; float fps; int ret; int c; @@ -428,6 +432,9 @@ int main(int argc __attribute__((__unused__)), char *argv[] __attribute__((__unu case 's': frame_skip = atoi(optarg); break; + case OPT_AEWB_DISABLE: + enable_aewb = false; + break; case OPT_AEWB_PARAM: ret = iq_params_parse(&iq_params, optarg); if (ret < 0) { @@ -485,10 +492,12 @@ int main(int argc __attribute__((__unused__)), char *argv[] __attribute__((__unu printf("viewfinder configured for %04x %ux%u\n", view_format.code, view_format.width, view_format.height); - 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; + } } /* Initialize video output. */ |