V4L/DVB (5736): Add V4L2_FBUF_CAP/FLAG_LOCAL/GLOBAL_INV_ALPHA
authorHans Verkuil <hverkuil@xs4all.nl>
Mon, 4 Jun 2007 07:55:36 +0000 (04:55 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Fri, 8 Jun 2007 11:21:15 +0000 (08:21 -0300)
Michael Schimek requested the addition of inverted alpha framebuffer
caps/flags to support such hardware.
'Normal' alpha uses this formula to mix the framebuffer and video:
output = fb pixel * fb alpha + video pixel * (1 - fb alpha)
and the 'inverted' alpha uses this formula:
output = fb pixel * (1 - fb alpha) + video pixel * fb alpha

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
include/linux/videodev2.h

index 93971bb294e05467bbc6673209de620fd3b4afff..d16a2b57dc8105806a07afa5e97e843cd0844274 100644 (file)
@@ -615,12 +615,16 @@ struct v4l2_framebuffer
 #define V4L2_FBUF_CAP_BITMAP_CLIPPING  0x0008
 #define V4L2_FBUF_CAP_LOCAL_ALPHA      0x0010
 #define V4L2_FBUF_CAP_GLOBAL_ALPHA     0x0020
+#define V4L2_FBUF_CAP_LOCAL_INV_ALPHA  0x0040
+#define V4L2_FBUF_CAP_GLOBAL_INV_ALPHA 0x0080
 /*  Flags for the 'flags' field. */
 #define V4L2_FBUF_FLAG_PRIMARY         0x0001
 #define V4L2_FBUF_FLAG_OVERLAY         0x0002
 #define V4L2_FBUF_FLAG_CHROMAKEY       0x0004
 #define V4L2_FBUF_FLAG_LOCAL_ALPHA     0x0008
 #define V4L2_FBUF_FLAG_GLOBAL_ALPHA    0x0010
+#define V4L2_FBUF_FLAG_LOCAL_INV_ALPHA 0x0020
+#define V4L2_FBUF_FLAG_GLOBAL_INV_ALPHA        0x0040
 
 struct v4l2_clip
 {