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
|