* 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
Unified · Split
| @@ -2160,7 +2160,7 @@ void show_help_default(const char *opt, const char *arg) · 2159 unmodified lines | ||
| 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) · 121 unmodified lines | ||
| 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, · 13 unmodified lines | ||
| 145 | 146 | deflate(&zs, Z_SYNC_FLUSH); |
| 146 | 147 | deflateEnd(&zs); |
| 147 | 148 | |
| 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 | + } | |
| 149 | 153 | |
| 150 | 154 | s->zstream.next_in = s->deflate_block; |
| 151 | 155 | s->zstream.avail_in = s->deflate_block_size - zs.avail_out; |
| 152 | 156 | s->zstream.next_out = s->tmpblock; |
| 153 | 157 | s->zstream.avail_out = s->block_size * 3; |
| 154 | 158 | inflate(&s->zstream, Z_SYNC_FLUSH); |
| 159 | + | |
| 160 | + return 0; | |
| 155 | 161 | } |
| 156 | 162 | |
| 157 | 163 | 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 | ||
| 164 | 170 | int k; |
| 165 | 171 | int ret = inflateReset(&s->zstream); |
| 166 | 172 | if (ret != Z_OK) { |
| 167 | − //return -1; | |
| 173 | + av_log(avctx, AV_LOG_ERROR, "Inflate reset error: %d\n", ret); | |
| 174 | + return AVERROR_UNKNOWN; | |
| 168 | 175 | } |
| 169 | 176 | 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, | |
| 171 | 178 | s->blocks[blk_idx].unp_size); |
| 179 | + if (ret < 0) | |
| 180 | + return ret; | |
| 172 | 181 | } |
| 173 | 182 | s->zstream.next_in = avpkt->data + get_bits_count(gb) / 8; |
| 174 | 183 | s->zstream.avail_in = block_size; |
| @@ -830,9 +830,9 @@ int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 829 unmodified lines | ||
| 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 @@ · 32 unmodified lines | ||
| 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, · 1 unmodified line | ||
| 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, · 142 unmodified lines | ||
| 189 | 190 | } |
| 190 | 191 | |
| 191 | 192 | 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) | |
| 193 | 194 | { |
| 194 | 195 | int x, y, indx, b0, b1, b2, b3, p0, p1, p2, p3; |
| 195 | 196 | const IDWTELEM *b0_ptr, *b1_ptr, *b2_ptr, *b3_ptr; |
| @@ -38,10 +38,9 @@ · 37 unmodified lines | ||
| 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, · 1 unmodified line | ||
| 49 | 48 | * @param[in] plane pointer to the descriptor of the plane being processed |
| 50 | 49 | * @param[out] dst pointer to the destination buffer |
| 51 | 50 | * @param[in] dst_pitch pitch of the destination buffer |
| 52 | − * @param[in] num_bands number of wavelet bands to be processed | |
| 53 | 51 | */ |
| 54 | 52 | 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); | |
| 56 | 54 | |
| 57 | 55 | /** |
| 58 | 56 | * two-dimensional inverse Haar 8x8 transform for Indeo 4 |
| @@ -1274,6 +1274,11 @@ int ff_vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb) · 1273 unmodified lines | ||
| 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, · 1574 unmodified lines | ||
| 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) · 125 unmodified lines | ||
| 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 = { · 1 unmodified line | ||
| 133 | 149 | .query_formats = query_formats, |
| 134 | 150 | .priv_size = sizeof(AFormatContext), |
| 135 | 151 | |
| 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, | |
| 143 | 155 | }; |
| @@ -542,6 +542,16 @@ static int query_formats(AVFilterContext *ctx) · 541 unmodified lines | ||
| 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 = { · 4 unmodified lines | ||
| 552 | 562 | .query_formats = query_formats, |
| 553 | 563 | |
| 554 | 564 | .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, | |
| 560 | 566 | .priv_class = &amix_class, |
| 561 | 567 | }; |
| @@ -27,18 +27,30 @@ · 26 unmodified lines | ||
| 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: · 232 unmodified lines | ||
| 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 = { · 3 unmodified lines | ||
| 242 | 261 | |
| 243 | 262 | .priv_size = sizeof(ASyncContext), |
| 244 | 263 | |
| 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, | |
| 254 | 266 | .priv_class = &asyncts_class, |
| 255 | 267 | }; |
| @@ -385,6 +385,25 @@ static int channelmap_config_input(AVFilterLink *inlink) · 384 unmodified lines | ||
| 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 = { · 1 unmodified line | ||
| 392 | 411 | .query_formats = channelmap_query_formats, |
| 393 | 412 | .priv_size = sizeof(ChannelMapContext), |
| 394 | 413 | |
| 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, | |
| 405 | 417 | }; |
| @@ -130,6 +130,15 @@ static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *buf) · 129 unmodified lines | ||
| 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 = { · 2 unmodified lines | ||
| 138 | 147 | .init = init, |
| 139 | 148 | .query_formats = query_formats, |
| 140 | 149 | |
| 141 | − .inputs = (const AVFilterPad[]){{ .name = "default", | |
| 142 | − .type = AVMEDIA_TYPE_AUDIO, | |
| 143 | − .filter_samples = filter_samples, }, | |
| 144 | − { NULL }}, | |
| 150 | + .inputs = avfilter_af_channelsplit_inputs, | |
| 145 | 151 | .outputs = NULL, |
| 146 | 152 | .priv_class = &channelsplit_class, |
| 147 | 153 | }; |
| @@ -484,6 +484,16 @@ fail: · 483 unmodified lines | ||
| 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 = { · 5 unmodified lines | ||
| 495 | 505 | .query_formats = join_query_formats, |
| 496 | 506 | |
| 497 | 507 | .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, | |
| 503 | 509 | .priv_class = &join_class, |
| 504 | 510 | }; |
| @@ -239,6 +239,26 @@ fail: · 238 unmodified lines | ||
| 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 = { · 2 unmodified lines | ||
| 247 | 267 | .uninit = uninit, |
| 248 | 268 | .query_formats = query_formats, |
| 249 | 269 | |
| 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, | |
| 260 | 272 | }; |
| @@ -27,19 +27,21 @@ static int null_filter_samples(AVFilterLink *link, AVFilterBufferRef *samplesref · 26 unmodified lines | ||
| 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) · 118 unmodified lines | ||
| 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 = { · 3 unmodified lines | ||
| 128 | 138 | |
| 129 | 139 | .inputs = NULL, |
| 130 | 140 | |
| 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, | |
| 136 | 142 | .priv_class = &anullsrc_class, |
| 137 | 143 | }; |
| @@ -140,6 +140,17 @@ int ff_buffersink_read_samples_compat(AVFilterContext *ctx, AVFilterBufferRef ** · 139 unmodified lines | ||
| 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 = { · 4 unmodified lines | ||
| 150 | 161 | .priv_size = sizeof(BufferSinkContext), |
| 151 | 162 | .uninit = uninit, |
| 152 | 163 | |
| 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, | |
| 159 | 165 | .outputs = NULL, |
| 160 | 166 | }; |
| 161 | 167 | |
| 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 | + | |
| 162 | 179 | AVFilter avfilter_asink_abuffer = { |
| 163 | 180 | #if AV_HAVE_INCOMPATIBLE_FORK_ABI |
| 164 | 181 | .name = "abuffersink", |
| @@ -169,11 +186,6 @@ AVFilter avfilter_asink_abuffer = { · 4 unmodified lines | ||
| 169 | 186 | .priv_size = sizeof(BufferSinkContext), |
| 170 | 187 | .uninit = uninit, |
| 171 | 188 | |
| 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, | |
| 178 | 190 | .outputs = NULL, |
| 179 | 191 | }; |
| @@ -400,6 +400,17 @@ static int poll_frame(AVFilterLink *link) · 399 unmodified lines | ||
| 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 = { · 4 unmodified lines | ||
| 410 | 421 | .uninit = uninit, |
| 411 | 422 | |
| 412 | 423 | .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, | |
| 419 | 425 | .priv_class = &buffer_class, |
| 420 | 426 | }; |
| 421 | 427 | |
| 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 | + | |
| 422 | 439 | AVFilter avfilter_asrc_abuffer = { |
| 423 | 440 | .name = "abuffer", |
| 424 | 441 | .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 | ||
| 429 | 446 | .uninit = uninit, |
| 430 | 447 | |
| 431 | 448 | .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, | |
| 438 | 450 | .priv_class = &abuffer_class, |
| 439 | 451 | }; |
| @@ -216,6 +216,25 @@ AVFilter avfilter_af_asetpts = { · 215 unmodified lines | ||
| 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 = { · 2 unmodified lines | ||
| 224 | 243 | |
| 225 | 244 | .priv_size = sizeof(SetPTSContext), |
| 226 | 245 | |
| 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, | |
| 236 | 248 | }; |
| 237 | 249 | #endif /* CONFIG_SETPTS_FILTER */ |
| @@ -137,6 +137,26 @@ static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *samplesref) · 136 unmodified lines | ||
| 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 = { · 1 unmodified line | ||
| 144 | 164 | |
| 145 | 165 | .priv_size = sizeof(SetTBContext), |
| 146 | 166 | |
| 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, | |
| 161 | 169 | }; |
| 162 | 170 | #endif |
| 163 | 171 | |
| @@ -267,6 +267,28 @@ static int request_frame(AVFilterLink *outlink) · 266 unmodified lines | ||
| 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 = { · 3 unmodified lines | ||
| 276 | 298 | |
| 277 | 299 | .priv_size = sizeof(FifoContext), |
| 278 | 300 | |
| 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 } | |
| 291 | 323 | }; |
| 292 | 324 | |
| 293 | 325 | AVFilter avfilter_af_afifo = { |
| @@ -299,14 +331,6 @@ AVFilter avfilter_af_afifo = { · 5 unmodified lines | ||
| 299 | 331 | |
| 300 | 332 | .priv_size = sizeof(FifoContext), |
| 301 | 333 | |
| 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, | |
| 312 | 336 | }; |
| @@ -119,6 +119,18 @@ static int end_frame(AVFilterLink *inlink) · 118 unmodified lines | ||
| 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 = { · 1 unmodified line | ||
| 126 | 138 | .init = split_init, |
| 127 | 139 | .uninit = split_uninit, |
| 128 | 140 | |
| 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, | |
| 136 | 142 | .outputs = NULL, |
| 137 | 143 | }; |
| 138 | 144 | |
| @@ -157,6 +163,16 @@ static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *samplesref) · 18 unmodified lines | ||
| 157 | 163 | return ret; |
| 158 | 164 | } |
| 159 | 165 | |
| 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 | + | |
| 160 | 176 | AVFilter avfilter_af_asplit = { |
| 161 | 177 | .name = "asplit", |
| 162 | 178 | .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 | ||
| 164 | 180 | .init = split_init, |
| 165 | 181 | .uninit = split_uninit, |
| 166 | 182 | |
| 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, | |
| 172 | 184 | .outputs = NULL, |
| 173 | 185 | }; |
| @@ -79,6 +79,26 @@ static int setdar_config_props(AVFilterLink *inlink) · 78 unmodified lines | ||
| 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 = { · 2 unmodified lines | ||
| 87 | 107 | |
| 88 | 108 | .priv_size = sizeof(AspectContext), |
| 89 | 109 | |
| 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, | |
| 101 | 113 | }; |
| 102 | 114 | #endif /* CONFIG_SETDAR_FILTER */ |
| 103 | 115 | |
| @@ -111,6 +123,26 @@ static int setsar_config_props(AVFilterLink *inlink) · 7 unmodified lines | ||
| 111 | 123 | return 0; |
| 112 | 124 | } |
| 113 | 125 | |
| 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 | + | |
| 114 | 146 | AVFilter avfilter_vf_setsar = { |
| 115 | 147 | .name = "setsar", |
| 116 | 148 | .description = NULL_IF_CONFIG_SMALL("Set the pixel sample aspect ratio."), |
| @@ -119,16 +151,8 @@ AVFilter avfilter_vf_setsar = { · 2 unmodified lines | ||
| 119 | 151 | |
| 120 | 152 | .priv_size = sizeof(AspectContext), |
| 121 | 153 | |
| 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, | |
| 133 | 157 | }; |
| 134 | 158 | #endif /* CONFIG_SETSAR_FILTER */ |
| @@ -121,6 +121,26 @@ static int end_frame(AVFilterLink *inlink) · 120 unmodified lines | ||
| 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 = { · 3 unmodified lines | ||
| 130 | 150 | |
| 131 | 151 | .query_formats = query_formats, |
| 132 | 152 | |
| 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, | |
| 144 | 156 | }; |
| @@ -332,6 +332,26 @@ static int end_frame(AVFilterLink *inlink) · 331 unmodified lines | ||
| 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 = { · 2 unmodified lines | ||
| 340 | 360 | .uninit = uninit, |
| 341 | 361 | .query_formats = query_formats, |
| 342 | 362 | |
| 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, | |
| 353 | 365 | }; |
| @@ -26,18 +26,30 @@ · 25 unmodified lines | ||
| 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) · 344 unmodified lines | ||
| 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 = { · 4 unmodified lines | ||
| 355 | 377 | .init = init, |
| 356 | 378 | .uninit = uninit, |
| 357 | 379 | |
| 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, | |
| 370 | 382 | }; |
| @@ -197,6 +197,26 @@ static int end_frame(AVFilterLink *inlink) · 196 unmodified lines | ||
| 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 = { · 3 unmodified lines | ||
| 206 | 226 | |
| 207 | 227 | .query_formats = query_formats, |
| 208 | 228 | |
| 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, | |
| 220 | 232 | }; |
| @@ -245,6 +245,27 @@ static int end_frame(AVFilterLink *inlink) · 244 unmodified lines | ||
| 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 = { · 1 unmodified line | ||
| 252 | 273 | .init = init, |
| 253 | 274 | .query_formats = query_formats, |
| 254 | 275 | |
| 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, | |
| 266 | 278 | }; |
| @@ -124,6 +124,28 @@ static int draw_slice(AVFilterLink *inlink, int y0, int h, int slice_dir) · 123 unmodified lines | ||
| 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 = { · 1 unmodified line | ||
| 131 | 153 | .init = init, |
| 132 | 154 | |
| 133 | 155 | .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, | |
| 146 | 158 | }; |
| @@ -810,6 +810,29 @@ static int end_frame(AVFilterLink *inlink) · 809 unmodified lines | ||
| 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 = { · 2 unmodified lines | ||
| 818 | 841 | .uninit = uninit, |
| 819 | 842 | .query_formats = query_formats, |
| 820 | 843 | |
| 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, | |
| 834 | 846 | .process_command = command, |
| 835 | 847 | .priv_class = &drawtext_class, |
| 836 | 848 | }; |
| @@ -276,6 +276,28 @@ static int end_frame(AVFilterLink *inlink) · 275 unmodified lines | ||
| 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 = { · 2 unmodified lines | ||
| 284 | 306 | .priv_size = sizeof(FadeContext), |
| 285 | 307 | .query_formats = query_formats, |
| 286 | 308 | |
| 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, | |
| 299 | 311 | .priv_class = &fade_class, |
| 300 | 312 | }; |
| @@ -234,22 +234,34 @@ static int end_frame(AVFilterLink *inlink) · 233 unmodified lines | ||
| 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) · 96 unmodified lines | ||
| 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 = { · 4 unmodified lines | ||
| 107 | 127 | |
| 108 | 128 | .priv_size = sizeof(FormatContext), |
| 109 | 129 | |
| 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, | |
| 120 | 132 | }; |
| 121 | 133 | #endif /* CONFIG_FORMAT_FILTER */ |
| 122 | 134 | |
| @@ -127,6 +139,26 @@ static int query_formats_noformat(AVFilterContext *ctx) · 4 unmodified lines | ||
| 127 | 139 | return 0; |
| 128 | 140 | } |
| 129 | 141 | |
| 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 | + | |
| 130 | 162 | AVFilter avfilter_vf_noformat = { |
| 131 | 163 | .name = "noformat", |
| 132 | 164 | .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 | ||
| 137 | 169 | |
| 138 | 170 | .priv_size = sizeof(FormatContext), |
| 139 | 171 | |
| 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, | |
| 150 | 174 | }; |
| 151 | 175 | #endif /* CONFIG_NOFORMAT_FILTER */ |
| @@ -279,6 +279,29 @@ static int null_draw_slice(AVFilterLink *link, int y, int h, int slice_dir) · 278 unmodified lines | ||
| 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 = { · 3 unmodified lines | ||
| 288 | 311 | |
| 289 | 312 | .priv_size = sizeof(FPSContext), |
| 290 | 313 | |
| 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, | |
| 304 | 316 | .priv_class = &fps_class, |
| 305 | 317 | }; |
| @@ -368,6 +368,26 @@ static int end_frame(AVFilterLink *inlink) · 367 unmodified lines | ||
| 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 = { · 4 unmodified lines | ||
| 378 | 398 | |
| 379 | 399 | .priv_size = sizeof(Frei0rContext), |
| 380 | 400 | |
| 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, | |
| 392 | 404 | }; |
| 393 | 405 | |
| 394 | 406 | static av_cold int source_init(AVFilterContext *ctx, const char *args) |
| @@ -478,6 +490,16 @@ fail: · 83 unmodified lines | ||
| 478 | 490 | return ret; |
| 479 | 491 | } |
| 480 | 492 | |
| 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 | + | |
| 481 | 503 | AVFilter avfilter_vsrc_frei0r_src = { |
| 482 | 504 | .name = "frei0r_src", |
| 483 | 505 | .description = NULL_IF_CONFIG_SMALL("Generate a frei0r source."), |
| @@ -490,9 +512,5 @@ AVFilter avfilter_vsrc_frei0r_src = { · 6 unmodified lines | ||
| 490 | 512 | |
| 491 | 513 | .inputs = NULL, |
| 492 | 514 | |
| 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, | |
| 498 | 516 | }; |
| @@ -216,6 +216,27 @@ static int end_frame(AVFilterLink *inlink) · 215 unmodified lines | ||
| 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 = { · 2 unmodified lines | ||
| 224 | 245 | .uninit = uninit, |
| 225 | 246 | .query_formats = query_formats, |
| 226 | 247 | |
| 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, | |
| 238 | 250 | }; |
| @@ -165,20 +165,32 @@ static int draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir) · 164 unmodified lines | ||
| 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) · 347 unmodified lines | ||
| 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 = { · 3 unmodified lines | ||
| 357 | 377 | .uninit = uninit, |
| 358 | 378 | .query_formats = query_formats, |
| 359 | 379 | |
| 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, | |
| 371 | 383 | }; |
| @@ -376,6 +376,25 @@ static int end_frame(AVFilterLink *inlink) · 375 unmodified lines | ||
| 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 = { · 4 unmodified lines | ||
| 386 | 405 | .init = init, |
| 387 | 406 | .uninit = uninit, |
| 388 | 407 | |
| 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, | |
| 395 | 409 | |
| 396 | − .outputs = (const AVFilterPad[]) {{ .name = "default", | |
| 397 | − .type = AVMEDIA_TYPE_VIDEO, }, | |
| 398 | − { .name = NULL}}, | |
| 410 | + .outputs = avfilter_vf_ocv_outputs, | |
| 399 | 411 | }; |
| @@ -26,20 +26,32 @@ · 25 unmodified lines | ||
| 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) · 606 unmodified lines | ||
| 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 = { · 5 unmodified lines | ||
| 618 | 652 | |
| 619 | 653 | .query_formats = query_formats, |
| 620 | 654 | |
| 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, | |
| 643 | 657 | .priv_class = &overlay_class, |
| 644 | 658 | }; |
| @@ -388,6 +388,27 @@ static int draw_slice(AVFilterLink *link, int y, int h, int slice_dir) · 387 unmodified lines | ||
| 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 = { · 2 unmodified lines | ||
| 396 | 417 | .init = init, |
| 397 | 418 | .query_formats = query_formats, |
| 398 | 419 | |
| 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, | |
| 411 | 423 | }; |
| @@ -126,6 +126,26 @@ static int draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir) · 125 unmodified lines | ||
| 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 = { · 1 unmodified line | ||
| 133 | 153 | .priv_size = sizeof(PixdescTestContext), |
| 134 | 154 | .uninit = uninit, |
| 135 | 155 | |
| 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, | |
| 147 | 159 | }; |
| @@ -395,6 +395,26 @@ static int draw_slice(AVFilterLink *link, int y, int h, int slice_dir) · 394 unmodified lines | ||
| 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 = { · 5 unmodified lines | ||
| 406 | 426 | |
| 407 | 427 | .priv_size = sizeof(ScaleContext), |
| 408 | 428 | |
| 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, | |
| 419 | 431 | }; |
| @@ -417,6 +417,30 @@ static int query_formats(AVFilterContext *ctx) · 416 unmodified lines | ||
| 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 = { · 3 unmodified lines | ||
| 426 | 450 | |
| 427 | 451 | .priv_size = sizeof(SelectContext), |
| 428 | 452 | |
| 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, | |
| 443 | 455 | }; |
| @@ -85,6 +85,26 @@ static int end_frame(AVFilterLink *inlink) · 84 unmodified lines | ||
| 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 = { · 1 unmodified line | ||
| 92 | 112 | .priv_size = sizeof(ShowInfoContext), |
| 93 | 113 | .init = init, |
| 94 | 114 | |
| 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, | |
| 106 | 118 | }; |
| @@ -106,6 +106,27 @@ static int draw_slice(AVFilterLink *link, int y, int h, int slice_dir) · 105 unmodified lines | ||
| 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 = { · 2 unmodified lines | ||
| 114 | 135 | |
| 115 | 136 | .priv_size = sizeof(SliceContext), |
| 116 | 137 | |
| 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, | |
| 128 | 140 | }; |
| @@ -266,6 +266,28 @@ static int draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir) · 265 unmodified lines | ||
| 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 = { · 3 unmodified lines | ||
| 275 | 297 | |
| 276 | 298 | .query_formats = query_formats, |
| 277 | 299 | |
| 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, | |
| 290 | 302 | .priv_class = &transpose_class, |
| 291 | 303 | }; |
| @@ -237,6 +237,26 @@ static int draw_slice(AVFilterLink *link, int y, int h, int slice_dir) · 236 unmodified lines | ||
| 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 = { · 4 unmodified lines | ||
| 247 | 267 | .uninit = uninit, |
| 248 | 268 | .query_formats = query_formats, |
| 249 | 269 | |
| 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, | |
| 261 | 273 | }; |
| @@ -96,20 +96,32 @@ static int draw_slice(AVFilterLink *link, int y, int h, int slice_dir) · 95 unmodified lines | ||
| 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) · 440 unmodified lines | ||
| 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 = { · 3 unmodified lines | ||
| 450 | 473 | .uninit = uninit, |
| 451 | 474 | .query_formats = query_formats, |
| 452 | 475 | |
| 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, | |
| 467 | 479 | }; |
| @@ -30,20 +30,22 @@ static int end_frame(AVFilterLink *link) · 29 unmodified lines | ||
| 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) · 524 unmodified lines | ||
| 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 = { · 4 unmodified lines | ||
| 535 | 545 | .query_formats = test_query_formats, |
| 536 | 546 | |
| 537 | 547 | .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, | |
| 544 | 549 | .priv_class = &testsrc_class, |
| 545 | 550 | }; |
| 546 | 551 | |
| @@ -639,6 +644,16 @@ static int rgbtest_config_props(AVFilterLink *outlink) · 92 unmodified lines | ||
| 639 | 644 | return config_props(outlink); |
| 640 | 645 | } |
| 641 | 646 | |
| 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 | + | |
| 642 | 657 | AVFilter avfilter_vsrc_rgbtestsrc = { |
| 643 | 658 | .name = "rgbtestsrc", |
| 644 | 659 | .description = NULL_IF_CONFIG_SMALL("Generate RGB test pattern."), |
| @@ -650,11 +665,7 @@ AVFilter avfilter_vsrc_rgbtestsrc = { · 5 unmodified lines | ||
| 650 | 665 | |
| 651 | 666 | .inputs = NULL, |
| 652 | 667 | |
| 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, | |
| 658 | 669 | .priv_class = &rgbtestsrc_class, |
| 659 | 670 | }; |
| 660 | 671 | |
| @@ -951,6 +951,9 @@ static int mxf_get_sorted_table_segments(MXFContext *mxf, int *nb_sorted_segment · 950 unmodified lines | ||
| 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 · 24 unmodified lines | ||
| 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) · 13 unmodified lines | ||
| 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 · 78 unmodified lines | ||
| 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 | |
| @@ -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 | |
| @@ -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 | |