Webcam support in Squeak (for VOLPC)

Bert Freudenberg bert at freudenbergs.de
Tue Mar 6 17:04:36 EST 2007


On Mar 6, 2007, at 17:02 , Jonathan Corbet wrote:

> Diego Gomez Deck <DiegoGomezDeck at consultar.com> wrote:
>
>> The Squeak V4L code fallback to use read(), but the performance is  
>> not
>> good.
>
> I'm curious as to why that is.  The read() interface is not the
> preferred way to go, but it should not perform notably worse than  
> using
> mmap().

When you mmap, the capturing does not block but works in parallel to  
the processing, which should be significantly more effective, no?

Diego found more than 90% of time is spent in kernel land (not  
captured by gprof). We now reach about 16 fps at 320x240. This  
includes capturing, converting to 5-5-5 RGB which is Squeak's native  
format, bitblt to Squeak's framebuffer, convert to 5-6-5 to match X,  
then XShmPutImage. If the profiling is correct, then the first and  
last step take 90%.

- Bert -





More information about the Devel mailing list