Alex Deucher wrote:
The attached patch adds alpha blending support to the video overlay on
radeon hardware.  It's been tested on my 9200.  It adds three new Xv
attributes: XV_ALPHA_MODE, XV_GR_ALPHA, and XV_OV_ALPHA.

XV_ALPHA_MODE - (0 or 1) selects the alpha blending mode.  right now it
only supports key and global modes, per-pixel can be added later. 0 is
key mode, 1 is global mode. Key mode blends the overlay or graphics
layer with the colorkey.  Global mode blends the graphics layer and the
overlay.

XV_GR_ALPHA - (0-255) set the alpha level of the graphics layer
(everything but the overlay) (applies to either mode)

XV_OV_ALPHA - (0-255) set the alpha level of the overlay (applies to
either mode)

The patch is against DRI cvs, but should apply pretty easily to any
tree.  I'm not 100% clear on the function the first two fields of
OV0_KEY_CNTL, perhaps someone out there could explain it to me. see my
comments in the code.  let me know if you have any comments or
questions.  Is it worth opening a bug in bugzilla for this?

The patch and binaries also are available here:
http://www.botchco.com/alex/radeon/xv_alpha/

Look out for an improved Xv gamma patch soon.

Alex,


while you are at it, does the radeon hardware support chroma-keying? (Chroma keying means the overlay is shown if the _video_ color is within a certain range. Chroma-Keying is extremely useful for creating blue-box like effects, like for example people in front of a blue background, which is being replaced by the graphics at playback time).

If so, you might want to take a look at the sis driver. Besides, the sis driver also has a property named XV_DISABLE_COLORKEY to avoid the problem of the colorkey always drawn. This works more or less by 1) disabling the colorkey in the video code, and 2) by ignoring accelerator fill-commands with the colorkey as foreground color. Of course, this is no bullet-proof method, but perhaps this is helpful for you, too.

Thomas

--
Thomas Winischhofer
Vienna/Austria
thomas AT winischhofer DOT net          *** http://www.winischhofer.net/
twini AT xfree86 DOT org



_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to