Re: [V4L] Image clipping with mmap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Mon, 27 Nov 2000, Justin Schoeman wrote:
> > I need to clip images with a bttv chipset framegrabber card. Since the
> > only way i can read images is with mmap'ing the buffer, i need to set
> > clipping parameters with this method. However using the VIDIOCSWIN ioctl
> > doesnt work in this case, and im thus unable to set the clipping
> > rectangles.
> > Is there any way to do this with mmap io, and is it possible for me to
> > simply read images with bt848 cards without going through the mmap
> > interface?
> > 
> > Thanks
> > Abheek
> 
> There is no way to do this with the v4l or v4l2 API.  The question from
> my side is: Why?  You have to copy the image out of the mmap()ed region
> anyway so any clips would be lost.  If you could explain what you want
> to do, perhaps we could be of more help.

Save PCI bandwidth?  If you only want a fraction of the image, it doesn't make
sense to DMA the whole thing into memory.

You could also do memory overlay.  Place a background image into memory, then
overlay the video on top of it.  Without clipping, a second copy is required to
put the background into memory.  For example, on-screen captions usually stay
on screen for many frames, so they can be read.  If memory overlay can't clip,
you would have to redraw captions every single video frame, which is a lot of
extra work.  Of course, everyone but me has a 1 GHz or faster processor and
doesn't care about a few lost frames, so efficiency issues don't seem to
matter.

Also V4L and V4L2 have no concept of adjusting the analog TV timing
parameters.  A crude workaround is to scale and crop the image to trick the
driver into giving the desired timing.  This won't work for non-overlay
capture.





[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux