[FFmpeg-devel] Need help on bug#3302 - Cannot draw opaque text on transparent frame

Michael Niedermayer michaelni at gmx.at
Sun Jun 22 16:44:03 CEST 2014


On Sat, Jun 21, 2014 at 10:52:24PM +0300, Andrey Utkin wrote:
> Dear core developers related to this functionality (lavfi/drawutils).
> I'd like to have this issue https://trac.ffmpeg.org/ticket/3302 fixed
> in next couple of days, for particular application. Exactly, what i
> need to do is fading in/out text overlays. Of course this issue has
> alternative ways to solve, e.g. make drawtext filter actually to
> implement fading by by-frame evaluation of text alpha value. Currently
> i suppose to work on the latter as it seems easier, but still i am
> interested in the solution for original issue. I am ready to work on
> the code, but i am disoriented in existing routines and need guidance.

i would suggest that first the blend code is changed to work only
on matching sample formats. That is resample the text to yuv(a) 123
when the image onto which it is drawen is yuv(a)123
this would make the code about a factor of 5 faster by not repeatly
resampling the data, i would guess.
it will also make the blend code much simpler to understand

next there is not just one way to blend a rgba/yuva bitmap onto
another, there are multiple ways
a enum should be added to select which is to be used.
Iam happy to help find / list the equations for that

this code could then also be used by vf_overlay

Thanks

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

it is not once nor twice but times without number that the same ideas make
their appearance in the world. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140622/950656c8/attachment.asc>


More information about the ffmpeg-devel mailing list