From owner-freebsd-multimedia Wed Mar 5 23:02:38 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id XAA27325 for multimedia-outgoing; Wed, 5 Mar 1997 23:02:38 -0800 (PST) Received: from rah.star-gate.com (rah.star-gate.com [204.188.121.18]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id XAA27320 for ; Wed, 5 Mar 1997 23:02:35 -0800 (PST) Received: from rah.star-gate.com (localhost.star-gate.com [127.0.0.1]) by rah.star-gate.com (8.8.5/8.7.3) with ESMTP id XAA01157; Wed, 5 Mar 1997 23:02:25 -0800 (PST) Message-Id: <199703060702.XAA01157@rah.star-gate.com> X-Mailer: exmh version 1.6.9 8/22/96 To: Luigi Rizzo cc: tom@inna.net, smp@csn.net, jamie@inna.net, multimedia@freebsd.org Subject: Re: Video Capture for FreeBSD In-reply-to: Your message of "Thu, 06 Mar 1997 07:05:48 +0100." <199703060605.HAA15873@labinfo.iet.unipi.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 05 Mar 1997 23:02:25 -0800 From: Amancio Hasty Sender: owner-multimedia@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hmmm... I wonder if the the filesystem which he is writing to is nfs mounted? Amancio >From The Desk Of Luigi Rizzo : > > 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/ > _____________________________|______________________________________