From owner-freebsd-multimedia Wed Mar 5 22:50:50 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id WAA26507 for multimedia-outgoing; Wed, 5 Mar 1997 22:50:50 -0800 (PST) Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by freefall.freebsd.org (8.8.5/8.8.5) with SMTP id WAA26502 for ; Wed, 5 Mar 1997 22:50:46 -0800 (PST) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id HAA15873; Thu, 6 Mar 1997 07:05:49 +0100 From: Luigi Rizzo Message-Id: <199703060605.HAA15873@labinfo.iet.unipi.it> Subject: Re: Video Capture for FreeBSD To: hasty@rah.star-gate.com (Amancio Hasty) Date: Thu, 6 Mar 1997 07:05:48 +0100 (MET) Cc: tom@inna.net, smp@csn.net, jamie@inna.net, multimedia@freebsd.org In-Reply-To: <199703060618.WAA00815@rah.star-gate.com> from "Amancio Hasty" at Mar 5, 97 10:18:37 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-multimedia@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > Try compiling rgb16 as: > > cc -o rgb16 -m486 -O2 rgb.c nope, the trick is buffering data before writing: > > for (c = 0 ; c < ROWS*COLS; c++) { > > b[0]= ((*rgb16 >> 7) & 0xf8); /* r */ > > b[1]= ((*rgb16 >> 2) & 0xf8); /* g */ > > b[2]= ((*rgb16++ << 3) & 0xf8); /* b */ > > write(o, &b[0], 3); this one issues a system call for each pixel (3 bytes of output!). Luigi -----------------------------+-------------------------------------- Luigi Rizzo | Dip. di Ingegneria dell'Informazione email: luigi@iet.unipi.it | Universita' di Pisa tel: +39-50-568533 | via Diotisalvi 2, 56126 PISA (Italy) fax: +39-50-568522 | http://www.iet.unipi.it/~luigi/ _____________________________|______________________________________