diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2012-05-12 17:38:47 +0200 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2012-05-16 13:16:05 +0200 |
commit | 4d4098da009c8340997b8d1abedbf2062e4aa991 (patch) | |
tree | 2a2398b82a55b8a5feeaa87ece2fefbd5c83036d /doc | |
parent | 183596fa081cc283c61ba3c0bb8386f9139f761f (diff) | |
download | ffmpeg-4d4098da009c8340997b8d1abedbf2062e4aa991.tar.gz |
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.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/examples/filtering_audio.c | 4 | ||||
-rw-r--r-- | doc/filter_design.txt | 3 | ||||
-rw-r--r-- | doc/filters.texi | 25 |
3 files changed, 12 insertions, 20 deletions
diff --git a/doc/examples/filtering_audio.c b/doc/examples/filtering_audio.c index e8e6259635..2207b458fe 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, dec_ctx->sample_rate, dec_ctx->sample_fmt, dec_ctx->channel_layout); ret = avfilter_graph_create_filter(&buffersrc_ctx, abuffersrc, "in", args, NULL, filter_graph); @@ -111,7 +110,6 @@ static int init_filters(const char *filters_descr) abuffersink_params = av_abuffersink_params_alloc(); abuffersink_params->sample_fmts = sample_fmts; abuffersink_params->channel_layouts = chlayouts; - abuffersink_params->packing_fmts = packing_fmts; ret = avfilter_graph_create_filter(&buffersink_ctx, abuffersink, "out", NULL, abuffersink_params, filter_graph); av_free(abuffersink_params); diff --git a/doc/filter_design.txt b/doc/filter_design.txt index 2b23054a81..4157fd1959 100644 --- a/doc/filter_design.txt +++ b/doc/filter_design.txt @@ -15,7 +15,8 @@ Format negotiation the list supported formats. For video links, that means pixel format. For audio links, that means - channel layout, sample format and sample packing. + channel layout, and sample format (the sample packing is implied by the + sample format). The lists are not just lists, they are references to shared objects. When the negotiation mechanism computes the intersection of the formats diff --git a/doc/filters.texi b/doc/filters.texi index ba8c9f46fb..bdb9fe23f9 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -146,7 +146,7 @@ Convert the input audio to one of the specified formats. The framework will negotiate the most appropriate format to minimize conversions. The filter accepts three lists of formats, separated by ":", in the form: -"@var{sample_formats}:@var{channel_layouts}:@var{packing_formats}". +"@var{sample_formats}:@var{channel_layouts}". Elements in each list are separated by "," which has to be escaped in the filtergraph specification. @@ -156,9 +156,9 @@ supported formats. Some examples follow: @example -aformat=u8\\,s16:mono:packed +aformat=u8\\,s16:mono -aformat=s16:mono\\,stereo:all +aformat=s16:mono\\,stereo @end example @section amerge @@ -184,7 +184,7 @@ On the other hand, if both input are in stereo, the output channels will be in the default order: a1, a2, b1, b2, and the channel layout will be arbitrarily set to 4.0, which may or may not be the expected value. -Both inputs must have the same sample rate, format and packing. +Both inputs must have the same sample rate, and format. If inputs do not have the same duration, the output will stop with the shortest. @@ -293,9 +293,6 @@ number of samples (per each channel) contained in the filtered frame @item rate sample rate for the audio frame -@item planar -if the packing format is planar, 0 if packed - @item checksum Adler-32 checksum (printed in hexadecimal) of all the planes of the input frame @@ -566,7 +563,7 @@ This source is mainly intended for a programmatic use, in particular through the interface defined in @file{libavfilter/asrc_abuffer.h}. It accepts the following mandatory parameters: -@var{sample_rate}:@var{sample_fmt}:@var{channel_layout}:@var{packing} +@var{sample_rate}:@var{sample_fmt}:@var{channel_layout} @table @option @@ -584,23 +581,19 @@ Either a channel layout name from channel_layout_map in @file{libavutil/audioconvert.c} or its corresponding integer representation from the AV_CH_LAYOUT_* macros in @file{libavutil/audioconvert.h} -@item packing -Either "packed" or "planar", or their integer representation: 0 or 1 -respectively. - @end table For example: @example -abuffer=44100:s16:stereo:planar +abuffer=44100:s16p:stereo @end example will instruct the source to accept planar 16bit signed stereo at 44100Hz. -Since the sample format with name "s16" corresponds to the number -1 and the "stereo" channel layout corresponds to the value 0x3, this is +Since the sample format with name "s16p" corresponds to the number +6 and the "stereo" channel layout corresponds to the value 0x3, this is equivalent to: @example -abuffer=44100:1:0x3:1 +abuffer=44100:6:0x3 @end example @section aevalsrc |