Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Mar 1998 10:22:20 -0500
From:      Randall Hopper <rhh@ct.picker.com>
To:        Joao Carlos Mendes Luis <jonny@coppe.ufrj.br>, Amancio Hasty <hasty@rah.star-gate.com>
Cc:        multimedia@FreeBSD.ORG, stable@FreeBSD.ORG
Subject:   Re: Fxtv vs Stable
Message-ID:  <19980322102220.55088@ct.picker.com>
In-Reply-To: <199803220221.NAA18775@godzilla.zeta.org.au>; from Bruce Evans on Sun, Mar 22, 1998 at 01:21:39PM %2B1100
References:  <199803220221.NAA18775@godzilla.zeta.org.au>

next in thread | previous in thread | raw e-mail | index | archive | help
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?19980322102220.55088>