How to Alpha Blend on YUV overlay?

Dear everyone,
There are a lot of examples for Alpha Blending on surfaces which are for bitmap, But how to Alpha Blend on a YUV video frame?

2009-07-21

kedahanzi

Sames as for RGB if the source pixels are in a non-premultiplied-alpha
format
cD’ = ??S*cS + (1 ?C ??S)*cD
where cS and cD are the source and destination color components, and ??S
and ??D are the source and destination alpha values.

You can also scavenge from various implementations (do a codesearch for
yuv_blend or blend_yuv). Here are some:
http://www.google.com/codesearch/p?hl=en&sa=N&cd=3&ct=rc#HMtYDYmNP5w/veejay-ng/libyuv/yuvconv.c&q=yuv_blend
http://www.google.com/codesearch/p?hl=en&sa=N&cd=1&ct=rc#rH3kVC90O_k/xine-lib-1.1.3/src/xine-engine/alphablend.c&q=blend_yuv_exact

kedahanzi wrote:> Dear everyone,

There are a lot of examples for AlphaBlending on surfaces which are
for bitmap, But how to AlphaBlend on a YUV video frame?
2009-07-21

kedahanzi


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org