[FFmpeg-devel] [PATCH] avfilter/vf_overlay: fix alpha blending when main source has an alpha channel

Peter Große pegro at friiks.de
Sun Jul 16 21:26:57 EEST 2017


On Sun, 16 Jul 2017 18:33:33 +0200
Paul B Mahol <onemda at gmail.com> wrote:

> 
> how can one reproduce this bug?

ffmpeg -i fate-suite/mfx/track_01_v02.mxf -filter_complex \
"movie=fate-suite/png1/lena-rgba.png[logo];[v:0][logo]overlay" -an -vframes 1 out.png

In this example files from the fate suite are used.

The source mxf file actually doesn't have an alpha channel, but the autoscaler adds one on adapting pixel formats:

[auto_scaler_0 @ 0x2118440] w:1280 h:720 fmt:yuv422p sar:1/1 -> w:1280 h:720 fmt:yuva420p sar:1/1 flags:0x2

As seen here [1] the png file has a almost zero alpha value on the left side, but the output is way too bright without the patch.

I hope this helps.

Regards
Peter

[1] http://imgur.com/a/74ZF4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170716/f2761179/attachment.sig>


More information about the ffmpeg-devel mailing list