[FFmpeg-devel] [PATCH] lavfi: drop planar/packed negotiation support

Clément Bœsch ubitux at gmail.com
Wed May 16 01:16:01 CEST 2012


On Wed, May 16, 2012 at 12:54:11AM +0200, Stefano Sabatini wrote:
> On date Tuesday 2012-05-15 22:20:53 +0200, Clément Bœsch encoded:
> > On Tue, May 15, 2012 at 08:23:19PM +0200, Stefano Sabatini wrote:
> > > The planar/packed switch and the packing_formats list is no longer
> > > required, since the planar/packed information is now stored in the sample
> > > format enum.
> > > 
> > > This is technically a major API break, possibly the harm should not be
> > > too much painful as we marked the audio filtering API as unstable.
> > > ---
> > >  doc/filters.texi               |   13 +++----------
> > >  libavfilter/af_aconvert.c      |   14 +++-----------
> > >  libavfilter/af_aformat.c       |    7 ++-----
> > >  libavfilter/af_amerge.c        |    6 +-----
> > >  libavfilter/af_ashowinfo.c     |    5 ++---
> > >  libavfilter/af_astreamsync.c   |    3 ---
> > >  libavfilter/af_earwax.c        |    4 ----
> > >  libavfilter/af_pan.c           |    2 --
> > >  libavfilter/af_silencedetect.c |    6 ------
> > >  libavfilter/af_volume.c        |    6 ------
> > >  libavfilter/asrc_aevalsrc.c    |    2 --
> > >  libavfilter/audio.c            |    4 ++--
> > >  libavfilter/audio.h            |   17 +++++++++++++++++
> > >  libavfilter/avfilter.c         |    8 ++------
> > >  libavfilter/avfilter.h         |   12 ++++++++++++
> > >  libavfilter/avfiltergraph.c    |   24 ++++++------------------
> > >  libavfilter/buffersink.h       |    2 ++
> > >  libavfilter/defaults.c         |    4 ++--
> > >  libavfilter/formats.c          |   19 ++-----------------
> > >  libavfilter/graphdump.c        |    5 ++---
> > >  libavfilter/internal.h         |   10 ----------
> > >  libavfilter/sink_buffer.c      |   12 +-----------
> > >  libavfilter/src_buffer.c       |   17 +++--------------
> > >  libavfilter/src_movie.c        |    2 --
> > >  libavfilter/version.h          |    3 +++
> > >  25 files changed, 65 insertions(+), 142 deletions(-)
> > > 
> > 
> > Oh thank you for this.
> > 
> > Some forgotten ones (I think):
> > 
> >   lavfi/af_pan:      you may want to change or drop the comment refering
> >                      to packing
> >   lavfi/af_aconvert: description refers to "packed_fmt" (and doc/faq.texi
> >                      might require some updates then)
> >   doc/examples:      filtering_audio is using explicit audio packing stuff
> >   doc/filters.texi:  abuffer examples need updates
> >   doc/filter_design: there is a reference to packing
> > 
> > It seems that's all.
> 
> Squashed with the lavd/lavfi patch, and fixed more packing format
> references in various other files which I missed in the first run.
> -- 
> FFmpeg = Fantastic & Funny Magnificient Philosofic Earthshaking Gangster

> From 7d6b5622031e688c3941ac027c3ac3b5f41314e4 Mon Sep 17 00:00:00 2001
> From: Stefano Sabatini <stefasab at gmail.com>
> Date: Sat, 12 May 2012 17:38:47 +0200
> Subject: [PATCH] lavfi: drop planar/packed negotiation support
> 
> The planar/packed switch and the packing_formats list is no longer
> required, since the planar/packed information is now stored in the sample
> format enum.
> 
> This is technically a major API break, possibly it should be not too
> painful as we marked the audio filtering API as unstable.
> ---
>  doc/examples/filtering_audio.c |    4 +---
>  doc/filter_design.txt          |    3 ++-
>  doc/filters.texi               |   21 +++++++--------------
>  libavdevice/lavfi.c            |    2 --
>  libavfilter/af_aconvert.c      |   16 ++++------------
>  libavfilter/af_aformat.c       |    7 ++-----
>  libavfilter/af_amerge.c        |    6 +-----
>  libavfilter/af_ashowinfo.c     |    5 ++---
>  libavfilter/af_astreamsync.c   |    3 ---
>  libavfilter/af_earwax.c        |    4 ----
>  libavfilter/af_pan.c           |    2 --
>  libavfilter/af_silencedetect.c |    6 ------
>  libavfilter/af_volume.c        |    6 ------
>  libavfilter/asrc_aevalsrc.c    |    2 --
>  libavfilter/audio.c            |    4 ++--
>  libavfilter/audio.h            |   17 +++++++++++++++++
>  libavfilter/avfilter.c         |    8 ++------
>  libavfilter/avfilter.h         |   12 ++++++++++++
>  libavfilter/avfiltergraph.c    |   24 ++++++------------------
>  libavfilter/buffersink.h       |    2 ++
>  libavfilter/defaults.c         |    4 ++--
>  libavfilter/formats.c          |   19 ++-----------------
>  libavfilter/graphdump.c        |    5 ++---
>  libavfilter/internal.h         |   10 ----------
>  libavfilter/sink_buffer.c      |   12 +-----------
>  libavfilter/src_buffer.c       |   17 +++--------------
>  libavfilter/src_movie.c        |    2 --
>  libavfilter/version.h          |    3 +++
>  tools/lavfi-showfiltfmts.c     |    8 --------
>  29 files changed, 73 insertions(+), 161 deletions(-)
> 
> diff --git a/doc/examples/filtering_audio.c b/doc/examples/filtering_audio.c
> index e8e6259..725470e 100644
> --- a/doc/examples/filtering_audio.c
> +++ b/doc/examples/filtering_audio.c
> @@ -88,7 +88,6 @@ static int init_filters(const char *filters_descr)
>      AVFilterInOut *outputs = avfilter_inout_alloc();
>      AVFilterInOut *inputs  = avfilter_inout_alloc();
>      const enum AVSampleFormat sample_fmts[] = { AV_SAMPLE_FMT_S16, -1 };
> -    const int packing_fmts[]                = { AVFILTER_PACKED, -1 };
>      const int64_t *chlayouts                = avfilter_all_channel_layouts;
>      AVABufferSinkParams *abuffersink_params;
>      const AVFilterLink *outlink;
> @@ -98,7 +97,7 @@ static int init_filters(const char *filters_descr)
>      /* buffer audio source: the decoded frames from the decoder will be inserted here. */
>      if (!dec_ctx->channel_layout)
>          dec_ctx->channel_layout = av_get_default_channel_layout(dec_ctx->channels);
> -    snprintf(args, sizeof(args), "%d:%d:0x%"PRIx64":packed",
> +    snprintf(args, sizeof(args), "%d:%d:0x%"PRIx64"",

The "" should not be necessary.

[...]
>  
>  For example:
>  @example
> -abuffer=44100:s16:stereo:planar
> +abuffer=44100:s16:stereo
>  @end example
>  
>  will instruct the source to accept planar 16bit signed stereo at 44100Hz.

stereop, or s/planar/packed/

The rest LGTM, but given the time it is, it would be wise if someone else
could have a quick look too. Though, I think we should not wait too much
for this.

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120516/32091959/attachment.asc>


More information about the ffmpeg-devel mailing list