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.

Thanks,

Alex


__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

Attachment: radeon_xvalpha.diff
Description: radeon_xvalpha.diff

Reply via email to