On 3/26/2018 1:49 AM, Jean-Baptiste Mardelle wrote:
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

I think you have a few options:

1) Create a new image type in MLT: mlt_image_yuva444p16
I do not recommend this because it would be a lot of work.

2) Convert to mlt_image_yuv422p16 + alpha buffer
This option might be OK. You still lose half of the chroma information converting from 444 to 422. And also, I would recommend converting the alpha channels to an 8bit alpha buffer because it would be a lot of work to find all the places that use the alpha buffer and make sure they work with > 8 bits.

3) Convert to mlt_image_rgb24a
This would be my recommendation because it is the simplest. Yes, you will lose some precision going from 40bpp to 32bpp. But everything would just work and all you have to change is the avformat_producer.

~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