diff options
Diffstat (limited to 'live.c')
-rw-r--r-- | live.c | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -46,11 +46,13 @@ #include "isp/list.h" #include "isp/omap3isp.h" +#include "isp/stats.h" #include "isp/tools.h" #include "isp/v4l2.h" #include "isp/v4l2-pool.h" #include "events.h" +#include "iq.h" #include "videoout.h" #define MEDIA_DEVICE "/dev/media0" @@ -65,10 +67,21 @@ static unsigned int frame_skip = 0; static struct omap3_isp_device *isp = NULL; static struct videoout *vo = NULL; +static struct iq_tuning *iq = NULL; static struct events events; /* ----------------------------------------------------------------------------- + * Image quality + */ + +static void __iq_aewb_process(struct omap3_isp_device *isp __attribute__((__unused__)), + const struct omap3_isp_aewb_stats *stats) +{ + iq_aewb_process(iq, stats); +} + +/* ----------------------------------------------------------------------------- * Events */ @@ -135,6 +148,7 @@ static struct omap3_isp_operations isp_ops = { .viewfinder_ready = viewfinder_process, .watch_fd = __events_watch_fd, .unwatch_fd = __events_unwatch_fd, + .aewb_ready = __iq_aewb_process, }; /* ----------------------------------------------------------------------------- @@ -387,6 +401,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); + if (iq == NULL) { + printf("error: unable to initialize image quality tuning\n"); + goto cleanup; + } + /* Initialize video output. */ vo_devname = video_out_find(); if (vo_devname == NULL) { @@ -456,6 +476,8 @@ cleanup: omap3_isp_close(isp); if (vo) vo_cleanup(vo); + if (iq) + iq_cleanup(iq); return exit_code; } |