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.
Unified · Split
| @@ -88,7 +88,6 @@ static int init_filters(const char *filters_descr) · 87 unmodified lines | ||
| 88 | 88 | AVFilterInOut *outputs = avfilter_inout_alloc(); |
| 89 | 89 | AVFilterInOut *inputs = avfilter_inout_alloc(); |
| 90 | 90 | const enum AVSampleFormat sample_fmts[] = { AV_SAMPLE_FMT_S16, -1 }; |
| 91 | − const int packing_fmts[] = { AVFILTER_PACKED, -1 }; | |
| 92 | 91 | const int64_t *chlayouts = avfilter_all_channel_layouts; |
| 93 | 92 | AVABufferSinkParams *abuffersink_params; |
| 94 | 93 | const AVFilterLink *outlink; |
| @@ -98,7 +97,7 @@ static int init_filters(const char *filters_descr) · 3 unmodified lines | ||
| 98 | 97 | /* buffer audio source: the decoded frames from the decoder will be inserted here. */ |
| 99 | 98 | if (!dec_ctx->channel_layout) |
| 100 | 99 | dec_ctx->channel_layout = av_get_default_channel_layout(dec_ctx->channels); |
| 101 | − snprintf(args, sizeof(args), "%d:%d:0x%"PRIx64":packed", | |
| 100 | + snprintf(args, sizeof(args), "%d:%d:0x%"PRIx64, | |
| 102 | 101 | dec_ctx->sample_rate, dec_ctx->sample_fmt, dec_ctx->channel_layout); |
| 103 | 102 | ret = avfilter_graph_create_filter(&buffersrc_ctx, abuffersrc, "in", |
| 104 | 103 | args, NULL, filter_graph); |
| @@ -111,7 +110,6 @@ static int init_filters(const char *filters_descr) · 6 unmodified lines | ||
| 111 | 110 | abuffersink_params = av_abuffersink_params_alloc(); |
| 112 | 111 | abuffersink_params->sample_fmts = sample_fmts; |
| 113 | 112 | abuffersink_params->channel_layouts = chlayouts; |
| 114 | − abuffersink_params->packing_fmts = packing_fmts; | |
| 115 | 113 | ret = avfilter_graph_create_filter(&buffersink_ctx, abuffersink, "out", |
| 116 | 114 | NULL, abuffersink_params, filter_graph); |
| 117 | 115 | av_free(abuffersink_params); |
| @@ -15,7 +15,8 @@ Format negotiation · 14 unmodified lines | ||
| 15 | 15 | the list supported formats. |
| 16 | 16 | |
| 17 | 17 | For video links, that means pixel format. For audio links, that means |
| 18 | − channel layout, sample format and sample packing. | |
| 18 | + channel layout, and sample format (the sample packing is implied by the | |
| 19 | + sample format). | |
| 19 | 20 | |
| 20 | 21 | The lists are not just lists, they are references to shared objects. When |
| 21 | 22 | the negotiation mechanism computes the intersection of the formats |
| @@ -146,7 +146,7 @@ Convert the input audio to one of the specified formats. The framework will · 145 unmodified lines | ||
| 146 | 146 | negotiate the most appropriate format to minimize conversions. |
| 147 | 147 | |
| 148 | 148 | The filter accepts three lists of formats, separated by ":", in the form: |
| 149 | −"@var{sample_formats}:@var{channel_layouts}:@var{packing_formats}". | |
| 149 | +"@var{sample_formats}:@var{channel_layouts}". | |
| 150 | 150 | |
| 151 | 151 | Elements in each list are separated by "," which has to be escaped in the |
| 152 | 152 | filtergraph specification. |
| @@ -156,9 +156,9 @@ supported formats. · 3 unmodified lines | ||
| 156 | 156 | |
| 157 | 157 | Some examples follow: |
| 158 | 158 | @example |
| 159 | −aformat=u8\\,s16:mono:packed | |
| 159 | +aformat=u8\\,s16:mono | |
| 160 | 160 | |
| 161 | −aformat=s16:mono\\,stereo:all | |
| 161 | +aformat=s16:mono\\,stereo | |
| 162 | 162 | @end example |
| 163 | 163 | |
| 164 | 164 | @section amerge |
| @@ -184,7 +184,7 @@ On the other hand, if both input are in stereo, the output channels will be · 19 unmodified lines | ||
| 184 | 184 | in the default order: a1, a2, b1, b2, and the channel layout will be |
| 185 | 185 | arbitrarily set to 4.0, which may or may not be the expected value. |
| 186 | 186 | |
| 187 | −Both inputs must have the same sample rate, format and packing. | |
| 187 | +Both inputs must have the same sample rate, and format. | |
| 188 | 188 | |
| 189 | 189 | If inputs do not have the same duration, the output will stop with the |
| 190 | 190 | shortest. |
| @@ -293,9 +293,6 @@ number of samples (per each channel) contained in the filtered frame · 102 unmodified lines | ||
| 293 | 293 | @item rate |
| 294 | 294 | sample rate for the audio frame |
| 295 | 295 | |
| 296 | −@item planar | |
| 297 | −if the packing format is planar, 0 if packed | |
| 298 | − | |
| 299 | 296 | @item checksum |
| 300 | 297 | Adler-32 checksum (printed in hexadecimal) of all the planes of the input frame |
| 301 | 298 | |
| @@ -566,7 +563,7 @@ This source is mainly intended for a programmatic use, in particular · 264 unmodified lines | ||
| 566 | 563 | through the interface defined in @file{libavfilter/asrc_abuffer.h}. |
| 567 | 564 | |
| 568 | 565 | It accepts the following mandatory parameters: |
| 569 | −@var{sample_rate}:@var{sample_fmt}:@var{channel_layout}:@var{packing} | |
| 566 | +@var{sample_rate}:@var{sample_fmt}:@var{channel_layout} | |
| 570 | 567 | |
| 571 | 568 | @table @option |
| 572 | 569 | |
| @@ -584,23 +581,19 @@ Either a channel layout name from channel_layout_map in · 11 unmodified lines | ||
| 584 | 581 | @file{libavutil/audioconvert.c} or its corresponding integer representation |
| 585 | 582 | from the AV_CH_LAYOUT_* macros in @file{libavutil/audioconvert.h} |
| 586 | 583 | |
| 587 | −@item packing | |
| 588 | −Either "packed" or "planar", or their integer representation: 0 or 1 | |
| 589 | −respectively. | |
| 590 | − | |
| 591 | 584 | @end table |
| 592 | 585 | |
| 593 | 586 | For example: |
| 594 | 587 | @example |
| 595 | −abuffer=44100:s16:stereo:planar | |
| 588 | +abuffer=44100:s16p:stereo | |
| 596 | 589 | @end example |
| 597 | 590 | |
| 598 | 591 | will instruct the source to accept planar 16bit signed stereo at 44100Hz. |
| 599 | −Since the sample format with name "s16" corresponds to the number | |
| 600 | −1 and the "stereo" channel layout corresponds to the value 0x3, this is | |
| 592 | +Since the sample format with name "s16p" corresponds to the number | |
| 593 | +6 and the "stereo" channel layout corresponds to the value 0x3, this is | |
| 601 | 594 | equivalent to: |
| 602 | 595 | @example |
| 603 | −abuffer=44100:1:0x3:1 | |
| 596 | +abuffer=44100:6:0x3 | |
| 604 | 597 | @end example |
| 605 | 598 | |
| 606 | 599 | @section aevalsrc |
| @@ -211,11 +211,9 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx) · 210 unmodified lines | ||
| 211 | 211 | AV_SAMPLE_FMT_S32, |
| 212 | 212 | AV_SAMPLE_FMT_FLT, |
| 213 | 213 | AV_SAMPLE_FMT_DBL, -1 }; |
| 214 | − const int packing_fmts[] = { AVFILTER_PACKED, -1 }; | |
| 215 | 214 | const int64_t *chlayouts = avfilter_all_channel_layouts; |
| 216 | 215 | AVABufferSinkParams *abuffersink_params = av_abuffersink_params_alloc(); |
| 217 | 216 | abuffersink_params->sample_fmts = sample_fmts; |
| 218 | − abuffersink_params->packing_fmts = packing_fmts; | |
| 219 | 217 | abuffersink_params->channel_layouts = chlayouts; |
| 220 | 218 | |
| 221 | 219 | ret = avfilter_graph_create_filter(&sink, abuffersink, |
| @@ -73,7 +73,6 @@ static int query_formats(AVFilterContext *ctx) · 72 unmodified lines | ||
| 73 | 73 | AConvertContext *aconvert = ctx->priv; |
| 74 | 74 | AVFilterLink *inlink = ctx->inputs[0]; |
| 75 | 75 | AVFilterLink *outlink = ctx->outputs[0]; |
| 76 | − int out_packing = av_sample_fmt_is_planar(aconvert->out_sample_fmt); | |
| 77 | 76 | AVFilterChannelLayouts *layouts; |
| 78 | 77 | |
| 79 | 78 | avfilter_formats_ref(avfilter_make_all_formats(AVMEDIA_TYPE_AUDIO), |
| @@ -96,12 +95,6 @@ static int query_formats(AVFilterContext *ctx) · 16 unmodified lines | ||
| 96 | 95 | ff_channel_layouts_ref(ff_all_channel_layouts(), |
| 97 | 96 | &outlink->in_channel_layouts); |
| 98 | 97 | |
| 99 | − avfilter_formats_ref(avfilter_make_all_packing_formats(), | |
| 100 | − &inlink->out_packing); | |
| 101 | − formats = NULL; | |
| 102 | − avfilter_add_format(&formats, out_packing); | |
| 103 | − avfilter_formats_ref(formats, &outlink->in_packing); | |
| 104 | − | |
| 105 | 98 | return 0; |
| 106 | 99 | } |
| 107 | 100 | |
| @@ -134,9 +127,9 @@ static int config_output(AVFilterLink *outlink) · 26 unmodified lines | ||
| 134 | 127 | av_get_channel_layout_string(buf2, sizeof(buf2), |
| 135 | 128 | -1, outlink->channel_layout); |
| 136 | 129 | av_log(ctx, AV_LOG_INFO, |
| 137 | − "fmt:%s cl:%s planar:%i -> fmt:%s cl:%s planar:%i\n", | |
| 138 | − av_get_sample_fmt_name(inlink ->format), buf1, inlink ->planar, | |
| 139 | − av_get_sample_fmt_name(outlink->format), buf2, outlink->planar); | |
| 130 | + "fmt:%s cl:%s -> fmt:%s cl:%s\n", | |
| 131 | + av_get_sample_fmt_name(inlink ->format), buf1, | |
| 132 | + av_get_sample_fmt_name(outlink->format), buf2); | |
| 140 | 133 | |
| 141 | 134 | return 0; |
| 142 | 135 | } |
| @@ -153,7 +146,6 @@ static void filter_samples(AVFilterLink *inlink, AVFilterBufferRef *insamplesref · 10 unmodified lines | ||
| 153 | 146 | |
| 154 | 147 | avfilter_copy_buffer_ref_props(outsamplesref, insamplesref); |
| 155 | 148 | outsamplesref->audio->channel_layout = outlink->channel_layout; |
| 156 | − outsamplesref->audio->planar = outlink->planar; | |
| 157 | 149 | |
| 158 | 150 | ff_filter_samples(outlink, outsamplesref); |
| 159 | 151 | avfilter_unref_buffer(insamplesref); |
| @@ -161,7 +153,7 @@ static void filter_samples(AVFilterLink *inlink, AVFilterBufferRef *insamplesref · 1 unmodified line | ||
| 161 | 153 | |
| 162 | 154 | AVFilter avfilter_af_aconvert = { |
| 163 | 155 | .name = "aconvert", |
| 164 | − .description = NULL_IF_CONFIG_SMALL("Convert the input audio to sample_fmt:channel_layout:packed_fmt."), | |
| 156 | + .description = NULL_IF_CONFIG_SMALL("Convert the input audio to sample_fmt:channel_layout."), | |
| 165 | 157 | .priv_size = sizeof(AConvertContext), |
| 166 | 158 | .init = init, |
| 167 | 159 | .uninit = uninit, |
| @@ -54,7 +54,6 @@ static int query_formats(AVFilterContext *ctx) · 53 unmodified lines | ||
| 54 | 54 | { |
| 55 | 55 | AMergeContext *am = ctx->priv; |
| 56 | 56 | int64_t inlayout[2], outlayout; |
| 57 | − const int packing_fmts[] = { AVFILTER_PACKED, -1 }; | |
| 58 | 57 | AVFilterFormats *formats; |
| 59 | 58 | AVFilterChannelLayouts *layouts; |
| 60 | 59 | int i; |
| @@ -97,10 +96,8 @@ static int query_formats(AVFilterContext *ctx) · 36 unmodified lines | ||
| 97 | 96 | if ((inlayout[i] >> c) & 1) |
| 98 | 97 | *(route[i]++) = out_ch_number++; |
| 99 | 98 | } |
| 100 | − formats = avfilter_make_all_formats(AVMEDIA_TYPE_AUDIO); | |
| 99 | + formats = avfilter_make_format_list(ff_packed_sample_fmts); | |
| 101 | 100 | avfilter_set_common_sample_formats(ctx, formats); |
| 102 | − formats = avfilter_make_format_list(packing_fmts); | |
| 103 | − avfilter_set_common_packing_formats(ctx, formats); | |
| 104 | 101 | for (i = 0; i < 2; i++) { |
| 105 | 102 | layouts = NULL; |
| 106 | 103 | ff_add_channel_layout(&layouts, inlayout[i]); |
| @@ -222,7 +219,6 @@ static void filter_samples(AVFilterLink *inlink, AVFilterBufferRef *insamples) · 115 unmodified lines | ||
| 222 | 219 | avfilter_copy_buffer_ref_props(outbuf, *inbuf[0]); |
| 223 | 220 | outbuf->audio->nb_samples = nb_samples; |
| 224 | 221 | outbuf->audio->channel_layout = outlink->channel_layout; |
| 225 | − outbuf->audio->planar = outlink->planar; | |
| 226 | 222 | |
| 227 | 223 | while (nb_samples) { |
| 228 | 224 | ns = nb_samples; |
| @@ -50,7 +50,7 @@ static void filter_samples(AVFilterLink *inlink, AVFilterBufferRef *samplesref) · 49 unmodified lines | ||
| 50 | 50 | int linesize = |
| 51 | 51 | samplesref->audio->nb_samples * |
| 52 | 52 | av_get_bytes_per_sample(samplesref->format); |
| 53 | − if (!samplesref->audio->planar) /* packed layout */ | |
| 53 | + if (!av_sample_fmt_is_planar(samplesref->format)) | |
| 54 | 54 | linesize *= av_get_channel_layout_nb_channels(samplesref->audio->channel_layout); |
| 55 | 55 | |
| 56 | 56 | for (plane = 0; samplesref->data[plane] && plane < 8; plane++) { |
| @@ -66,7 +66,7 @@ static void filter_samples(AVFilterLink *inlink, AVFilterBufferRef *samplesref) · 9 unmodified lines | ||
| 66 | 66 | |
| 67 | 67 | av_log(ctx, AV_LOG_INFO, |
| 68 | 68 | "n:%d pts:%s pts_time:%s pos:%"PRId64" " |
| 69 | − "fmt:%s chlayout:%s nb_samples:%d rate:%d planar:%d " | |
| 69 | + "fmt:%s chlayout:%s nb_samples:%d rate:%d " | |
| 70 | 70 | "checksum:%08X plane_checksum[%08X", |
| 71 | 71 | showinfo->frame, |
| 72 | 72 | av_ts2str(samplesref->pts), av_ts2timestr(samplesref->pts, &inlink->time_base), |
| @@ -75,7 +75,6 @@ static void filter_samples(AVFilterLink *inlink, AVFilterBufferRef *samplesref) · 2 unmodified lines | ||
| 75 | 75 | chlayout_str, |
| 76 | 76 | samplesref->audio->nb_samples, |
| 77 | 77 | samplesref->audio->sample_rate, |
| 78 | − samplesref->audio->planar, | |
| 79 | 78 | checksum, |
| 80 | 79 | plane_checksum[0]); |
| 81 | 80 | |
| @@ -87,9 +87,6 @@ static int query_formats(AVFilterContext *ctx) · 86 unmodified lines | ||
| 87 | 87 | formats = ctx->inputs[i]->in_formats; |
| 88 | 88 | avfilter_formats_ref(formats, &ctx->inputs[i]->out_formats); |
| 89 | 89 | avfilter_formats_ref(formats, &ctx->outputs[i]->in_formats); |
| 90 | − formats = ctx->inputs[i]->in_packing; | |
| 91 | − avfilter_formats_ref(formats, &ctx->inputs[i]->out_packing); | |
| 92 | − avfilter_formats_ref(formats, &ctx->outputs[i]->in_packing); | |
| 93 | 90 | layouts = ctx->inputs[i]->in_channel_layouts; |
| 94 | 91 | ff_channel_layouts_ref(layouts, &ctx->inputs[i]->out_channel_layouts); |
| 95 | 92 | ff_channel_layouts_ref(layouts, &ctx->outputs[i]->in_channel_layouts); |
| @@ -86,9 +86,6 @@ static int query_formats(AVFilterContext *ctx) · 85 unmodified lines | ||
| 86 | 86 | avfilter_set_common_sample_formats(ctx, formats); |
| 87 | 87 | ff_add_channel_layout(&layout, AV_CH_LAYOUT_STEREO); |
| 88 | 88 | ff_set_common_channel_layouts(ctx, layout); |
| 89 | − formats = NULL; | |
| 90 | − avfilter_add_format(&formats, AVFILTER_PACKED); | |
| 91 | − avfilter_set_common_packing_formats(ctx, formats); | |
| 92 | 89 | ff_set_common_samplerates(ctx, avfilter_make_format_list(sample_rates)); |
| 93 | 90 | |
| 94 | 91 | return 0; |
| @@ -218,7 +218,6 @@ static int query_formats(AVFilterContext *ctx) · 217 unmodified lines | ||
| 218 | 218 | pan->pure_gains = are_gains_pure(pan); |
| 219 | 219 | /* libswr supports any sample and packing formats */ |
| 220 | 220 | avfilter_set_common_sample_formats(ctx, avfilter_make_all_formats(AVMEDIA_TYPE_AUDIO)); |
| 221 | − avfilter_set_common_packing_formats(ctx, avfilter_make_all_packing_formats()); | |
| 222 | 221 | |
| 223 | 222 | // inlink supports any channel layout |
| 224 | 223 | layouts = ff_all_channel_layouts(); |
| @@ -348,7 +347,6 @@ static void filter_samples(AVFilterLink *inlink, AVFilterBufferRef *insamples) · 123 unmodified lines | ||
| 348 | 347 | swr_convert(pan->swr, outsamples->data, n, (void *)insamples->data, n); |
| 349 | 348 | avfilter_copy_buffer_ref_props(outsamples, insamples); |
| 350 | 349 | outsamples->audio->channel_layout = outlink->channel_layout; |
| 351 | − outsamples->audio->planar = outlink->planar; | |
| 352 | 350 | |
| 353 | 351 | ff_filter_samples(outlink, outsamples); |
| 354 | 352 | avfilter_unref_buffer(insamples); |
| @@ -136,7 +136,6 @@ static int query_formats(AVFilterContext *ctx) · 135 unmodified lines | ||
| 136 | 136 | AV_SAMPLE_FMT_DBL, |
| 137 | 137 | AV_SAMPLE_FMT_NONE |
| 138 | 138 | }; |
| 139 | − int packing_fmts[] = { AVFILTER_PACKED, -1 }; | |
| 140 | 139 | |
| 141 | 140 | layouts = ff_all_channel_layouts(); |
| 142 | 141 | if (!layouts) |
| @@ -148,11 +147,6 @@ static int query_formats(AVFilterContext *ctx) · 5 unmodified lines | ||
| 148 | 147 | return AVERROR(ENOMEM); |
| 149 | 148 | avfilter_set_common_sample_formats(ctx, formats); |
| 150 | 149 | |
| 151 | − formats = avfilter_make_format_list(packing_fmts); | |
| 152 | − if (!formats) | |
| 153 | − return AVERROR(ENOMEM); | |
| 154 | − avfilter_set_common_packing_formats(ctx, formats); | |
| 155 | − | |
| 156 | 150 | formats = ff_all_samplerates(); |
| 157 | 151 | if (!formats) |
| 158 | 152 | return AVERROR(ENOMEM); |
| @@ -91,7 +91,6 @@ static int query_formats(AVFilterContext *ctx) · 90 unmodified lines | ||
| 91 | 91 | AV_SAMPLE_FMT_DBL, |
| 92 | 92 | AV_SAMPLE_FMT_NONE |
| 93 | 93 | }; |
| 94 | − int packing_fmts[] = { AVFILTER_PACKED, -1 }; | |
| 95 | 94 | |
| 96 | 95 | layouts = ff_all_channel_layouts(); |
| 97 | 96 | if (!layouts) |
| @@ -103,11 +102,6 @@ static int query_formats(AVFilterContext *ctx) · 5 unmodified lines | ||
| 103 | 102 | return AVERROR(ENOMEM); |
| 104 | 103 | avfilter_set_common_sample_formats(ctx, formats); |
| 105 | 104 | |
| 106 | − formats = avfilter_make_format_list(packing_fmts); | |
| 107 | − if (!formats) | |
| 108 | − return AVERROR(ENOMEM); | |
| 109 | − avfilter_set_common_packing_formats(ctx, formats); | |
| 110 | − | |
| 111 | 105 | formats = ff_all_samplerates(); |
| 112 | 106 | if (!formats) |
| 113 | 107 | return AVERROR(ENOMEM); |
| @@ -187,11 +187,9 @@ static int query_formats(AVFilterContext *ctx) · 186 unmodified lines | ||
| 187 | 187 | EvalContext *eval = ctx->priv; |
| 188 | 188 | enum AVSampleFormat sample_fmts[] = { AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_NONE }; |
| 189 | 189 | int64_t chlayouts[] = { eval->chlayout, -1 }; |
| 190 | − int packing_fmts[] = { AVFILTER_PLANAR, -1 }; | |
| 191 | 190 | |
| 192 | 191 | avfilter_set_common_sample_formats (ctx, avfilter_make_format_list(sample_fmts)); |
| 193 | 192 | ff_set_common_channel_layouts(ctx, avfilter_make_format64_list(chlayouts)); |
| 194 | − avfilter_set_common_packing_formats(ctx, avfilter_make_format_list(packing_fmts)); | |
| 195 | 193 | |
| 196 | 194 | return 0; |
| 197 | 195 | } |
| @@ -100,9 +100,9 @@ AVFilterBufferRef* avfilter_get_audio_buffer_ref_from_arrays(uint8_t **data, · 99 unmodified lines | ||
| 100 | 100 | |
| 101 | 101 | samplesref->audio->nb_samples = nb_samples; |
| 102 | 102 | samplesref->audio->channel_layout = channel_layout; |
| 103 | − samplesref->audio->planar = av_sample_fmt_is_planar(sample_fmt); | |
| 104 | 103 | |
| 105 | − planes = samplesref->audio->planar ? av_get_channel_layout_nb_channels(channel_layout) : 1; | |
| 104 | + planes = av_sample_fmt_is_planar(sample_fmt) ? | |
| 105 | + av_get_channel_layout_nb_channels(channel_layout) : 1; | |
| 106 | 106 | |
| 107 | 107 | /* make sure the buffer gets read permission or it's useless for output */ |
| 108 | 108 | samplesref->perms = perms | AV_PERM_READ; |
| @@ -24,6 +24,23 @@ · 23 unmodified lines | ||
| 24 | 24 | |
| 25 | 25 | #include "avfilter.h" |
| 26 | 26 | |
| 27 | +static const enum AVSampleFormat ff_packed_sample_fmts[] = { | |
| 28 | + AV_SAMPLE_FMT_U8, | |
| 29 | + AV_SAMPLE_FMT_S16, | |
| 30 | + AV_SAMPLE_FMT_S32, | |
| 31 | + AV_SAMPLE_FMT_FLT, | |
| 32 | + AV_SAMPLE_FMT_DBL, | |
| 33 | + AV_SAMPLE_FMT_NONE | |
| 34 | +}; | |
| 35 | + | |
| 36 | +static const enum AVSampleFormat ff_planar_sample_fmts[] = { | |
| 37 | + AV_SAMPLE_FMT_U8P, | |
| 38 | + AV_SAMPLE_FMT_S16P, | |
| 39 | + AV_SAMPLE_FMT_S32P, | |
| 40 | + AV_SAMPLE_FMT_FLTP, | |
| 41 | + AV_SAMPLE_FMT_DBLP, | |
| 42 | + AV_SAMPLE_FMT_NONE | |
| 43 | +}; | |
| 27 | 44 | |
| 28 | 45 | /** default handler for get_audio_buffer() for audio inputs */ |
| 29 | 46 | AVFilterBufferRef *ff_default_get_audio_buffer(AVFilterLink *link, int perms, |
| @@ -148,9 +148,6 @@ int avfilter_insert_filter(AVFilterLink *link, AVFilterContext *filt, · 147 unmodified lines | ||
| 148 | 148 | if (link->out_channel_layouts) |
| 149 | 149 | ff_channel_layouts_changeref(&link->out_channel_layouts, |
| 150 | 150 | &filt->outputs[filt_dstpad_idx]->out_channel_layouts); |
| 151 | − if (link->out_packing) | |
| 152 | − avfilter_formats_changeref(&link->out_packing, | |
| 153 | − &filt->outputs[filt_dstpad_idx]->out_packing); | |
| 154 | 151 | if (link->out_samplerates) |
| 155 | 152 | avfilter_formats_changeref(&link->out_samplerates, |
| 156 | 153 | &filt->outputs[filt_dstpad_idx]->out_samplerates); |
| @@ -121,7 +121,9 @@ typedef struct AVFilterBufferRefAudioProps { · 120 unmodified lines | ||
| 121 | 121 | uint64_t channel_layout; ///< channel layout of audio buffer |
| 122 | 122 | int nb_samples; ///< number of audio samples per channel |
| 123 | 123 | int sample_rate; ///< audio buffer sample rate |
| 124 | +#if FF_API_PACKING | |
| 124 | 125 | int planar; ///< audio buffer - planar or packed |
| 126 | +#endif | |
| 125 | 127 | } AVFilterBufferRefAudioProps; |
| 126 | 128 | |
| 127 | 129 | /** |
| @@ -303,10 +305,12 @@ AVFilterFormats *avfilter_make_all_formats(enum AVMediaType type); · 175 unmodified lines | ||
| 303 | 305 | */ |
| 304 | 306 | extern const int64_t avfilter_all_channel_layouts[]; |
| 305 | 307 | |
| 308 | +#if FF_API_PACKING | |
| 306 | 309 | /** |
| 307 | 310 | * Return a list of all audio packing formats. |
| 308 | 311 | */ |
| 309 | 312 | AVFilterFormats *avfilter_make_all_packing_formats(void); |
| 313 | +#endif | |
| 310 | 314 | |
| 311 | 315 | /** |
| 312 | 316 | * Return a format list which contains the intersection of the formats of |
| @@ -519,7 +523,9 @@ void avfilter_set_common_formats(AVFilterContext *ctx, AVFilterFormats *formats) · 206 unmodified lines | ||
| 519 | 523 | void avfilter_set_common_pixel_formats(AVFilterContext *ctx, AVFilterFormats *formats); |
| 520 | 524 | void avfilter_set_common_sample_formats(AVFilterContext *ctx, AVFilterFormats *formats); |
| 521 | 525 | void avfilter_set_common_channel_layouts(AVFilterContext *ctx, AVFilterFormats *formats); |
| 526 | +#if FF_API_PACKING | |
| 522 | 527 | void avfilter_set_common_packing_formats(AVFilterContext *ctx, AVFilterFormats *formats); |
| 528 | +#endif | |
| 523 | 529 | |
| 524 | 530 | /** Default handler for query_formats() */ |
| 525 | 531 | int avfilter_default_query_formats(AVFilterContext *ctx); |
| @@ -616,10 +622,12 @@ struct AVFilterContext { · 90 unmodified lines | ||
| 616 | 622 | struct AVFilterCommand *command_queue; |
| 617 | 623 | }; |
| 618 | 624 | |
| 625 | +#if FF_API_PACKING | |
| 619 | 626 | enum AVFilterPacking { |
| 620 | 627 | AVFILTER_PACKED = 0, |
| 621 | 628 | AVFILTER_PLANAR, |
| 622 | 629 | }; |
| 630 | +#endif | |
| 623 | 631 | |
| 624 | 632 | /** |
| 625 | 633 | * A link between two filters. This contains pointers to the source and |
| @@ -655,7 +663,9 @@ struct AVFilterLink { · 29 unmodified lines | ||
| 655 | 663 | #else |
| 656 | 664 | int sample_rate; ///< samples per second |
| 657 | 665 | #endif |
| 666 | +#if FF_API_PACKING | |
| 658 | 667 | int planar; ///< agreed upon packing mode of audio buffers. true if planar. |
| 668 | +#endif | |
| 659 | 669 | |
| 660 | 670 | int format; ///< agreed upon media format |
| 661 | 671 | |
| @@ -669,8 +679,10 @@ struct AVFilterLink { · 7 unmodified lines | ||
| 669 | 679 | AVFilterFormats *in_formats; |
| 670 | 680 | AVFilterFormats *out_formats; |
| 671 | 681 | |
| 682 | +#if FF_API_PACKING | |
| 672 | 683 | AVFilterFormats *in_packing; |
| 673 | 684 | AVFilterFormats *out_packing; |
| 685 | +#endif | |
| 674 | 686 | |
| 675 | 687 | /** |
| 676 | 688 | * The buffer reference currently being sent across the link by the source |
| @@ -200,14 +200,12 @@ static int insert_conv_filter(AVFilterGraph *graph, AVFilterLink *link, · 199 unmodified lines | ||
| 200 | 200 | |
| 201 | 201 | if (link->type == AVMEDIA_TYPE_AUDIO && |
| 202 | 202 | (((link = filt_ctx-> inputs[0]) && |
| 203 | − (!ff_merge_channel_layouts(link->in_channel_layouts, link->out_channel_layouts) || | |
| 204 | − !avfilter_merge_formats(link->in_packing, link->out_packing))) || | |
| 203 | + !ff_merge_channel_layouts(link->in_channel_layouts, link->out_channel_layouts)) || | |
| 205 | 204 | ((link = filt_ctx->outputs[0]) && |
| 206 | − (!ff_merge_channel_layouts(link->in_channel_layouts, link->out_channel_layouts) || | |
| 207 | − !avfilter_merge_formats(link->in_packing, link->out_packing)))) | |
| 205 | + !ff_merge_channel_layouts(link->in_channel_layouts, link->out_channel_layouts))) | |
| 208 | 206 | ) { |
| 209 | 207 | av_log(NULL, AV_LOG_ERROR, |
| 210 | − "Impossible to convert between the channel layouts/packing formats supported by the filter " | |
| 208 | + "Impossible to convert between the channel layouts formats supported by the filter " | |
| 211 | 209 | "'%s' and the filter '%s'\n", link->src->name, link->dst->name); |
| 212 | 210 | return AVERROR(EINVAL); |
| 213 | 211 | } |
| @@ -219,7 +217,7 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx) · 5 unmodified lines | ||
| 219 | 217 | { |
| 220 | 218 | int i, j, ret; |
| 221 | 219 | char filt_args[128]; |
| 222 | − AVFilterFormats *formats, *packing; | |
| 220 | + AVFilterFormats *formats; | |
| 223 | 221 | AVFilterChannelLayouts *chlayouts; |
| 224 | 222 | AVFilterFormats *samplerates; |
| 225 | 223 | int scaler_count = 0, resampler_count = 0; |
| @@ -254,8 +252,7 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx) · 28 unmodified lines | ||
| 254 | 252 | return ret; |
| 255 | 253 | } |
| 256 | 254 | else if (link->type == AVMEDIA_TYPE_AUDIO) { |
| 257 | − if (!link->in_channel_layouts || !link->out_channel_layouts || | |
| 258 | − !link->in_packing || !link->out_packing) | |
| 255 | + if (!link->in_channel_layouts || !link->out_channel_layouts) | |
| 259 | 256 | return AVERROR(EINVAL); |
| 260 | 257 | |
| 261 | 258 | /* Merge all three list before checking: that way, in all |
| @@ -264,9 +261,8 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx) · 2 unmodified lines | ||
| 264 | 261 | formats = avfilter_merge_formats(link->in_formats, link->out_formats); |
| 265 | 262 | chlayouts = ff_merge_channel_layouts(link->in_channel_layouts , link->out_channel_layouts); |
| 266 | 263 | samplerates = ff_merge_samplerates (link->in_samplerates, link->out_samplerates); |
| 267 | − packing = avfilter_merge_formats(link->in_packing, link->out_packing); | |
| 268 | 264 | |
| 269 | − if (!formats || !chlayouts || !packing || !samplerates) | |
| 265 | + if (!formats || !chlayouts || !samplerates) | |
| 270 | 266 | if (ret = insert_conv_filter(graph, link, "aconvert", NULL)) |
| 271 | 267 | return ret; |
| 272 | 268 | #else |
| @@ -46,7 +46,9 @@ AVBufferSinkParams *av_buffersink_params_alloc(void); · 45 unmodified lines | ||
| 46 | 46 | typedef struct { |
| 47 | 47 | const enum AVSampleFormat *sample_fmts; ///< list of allowed sample formats, terminated by AV_SAMPLE_FMT_NONE |
| 48 | 48 | const int64_t *channel_layouts; ///< list of allowed channel layouts, terminated by -1 |
| 49 | +#if FF_API_PACKING | |
| 49 | 50 | const int *packing_fmts; ///< list of allowed packing formats |
| 51 | +#endif | |
| 50 | 52 | } AVABufferSinkParams; |
| 51 | 53 | |
| 52 | 54 | /** |
| @@ -70,9 +70,11 @@ void avfilter_set_common_channel_layouts(AVFilterContext *ctx, AVFilterFormats * · 69 unmodified lines | ||
| 70 | 70 | offsetof(AVFilterLink, out_channel_layouts)); |
| 71 | 71 | } |
| 72 | 72 | |
| 73 | +#if FF_API_PACKING | |
| 73 | 74 | void avfilter_set_common_packing_formats(AVFilterContext *ctx, AVFilterFormats *formats) |
| 74 | 75 | { |
| 75 | 76 | set_common_formats(ctx, formats, AVMEDIA_TYPE_AUDIO, |
| 76 | 77 | offsetof(AVFilterLink, in_packing), |
| 77 | 78 | offsetof(AVFilterLink, out_packing)); |
| 78 | 79 | } |
| 80 | +#endif | |
| @@ -289,6 +289,7 @@ const int64_t avfilter_all_channel_layouts[] = { · 288 unmodified lines | ||
| 289 | 289 | // return avfilter_make_format64_list(avfilter_all_channel_layouts); |
| 290 | 290 | // } |
| 291 | 291 | |
| 292 | +#if FF_API_PACKING | |
| 292 | 293 | AVFilterFormats *avfilter_make_all_packing_formats(void) |
| 293 | 294 | { |
| 294 | 295 | static const int packing[] = { |
| @@ -299,6 +300,7 @@ AVFilterFormats *avfilter_make_all_packing_formats(void) · 4 unmodified lines | ||
| 299 | 300 | |
| 300 | 301 | return avfilter_make_format_list(packing); |
| 301 | 302 | } |
| 303 | +#endif | |
| 302 | 304 | |
| 303 | 305 | AVFilterFormats *ff_all_samplerates(void) |
| 304 | 306 | { |
| @@ -518,23 +520,6 @@ int ff_parse_channel_layout(int64_t *ret, const char *arg, void *log_ctx) · 213 unmodified lines | ||
| 518 | 520 | return 0; |
| 519 | 521 | } |
| 520 | 522 | |
| 521 | −int ff_parse_packing_format(int *ret, const char *arg, void *log_ctx) | |
| 522 | −{ | |
| 523 | − char *tail; | |
| 524 | − int planar = strtol(arg, &tail, 10); | |
| 525 | − if (*tail) { | |
| 526 | − planar = !strcmp(arg, "packed") ? 0: | |
| 527 | − !strcmp(arg, "planar") ? 1: -1; | |
| 528 | − } | |
| 529 | − | |
| 530 | − if (planar != 0 && planar != 1) { | |
| 531 | − av_log(log_ctx, AV_LOG_ERROR, "Invalid packing format '%s'\n", arg); | |
| 532 | − return AVERROR(EINVAL); | |
| 533 | − } | |
| 534 | − *ret = planar; | |
| 535 | − return 0; | |
| 536 | −} | |
| 537 | − | |
| 538 | 523 | #ifdef TEST |
| 539 | 524 | |
| 540 | 525 | #undef printf |
| @@ -46,9 +46,8 @@ static int print_link_prop(AVBPrint *buf, AVFilterLink *link) · 45 unmodified lines | ||
| 46 | 46 | av_get_channel_layout_string(layout, sizeof(layout), |
| 47 | 47 | -1, link->channel_layout); |
| 48 | 48 | format = av_x_if_null(av_get_sample_fmt_name(link->format), "?"); |
| 49 | − av_bprintf(buf, "[%dHz %s:%s:%s]", | |
| 50 | − (int)link->sample_rate, format, layout, | |
| 51 | − link->planar ? "planar" : "packed"); | |
| 49 | + av_bprintf(buf, "[%dHz %s:%s]", | |
| 50 | + (int)link->sample_rate, format, layout); | |
| 52 | 51 | break; |
| 53 | 52 | |
| 54 | 53 | default: |
| @@ -131,16 +131,6 @@ int ff_parse_sample_format(int *ret, const char *arg, void *log_ctx); · 130 unmodified lines | ||
| 131 | 131 | */ |
| 132 | 132 | int ff_parse_channel_layout(int64_t *ret, const char *arg, void *log_ctx); |
| 133 | 133 | |
| 134 | −/** | |
| 135 | − * Parse a packing format or a corresponding integer representation. | |
| 136 | − * | |
| 137 | − * @param ret integer pointer to where the value should be written | |
| 138 | − * @param arg string to parse | |
| 139 | − * @param log_ctx log context | |
| 140 | − * @return 0 in case of success, a negative AVERROR code on error | |
| 141 | − */ | |
| 142 | −int ff_parse_packing_format(int *ret, const char *arg, void *log_ctx); | |
| 143 | − | |
| 144 | 134 | /** |
| 145 | 135 | * Pass video frame along and keep an internal reference for later use. |
| 146 | 136 | */ |
| @@ -42,7 +42,6 @@ AVBufferSinkParams *av_buffersink_params_alloc(void) · 41 unmodified lines | ||
| 42 | 42 | AVABufferSinkParams *av_abuffersink_params_alloc(void) |
| 43 | 43 | { |
| 44 | 44 | static const int sample_fmts[] = { -1 }; |
| 45 | − static const int packing_fmts[] = { -1 }; | |
| 46 | 45 | static const int64_t channel_layouts[] = { -1 }; |
| 47 | 46 | AVABufferSinkParams *params = av_malloc(sizeof(AVABufferSinkParams)); |
| 48 | 47 | |
| @@ -51,7 +50,6 @@ AVABufferSinkParams *av_abuffersink_params_alloc(void) · 2 unmodified lines | ||
| 51 | 50 | |
| 52 | 51 | params->sample_fmts = sample_fmts; |
| 53 | 52 | params->channel_layouts = channel_layouts; |
| 54 | − params->packing_fmts = packing_fmts; | |
| 55 | 53 | return params; |
| 56 | 54 | } |
| 57 | 55 | |
| @@ -64,7 +62,6 @@ typedef struct { · 6 unmodified lines | ||
| 64 | 62 | /* only used for audio */ |
| 65 | 63 | enum AVSampleFormat *sample_fmts; ///< list of accepted sample formats, terminated by AV_SAMPLE_FMT_NONE |
| 66 | 64 | int64_t *channel_layouts; ///< list of accepted channel layouts, terminated by -1 |
| 67 | − int *packing_fmts; ///< list of accepted packing formats, terminated by -1 | |
| 68 | 65 | } BufferSinkContext; |
| 69 | 66 | |
| 70 | 67 | #define FIFO_INIT_SIZE 8 |
| @@ -244,11 +241,9 @@ static av_cold int asink_init(AVFilterContext *ctx, const char *args, void *opaq · 173 unmodified lines | ||
| 244 | 241 | |
| 245 | 242 | buf->sample_fmts = ff_copy_int_list (params->sample_fmts); |
| 246 | 243 | buf->channel_layouts = ff_copy_int64_list(params->channel_layouts); |
| 247 | − buf->packing_fmts = ff_copy_int_list (params->packing_fmts); | |
| 248 | − if (!buf->sample_fmts || !buf->channel_layouts || !buf->sample_fmts) { | |
| 244 | + if (!buf->sample_fmts || !buf->channel_layouts) { | |
| 249 | 245 | av_freep(&buf->sample_fmts); |
| 250 | 246 | av_freep(&buf->channel_layouts); |
| 251 | − av_freep(&buf->packing_fmts); | |
| 252 | 247 | return AVERROR(ENOMEM); |
| 253 | 248 | } |
| 254 | 249 | |
| @@ -261,7 +256,6 @@ static av_cold void asink_uninit(AVFilterContext *ctx) · 6 unmodified lines | ||
| 261 | 256 | |
| 262 | 257 | av_freep(&buf->sample_fmts); |
| 263 | 258 | av_freep(&buf->channel_layouts); |
| 264 | − av_freep(&buf->packing_fmts); | |
| 265 | 259 | return common_uninit(ctx); |
| 266 | 260 | } |
| 267 | 261 | |
| @@ -278,11 +272,6 @@ static int asink_query_formats(AVFilterContext *ctx) · 10 unmodified lines | ||
| 278 | 272 | if (!(layouts = avfilter_make_format64_list(buf->channel_layouts))) |
| 279 | 273 | return AVERROR(ENOMEM); |
| 280 | 274 | ff_set_common_channel_layouts(ctx, layouts); |
| 281 | − | |
| 282 | − if (!(formats = avfilter_make_format_list(buf->packing_fmts))) | |
| 283 | − return AVERROR(ENOMEM); | |
| 284 | − avfilter_set_common_packing_formats(ctx, formats); | |
| 285 | − | |
| 286 | 275 | ff_set_common_samplerates (ctx, ff_all_samplerates()); |
| 287 | 276 | |
| 288 | 277 | return 0; |
| @@ -55,7 +55,6 @@ typedef struct { · 54 unmodified lines | ||
| 55 | 55 | int sample_rate; |
| 56 | 56 | unsigned int sample_format; |
| 57 | 57 | int64_t channel_layout; |
| 58 | − int packing_format; | |
| 59 | 58 | |
| 60 | 59 | // Normalization filters |
| 61 | 60 | AVFilterContext *aconvert; |
| @@ -91,7 +90,6 @@ static int reconfigure_filter(BufferSourceContext *abuffer, AVFilterContext *fil · 29 unmodified lines | ||
| 91 | 90 | |
| 92 | 91 | inlink->format = abuffer->sample_format; |
| 93 | 92 | inlink->channel_layout = abuffer->channel_layout; |
| 94 | − inlink->planar = abuffer->packing_format; | |
| 95 | 93 | inlink->sample_rate = abuffer->sample_rate; |
| 96 | 94 | |
| 97 | 95 | filt_ctx->filter->uninit(filt_ctx); |
| @@ -239,14 +237,12 @@ static int check_format_change_audio(AVFilterContext *ctx, · 141 unmodified lines | ||
| 239 | 237 | |
| 240 | 238 | link = ctx->outputs[0]; |
| 241 | 239 | if (samplesref->format != link->format || |
| 242 | − samplesref->audio->channel_layout != link->channel_layout || | |
| 243 | − samplesref->audio->planar != link->planar) { | |
| 240 | + samplesref->audio->channel_layout != link->channel_layout) { | |
| 244 | 241 | |
| 245 | 242 | if (!logged) log_input_change(ctx, link, samplesref); |
| 246 | 243 | |
| 247 | 244 | abuffer->sample_format = samplesref->format; |
| 248 | 245 | abuffer->channel_layout = samplesref->audio->channel_layout; |
| 249 | − abuffer->packing_format = samplesref->audio->planar; | |
| 250 | 246 | |
| 251 | 247 | if (!abuffer->aconvert) { |
| 252 | 248 | ret = insert_filter(abuffer, link, &abuffer->aconvert, "aconvert"); |
| @@ -254,9 +250,7 @@ static int check_format_change_audio(AVFilterContext *ctx, · 1 unmodified line | ||
| 254 | 250 | } else { |
| 255 | 251 | link = abuffer->aconvert->outputs[0]; |
| 256 | 252 | if (samplesref->format == link->format && |
| 257 | − samplesref->audio->channel_layout == link->channel_layout && | |
| 258 | − samplesref->audio->planar == link->planar | |
| 259 | − ) | |
| 253 | + samplesref->audio->channel_layout == link->channel_layout) | |
| 260 | 254 | remove_filter(&abuffer->aconvert); |
| 261 | 255 | else |
| 262 | 256 | if ((ret = reconfigure_filter(abuffer, abuffer->aconvert)) < 0) |
| @@ -456,7 +450,6 @@ static av_cold int init_audio(AVFilterContext *ctx, const char *args0, void *opa · 193 unmodified lines | ||
| 456 | 450 | ADD_FORMAT(sample_rate); |
| 457 | 451 | ADD_FORMAT(sample_format); |
| 458 | 452 | ADD_FORMAT(channel_layout); |
| 459 | − ADD_FORMAT(packing_format); | |
| 460 | 453 | |
| 461 | 454 | abuffer->fifo = av_fifo_alloc(FIFO_SIZE*sizeof(AVFilterBufferRef*)); |
| 462 | 455 | if (!abuffer->fifo) { |
| @@ -475,7 +468,7 @@ static av_cold int init_audio(AVFilterContext *ctx, const char *args0, void *opa · 12 unmodified lines | ||
| 475 | 468 | |
| 476 | 469 | arg_fail: |
| 477 | 470 | av_log(ctx, AV_LOG_ERROR, "Invalid arguments, must be of the form " |
| 478 | − "sample_rate:sample_fmt:channel_layout:packing\n"); | |
| 471 | + "sample_rate:sample_fmt:channel_layout\n"); | |
| 479 | 472 | av_freep(&args); |
| 480 | 473 | return AVERROR(EINVAL); |
| 481 | 474 | } |
| @@ -517,10 +510,6 @@ static int query_formats_audio(AVFilterContext *ctx) · 35 unmodified lines | ||
| 517 | 510 | ff_add_channel_layout(&layouts, abuffer->channel_layout); |
| 518 | 511 | ff_set_common_channel_layouts(ctx, layouts); |
| 519 | 512 | |
| 520 | − formats = NULL; | |
| 521 | − avfilter_add_format(&formats, abuffer->packing_format); | |
| 522 | − avfilter_set_common_packing_formats(ctx, formats); | |
| 523 | − | |
| 524 | 513 | return 0; |
| 525 | 514 | } |
| 526 | 515 | |
| @@ -370,13 +370,11 @@ static int amovie_query_formats(AVFilterContext *ctx) · 369 unmodified lines | ||
| 370 | 370 | AVCodecContext *c = movie->codec_ctx; |
| 371 | 371 | |
| 372 | 372 | enum AVSampleFormat sample_fmts[] = { c->sample_fmt, -1 }; |
| 373 | − int packing_fmts[] = { AVFILTER_PACKED, -1 }; | |
| 374 | 373 | int sample_rates[] = { c->sample_rate, -1 }; |
| 375 | 374 | int64_t chlayouts[] = { c->channel_layout ? c->channel_layout : |
| 376 | 375 | av_get_default_channel_layout(c->channels), -1 }; |
| 377 | 376 | |
| 378 | 377 | avfilter_set_common_sample_formats (ctx, avfilter_make_format_list(sample_fmts)); |
| 379 | − avfilter_set_common_packing_formats(ctx, avfilter_make_format_list(packing_fmts)); | |
| 380 | 378 | ff_set_common_samplerates (ctx, avfilter_make_format_list(sample_rates)); |
| 381 | 379 | ff_set_common_channel_layouts(ctx, avfilter_make_format64_list(chlayouts)); |
| 382 | 380 | |
| @@ -53,5 +53,8 @@ · 52 unmodified lines | ||
| 53 | 53 | #ifndef FF_API_VSRC_BUFFER_ADD_FRAME |
| 54 | 54 | #define FF_API_VSRC_BUFFER_ADD_FRAME (LIBAVFILTER_VERSION_MAJOR < 3) |
| 55 | 55 | #endif |
| 56 | +#ifndef FF_API_PACKING | |
| 57 | +#define FF_API_PACKING (LIBAVFILTER_VERSION_MAJOR < 3) | |
| 58 | +#endif | |
| 56 | 59 | |
| 57 | 60 | #endif // AVFILTER_VERSION_H |
| @@ -53,14 +53,6 @@ static void print_formats(AVFilterContext *filter_ctx) · 52 unmodified lines | ||
| 53 | 53 | fmts->formats[j]); \ |
| 54 | 54 | printf(#INOUT "PUT[%d] %s: chlayout:%s\n", \ |
| 55 | 55 | i, filter_ctx->filter->inout##puts[i].name, buf); \ |
| 56 | − } \ | |
| 57 | − \ | |
| 58 | − fmts = filter_ctx->inout##puts[i]->outin##_packing; \ | |
| 59 | − for (j = 0; j < fmts->format_count; j++) { \ | |
| 60 | − printf(#INOUT "PUT[%d] %s: packing:%s\n", \ | |
| 61 | − i, filter_ctx->filter->inout##puts[i].name, \ | |
| 62 | − fmts->formats[j] == AVFILTER_PACKED ? \ | |
| 63 | − "packed" : "planar"); \ | |
| 64 | 56 | } \ |
| 65 | 57 | } \ |
| 66 | 58 | } \ |