--- Thomas Winischhofer <[EMAIL PROTECTED]> wrote:
> 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).
> 

I'm not sure, I'll have to double check the databooks.  Unfortunately,
I'm not an expert when it comes to keying and video stuff so the
descriptions of various bitfields in the hardware and how that
translates to what they do is somewhat confusing.

> 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.

radeon has an option XV_AUTOPAINT_COLORKEY that enables or disables the
auto filling of the colorkey by the driver (stops
xf86XVFillKeyHelper()).  is this equivalent to what your option does? 
I'm not sure if there is a way to "turn off" the color key or not.  Do
any other radeon developers out there know if this is possible?  I've
tried adjusting the alpha values on the colorkey to fully transparent,
but it doesn't seem to make a difference.  what I'd like to do is be
able to display the video is a "clear" window so the video will belnd
with the desktop rather than the colorkey when in global alpha mode.

I'll take a look at the sis code and see how it matches up to the
radeon hardware.

Thanks,

Alex


__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/
_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to