History

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

Michael Niedermayer committed 14 years ago

Commit 526cb362 parents a75dd13 4436f2560 files · +1158 −564Browse files

Unified · Split

60 files
  1. ffmpeg_opt.c +1 −1
  2. libavcodec/flashsv.c +14 −5
  3. libavcodec/ivi_common.c +2 −2
  4. libavcodec/ivi_dsp.c +3 −2
  5. libavcodec/ivi_dsp.h +2 −4
  6. libavcodec/vc1.c +5 −0
  7. libavcodec/vc1dec.c +0 −4
  8. libavfilter/af_aformat.c +19 −7
  9. libavfilter/af_amix.c +11 −5
  10. libavfilter/af_anull.c +19 −7
  11. libavfilter/af_asyncts.c +21 −9
  12. libavfilter/af_channelmap.c +22 −10
  13. libavfilter/af_channelsplit.c +10 −4
  14. libavfilter/af_join.c +11 −5
  15. libavfilter/af_resample.c +22 −10
  16. libavfilter/asink_anullsink.c +10 −8
  17. libavfilter/asrc_anullsrc.c +11 −5
  18. libavfilter/buffersink.c +24 −12
  19. libavfilter/buffersrc.c +24 −12
  20. libavfilter/f_setpts.c +21 −9
  21. libavfilter/f_settb.c +22 −14
  22. libavfilter/fifo.c +46 −22
  23. libavfilter/split.c +24 −12
  24. libavfilter/vf_aspect.c +46 −22
  25. libavfilter/vf_blackframe.c +23 −11
  26. libavfilter/vf_boxblur.c +22 −10
  27. libavfilter/vf_copy.c +22 −10
  28. libavfilter/vf_crop.c +24 −12
  29. libavfilter/vf_cropdetect.c +23 −11
  30. libavfilter/vf_delogo.c +23 −11
  31. libavfilter/vf_drawbox.c +24 −12
  32. libavfilter/vf_drawtext.c +25 −13
  33. libavfilter/vf_fade.c +24 −12
  34. libavfilter/vf_fieldorder.c +24 −12
  35. libavfilter/vf_format.c +44 −20
  36. libavfilter/vf_fps.c +25 −13
  37. libavfilter/vf_frei0r.c +34 −16
  38. libavfilter/vf_gradfun.c +23 −11
  39. libavfilter/vf_hflip.c +22 −10
  40. libavfilter/vf_hqdn3d.c +23 −11
  41. libavfilter/vf_libopencv.c +21 −9
  42. libavfilter/vf_null.c +21 −9
  43. libavfilter/vf_overlay.c +36 −22
  44. libavfilter/vf_pad.c +24 −12
  45. libavfilter/vf_pixdesctest.c +23 −11
  46. libavfilter/vf_scale.c +22 −10
  47. libavfilter/vf_select.c +26 −14
  48. libavfilter/vf_showinfo.c +23 −11
  49. libavfilter/vf_slicify.c +23 −11
  50. libavfilter/vf_transpose.c +24 −12
  51. libavfilter/vf_unsharp.c +23 −11
  52. libavfilter/vf_vflip.c +22 −10
  53. libavfilter/vf_yadif.c +26 −14
  54. libavfilter/vsink_nullsink.c +11 −9
  55. libavfilter/vsrc_testsrc.c +22 −11
  56. libavformat/mxfdec.c +3 −0
  57. library.mak +2 −2
  58. tests/fate/vcodec.mak +3 −0
  59. tests/ref/fate/vsynth1-h263-obmc +4 −0
  60. tests/ref/fate/vsynth2-h263-obmc +4 −0
ffmpeg_opt.c+1−1
@@ -2160,7 +2160,7 @@ void show_help_default(const char *opt, const char *arg) · 2159 unmodified lines
21602160 const int per_file = OPT_SPEC | OPT_OFFSET | OPT_PERFILE;
21612161 int show_advanced = 0, show_avoptions = 0;
21622162
2163− if (opt) {
2163+ if (opt && *opt) {
21642164 if (!strcmp(opt, "long"))
21652165 show_advanced = 1;
21662166 else if (!strcmp(opt, "full"))
libavcodec/flashsv.c+14−5
@@ -122,10 +122,11 @@ static av_cold int flashsv_decode_init(AVCodecContext *avctx) · 121 unmodified lines
122122 }
123123
124124
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)
127127 {
128128 z_stream zs;
129+ int zret; // Zlib return code
129130
130131 zs.zalloc = NULL;
131132 zs.zfree = NULL;
@@ -145,13 +146,18 @@ static void flashsv2_prime(FlashSVContext *s, uint8_t *src, · 13 unmodified lines
145146 deflate(&zs, Z_SYNC_FLUSH);
146147 deflateEnd(&zs);
147148
148− inflateReset(&s->zstream);
149+ if ((zret = inflateReset(&s->zstream)) != Z_OK) {
150+ av_log(s->avctx, AV_LOG_ERROR, "Inflate reset error: %d\n", zret);
151+ return AVERROR_UNKNOWN;
152+ }
149153
150154 s->zstream.next_in = s->deflate_block;
151155 s->zstream.avail_in = s->deflate_block_size - zs.avail_out;
152156 s->zstream.next_out = s->tmpblock;
153157 s->zstream.avail_out = s->block_size * 3;
154158 inflate(&s->zstream, Z_SYNC_FLUSH);
159+
160+ return 0;
155161 }
156162
157163 static int flashsv_decode_block(AVCodecContext *avctx, AVPacket *avpkt,
@@ -164,11 +170,14 @@ static int flashsv_decode_block(AVCodecContext *avctx, AVPacket *avpkt, · 6 unmodified lines
164170 int k;
165171 int ret = inflateReset(&s->zstream);
166172 if (ret != Z_OK) {
167− //return -1;
173+ av_log(avctx, AV_LOG_ERROR, "Inflate reset error: %d\n", ret);
174+ return AVERROR_UNKNOWN;
168175 }
169176 if (s->zlibprime_curr || s->zlibprime_prev) {
170− flashsv2_prime(s, s->blocks[blk_idx].pos, s->blocks[blk_idx].size,
177+ ret = flashsv2_prime(s, s->blocks[blk_idx].pos, s->blocks[blk_idx].size,
171178 s->blocks[blk_idx].unp_size);
179+ if (ret < 0)
180+ return ret;
172181 }
173182 s->zstream.next_in = avpkt->data + get_bits_count(gb) / 8;
174183 s->zstream.avail_in = block_size;
libavcodec/ivi_common.c+2−2
@@ -830,9 +830,9 @@ int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 829 unmodified lines
830830
831831 if (ctx->is_scalable) {
832832 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]);
834834 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]);
836836 } else {
837837 ff_ivi_output_plane(&ctx->planes[0], ctx->frame.data[0], ctx->frame.linesize[0]);
838838 }
libavcodec/ivi_dsp.c+3−2
@@ -33,7 +33,7 @@ · 32 unmodified lines
3333 #include "ivi_dsp.h"
3434
3535 void ff_ivi_recompose53(const IVIPlaneDesc *plane, uint8_t *dst,
36− const int dst_pitch, const int num_bands)
36+ const int dst_pitch)
3737 {
3838 int x, y, indx;
3939 int32_t p0, p1, p2, p3, tmp0, tmp1, tmp2;
@@ -41,6 +41,7 @@ void ff_ivi_recompose53(const IVIPlaneDesc *plane, uint8_t *dst, · 1 unmodified line
4141 int32_t b3_1, b3_2, b3_3, b3_4, b3_5, b3_6, b3_7, b3_8, b3_9;
4242 int32_t pitch, back_pitch;
4343 const IDWTELEM *b0_ptr, *b1_ptr, *b2_ptr, *b3_ptr;
44+ const int num_bands = 4;
4445
4546 /* all bands should have the same pitch */
4647 pitch = plane->bands[0].pitch;
@@ -189,7 +190,7 @@ void ff_ivi_recompose53(const IVIPlaneDesc *plane, uint8_t *dst, · 142 unmodified lines
189190 }
190191
191192 void ff_ivi_recompose_haar(const IVIPlaneDesc *plane, uint8_t *dst,
192− const int dst_pitch, const int num_bands)
193+ const int dst_pitch)
193194 {
194195 int x, y, indx, b0, b1, b2, b3, p0, p1, p2, p3;
195196 const IDWTELEM *b0_ptr, *b1_ptr, *b2_ptr, *b3_ptr;
libavcodec/ivi_dsp.h+2−4
@@ -38,10 +38,9 @@ · 37 unmodified lines
3838 * @param[in] plane pointer to the descriptor of the plane being processed
3939 * @param[out] dst pointer to the destination buffer
4040 * @param[in] dst_pitch pitch of the destination buffer
41− * @param[in] num_bands number of wavelet bands to be processed
4241 */
4342 void ff_ivi_recompose53(const IVIPlaneDesc *plane, uint8_t *dst,
44− const int dst_pitch, const int num_bands);
43+ const int dst_pitch);
4544
4645 /**
4746 * Haar wavelet recomposition filter for Indeo 4
@@ -49,10 +48,9 @@ void ff_ivi_recompose53(const IVIPlaneDesc *plane, uint8_t *dst, · 1 unmodified line
4948 * @param[in] plane pointer to the descriptor of the plane being processed
5049 * @param[out] dst pointer to the destination buffer
5150 * @param[in] dst_pitch pitch of the destination buffer
52− * @param[in] num_bands number of wavelet bands to be processed
5351 */
5452 void ff_ivi_recompose_haar(const IVIPlaneDesc *plane, uint8_t *dst,
55− const int dst_pitch, const int num_bands);
53+ const int dst_pitch);
5654
5755 /**
5856 * two-dimensional inverse Haar 8x8 transform for Indeo 4
libavcodec/vc1.c+5−0
@@ -1274,6 +1274,11 @@ int ff_vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb) · 1273 unmodified lines
12741274 break;
12751275 }
12761276
1277+ if (v->fcm != PROGRESSIVE && !v->s.quarter_sample) {
1278+ v->range_x <<= 1;
1279+ v->range_y <<= 1;
1280+ }
1281+
12771282 /* AC Syntax */
12781283 v->c_ac_table_index = decode012(gb);
12791284 if (v->s.pict_type == AV_PICTURE_TYPE_I || v->s.pict_type == AV_PICTURE_TYPE_BI) {
libavcodec/vc1dec.c+0−4
@@ -1575,10 +1575,6 @@ static inline void vc1_pred_mv(VC1Context *v, int n, int dmv_x, int dmv_y, · 1574 unmodified lines
15751575 }
15761576 }
15771577
1578− if (v->field_mode && !s->quarter_sample) {
1579− r_x <<= 1;
1580− r_y <<= 1;
1581− }
15821578 if (v->field_mode && v->numref)
15831579 r_y >>= 1;
15841580 if (v->field_mode && v->cur_field_type && v->ref_field_type[dir] == 0)
libavfilter/af_aformat.c+19−7
@@ -126,6 +126,22 @@ static int query_formats(AVFilterContext *ctx) · 125 unmodified lines
126126 return 0;
127127 }
128128
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+
129145 AVFilter avfilter_af_aformat = {
130146 .name = "aformat",
131147 .description = NULL_IF_CONFIG_SMALL("Convert the input audio to one of the specified formats."),
@@ -133,11 +149,7 @@ AVFilter avfilter_af_aformat = { · 1 unmodified line
133149 .query_formats = query_formats,
134150 .priv_size = sizeof(AFormatContext),
135151
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,
152+ .inputs = avfilter_af_aformat_inputs,
153+ .outputs = avfilter_af_aformat_outputs,
154+ .priv_class = &aformat_class,
143155 };
libavfilter/af_amix.c+11−5
@@ -542,6 +542,16 @@ static int query_formats(AVFilterContext *ctx) · 541 unmodified lines
542542 return 0;
543543 }
544544
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+
545555 AVFilter avfilter_af_amix = {
546556 .name = "amix",
547557 .description = NULL_IF_CONFIG_SMALL("Audio mixing."),
@@ -552,10 +562,6 @@ AVFilter avfilter_af_amix = { · 4 unmodified lines
552562 .query_formats = query_formats,
553563
554564 .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}},
565+ .outputs = avfilter_af_amix_outputs,
560566 .priv_class = &amix_class,
561567 };
libavfilter/af_anull.c+19−7
@@ -27,18 +27,30 @@ · 26 unmodified lines
2727 #include "internal.h"
2828 #include "libavutil/internal.h"
2929
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+
3047 AVFilter avfilter_af_anull = {
3148 .name = "anull",
3249 .description = NULL_IF_CONFIG_SMALL("Pass the source unchanged to the output."),
3350
3451 .priv_size = 0,
3552
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,
4054
41− .outputs = (const AVFilterPad[]) {{ .name = "default",
42− .type = AVMEDIA_TYPE_AUDIO, },
43− { .name = NULL}},
55+ .outputs = avfilter_af_anull_outputs,
4456 };
libavfilter/af_asyncts.c+21−9
@@ -233,6 +233,25 @@ fail: · 232 unmodified lines
233233 return ret;
234234 }
235235
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+
236255 AVFilter avfilter_af_asyncts = {
237256 .name = "asyncts",
238257 .description = NULL_IF_CONFIG_SMALL("Sync audio data to timestamps"),
@@ -242,14 +261,7 @@ AVFilter avfilter_af_asyncts = { · 3 unmodified lines
242261
243262 .priv_size = sizeof(ASyncContext),
244263
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 }},
264+ .inputs = avfilter_af_asyncts_inputs,
265+ .outputs = avfilter_af_asyncts_outputs,
254266 .priv_class = &asyncts_class,
255267 };
libavfilter/af_channelmap.c+22−10
@@ -385,6 +385,25 @@ static int channelmap_config_input(AVFilterLink *inlink) · 384 unmodified lines
385385 return err;
386386 }
387387
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+
388407 AVFilter avfilter_af_channelmap = {
389408 .name = "channelmap",
390409 .description = NULL_IF_CONFIG_SMALL("Remap audio channels."),
@@ -392,14 +411,7 @@ AVFilter avfilter_af_channelmap = { · 1 unmodified line
392411 .query_formats = channelmap_query_formats,
393412 .priv_size = sizeof(ChannelMapContext),
394413
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,
414+ .inputs = avfilter_af_channelmap_inputs,
415+ .outputs = avfilter_af_channelmap_outputs,
416+ .priv_class = &channelmap_class,
405417 };
libavfilter/af_channelsplit.c+10−4
@@ -130,6 +130,15 @@ static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *buf) · 129 unmodified lines
130130 return ret;
131131 }
132132
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+
133142 AVFilter avfilter_af_channelsplit = {
134143 .name = "channelsplit",
135144 .description = NULL_IF_CONFIG_SMALL("Split audio into per-channel streams"),
@@ -138,10 +147,7 @@ AVFilter avfilter_af_channelsplit = { · 2 unmodified lines
138147 .init = init,
139148 .query_formats = query_formats,
140149
141− .inputs = (const AVFilterPad[]){{ .name = "default",
142− .type = AVMEDIA_TYPE_AUDIO,
143− .filter_samples = filter_samples, },
144− { NULL }},
150+ .inputs = avfilter_af_channelsplit_inputs,
145151 .outputs = NULL,
146152 .priv_class = &channelsplit_class,
147153 };
libavfilter/af_join.c+11−5
@@ -484,6 +484,16 @@ fail: · 483 unmodified lines
484484 return AVERROR(ENOMEM);
485485 }
486486
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+
487497 AVFilter avfilter_af_join = {
488498 .name = "join",
489499 .description = NULL_IF_CONFIG_SMALL("Join multiple audio streams into "
@@ -495,10 +505,6 @@ AVFilter avfilter_af_join = { · 5 unmodified lines
495505 .query_formats = join_query_formats,
496506
497507 .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 }},
508+ .outputs = avfilter_af_join_outputs,
503509 .priv_class = &join_class,
504510 };
libavfilter/af_resample.c+22−10
@@ -239,6 +239,26 @@ fail: · 238 unmodified lines
239239 return ret;
240240 }
241241
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+
242262 AVFilter avfilter_af_resample = {
243263 .name = "resample",
244264 .description = NULL_IF_CONFIG_SMALL("Audio resampling and conversion."),
@@ -247,14 +267,6 @@ AVFilter avfilter_af_resample = { · 2 unmodified lines
247267 .uninit = uninit,
248268 .query_formats = query_formats,
249269
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}},
270+ .inputs = avfilter_af_resample_inputs,
271+ .outputs = avfilter_af_resample_outputs,
260272 };
libavfilter/asink_anullsink.c+10−8
@@ -27,19 +27,21 @@ static int null_filter_samples(AVFilterLink *link, AVFilterBufferRef *samplesref · 26 unmodified lines
2727 return 0;
2828 }
2929
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+
3039 AVFilter avfilter_asink_anullsink = {
3140 .name = "anullsink",
3241 .description = NULL_IF_CONFIG_SMALL("Do absolutely nothing with the input audio."),
3342
3443 .priv_size = 0,
3544
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,
4446 .outputs = NULL,
4547 };
libavfilter/asrc_anullsrc.c+11−5
@@ -119,6 +119,16 @@ static int request_frame(AVFilterLink *outlink) · 118 unmodified lines
119119 return 0;
120120 }
121121
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+
122132 AVFilter avfilter_asrc_anullsrc = {
123133 .name = "anullsrc",
124134 .description = NULL_IF_CONFIG_SMALL("Null audio source, return empty audio frames."),
@@ -128,10 +138,6 @@ AVFilter avfilter_asrc_anullsrc = { · 3 unmodified lines
128138
129139 .inputs = NULL,
130140
131− .outputs = (const AVFilterPad[]) {{ .name = "default",
132− .type = AVMEDIA_TYPE_AUDIO,
133− .config_props = config_props,
134− .request_frame = request_frame, },
135− { .name = NULL}},
141+ .outputs = avfilter_asrc_anullsrc_outputs,
136142 .priv_class = &anullsrc_class,
137143 };
libavfilter/buffersink.c+24−12
@@ -140,6 +140,17 @@ int ff_buffersink_read_samples_compat(AVFilterContext *ctx, AVFilterBufferRef ** · 139 unmodified lines
140140 return ret;
141141 }
142142
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+
143154 AVFilter avfilter_vsink_buffer = {
144155 #if AV_HAVE_INCOMPATIBLE_FORK_ABI
145156 .name = "buffersink",
@@ -150,15 +161,21 @@ AVFilter avfilter_vsink_buffer = { · 4 unmodified lines
150161 .priv_size = sizeof(BufferSinkContext),
151162 .uninit = uninit,
152163
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 }},
164+ .inputs = avfilter_vsink_buffer_inputs,
159165 .outputs = NULL,
160166 };
161167
168+static const AVFilterPad avfilter_asink_abuffer_inputs[] = {
169+ {
170+ .name = "default",
171+ .type = AVMEDIA_TYPE_AUDIO,
172+ .filter_samples = start_frame,
173+ .min_perms = AV_PERM_READ,
174+ .needs_fifo = 1
175+ },
176+ { NULL }
177+};
178+
162179 AVFilter avfilter_asink_abuffer = {
163180 #if AV_HAVE_INCOMPATIBLE_FORK_ABI
164181 .name = "abuffersink",
@@ -169,11 +186,6 @@ AVFilter avfilter_asink_abuffer = { · 4 unmodified lines
169186 .priv_size = sizeof(BufferSinkContext),
170187 .uninit = uninit,
171188
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 }},
189+ .inputs = avfilter_asink_abuffer_inputs,
178190 .outputs = NULL,
179191 };
libavfilter/buffersrc.c+24−12
@@ -400,6 +400,17 @@ static int poll_frame(AVFilterLink *link) · 399 unmodified lines
400400 return size/sizeof(AVFilterBufferRef*);
401401 }
402402
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+
403414 AVFilter avfilter_vsrc_buffer = {
404415 .name = "buffer",
405416 .description = NULL_IF_CONFIG_SMALL("Buffer video frames, and make them accessible to the filterchain."),
@@ -410,15 +421,21 @@ AVFilter avfilter_vsrc_buffer = { · 4 unmodified lines
410421 .uninit = uninit,
411422
412423 .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}},
424+ .outputs = avfilter_vsrc_buffer_outputs,
419425 .priv_class = &buffer_class,
420426 };
421427
428+static const AVFilterPad avfilter_asrc_abuffer_outputs[] = {
429+ {
430+ .name = "default",
431+ .type = AVMEDIA_TYPE_AUDIO,
432+ .request_frame = request_frame,
433+ .poll_frame = poll_frame,
434+ .config_props = config_props,
435+ },
436+ { NULL }
437+};
438+
422439 AVFilter avfilter_asrc_abuffer = {
423440 .name = "abuffer",
424441 .description = NULL_IF_CONFIG_SMALL("Buffer audio frames, and make them accessible to the filterchain."),
@@ -429,11 +446,6 @@ AVFilter avfilter_asrc_abuffer = { · 4 unmodified lines
429446 .uninit = uninit,
430447
431448 .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}},
449+ .outputs = avfilter_asrc_abuffer_outputs,
438450 .priv_class = &abuffer_class,
439451 };
libavfilter/f_setpts.c+21−9
@@ -216,6 +216,25 @@ AVFilter avfilter_af_asetpts = { · 215 unmodified lines
216216 #endif /* CONFIG_ASETPTS_FILTER */
217217
218218 #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+
219238 AVFilter avfilter_vf_setpts = {
220239 .name = "setpts",
221240 .description = NULL_IF_CONFIG_SMALL("Set PTS for the output video frame."),
@@ -224,14 +243,7 @@ AVFilter avfilter_vf_setpts = { · 2 unmodified lines
224243
225244 .priv_size = sizeof(SetPTSContext),
226245
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}},
246+ .inputs = avfilter_vf_setpts_inputs,
247+ .outputs = avfilter_vf_setpts_outputs,
236248 };
237249 #endif /* CONFIG_SETPTS_FILTER */
libavfilter/f_settb.c+22−14
@@ -137,6 +137,26 @@ static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *samplesref) · 136 unmodified lines
137137 }
138138
139139 #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+
140160 AVFilter avfilter_vf_settb = {
141161 .name = "settb",
142162 .description = NULL_IF_CONFIG_SMALL("Set timebase for the video output link."),
@@ -144,20 +164,8 @@ AVFilter avfilter_vf_settb = { · 1 unmodified line
144164
145165 .priv_size = sizeof(SetTBContext),
146166
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− },
167+ .inputs = avfilter_vf_settb_inputs,
168+ .outputs = avfilter_vf_settb_outputs,
161169 };
162170 #endif
163171
libavfilter/fifo.c+46−22
@@ -267,6 +267,28 @@ static int request_frame(AVFilterLink *outlink) · 266 unmodified lines
267267 return ret;
268268 }
269269
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+
270292 AVFilter avfilter_vf_fifo = {
271293 .name = "fifo",
272294 .description = NULL_IF_CONFIG_SMALL("Buffer input images and send them when they are requested."),
@@ -276,18 +298,28 @@ AVFilter avfilter_vf_fifo = { · 3 unmodified lines
276298
277299 .priv_size = sizeof(FifoContext),
278300
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}},
301+ .inputs = avfilter_vf_fifo_inputs,
302+ .outputs = avfilter_vf_fifo_outputs,
303+};
304+
305+static const AVFilterPad avfilter_af_afifo_inputs[] = {
306+ {
307+ .name = "default",
308+ .type = AVMEDIA_TYPE_AUDIO,
309+ .get_audio_buffer = ff_null_get_audio_buffer,
310+ .filter_samples = add_to_queue,
311+ .min_perms = AV_PERM_PRESERVE,
312+ },
313+ { NULL }
314+};
315+
316+static const AVFilterPad avfilter_af_afifo_outputs[] = {
317+ {
318+ .name = "default",
319+ .type = AVMEDIA_TYPE_AUDIO,
320+ .request_frame = request_frame,
321+ },
322+ { NULL }
291323 };
292324
293325 AVFilter avfilter_af_afifo = {
@@ -299,14 +331,6 @@ AVFilter avfilter_af_afifo = { · 5 unmodified lines
299331
300332 .priv_size = sizeof(FifoContext),
301333
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}},
334+ .inputs = avfilter_af_afifo_inputs,
335+ .outputs = avfilter_af_afifo_outputs,
312336 };
libavfilter/split.c+24−12
@@ -119,6 +119,18 @@ static int end_frame(AVFilterLink *inlink) · 118 unmodified lines
119119 return ret;
120120 }
121121
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+
122134 AVFilter avfilter_vf_split = {
123135 .name = "split",
124136 .description = NULL_IF_CONFIG_SMALL("Pass on the input video to N outputs."),
@@ -126,13 +138,7 @@ AVFilter avfilter_vf_split = { · 1 unmodified line
126138 .init = split_init,
127139 .uninit = split_uninit,
128140
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}},
141+ .inputs = avfilter_vf_split_inputs,
136142 .outputs = NULL,
137143 };
138144
@@ -157,6 +163,16 @@ static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *samplesref) · 18 unmodified lines
157163 return ret;
158164 }
159165
166+static const AVFilterPad avfilter_af_asplit_inputs[] = {
167+ {
168+ .name = "default",
169+ .type = AVMEDIA_TYPE_AUDIO,
170+ .get_audio_buffer = ff_null_get_audio_buffer,
171+ .filter_samples = filter_samples
172+ },
173+ { NULL }
174+};
175+
160176 AVFilter avfilter_af_asplit = {
161177 .name = "asplit",
162178 .description = NULL_IF_CONFIG_SMALL("Pass on the audio input to N audio outputs."),
@@ -164,10 +180,6 @@ AVFilter avfilter_af_asplit = { · 1 unmodified line
164180 .init = split_init,
165181 .uninit = split_uninit,
166182
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 }},
183+ .inputs = avfilter_af_asplit_inputs,
172184 .outputs = NULL,
173185 };
libavfilter/vf_aspect.c+46−22
@@ -79,6 +79,26 @@ static int setdar_config_props(AVFilterLink *inlink) · 78 unmodified lines
7979 return 0;
8080 }
8181
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+
82102 AVFilter avfilter_vf_setdar = {
83103 .name = "setdar",
84104 .description = NULL_IF_CONFIG_SMALL("Set the frame display aspect ratio."),
@@ -87,17 +107,9 @@ AVFilter avfilter_vf_setdar = { · 2 unmodified lines
87107
88108 .priv_size = sizeof(AspectContext),
89109
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}},
110+ .inputs = avfilter_vf_setdar_inputs,
111+
112+ .outputs = avfilter_vf_setdar_outputs,
101113 };
102114 #endif /* CONFIG_SETDAR_FILTER */
103115
@@ -111,6 +123,26 @@ static int setsar_config_props(AVFilterLink *inlink) · 7 unmodified lines
111123 return 0;
112124 }
113125
126+static const AVFilterPad avfilter_vf_setsar_inputs[] = {
127+ {
128+ .name = "default",
129+ .type = AVMEDIA_TYPE_VIDEO,
130+ .config_props = setsar_config_props,
131+ .get_video_buffer = ff_null_get_video_buffer,
132+ .start_frame = start_frame,
133+ .end_frame = ff_null_end_frame
134+ },
135+ { NULL }
136+};
137+
138+static const AVFilterPad avfilter_vf_setsar_outputs[] = {
139+ {
140+ .name = "default",
141+ .type = AVMEDIA_TYPE_VIDEO,
142+ },
143+ { NULL }
144+};
145+
114146 AVFilter avfilter_vf_setsar = {
115147 .name = "setsar",
116148 .description = NULL_IF_CONFIG_SMALL("Set the pixel sample aspect ratio."),
@@ -119,16 +151,8 @@ AVFilter avfilter_vf_setsar = { · 2 unmodified lines
119151
120152 .priv_size = sizeof(AspectContext),
121153
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}},
154+ .inputs = avfilter_vf_setsar_inputs,
155+
156+ .outputs = avfilter_vf_setsar_outputs,
133157 };
134158 #endif /* CONFIG_SETSAR_FILTER */
libavfilter/vf_blackframe.c+23−11
@@ -121,6 +121,26 @@ static int end_frame(AVFilterLink *inlink) · 120 unmodified lines
121121 return ff_end_frame(inlink->dst->outputs[0]);
122122 }
123123
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+
124144 AVFilter avfilter_vf_blackframe = {
125145 .name = "blackframe",
126146 .description = NULL_IF_CONFIG_SMALL("Detect frames that are (almost) black."),
@@ -130,15 +150,7 @@ AVFilter avfilter_vf_blackframe = { · 3 unmodified lines
130150
131151 .query_formats = query_formats,
132152
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}},
153+ .inputs = avfilter_vf_blackframe_inputs,
154+
155+ .outputs = avfilter_vf_blackframe_outputs,
144156 };
libavfilter/vf_boxblur.c+22−10
@@ -332,6 +332,26 @@ static int end_frame(AVFilterLink *inlink) · 331 unmodified lines
332332 return ff_end_frame(outlink);
333333 }
334334
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+
335355 AVFilter avfilter_vf_boxblur = {
336356 .name = "boxblur",
337357 .description = NULL_IF_CONFIG_SMALL("Blur the input."),
@@ -340,14 +360,6 @@ AVFilter avfilter_vf_boxblur = { · 2 unmodified lines
340360 .uninit = uninit,
341361 .query_formats = query_formats,
342362
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}},
363+ .inputs = avfilter_vf_boxblur_inputs,
364+ .outputs = avfilter_vf_boxblur_outputs,
353365 };
libavfilter/vf_copy.c+22−10
@@ -26,18 +26,30 @@ · 25 unmodified lines
2626 #include "internal.h"
2727 #include "video.h"
2828
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+
2949 AVFilter avfilter_vf_copy = {
3050 .name = "copy",
3151 .description = NULL_IF_CONFIG_SMALL("Copy the input video unchanged to the output."),
3252
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,
4355 };
libavfilter/vf_crop.c+24−12
@@ -345,6 +345,28 @@ static int end_frame(AVFilterLink *link) · 344 unmodified lines
345345 return ff_end_frame(link->dst->outputs[0]);
346346 }
347347
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+
348370 AVFilter avfilter_vf_crop = {
349371 .name = "crop",
350372 .description = NULL_IF_CONFIG_SMALL("Crop the input video to width:height:x:y."),
@@ -355,16 +377,6 @@ AVFilter avfilter_vf_crop = { · 4 unmodified lines
355377 .init = init,
356378 .uninit = uninit,
357379
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}},
380+ .inputs = avfilter_vf_crop_inputs,
381+ .outputs = avfilter_vf_crop_outputs,
370382 };
libavfilter/vf_cropdetect.c+23−11
@@ -197,6 +197,26 @@ static int end_frame(AVFilterLink *inlink) · 196 unmodified lines
197197 return ff_end_frame(inlink->dst->outputs[0]);
198198 }
199199
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+
200220 AVFilter avfilter_vf_cropdetect = {
201221 .name = "cropdetect",
202222 .description = NULL_IF_CONFIG_SMALL("Auto-detect crop size."),
@@ -206,15 +226,7 @@ AVFilter avfilter_vf_cropdetect = { · 3 unmodified lines
206226
207227 .query_formats = query_formats,
208228
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}},
229+ .inputs = avfilter_vf_cropdetect_inputs,
230+
231+ .outputs = avfilter_vf_cropdetect_outputs,
220232 };
libavfilter/vf_delogo.c+23−11
@@ -245,6 +245,27 @@ static int end_frame(AVFilterLink *inlink) · 244 unmodified lines
245245 return 0;
246246 }
247247
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+
248269 AVFilter avfilter_vf_delogo = {
249270 .name = "delogo",
250271 .description = NULL_IF_CONFIG_SMALL("Remove logo from input video."),
@@ -252,15 +273,6 @@ AVFilter avfilter_vf_delogo = { · 1 unmodified line
252273 .init = init,
253274 .query_formats = query_formats,
254275
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}},
276+ .inputs = avfilter_vf_delogo_inputs,
277+ .outputs = avfilter_vf_delogo_outputs,
266278 };
libavfilter/vf_drawbox.c+24−12
@@ -124,6 +124,28 @@ static int draw_slice(AVFilterLink *inlink, int y0, int h, int slice_dir) · 123 unmodified lines
124124 return ff_draw_slice(inlink->dst->outputs[0], y0, h, 1);
125125 }
126126
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+
127149 AVFilter avfilter_vf_drawbox = {
128150 .name = "drawbox",
129151 .description = NULL_IF_CONFIG_SMALL("Draw a colored box on the input video."),
@@ -131,16 +153,6 @@ AVFilter avfilter_vf_drawbox = { · 1 unmodified line
131153 .init = init,
132154
133155 .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}},
156+ .inputs = avfilter_vf_drawbox_inputs,
157+ .outputs = avfilter_vf_drawbox_outputs,
146158 };
libavfilter/vf_drawtext.c+25−13
@@ -810,6 +810,29 @@ static int end_frame(AVFilterLink *inlink) · 809 unmodified lines
810810 return 0;
811811 }
812812
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+
813836 AVFilter avfilter_vf_drawtext = {
814837 .name = "drawtext",
815838 .description = NULL_IF_CONFIG_SMALL("Draw text on top of video frames using libfreetype library."),
@@ -818,19 +841,8 @@ AVFilter avfilter_vf_drawtext = { · 2 unmodified lines
818841 .uninit = uninit,
819842 .query_formats = query_formats,
820843
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}},
844+ .inputs = avfilter_vf_drawtext_inputs,
845+ .outputs = avfilter_vf_drawtext_outputs,
834846 .process_command = command,
835847 .priv_class = &drawtext_class,
836848 };
libavfilter/vf_fade.c+24−12
@@ -276,6 +276,28 @@ static int end_frame(AVFilterLink *inlink) · 275 unmodified lines
276276 return ret;
277277 }
278278
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+
279301 AVFilter avfilter_vf_fade = {
280302 .name = "fade",
281303 .description = NULL_IF_CONFIG_SMALL("Fade in/out input video."),
@@ -284,17 +306,7 @@ AVFilter avfilter_vf_fade = { · 2 unmodified lines
284306 .priv_size = sizeof(FadeContext),
285307 .query_formats = query_formats,
286308
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}},
309+ .inputs = avfilter_vf_fade_inputs,
310+ .outputs = avfilter_vf_fade_outputs,
299311 .priv_class = &fade_class,
300312 };
libavfilter/vf_fieldorder.c+24−12
@@ -234,22 +234,34 @@ static int end_frame(AVFilterLink *inlink) · 233 unmodified lines
234234 return ff_end_frame(outlink);
235235 }
236236
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+
237259 AVFilter avfilter_vf_fieldorder = {
238260 .name = "fieldorder",
239261 .description = NULL_IF_CONFIG_SMALL("Set the field order."),
240262 .init = init,
241263 .priv_size = sizeof(FieldOrderContext),
242264 .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,
255267 };
libavfilter/vf_format.c+44−20
@@ -97,6 +97,26 @@ static int query_formats_format(AVFilterContext *ctx) · 96 unmodified lines
9797 return 0;
9898 }
9999
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+
100120 AVFilter avfilter_vf_format = {
101121 .name = "format",
102122 .description = NULL_IF_CONFIG_SMALL("Convert the input video to one of the specified pixel formats."),
@@ -107,16 +127,8 @@ AVFilter avfilter_vf_format = { · 4 unmodified lines
107127
108128 .priv_size = sizeof(FormatContext),
109129
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}},
130+ .inputs = avfilter_vf_format_inputs,
131+ .outputs = avfilter_vf_format_outputs,
120132 };
121133 #endif /* CONFIG_FORMAT_FILTER */
122134
@@ -127,6 +139,26 @@ static int query_formats_noformat(AVFilterContext *ctx) · 4 unmodified lines
127139 return 0;
128140 }
129141
142+static const AVFilterPad avfilter_vf_noformat_inputs[] = {
143+ {
144+ .name = "default",
145+ .type = AVMEDIA_TYPE_VIDEO,
146+ .get_video_buffer = ff_null_get_video_buffer,
147+ .start_frame = ff_null_start_frame,
148+ .draw_slice = ff_null_draw_slice,
149+ .end_frame = ff_null_end_frame,
150+ },
151+ { NULL }
152+};
153+
154+static const AVFilterPad avfilter_vf_noformat_outputs[] = {
155+ {
156+ .name = "default",
157+ .type = AVMEDIA_TYPE_VIDEO
158+ },
159+ { NULL }
160+};
161+
130162 AVFilter avfilter_vf_noformat = {
131163 .name = "noformat",
132164 .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 = { · 4 unmodified lines
137169
138170 .priv_size = sizeof(FormatContext),
139171
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}},
172+ .inputs = avfilter_vf_noformat_inputs,
173+ .outputs = avfilter_vf_noformat_outputs,
150174 };
151175 #endif /* CONFIG_NOFORMAT_FILTER */
libavfilter/vf_fps.c+25−13
@@ -279,6 +279,29 @@ static int null_draw_slice(AVFilterLink *link, int y, int h, int slice_dir) · 278 unmodified lines
279279 return 0;
280280 }
281281
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+
282305 AVFilter avfilter_vf_fps = {
283306 .name = "fps",
284307 .description = NULL_IF_CONFIG_SMALL("Force constant framerate"),
@@ -288,18 +311,7 @@ AVFilter avfilter_vf_fps = { · 3 unmodified lines
288311
289312 .priv_size = sizeof(FPSContext),
290313
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}},
314+ .inputs = avfilter_vf_fps_inputs,
315+ .outputs = avfilter_vf_fps_outputs,
304316 .priv_class = &fps_class,
305317 };
libavfilter/vf_frei0r.c+34−16
@@ -368,6 +368,26 @@ static int end_frame(AVFilterLink *inlink) · 367 unmodified lines
368368 return 0;
369369 }
370370
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+
371391 AVFilter avfilter_vf_frei0r = {
372392 .name = "frei0r",
373393 .description = NULL_IF_CONFIG_SMALL("Apply a frei0r effect."),
@@ -378,17 +398,9 @@ AVFilter avfilter_vf_frei0r = { · 4 unmodified lines
378398
379399 .priv_size = sizeof(Frei0rContext),
380400
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}},
401+ .inputs = avfilter_vf_frei0r_inputs,
402+
403+ .outputs = avfilter_vf_frei0r_outputs,
392404 };
393405
394406 static av_cold int source_init(AVFilterContext *ctx, const char *args)
@@ -478,6 +490,16 @@ fail: · 83 unmodified lines
478490 return ret;
479491 }
480492
493+static const AVFilterPad avfilter_vsrc_frei0r_src_outputs[] = {
494+ {
495+ .name = "default",
496+ .type = AVMEDIA_TYPE_VIDEO,
497+ .request_frame = source_request_frame,
498+ .config_props = source_config_props
499+ },
500+ { NULL }
501+};
502+
481503 AVFilter avfilter_vsrc_frei0r_src = {
482504 .name = "frei0r_src",
483505 .description = NULL_IF_CONFIG_SMALL("Generate a frei0r source."),
@@ -490,9 +512,5 @@ AVFilter avfilter_vsrc_frei0r_src = { · 6 unmodified lines
490512
491513 .inputs = NULL,
492514
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}},
515+ .outputs = avfilter_vsrc_frei0r_src_outputs,
498516 };
libavfilter/vf_gradfun.c+23−11
@@ -216,6 +216,27 @@ static int end_frame(AVFilterLink *inlink) · 215 unmodified lines
216216 return 0;
217217 }
218218
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+
219240 AVFilter avfilter_vf_gradfun = {
220241 .name = "gradfun",
221242 .description = NULL_IF_CONFIG_SMALL("Debands video quickly using gradients."),
@@ -224,15 +245,6 @@ AVFilter avfilter_vf_gradfun = { · 2 unmodified lines
224245 .uninit = uninit,
225246 .query_formats = query_formats,
226247
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}},
248+ .inputs = avfilter_vf_gradfun_inputs,
249+ .outputs = avfilter_vf_gradfun_outputs,
238250 };
libavfilter/vf_hflip.c+22−10
@@ -165,20 +165,32 @@ static int draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir) · 164 unmodified lines
165165 return ff_draw_slice(inlink->dst->outputs[0], y, h, slice_dir);
166166 }
167167
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+
168188 AVFilter avfilter_vf_hflip = {
169189 .name = "hflip",
170190 .description = NULL_IF_CONFIG_SMALL("Horizontally flip the input video."),
171191 .priv_size = sizeof(FlipContext),
172192 .query_formats = query_formats,
173193
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,
184196 };
libavfilter/vf_hqdn3d.c+23−11
@@ -348,6 +348,26 @@ static int end_frame(AVFilterLink *inlink) · 347 unmodified lines
348348 return 0;
349349 }
350350
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+
351371 AVFilter avfilter_vf_hqdn3d = {
352372 .name = "hqdn3d",
353373 .description = NULL_IF_CONFIG_SMALL("Apply a High Quality 3D Denoiser."),
@@ -357,15 +377,7 @@ AVFilter avfilter_vf_hqdn3d = { · 3 unmodified lines
357377 .uninit = uninit,
358378 .query_formats = query_formats,
359379
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}},
380+ .inputs = avfilter_vf_hqdn3d_inputs,
381+
382+ .outputs = avfilter_vf_hqdn3d_outputs,
371383 };
libavfilter/vf_libopencv.c+21−9
@@ -376,6 +376,25 @@ static int end_frame(AVFilterLink *inlink) · 375 unmodified lines
376376 return 0;
377377 }
378378
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+
379398 AVFilter avfilter_vf_ocv = {
380399 .name = "ocv",
381400 .description = NULL_IF_CONFIG_SMALL("Apply transform using libopencv."),
@@ -386,14 +405,7 @@ AVFilter avfilter_vf_ocv = { · 4 unmodified lines
386405 .init = init,
387406 .uninit = uninit,
388407
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}},
408+ .inputs = avfilter_vf_ocv_inputs,
395409
396− .outputs = (const AVFilterPad[]) {{ .name = "default",
397− .type = AVMEDIA_TYPE_VIDEO, },
398− { .name = NULL}},
410+ .outputs = avfilter_vf_ocv_outputs,
399411 };
libavfilter/vf_null.c+21−9
@@ -26,20 +26,32 @@ · 25 unmodified lines
2626 #include "internal.h"
2727 #include "video.h"
2828
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+
2948 AVFilter avfilter_vf_null = {
3049 .name = "null",
3150 .description = NULL_IF_CONFIG_SMALL("Pass the source unchanged to the output."),
3251
3352 .priv_size = 0,
3453
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,
4155
42− .outputs = (const AVFilterPad[]) {{ .name = "default",
43− .type = AVMEDIA_TYPE_VIDEO, },
44− { .name = NULL}},
56+ .outputs = avfilter_vf_null_outputs,
4557 };
libavfilter/vf_overlay.c+36−22
@@ -607,6 +607,40 @@ static int null_draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir) · 606 unmodified lines
607607 return 0;
608608 }
609609
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+
610644 AVFilter avfilter_vf_overlay = {
611645 .name = "overlay",
612646 .description = NULL_IF_CONFIG_SMALL("Overlay a video source on top of the input."),
@@ -618,27 +652,7 @@ AVFilter avfilter_vf_overlay = { · 5 unmodified lines
618652
619653 .query_formats = query_formats,
620654
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}},
655+ .inputs = avfilter_vf_overlay_inputs,
656+ .outputs = avfilter_vf_overlay_outputs,
643657 .priv_class = &overlay_class,
644658 };
libavfilter/vf_pad.c+24−12
@@ -388,6 +388,27 @@ static int draw_slice(AVFilterLink *link, int y, int h, int slice_dir) · 387 unmodified lines
388388 return draw_send_bar_slice(link, y, h, slice_dir, -1);
389389 }
390390
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+
391412 AVFilter avfilter_vf_pad = {
392413 .name = "pad",
393414 .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 = { · 2 unmodified lines
396417 .init = init,
397418 .query_formats = query_formats,
398419
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}},
420+ .inputs = avfilter_vf_pad_inputs,
421+
422+ .outputs = avfilter_vf_pad_outputs,
411423 };
libavfilter/vf_pixdesctest.c+23−11
@@ -126,6 +126,26 @@ static int draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir) · 125 unmodified lines
126126 return ff_draw_slice(inlink->dst->outputs[0], y, h, slice_dir);
127127 }
128128
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+
129149 AVFilter avfilter_vf_pixdesctest = {
130150 .name = "pixdesctest",
131151 .description = NULL_IF_CONFIG_SMALL("Test pixel format definitions."),
@@ -133,15 +153,7 @@ AVFilter avfilter_vf_pixdesctest = { · 1 unmodified line
133153 .priv_size = sizeof(PixdescTestContext),
134154 .uninit = uninit,
135155
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}},
156+ .inputs = avfilter_vf_pixdesctest_inputs,
157+
158+ .outputs = avfilter_vf_pixdesctest_outputs,
147159 };
libavfilter/vf_scale.c+22−10
@@ -395,6 +395,26 @@ static int draw_slice(AVFilterLink *link, int y, int h, int slice_dir) · 394 unmodified lines
395395 return ret;
396396 }
397397
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+
398418 AVFilter avfilter_vf_scale = {
399419 .name = "scale",
400420 .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 = { · 5 unmodified lines
406426
407427 .priv_size = sizeof(ScaleContext),
408428
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}},
429+ .inputs = avfilter_vf_scale_inputs,
430+ .outputs = avfilter_vf_scale_outputs,
419431 };
libavfilter/vf_select.c+26−14
@@ -417,6 +417,30 @@ static int query_formats(AVFilterContext *ctx) · 416 unmodified lines
417417 return 0;
418418 }
419419
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+
420444 AVFilter avfilter_vf_select = {
421445 .name = "select",
422446 .description = NULL_IF_CONFIG_SMALL("Select frames to pass in output."),
@@ -426,18 +450,6 @@ AVFilter avfilter_vf_select = { · 3 unmodified lines
426450
427451 .priv_size = sizeof(SelectContext),
428452
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}},
453+ .inputs = avfilter_vf_select_inputs,
454+ .outputs = avfilter_vf_select_outputs,
443455 };
libavfilter/vf_showinfo.c+23−11
@@ -85,6 +85,26 @@ static int end_frame(AVFilterLink *inlink) · 84 unmodified lines
8585 return ff_end_frame(inlink->dst->outputs[0]);
8686 }
8787
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+
88108 AVFilter avfilter_vf_showinfo = {
89109 .name = "showinfo",
90110 .description = NULL_IF_CONFIG_SMALL("Show textual information for each video frame."),
@@ -92,15 +112,7 @@ AVFilter avfilter_vf_showinfo = { · 1 unmodified line
92112 .priv_size = sizeof(ShowInfoContext),
93113 .init = init,
94114
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}},
115+ .inputs = avfilter_vf_showinfo_inputs,
116+
117+ .outputs = avfilter_vf_showinfo_outputs,
106118 };
libavfilter/vf_slicify.c+23−11
@@ -106,6 +106,27 @@ static int draw_slice(AVFilterLink *link, int y, int h, int slice_dir) · 105 unmodified lines
106106 return 0;
107107 }
108108
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+
109130 AVFilter avfilter_vf_slicify = {
110131 .name = "slicify",
111132 .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 = { · 2 unmodified lines
114135
115136 .priv_size = sizeof(SliceContext),
116137
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}},
138+ .inputs = avfilter_vf_slicify_inputs,
139+ .outputs = avfilter_vf_slicify_outputs,
128140 };
libavfilter/vf_transpose.c+24−12
@@ -266,6 +266,28 @@ static int draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir) · 265 unmodified lines
266266 return trans->passthrough ? ff_null_draw_slice(inlink, y, h, slice_dir) : 0;
267267 }
268268
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+
269291 AVFilter avfilter_vf_transpose = {
270292 .name = "transpose",
271293 .description = NULL_IF_CONFIG_SMALL("Transpose input video."),
@@ -275,17 +297,7 @@ AVFilter avfilter_vf_transpose = { · 3 unmodified lines
275297
276298 .query_formats = query_formats,
277299
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}},
300+ .inputs = avfilter_vf_transpose_inputs,
301+ .outputs = avfilter_vf_transpose_outputs,
290302 .priv_class = &transpose_class,
291303 };
libavfilter/vf_unsharp.c+23−11
@@ -237,6 +237,26 @@ static int draw_slice(AVFilterLink *link, int y, int h, int slice_dir) · 236 unmodified lines
237237 return 0;
238238 }
239239
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+
240260 AVFilter avfilter_vf_unsharp = {
241261 .name = "unsharp",
242262 .description = NULL_IF_CONFIG_SMALL("Sharpen or blur the input video."),
@@ -247,15 +267,7 @@ AVFilter avfilter_vf_unsharp = { · 4 unmodified lines
247267 .uninit = uninit,
248268 .query_formats = query_formats,
249269
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}},
270+ .inputs = avfilter_vf_unsharp_inputs,
271+
272+ .outputs = avfilter_vf_unsharp_outputs,
261273 };
libavfilter/vf_vflip.c+22−10
@@ -96,20 +96,32 @@ static int draw_slice(AVFilterLink *link, int y, int h, int slice_dir) · 95 unmodified lines
9696 return ff_draw_slice(ctx->outputs[0], link->h - (y+h), h, -1 * slice_dir);
9797 }
9898
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+
99119 AVFilter avfilter_vf_vflip = {
100120 .name = "vflip",
101121 .description = NULL_IF_CONFIG_SMALL("Flip the input video vertically."),
102122
103123 .priv_size = sizeof(FlipContext),
104124
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,
115127 };
libavfilter/vf_yadif.c+26−14
@@ -441,6 +441,29 @@ static int config_props(AVFilterLink *link) · 440 unmodified lines
441441 return 0;
442442 }
443443
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+
444467 AVFilter avfilter_vf_yadif = {
445468 .name = "yadif",
446469 .description = NULL_IF_CONFIG_SMALL("Deinterlace the input image."),
@@ -450,18 +473,7 @@ AVFilter avfilter_vf_yadif = { · 3 unmodified lines
450473 .uninit = uninit,
451474 .query_formats = query_formats,
452475
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}},
476+ .inputs = avfilter_vf_yadif_inputs,
477+
478+ .outputs = avfilter_vf_yadif_outputs,
467479 };
libavfilter/vsink_nullsink.c+11−9
@@ -30,20 +30,22 @@ static int end_frame(AVFilterLink *link) · 29 unmodified lines
3030 return 0;
3131 }
3232
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+
3343 AVFilter avfilter_vsink_nullsink = {
3444 .name = "nullsink",
3545 .description = NULL_IF_CONFIG_SMALL("Do absolutely nothing with the input video."),
3646
3747 .priv_size = 0,
3848
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,
4850 .outputs = NULL,
4951 };
libavfilter/vsrc_testsrc.c+22−11
@@ -525,6 +525,16 @@ static int test_query_formats(AVFilterContext *ctx) · 524 unmodified lines
525525 return 0;
526526 }
527527
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+
528538 AVFilter avfilter_vsrc_testsrc = {
529539 .name = "testsrc",
530540 .description = NULL_IF_CONFIG_SMALL("Generate test pattern."),
@@ -535,12 +545,7 @@ AVFilter avfilter_vsrc_testsrc = { · 4 unmodified lines
535545 .query_formats = test_query_formats,
536546
537547 .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 }},
548+ .outputs = avfilter_vsrc_testsrc_outputs,
544549 .priv_class = &testsrc_class,
545550 };
546551
@@ -639,6 +644,16 @@ static int rgbtest_config_props(AVFilterLink *outlink) · 92 unmodified lines
639644 return config_props(outlink);
640645 }
641646
647+static const AVFilterPad avfilter_vsrc_rgbtestsrc_outputs[] = {
648+ {
649+ .name = "default",
650+ .type = AVMEDIA_TYPE_VIDEO,
651+ .request_frame = request_frame,
652+ .config_props = rgbtest_config_props,
653+ },
654+ { NULL }
655+};
656+
642657 AVFilter avfilter_vsrc_rgbtestsrc = {
643658 .name = "rgbtestsrc",
644659 .description = NULL_IF_CONFIG_SMALL("Generate RGB test pattern."),
@@ -650,11 +665,7 @@ AVFilter avfilter_vsrc_rgbtestsrc = { · 5 unmodified lines
650665
651666 .inputs = NULL,
652667
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 }},
668+ .outputs = avfilter_vsrc_rgbtestsrc_outputs,
658669 .priv_class = &rgbtestsrc_class,
659670 };
660671
libavformat/mxfdec.c+3−0
@@ -951,6 +951,9 @@ static int mxf_get_sorted_table_segments(MXFContext *mxf, int *nb_sorted_segment · 950 unmodified lines
951951 if (mxf->metadata_sets[i]->type == IndexTableSegment)
952952 nb_segments++;
953953
954+ if (!nb_segments)
955+ return AVERROR_INVALIDDATA;
956+
954957 if (!(unsorted_segments = av_calloc(nb_segments, sizeof(*unsorted_segments))) ||
955958 !(*sorted_segments = av_calloc(nb_segments, sizeof(**sorted_segments)))) {
956959 av_freep(sorted_segments);
library.mak+2−2
@@ -25,7 +25,7 @@ $(TESTOBJS): CPPFLAGS += -DTEST · 24 unmodified lines
2525
2626 $(SUBDIR)$(LIBNAME): $(OBJS)
2727 $(RM) $@
28− $(AR) $(ARFLAGS) $(AR_O) $^ $(EXTRAOBJS)
28+ $(AR) $(ARFLAGS) $(AR_O) $^
2929 $(RANLIB) $@
3030
3131 install-headers: install-lib$(NAME)-headers install-lib$(NAME)-pkgconfig
@@ -45,7 +45,7 @@ $(SUBDIR)$(SLIBNAME): $(SUBDIR)$(SLIBNAME_WITH_MAJOR) · 13 unmodified lines
4545
4646 $(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) $(SUBDIR)lib$(NAME).ver
4747 $(SLIB_CREATE_DEF_CMD)
48− $$(LD) $(SHFLAGS) $(LDFLAGS) $$(LD_O) $$(filter %.o,$$^) $(FFEXTRALIBS) $(EXTRAOBJS)
48+ $$(LD) $(SHFLAGS) $(LDFLAGS) $$(LD_O) $$(filter %.o,$$^) $(FFEXTRALIBS)
4949 $(SLIB_EXTRA_CMD)
5050
5151 ifdef SUBDIR
tests/fate/vcodec.mak+3−0
@@ -79,6 +79,9 @@ fate-vsynth%-h261: ENCOPTS = -qscale 11 · 78 unmodified lines
7979 FATE_VCODEC += h263
8080 fate-vsynth%-h263: ENCOPTS = -qscale 10
8181
82+FATE_VCODEC += h263-obmc
83+fate-vsynth%-h263-obmc: ENCOPTS = -qscale 10 -obmc 1
84+
8285 FATE_VCODEC += h263p
8386 fate-vsynth%-h263p: ENCOPTS = -qscale 2 -flags +aic -umv 1 -aiv 1 -ps 300
8487
tests/ref/fate/vsynth1-h263-obmc+4−0
@@ -0,0 +1,4 @@
1+bdd8f9cafa39df97f2e395110f4419e0 *tests/data/fate/vsynth1-h263-obmc.avi
2+657328 tests/data/fate/vsynth1-h263-obmc.avi
3+844f7ee27fa122e199fe20987b41a15c *tests/data/fate/vsynth1-h263-obmc.out.rawvideo
4+stddev: 8.16 PSNR: 29.89 MAXDIFF: 113 bytes: 7603200/ 7603200
tests/ref/fate/vsynth2-h263-obmc+4−0
@@ -0,0 +1,4 @@
1+482d48074d94ed72b0c7057b9c129b45 *tests/data/fate/vsynth2-h263-obmc.avi
2+154738 tests/data/fate/vsynth2-h263-obmc.avi
3+588d992d9d8096da8bdc5027268da914 *tests/data/fate/vsynth2-h263-obmc.out.rawvideo
4+stddev: 5.39 PSNR: 33.49 MAXDIFF: 82 bytes: 7603200/ 7603200

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t