On Tue, Nov 10, 2020 at 01:51:22AM +0000, Brian Matherly wrote:
>  
> 
>     On Monday, November 9, 2020, 03:24:43 AM CST, amin...@mailbox.org 
> <amin...@mailbox.org> wrote:  
>  
>  On Sat, Nov 07, 2020 at 03:13:49PM +0000, Brian Matherly wrote:
> >  > Thanks.
> > > 
> > > Is there an easy way to list (or find) which formats are supported --
> > > and thus don't require conversions -- for inputs and outputs of
> > > filters/transitions?
> > > 
> > > Tom
> > 
> > I think the only way would be to audit the source code and see what mlt 
> > image format the service requests.
> > ~Brian  
> 
> Am I (at all) on the right track here?:
> 
> Yes!
> 
> This code seems to say the avformat producer supports rgba, rgb24, and 
> yuv422p? 
> https://github.com/mltframework/mlt/blob/master/src/modules/avformat/producer_avformat.c#L614-L630
> 
> This is a better place to look:
> https://github.com/mltframework/mlt/blob/master/src/modules/avformat/producer_avformat.c#L1167rgba,
>  rgb24, yuv420p, yuyv422

Got it, thanks! So AVPixelFormat is the ffmpeg(?) pixel format, and 
mlt_image_format is the type actually used by MLT services (or, at least, by 
filters and transitions)?

The definition of mlt_image_format 
(https://github.com/mltframework/mlt/blob/master/src/framework/mlt_types.h#L45-L58)
 seems to have only mlt_image_yuv422p16 as a candidate capable of supporting 
10-bit color; is that right? All the rest (excluding glsl which I haven't 
explored) seem to only be 8-bit?

And also is my math right that it is in fact able to support 10(+) bits of 
color? - i.e. 2 chroma-subsampled pixels have (32 bpp*2==64) bits of color 
information, divided by 4 (2 Y + 1 Cr + 1 Cb) == 16 bits per component?
A simpler way of saying this might be: the ffmpeg naming scheme for e.g. 
"yuv422p10le" is the same as MLT's naming scheme for "yuv422p16", thus since 16 
is greater than 10, we can definitely losslessly use 10-bit colors (in services 
that support 16-bit colors)?

Thanks!
Tom



_______________________________________________
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel

Reply via email to