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

Stefano Sabatini stefano.sabatini-lala at poste.it
Thu Jun 2 12:29:57 CEST 2011


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).
-- 
FFmpeg = Friendly and Fierce Monstrous Pacific Efficient Goblin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-samplefmt-change-layout-for-arrays-created-by-av_sam.patch
Type: text/x-diff
Size: 3554 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110602/1751e0d6/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-samplefmt-switch-nb_channels-nb_samples-params-order.patch
Type: text/x-diff
Size: 1928 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110602/1751e0d6/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-lavfi-prefer-nb_samples-over-size-in-AVFilterBufferR.patch
Type: text/x-diff
Size: 9144 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110602/1751e0d6/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-lavfi-use-av_samples_alloc-in-avfilter_default_get_a.patch
Type: text/x-diff
Size: 2866 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110602/1751e0d6/attachment-0003.bin>


More information about the ffmpeg-devel mailing list