combine AfAeAwb process methods and pass frame timestamp to 3A.
authorMarko Ollonen <marko.ollonen@ixonos.com>
Mon, 5 Nov 2012 14:38:53 +0000 (16:38 +0200)
committerMarko Ollonen <marko.ollonen@ixonos.com>
Mon, 5 Nov 2012 14:40:31 +0000 (16:40 +0200)
Change-Id: I9db9672696f06b388a79a33efcb3e2b1d51a9039

gst-libs/atomisphal/gstv4l2mfldadvci.c
gst-libs/atomisphal/gstv4l2mfldadvci.h
gst-libs/atomisphal/mfld_cam.c
packaging/mfldv4l2camsrc.changes

index afd6546..2bea9e7 100644 (file)
@@ -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;
index ba38d31..0b7a5a9 100644 (file)
@@ -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);
index ebb351c..d55572c 100644 (file)
@@ -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 */
index 925edfc..17c222c 100644 (file)
@@ -1,3 +1,6 @@
+* Mon Nov 05 2012 Marko Ollonen <marko.ollonen@ixonos.com> accepted/trunk/20121031.171703@db3d6d4
+- combine AfAeAwb process methods and pass frame timestamp to 3A.
+
 * Mon Nov 05 2012 Marko Ollonen <marko.ollonen@ixonos.com> accepted/trunk/20121031.171703@35a52c7
 - pass used frame rate info to 3A library.