Date: Sun, 22 Mar 1998 10:44:32 -0800 From: Amancio Hasty <hasty@rah.star-gate.com> To: Randall Hopper <rhh@ct.picker.com> Cc: Joao Carlos Mendes Luis <jonny@coppe.ufrj.br>, multimedia@FreeBSD.ORG, stable@FreeBSD.ORG Subject: Re: Fxtv vs Stable Message-ID: <199803221844.KAA00384@rah.star-gate.com> In-Reply-To: Your message of "Sun, 22 Mar 1998 10:22:20 EST." <19980322102220.55088@ct.picker.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199803221844.KAA00384>