I narrowed the issue a little bit more. It looks like a bandwidth/ throughput issue. The sequence is like this:
Timestamp(seconds) 101.995432 Queue 0 101.995705 Queue 1 101.995978 Queue 2 101.996250 Queue 3 103.129925 Frame 0 complete 103.165819 Frame 1 complete 103.201672 Frame 2 complete 103.237764 Frame 3 complete 103.239244 Dequeue 0 103.241105 Queue 0 103.241153 Dequeue 1 103.243283 Queue 1 103.243333 Dequeue 2 103.245113 Queue 2 103.245161 Dequeue 3 103.247259 Queue 3 103.296360 Frame 0 complete .... In this case, the frame interval is: 33ms-33ms-33ms-67ms. So in this case, effectively 1 frame is dropped at the driver level. One thing worth noting is that the user space application has a loop like this (in pseudo code): Stream on ...... while(true) { Dequeue buffer; Queue buffer; } Is the frame drop due to the isochronous nature of the UVC protocol? In other words, because of the multiple Dequeue & Queue operations happening at the 103.239244 timestamp, the next frame doesn't have enough time/processing bandwidth to finish. Hence 1 frame is dropped. Does this make sense? -Shuzhen -- Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum. -- > -----Original Message----- > From: linux-uvc-devel-boun...@lists.berlios.de [mailto:linux-uvc-devel- > boun...@lists.berlios.de] On Behalf Of Shuzhen Wang > Sent: Thursday, December 16, 2010 4:46 PM > To: linux-uvc-devel@lists.berlios.de > Subject: [Linux-uvc-devel] uvc_queue_next_buffer called at an interval > greater than framerate. > > Hello, > > We are using UVC driver with a Chicony USB camera. The camera runs at > 30fps > fixed frame rate. > > We see some jittering in the video stream. When we look at dmesg, it > shows > that sometimes the interval between 2 uvc_queue_next_buffer calls are > about > 65 ms. Most of the time it's around 30-33ms. Obviously frame drop is > happening here. > > My understanding is that uvc_queue_next_buffer is called in interrupt > contexts. So it's unlikely it's scheduling issue. I can think of 2 > possibilities: > 1. Problem with camera firmware: the frame stream coming from the > camera > module is already problematic. > 2. Memory/Cache performance issue causing the frame processing takes > too > long. > > How can I narrow down the issue furthuer? Your comment is appreciated. > > -Shuzhen > > _______________________________________________ > Linux-uvc-devel mailing list > Linux-uvc-devel@lists.berlios.de > https://lists.berlios.de/mailman/listinfo/linux-uvc-devel _______________________________________________ Linux-uvc-devel mailing list Linux-uvc-devel@lists.berlios.de https://lists.berlios.de/mailman/listinfo/linux-uvc-devel