Browse code

Merge commit '4436f25a1682ada3f7226cb6fadf429946933161'

* commit '4436f25a1682ada3f7226cb6fadf429946933161':
build: remove references to unused EXTRAOBJS variable
lavfi: convert input/ouput list compound literals to named objects
fate: add h263 obmc vsynth tests
avconv: remove bogus warning when using avconv -h without parameter
averror: explicitly define AVERROR_* values
flashsv: propagate inflateReset() errors
indeo4/5: remove constant parameter num_bands from wavelet recomposition
mxfdec: return error if no segments are available in mxf_get_sorted_table_segments
Double motion vector range for HPEL interlaced picture in proper place

Conflicts:
libavcodec/v210dec.h
libavfilter/af_aformat.c
libavfilter/af_amix.c
libavfilter/af_asyncts.c
libavfilter/af_channelmap.c
libavfilter/af_join.c
libavfilter/asrc_anullsrc.c
libavfilter/buffersrc.c
libavfilter/f_setpts.c
libavfilter/f_settb.c
libavfilter/fifo.c
libavfilter/src_movie.c
libavfilter/vf_ass.c
libavfilter/vf_blackframe.c
libavfilter/vf_boxblur.c
libavfilter/vf_delogo.c
libavfilter/vf_drawbox.c
libavfilter/vf_drawtext.c
libavfilter/vf_fade.c
libavfilter/vf_fieldorder.c
libavfilter/vf_fps.c
libavfilter/vf_hflip.c
libavfilter/vf_overlay.c
libavfilter/vf_pad.c
libavfilter/vf_select.c
libavfilter/vf_transpose.c
libavfilter/vf_yadif.c
libavfilter/vsrc_testsrc.c
libavformat/mxfdec.c
libavutil/error.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>

Michael Niedermayer authored on 2012/10/11 22:41:56
Showing 60 changed files
... ...
@@ -2160,7 +2160,7 @@ void show_help_default(const char *opt, const char *arg)
2160 2160
     const int per_file = OPT_SPEC | OPT_OFFSET | OPT_PERFILE;
2161 2161
     int show_advanced = 0, show_avoptions = 0;
2162 2162
 
2163
-    if (opt) {
2163
+    if (opt && *opt) {
2164 2164
         if (!strcmp(opt, "long"))
2165 2165
             show_advanced = 1;
2166 2166
         else if (!strcmp(opt, "full"))
... ...
@@ -122,10 +122,11 @@ static av_cold int flashsv_decode_init(AVCodecContext *avctx)
122 122
 }
123 123
 
124 124
 
125
-static void flashsv2_prime(FlashSVContext *s, uint8_t *src,
126
-                           int size, int unp_size)
125
+static int flashsv2_prime(FlashSVContext *s, uint8_t *src,
126
+                          int size, int unp_size)
127 127
 {
128 128
     z_stream zs;
129
+    int zret; // Zlib return code
129 130
 
130 131
     zs.zalloc = NULL;
131 132
     zs.zfree  = NULL;
... ...
@@ -145,13 +146,18 @@ static void flashsv2_prime(FlashSVContext *s, uint8_t *src,
145 145
     deflate(&zs, Z_SYNC_FLUSH);
146 146
     deflateEnd(&zs);
147 147
 
148
-    inflateReset(&s->zstream);
148
+    if ((zret = inflateReset(&s->zstream)) != Z_OK) {
149
+        av_log(s->avctx, AV_LOG_ERROR, "Inflate reset error: %d\n", zret);
150
+        return AVERROR_UNKNOWN;
151
+    }
149 152
 
150 153
     s->zstream.next_in   = s->deflate_block;
151 154
     s->zstream.avail_in  = s->deflate_block_size - zs.avail_out;
152 155
     s->zstream.next_out  = s->tmpblock;
153 156
     s->zstream.avail_out = s->block_size * 3;
154 157
     inflate(&s->zstream, Z_SYNC_FLUSH);
158
+
159
+    return 0;
155 160
 }
156 161
 
157 162
 static int flashsv_decode_block(AVCodecContext *avctx, AVPacket *avpkt,
... ...
@@ -164,11 +170,14 @@ static int flashsv_decode_block(AVCodecContext *avctx, AVPacket *avpkt,
164 164
     int k;
165 165
     int ret = inflateReset(&s->zstream);
166 166
     if (ret != Z_OK) {
167
-        //return -1;
167
+        av_log(avctx, AV_LOG_ERROR, "Inflate reset error: %d\n", ret);
168
+        return AVERROR_UNKNOWN;
168 169
     }
169 170
     if (s->zlibprime_curr || s->zlibprime_prev) {
170
-        flashsv2_prime(s, s->blocks[blk_idx].pos, s->blocks[blk_idx].size,
171
+        ret = flashsv2_prime(s, s->blocks[blk_idx].pos, s->blocks[blk_idx].size,
171 172
                        s->blocks[blk_idx].unp_size);
173
+        if (ret < 0)
174
+            return ret;
172 175
     }
173 176
     s->zstream.next_in   = avpkt->data + get_bits_count(gb) / 8;
174 177
     s->zstream.avail_in  = block_size;
... ...
@@ -830,9 +830,9 @@ int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
830 830
 
831 831
     if (ctx->is_scalable) {
832 832
         if (avctx->codec_id == AV_CODEC_ID_INDEO4)
833
-            ff_ivi_recompose_haar(&ctx->planes[0], ctx->frame.data[0], ctx->frame.linesize[0], 4);
833
+            ff_ivi_recompose_haar(&ctx->planes[0], ctx->frame.data[0], ctx->frame.linesize[0]);
834 834
         else
835
-            ff_ivi_recompose53   (&ctx->planes[0], ctx->frame.data[0], ctx->frame.linesize[0], 4);
835
+            ff_ivi_recompose53   (&ctx->planes[0], ctx->frame.data[0], ctx->frame.linesize[0]);
836 836
     } else {
837 837
         ff_ivi_output_plane(&ctx->planes[0], ctx->frame.data[0], ctx->frame.linesize[0]);
838 838
     }
... ...
@@ -33,7 +33,7 @@
33 33
 #include "ivi_dsp.h"
34 34
 
35 35
 void ff_ivi_recompose53(const IVIPlaneDesc *plane, uint8_t *dst,
36
-                        const int dst_pitch, const int num_bands)
36
+                        const int dst_pitch)
37 37
 {
38 38
     int             x, y, indx;
39 39
     int32_t         p0, p1, p2, p3, tmp0, tmp1, tmp2;
... ...
@@ -41,6 +41,7 @@ void ff_ivi_recompose53(const IVIPlaneDesc *plane, uint8_t *dst,
41 41
     int32_t         b3_1, b3_2, b3_3, b3_4, b3_5, b3_6, b3_7, b3_8, b3_9;
42 42
     int32_t         pitch, back_pitch;
43 43
     const IDWTELEM *b0_ptr, *b1_ptr, *b2_ptr, *b3_ptr;
44
+    const int       num_bands = 4;
44 45
 
45 46
     /* all bands should have the same pitch */
46 47
     pitch = plane->bands[0].pitch;
... ...
@@ -189,7 +190,7 @@ void ff_ivi_recompose53(const IVIPlaneDesc *plane, uint8_t *dst,
189 189
 }
190 190
 
191 191
 void ff_ivi_recompose_haar(const IVIPlaneDesc *plane, uint8_t *dst,
192
-                           const int dst_pitch, const int num_bands)
192
+                           const int dst_pitch)
193 193
 {
194 194
     int             x, y, indx, b0, b1, b2, b3, p0, p1, p2, p3;
195 195
     const IDWTELEM *b0_ptr, *b1_ptr, *b2_ptr, *b3_ptr;
... ...
@@ -38,10 +38,9 @@
38 38
  *  @param[in]   plane        pointer to the descriptor of the plane being processed
39 39
  *  @param[out]  dst          pointer to the destination buffer
40 40
  *  @param[in]   dst_pitch    pitch of the destination buffer
41
- *  @param[in]   num_bands    number of wavelet bands to be processed
42 41
  */
43 42
 void ff_ivi_recompose53(const IVIPlaneDesc *plane, uint8_t *dst,
44
-                        const int dst_pitch, const int num_bands);
43
+                        const int dst_pitch);
45 44
 
46 45
 /**
47 46
  *  Haar wavelet recomposition filter for Indeo 4
... ...
@@ -49,10 +48,9 @@ void ff_ivi_recompose53(const IVIPlaneDesc *plane, uint8_t *dst,
49 49
  *  @param[in]  plane        pointer to the descriptor of the plane being processed
50 50
  *  @param[out] dst          pointer to the destination buffer
51 51
  *  @param[in]  dst_pitch    pitch of the destination buffer
52
- *  @param[in]  num_bands    number of wavelet bands to be processed
53 52
  */
54 53
 void ff_ivi_recompose_haar(const IVIPlaneDesc *plane, uint8_t *dst,
55
-                           const int dst_pitch, const int num_bands);
54
+                           const int dst_pitch);
56 55
 
57 56
 /**
58 57
  *  two-dimensional inverse Haar 8x8 transform for Indeo 4
... ...
@@ -1274,6 +1274,11 @@ int ff_vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
1274 1274
         break;
1275 1275
     }
1276 1276
 
1277
+    if (v->fcm != PROGRESSIVE && !v->s.quarter_sample) {
1278
+        v->range_x <<= 1;
1279
+        v->range_y <<= 1;
1280
+    }
1281
+
1277 1282
     /* AC Syntax */
1278 1283
     v->c_ac_table_index = decode012(gb);
1279 1284
     if (v->s.pict_type == AV_PICTURE_TYPE_I || v->s.pict_type == AV_PICTURE_TYPE_BI) {
... ...
@@ -1575,10 +1575,6 @@ static inline void vc1_pred_mv(VC1Context *v, int n, int dmv_x, int dmv_y,
1575 1575
         }
1576 1576
     }
1577 1577
 
1578
-    if (v->field_mode && !s->quarter_sample) {
1579
-        r_x <<= 1;
1580
-        r_y <<= 1;
1581
-    }
1582 1578
     if (v->field_mode && v->numref)
1583 1579
         r_y >>= 1;
1584 1580
     if (v->field_mode && v->cur_field_type && v->ref_field_type[dir] == 0)
... ...
@@ -126,6 +126,22 @@ static int query_formats(AVFilterContext *ctx)
126 126
     return 0;
127 127
 }
128 128
 
129
+static const AVFilterPad avfilter_af_aformat_inputs[] = {
130
+    {
131
+        .name = "default",
132
+        .type = AVMEDIA_TYPE_AUDIO,
133
+    },
134
+    { NULL }
135
+};
136
+
137
+static const AVFilterPad avfilter_af_aformat_outputs[] = {
138
+    {
139
+        .name = "default",
140
+        .type = AVMEDIA_TYPE_AUDIO
141
+    },
142
+    { NULL }
143
+};
144
+
129 145
 AVFilter avfilter_af_aformat = {
130 146
     .name          = "aformat",
131 147
     .description   = NULL_IF_CONFIG_SMALL("Convert the input audio to one of the specified formats."),
... ...
@@ -133,11 +149,7 @@ AVFilter avfilter_af_aformat = {
133 133
     .query_formats = query_formats,
134 134
     .priv_size     = sizeof(AFormatContext),
135 135
 
136
-    .inputs        = (const AVFilterPad[]) {{ .name            = "default",
137
-                                              .type            = AVMEDIA_TYPE_AUDIO, },
138
-                                            { .name = NULL}},
139
-    .outputs       = (const AVFilterPad[]) {{ .name            = "default",
140
-                                              .type            = AVMEDIA_TYPE_AUDIO},
141
-                                            { .name = NULL}},
142
-    .priv_class = &aformat_class,
136
+    .inputs        = avfilter_af_aformat_inputs,
137
+    .outputs       = avfilter_af_aformat_outputs,
138
+    .priv_class    = &aformat_class,
143 139
 };
... ...
@@ -542,6 +542,16 @@ static int query_formats(AVFilterContext *ctx)
542 542
     return 0;
543 543
 }
544 544
 
545
+static const AVFilterPad avfilter_af_amix_outputs[] = {
546
+    {
547
+        .name          = "default",
548
+        .type          = AVMEDIA_TYPE_AUDIO,
549
+        .config_props  = config_output,
550
+        .request_frame = request_frame
551
+    },
552
+    { NULL }
553
+};
554
+
545 555
 AVFilter avfilter_af_amix = {
546 556
     .name          = "amix",
547 557
     .description   = NULL_IF_CONFIG_SMALL("Audio mixing."),
... ...
@@ -552,10 +562,6 @@ AVFilter avfilter_af_amix = {
552 552
     .query_formats  = query_formats,
553 553
 
554 554
     .inputs    = NULL,
555
-    .outputs   = (const AVFilterPad[]) {{ .name          = "default",
556
-                                          .type          = AVMEDIA_TYPE_AUDIO,
557
-                                          .config_props  = config_output,
558
-                                          .request_frame = request_frame },
559
-                                        { .name = NULL}},
555
+    .outputs   = avfilter_af_amix_outputs,
560 556
     .priv_class = &amix_class,
561 557
 };
... ...
@@ -27,18 +27,30 @@
27 27
 #include "internal.h"
28 28
 #include "libavutil/internal.h"
29 29
 
30
+static const AVFilterPad avfilter_af_anull_inputs[] = {
31
+    {
32
+        .name             = "default",
33
+        .type             = AVMEDIA_TYPE_AUDIO,
34
+        .get_audio_buffer = ff_null_get_audio_buffer,
35
+    },
36
+    { NULL }
37
+};
38
+
39
+static const AVFilterPad avfilter_af_anull_outputs[] = {
40
+    {
41
+        .name = "default",
42
+        .type = AVMEDIA_TYPE_AUDIO,
43
+    },
44
+    { NULL }
45
+};
46
+
30 47
 AVFilter avfilter_af_anull = {
31 48
     .name      = "anull",
32 49
     .description = NULL_IF_CONFIG_SMALL("Pass the source unchanged to the output."),
33 50
 
34 51
     .priv_size = 0,
35 52
 
36
-    .inputs    = (const AVFilterPad[]) {{ .name             = "default",
37
-                                          .type             = AVMEDIA_TYPE_AUDIO,
38
-                                          .get_audio_buffer = ff_null_get_audio_buffer, },
39
-                                        { .name = NULL}},
53
+    .inputs    = avfilter_af_anull_inputs,
40 54
 
41
-    .outputs   = (const AVFilterPad[]) {{ .name             = "default",
42
-                                          .type             = AVMEDIA_TYPE_AUDIO, },
43
-                                        { .name = NULL}},
55
+    .outputs   = avfilter_af_anull_outputs,
44 56
 };
... ...
@@ -233,6 +233,25 @@ fail:
233 233
     return ret;
234 234
 }
235 235
 
236
+static const AVFilterPad avfilter_af_asyncts_inputs[] = {
237
+    {
238
+        .name           = "default",
239
+        .type           = AVMEDIA_TYPE_AUDIO,
240
+        .filter_samples = filter_samples
241
+    },
242
+    { NULL }
243
+};
244
+
245
+static const AVFilterPad avfilter_af_asyncts_outputs[] = {
246
+    {
247
+        .name          = "default",
248
+        .type          = AVMEDIA_TYPE_AUDIO,
249
+        .config_props  = config_props,
250
+        .request_frame = request_frame
251
+    },
252
+    { NULL }
253
+};
254
+
236 255
 AVFilter avfilter_af_asyncts = {
237 256
     .name        = "asyncts",
238 257
     .description = NULL_IF_CONFIG_SMALL("Sync audio data to timestamps"),
... ...
@@ -242,14 +261,7 @@ AVFilter avfilter_af_asyncts = {
242 242
 
243 243
     .priv_size   = sizeof(ASyncContext),
244 244
 
245
-    .inputs      = (const AVFilterPad[]) {{ .name           = "default",
246
-                                            .type           = AVMEDIA_TYPE_AUDIO,
247
-                                            .filter_samples = filter_samples },
248
-                                          { NULL }},
249
-    .outputs     = (const AVFilterPad[]) {{ .name           = "default",
250
-                                            .type           = AVMEDIA_TYPE_AUDIO,
251
-                                            .config_props   = config_props,
252
-                                            .request_frame  = request_frame },
253
-                                          { NULL }},
245
+    .inputs      = avfilter_af_asyncts_inputs,
246
+    .outputs     = avfilter_af_asyncts_outputs,
254 247
     .priv_class = &asyncts_class,
255 248
 };
... ...
@@ -385,6 +385,25 @@ static int channelmap_config_input(AVFilterLink *inlink)
385 385
     return err;
386 386
 }
387 387
 
388
+static const AVFilterPad avfilter_af_channelmap_inputs[] = {
389
+    {
390
+        .name           = "default",
391
+        .type           = AVMEDIA_TYPE_AUDIO,
392
+        .min_perms      = AV_PERM_READ | AV_PERM_WRITE,
393
+        .filter_samples = channelmap_filter_samples,
394
+        .config_props   = channelmap_config_input
395
+    },
396
+    { NULL }
397
+};
398
+
399
+static const AVFilterPad avfilter_af_channelmap_outputs[] = {
400
+    {
401
+        .name = "default",
402
+        .type = AVMEDIA_TYPE_AUDIO
403
+    },
404
+    { NULL }
405
+};
406
+
388 407
 AVFilter avfilter_af_channelmap = {
389 408
     .name          = "channelmap",
390 409
     .description   = NULL_IF_CONFIG_SMALL("Remap audio channels."),
... ...
@@ -392,14 +411,7 @@ AVFilter avfilter_af_channelmap = {
392 392
     .query_formats = channelmap_query_formats,
393 393
     .priv_size     = sizeof(ChannelMapContext),
394 394
 
395
-    .inputs        = (const AVFilterPad[]) {{ .name            = "default",
396
-                                              .type            = AVMEDIA_TYPE_AUDIO,
397
-                                              .min_perms       = AV_PERM_READ | AV_PERM_WRITE,
398
-                                              .filter_samples  = channelmap_filter_samples,
399
-                                              .config_props    = channelmap_config_input },
400
-                                            { .name = NULL }},
401
-    .outputs       = (const AVFilterPad[]) {{ .name            = "default",
402
-                                              .type            = AVMEDIA_TYPE_AUDIO },
403
-                                            { .name = NULL }},
404
-    .priv_class = &channelmap_class,
395
+    .inputs        = avfilter_af_channelmap_inputs,
396
+    .outputs       = avfilter_af_channelmap_outputs,
397
+    .priv_class    = &channelmap_class,
405 398
 };
... ...
@@ -130,6 +130,15 @@ static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *buf)
130 130
     return ret;
131 131
 }
132 132
 
133
+static const AVFilterPad avfilter_af_channelsplit_inputs[] = {
134
+    {
135
+        .name           = "default",
136
+        .type           = AVMEDIA_TYPE_AUDIO,
137
+        .filter_samples = filter_samples,
138
+    },
139
+    { NULL }
140
+};
141
+
133 142
 AVFilter avfilter_af_channelsplit = {
134 143
     .name           = "channelsplit",
135 144
     .description    = NULL_IF_CONFIG_SMALL("Split audio into per-channel streams"),
... ...
@@ -138,10 +147,7 @@ AVFilter avfilter_af_channelsplit = {
138 138
     .init           = init,
139 139
     .query_formats  = query_formats,
140 140
 
141
-    .inputs  = (const AVFilterPad[]){{ .name           = "default",
142
-                                       .type           = AVMEDIA_TYPE_AUDIO,
143
-                                       .filter_samples = filter_samples, },
144
-                                     { NULL }},
141
+    .inputs  = avfilter_af_channelsplit_inputs,
145 142
     .outputs = NULL,
146 143
     .priv_class = &channelsplit_class,
147 144
 };
... ...
@@ -484,6 +484,16 @@ fail:
484 484
     return AVERROR(ENOMEM);
485 485
 }
486 486
 
487
+static const AVFilterPad avfilter_af_join_outputs[] = {
488
+    {
489
+        .name          = "default",
490
+        .type          = AVMEDIA_TYPE_AUDIO,
491
+        .config_props  = join_config_output,
492
+        .request_frame = join_request_frame,
493
+    },
494
+    { NULL }
495
+};
496
+
487 497
 AVFilter avfilter_af_join = {
488 498
     .name           = "join",
489 499
     .description    = NULL_IF_CONFIG_SMALL("Join multiple audio streams into "
... ...
@@ -495,10 +505,6 @@ AVFilter avfilter_af_join = {
495 495
     .query_formats  = join_query_formats,
496 496
 
497 497
     .inputs  = NULL,
498
-    .outputs = (const AVFilterPad[]){{ .name          = "default",
499
-                                       .type          = AVMEDIA_TYPE_AUDIO,
500
-                                       .config_props  = join_config_output,
501
-                                       .request_frame = join_request_frame, },
502
-                                     { NULL }},
498
+    .outputs = avfilter_af_join_outputs,
503 499
     .priv_class = &join_class,
504 500
 };
... ...
@@ -239,6 +239,26 @@ fail:
239 239
     return ret;
240 240
 }
241 241
 
242
+static const AVFilterPad avfilter_af_resample_inputs[] = {
243
+    {
244
+        .name           = "default",
245
+        .type           = AVMEDIA_TYPE_AUDIO,
246
+        .filter_samples = filter_samples,
247
+        .min_perms      = AV_PERM_READ
248
+    },
249
+    { NULL }
250
+};
251
+
252
+static const AVFilterPad avfilter_af_resample_outputs[] = {
253
+    {
254
+        .name          = "default",
255
+        .type          = AVMEDIA_TYPE_AUDIO,
256
+        .config_props  = config_output,
257
+        .request_frame = request_frame
258
+    },
259
+    { NULL }
260
+};
261
+
242 262
 AVFilter avfilter_af_resample = {
243 263
     .name          = "resample",
244 264
     .description   = NULL_IF_CONFIG_SMALL("Audio resampling and conversion."),
... ...
@@ -247,14 +267,6 @@ AVFilter avfilter_af_resample = {
247 247
     .uninit         = uninit,
248 248
     .query_formats  = query_formats,
249 249
 
250
-    .inputs    = (const AVFilterPad[]) {{ .name            = "default",
251
-                                          .type            = AVMEDIA_TYPE_AUDIO,
252
-                                          .filter_samples  = filter_samples,
253
-                                          .min_perms       = AV_PERM_READ },
254
-                                        { .name = NULL}},
255
-    .outputs   = (const AVFilterPad[]) {{ .name          = "default",
256
-                                          .type          = AVMEDIA_TYPE_AUDIO,
257
-                                          .config_props  = config_output,
258
-                                          .request_frame = request_frame },
259
-                                        { .name = NULL}},
250
+    .inputs    = avfilter_af_resample_inputs,
251
+    .outputs   = avfilter_af_resample_outputs,
260 252
 };
... ...
@@ -27,19 +27,21 @@ static int null_filter_samples(AVFilterLink *link, AVFilterBufferRef *samplesref
27 27
     return 0;
28 28
 }
29 29
 
30
+static const AVFilterPad avfilter_asink_anullsink_inputs[] = {
31
+    {
32
+        .name           = "default",
33
+        .type           = AVMEDIA_TYPE_AUDIO,
34
+        .filter_samples = null_filter_samples,
35
+    },
36
+    { NULL },
37
+};
38
+
30 39
 AVFilter avfilter_asink_anullsink = {
31 40
     .name        = "anullsink",
32 41
     .description = NULL_IF_CONFIG_SMALL("Do absolutely nothing with the input audio."),
33 42
 
34 43
     .priv_size = 0,
35 44
 
36
-    .inputs    = (const AVFilterPad[]) {
37
-        {
38
-            .name            = "default",
39
-            .type            = AVMEDIA_TYPE_AUDIO,
40
-            .filter_samples  = null_filter_samples,
41
-        },
42
-        { .name = NULL},
43
-    },
45
+    .inputs    = avfilter_asink_anullsink_inputs,
44 46
     .outputs   = NULL,
45 47
 };
... ...
@@ -119,6 +119,16 @@ static int request_frame(AVFilterLink *outlink)
119 119
     return 0;
120 120
 }
121 121
 
122
+static const AVFilterPad avfilter_asrc_anullsrc_outputs[] = {
123
+    {
124
+        .name          = "default",
125
+        .type          = AVMEDIA_TYPE_AUDIO,
126
+        .config_props  = config_props,
127
+        .request_frame = request_frame,
128
+    },
129
+    { NULL }
130
+};
131
+
122 132
 AVFilter avfilter_asrc_anullsrc = {
123 133
     .name        = "anullsrc",
124 134
     .description = NULL_IF_CONFIG_SMALL("Null audio source, return empty audio frames."),
... ...
@@ -128,10 +138,6 @@ AVFilter avfilter_asrc_anullsrc = {
128 128
 
129 129
     .inputs      = NULL,
130 130
 
131
-    .outputs     = (const AVFilterPad[]) {{ .name = "default",
132
-                                            .type = AVMEDIA_TYPE_AUDIO,
133
-                                            .config_props = config_props,
134
-                                            .request_frame = request_frame, },
135
-                                          { .name = NULL}},
131
+    .outputs     = avfilter_asrc_anullsrc_outputs,
136 132
     .priv_class = &anullsrc_class,
137 133
 };
... ...
@@ -140,6 +140,17 @@ int ff_buffersink_read_samples_compat(AVFilterContext *ctx, AVFilterBufferRef **
140 140
     return ret;
141 141
 }
142 142
 
143
+static const AVFilterPad avfilter_vsink_buffer_inputs[] = {
144
+    {
145
+        .name        = "default",
146
+        .type        = AVMEDIA_TYPE_VIDEO,
147
+        .start_frame = start_frame,
148
+        .min_perms   = AV_PERM_READ,
149
+        .needs_fifo  = 1
150
+    },
151
+    { NULL }
152
+};
153
+
143 154
 AVFilter avfilter_vsink_buffer = {
144 155
 #if AV_HAVE_INCOMPATIBLE_FORK_ABI
145 156
     .name      = "buffersink",
... ...
@@ -150,15 +161,21 @@ AVFilter avfilter_vsink_buffer = {
150 150
     .priv_size = sizeof(BufferSinkContext),
151 151
     .uninit    = uninit,
152 152
 
153
-    .inputs    = (const AVFilterPad[]) {{ .name          = "default",
154
-                                          .type          = AVMEDIA_TYPE_VIDEO,
155
-                                          .start_frame   = start_frame,
156
-                                          .min_perms     = AV_PERM_READ,
157
-                                          .needs_fifo    = 1 },
158
-                                        { .name = NULL }},
153
+    .inputs    = avfilter_vsink_buffer_inputs,
159 154
     .outputs   = NULL,
160 155
 };
161 156
 
157
+static const AVFilterPad avfilter_asink_abuffer_inputs[] = {
158
+    {
159
+        .name           = "default",
160
+        .type           = AVMEDIA_TYPE_AUDIO,
161
+        .filter_samples = start_frame,
162
+        .min_perms      = AV_PERM_READ,
163
+        .needs_fifo     = 1
164
+    },
165
+    { NULL }
166
+};
167
+
162 168
 AVFilter avfilter_asink_abuffer = {
163 169
 #if AV_HAVE_INCOMPATIBLE_FORK_ABI
164 170
     .name      = "abuffersink",
... ...
@@ -169,11 +186,6 @@ AVFilter avfilter_asink_abuffer = {
169 169
     .priv_size = sizeof(BufferSinkContext),
170 170
     .uninit    = uninit,
171 171
 
172
-    .inputs    = (const AVFilterPad[]) {{ .name           = "default",
173
-                                          .type           = AVMEDIA_TYPE_AUDIO,
174
-                                          .filter_samples = start_frame,
175
-                                          .min_perms      = AV_PERM_READ,
176
-                                          .needs_fifo     = 1 },
177
-                                        { .name = NULL }},
172
+    .inputs    = avfilter_asink_abuffer_inputs,
178 173
     .outputs   = NULL,
179 174
 };
... ...
@@ -400,6 +400,17 @@ static int poll_frame(AVFilterLink *link)
400 400
     return size/sizeof(AVFilterBufferRef*);
401 401
 }
402 402
 
403
+static const AVFilterPad avfilter_vsrc_buffer_outputs[] = {
404
+    {
405
+        .name          = "default",
406
+        .type          = AVMEDIA_TYPE_VIDEO,
407
+        .request_frame = request_frame,
408
+        .poll_frame    = poll_frame,
409
+        .config_props  = config_props,
410
+    },
411
+    { NULL }
412
+};
413
+
403 414
 AVFilter avfilter_vsrc_buffer = {
404 415
     .name      = "buffer",
405 416
     .description = NULL_IF_CONFIG_SMALL("Buffer video frames, and make them accessible to the filterchain."),
... ...
@@ -410,15 +421,21 @@ AVFilter avfilter_vsrc_buffer = {
410 410
     .uninit    = uninit,
411 411
 
412 412
     .inputs    = NULL,
413
-    .outputs   = (const AVFilterPad[]) {{ .name            = "default",
414
-                                          .type            = AVMEDIA_TYPE_VIDEO,
415
-                                          .request_frame   = request_frame,
416
-                                          .poll_frame      = poll_frame,
417
-                                          .config_props    = config_props, },
418
-                                        { .name = NULL}},
413
+    .outputs   = avfilter_vsrc_buffer_outputs,
419 414
     .priv_class = &buffer_class,
420 415
 };
421 416
 
417
+static const AVFilterPad avfilter_asrc_abuffer_outputs[] = {
418
+    {
419
+        .name          = "default",
420
+        .type          = AVMEDIA_TYPE_AUDIO,
421
+        .request_frame = request_frame,
422
+        .poll_frame    = poll_frame,
423
+        .config_props  = config_props,
424
+    },
425
+    { NULL }
426
+};
427
+
422 428
 AVFilter avfilter_asrc_abuffer = {
423 429
     .name          = "abuffer",
424 430
     .description   = NULL_IF_CONFIG_SMALL("Buffer audio frames, and make them accessible to the filterchain."),
... ...
@@ -429,11 +446,6 @@ AVFilter avfilter_asrc_abuffer = {
429 429
     .uninit    = uninit,
430 430
 
431 431
     .inputs    = NULL,
432
-    .outputs   = (const AVFilterPad[]) {{ .name            = "default",
433
-                                          .type            = AVMEDIA_TYPE_AUDIO,
434
-                                          .request_frame   = request_frame,
435
-                                          .poll_frame      = poll_frame,
436
-                                          .config_props    = config_props, },
437
-                                        { .name = NULL}},
432
+    .outputs   = avfilter_asrc_abuffer_outputs,
438 433
     .priv_class = &abuffer_class,
439 434
 };
... ...
@@ -216,6 +216,25 @@ AVFilter avfilter_af_asetpts = {
216 216
 #endif /* CONFIG_ASETPTS_FILTER */
217 217
 
218 218
 #if CONFIG_SETPTS_FILTER
219
+static const AVFilterPad avfilter_vf_setpts_inputs[] = {
220
+    {
221
+        .name             = "default",
222
+        .type             = AVMEDIA_TYPE_VIDEO,
223
+        .get_video_buffer = ff_null_get_video_buffer,
224
+        .config_props     = config_input,
225
+        .start_frame      = filter_frame,
226
+    },
227
+    { NULL }
228
+};
229
+
230
+static const AVFilterPad avfilter_vf_setpts_outputs[] = {
231
+    {
232
+        .name = "default",
233
+        .type = AVMEDIA_TYPE_VIDEO,
234
+    },
235
+    { NULL }
236
+};
237
+
219 238
 AVFilter avfilter_vf_setpts = {
220 239
     .name      = "setpts",
221 240
     .description = NULL_IF_CONFIG_SMALL("Set PTS for the output video frame."),
... ...
@@ -224,14 +243,7 @@ AVFilter avfilter_vf_setpts = {
224 224
 
225 225
     .priv_size = sizeof(SetPTSContext),
226 226
 
227
-    .inputs    = (const AVFilterPad[]) {{ .name             = "default",
228
-                                          .type             = AVMEDIA_TYPE_VIDEO,
229
-                                          .get_video_buffer = ff_null_get_video_buffer,
230
-                                          .config_props     = config_input,
231
-                                          .start_frame      = filter_frame, },
232
-                                        { .name = NULL }},
233
-    .outputs   = (const AVFilterPad[]) {{ .name             = "default",
234
-                                          .type             = AVMEDIA_TYPE_VIDEO, },
235
-                                        { .name = NULL}},
227
+    .inputs    = avfilter_vf_setpts_inputs,
228
+    .outputs   = avfilter_vf_setpts_outputs,
236 229
 };
237 230
 #endif /* CONFIG_SETPTS_FILTER */
... ...
@@ -137,6 +137,26 @@ static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *samplesref)
137 137
 }
138 138
 
139 139
 #if CONFIG_SETTB_FILTER
140
+static const AVFilterPad avfilter_vf_settb_inputs[] = {
141
+    {
142
+        .name             = "default",
143
+        .type             = AVMEDIA_TYPE_VIDEO,
144
+        .get_video_buffer = ff_null_get_video_buffer,
145
+        .start_frame      = start_frame,
146
+        .end_frame        = ff_null_end_frame
147
+    },
148
+    { NULL }
149
+};
150
+
151
+static const AVFilterPad avfilter_vf_settb_outputs[] = {
152
+    {
153
+        .name         = "default",
154
+        .type         = AVMEDIA_TYPE_VIDEO,
155
+        .config_props = config_output_props,
156
+    },
157
+    { NULL }
158
+};
159
+
140 160
 AVFilter avfilter_vf_settb = {
141 161
     .name      = "settb",
142 162
     .description = NULL_IF_CONFIG_SMALL("Set timebase for the video output link."),
... ...
@@ -144,20 +164,8 @@ AVFilter avfilter_vf_settb = {
144 144
 
145 145
     .priv_size = sizeof(SetTBContext),
146 146
 
147
-    .inputs    = (const AVFilterPad[]) {
148
-        { .name             = "default",
149
-          .type             = AVMEDIA_TYPE_VIDEO,
150
-          .get_video_buffer = ff_null_get_video_buffer,
151
-          .start_frame      = start_frame,
152
-          .end_frame        = ff_null_end_frame },
153
-        { .name = NULL }
154
-    },
155
-    .outputs   = (const AVFilterPad[]) {
156
-        { .name            = "default",
157
-          .type            = AVMEDIA_TYPE_VIDEO,
158
-          .config_props    = config_output_props, },
159
-        { .name = NULL}
160
-    },
147
+    .inputs    = avfilter_vf_settb_inputs,
148
+    .outputs   = avfilter_vf_settb_outputs,
161 149
 };
162 150
 #endif
163 151
 
... ...
@@ -267,6 +267,28 @@ static int request_frame(AVFilterLink *outlink)
267 267
     return ret;
268 268
 }
269 269
 
270
+static const AVFilterPad avfilter_vf_fifo_inputs[] = {
271
+    {
272
+        .name             = "default",
273
+        .type             = AVMEDIA_TYPE_VIDEO,
274
+        .get_video_buffer = ff_null_get_video_buffer,
275
+        .start_frame      = add_to_queue,
276
+        .draw_slice       = draw_slice,
277
+        .end_frame        = end_frame,
278
+        .min_perms        = AV_PERM_PRESERVE,
279
+    },
280
+    { NULL }
281
+};
282
+
283
+static const AVFilterPad avfilter_vf_fifo_outputs[] = {
284
+    {
285
+        .name          = "default",
286
+        .type          = AVMEDIA_TYPE_VIDEO,
287
+        .request_frame = request_frame,
288
+    },
289
+    { NULL }
290
+};
291
+
270 292
 AVFilter avfilter_vf_fifo = {
271 293
     .name      = "fifo",
272 294
     .description = NULL_IF_CONFIG_SMALL("Buffer input images and send them when they are requested."),
... ...
@@ -276,18 +298,28 @@ AVFilter avfilter_vf_fifo = {
276 276
 
277 277
     .priv_size = sizeof(FifoContext),
278 278
 
279
-    .inputs    = (const AVFilterPad[]) {{ .name            = "default",
280
-                                          .type            = AVMEDIA_TYPE_VIDEO,
281
-                                          .get_video_buffer= ff_null_get_video_buffer,
282
-                                          .start_frame     = add_to_queue,
283
-                                          .draw_slice      = draw_slice,
284
-                                          .end_frame       = end_frame,
285
-                                          .min_perms       = AV_PERM_PRESERVE, },
286
-                                        { .name = NULL}},
287
-    .outputs   = (const AVFilterPad[]) {{ .name            = "default",
288
-                                          .type            = AVMEDIA_TYPE_VIDEO,
289
-                                          .request_frame   = request_frame, },
290
-                                        { .name = NULL}},
279
+    .inputs    = avfilter_vf_fifo_inputs,
280
+    .outputs   = avfilter_vf_fifo_outputs,
281
+};
282
+
283
+static const AVFilterPad avfilter_af_afifo_inputs[] = {
284
+    {
285
+        .name             = "default",
286
+        .type             = AVMEDIA_TYPE_AUDIO,
287
+        .get_audio_buffer = ff_null_get_audio_buffer,
288
+        .filter_samples   = add_to_queue,
289
+        .min_perms        = AV_PERM_PRESERVE,
290
+    },
291
+    { NULL }
292
+};
293
+
294
+static const AVFilterPad avfilter_af_afifo_outputs[] = {
295
+    {
296
+        .name          = "default",
297
+        .type          = AVMEDIA_TYPE_AUDIO,
298
+        .request_frame = request_frame,
299
+    },
300
+    { NULL }
291 301
 };
292 302
 
293 303
 AVFilter avfilter_af_afifo = {
... ...
@@ -299,14 +331,6 @@ AVFilter avfilter_af_afifo = {
299 299
 
300 300
     .priv_size = sizeof(FifoContext),
301 301
 
302
-    .inputs    = (const AVFilterPad[]) {{ .name             = "default",
303
-                                          .type             = AVMEDIA_TYPE_AUDIO,
304
-                                          .get_audio_buffer = ff_null_get_audio_buffer,
305
-                                          .filter_samples   = add_to_queue,
306
-                                          .min_perms        = AV_PERM_PRESERVE, },
307
-                                        { .name = NULL}},
308
-    .outputs   = (const AVFilterPad[]) {{ .name             = "default",
309
-                                          .type             = AVMEDIA_TYPE_AUDIO,
310
-                                          .request_frame    = request_frame, },
311
-                                        { .name = NULL}},
302
+    .inputs    = avfilter_af_afifo_inputs,
303
+    .outputs   = avfilter_af_afifo_outputs,
312 304
 };
... ...
@@ -119,6 +119,18 @@ static int end_frame(AVFilterLink *inlink)
119 119
     return ret;
120 120
 }
121 121
 
122
+static const AVFilterPad avfilter_vf_split_inputs[] = {
123
+    {
124
+        .name             = "default",
125
+        .type             = AVMEDIA_TYPE_VIDEO,
126
+        .get_video_buffer = ff_null_get_video_buffer,
127
+        .start_frame      = start_frame,
128
+        .draw_slice       = draw_slice,
129
+        .end_frame        = end_frame,
130
+    },
131
+    { NULL }
132
+};
133
+
122 134
 AVFilter avfilter_vf_split = {
123 135
     .name      = "split",
124 136
     .description = NULL_IF_CONFIG_SMALL("Pass on the input video to N outputs."),
... ...
@@ -126,13 +138,7 @@ AVFilter avfilter_vf_split = {
126 126
     .init   = split_init,
127 127
     .uninit = split_uninit,
128 128
 
129
-    .inputs    = (const AVFilterPad[]) {{ .name            = "default",
130
-                                          .type            = AVMEDIA_TYPE_VIDEO,
131
-                                          .get_video_buffer= ff_null_get_video_buffer,
132
-                                          .start_frame     = start_frame,
133
-                                          .draw_slice      = draw_slice,
134
-                                          .end_frame       = end_frame, },
135
-                                        { .name = NULL}},
129
+    .inputs    = avfilter_vf_split_inputs,
136 130
     .outputs   = NULL,
137 131
 };
138 132
 
... ...
@@ -157,6 +163,16 @@ static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *samplesref)
157 157
     return ret;
158 158
 }
159 159
 
160
+static const AVFilterPad avfilter_af_asplit_inputs[] = {
161
+    {
162
+        .name             = "default",
163
+        .type             = AVMEDIA_TYPE_AUDIO,
164
+        .get_audio_buffer = ff_null_get_audio_buffer,
165
+        .filter_samples   = filter_samples
166
+    },
167
+    { NULL }
168
+};
169
+
160 170
 AVFilter avfilter_af_asplit = {
161 171
     .name        = "asplit",
162 172
     .description = NULL_IF_CONFIG_SMALL("Pass on the audio input to N audio outputs."),
... ...
@@ -164,10 +180,6 @@ AVFilter avfilter_af_asplit = {
164 164
     .init   = split_init,
165 165
     .uninit = split_uninit,
166 166
 
167
-    .inputs  = (const AVFilterPad[]) {{ .name             = "default",
168
-                                        .type             = AVMEDIA_TYPE_AUDIO,
169
-                                        .get_audio_buffer = ff_null_get_audio_buffer,
170
-                                        .filter_samples   = filter_samples },
171
-                                      { .name = NULL }},
167
+    .inputs  = avfilter_af_asplit_inputs,
172 168
     .outputs = NULL,
173 169
 };
... ...
@@ -79,6 +79,26 @@ static int setdar_config_props(AVFilterLink *inlink)
79 79
     return 0;
80 80
 }
81 81
 
82
+static const AVFilterPad avfilter_vf_setdar_inputs[] = {
83
+    {
84
+        .name             = "default",
85
+        .type             = AVMEDIA_TYPE_VIDEO,
86
+        .config_props     = setdar_config_props,
87
+        .get_video_buffer = ff_null_get_video_buffer,
88
+        .start_frame      = start_frame,
89
+        .end_frame        = ff_null_end_frame
90
+    },
91
+    { NULL }
92
+};
93
+
94
+static const AVFilterPad avfilter_vf_setdar_outputs[] = {
95
+    {
96
+        .name = "default",
97
+        .type = AVMEDIA_TYPE_VIDEO,
98
+    },
99
+    { NULL }
100
+};
101
+
82 102
 AVFilter avfilter_vf_setdar = {
83 103
     .name      = "setdar",
84 104
     .description = NULL_IF_CONFIG_SMALL("Set the frame display aspect ratio."),
... ...
@@ -87,17 +107,9 @@ AVFilter avfilter_vf_setdar = {
87 87
 
88 88
     .priv_size = sizeof(AspectContext),
89 89
 
90
-    .inputs    = (const AVFilterPad[]) {{ .name             = "default",
91
-                                          .type             = AVMEDIA_TYPE_VIDEO,
92
-                                          .config_props     = setdar_config_props,
93
-                                          .get_video_buffer = ff_null_get_video_buffer,
94
-                                          .start_frame      = start_frame,
95
-                                          .end_frame        = ff_null_end_frame },
96
-                                        { .name = NULL}},
97
-
98
-    .outputs   = (const AVFilterPad[]) {{ .name             = "default",
99
-                                          .type             = AVMEDIA_TYPE_VIDEO, },
100
-                                        { .name = NULL}},
90
+    .inputs    = avfilter_vf_setdar_inputs,
91
+
92
+    .outputs   = avfilter_vf_setdar_outputs,
101 93
 };
102 94
 #endif /* CONFIG_SETDAR_FILTER */
103 95
 
... ...
@@ -111,6 +123,26 @@ static int setsar_config_props(AVFilterLink *inlink)
111 111
     return 0;
112 112
 }
113 113
 
114
+static const AVFilterPad avfilter_vf_setsar_inputs[] = {
115
+    {
116
+        .name             = "default",
117
+        .type             = AVMEDIA_TYPE_VIDEO,
118
+        .config_props     = setsar_config_props,
119
+        .get_video_buffer = ff_null_get_video_buffer,
120
+        .start_frame      = start_frame,
121
+        .end_frame        = ff_null_end_frame
122
+    },
123
+    { NULL }
124
+};
125
+
126
+static const AVFilterPad avfilter_vf_setsar_outputs[] = {
127
+    {
128
+        .name = "default",
129
+        .type = AVMEDIA_TYPE_VIDEO,
130
+    },
131
+    { NULL }
132
+};
133
+
114 134
 AVFilter avfilter_vf_setsar = {
115 135
     .name      = "setsar",
116 136
     .description = NULL_IF_CONFIG_SMALL("Set the pixel sample aspect ratio."),
... ...
@@ -119,16 +151,8 @@ AVFilter avfilter_vf_setsar = {
119 119
 
120 120
     .priv_size = sizeof(AspectContext),
121 121
 
122
-    .inputs    = (const AVFilterPad[]) {{ .name             = "default",
123
-                                          .type             = AVMEDIA_TYPE_VIDEO,
124
-                                          .config_props     = setsar_config_props,
125
-                                          .get_video_buffer = ff_null_get_video_buffer,
126
-                                          .start_frame      = start_frame,
127
-                                          .end_frame        = ff_null_end_frame },
128
-                                        { .name = NULL}},
129
-
130
-    .outputs   = (const AVFilterPad[]) {{ .name             = "default",
131
-                                          .type             = AVMEDIA_TYPE_VIDEO, },
132
-                                        { .name = NULL}},
122
+    .inputs    = avfilter_vf_setsar_inputs,
123
+
124
+    .outputs   = avfilter_vf_setsar_outputs,
133 125
 };
134 126
 #endif /* CONFIG_SETSAR_FILTER */
... ...
@@ -121,6 +121,26 @@ static int end_frame(AVFilterLink *inlink)
121 121
     return ff_end_frame(inlink->dst->outputs[0]);
122 122
 }
123 123
 
124
+static const AVFilterPad avfilter_vf_blackframe_inputs[] = {
125
+    {
126
+        .name             = "default",
127
+        .type             = AVMEDIA_TYPE_VIDEO,
128
+        .draw_slice       = draw_slice,
129
+        .get_video_buffer = ff_null_get_video_buffer,
130
+        .start_frame      = ff_null_start_frame,
131
+        .end_frame        = end_frame,
132
+    },
133
+    { NULL }
134
+};
135
+
136
+static const AVFilterPad avfilter_vf_blackframe_outputs[] = {
137
+    {
138
+        .name = "default",
139
+        .type = AVMEDIA_TYPE_VIDEO
140
+    },
141
+    { NULL }
142
+};
143
+
124 144
 AVFilter avfilter_vf_blackframe = {
125 145
     .name        = "blackframe",
126 146
     .description = NULL_IF_CONFIG_SMALL("Detect frames that are (almost) black."),
... ...
@@ -130,15 +150,7 @@ AVFilter avfilter_vf_blackframe = {
130 130
 
131 131
     .query_formats = query_formats,
132 132
 
133
-    .inputs    = (const AVFilterPad[]) {{ .name = "default",
134
-                                          .type             = AVMEDIA_TYPE_VIDEO,
135
-                                          .draw_slice       = draw_slice,
136
-                                          .get_video_buffer = ff_null_get_video_buffer,
137
-                                          .start_frame      = ff_null_start_frame,
138
-                                          .end_frame        = end_frame, },
139
-                                        { .name = NULL}},
140
-
141
-    .outputs   = (const AVFilterPad[]) {{ .name       = "default",
142
-                                    .type             = AVMEDIA_TYPE_VIDEO },
143
-                                  { .name = NULL}},
133
+    .inputs    = avfilter_vf_blackframe_inputs,
134
+
135
+    .outputs   = avfilter_vf_blackframe_outputs,
144 136
 };
... ...
@@ -332,6 +332,26 @@ static int end_frame(AVFilterLink *inlink)
332 332
     return ff_end_frame(outlink);
333 333
 }
334 334
 
335
+static const AVFilterPad avfilter_vf_boxblur_inputs[] = {
336
+    {
337
+        .name         = "default",
338
+        .type         = AVMEDIA_TYPE_VIDEO,
339
+        .config_props = config_input,
340
+        .draw_slice   = null_draw_slice,
341
+        .end_frame    = end_frame,
342
+        .min_perms    = AV_PERM_READ
343
+    },
344
+    { NULL }
345
+};
346
+
347
+static const AVFilterPad avfilter_vf_boxblur_outputs[] = {
348
+    {
349
+        .name = "default",
350
+        .type = AVMEDIA_TYPE_VIDEO,
351
+    },
352
+    { NULL }
353
+};
354
+
335 355
 AVFilter avfilter_vf_boxblur = {
336 356
     .name          = "boxblur",
337 357
     .description   = NULL_IF_CONFIG_SMALL("Blur the input."),
... ...
@@ -340,14 +360,6 @@ AVFilter avfilter_vf_boxblur = {
340 340
     .uninit        = uninit,
341 341
     .query_formats = query_formats,
342 342
 
343
-    .inputs    = (const AVFilterPad[]) {{ .name             = "default",
344
-                                          .type             = AVMEDIA_TYPE_VIDEO,
345
-                                          .config_props     = config_input,
346
-                                          .draw_slice       = null_draw_slice,
347
-                                          .end_frame        = end_frame,
348
-                                          .min_perms        = AV_PERM_READ },
349
-                                        { .name = NULL}},
350
-    .outputs   = (const AVFilterPad[]) {{ .name             = "default",
351
-                                          .type             = AVMEDIA_TYPE_VIDEO, },
352
-                                        { .name = NULL}},
343
+    .inputs    = avfilter_vf_boxblur_inputs,
344
+    .outputs   = avfilter_vf_boxblur_outputs,
353 345
 };
... ...
@@ -26,18 +26,30 @@
26 26
 #include "internal.h"
27 27
 #include "video.h"
28 28
 
29
+static const AVFilterPad avfilter_vf_copy_inputs[] = {
30
+    {
31
+        .name             = "default",
32
+        .type             = AVMEDIA_TYPE_VIDEO,
33
+        .get_video_buffer = ff_null_get_video_buffer,
34
+        .start_frame      = ff_null_start_frame,
35
+        .end_frame        = ff_null_end_frame,
36
+        .rej_perms        = ~0
37
+    },
38
+    { NULL }
39
+};
40
+
41
+static const AVFilterPad avfilter_vf_copy_outputs[] = {
42
+    {
43
+        .name = "default",
44
+        .type = AVMEDIA_TYPE_VIDEO,
45
+    },
46
+    { NULL }
47
+};
48
+
29 49
 AVFilter avfilter_vf_copy = {
30 50
     .name      = "copy",
31 51
     .description = NULL_IF_CONFIG_SMALL("Copy the input video unchanged to the output."),
32 52
 
33
-    .inputs    = (const AVFilterPad[]) {{ .name             = "default",
34
-                                          .type             = AVMEDIA_TYPE_VIDEO,
35
-                                          .get_video_buffer = ff_null_get_video_buffer,
36
-                                          .start_frame      = ff_null_start_frame,
37
-                                          .end_frame        = ff_null_end_frame,
38
-                                          .rej_perms        = ~0 },
39
-                                        { .name = NULL}},
40
-    .outputs   = (const AVFilterPad[]) {{ .name             = "default",
41
-                                          .type             = AVMEDIA_TYPE_VIDEO, },
42
-                                        { .name = NULL}},
53
+    .inputs    = avfilter_vf_copy_inputs,
54
+    .outputs   = avfilter_vf_copy_outputs,
43 55
 };
... ...
@@ -345,6 +345,28 @@ static int end_frame(AVFilterLink *link)
345 345
     return ff_end_frame(link->dst->outputs[0]);
346 346
 }
347 347
 
348
+static const AVFilterPad avfilter_vf_crop_inputs[] = {
349
+    {
350
+        .name             = "default",
351
+        .type             = AVMEDIA_TYPE_VIDEO,
352
+        .start_frame      = start_frame,
353
+        .draw_slice       = draw_slice,
354
+        .end_frame        = end_frame,
355
+        .get_video_buffer = ff_null_get_video_buffer,
356
+        .config_props     = config_input,
357
+    },
358
+    { NULL }
359
+};
360
+
361
+static const AVFilterPad avfilter_vf_crop_outputs[] = {
362
+    {
363
+        .name         = "default",
364
+        .type         = AVMEDIA_TYPE_VIDEO,
365
+        .config_props = config_output,
366
+    },
367
+    { NULL }
368
+};
369
+
348 370
 AVFilter avfilter_vf_crop = {
349 371
     .name      = "crop",
350 372
     .description = NULL_IF_CONFIG_SMALL("Crop the input video to width:height:x:y."),
... ...
@@ -355,16 +377,6 @@ AVFilter avfilter_vf_crop = {
355 355
     .init          = init,
356 356
     .uninit        = uninit,
357 357
 
358
-    .inputs    = (const AVFilterPad[]) {{ .name             = "default",
359
-                                          .type             = AVMEDIA_TYPE_VIDEO,
360
-                                          .start_frame      = start_frame,
361
-                                          .draw_slice       = draw_slice,
362
-                                          .end_frame        = end_frame,
363
-                                          .get_video_buffer = ff_null_get_video_buffer,
364
-                                          .config_props     = config_input, },
365
-                                        { .name = NULL}},
366
-    .outputs   = (const AVFilterPad[]) {{ .name             = "default",
367
-                                          .type             = AVMEDIA_TYPE_VIDEO,
368
-                                          .config_props     = config_output, },
369
-                                        { .name = NULL}},
358
+    .inputs    = avfilter_vf_crop_inputs,
359
+    .outputs   = avfilter_vf_crop_outputs,
370 360
 };
... ...
@@ -197,6 +197,26 @@ static int end_frame(AVFilterLink *inlink)
197 197
     return ff_end_frame(inlink->dst->outputs[0]);
198 198
 }
199 199
 
200
+static const AVFilterPad avfilter_vf_cropdetect_inputs[] = {
201
+    {
202
+        .name             = "default",
203
+        .type             = AVMEDIA_TYPE_VIDEO,
204
+        .config_props     = config_input,
205
+        .get_video_buffer = ff_null_get_video_buffer,
206
+        .start_frame      = ff_null_start_frame,
207
+        .end_frame        = end_frame,
208
+    },
209
+    { NULL }
210
+};
211
+
212
+static const AVFilterPad avfilter_vf_cropdetect_outputs[] = {
213
+    {
214
+        .name = "default",
215
+        .type = AVMEDIA_TYPE_VIDEO
216
+    },
217
+    { NULL }
218
+};
219
+
200 220
 AVFilter avfilter_vf_cropdetect = {
201 221
     .name        = "cropdetect",
202 222
     .description = NULL_IF_CONFIG_SMALL("Auto-detect crop size."),
... ...
@@ -206,15 +226,7 @@ AVFilter avfilter_vf_cropdetect = {
206 206
 
207 207
     .query_formats = query_formats,
208 208
 
209
-    .inputs    = (const AVFilterPad[]) {{ .name = "default",
210
-                                          .type             = AVMEDIA_TYPE_VIDEO,
211
-                                          .config_props     = config_input,
212
-                                          .get_video_buffer = ff_null_get_video_buffer,
213
-                                          .start_frame      = ff_null_start_frame,
214
-                                          .end_frame        = end_frame, },
215
-                                        { .name = NULL}},
216
-
217
-    .outputs   = (const AVFilterPad[]) {{ .name             = "default",
218
-                                          .type             = AVMEDIA_TYPE_VIDEO },
219
-                                        { .name = NULL}},
209
+    .inputs    = avfilter_vf_cropdetect_inputs,
210
+
211
+    .outputs   = avfilter_vf_cropdetect_outputs,
220 212
 };
... ...
@@ -245,6 +245,27 @@ static int end_frame(AVFilterLink *inlink)
245 245
     return 0;
246 246
 }
247 247
 
248
+static const AVFilterPad avfilter_vf_delogo_inputs[] = {
249
+    {
250
+        .name             = "default",
251
+        .type             = AVMEDIA_TYPE_VIDEO,
252
+        .get_video_buffer = ff_null_get_video_buffer,
253
+        .start_frame      = ff_inplace_start_frame,
254
+        .draw_slice       = null_draw_slice,
255
+        .end_frame        = end_frame,
256
+        .min_perms        = AV_PERM_WRITE | AV_PERM_READ,
257
+    },
258
+    { NULL }
259
+};
260
+
261
+static const AVFilterPad avfilter_vf_delogo_outputs[] = {
262
+    {
263
+        .name = "default",
264
+        .type = AVMEDIA_TYPE_VIDEO,
265
+    },
266
+    { NULL }
267
+};
268
+
248 269
 AVFilter avfilter_vf_delogo = {
249 270
     .name          = "delogo",
250 271
     .description   = NULL_IF_CONFIG_SMALL("Remove logo from input video."),
... ...
@@ -252,15 +273,6 @@ AVFilter avfilter_vf_delogo = {
252 252
     .init          = init,
253 253
     .query_formats = query_formats,
254 254
 
255
-    .inputs    = (const AVFilterPad[]) {{ .name             = "default",
256
-                                          .type             = AVMEDIA_TYPE_VIDEO,
257
-                                          .get_video_buffer = ff_null_get_video_buffer,
258
-                                          .start_frame      = ff_inplace_start_frame,
259
-                                          .draw_slice       = null_draw_slice,
260
-                                          .end_frame        = end_frame,
261
-                                          .min_perms        = AV_PERM_WRITE | AV_PERM_READ },
262
-                                        { .name = NULL}},
263
-    .outputs   = (const AVFilterPad[]) {{ .name             = "default",
264
-                                          .type             = AVMEDIA_TYPE_VIDEO, },
265
-                                        { .name = NULL}},
255
+    .inputs    = avfilter_vf_delogo_inputs,
256
+    .outputs   = avfilter_vf_delogo_outputs,
266 257
 };
... ...
@@ -124,6 +124,28 @@ static int draw_slice(AVFilterLink *inlink, int y0, int h, int slice_dir)
124 124
     return ff_draw_slice(inlink->dst->outputs[0], y0, h, 1);
125 125
 }
126 126
 
127
+static const AVFilterPad avfilter_vf_drawbox_inputs[] = {
128
+    {
129
+        .name             = "default",
130
+        .type             = AVMEDIA_TYPE_VIDEO,
131
+        .config_props     = config_input,
132
+        .get_video_buffer = ff_null_get_video_buffer,
133
+        .start_frame      = ff_null_start_frame,
134
+        .draw_slice       = draw_slice,
135
+        .end_frame        = ff_null_end_frame,
136
+        .min_perms        = AV_PERM_WRITE | AV_PERM_READ,
137
+    },
138
+    { NULL }
139
+};
140
+
141
+static const AVFilterPad avfilter_vf_drawbox_outputs[] = {
142
+    {
143
+        .name = "default",
144
+        .type = AVMEDIA_TYPE_VIDEO,
145
+    },
146
+    { NULL }
147
+};
148
+
127 149
 AVFilter avfilter_vf_drawbox = {
128 150
     .name      = "drawbox",
129 151
     .description = NULL_IF_CONFIG_SMALL("Draw a colored box on the input video."),
... ...
@@ -131,16 +153,6 @@ AVFilter avfilter_vf_drawbox = {
131 131
     .init      = init,
132 132
 
133 133
     .query_formats   = query_formats,
134
-    .inputs    = (const AVFilterPad[]) {{ .name             = "default",
135
-                                          .type             = AVMEDIA_TYPE_VIDEO,
136
-                                          .config_props     = config_input,
137
-                                          .get_video_buffer = ff_null_get_video_buffer,
138
-                                          .start_frame      = ff_null_start_frame,
139
-                                          .draw_slice       = draw_slice,
140
-                                          .end_frame        = ff_null_end_frame,
141
-                                          .min_perms        = AV_PERM_WRITE | AV_PERM_READ },
142
-                                        { .name = NULL}},
143
-    .outputs   = (const AVFilterPad[]) {{ .name             = "default",
144
-                                          .type             = AVMEDIA_TYPE_VIDEO, },
145
-                                        { .name = NULL}},
134
+    .inputs    = avfilter_vf_drawbox_inputs,
135
+    .outputs   = avfilter_vf_drawbox_outputs,
146 136
 };
... ...
@@ -810,6 +810,29 @@ static int end_frame(AVFilterLink *inlink)
810 810
     return 0;
811 811
 }
812 812
 
813
+static const AVFilterPad avfilter_vf_drawtext_inputs[] = {
814
+    {
815
+        .name             = "default",
816
+        .type             = AVMEDIA_TYPE_VIDEO,
817
+        .get_video_buffer = ff_null_get_video_buffer,
818
+        .start_frame      = ff_null_start_frame,
819
+        .draw_slice       = null_draw_slice,
820
+        .end_frame        = end_frame,
821
+        .config_props     = config_input,
822
+        .min_perms        = AV_PERM_WRITE |
823
+                            AV_PERM_READ,
824
+    },
825
+    { NULL }
826
+};
827
+
828
+static const AVFilterPad avfilter_vf_drawtext_outputs[] = {
829
+    {
830
+        .name = "default",
831
+        .type = AVMEDIA_TYPE_VIDEO,
832
+    },
833
+    { NULL }
834
+};
835
+
813 836
 AVFilter avfilter_vf_drawtext = {
814 837
     .name          = "drawtext",
815 838
     .description   = NULL_IF_CONFIG_SMALL("Draw text on top of video frames using libfreetype library."),
... ...
@@ -818,19 +841,8 @@ AVFilter avfilter_vf_drawtext = {
818 818
     .uninit        = uninit,
819 819
     .query_formats = query_formats,
820 820
 
821
-    .inputs    = (const AVFilterPad[]) {{ .name             = "default",
822
-                                          .type             = AVMEDIA_TYPE_VIDEO,
823
-                                          .get_video_buffer = ff_null_get_video_buffer,
824
-                                          .start_frame      = ff_null_start_frame,
825
-                                          .draw_slice       = null_draw_slice,
826
-                                          .end_frame        = end_frame,
827
-                                          .config_props     = config_input,
828
-                                          .min_perms        = AV_PERM_WRITE |
829
-                                                              AV_PERM_READ },
830
-                                        { .name = NULL}},
831
-    .outputs   = (const AVFilterPad[]) {{ .name             = "default",
832
-                                          .type             = AVMEDIA_TYPE_VIDEO, },
833
-                                        { .name = NULL}},
821
+    .inputs    = avfilter_vf_drawtext_inputs,
822
+    .outputs   = avfilter_vf_drawtext_outputs,
834 823
     .process_command = command,
835 824
     .priv_class = &drawtext_class,
836 825
 };
... ...
@@ -276,6 +276,28 @@ static int end_frame(AVFilterLink *inlink)
276 276
     return ret;
277 277
 }
278 278
 
279
+static const AVFilterPad avfilter_vf_fade_inputs[] = {
280
+    {
281
+        .name             = "default",
282
+        .type             = AVMEDIA_TYPE_VIDEO,
283
+        .config_props     = config_props,
284
+        .get_video_buffer = ff_null_get_video_buffer,
285
+        .start_frame      = ff_null_start_frame,
286
+        .draw_slice       = draw_slice,
287
+        .end_frame        = end_frame,
288
+        .min_perms        = AV_PERM_READ | AV_PERM_WRITE,
289
+    },
290
+    { NULL }
291
+};
292
+
293
+static const AVFilterPad avfilter_vf_fade_outputs[] = {
294
+    {
295
+        .name = "default",
296
+        .type = AVMEDIA_TYPE_VIDEO,
297
+    },
298
+    { NULL }
299
+};
300
+
279 301
 AVFilter avfilter_vf_fade = {
280 302
     .name          = "fade",
281 303
     .description   = NULL_IF_CONFIG_SMALL("Fade in/out input video."),
... ...
@@ -284,17 +306,7 @@ AVFilter avfilter_vf_fade = {
284 284
     .priv_size     = sizeof(FadeContext),
285 285
     .query_formats = query_formats,
286 286
 
287
-    .inputs    = (const AVFilterPad[]) {{ .name            = "default",
288
-                                          .type            = AVMEDIA_TYPE_VIDEO,
289
-                                          .config_props    = config_props,
290
-                                          .get_video_buffer = ff_null_get_video_buffer,
291
-                                          .start_frame      = ff_null_start_frame,
292
-                                          .draw_slice      = draw_slice,
293
-                                          .end_frame       = end_frame,
294
-                                          .min_perms       = AV_PERM_READ | AV_PERM_WRITE },
295
-                                        { .name = NULL}},
296
-    .outputs   = (const AVFilterPad[]) {{ .name            = "default",
297
-                                          .type            = AVMEDIA_TYPE_VIDEO, },
298
-                                        { .name = NULL}},
287
+    .inputs    = avfilter_vf_fade_inputs,
288
+    .outputs   = avfilter_vf_fade_outputs,
299 289
     .priv_class = &fade_class,
300 290
 };
... ...
@@ -234,22 +234,34 @@ static int end_frame(AVFilterLink *inlink)
234 234
     return ff_end_frame(outlink);
235 235
 }
236 236
 
237
+static const AVFilterPad avfilter_vf_fieldorder_inputs[] = {
238
+    {
239
+        .name             = "default",
240
+        .type             = AVMEDIA_TYPE_VIDEO,
241
+        .config_props     = config_input,
242
+        .start_frame      = start_frame,
243
+        .get_video_buffer = get_video_buffer,
244
+        .draw_slice       = draw_slice,
245
+        .end_frame        = end_frame,
246
+        .min_perms        = AV_PERM_READ | AV_PERM_PRESERVE,
247
+    },
248
+    { NULL }
249
+};
250
+
251
+static const AVFilterPad avfilter_vf_fieldorder_outputs[] = {
252
+    {
253
+        .name = "default",
254
+        .type = AVMEDIA_TYPE_VIDEO,
255
+    },
256
+    { NULL }
257
+};
258
+
237 259
 AVFilter avfilter_vf_fieldorder = {
238 260
     .name          = "fieldorder",
239 261
     .description   = NULL_IF_CONFIG_SMALL("Set the field order."),
240 262
     .init          = init,
241 263
     .priv_size     = sizeof(FieldOrderContext),
242 264
     .query_formats = query_formats,
243
-    .inputs        = (const AVFilterPad[]) {{ .name             = "default",
244
-                                              .type             = AVMEDIA_TYPE_VIDEO,
245
-                                              .config_props     = config_input,
246
-                                              .start_frame      = start_frame,
247
-                                              .get_video_buffer = get_video_buffer,
248
-                                              .draw_slice       = draw_slice,
249
-                                              .end_frame        = end_frame,
250
-                                              .min_perms        = AV_PERM_READ | AV_PERM_PRESERVE },
251
-                                            { .name = NULL}},
252
-    .outputs       = (const AVFilterPad[]) {{ .name             = "default",
253
-                                              .type             = AVMEDIA_TYPE_VIDEO, },
254
-                                            { .name = NULL}},
265
+    .inputs        = avfilter_vf_fieldorder_inputs,
266
+    .outputs       = avfilter_vf_fieldorder_outputs,
255 267
 };
... ...
@@ -97,6 +97,26 @@ static int query_formats_format(AVFilterContext *ctx)
97 97
     return 0;
98 98
 }
99 99
 
100
+static const AVFilterPad avfilter_vf_format_inputs[] = {
101
+    {
102
+        .name             = "default",
103
+        .type             = AVMEDIA_TYPE_VIDEO,
104
+        .get_video_buffer = ff_null_get_video_buffer,
105
+        .start_frame      = ff_null_start_frame,
106
+        .draw_slice       = ff_null_draw_slice,
107
+        .end_frame        = ff_null_end_frame,
108
+    },
109
+    { NULL }
110
+};
111
+
112
+static const AVFilterPad avfilter_vf_format_outputs[] = {
113
+    {
114
+        .name = "default",
115
+        .type = AVMEDIA_TYPE_VIDEO
116
+    },
117
+    { NULL }
118
+};
119
+
100 120
 AVFilter avfilter_vf_format = {
101 121
     .name      = "format",
102 122
     .description = NULL_IF_CONFIG_SMALL("Convert the input video to one of the specified pixel formats."),
... ...
@@ -107,16 +127,8 @@ AVFilter avfilter_vf_format = {
107 107
 
108 108
     .priv_size = sizeof(FormatContext),
109 109
 
110
-    .inputs    = (const AVFilterPad[]) {{ .name            = "default",
111
-                                          .type            = AVMEDIA_TYPE_VIDEO,
112
-                                          .get_video_buffer= ff_null_get_video_buffer,
113
-                                          .start_frame     = ff_null_start_frame,
114
-                                          .draw_slice      = ff_null_draw_slice,
115
-                                          .end_frame       = ff_null_end_frame, },
116
-                                        { .name = NULL}},
117
-    .outputs   = (const AVFilterPad[]) {{ .name            = "default",
118
-                                          .type            = AVMEDIA_TYPE_VIDEO },
119
-                                        { .name = NULL}},
110
+    .inputs    = avfilter_vf_format_inputs,
111
+    .outputs   = avfilter_vf_format_outputs,
120 112
 };
121 113
 #endif /* CONFIG_FORMAT_FILTER */
122 114
 
... ...
@@ -127,6 +139,26 @@ static int query_formats_noformat(AVFilterContext *ctx)
127 127
     return 0;
128 128
 }
129 129
 
130
+static const AVFilterPad avfilter_vf_noformat_inputs[] = {
131
+    {
132
+        .name             = "default",
133
+        .type             = AVMEDIA_TYPE_VIDEO,
134
+        .get_video_buffer = ff_null_get_video_buffer,
135
+        .start_frame      = ff_null_start_frame,
136
+        .draw_slice       = ff_null_draw_slice,
137
+        .end_frame        = ff_null_end_frame,
138
+    },
139
+    { NULL }
140
+};
141
+
142
+static const AVFilterPad avfilter_vf_noformat_outputs[] = {
143
+    {
144
+        .name = "default",
145
+        .type = AVMEDIA_TYPE_VIDEO
146
+    },
147
+    { NULL }
148
+};
149
+
130 150
 AVFilter avfilter_vf_noformat = {
131 151
     .name      = "noformat",
132 152
     .description = NULL_IF_CONFIG_SMALL("Force libavfilter not to use any of the specified pixel formats for the input to the next filter."),
... ...
@@ -137,15 +169,7 @@ AVFilter avfilter_vf_noformat = {
137 137
 
138 138
     .priv_size = sizeof(FormatContext),
139 139
 
140
-    .inputs    = (const AVFilterPad[]) {{ .name            = "default",
141
-                                          .type            = AVMEDIA_TYPE_VIDEO,
142
-                                          .get_video_buffer= ff_null_get_video_buffer,
143
-                                          .start_frame     = ff_null_start_frame,
144
-                                          .draw_slice      = ff_null_draw_slice,
145
-                                          .end_frame       = ff_null_end_frame, },
146
-                                        { .name = NULL}},
147
-    .outputs   = (const AVFilterPad[]) {{ .name            = "default",
148
-                                          .type            = AVMEDIA_TYPE_VIDEO },
149
-                                        { .name = NULL}},
140
+    .inputs    = avfilter_vf_noformat_inputs,
141
+    .outputs   = avfilter_vf_noformat_outputs,
150 142
 };
151 143
 #endif /* CONFIG_NOFORMAT_FILTER */
... ...
@@ -279,6 +279,29 @@ static int null_draw_slice(AVFilterLink *link, int y, int h, int slice_dir)
279 279
     return 0;
280 280
 }
281 281
 
282
+static const AVFilterPad avfilter_vf_fps_inputs[] = {
283
+    {
284
+        .name        = "default",
285
+        .type        = AVMEDIA_TYPE_VIDEO,
286
+        .min_perms   = AV_PERM_READ | AV_PERM_PRESERVE,
287
+        .start_frame = null_start_frame,
288
+        .draw_slice  = null_draw_slice,
289
+        .end_frame   = end_frame,
290
+    },
291
+    { NULL }
292
+};
293
+
294
+static const AVFilterPad avfilter_vf_fps_outputs[] = {
295
+    {
296
+        .name          = "default",
297
+        .type          = AVMEDIA_TYPE_VIDEO,
298
+        .rej_perms     = AV_PERM_WRITE,
299
+        .request_frame = request_frame,
300
+        .config_props  = config_props
301
+    },
302
+    { NULL }
303
+};
304
+
282 305
 AVFilter avfilter_vf_fps = {
283 306
     .name        = "fps",
284 307
     .description = NULL_IF_CONFIG_SMALL("Force constant framerate"),
... ...
@@ -288,18 +311,7 @@ AVFilter avfilter_vf_fps = {
288 288
 
289 289
     .priv_size = sizeof(FPSContext),
290 290
 
291
-    .inputs    = (const AVFilterPad[]) {{ .name            = "default",
292
-                                          .type            = AVMEDIA_TYPE_VIDEO,
293
-                                          .min_perms       = AV_PERM_READ | AV_PERM_PRESERVE,
294
-                                          .start_frame     = null_start_frame,
295
-                                          .draw_slice      = null_draw_slice,
296
-                                          .end_frame       = end_frame, },
297
-                                        { .name = NULL}},
298
-    .outputs   = (const AVFilterPad[]) {{ .name            = "default",
299
-                                          .type            = AVMEDIA_TYPE_VIDEO,
300
-                                          .rej_perms       = AV_PERM_WRITE,
301
-                                          .request_frame   = request_frame,
302
-                                          .config_props    = config_props},
303
-                                        { .name = NULL}},
291
+    .inputs    = avfilter_vf_fps_inputs,
292
+    .outputs   = avfilter_vf_fps_outputs,
304 293
     .priv_class = &fps_class,
305 294
 };
... ...
@@ -368,6 +368,26 @@ static int end_frame(AVFilterLink *inlink)
368 368
     return 0;
369 369
 }
370 370
 
371
+static const AVFilterPad avfilter_vf_frei0r_inputs[] = {
372
+    {
373
+        .name         = "default",
374
+        .type         = AVMEDIA_TYPE_VIDEO,
375
+        .draw_slice   = null_draw_slice,
376
+        .config_props = config_input_props,
377
+        .end_frame    = end_frame,
378
+        .min_perms    = AV_PERM_READ
379
+    },
380
+    { NULL }
381
+};
382
+
383
+static const AVFilterPad avfilter_vf_frei0r_outputs[] = {
384
+    {
385
+        .name = "default",
386
+        .type = AVMEDIA_TYPE_VIDEO,
387
+    },
388
+    { NULL }
389
+};
390
+
371 391
 AVFilter avfilter_vf_frei0r = {
372 392
     .name      = "frei0r",
373 393
     .description = NULL_IF_CONFIG_SMALL("Apply a frei0r effect."),
... ...
@@ -378,17 +398,9 @@ AVFilter avfilter_vf_frei0r = {
378 378
 
379 379
     .priv_size = sizeof(Frei0rContext),
380 380
 
381
-    .inputs    = (const AVFilterPad[]) {{ .name             = "default",
382
-                                          .type             = AVMEDIA_TYPE_VIDEO,
383
-                                          .draw_slice       = null_draw_slice,
384
-                                          .config_props     = config_input_props,
385
-                                          .end_frame        = end_frame,
386
-                                          .min_perms        = AV_PERM_READ },
387
-                                        { .name = NULL}},
388
-
389
-    .outputs   = (const AVFilterPad[]) {{ .name             = "default",
390
-                                          .type             = AVMEDIA_TYPE_VIDEO, },
391
-                                        { .name = NULL}},
381
+    .inputs    = avfilter_vf_frei0r_inputs,
382
+
383
+    .outputs   = avfilter_vf_frei0r_outputs,
392 384
 };
393 385
 
394 386
 static av_cold int source_init(AVFilterContext *ctx, const char *args)
... ...
@@ -478,6 +490,16 @@ fail:
478 478
     return ret;
479 479
 }
480 480
 
481
+static const AVFilterPad avfilter_vsrc_frei0r_src_outputs[] = {
482
+    {
483
+        .name          = "default",
484
+        .type          = AVMEDIA_TYPE_VIDEO,
485
+        .request_frame = source_request_frame,
486
+        .config_props  = source_config_props
487
+    },
488
+    { NULL }
489
+};
490
+
481 491
 AVFilter avfilter_vsrc_frei0r_src = {
482 492
     .name        = "frei0r_src",
483 493
     .description = NULL_IF_CONFIG_SMALL("Generate a frei0r source."),
... ...
@@ -490,9 +512,5 @@ AVFilter avfilter_vsrc_frei0r_src = {
490 490
 
491 491
     .inputs    = NULL,
492 492
 
493
-    .outputs   = (const AVFilterPad[]) {{ .name            = "default",
494
-                                          .type            = AVMEDIA_TYPE_VIDEO,
495
-                                          .request_frame   = source_request_frame,
496
-                                          .config_props    = source_config_props },
497
-                                        { .name = NULL}},
493
+    .outputs   = avfilter_vsrc_frei0r_src_outputs,
498 494
 };
... ...
@@ -216,6 +216,27 @@ static int end_frame(AVFilterLink *inlink)
216 216
     return 0;
217 217
 }
218 218
 
219
+static const AVFilterPad avfilter_vf_gradfun_inputs[] = {
220
+    {
221
+        .name         = "default",
222
+        .type         = AVMEDIA_TYPE_VIDEO,
223
+        .config_props = config_input,
224
+        .start_frame  = ff_inplace_start_frame,
225
+        .draw_slice   = null_draw_slice,
226
+        .end_frame    = end_frame,
227
+        .min_perms    = AV_PERM_READ,
228
+    },
229
+    { NULL }
230
+};
231
+
232
+static const AVFilterPad avfilter_vf_gradfun_outputs[] = {
233
+    {
234
+        .name = "default",
235
+        .type = AVMEDIA_TYPE_VIDEO,
236
+    },
237
+    { NULL }
238
+};
239
+
219 240
 AVFilter avfilter_vf_gradfun = {
220 241
     .name          = "gradfun",
221 242
     .description   = NULL_IF_CONFIG_SMALL("Debands video quickly using gradients."),
... ...
@@ -224,15 +245,6 @@ AVFilter avfilter_vf_gradfun = {
224 224
     .uninit        = uninit,
225 225
     .query_formats = query_formats,
226 226
 
227
-    .inputs    = (const AVFilterPad[]) {{ .name             = "default",
228
-                                          .type             = AVMEDIA_TYPE_VIDEO,
229
-                                          .config_props     = config_input,
230
-                                          .start_frame      = ff_inplace_start_frame,
231
-                                          .draw_slice       = null_draw_slice,
232
-                                          .end_frame        = end_frame,
233
-                                          .min_perms        = AV_PERM_READ, },
234
-                                        { .name = NULL}},
235
-    .outputs   = (const AVFilterPad[]) {{ .name             = "default",
236
-                                          .type             = AVMEDIA_TYPE_VIDEO, },
237
-                                        { .name = NULL}},
227
+    .inputs    = avfilter_vf_gradfun_inputs,
228
+    .outputs   = avfilter_vf_gradfun_outputs,
238 229
 };
... ...
@@ -165,20 +165,32 @@ static int draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir)
165 165
     return ff_draw_slice(inlink->dst->outputs[0], y, h, slice_dir);
166 166
 }
167 167
 
168
+static const AVFilterPad avfilter_vf_hflip_inputs[] = {
169
+    {
170
+        .name         = "default",
171
+        .type         = AVMEDIA_TYPE_VIDEO,
172
+        .start_frame  = start_frame,
173
+        .draw_slice   = draw_slice,
174
+        .config_props = config_props,
175
+        .min_perms    = AV_PERM_READ,
176
+    },
177
+    { NULL }
178
+};
179
+
180
+static const AVFilterPad avfilter_vf_hflip_outputs[] = {
181
+    {
182
+        .name = "default",
183
+        .type = AVMEDIA_TYPE_VIDEO,
184
+    },
185
+    { NULL }
186
+};
187
+
168 188
 AVFilter avfilter_vf_hflip = {
169 189
     .name      = "hflip",
170 190
     .description = NULL_IF_CONFIG_SMALL("Horizontally flip the input video."),
171 191
     .priv_size = sizeof(FlipContext),
172 192
     .query_formats = query_formats,
173 193
 
174
-    .inputs    = (const AVFilterPad[]) {{ .name            = "default",
175
-                                          .type            = AVMEDIA_TYPE_VIDEO,
176
-                                          .start_frame     = start_frame,
177
-                                          .draw_slice      = draw_slice,
178
-                                          .config_props    = config_props,
179
-                                          .min_perms       = AV_PERM_READ, },
180
-                                        { .name = NULL}},
181
-    .outputs   = (const AVFilterPad[]) {{ .name            = "default",
182
-                                          .type            = AVMEDIA_TYPE_VIDEO, },
183
-                                        { .name = NULL}},
194
+    .inputs    = avfilter_vf_hflip_inputs,
195
+    .outputs   = avfilter_vf_hflip_outputs,
184 196
 };
... ...
@@ -348,6 +348,26 @@ static int end_frame(AVFilterLink *inlink)
348 348
     return 0;
349 349
 }
350 350
 
351
+static const AVFilterPad avfilter_vf_hqdn3d_inputs[] = {
352
+    {
353
+        .name         = "default",
354
+        .type         = AVMEDIA_TYPE_VIDEO,
355
+        .start_frame  = ff_inplace_start_frame,
356
+        .draw_slice   = null_draw_slice,
357
+        .config_props = config_input,
358
+        .end_frame    = end_frame
359
+    },
360
+    { NULL }
361
+};
362
+
363
+static const AVFilterPad avfilter_vf_hqdn3d_outputs[] = {
364
+    {
365
+        .name = "default",
366
+        .type = AVMEDIA_TYPE_VIDEO
367
+    },
368
+    { NULL }
369
+};
370
+
351 371
 AVFilter avfilter_vf_hqdn3d = {
352 372
     .name          = "hqdn3d",
353 373
     .description   = NULL_IF_CONFIG_SMALL("Apply a High Quality 3D Denoiser."),
... ...
@@ -357,15 +377,7 @@ AVFilter avfilter_vf_hqdn3d = {
357 357
     .uninit        = uninit,
358 358
     .query_formats = query_formats,
359 359
 
360
-    .inputs    = (const AVFilterPad[]) {{ .name             = "default",
361
-                                          .type             = AVMEDIA_TYPE_VIDEO,
362
-                                          .start_frame      = ff_inplace_start_frame,
363
-                                          .draw_slice       = null_draw_slice,
364
-                                          .config_props     = config_input,
365
-                                          .end_frame        = end_frame },
366
-                                        { .name = NULL}},
367
-
368
-    .outputs   = (const AVFilterPad[]) {{ .name             = "default",
369
-                                          .type             = AVMEDIA_TYPE_VIDEO },
370
-                                        { .name = NULL}},
360
+    .inputs    = avfilter_vf_hqdn3d_inputs,
361
+
362
+    .outputs   = avfilter_vf_hqdn3d_outputs,
371 363
 };
... ...
@@ -376,6 +376,25 @@ static int end_frame(AVFilterLink *inlink)
376 376
     return 0;
377 377
 }
378 378
 
379
+static const AVFilterPad avfilter_vf_ocv_inputs[] = {
380
+    {
381
+        .name       = "default",
382
+        .type       = AVMEDIA_TYPE_VIDEO,
383
+        .draw_slice = null_draw_slice,
384
+        .end_frame  = end_frame,
385
+        .min_perms  = AV_PERM_READ
386
+    },
387
+    { NULL }
388
+};
389
+
390
+static const AVFilterPad avfilter_vf_ocv_outputs[] = {
391
+    {
392
+        .name = "default",
393
+        .type = AVMEDIA_TYPE_VIDEO,
394
+    },
395
+    { NULL }
396
+};
397
+
379 398
 AVFilter avfilter_vf_ocv = {
380 399
     .name        = "ocv",
381 400
     .description = NULL_IF_CONFIG_SMALL("Apply transform using libopencv."),
... ...
@@ -386,14 +405,7 @@ AVFilter avfilter_vf_ocv = {
386 386
     .init = init,
387 387
     .uninit = uninit,
388 388
 
389
-    .inputs    = (const AVFilterPad[]) {{ .name             = "default",
390
-                                          .type             = AVMEDIA_TYPE_VIDEO,
391
-                                          .draw_slice       = null_draw_slice,
392
-                                          .end_frame        = end_frame,
393
-                                          .min_perms        = AV_PERM_READ },
394
-                                        { .name = NULL}},
389
+    .inputs    = avfilter_vf_ocv_inputs,
395 390
 
396
-    .outputs   = (const AVFilterPad[]) {{ .name             = "default",
397
-                                          .type             = AVMEDIA_TYPE_VIDEO, },
398
-                                        { .name = NULL}},
391
+    .outputs   = avfilter_vf_ocv_outputs,
399 392
 };
... ...
@@ -26,20 +26,32 @@
26 26
 #include "internal.h"
27 27
 #include "video.h"
28 28
 
29
+static const AVFilterPad avfilter_vf_null_inputs[] = {
30
+    {
31
+        .name             = "default",
32
+        .type             = AVMEDIA_TYPE_VIDEO,
33
+        .get_video_buffer = ff_null_get_video_buffer,
34
+        .start_frame      = ff_null_start_frame,
35
+        .end_frame        = ff_null_end_frame
36
+    },
37
+    { NULL }
38
+};
39
+
40
+static const AVFilterPad avfilter_vf_null_outputs[] = {
41
+    {
42
+        .name = "default",
43
+        .type = AVMEDIA_TYPE_VIDEO,
44
+    },
45
+    { NULL }
46
+};
47
+
29 48
 AVFilter avfilter_vf_null = {
30 49
     .name      = "null",
31 50
     .description = NULL_IF_CONFIG_SMALL("Pass the source unchanged to the output."),
32 51
 
33 52
     .priv_size = 0,
34 53
 
35
-    .inputs    = (const AVFilterPad[]) {{ .name             = "default",
36
-                                          .type             = AVMEDIA_TYPE_VIDEO,
37
-                                          .get_video_buffer = ff_null_get_video_buffer,
38
-                                          .start_frame      = ff_null_start_frame,
39
-                                          .end_frame        = ff_null_end_frame },
40
-                                        { .name = NULL}},
54
+    .inputs    = avfilter_vf_null_inputs,
41 55
 
42
-    .outputs   = (const AVFilterPad[]) {{ .name             = "default",
43
-                                          .type             = AVMEDIA_TYPE_VIDEO, },
44
-                                        { .name = NULL}},
56
+    .outputs   = avfilter_vf_null_outputs,
45 57
 };
... ...
@@ -607,6 +607,40 @@ static int null_draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir)
607 607
     return 0;
608 608
 }
609 609
 
610
+static const AVFilterPad avfilter_vf_overlay_inputs[] = {
611
+    {
612
+        .name         = "main",
613
+        .type         = AVMEDIA_TYPE_VIDEO,
614
+        .get_video_buffer= get_video_buffer,
615
+        .config_props = config_input_main,
616
+        .start_frame  = start_frame_main,
617
+        .draw_slice   = draw_slice_main,
618
+        .end_frame    = end_frame_main,
619
+        .min_perms    = AV_PERM_READ | AV_PERM_WRITE | AV_PERM_PRESERVE,
620
+    },
621
+    {
622
+        .name         = "overlay",
623
+        .type         = AVMEDIA_TYPE_VIDEO,
624
+        .config_props = config_input_overlay,
625
+        .start_frame  = start_frame_over,
626
+        .draw_slice   = null_draw_slice,
627
+        .end_frame    = end_frame_over,
628
+        .min_perms    = AV_PERM_READ | AV_PERM_PRESERVE,
629
+    },
630
+    { NULL }
631
+};
632
+
633
+static const AVFilterPad avfilter_vf_overlay_outputs[] = {
634
+    {
635
+        .name          = "default",
636
+        .type          = AVMEDIA_TYPE_VIDEO,
637
+        .rej_perms     = AV_PERM_WRITE,
638
+        .config_props  = config_output,
639
+        .request_frame = request_frame,
640
+    },
641
+    { NULL }
642
+};
643
+
610 644
 AVFilter avfilter_vf_overlay = {
611 645
     .name      = "overlay",
612 646
     .description = NULL_IF_CONFIG_SMALL("Overlay a video source on top of the input."),
... ...
@@ -618,27 +652,7 @@ AVFilter avfilter_vf_overlay = {
618 618
 
619 619
     .query_formats = query_formats,
620 620
 
621
-    .inputs    = (const AVFilterPad[]) {{ .name            = "main",
622
-                                          .type            = AVMEDIA_TYPE_VIDEO,
623
-                                          .get_video_buffer= get_video_buffer,
624
-                                          .config_props    = config_input_main,
625
-                                          .start_frame     = start_frame_main,
626
-                                          .draw_slice      = draw_slice_main,
627
-                                          .end_frame       = end_frame_main,
628
-                                          .min_perms       = AV_PERM_READ | AV_PERM_WRITE | AV_PERM_PRESERVE },
629
-                                        { .name            = "overlay",
630
-                                          .type            = AVMEDIA_TYPE_VIDEO,
631
-                                          .config_props    = config_input_overlay,
632
-                                          .start_frame     = start_frame_over,
633
-                                          .draw_slice      = null_draw_slice,
634
-                                          .end_frame       = end_frame_over,
635
-                                          .min_perms       = AV_PERM_READ | AV_PERM_PRESERVE },
636
-                                        { .name = NULL}},
637
-    .outputs   = (const AVFilterPad[]) {{ .name            = "default",
638
-                                          .type            = AVMEDIA_TYPE_VIDEO,
639
-                                          .rej_perms       = AV_PERM_WRITE,
640
-                                          .config_props    = config_output,
641
-                                          .request_frame   = request_frame, },
642
-                                        { .name = NULL}},
621
+    .inputs    = avfilter_vf_overlay_inputs,
622
+    .outputs   = avfilter_vf_overlay_outputs,
643 623
     .priv_class = &overlay_class,
644 624
 };
... ...
@@ -388,6 +388,27 @@ static int draw_slice(AVFilterLink *link, int y, int h, int slice_dir)
388 388
     return draw_send_bar_slice(link, y, h, slice_dir, -1);
389 389
 }
390 390
 
391
+static const AVFilterPad avfilter_vf_pad_inputs[] = {
392
+    {
393
+        .name             = "default",
394
+        .type             = AVMEDIA_TYPE_VIDEO,
395
+        .config_props     = config_input,
396
+        .get_video_buffer = get_video_buffer,
397
+        .start_frame      = start_frame,
398
+        .draw_slice       = draw_slice,
399
+    },
400
+    { NULL }
401
+};
402
+
403
+static const AVFilterPad avfilter_vf_pad_outputs[] = {
404
+    {
405
+        .name         = "default",
406
+        .type         = AVMEDIA_TYPE_VIDEO,
407
+        .config_props = config_output,
408
+    },
409
+    { NULL }
410
+};
411
+
391 412
 AVFilter avfilter_vf_pad = {
392 413
     .name          = "pad",
393 414
     .description   = NULL_IF_CONFIG_SMALL("Pad input image to width:height[:x:y[:color]] (default x and y: 0, default color: black)."),
... ...
@@ -396,16 +417,7 @@ AVFilter avfilter_vf_pad = {
396 396
     .init          = init,
397 397
     .query_formats = query_formats,
398 398
 
399
-    .inputs    = (const AVFilterPad[]) {{ .name             = "default",
400
-                                          .type             = AVMEDIA_TYPE_VIDEO,
401
-                                          .config_props     = config_input,
402
-                                          .get_video_buffer = get_video_buffer,
403
-                                          .start_frame      = start_frame,
404
-                                          .draw_slice       = draw_slice, },
405
-                                        { .name = NULL}},
406
-
407
-    .outputs   = (const AVFilterPad[]) {{ .name             = "default",
408
-                                          .type             = AVMEDIA_TYPE_VIDEO,
409
-                                          .config_props     = config_output, },
410
-                                        { .name = NULL}},
399
+    .inputs    = avfilter_vf_pad_inputs,
400
+
401
+    .outputs   = avfilter_vf_pad_outputs,
411 402
 };
... ...
@@ -126,6 +126,26 @@ static int draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir)
126 126
     return ff_draw_slice(inlink->dst->outputs[0], y, h, slice_dir);
127 127
 }
128 128
 
129
+static const AVFilterPad avfilter_vf_pixdesctest_inputs[] = {
130
+    {
131
+        .name         = "default",
132
+        .type         = AVMEDIA_TYPE_VIDEO,
133
+        .start_frame  = start_frame,
134
+        .draw_slice   = draw_slice,
135
+        .config_props = config_props,
136
+        .min_perms    = AV_PERM_READ,
137
+    },
138
+    { NULL }
139
+};
140
+
141
+static const AVFilterPad avfilter_vf_pixdesctest_outputs[] = {
142
+    {
143
+        .name = "default",
144
+        .type = AVMEDIA_TYPE_VIDEO,
145
+    },
146
+    { NULL }
147
+};
148
+
129 149
 AVFilter avfilter_vf_pixdesctest = {
130 150
     .name        = "pixdesctest",
131 151
     .description = NULL_IF_CONFIG_SMALL("Test pixel format definitions."),
... ...
@@ -133,15 +153,7 @@ AVFilter avfilter_vf_pixdesctest = {
133 133
     .priv_size = sizeof(PixdescTestContext),
134 134
     .uninit    = uninit,
135 135
 
136
-    .inputs    = (const AVFilterPad[]) {{ .name            = "default",
137
-                                          .type            = AVMEDIA_TYPE_VIDEO,
138
-                                          .start_frame     = start_frame,
139
-                                          .draw_slice      = draw_slice,
140
-                                          .config_props    = config_props,
141
-                                          .min_perms       = AV_PERM_READ, },
142
-                                        { .name = NULL}},
143
-
144
-    .outputs   = (const AVFilterPad[]) {{ .name            = "default",
145
-                                          .type            = AVMEDIA_TYPE_VIDEO, },
146
-                                        { .name = NULL}},
136
+    .inputs    = avfilter_vf_pixdesctest_inputs,
137
+
138
+    .outputs   = avfilter_vf_pixdesctest_outputs,
147 139
 };
... ...
@@ -395,6 +395,26 @@ static int draw_slice(AVFilterLink *link, int y, int h, int slice_dir)
395 395
     return ret;
396 396
 }
397 397
 
398
+static const AVFilterPad avfilter_vf_scale_inputs[] = {
399
+    {
400
+        .name        = "default",
401
+        .type        = AVMEDIA_TYPE_VIDEO,
402
+        .start_frame = start_frame,
403
+        .draw_slice  = draw_slice,
404
+        .min_perms   = AV_PERM_READ,
405
+    },
406
+    { NULL }
407
+};
408
+
409
+static const AVFilterPad avfilter_vf_scale_outputs[] = {
410
+    {
411
+        .name         = "default",
412
+        .type         = AVMEDIA_TYPE_VIDEO,
413
+        .config_props = config_props,
414
+    },
415
+    { NULL }
416
+};
417
+
398 418
 AVFilter avfilter_vf_scale = {
399 419
     .name      = "scale",
400 420
     .description = NULL_IF_CONFIG_SMALL("Scale the input video to width:height size and/or convert the image format."),
... ...
@@ -406,14 +426,6 @@ AVFilter avfilter_vf_scale = {
406 406
 
407 407
     .priv_size = sizeof(ScaleContext),
408 408
 
409
-    .inputs    = (const AVFilterPad[]) {{ .name             = "default",
410
-                                          .type             = AVMEDIA_TYPE_VIDEO,
411
-                                          .start_frame      = start_frame,
412
-                                          .draw_slice       = draw_slice,
413
-                                          .min_perms        = AV_PERM_READ, },
414
-                                        { .name = NULL}},
415
-    .outputs   = (const AVFilterPad[]) {{ .name             = "default",
416
-                                          .type             = AVMEDIA_TYPE_VIDEO,
417
-                                          .config_props     = config_props, },
418
-                                        { .name = NULL}},
409
+    .inputs    = avfilter_vf_scale_inputs,
410
+    .outputs   = avfilter_vf_scale_outputs,
419 411
 };
... ...
@@ -417,6 +417,30 @@ static int query_formats(AVFilterContext *ctx)
417 417
     return 0;
418 418
 }
419 419
 
420
+static const AVFilterPad avfilter_vf_select_inputs[] = {
421
+    {
422
+        .name             = "default",
423
+        .type             = AVMEDIA_TYPE_VIDEO,
424
+        .get_video_buffer = ff_null_get_video_buffer,
425
+        .min_perms        = AV_PERM_PRESERVE,
426
+        .config_props     = config_input,
427
+        .start_frame      = start_frame,
428
+        .draw_slice       = draw_slice,
429
+        .end_frame        = end_frame
430
+    },
431
+    { NULL }
432
+};
433
+
434
+static const AVFilterPad avfilter_vf_select_outputs[] = {
435
+    {
436
+        .name          = "default",
437
+        .type          = AVMEDIA_TYPE_VIDEO,
438
+        .poll_frame    = poll_frame,
439
+        .request_frame = request_frame,
440
+    },
441
+    { NULL }
442
+};
443
+
420 444
 AVFilter avfilter_vf_select = {
421 445
     .name      = "select",
422 446
     .description = NULL_IF_CONFIG_SMALL("Select frames to pass in output."),
... ...
@@ -426,18 +450,6 @@ AVFilter avfilter_vf_select = {
426 426
 
427 427
     .priv_size = sizeof(SelectContext),
428 428
 
429
-    .inputs    = (const AVFilterPad[]) {{ .name             = "default",
430
-                                          .type             = AVMEDIA_TYPE_VIDEO,
431
-                                          .get_video_buffer = ff_null_get_video_buffer,
432
-                                          .min_perms        = AV_PERM_PRESERVE,
433
-                                          .config_props     = config_input,
434
-                                          .start_frame      = start_frame,
435
-                                          .draw_slice       = draw_slice,
436
-                                          .end_frame        = end_frame },
437
-                                        { .name = NULL }},
438
-    .outputs   = (const AVFilterPad[]) {{ .name             = "default",
439
-                                          .type             = AVMEDIA_TYPE_VIDEO,
440
-                                          .poll_frame       = poll_frame,
441
-                                          .request_frame    = request_frame, },
442
-                                        { .name = NULL}},
429
+    .inputs    = avfilter_vf_select_inputs,
430
+    .outputs   = avfilter_vf_select_outputs,
443 431
 };
... ...
@@ -85,6 +85,26 @@ static int end_frame(AVFilterLink *inlink)
85 85
     return ff_end_frame(inlink->dst->outputs[0]);
86 86
 }
87 87
 
88
+static const AVFilterPad avfilter_vf_showinfo_inputs[] = {
89
+    {
90
+        .name             = "default",
91
+        .type             = AVMEDIA_TYPE_VIDEO,
92
+        .get_video_buffer = ff_null_get_video_buffer,
93
+        .start_frame      = ff_null_start_frame,
94
+        .end_frame        = end_frame,
95
+        .min_perms        = AV_PERM_READ,
96
+    },
97
+    { NULL }
98
+};
99
+
100
+static const AVFilterPad avfilter_vf_showinfo_outputs[] = {
101
+    {
102
+        .name = "default",
103
+        .type = AVMEDIA_TYPE_VIDEO
104
+    },
105
+    { NULL }
106
+};
107
+
88 108
 AVFilter avfilter_vf_showinfo = {
89 109
     .name        = "showinfo",
90 110
     .description = NULL_IF_CONFIG_SMALL("Show textual information for each video frame."),
... ...
@@ -92,15 +112,7 @@ AVFilter avfilter_vf_showinfo = {
92 92
     .priv_size = sizeof(ShowInfoContext),
93 93
     .init      = init,
94 94
 
95
-    .inputs    = (const AVFilterPad[]) {{ .name = "default",
96
-                                          .type             = AVMEDIA_TYPE_VIDEO,
97
-                                          .get_video_buffer = ff_null_get_video_buffer,
98
-                                          .start_frame      = ff_null_start_frame,
99
-                                          .end_frame        = end_frame,
100
-                                          .min_perms        = AV_PERM_READ, },
101
-                                        { .name = NULL}},
102
-
103
-    .outputs   = (const AVFilterPad[]) {{ .name             = "default",
104
-                                          .type             = AVMEDIA_TYPE_VIDEO },
105
-                                        { .name = NULL}},
95
+    .inputs    = avfilter_vf_showinfo_inputs,
96
+
97
+    .outputs   = avfilter_vf_showinfo_outputs,
106 98
 };
... ...
@@ -106,6 +106,27 @@ static int draw_slice(AVFilterLink *link, int y, int h, int slice_dir)
106 106
     return 0;
107 107
 }
108 108
 
109
+static const AVFilterPad avfilter_vf_slicify_inputs[] = {
110
+    {
111
+        .name             = "default",
112
+        .type             = AVMEDIA_TYPE_VIDEO,
113
+        .get_video_buffer = ff_null_get_video_buffer,
114
+        .start_frame      = start_frame,
115
+        .draw_slice       = draw_slice,
116
+        .config_props     = config_props,
117
+        .end_frame        = ff_null_end_frame,
118
+    },
119
+    { NULL }
120
+};
121
+
122
+static const AVFilterPad avfilter_vf_slicify_outputs[] = {
123
+    {
124
+        .name = "default",
125
+        .type = AVMEDIA_TYPE_VIDEO,
126
+    },
127
+    { NULL }
128
+};
129
+
109 130
 AVFilter avfilter_vf_slicify = {
110 131
     .name      = "slicify",
111 132
     .description = NULL_IF_CONFIG_SMALL("Pass the images of input video on to next video filter as multiple slices."),
... ...
@@ -114,15 +135,6 @@ AVFilter avfilter_vf_slicify = {
114 114
 
115 115
     .priv_size = sizeof(SliceContext),
116 116
 
117
-    .inputs    = (const AVFilterPad[]) {{ .name             = "default",
118
-                                          .type             = AVMEDIA_TYPE_VIDEO,
119
-                                          .get_video_buffer = ff_null_get_video_buffer,
120
-                                          .start_frame      = start_frame,
121
-                                          .draw_slice       = draw_slice,
122
-                                          .config_props     = config_props,
123
-                                          .end_frame        = ff_null_end_frame, },
124
-                                        { .name = NULL}},
125
-    .outputs   = (const AVFilterPad[]) {{ .name            = "default",
126
-                                          .type            = AVMEDIA_TYPE_VIDEO, },
127
-                                        { .name = NULL}},
117
+    .inputs    = avfilter_vf_slicify_inputs,
118
+    .outputs   = avfilter_vf_slicify_outputs,
128 119
 };
... ...
@@ -266,6 +266,28 @@ static int draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir)
266 266
     return trans->passthrough ? ff_null_draw_slice(inlink, y, h, slice_dir) : 0;
267 267
 }
268 268
 
269
+static const AVFilterPad avfilter_vf_transpose_inputs[] = {
270
+    {
271
+        .name        = "default",
272
+        .type        = AVMEDIA_TYPE_VIDEO,
273
+        .get_video_buffer= get_video_buffer,
274
+        .start_frame = start_frame,
275
+        .draw_slice  = draw_slice,
276
+        .end_frame   = end_frame,
277
+        .min_perms   = AV_PERM_READ,
278
+    },
279
+    { NULL }
280
+};
281
+
282
+static const AVFilterPad avfilter_vf_transpose_outputs[] = {
283
+    {
284
+        .name         = "default",
285
+        .config_props = config_props_output,
286
+        .type         = AVMEDIA_TYPE_VIDEO,
287
+    },
288
+    { NULL }
289
+};
290
+
269 291
 AVFilter avfilter_vf_transpose = {
270 292
     .name      = "transpose",
271 293
     .description = NULL_IF_CONFIG_SMALL("Transpose input video."),
... ...
@@ -275,17 +297,7 @@ AVFilter avfilter_vf_transpose = {
275 275
 
276 276
     .query_formats = query_formats,
277 277
 
278
-    .inputs    = (const AVFilterPad[]) {{ .name            = "default",
279
-                                          .type            = AVMEDIA_TYPE_VIDEO,
280
-                                          .get_video_buffer= get_video_buffer,
281
-                                          .start_frame     = start_frame,
282
-                                          .draw_slice      = draw_slice,
283
-                                          .end_frame       = end_frame,
284
-                                          .min_perms       = AV_PERM_READ, },
285
-                                        { .name = NULL}},
286
-    .outputs   = (const AVFilterPad[]) {{ .name            = "default",
287
-                                          .config_props    = config_props_output,
288
-                                          .type            = AVMEDIA_TYPE_VIDEO, },
289
-                                        { .name = NULL}},
278
+    .inputs    = avfilter_vf_transpose_inputs,
279
+    .outputs   = avfilter_vf_transpose_outputs,
290 280
     .priv_class = &transpose_class,
291 281
 };
... ...
@@ -237,6 +237,26 @@ static int draw_slice(AVFilterLink *link, int y, int h, int slice_dir)
237 237
     return 0;
238 238
 }
239 239
 
240
+static const AVFilterPad avfilter_vf_unsharp_inputs[] = {
241
+    {
242
+        .name         = "default",
243
+        .type         = AVMEDIA_TYPE_VIDEO,
244
+        .draw_slice   = draw_slice,
245
+        .end_frame    = end_frame,
246
+        .config_props = config_props,
247
+        .min_perms    = AV_PERM_READ,
248
+    },
249
+    { NULL }
250
+};
251
+
252
+static const AVFilterPad avfilter_vf_unsharp_outputs[] = {
253
+    {
254
+        .name = "default",
255
+        .type = AVMEDIA_TYPE_VIDEO,
256
+    },
257
+    { NULL }
258
+};
259
+
240 260
 AVFilter avfilter_vf_unsharp = {
241 261
     .name      = "unsharp",
242 262
     .description = NULL_IF_CONFIG_SMALL("Sharpen or blur the input video."),
... ...
@@ -247,15 +267,7 @@ AVFilter avfilter_vf_unsharp = {
247 247
     .uninit = uninit,
248 248
     .query_formats = query_formats,
249 249
 
250
-    .inputs    = (const AVFilterPad[]) {{ .name             = "default",
251
-                                          .type             = AVMEDIA_TYPE_VIDEO,
252
-                                          .draw_slice       = draw_slice,
253
-                                          .end_frame        = end_frame,
254
-                                          .config_props     = config_props,
255
-                                          .min_perms        = AV_PERM_READ, },
256
-                                        { .name = NULL}},
257
-
258
-    .outputs   = (const AVFilterPad[]) {{ .name             = "default",
259
-                                          .type             = AVMEDIA_TYPE_VIDEO, },
260
-                                        { .name = NULL}},
250
+    .inputs    = avfilter_vf_unsharp_inputs,
251
+
252
+    .outputs   = avfilter_vf_unsharp_outputs,
261 253
 };
... ...
@@ -96,20 +96,32 @@ static int draw_slice(AVFilterLink *link, int y, int h, int slice_dir)
96 96
     return ff_draw_slice(ctx->outputs[0], link->h - (y+h), h, -1 * slice_dir);
97 97
 }
98 98
 
99
+static const AVFilterPad avfilter_vf_vflip_inputs[] = {
100
+    {
101
+        .name             = "default",
102
+        .type             = AVMEDIA_TYPE_VIDEO,
103
+        .get_video_buffer = get_video_buffer,
104
+        .start_frame      = start_frame,
105
+        .draw_slice       = draw_slice,
106
+        .config_props     = config_input,
107
+    },
108
+    { NULL }
109
+};
110
+
111
+static const AVFilterPad avfilter_vf_vflip_outputs[] = {
112
+    {
113
+        .name = "default",
114
+        .type = AVMEDIA_TYPE_VIDEO,
115
+    },
116
+    { NULL }
117
+};
118
+
99 119
 AVFilter avfilter_vf_vflip = {
100 120
     .name      = "vflip",
101 121
     .description = NULL_IF_CONFIG_SMALL("Flip the input video vertically."),
102 122
 
103 123
     .priv_size = sizeof(FlipContext),
104 124
 
105
-    .inputs    = (const AVFilterPad[]) {{ .name             = "default",
106
-                                          .type             = AVMEDIA_TYPE_VIDEO,
107
-                                          .get_video_buffer = get_video_buffer,
108
-                                          .start_frame      = start_frame,
109
-                                          .draw_slice       = draw_slice,
110
-                                          .config_props     = config_input, },
111
-                                        { .name = NULL}},
112
-    .outputs   = (const AVFilterPad[]) {{ .name             = "default",
113
-                                          .type             = AVMEDIA_TYPE_VIDEO, },
114
-                                        { .name = NULL}},
125
+    .inputs    = avfilter_vf_vflip_inputs,
126
+    .outputs   = avfilter_vf_vflip_outputs,
115 127
 };
... ...
@@ -441,6 +441,29 @@ static int config_props(AVFilterLink *link)
441 441
     return 0;
442 442
 }
443 443
 
444
+static const AVFilterPad avfilter_vf_yadif_inputs[] = {
445
+    {
446
+        .name             = "default",
447
+        .type             = AVMEDIA_TYPE_VIDEO,
448
+        .start_frame      = start_frame,
449
+        .draw_slice       = null_draw_slice,
450
+        .end_frame        = end_frame,
451
+        .min_perms        = AV_PERM_PRESERVE,
452
+    },
453
+    { NULL }
454
+};
455
+
456
+static const AVFilterPad avfilter_vf_yadif_outputs[] = {
457
+    {
458
+        .name          = "default",
459
+        .type          = AVMEDIA_TYPE_VIDEO,
460
+        .poll_frame    = poll_frame,
461
+        .request_frame = request_frame,
462
+        .config_props  = config_props,
463
+    },
464
+    { NULL }
465
+};
466
+
444 467
 AVFilter avfilter_vf_yadif = {
445 468
     .name          = "yadif",
446 469
     .description   = NULL_IF_CONFIG_SMALL("Deinterlace the input image."),
... ...
@@ -450,18 +473,7 @@ AVFilter avfilter_vf_yadif = {
450 450
     .uninit        = uninit,
451 451
     .query_formats = query_formats,
452 452
 
453
-    .inputs    = (const AVFilterPad[]) {{ .name             = "default",
454
-                                          .type             = AVMEDIA_TYPE_VIDEO,
455
-                                          .start_frame      = start_frame,
456
-                                          .draw_slice       = null_draw_slice,
457
-                                          .end_frame        = end_frame,
458
-                                          .min_perms        = AV_PERM_PRESERVE, },
459
-                                        { .name = NULL}},
460
-
461
-    .outputs   = (const AVFilterPad[]) {{ .name             = "default",
462
-                                          .type             = AVMEDIA_TYPE_VIDEO,
463
-                                          .poll_frame       = poll_frame,
464
-                                          .request_frame    = request_frame,
465
-                                          .config_props     = config_props, },
466
-                                        { .name = NULL}},
453
+    .inputs    = avfilter_vf_yadif_inputs,
454
+
455
+    .outputs   = avfilter_vf_yadif_outputs,
467 456
 };
... ...
@@ -30,20 +30,22 @@ static int end_frame(AVFilterLink *link)
30 30
     return 0;
31 31
 }
32 32
 
33
+static const AVFilterPad avfilter_vsink_nullsink_inputs[] = {
34
+    {
35
+        .name        = "default",
36
+        .type        = AVMEDIA_TYPE_VIDEO,
37
+        .start_frame = start_frame,
38
+        .end_frame   = end_frame,
39
+    },
40
+    { NULL },
41
+};
42
+
33 43
 AVFilter avfilter_vsink_nullsink = {
34 44
     .name        = "nullsink",
35 45
     .description = NULL_IF_CONFIG_SMALL("Do absolutely nothing with the input video."),
36 46
 
37 47
     .priv_size = 0,
38 48
 
39
-    .inputs    = (const AVFilterPad[]) {
40
-        {
41
-            .name            = "default",
42
-            .type            = AVMEDIA_TYPE_VIDEO,
43
-            .start_frame     = start_frame,
44
-            .end_frame       = end_frame,
45
-        },
46
-        { .name = NULL},
47
-    },
49
+    .inputs    = avfilter_vsink_nullsink_inputs,
48 50
     .outputs   = NULL,
49 51
 };
... ...
@@ -525,6 +525,16 @@ static int test_query_formats(AVFilterContext *ctx)
525 525
     return 0;
526 526
 }
527 527
 
528
+static const AVFilterPad avfilter_vsrc_testsrc_outputs[] = {
529
+    {
530
+        .name          = "default",
531
+        .type          = AVMEDIA_TYPE_VIDEO,
532
+        .request_frame = request_frame,
533
+        .config_props  = config_props,
534
+    },
535
+    { NULL }
536
+};
537
+
528 538
 AVFilter avfilter_vsrc_testsrc = {
529 539
     .name      = "testsrc",
530 540
     .description = NULL_IF_CONFIG_SMALL("Generate test pattern."),
... ...
@@ -535,12 +545,7 @@ AVFilter avfilter_vsrc_testsrc = {
535 535
     .query_formats   = test_query_formats,
536 536
 
537 537
     .inputs    = NULL,
538
-
539
-    .outputs   = (const AVFilterPad[]) {{ .name = "default",
540
-                                          .type = AVMEDIA_TYPE_VIDEO,
541
-                                          .request_frame = request_frame,
542
-                                          .config_props  = config_props, },
543
-                                        { .name = NULL }},
538
+    .outputs   = avfilter_vsrc_testsrc_outputs,
544 539
     .priv_class = &testsrc_class,
545 540
 };
546 541
 
... ...
@@ -639,6 +644,16 @@ static int rgbtest_config_props(AVFilterLink *outlink)
639 639
     return config_props(outlink);
640 640
 }
641 641
 
642
+static const AVFilterPad avfilter_vsrc_rgbtestsrc_outputs[] = {
643
+    {
644
+        .name          = "default",
645
+        .type          = AVMEDIA_TYPE_VIDEO,
646
+        .request_frame = request_frame,
647
+        .config_props  = rgbtest_config_props,
648
+    },
649
+    { NULL }
650
+};
651
+
642 652
 AVFilter avfilter_vsrc_rgbtestsrc = {
643 653
     .name      = "rgbtestsrc",
644 654
     .description = NULL_IF_CONFIG_SMALL("Generate RGB test pattern."),
... ...
@@ -650,11 +665,7 @@ AVFilter avfilter_vsrc_rgbtestsrc = {
650 650
 
651 651
     .inputs    = NULL,
652 652
 
653
-    .outputs   = (const AVFilterPad[]) {{ .name = "default",
654
-                                          .type = AVMEDIA_TYPE_VIDEO,
655
-                                          .request_frame = request_frame,
656
-                                          .config_props  = rgbtest_config_props, },
657
-                                        { .name = NULL }},
653
+    .outputs   = avfilter_vsrc_rgbtestsrc_outputs,
658 654
     .priv_class = &rgbtestsrc_class,
659 655
 };
660 656
 
... ...
@@ -951,6 +951,9 @@ static int mxf_get_sorted_table_segments(MXFContext *mxf, int *nb_sorted_segment
951 951
         if (mxf->metadata_sets[i]->type == IndexTableSegment)
952 952
             nb_segments++;
953 953
 
954
+    if (!nb_segments)
955
+        return AVERROR_INVALIDDATA;
956
+
954 957
     if (!(unsorted_segments = av_calloc(nb_segments, sizeof(*unsorted_segments))) ||
955 958
         !(*sorted_segments  = av_calloc(nb_segments, sizeof(**sorted_segments)))) {
956 959
         av_freep(sorted_segments);
... ...
@@ -25,7 +25,7 @@ $(TESTOBJS): CPPFLAGS += -DTEST
25 25
 
26 26
 $(SUBDIR)$(LIBNAME): $(OBJS)
27 27
 	$(RM) $@
28
-	$(AR) $(ARFLAGS) $(AR_O) $^ $(EXTRAOBJS)
28
+	$(AR) $(ARFLAGS) $(AR_O) $^
29 29
 	$(RANLIB) $@
30 30
 
31 31
 install-headers: install-lib$(NAME)-headers install-lib$(NAME)-pkgconfig
... ...
@@ -45,7 +45,7 @@ $(SUBDIR)$(SLIBNAME): $(SUBDIR)$(SLIBNAME_WITH_MAJOR)
45 45
 
46 46
 $(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) $(SUBDIR)lib$(NAME).ver
47 47
 	$(SLIB_CREATE_DEF_CMD)
48
-	$$(LD) $(SHFLAGS) $(LDFLAGS) $$(LD_O) $$(filter %.o,$$^) $(FFEXTRALIBS) $(EXTRAOBJS)
48
+	$$(LD) $(SHFLAGS) $(LDFLAGS) $$(LD_O) $$(filter %.o,$$^) $(FFEXTRALIBS)
49 49
 	$(SLIB_EXTRA_CMD)
50 50
 
51 51
 ifdef SUBDIR
... ...
@@ -79,6 +79,9 @@ fate-vsynth%-h261:               ENCOPTS = -qscale 11
79 79
 FATE_VCODEC += h263
80 80
 fate-vsynth%-h263:               ENCOPTS = -qscale 10
81 81
 
82
+FATE_VCODEC += h263-obmc
83
+fate-vsynth%-h263-obmc:          ENCOPTS = -qscale 10 -obmc 1
84
+
82 85
 FATE_VCODEC += h263p
83 86
 fate-vsynth%-h263p:              ENCOPTS = -qscale 2 -flags +aic -umv 1 -aiv 1 -ps 300
84 87
 
85 88
new file mode 100644
... ...
@@ -0,0 +1,4 @@
0
+bdd8f9cafa39df97f2e395110f4419e0 *tests/data/fate/vsynth1-h263-obmc.avi
1
+657328 tests/data/fate/vsynth1-h263-obmc.avi
2
+844f7ee27fa122e199fe20987b41a15c *tests/data/fate/vsynth1-h263-obmc.out.rawvideo
3
+stddev:    8.16 PSNR: 29.89 MAXDIFF:  113 bytes:  7603200/  7603200
0 4
new file mode 100644
... ...
@@ -0,0 +1,4 @@
0
+482d48074d94ed72b0c7057b9c129b45 *tests/data/fate/vsynth2-h263-obmc.avi
1
+154738 tests/data/fate/vsynth2-h263-obmc.avi
2
+588d992d9d8096da8bdc5027268da914 *tests/data/fate/vsynth2-h263-obmc.out.rawvideo
3
+stddev:    5.39 PSNR: 33.49 MAXDIFF:   82 bytes:  7603200/  7603200