pwc
[Top] [All Lists]

[pwc] Patch to reduce latency due to double buffering

To:
Subject: [pwc] Patch to reduce latency due to double buffering
From: Jeff Cunningham <>
Date: Fri, 09 Nov 2007 22:50:17 -0800
Hi;

I've been using the PWC module for a robotics project with a Philips 900 
NC. In an effort to reduce the latency I rewrote the frame buffer  
management so that it is simpler using one doubly linked circular list 
of frame buffers. I added an additional ioctl constant in order to 
access methods to change the buffer mode so that it continues (by 
default) to always read the oldest frame, or - if the mode is changed to 
my new one - it always reads the latest frame completed frame and 
discards any earlier ones. Obviously this latter mode could wreak havoc 
for continuous media purposes, but for processing sequences of stills, 
it gets you closer to real time.

I also added another ioctl constant and a method to obtain a "sync" 
pulse back from the camera. As near as I can determine, there is about 
two frames of pipeline delay in the camera before what comes out to USB. 
They are probably using this to do AGC and other automated processing 
before the frames go out the door. But lack of knowledge of the frame 
clock timing adds another +/- 2 frames uncertainty. This additional 
method acts something like the ioctl VIDIOCSYNC call, but it doesn't 
interfere with the frame handling itself, thus reducing the uncertainty 
to a fixed pipeline delay.

In any event, I've tested these changes as well as I can with a limited 
number of cameras (2). I think that the latency reduction mode might be 
of use to others and possibly worth rolling into the general code. If 
anyone would like to test this further or throw stones at it or 
whatever, I would be happy to provide a tarball of the modded package. I 
had to modify pwc.h, pwc-if.c and pwc-v4l.c

I rolled these into the snapshot I downloaded from 11/03/2007.

Regards,

--Jeff Cunningham
Seattle, WA
_______________________________________________
pwc mailing list

http://lists.saillard.org/mailman/listinfo/pwc

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU