From owner-freebsd-stable Sun Mar 22 10:44:53 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA06434 for freebsd-stable-outgoing; Sun, 22 Mar 1998 10:44:53 -0800 (PST) (envelope-from owner-freebsd-stable@FreeBSD.ORG) Received: from rah.star-gate.com (rah.star-gate.com [209.133.7.234]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA06427; Sun, 22 Mar 1998 10:44:48 -0800 (PST) (envelope-from hasty@rah.star-gate.com) Received: from rah (localhost.star-gate.com [127.0.0.1]) by rah.star-gate.com (8.8.8/8.8.8) with ESMTP id KAA00384; Sun, 22 Mar 1998 10:44:32 -0800 (PST) (envelope-from hasty@rah.star-gate.com) Message-Id: <199803221844.KAA00384@rah.star-gate.com> X-Mailer: exmh version 2.0.2 2/24/98 To: Randall Hopper cc: Joao Carlos Mendes Luis , multimedia@FreeBSD.ORG, stable@FreeBSD.ORG Subject: Re: Fxtv vs Stable In-reply-to: Your message of "Sun, 22 Mar 1998 10:22:20 EST." <19980322102220.55088@ct.picker.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 22 Mar 1998 10:44:32 -0800 From: Amancio Hasty Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk Now, I am more inclined on the application clearing the buffer. Cheers, Amancio > Amancio Hasty: > |Joao Carlos Mendes Luis: > | |Amancio Hasty: > | | |There is no need to create an ioctl to clear the buffer that can be > | | |handle by the driver by prior to initiating a start capture to clear > | | |the buffer. > | | > | |Isn't it a waste of CPU ? Do you need to clear the buffer everytime ? > | |Why do you ever need to clear the buffer ? > | > |It is not really a waste of cpu cycles to erase the buffer prior to > |start of capture for continuous operations since it is called only > |once. > > Summary: > > I suggest a driver ioctl() to clear the buffer. But I could live with > the driver always doing this on capture start ONLY if it doesn't do this > when FPS == FPS_MAX. > > Detail: > > I suggested an ioctl() for two reasons. First, because IMO this: > > memset( fd, '\0', 1769472 ); /* Worst case */ > > is wasteful when it can be happening many times a second. When you're > dragging your Fxtv window around with temporal decimation off (FPS = > FPS_MAX), this could be happening 10-20 times a second, depending on your > window manager. > > Now this memset is pointless normally (temporal decimation is off), since > the user is going to see a new frame in 1/30th of second (aka 3.3 > "hundredths" of a second); 1/25th sec for the PAL folks. Thus the > conditional I wrap the buffer clear memset() in: > > if ( c->fps != c->fps_max ) > memset( c->drv_buf, '\0', <...frame size...> ); > > However, when it can be up to almost a full second and the app is polling > the buffer, then this gets annoying. Therefore I suggest not making memset > something that's done before every capture start. > > (Second) We could have the driver only memset the buffer when FPS requested > != FPS max (as I'm doing in the app now), but you could have clients that > are only processing frames on driver interrupt and just don't care what's > in the buffer up until the first interrupt. In which case this memset is > an extra delay and load, and useless work. > > So I suggest a driver ioctl() to clear the buffer. But I could live with > the driver always doing this on capture start ONLY if it doesn't do this > when FPS == FPS_MAX. > > Randall > Amancio Hasty: > |Joao Carlos Mendes Luis: > | |Amancio Hasty: > | | |There is no need to create an ioctl to clear the buffer that can be > | | |handle by the driver by prior to initiating a start capture to clear > | | |the buffer. > | | > | |Isn't it a waste of CPU ? Do you need to clear the buffer everytime ? > | |Why do you ever need to clear the buffer ? > | > |It is not really a waste of cpu cycles to erase the buffer prior to > |start of capture for continuous operations since it is called only > |once. > > Summary: > > I suggest a driver ioctl() to clear the buffer. But I could live with > the driver always doing this on capture start ONLY if it doesn't do this > when FPS == FPS_MAX. > > Detail: > > I suggested an ioctl() for two reasons. First, because IMO this: > > memset( fd, '\0', 1769472 ); /* Worst case */ > > is wasteful when it can be happening many times a second. When you're > dragging your Fxtv window around with temporal decimation off (FPS = > FPS_MAX), this could be happening 10-20 times a second, depending on your > window manager. > > Now this memset is pointless normally (temporal decimation is off), since > the user is going to see a new frame in 1/30th of second (aka 3.3 > "hundredths" of a second); 1/25th sec for the PAL folks. Thus the > conditional I wrap the buffer clear memset() in: > > if ( c->fps != c->fps_max ) > memset( c->drv_buf, '\0', <...frame size...> ); > > However, when it can be up to almost a full second and the app is polling > the buffer, then this gets annoying. Therefore I suggest not making memset > something that's done before every capture start. > > (Second) We could have the driver only memset the buffer when FPS requested > != FPS max (as I'm doing in the app now), but you could have clients that > are only processing frames on driver interrupt and just don't care what's > in the buffer up until the first interrupt. In which case this memset is > an extra delay and load, and useless work. > > So I suggest a driver ioctl() to clear the buffer. But I could live with > the driver always doing this on capture start ONLY if it doesn't do this > when FPS == FPS_MAX. > > Randall To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message