[FFmpeg-devel] [libav-devel] [RFC] lavfi: audio data packing

Stefano Sabatini stefano.sabatini-lala at poste.it
Thu Jul 7 00:09:53 CEST 2011

On date Tuesday 2011-07-05 23:37:54 -0700, Alex Converse encoded:
> On Tue, Jul 5, 2011 at 7:07 AM, Mina Nagy Zaki <mnzaki at gmail.com> wrote:
> >
> > Hello lists,
> > I need opinions on whether the lavfi framework should negotiate audio data
> > packing between filters or should it just assume all filters will support
> > handling both packed and planar data.
> >
> > In other words, should we allow filters to just declare that they only support
> > handling planar data (or packed data) and have the framework automatically
> > convert incoming data to that filter?
> >
> > AISI this can cause a lot of inefficiency as it may lead to loads of unnecessary
> > conversions. It will probably lead to filter writers just supporting the easier
> > option and letting the framework convert for them, when in most cases it is
> > probably not too difficult to support both.
> >
> > Also, what does ffmpeg/libav do about this internally? In what format is audio
> > data passed around?
> >
> > Comments appreciated! Thanks!
> >
> I think when looking at third party library filters we may run into
> the scenario where only one format is supported and we have to
> implement this conversion in the wrapper. We may wind up having to do
> several of these conversions for multiple filters. We might also waste
> a sample format conversion before the filter where this could have
> been combined. As far as native filters go, it's pretty easy to only
> commit filters that implement both unless the filter has a good reason
> not to.

Same here, as already noted by Alex and Michael, supporting the case
when only one packed/planar mode is supported seems the most natural
choice, it should be easy to convince filter writers to add support to
both in most cases, even if it is not required by the framework.

More information about the ffmpeg-devel mailing list