Fw: [Patch] USBVision Removal of BT819 code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





----- Forwarded Message ----
From: Thierry MERLE <thierry.merle@xxxxxxx>
To: Dwaine Garden <dwainegarden@xxxxxxxxxx>; Linux and Kernel Video <video4linux-list@xxxxxxxxxx>
Cc: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxx>
Sent: Friday, November 10, 2006 4:03:43 PM
Subject: Re: [Patch] USBVision Removal of BT819 code

OK so the right field value is V4L2_FIELD_NONE.
I set it in VIDIOC_QUERYBUF and in VIDIOC_DQBUF.
I made a basic time measurement of delay between 2 VIDIOC_DQBUF.
I make difference in jiffies between every 100 frames (so that the debug
traces do not make perturbation on measurement).
So, if I were at 25fps, I should have delta=(1/25*100)=4 between 2
frames, so around 400 between 2 hundreds of frames.
I get that (see /var/log/messages attached).
So my final suspicion is the bad programing of tda9887 or saa7113.
Investigating this way...

xawtv debug traces attached too.

Cheers,
Thierry


The patch I made to get this stuff:

- make frame interval measurements with debug=8
- set V4L2_FIELD_NONE in VIDIOC_DQBUF.

Signed-off-by: Thierry MERLE <thierry.merle@xxxxxxx>
---


Dwaine Garden a écrit :
>
>
> ----- Original Message ----
> From: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxx>
> To: Thierry MERLE <thierry.merle@xxxxxxx>
> Cc: Dwaine Garden <dwainegarden@xxxxxxxxxx>
> Sent: Wednesday, November 8, 2006 7:39:06 PM
> Subject: Re: [Patch] USBVision Removal of BT819 code
>
> Em Qua, 2006-11-08 às 19:21 +0100, Thierry MERLE escreveu:
> > Hello,
> > I made big changes in buffer management : now I use the linux list.h to
> > enqueue/dequeue frames.
> > I have no more spurious errors on dequeuing buffers.
>
> >Good.
>
> > But I have still 12fps ; I did not touch the v4l1 decompression
> > algorithm. I think I do not set a right parameter (like vb->field =
> > V4L2_FIELD_NONE or TOP.
>
> >The generated images are interlaced or non-interlaced? If they are
> >interlaced, you should send first ODD frame (with just odd lines of the
> >frame), then EVEN frame. Otherwise, you should send the TOP lines then
> >the BOTTON lines.
>
> The images are non-interlaced.   Each line of a frame goes through the
> ADPCM decompression
> to be decompressed which is sequential order
>
> > Now I can record AVI with xawtv and the driver can enqueue more than 2
> > frames.
>
> >Good.
>
> > This evening (so very soon because it is 19:00 here) I will post
> patches
> > for the last modifications I made for usbvision_v4l2 hg tree.
> >Ok. I'll apply it at the tree.
> >
> > Regards,
> > Thierry
> >
> > Mauro Carvalho Chehab a écrit :
> > > Hi Thierry,
> > >
> > > Have you found the bugs on usbvision?
> > >
> > > Em Seg, 2006-11-06 às 21:09 +0100, Thierry MERLE escreveu:
> > >  
> > >> Maybe you are right but in usbvision driver, no declared card use
> this
> > >> decoder.
> > >> So it can be safely removed from the usbvision driver.
> > >> I a new usbvision based card appear to use this decoder chip, we
> will
> > >> add some newer code (the code removed could not work because it
> was not
> > >> updated for too long).
> > >>
> > >> Regards,
> > >> Thierry
> > >>
> > >> P.S.: I remember you asked me to implement the eeprom decoding for
> > >> usbvision... I will add it to the TODO-list :)
> > >>
> > >> Gunther Mayer a écrit :
> > >>    
> > >>> Dwaine Garden wrote:
> > >>>      
> > >>>> Removing code for BT819 chipset.   Currently, there are no devices
> > >>>> that have been
> > >>>> identified as using this chipset.  This code has been hanging
> around
> > >>>> for too long.
> > >>>>
> > >>>>  
> > >>>>        
> > >>> LML33 ??
> > >>>
> > >>> --
> > >>> video4linux-list mailing list
> > >>> Unsubscribe
> > >>> mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe
> > >>> https://www.redhat.com/mailman/listinfo/video4linux-list
> > >>>      
> > >> --
> > >> video4linux-list mailing list
> > >> Unsubscribe
> mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe
> > >> https://www.redhat.com/mailman/listinfo/video4linux-list
> > >>    
> > > Cheers,
> > > Mauro.
> > >
> > >  
>
>
--- usbvision-core.c    2006-11-10 21:48:32.000000000 +0100
+++ usbvision-core-debug.c    2006-11-10 21:34:52.000000000 +0100
@@ -416,7 +416,8 @@


static int usbvision_nr = 0;            // sequential number of usbvision device
-
+static unsigned long usbvision_timestamp = 0;        // timestamp in jiffies of a hundred frame
+static unsigned long usbvision_counter = 0;        // frame counter

static const int max_imgwidth = MAX_FRAME_WIDTH;
static const int max_imgheight = MAX_FRAME_HEIGHT;
@@ -4567,7 +4568,20 @@
            vb->flags = V4L2_BUF_FLAG_MAPPED | V4L2_BUF_FLAG_QUEUED | V4L2_BUF_FLAG_DONE;
            vb->index = f->index;
            vb->sequence = f->sequence;
+            vb->timestamp = f->timestamp;
+            vb->field = V4L2_FIELD_NONE;
+            vb->bytesused = f->scanlength;

+            if(debug & DBG_IOCTL) { // do not spend computing time for debug stuff if not needed !
+                if(usbvision_counter == 100) {
+                    PDEBUG(DBG_IOCTL, "VIDIOC_DQBUF delta=%d",(unsigned)(jiffies-usbvision_timestamp));
+                    usbvision_counter = 0;
+                    usbvision_timestamp = jiffies;
+                }
+                else {
+                    usbvision_counter++;
+                }
+            }
            return 0;
        }
        case VIDIOC_STREAMON:
@@ -4579,6 +4593,8 @@

            usbvision->streaming = Stream_On;

+            if(debug & DBG_IOCTL) usbvision_timestamp = jiffies;
+
            call_i2c_clients(usbvision,VIDIOC_STREAMON , &b);

            PDEBUG(DBG_IOCTL, "VIDIOC_STREAMON");

--- usbvision-core.c	2006-11-10 21:48:32.000000000 +0100
+++ usbvision-core-debug.c	2006-11-10 21:34:52.000000000 +0100
@@ -416,7 +416,8 @@
 
 
 static int usbvision_nr = 0;			// sequential number of usbvision device
-
+static unsigned long usbvision_timestamp = 0;		// timestamp in jiffies of a hundred frame
+static unsigned long usbvision_counter = 0;		// frame counter
 
 static const int max_imgwidth = MAX_FRAME_WIDTH;
 static const int max_imgheight = MAX_FRAME_HEIGHT;
@@ -4567,7 +4568,20 @@
 			vb->flags = V4L2_BUF_FLAG_MAPPED | V4L2_BUF_FLAG_QUEUED | V4L2_BUF_FLAG_DONE;
 			vb->index = f->index;
 			vb->sequence = f->sequence;
+			vb->timestamp = f->timestamp;
+			vb->field = V4L2_FIELD_NONE;
+			vb->bytesused = f->scanlength;
 
+			if(debug & DBG_IOCTL) { // do not spend computing time for debug stuff if not needed !
+				if(usbvision_counter == 100) {
+					PDEBUG(DBG_IOCTL, "VIDIOC_DQBUF delta=%d",(unsigned)(jiffies-usbvision_timestamp));
+					usbvision_counter = 0;
+					usbvision_timestamp = jiffies;
+				}
+				else {
+					usbvision_counter++;
+				}
+			}
 			return 0;
 		}
 		case VIDIOC_STREAMON:
@@ -4579,6 +4593,8 @@
 
 			usbvision->streaming = Stream_On;
 
+			if(debug & DBG_IOCTL) usbvision_timestamp = jiffies;
+
 			call_i2c_clients(usbvision,VIDIOC_STREAMON , &b);
 
 			PDEBUG(DBG_IOCTL, "VIDIOC_STREAMON");

Attachment: var_log_messages.bz2
Description: application/bzip

Attachment: xawtv.log.bz2
Description: application/bzip

_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux