On 23.03.2018 18:42, Dan Dennedy wrote:
Do not forget to check libavutil version when adding more pixfmts.
One more question since I am not very familiar with the avformat / alpha pipeline. The AV_PIX_FMT_YUVA444P10LE uses 10bits for each chanel. So I cannot easily create the alpha buffer like done for the other YUVA formats in https://github.com/mltframework/mlt/blob/master/src/modules/avformat/producer_avformat.c#L1391
Should I convert the 10bit alpha buffer to an 8 bit buffer ? Or convert the whole frame to an 8 bit yuva format ? If yes, where should that be done ? Not sure how to do this properly so some guidance would help.
Thanks in advance jb
On Fri, Mar 23, 2018 at 6:31 AM Brian Matherly <c...@brianmatherly.com <mailto:c...@brianmatherly.com>> wrote: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 <mailto:Mlt-devel@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/mlt-devel ------------------------------------------------------------------------------ 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
------------------------------------------------------------------------------ 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