[FFmpeg-devel] [libav-devel] [PATCH] samplefmt: change syntax for av_samples_alloc() and av_samples_fill_arrays()

Stefano Sabatini stefano.sabatini-lala at poste.it
Sat Jun 4 02:18:29 CEST 2011


On date Thursday 2011-06-02 12:29:57 +0200, Stefano Sabatini encoded:
> On date Monday 2011-05-23 19:48:53 +0200, Stefano Sabatini encoded:
> > On date Monday 2011-05-23 16:51:25 +0200, Stefano Sabatini encoded:
> [...]
> > Elaborating more: this patches is basically changing the layout of the
> > samples buffer.
> > 
> > My objective is getting a layout as similiar as possible with that of
> > the video buffer.
> > 
> > So this was my idea:
> > pointers  -> contain pointers to each samples plane
> > linesizes -> the linesize of each plane
> > 
> > This looks simpler and generally easier to manage.
> > 
> > Currently we have:
> >  * data[c] points to the first sample of channel c.
> >  * data[c] + linesize[0] points to the second sample of channel c
> > 
> > This has a slight advantage for accessing the samples for each channel
> > but it has the disadvantage that:
> > * misuse the term "linesize" (with a different semantics depending on
> >   planar/packed mode)
> > * creates an asymmetry between audio and video data layout
> 
> Updated patchset in attachment. This is the base of the audio-filters
> changes, and will possibly affect also how audio in AVFrame is dealt
> with.
> 
> I'm adding libav-devel to recipients in case they're interested in
> discussing (av_samples_* functions were never integrated in libav).

I plan to push this in few days if I see no comments.
-- 
FFmpeg = Fascinating & Forgiving Meaningful Portable Ecletic Geek


More information about the ffmpeg-devel mailing list