On 3/23/2018 2:47 AM, Jean-Baptiste Mardelle wrote:
Hi all,

In order to optimize performance, in the qtblend transition (in the qt module), I try to detect if the top frame in the transition has transparency, and if it doesn't, instead of performing the transition I just return the top frame.

However currently, to check if a frame has transparency I use the following:

if ( *format == mlt_image_rgb24a || mlt_frame_get_alpha( b_frame ) )
{
    // The frame has an alpha channel
}

However, some YUV formats with alpha, like AV_PIX_FMT_YUVA444P10LE, don't obey these rules since the alpha buffer is not created.

I predict the problme is not in the qtblend transition. The problem is probably that the avformat_producer is not creating the alpha channel.

Maybe the problem is that AV_PIX_FMT_YUVA444P10LE is not handled here:
https://github.com/mltframework/mlt/blob/master/src/modules/avformat/producer_avformat.c#L1391

And/Or maybe it needs to be added here:
https://github.com/mltframework/mlt/blob/master/src/modules/avformat/producer_avformat.c#L1184

Shouldn't the alpha buffer be created by default for this codecs, or is there any other way to detect that the frame has alpha?

Thanks for your advice.

You can find sample video files in this bug report:
https://bugs.kde.org/show_bug.cgi?id=391963

Regards

Jean-Baptiste

~Brian

------------------------------------------------------------------------------
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

Reply via email to