[VDPAU] 答复: about VdpPresentationQueueSetBackgroundColor
Aaron Plattner
aplattner at nvidia.com
Mon Jul 1 11:10:54 PDT 2013
On 06/23/2013 07:26 PM, JuneyWang at viatech.com.cn wrote:
> Dear Stephen,
>
> Thank you very much for your reply and answer to my question.
> I'm clear about the R/G/B components which will be used as color key in overlay path.
> I'm just confused about the alpha channel of background. According to your answer, the alpha is ignored.
> But if application wants overlay-based presentation queue to have some degree of transparency with the video window area desktop(which means to compose video with the desktop),
> How do you achieve that?
You can't. The overlay hardware, at least for NVIDIA, uses color
keying, not alpha blending. If the color of the pixel in the main plane
exactly matches the key, the display hardware shows the overlay contents
instead. Otherwise you get the main plane contents.
If you want alpha blending, you will need to render the pixels into the
window using the OpenGL interoperability functionality to set the alpha
channel, and then use a composite manager to blend your window with the
rest of the desktop.
> Thank you very much again and sorry for interrupting you
> Juney
>
> -----邮件原件-----
> 发件人: Stephen Warren [mailto:swarren at nvidia.com]
> 发送时间: 2013年6月21日 23:29
> 收件人: Juney Wang
> 抄送: vdpau at lists.freedesktop.org
> 主题: RE: about VdpPresentationQueueSetBackgroundColor
>
> JuneyWang at viatech.com.cn wrote at Thursday, June 20, 2013 7:58 PM:
>> Dear Stephen,
>>
>> Thank you very much for your reply.
>> Do you know why FlashPlayer sets alpha=1.0 but not sets to other
>> values? What result does they want from their opinion?
>
> Sorry, I don't have any insight into why Flash Player is putting any particular value in the alpha channel. For the R/G/B components, I expect they aren't "not setting" the other values, but rather they are deliberately setting them to 0.0 in order to get a black background. I don't recommend that since black is a rather common color, and that will cause an overlay-based presentation queue to "show through" windows other than the video window. A close-to-black-but-uncommon color would be a better choice if you want a black background, or better yet, just don't call this API.
>
>> Best Wishes,
>> JuneyWang
>>
>> -----邮件原件-----
>> 发件人: Stephen Warren [mailto:swarren at nvidia.com]
>> 发送时间: 2013年6月20日 23:20
>> 收件人: Juney Wang; vdpau at lists.freedesktop.org
>> 主题: RE: about VdpPresentationQueueSetBackgroundColor
>>
>> JuneyWang at viatech.com.cn wrote at Thursday, June 20, 2013 2:00 AM:
>>> Dear,
>>> I obtained your email on line. I’m sorry to interrupt you. I just want to ask a question.
>>>
>>> If I call VdpPresentationQueueSetBackgroundColor with a background
>>> color, what does the alpha member
>>> mean?
>>
>> The alpha member is ignored.
>>
>> --
>> nvpublic
> _______________________________________________
> VDPAU mailing list
> VDPAU at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/vdpau
>
--
Aaron
More information about the VDPAU
mailing list