Hi,

Your findings are very interesting. I also have image corruption when light is 
too bright with the s5k4aa sensor. I have a work around but it only works in 
640x480 when sub-sampling is enabled, so a better solution would be nice.
I made a patch which almost fixes the pb : when a frame header has the same 
frame number as the current frame, just append data to the current frame. This 
fixes jerkiness but there is still an image deformation. Could you try this 
patch and tell if it works for you?

Greg



----- Message d'origine ----
De : Lukáš Karas <[EMAIL PROTECTED]>
À : m560x-driver-devel <[email protected]>
Envoyé le : Mercredi, 17 Septembre 2008, 3h22mn 14s
Objet : [M560x-driver-devel] possible solution for s5k83a problems with light

Hi all

Is it possible somehow throwout frames from stream?
I identify frame number in frame deliminer.
When I am shining with lamp direct to sensor, some frames are send several 
times 
(frames with same number)
and image from camera is bugly. 

I find repetitive frame number in usb snoop from windows too,  when i was 
shining to sensor,
but image was greath!

Maybee if we throwout "damage" frames, image will be stable as in windows...

I create small test patch for repetitive frame number.

patch: http://www.karry.wz.cz/download/light_test.patch
screencast: http://www.karry.wz.cz/download/test_screencast.avi

Please read the patch and see screencast, you understand what I wrote.

Is anybody capable create frame drop for test my idea?

Regards Lukas


      
Index: m5602_v4l2.c
===================================================================
--- m5602_v4l2.c	(révision 403)
+++ m5602_v4l2.c	(copie de travail)
@@ -121,6 +121,7 @@
 	}
 }
 
+static int last;
 /* Executes when fresh URBs arrive from the bridge */
 void m5602_urb_complete(struct urb *urb)
 {
@@ -198,6 +199,16 @@
 
 			switch (f->state) {
 			case FRAME_GRABBING:
+
+				if (pos[-4] == last) {
+					memcpy(f->rawdata + f->buf.bytesused,
+					       pos, len);
+					f->buf.bytesused += len;
+					break;
+				}
+				last = pos[-4];
+
+
 				f->buf.bytesused =
 					cam->sensor->current_fmt.sizeimage;
 				do_gettimeofday(&f->buf.timestamp);
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
M560x-driver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/m560x-driver-devel

Reply via email to