From: Sven <lu...@dp...> - 2001-07-16 15:11:08
|
On Fri, Jul 13, 2001 at 04:10:28PM +0200, Romain Dolbeau wrote: > Hello, > > Here's a third draft of a possible interface for overlay support > in fbdev. I added a stride parameter suggested by Gerd Knorr, > and a way to specify a color or alpha key for overlay clipping/ > blending. If someone is interested, I have a small app > that use the interface to put a JPG as video overlay > on the console. > > I have a question on the subject of alpha: how is fbcon > and the driver supposed to deal with the alpha channel ? > Is the _clear function supposed to clear the alpha channel > or to left it alone ? What about the _putc, do they set > the alpha at a specific value (foreground and background), > or should they left the alpha alone ? Same question for invert, > too :-) have we functionality to do rectangle lists, as X does ? Could this be usefull ? You need something similar if you want to add clipping support to video overlay. Well at least for complexe clipping, i guess that for most fb apps, you would clipp out only a rectangular region, and nothing more complex. That said, this is how most Xv driver handle this (well at least the glint/permedia3 one, but i inspired myself from the mga one). We either do opaque or alpha blended i(if supported) overlay. in the opaque case, if the hardware supports it, we can do clipping. Clipping is currently done by writting a value to the alpha channel for each pixel that will show (or not show) the overlay. Then we can do alpha keyed overlay on them. Cards that don't support alpha keyed overlay or in mode without alpha channel (depth 8, 16 or 24) you have to choose a color and use color keyed overlay. In the case of alpha blending, we can provide a alpha blend value (prefereably an 8 bit one, since that is what permedia3 supports, altough it really uses only the top 2 bits) and the overlay is blended. In this case it is not really necessary to do clipping, altough some cards support per pixel bledning using the alpha channel. Friendly, Sven Luther |