[FFmpeg-devel] [PATCH] swscale alpha channel support

Cédric Schieli cschieli
Tue Mar 17 17:40:28 CET 2009


2009/3/17 ?yvind Kol?s <islewind at gmail.com>:
> 2009/2/11 C?dric Schieli <cschieli at gmail.com>:
>> Hello,

[...]

>
> Does this resampling operate on premultiplied alpha or not? Treating a
> regular alpha component just like the RGB (or YUV) components will
> lead to incorrect results and color bleeding. Color from fully
> transparent regions will bleed into opaque regions. This is true for
> all spatial operations operating on buffers with transparency, (it is
> even more important for blurs.
>
> /?yvind K.

Hello,

This code operates by scaling the alpha channel indepandently from the others.
So it should be used only on straight alpha. I guess supporting
premultiplied alpha would require to use a division filter (lavfi ?)
Or are you suggesting that scaling non-premultiplied alpha can't work
? What I'm sure is that fully transparent stays fully transparent, and
fully opaque stays fully opaque.

Any feedback will be welcome.

Regards,
C?dric Schieli




More information about the ffmpeg-devel mailing list