On Fri, Aug 3, 2018 at 10:23 AM Jean-Baptiste Mardelle <j...@kdenlive.org>
wrote:
> Hi all,
>
> I recently realized that the color producer always creates an alpha
mask, and uses the rgba24a format by default.
>
Typically, it will receive a format from the downstream consumer services,
and it will only choose this default if movit is used or mlt_image_none is
received.
> In fact, unless the color has an alpha value under 255, it is
> unnecessary and we could simply use an rgb24 format, saving some memory.
>
> I am mostly interested in this because the qtblend transition checks if
> a producer has an alpha channel before deciding whether a compositing is
> required. Having a useless alpha channel on the color producer causes
> unnecessary compositing and slowdowns in this case. Would you be ok to
> change the color producer to use rgb24 or rgb24a formats depending on
> the alpha value ?
>
>
Only in the truly default case. If qtblend requests mlt_image_rgb24a and
the color producer returns mlt_image_rgb24, then the image conversion
filter will automatically convert it. That is slightly less efficient than
directly returning what is requested.
For frei0r.cairoblend, I check every pixel's alpha until it sees one that
is not 255. See transition_frei0r.c:is_opaque().
>
> I can provide a patch if you think this is a welcome change.
>
>
> Best regards
>
> Jean-Baptiste
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel