[V4L] bttv bitmap clipping, and bug

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



Video4Linux (or at least the bttv/Bt848 driver) supports setting a clipping
bitmap, where a 1 in the bitmap means omit the video, a 0 means show the video.
This is apparently an undocumented feature; I found it by reading the source. 
What is documented is that you can set a list of clipping rectangles, but the
driver always turns those into a clipping bitmap anyway.

There's no documentation (that I know of) but there is this in linux/videodev.h:

#define VIDEO_CLIP_BITMAP	-1
/* bitmap is 1024x625, a '1' bit represents a clipped pixel */
#define VIDEO_CLIPMAP_SIZE	(128 * 625)

You can set the clipping bitmap by setting "clipcount" in struct video_window
to VIDEO_CLIP_BITMAP, and then by pointing "clips" to the actual bits.  The
bitmap is 1024 x 625, or VIDEO_CLIPMAP_SIZE in bytes.  The bitmap is little
endian; you can use bitmaps you get back from XGetImage on XFree86.

Neat feature, but it does have limitations and bug(s).  There seems to be a
limit on how "narrow" the clipping can be.  If you have a scanline in the
bitmap with every-other bit on, it will generally not accurately clip to it. 
There is also a nasty limit on how complex the total clipping shape can be. 
For example, if you use a half-tone stipple pattern (every-other bit on,
staggered lines) for the whole screen Video4Linux will lock up the machine,
requiring a reboot.

Now my question: does anyone out there have any experience with these problems?
Is there a fix for the driver?  Even knowing what the actual DMA engine
limitations are would be useful.

Thanks for any info,
Peter K





[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