From 349fe860ef96d9e31fcaa85643f44796dd863199 Mon Sep 17 00:00:00 2001 From: Marko Ollonen Date: Mon, 5 Nov 2012 16:38:53 +0200 Subject: [PATCH] combine AfAeAwb process methods and pass frame timestamp to 3A. Change-Id: I9db9672696f06b388a79a33efcb3e2b1d51a9039 --- gst-libs/atomisphal/gstv4l2mfldadvci.c | 24 +++--------------------- gst-libs/atomisphal/gstv4l2mfldadvci.h | 4 +--- gst-libs/atomisphal/mfld_cam.c | 13 ++++--------- packaging/mfldv4l2camsrc.changes | 3 +++ 4 files changed, 11 insertions(+), 33 deletions(-) diff --git a/gst-libs/atomisphal/gstv4l2mfldadvci.c b/gst-libs/atomisphal/gstv4l2mfldadvci.c index afd6546..2bea9e7 100644 --- a/gst-libs/atomisphal/gstv4l2mfldadvci.c +++ b/gst-libs/atomisphal/gstv4l2mfldadvci.c @@ -332,14 +332,6 @@ lib_3a_af_stop( ) ci_adv_af_stop(); } - -static void -lib_3a_ae_process( ) -{ - /* ? */ - // ia_3a_calibration_ae_process();; -} - static void lib_3a_ae_calc_for_flash( ) { @@ -348,14 +340,10 @@ lib_3a_ae_calc_for_flash( ) } static void -lib_3a_af_process( ) +lib_3a_AeAfAwb_process( struct timeval *frame_timestamp) { - /* ? TODO check */ int status; - struct timeval frame_timestamp; - - status = gettimeofday(&frame_timestamp, NULL); - status = ci_adv_process_frame(TRUE,&frame_timestamp); + status = ci_adv_process_frame(TRUE,frame_timestamp); } static void lib_3a_get_statistics( ) @@ -411,10 +399,6 @@ static void lib_3a_awb_apply_results( ) { } -static void -lib_3a_awb_process( ) -{ -} void lib_3a_link_functions_init (GstV4l2MFLDAdvCI *mfldadvci) @@ -427,9 +411,7 @@ lib_3a_link_functions_init (GstV4l2MFLDAdvCI *mfldadvci) mfldadvci->mode_spec_init = lib_3a_int_void; /* TODO */ mfldadvci->switch_mode = lib_3a_switch_mode; - mfldadvci->ae_process = lib_3a_ae_process; - mfldadvci->af_process = lib_3a_af_process; - mfldadvci->awb_process = lib_3a_awb_process; + mfldadvci->AeAfAwb_process = lib_3a_AeAfAwb_process; mfldadvci->get_statistics = lib_3a_get_statistics; /* TODO atomisp_dis_statistics ? */ mfldadvci->ae_calc_for_flash = lib_3a_ae_calc_for_flash; diff --git a/gst-libs/atomisphal/gstv4l2mfldadvci.h b/gst-libs/atomisphal/gstv4l2mfldadvci.h index ba38d31..0b7a5a9 100644 --- a/gst-libs/atomisphal/gstv4l2mfldadvci.h +++ b/gst-libs/atomisphal/gstv4l2mfldadvci.h @@ -75,9 +75,7 @@ struct _GstV4l2MFLDAdvCI void (*get_statistics)(void); - void (*ae_process)(void); - void (*af_process)(void); - void (*awb_process)(void); + void (*AeAfAwb_process)( struct timeval *frame_timestamp); void (*ae_calc_for_flash)(void); void (*ae_calc_without_flash)(void); diff --git a/gst-libs/atomisphal/mfld_cam.c b/gst-libs/atomisphal/mfld_cam.c index ebb351c..d55572c 100644 --- a/gst-libs/atomisphal/mfld_cam.c +++ b/gst-libs/atomisphal/mfld_cam.c @@ -105,6 +105,7 @@ struct mfld_driver_t struct atomisp_dis_vector dvs_vector; float frame_rate; int sensor_type; + struct timeval timestamp; }; struct buffer @@ -1377,16 +1378,8 @@ mfldcam_3a_process (gpointer data) { mfldadvci->get_statistics (); - /* AE, AWB and AF Process */ - if (mfld_driver.ae_enabled) - mfldadvci->ae_process (); - - if (mfld_driver.af_enabled) - mfldadvci->af_process (); - - if (mfld_driver.awb_enabled) - mfldadvci->awb_process (); + mfldadvci->AeAfAwb_process(&mfld_driver.timestamp); /* apply Results */ if (mfld_driver.awb_enabled) @@ -1591,6 +1584,8 @@ run_normal_sequence(int fd, struct v4l2_buffer *buffer) cam_driver_dbg ("%s: Error dqbuf %d\n", __func__, frame_cnt); return CAM_ERR_SYS; } + + mfld_driver.timestamp = buffer->timestamp; sem_post(&g_sem_3a); /* DIS and DVS processing */ diff --git a/packaging/mfldv4l2camsrc.changes b/packaging/mfldv4l2camsrc.changes index 925edfc..17c222c 100644 --- a/packaging/mfldv4l2camsrc.changes +++ b/packaging/mfldv4l2camsrc.changes @@ -1,3 +1,6 @@ +* Mon Nov 05 2012 Marko Ollonen accepted/trunk/20121031.171703@db3d6d4 +- combine AfAeAwb process methods and pass frame timestamp to 3A. + * Mon Nov 05 2012 Marko Ollonen accepted/trunk/20121031.171703@35a52c7 - pass used frame rate info to 3A library. -- 2.7.4