[FFmpeg-devel] Select the right format

Michael Niedermayer michaelni at gmx.at
Tue Nov 27 02:28:09 CET 2012


On Tue, Nov 27, 2012 at 01:35:09AM +0100, Stefano Sabatini wrote:
> On date Tuesday 2012-11-27 01:21:35 +0100, Michael Niedermayer encoded:
> > On Sun, Nov 25, 2012 at 04:41:12PM +0000, Mark Himsley wrote:
> > > Suppose I wanted to add more 8 bit YUV formats to be accepted by the
> > > overlay filter.
> > > 
> > > I don't see how I can do it right now.
> > > 
> > > Because, for YUV, the MAIN and OVERLAY inputs have to match:
> > >  yuv420p (or yuva420p [1]) on the MAIN with yuva420p on the OVERLAY
> > > 
> > > I want to add:
> > >  yuv422p (or yuva422p) on the MAIN with yuva422p on the OVERLAY
> > >  yuv444p (or yuva444p) on the MAIN with yuva444p on the OVERLAY
> > > 
> > > The only way I can see to enable those is to pass a 'format' argument to
> > > the overlay filter.
> > > 
> > > Can anyone think of a more elegant method, before I start coding a
> > > 'format' argument method?
> > 
> > MAIN == OUTPUT and supports all you want
> > OVERLAY supports all you want
> > 
> > if you get a OVERLAY type that cannot directly be used with what MAIN
> > is set to then insert / call scale to convert
> > 
> > there are other ways to solve it but above seems the simplest
> 
> I'm not sure I like this approach, since it would add an hard
> dependency on libswscale. On the other hand this would avoid an
> unnecessary conversion when you don't know the format of the main
> input.

it would only make the overlay filter depend on swscale. But
libavfilter is not useable without swscale even if you can compile it
that way. Noone is interrested in a video filtering framework that is
unable to convert between formats, unable to change resolution.

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No great genius has ever existed without some touch of madness. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121127/6d0673a3/attachment.asc>


More information about the ffmpeg-devel mailing list