Browse Source

Merge commit '4436f25a1682ada3f7226cb6fadf429946933161'

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

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

Merged-by: Michael Niedermayer <michaelni@gmx.at>
tags/n1.1
Michael Niedermayer 13 years ago
parent
commit
526cb36e4b
60 changed files with 1158 additions and 564 deletions
  1. +1
    -1
      ffmpeg_opt.c
  2. +14
    -5
      libavcodec/flashsv.c
  3. +2
    -2
      libavcodec/ivi_common.c
  4. +3
    -2
      libavcodec/ivi_dsp.c
  5. +2
    -4
      libavcodec/ivi_dsp.h
  6. +5
    -0
      libavcodec/vc1.c
  7. +0
    -4
      libavcodec/vc1dec.c
  8. +19
    -7
      libavfilter/af_aformat.c
  9. +11
    -5
      libavfilter/af_amix.c
  10. +19
    -7
      libavfilter/af_anull.c
  11. +21
    -9
      libavfilter/af_asyncts.c
  12. +22
    -10
      libavfilter/af_channelmap.c
  13. +10
    -4
      libavfilter/af_channelsplit.c
  14. +11
    -5
      libavfilter/af_join.c
  15. +22
    -10
      libavfilter/af_resample.c
  16. +10
    -8
      libavfilter/asink_anullsink.c
  17. +11
    -5
      libavfilter/asrc_anullsrc.c
  18. +24
    -12
      libavfilter/buffersink.c
  19. +24
    -12
      libavfilter/buffersrc.c
  20. +21
    -9
      libavfilter/f_setpts.c
  21. +22
    -14
      libavfilter/f_settb.c
  22. +46
    -22
      libavfilter/fifo.c
  23. +24
    -12
      libavfilter/split.c
  24. +46
    -22
      libavfilter/vf_aspect.c
  25. +23
    -11
      libavfilter/vf_blackframe.c
  26. +22
    -10
      libavfilter/vf_boxblur.c
  27. +22
    -10
      libavfilter/vf_copy.c
  28. +24
    -12
      libavfilter/vf_crop.c
  29. +23
    -11
      libavfilter/vf_cropdetect.c
  30. +23
    -11
      libavfilter/vf_delogo.c
  31. +24
    -12
      libavfilter/vf_drawbox.c
  32. +25
    -13
      libavfilter/vf_drawtext.c
  33. +24
    -12
      libavfilter/vf_fade.c
  34. +24
    -12
      libavfilter/vf_fieldorder.c
  35. +44
    -20
      libavfilter/vf_format.c
  36. +25
    -13
      libavfilter/vf_fps.c
  37. +34
    -16
      libavfilter/vf_frei0r.c
  38. +23
    -11
      libavfilter/vf_gradfun.c
  39. +22
    -10
      libavfilter/vf_hflip.c
  40. +23
    -11
      libavfilter/vf_hqdn3d.c
  41. +21
    -9
      libavfilter/vf_libopencv.c
  42. +21
    -9
      libavfilter/vf_null.c
  43. +36
    -22
      libavfilter/vf_overlay.c
  44. +24
    -12
      libavfilter/vf_pad.c
  45. +23
    -11
      libavfilter/vf_pixdesctest.c
  46. +22
    -10
      libavfilter/vf_scale.c
  47. +26
    -14
      libavfilter/vf_select.c
  48. +23
    -11
      libavfilter/vf_showinfo.c
  49. +23
    -11
      libavfilter/vf_slicify.c
  50. +24
    -12
      libavfilter/vf_transpose.c
  51. +23
    -11
      libavfilter/vf_unsharp.c
  52. +22
    -10
      libavfilter/vf_vflip.c
  53. +26
    -14
      libavfilter/vf_yadif.c
  54. +11
    -9
      libavfilter/vsink_nullsink.c
  55. +22
    -11
      libavfilter/vsrc_testsrc.c
  56. +3
    -0
      libavformat/mxfdec.c
  57. +2
    -2
      library.mak
  58. +3
    -0
      tests/fate/vcodec.mak
  59. +4
    -0
      tests/ref/fate/vsynth1-h263-obmc
  60. +4
    -0
      tests/ref/fate/vsynth2-h263-obmc

+ 1
- 1
ffmpeg_opt.c View File

@@ -2160,7 +2160,7 @@ void show_help_default(const char *opt, const char *arg)
const int per_file = OPT_SPEC | OPT_OFFSET | OPT_PERFILE; const int per_file = OPT_SPEC | OPT_OFFSET | OPT_PERFILE;
int show_advanced = 0, show_avoptions = 0; int show_advanced = 0, show_avoptions = 0;


if (opt) {
if (opt && *opt) {
if (!strcmp(opt, "long")) if (!strcmp(opt, "long"))
show_advanced = 1; show_advanced = 1;
else if (!strcmp(opt, "full")) else if (!strcmp(opt, "full"))


+ 14
- 5
libavcodec/flashsv.c View File

@@ -122,10 +122,11 @@ static av_cold int flashsv_decode_init(AVCodecContext *avctx)
} }




static void flashsv2_prime(FlashSVContext *s, uint8_t *src,
int size, int unp_size)
static int flashsv2_prime(FlashSVContext *s, uint8_t *src,
int size, int unp_size)
{ {
z_stream zs; z_stream zs;
int zret; // Zlib return code


zs.zalloc = NULL; zs.zalloc = NULL;
zs.zfree = NULL; zs.zfree = NULL;
@@ -145,13 +146,18 @@ static void flashsv2_prime(FlashSVContext *s, uint8_t *src,
deflate(&zs, Z_SYNC_FLUSH); deflate(&zs, Z_SYNC_FLUSH);
deflateEnd(&zs); deflateEnd(&zs);


inflateReset(&s->zstream);
if ((zret = inflateReset(&s->zstream)) != Z_OK) {
av_log(s->avctx, AV_LOG_ERROR, "Inflate reset error: %d\n", zret);
return AVERROR_UNKNOWN;
}


s->zstream.next_in = s->deflate_block; s->zstream.next_in = s->deflate_block;
s->zstream.avail_in = s->deflate_block_size - zs.avail_out; s->zstream.avail_in = s->deflate_block_size - zs.avail_out;
s->zstream.next_out = s->tmpblock; s->zstream.next_out = s->tmpblock;
s->zstream.avail_out = s->block_size * 3; s->zstream.avail_out = s->block_size * 3;
inflate(&s->zstream, Z_SYNC_FLUSH); inflate(&s->zstream, Z_SYNC_FLUSH);

return 0;
} }


static int flashsv_decode_block(AVCodecContext *avctx, AVPacket *avpkt, static int flashsv_decode_block(AVCodecContext *avctx, AVPacket *avpkt,
@@ -164,11 +170,14 @@ static int flashsv_decode_block(AVCodecContext *avctx, AVPacket *avpkt,
int k; int k;
int ret = inflateReset(&s->zstream); int ret = inflateReset(&s->zstream);
if (ret != Z_OK) { if (ret != Z_OK) {
//return -1;
av_log(avctx, AV_LOG_ERROR, "Inflate reset error: %d\n", ret);
return AVERROR_UNKNOWN;
} }
if (s->zlibprime_curr || s->zlibprime_prev) { if (s->zlibprime_curr || s->zlibprime_prev) {
flashsv2_prime(s, s->blocks[blk_idx].pos, s->blocks[blk_idx].size,
ret = flashsv2_prime(s, s->blocks[blk_idx].pos, s->blocks[blk_idx].size,
s->blocks[blk_idx].unp_size); s->blocks[blk_idx].unp_size);
if (ret < 0)
return ret;
} }
s->zstream.next_in = avpkt->data + get_bits_count(gb) / 8; s->zstream.next_in = avpkt->data + get_bits_count(gb) / 8;
s->zstream.avail_in = block_size; s->zstream.avail_in = block_size;


+ 2
- 2
libavcodec/ivi_common.c View File

@@ -830,9 +830,9 @@ int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *data_size,


if (ctx->is_scalable) { if (ctx->is_scalable) {
if (avctx->codec_id == AV_CODEC_ID_INDEO4) if (avctx->codec_id == AV_CODEC_ID_INDEO4)
ff_ivi_recompose_haar(&ctx->planes[0], ctx->frame.data[0], ctx->frame.linesize[0], 4);
ff_ivi_recompose_haar(&ctx->planes[0], ctx->frame.data[0], ctx->frame.linesize[0]);
else else
ff_ivi_recompose53 (&ctx->planes[0], ctx->frame.data[0], ctx->frame.linesize[0], 4);
ff_ivi_recompose53 (&ctx->planes[0], ctx->frame.data[0], ctx->frame.linesize[0]);
} else { } else {
ff_ivi_output_plane(&ctx->planes[0], ctx->frame.data[0], ctx->frame.linesize[0]); ff_ivi_output_plane(&ctx->planes[0], ctx->frame.data[0], ctx->frame.linesize[0]);
} }


+ 3
- 2
libavcodec/ivi_dsp.c View File

@@ -33,7 +33,7 @@
#include "ivi_dsp.h" #include "ivi_dsp.h"


void ff_ivi_recompose53(const IVIPlaneDesc *plane, uint8_t *dst, void ff_ivi_recompose53(const IVIPlaneDesc *plane, uint8_t *dst,
const int dst_pitch, const int num_bands)
const int dst_pitch)
{ {
int x, y, indx; int x, y, indx;
int32_t p0, p1, p2, p3, tmp0, tmp1, tmp2; int32_t p0, p1, p2, p3, tmp0, tmp1, tmp2;
@@ -41,6 +41,7 @@ void ff_ivi_recompose53(const IVIPlaneDesc *plane, uint8_t *dst,
int32_t b3_1, b3_2, b3_3, b3_4, b3_5, b3_6, b3_7, b3_8, b3_9; int32_t b3_1, b3_2, b3_3, b3_4, b3_5, b3_6, b3_7, b3_8, b3_9;
int32_t pitch, back_pitch; int32_t pitch, back_pitch;
const IDWTELEM *b0_ptr, *b1_ptr, *b2_ptr, *b3_ptr; const IDWTELEM *b0_ptr, *b1_ptr, *b2_ptr, *b3_ptr;
const int num_bands = 4;


/* all bands should have the same pitch */ /* all bands should have the same pitch */
pitch = plane->bands[0].pitch; pitch = plane->bands[0].pitch;
@@ -189,7 +190,7 @@ void ff_ivi_recompose53(const IVIPlaneDesc *plane, uint8_t *dst,
} }


void ff_ivi_recompose_haar(const IVIPlaneDesc *plane, uint8_t *dst, void ff_ivi_recompose_haar(const IVIPlaneDesc *plane, uint8_t *dst,
const int dst_pitch, const int num_bands)
const int dst_pitch)
{ {
int x, y, indx, b0, b1, b2, b3, p0, p1, p2, p3; int x, y, indx, b0, b1, b2, b3, p0, p1, p2, p3;
const IDWTELEM *b0_ptr, *b1_ptr, *b2_ptr, *b3_ptr; const IDWTELEM *b0_ptr, *b1_ptr, *b2_ptr, *b3_ptr;


+ 2
- 4
libavcodec/ivi_dsp.h View File

@@ -38,10 +38,9 @@
* @param[in] plane pointer to the descriptor of the plane being processed * @param[in] plane pointer to the descriptor of the plane being processed
* @param[out] dst pointer to the destination buffer * @param[out] dst pointer to the destination buffer
* @param[in] dst_pitch pitch of the destination buffer * @param[in] dst_pitch pitch of the destination buffer
* @param[in] num_bands number of wavelet bands to be processed
*/ */
void ff_ivi_recompose53(const IVIPlaneDesc *plane, uint8_t *dst, void ff_ivi_recompose53(const IVIPlaneDesc *plane, uint8_t *dst,
const int dst_pitch, const int num_bands);
const int dst_pitch);


/** /**
* Haar wavelet recomposition filter for Indeo 4 * Haar wavelet recomposition filter for Indeo 4
@@ -49,10 +48,9 @@ void ff_ivi_recompose53(const IVIPlaneDesc *plane, uint8_t *dst,
* @param[in] plane pointer to the descriptor of the plane being processed * @param[in] plane pointer to the descriptor of the plane being processed
* @param[out] dst pointer to the destination buffer * @param[out] dst pointer to the destination buffer
* @param[in] dst_pitch pitch of the destination buffer * @param[in] dst_pitch pitch of the destination buffer
* @param[in] num_bands number of wavelet bands to be processed
*/ */
void ff_ivi_recompose_haar(const IVIPlaneDesc *plane, uint8_t *dst, void ff_ivi_recompose_haar(const IVIPlaneDesc *plane, uint8_t *dst,
const int dst_pitch, const int num_bands);
const int dst_pitch);


/** /**
* two-dimensional inverse Haar 8x8 transform for Indeo 4 * two-dimensional inverse Haar 8x8 transform for Indeo 4


+ 5
- 0
libavcodec/vc1.c View File

@@ -1274,6 +1274,11 @@ int ff_vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
break; break;
} }


if (v->fcm != PROGRESSIVE && !v->s.quarter_sample) {
v->range_x <<= 1;
v->range_y <<= 1;
}

/* AC Syntax */ /* AC Syntax */
v->c_ac_table_index = decode012(gb); v->c_ac_table_index = decode012(gb);
if (v->s.pict_type == AV_PICTURE_TYPE_I || v->s.pict_type == AV_PICTURE_TYPE_BI) { if (v->s.pict_type == AV_PICTURE_TYPE_I || v->s.pict_type == AV_PICTURE_TYPE_BI) {


+ 0
- 4
libavcodec/vc1dec.c View File

@@ -1575,10 +1575,6 @@ static inline void vc1_pred_mv(VC1Context *v, int n, int dmv_x, int dmv_y,
} }
} }


if (v->field_mode && !s->quarter_sample) {
r_x <<= 1;
r_y <<= 1;
}
if (v->field_mode && v->numref) if (v->field_mode && v->numref)
r_y >>= 1; r_y >>= 1;
if (v->field_mode && v->cur_field_type && v->ref_field_type[dir] == 0) if (v->field_mode && v->cur_field_type && v->ref_field_type[dir] == 0)


+ 19
- 7
libavfilter/af_aformat.c View File

@@ -126,6 +126,22 @@ static int query_formats(AVFilterContext *ctx)
return 0; return 0;
} }


static const AVFilterPad avfilter_af_aformat_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_AUDIO,
},
{ NULL }
};

static const AVFilterPad avfilter_af_aformat_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_AUDIO
},
{ NULL }
};

AVFilter avfilter_af_aformat = { AVFilter avfilter_af_aformat = {
.name = "aformat", .name = "aformat",
.description = NULL_IF_CONFIG_SMALL("Convert the input audio to one of the specified formats."), .description = NULL_IF_CONFIG_SMALL("Convert the input audio to one of the specified formats."),
@@ -133,11 +149,7 @@ AVFilter avfilter_af_aformat = {
.query_formats = query_formats, .query_formats = query_formats,
.priv_size = sizeof(AFormatContext), .priv_size = sizeof(AFormatContext),


.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_AUDIO, },
{ .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_AUDIO},
{ .name = NULL}},
.priv_class = &aformat_class,
.inputs = avfilter_af_aformat_inputs,
.outputs = avfilter_af_aformat_outputs,
.priv_class = &aformat_class,
}; };

+ 11
- 5
libavfilter/af_amix.c View File

@@ -542,6 +542,16 @@ static int query_formats(AVFilterContext *ctx)
return 0; return 0;
} }


static const AVFilterPad avfilter_af_amix_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.config_props = config_output,
.request_frame = request_frame
},
{ NULL }
};

AVFilter avfilter_af_amix = { AVFilter avfilter_af_amix = {
.name = "amix", .name = "amix",
.description = NULL_IF_CONFIG_SMALL("Audio mixing."), .description = NULL_IF_CONFIG_SMALL("Audio mixing."),
@@ -552,10 +562,6 @@ AVFilter avfilter_af_amix = {
.query_formats = query_formats, .query_formats = query_formats,


.inputs = NULL, .inputs = NULL,
.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.config_props = config_output,
.request_frame = request_frame },
{ .name = NULL}},
.outputs = avfilter_af_amix_outputs,
.priv_class = &amix_class, .priv_class = &amix_class,
}; };

+ 19
- 7
libavfilter/af_anull.c View File

@@ -27,18 +27,30 @@
#include "internal.h" #include "internal.h"
#include "libavutil/internal.h" #include "libavutil/internal.h"


static const AVFilterPad avfilter_af_anull_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.get_audio_buffer = ff_null_get_audio_buffer,
},
{ NULL }
};

static const AVFilterPad avfilter_af_anull_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_AUDIO,
},
{ NULL }
};

AVFilter avfilter_af_anull = { AVFilter avfilter_af_anull = {
.name = "anull", .name = "anull",
.description = NULL_IF_CONFIG_SMALL("Pass the source unchanged to the output."), .description = NULL_IF_CONFIG_SMALL("Pass the source unchanged to the output."),


.priv_size = 0, .priv_size = 0,


.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.get_audio_buffer = ff_null_get_audio_buffer, },
{ .name = NULL}},
.inputs = avfilter_af_anull_inputs,


.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_AUDIO, },
{ .name = NULL}},
.outputs = avfilter_af_anull_outputs,
}; };

+ 21
- 9
libavfilter/af_asyncts.c View File

@@ -233,6 +233,25 @@ fail:
return ret; return ret;
} }


static const AVFilterPad avfilter_af_asyncts_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.filter_samples = filter_samples
},
{ NULL }
};

static const AVFilterPad avfilter_af_asyncts_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.config_props = config_props,
.request_frame = request_frame
},
{ NULL }
};

AVFilter avfilter_af_asyncts = { AVFilter avfilter_af_asyncts = {
.name = "asyncts", .name = "asyncts",
.description = NULL_IF_CONFIG_SMALL("Sync audio data to timestamps"), .description = NULL_IF_CONFIG_SMALL("Sync audio data to timestamps"),
@@ -242,14 +261,7 @@ AVFilter avfilter_af_asyncts = {


.priv_size = sizeof(ASyncContext), .priv_size = sizeof(ASyncContext),


.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.filter_samples = filter_samples },
{ NULL }},
.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.config_props = config_props,
.request_frame = request_frame },
{ NULL }},
.inputs = avfilter_af_asyncts_inputs,
.outputs = avfilter_af_asyncts_outputs,
.priv_class = &asyncts_class, .priv_class = &asyncts_class,
}; };

+ 22
- 10
libavfilter/af_channelmap.c View File

@@ -385,6 +385,25 @@ static int channelmap_config_input(AVFilterLink *inlink)
return err; return err;
} }


static const AVFilterPad avfilter_af_channelmap_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.min_perms = AV_PERM_READ | AV_PERM_WRITE,
.filter_samples = channelmap_filter_samples,
.config_props = channelmap_config_input
},
{ NULL }
};

static const AVFilterPad avfilter_af_channelmap_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_AUDIO
},
{ NULL }
};

AVFilter avfilter_af_channelmap = { AVFilter avfilter_af_channelmap = {
.name = "channelmap", .name = "channelmap",
.description = NULL_IF_CONFIG_SMALL("Remap audio channels."), .description = NULL_IF_CONFIG_SMALL("Remap audio channels."),
@@ -392,14 +411,7 @@ AVFilter avfilter_af_channelmap = {
.query_formats = channelmap_query_formats, .query_formats = channelmap_query_formats,
.priv_size = sizeof(ChannelMapContext), .priv_size = sizeof(ChannelMapContext),


.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.min_perms = AV_PERM_READ | AV_PERM_WRITE,
.filter_samples = channelmap_filter_samples,
.config_props = channelmap_config_input },
{ .name = NULL }},
.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_AUDIO },
{ .name = NULL }},
.priv_class = &channelmap_class,
.inputs = avfilter_af_channelmap_inputs,
.outputs = avfilter_af_channelmap_outputs,
.priv_class = &channelmap_class,
}; };

+ 10
- 4
libavfilter/af_channelsplit.c View File

@@ -130,6 +130,15 @@ static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *buf)
return ret; return ret;
} }


static const AVFilterPad avfilter_af_channelsplit_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.filter_samples = filter_samples,
},
{ NULL }
};

AVFilter avfilter_af_channelsplit = { AVFilter avfilter_af_channelsplit = {
.name = "channelsplit", .name = "channelsplit",
.description = NULL_IF_CONFIG_SMALL("Split audio into per-channel streams"), .description = NULL_IF_CONFIG_SMALL("Split audio into per-channel streams"),
@@ -138,10 +147,7 @@ AVFilter avfilter_af_channelsplit = {
.init = init, .init = init,
.query_formats = query_formats, .query_formats = query_formats,


.inputs = (const AVFilterPad[]){{ .name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.filter_samples = filter_samples, },
{ NULL }},
.inputs = avfilter_af_channelsplit_inputs,
.outputs = NULL, .outputs = NULL,
.priv_class = &channelsplit_class, .priv_class = &channelsplit_class,
}; };

+ 11
- 5
libavfilter/af_join.c View File

@@ -484,6 +484,16 @@ fail:
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
} }


static const AVFilterPad avfilter_af_join_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.config_props = join_config_output,
.request_frame = join_request_frame,
},
{ NULL }
};

AVFilter avfilter_af_join = { AVFilter avfilter_af_join = {
.name = "join", .name = "join",
.description = NULL_IF_CONFIG_SMALL("Join multiple audio streams into " .description = NULL_IF_CONFIG_SMALL("Join multiple audio streams into "
@@ -495,10 +505,6 @@ AVFilter avfilter_af_join = {
.query_formats = join_query_formats, .query_formats = join_query_formats,


.inputs = NULL, .inputs = NULL,
.outputs = (const AVFilterPad[]){{ .name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.config_props = join_config_output,
.request_frame = join_request_frame, },
{ NULL }},
.outputs = avfilter_af_join_outputs,
.priv_class = &join_class, .priv_class = &join_class,
}; };

+ 22
- 10
libavfilter/af_resample.c View File

@@ -239,6 +239,26 @@ fail:
return ret; return ret;
} }


static const AVFilterPad avfilter_af_resample_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.filter_samples = filter_samples,
.min_perms = AV_PERM_READ
},
{ NULL }
};

static const AVFilterPad avfilter_af_resample_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.config_props = config_output,
.request_frame = request_frame
},
{ NULL }
};

AVFilter avfilter_af_resample = { AVFilter avfilter_af_resample = {
.name = "resample", .name = "resample",
.description = NULL_IF_CONFIG_SMALL("Audio resampling and conversion."), .description = NULL_IF_CONFIG_SMALL("Audio resampling and conversion."),
@@ -247,14 +267,6 @@ AVFilter avfilter_af_resample = {
.uninit = uninit, .uninit = uninit,
.query_formats = query_formats, .query_formats = query_formats,


.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.filter_samples = filter_samples,
.min_perms = AV_PERM_READ },
{ .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.config_props = config_output,
.request_frame = request_frame },
{ .name = NULL}},
.inputs = avfilter_af_resample_inputs,
.outputs = avfilter_af_resample_outputs,
}; };

+ 10
- 8
libavfilter/asink_anullsink.c View File

@@ -27,19 +27,21 @@ static int null_filter_samples(AVFilterLink *link, AVFilterBufferRef *samplesref
return 0; return 0;
} }


static const AVFilterPad avfilter_asink_anullsink_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.filter_samples = null_filter_samples,
},
{ NULL },
};

AVFilter avfilter_asink_anullsink = { AVFilter avfilter_asink_anullsink = {
.name = "anullsink", .name = "anullsink",
.description = NULL_IF_CONFIG_SMALL("Do absolutely nothing with the input audio."), .description = NULL_IF_CONFIG_SMALL("Do absolutely nothing with the input audio."),


.priv_size = 0, .priv_size = 0,


.inputs = (const AVFilterPad[]) {
{
.name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.filter_samples = null_filter_samples,
},
{ .name = NULL},
},
.inputs = avfilter_asink_anullsink_inputs,
.outputs = NULL, .outputs = NULL,
}; };

+ 11
- 5
libavfilter/asrc_anullsrc.c View File

@@ -119,6 +119,16 @@ static int request_frame(AVFilterLink *outlink)
return 0; return 0;
} }


static const AVFilterPad avfilter_asrc_anullsrc_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.config_props = config_props,
.request_frame = request_frame,
},
{ NULL }
};

AVFilter avfilter_asrc_anullsrc = { AVFilter avfilter_asrc_anullsrc = {
.name = "anullsrc", .name = "anullsrc",
.description = NULL_IF_CONFIG_SMALL("Null audio source, return empty audio frames."), .description = NULL_IF_CONFIG_SMALL("Null audio source, return empty audio frames."),
@@ -128,10 +138,6 @@ AVFilter avfilter_asrc_anullsrc = {


.inputs = NULL, .inputs = NULL,


.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.config_props = config_props,
.request_frame = request_frame, },
{ .name = NULL}},
.outputs = avfilter_asrc_anullsrc_outputs,
.priv_class = &anullsrc_class, .priv_class = &anullsrc_class,
}; };

+ 24
- 12
libavfilter/buffersink.c View File

@@ -140,6 +140,17 @@ int ff_buffersink_read_samples_compat(AVFilterContext *ctx, AVFilterBufferRef **
return ret; return ret;
} }


static const AVFilterPad avfilter_vsink_buffer_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.start_frame = start_frame,
.min_perms = AV_PERM_READ,
.needs_fifo = 1
},
{ NULL }
};

AVFilter avfilter_vsink_buffer = { AVFilter avfilter_vsink_buffer = {
#if AV_HAVE_INCOMPATIBLE_FORK_ABI #if AV_HAVE_INCOMPATIBLE_FORK_ABI
.name = "buffersink", .name = "buffersink",
@@ -150,15 +161,21 @@ AVFilter avfilter_vsink_buffer = {
.priv_size = sizeof(BufferSinkContext), .priv_size = sizeof(BufferSinkContext),
.uninit = uninit, .uninit = uninit,


.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.start_frame = start_frame,
.min_perms = AV_PERM_READ,
.needs_fifo = 1 },
{ .name = NULL }},
.inputs = avfilter_vsink_buffer_inputs,
.outputs = NULL, .outputs = NULL,
}; };


static const AVFilterPad avfilter_asink_abuffer_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.filter_samples = start_frame,
.min_perms = AV_PERM_READ,
.needs_fifo = 1
},
{ NULL }
};

AVFilter avfilter_asink_abuffer = { AVFilter avfilter_asink_abuffer = {
#if AV_HAVE_INCOMPATIBLE_FORK_ABI #if AV_HAVE_INCOMPATIBLE_FORK_ABI
.name = "abuffersink", .name = "abuffersink",
@@ -169,11 +186,6 @@ AVFilter avfilter_asink_abuffer = {
.priv_size = sizeof(BufferSinkContext), .priv_size = sizeof(BufferSinkContext),
.uninit = uninit, .uninit = uninit,


.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.filter_samples = start_frame,
.min_perms = AV_PERM_READ,
.needs_fifo = 1 },
{ .name = NULL }},
.inputs = avfilter_asink_abuffer_inputs,
.outputs = NULL, .outputs = NULL,
}; };

+ 24
- 12
libavfilter/buffersrc.c View File

@@ -400,6 +400,17 @@ static int poll_frame(AVFilterLink *link)
return size/sizeof(AVFilterBufferRef*); return size/sizeof(AVFilterBufferRef*);
} }


static const AVFilterPad avfilter_vsrc_buffer_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.request_frame = request_frame,
.poll_frame = poll_frame,
.config_props = config_props,
},
{ NULL }
};

AVFilter avfilter_vsrc_buffer = { AVFilter avfilter_vsrc_buffer = {
.name = "buffer", .name = "buffer",
.description = NULL_IF_CONFIG_SMALL("Buffer video frames, and make them accessible to the filterchain."), .description = NULL_IF_CONFIG_SMALL("Buffer video frames, and make them accessible to the filterchain."),
@@ -410,15 +421,21 @@ AVFilter avfilter_vsrc_buffer = {
.uninit = uninit, .uninit = uninit,


.inputs = NULL, .inputs = NULL,
.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.request_frame = request_frame,
.poll_frame = poll_frame,
.config_props = config_props, },
{ .name = NULL}},
.outputs = avfilter_vsrc_buffer_outputs,
.priv_class = &buffer_class, .priv_class = &buffer_class,
}; };


static const AVFilterPad avfilter_asrc_abuffer_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.request_frame = request_frame,
.poll_frame = poll_frame,
.config_props = config_props,
},
{ NULL }
};

AVFilter avfilter_asrc_abuffer = { AVFilter avfilter_asrc_abuffer = {
.name = "abuffer", .name = "abuffer",
.description = NULL_IF_CONFIG_SMALL("Buffer audio frames, and make them accessible to the filterchain."), .description = NULL_IF_CONFIG_SMALL("Buffer audio frames, and make them accessible to the filterchain."),
@@ -429,11 +446,6 @@ AVFilter avfilter_asrc_abuffer = {
.uninit = uninit, .uninit = uninit,


.inputs = NULL, .inputs = NULL,
.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.request_frame = request_frame,
.poll_frame = poll_frame,
.config_props = config_props, },
{ .name = NULL}},
.outputs = avfilter_asrc_abuffer_outputs,
.priv_class = &abuffer_class, .priv_class = &abuffer_class,
}; };

+ 21
- 9
libavfilter/f_setpts.c View File

@@ -216,6 +216,25 @@ AVFilter avfilter_af_asetpts = {
#endif /* CONFIG_ASETPTS_FILTER */ #endif /* CONFIG_ASETPTS_FILTER */


#if CONFIG_SETPTS_FILTER #if CONFIG_SETPTS_FILTER
static const AVFilterPad avfilter_vf_setpts_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer = ff_null_get_video_buffer,
.config_props = config_input,
.start_frame = filter_frame,
},
{ NULL }
};

static const AVFilterPad avfilter_vf_setpts_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
},
{ NULL }
};

AVFilter avfilter_vf_setpts = { AVFilter avfilter_vf_setpts = {
.name = "setpts", .name = "setpts",
.description = NULL_IF_CONFIG_SMALL("Set PTS for the output video frame."), .description = NULL_IF_CONFIG_SMALL("Set PTS for the output video frame."),
@@ -224,14 +243,7 @@ AVFilter avfilter_vf_setpts = {


.priv_size = sizeof(SetPTSContext), .priv_size = sizeof(SetPTSContext),


.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer = ff_null_get_video_buffer,
.config_props = config_input,
.start_frame = filter_frame, },
{ .name = NULL }},
.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}},
.inputs = avfilter_vf_setpts_inputs,
.outputs = avfilter_vf_setpts_outputs,
}; };
#endif /* CONFIG_SETPTS_FILTER */ #endif /* CONFIG_SETPTS_FILTER */

+ 22
- 14
libavfilter/f_settb.c View File

@@ -137,6 +137,26 @@ static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *samplesref)
} }


#if CONFIG_SETTB_FILTER #if CONFIG_SETTB_FILTER
static const AVFilterPad avfilter_vf_settb_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer = ff_null_get_video_buffer,
.start_frame = start_frame,
.end_frame = ff_null_end_frame
},
{ NULL }
};

static const AVFilterPad avfilter_vf_settb_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.config_props = config_output_props,
},
{ NULL }
};

AVFilter avfilter_vf_settb = { AVFilter avfilter_vf_settb = {
.name = "settb", .name = "settb",
.description = NULL_IF_CONFIG_SMALL("Set timebase for the video output link."), .description = NULL_IF_CONFIG_SMALL("Set timebase for the video output link."),
@@ -144,20 +164,8 @@ AVFilter avfilter_vf_settb = {


.priv_size = sizeof(SetTBContext), .priv_size = sizeof(SetTBContext),


.inputs = (const AVFilterPad[]) {
{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer = ff_null_get_video_buffer,
.start_frame = start_frame,
.end_frame = ff_null_end_frame },
{ .name = NULL }
},
.outputs = (const AVFilterPad[]) {
{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.config_props = config_output_props, },
{ .name = NULL}
},
.inputs = avfilter_vf_settb_inputs,
.outputs = avfilter_vf_settb_outputs,
}; };
#endif #endif




+ 46
- 22
libavfilter/fifo.c View File

@@ -267,6 +267,28 @@ static int request_frame(AVFilterLink *outlink)
return ret; return ret;
} }


static const AVFilterPad avfilter_vf_fifo_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer = ff_null_get_video_buffer,
.start_frame = add_to_queue,
.draw_slice = draw_slice,
.end_frame = end_frame,
.min_perms = AV_PERM_PRESERVE,
},
{ NULL }
};

static const AVFilterPad avfilter_vf_fifo_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.request_frame = request_frame,
},
{ NULL }
};

AVFilter avfilter_vf_fifo = { AVFilter avfilter_vf_fifo = {
.name = "fifo", .name = "fifo",
.description = NULL_IF_CONFIG_SMALL("Buffer input images and send them when they are requested."), .description = NULL_IF_CONFIG_SMALL("Buffer input images and send them when they are requested."),
@@ -276,18 +298,28 @@ AVFilter avfilter_vf_fifo = {


.priv_size = sizeof(FifoContext), .priv_size = sizeof(FifoContext),


.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer= ff_null_get_video_buffer,
.start_frame = add_to_queue,
.draw_slice = draw_slice,
.end_frame = end_frame,
.min_perms = AV_PERM_PRESERVE, },
{ .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.request_frame = request_frame, },
{ .name = NULL}},
.inputs = avfilter_vf_fifo_inputs,
.outputs = avfilter_vf_fifo_outputs,
};

static const AVFilterPad avfilter_af_afifo_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.get_audio_buffer = ff_null_get_audio_buffer,
.filter_samples = add_to_queue,
.min_perms = AV_PERM_PRESERVE,
},
{ NULL }
};

static const AVFilterPad avfilter_af_afifo_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.request_frame = request_frame,
},
{ NULL }
}; };


AVFilter avfilter_af_afifo = { AVFilter avfilter_af_afifo = {
@@ -299,14 +331,6 @@ AVFilter avfilter_af_afifo = {


.priv_size = sizeof(FifoContext), .priv_size = sizeof(FifoContext),


.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.get_audio_buffer = ff_null_get_audio_buffer,
.filter_samples = add_to_queue,
.min_perms = AV_PERM_PRESERVE, },
{ .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.request_frame = request_frame, },
{ .name = NULL}},
.inputs = avfilter_af_afifo_inputs,
.outputs = avfilter_af_afifo_outputs,
}; };

+ 24
- 12
libavfilter/split.c View File

@@ -119,6 +119,18 @@ static int end_frame(AVFilterLink *inlink)
return ret; return ret;
} }


static const AVFilterPad avfilter_vf_split_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer = ff_null_get_video_buffer,
.start_frame = start_frame,
.draw_slice = draw_slice,
.end_frame = end_frame,
},
{ NULL }
};

AVFilter avfilter_vf_split = { AVFilter avfilter_vf_split = {
.name = "split", .name = "split",
.description = NULL_IF_CONFIG_SMALL("Pass on the input video to N outputs."), .description = NULL_IF_CONFIG_SMALL("Pass on the input video to N outputs."),
@@ -126,13 +138,7 @@ AVFilter avfilter_vf_split = {
.init = split_init, .init = split_init,
.uninit = split_uninit, .uninit = split_uninit,


.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer= ff_null_get_video_buffer,
.start_frame = start_frame,
.draw_slice = draw_slice,
.end_frame = end_frame, },
{ .name = NULL}},
.inputs = avfilter_vf_split_inputs,
.outputs = NULL, .outputs = NULL,
}; };


@@ -157,6 +163,16 @@ static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *samplesref)
return ret; return ret;
} }


static const AVFilterPad avfilter_af_asplit_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.get_audio_buffer = ff_null_get_audio_buffer,
.filter_samples = filter_samples
},
{ NULL }
};

AVFilter avfilter_af_asplit = { AVFilter avfilter_af_asplit = {
.name = "asplit", .name = "asplit",
.description = NULL_IF_CONFIG_SMALL("Pass on the audio input to N audio outputs."), .description = NULL_IF_CONFIG_SMALL("Pass on the audio input to N audio outputs."),
@@ -164,10 +180,6 @@ AVFilter avfilter_af_asplit = {
.init = split_init, .init = split_init,
.uninit = split_uninit, .uninit = split_uninit,


.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.get_audio_buffer = ff_null_get_audio_buffer,
.filter_samples = filter_samples },
{ .name = NULL }},
.inputs = avfilter_af_asplit_inputs,
.outputs = NULL, .outputs = NULL,
}; };

+ 46
- 22
libavfilter/vf_aspect.c View File

@@ -79,6 +79,26 @@ static int setdar_config_props(AVFilterLink *inlink)
return 0; return 0;
} }


static const AVFilterPad avfilter_vf_setdar_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.config_props = setdar_config_props,
.get_video_buffer = ff_null_get_video_buffer,
.start_frame = start_frame,
.end_frame = ff_null_end_frame
},
{ NULL }
};

static const AVFilterPad avfilter_vf_setdar_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
},
{ NULL }
};

AVFilter avfilter_vf_setdar = { AVFilter avfilter_vf_setdar = {
.name = "setdar", .name = "setdar",
.description = NULL_IF_CONFIG_SMALL("Set the frame display aspect ratio."), .description = NULL_IF_CONFIG_SMALL("Set the frame display aspect ratio."),
@@ -87,17 +107,9 @@ AVFilter avfilter_vf_setdar = {


.priv_size = sizeof(AspectContext), .priv_size = sizeof(AspectContext),


.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.config_props = setdar_config_props,
.get_video_buffer = ff_null_get_video_buffer,
.start_frame = start_frame,
.end_frame = ff_null_end_frame },
{ .name = NULL}},

.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}},
.inputs = avfilter_vf_setdar_inputs,

.outputs = avfilter_vf_setdar_outputs,
}; };
#endif /* CONFIG_SETDAR_FILTER */ #endif /* CONFIG_SETDAR_FILTER */


@@ -111,6 +123,26 @@ static int setsar_config_props(AVFilterLink *inlink)
return 0; return 0;
} }


static const AVFilterPad avfilter_vf_setsar_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.config_props = setsar_config_props,
.get_video_buffer = ff_null_get_video_buffer,
.start_frame = start_frame,
.end_frame = ff_null_end_frame
},
{ NULL }
};

static const AVFilterPad avfilter_vf_setsar_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
},
{ NULL }
};

AVFilter avfilter_vf_setsar = { AVFilter avfilter_vf_setsar = {
.name = "setsar", .name = "setsar",
.description = NULL_IF_CONFIG_SMALL("Set the pixel sample aspect ratio."), .description = NULL_IF_CONFIG_SMALL("Set the pixel sample aspect ratio."),
@@ -119,16 +151,8 @@ AVFilter avfilter_vf_setsar = {


.priv_size = sizeof(AspectContext), .priv_size = sizeof(AspectContext),


.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.config_props = setsar_config_props,
.get_video_buffer = ff_null_get_video_buffer,
.start_frame = start_frame,
.end_frame = ff_null_end_frame },
{ .name = NULL}},

.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}},
.inputs = avfilter_vf_setsar_inputs,

.outputs = avfilter_vf_setsar_outputs,
}; };
#endif /* CONFIG_SETSAR_FILTER */ #endif /* CONFIG_SETSAR_FILTER */

+ 23
- 11
libavfilter/vf_blackframe.c View File

@@ -121,6 +121,26 @@ static int end_frame(AVFilterLink *inlink)
return ff_end_frame(inlink->dst->outputs[0]); return ff_end_frame(inlink->dst->outputs[0]);
} }


static const AVFilterPad avfilter_vf_blackframe_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.draw_slice = draw_slice,
.get_video_buffer = ff_null_get_video_buffer,
.start_frame = ff_null_start_frame,
.end_frame = end_frame,
},
{ NULL }
};

static const AVFilterPad avfilter_vf_blackframe_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO
},
{ NULL }
};

AVFilter avfilter_vf_blackframe = { AVFilter avfilter_vf_blackframe = {
.name = "blackframe", .name = "blackframe",
.description = NULL_IF_CONFIG_SMALL("Detect frames that are (almost) black."), .description = NULL_IF_CONFIG_SMALL("Detect frames that are (almost) black."),
@@ -130,15 +150,7 @@ AVFilter avfilter_vf_blackframe = {


.query_formats = query_formats, .query_formats = query_formats,


.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.draw_slice = draw_slice,
.get_video_buffer = ff_null_get_video_buffer,
.start_frame = ff_null_start_frame,
.end_frame = end_frame, },
{ .name = NULL}},

.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO },
{ .name = NULL}},
.inputs = avfilter_vf_blackframe_inputs,

.outputs = avfilter_vf_blackframe_outputs,
}; };

+ 22
- 10
libavfilter/vf_boxblur.c View File

@@ -332,6 +332,26 @@ static int end_frame(AVFilterLink *inlink)
return ff_end_frame(outlink); return ff_end_frame(outlink);
} }


static const AVFilterPad avfilter_vf_boxblur_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.config_props = config_input,
.draw_slice = null_draw_slice,
.end_frame = end_frame,
.min_perms = AV_PERM_READ
},
{ NULL }
};

static const AVFilterPad avfilter_vf_boxblur_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
},
{ NULL }
};

AVFilter avfilter_vf_boxblur = { AVFilter avfilter_vf_boxblur = {
.name = "boxblur", .name = "boxblur",
.description = NULL_IF_CONFIG_SMALL("Blur the input."), .description = NULL_IF_CONFIG_SMALL("Blur the input."),
@@ -340,14 +360,6 @@ AVFilter avfilter_vf_boxblur = {
.uninit = uninit, .uninit = uninit,
.query_formats = query_formats, .query_formats = query_formats,


.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.config_props = config_input,
.draw_slice = null_draw_slice,
.end_frame = end_frame,
.min_perms = AV_PERM_READ },
{ .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}},
.inputs = avfilter_vf_boxblur_inputs,
.outputs = avfilter_vf_boxblur_outputs,
}; };

+ 22
- 10
libavfilter/vf_copy.c View File

@@ -26,18 +26,30 @@
#include "internal.h" #include "internal.h"
#include "video.h" #include "video.h"


static const AVFilterPad avfilter_vf_copy_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer = ff_null_get_video_buffer,
.start_frame = ff_null_start_frame,
.end_frame = ff_null_end_frame,
.rej_perms = ~0
},
{ NULL }
};

static const AVFilterPad avfilter_vf_copy_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
},
{ NULL }
};

AVFilter avfilter_vf_copy = { AVFilter avfilter_vf_copy = {
.name = "copy", .name = "copy",
.description = NULL_IF_CONFIG_SMALL("Copy the input video unchanged to the output."), .description = NULL_IF_CONFIG_SMALL("Copy the input video unchanged to the output."),


.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer = ff_null_get_video_buffer,
.start_frame = ff_null_start_frame,
.end_frame = ff_null_end_frame,
.rej_perms = ~0 },
{ .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}},
.inputs = avfilter_vf_copy_inputs,
.outputs = avfilter_vf_copy_outputs,
}; };

+ 24
- 12
libavfilter/vf_crop.c View File

@@ -345,6 +345,28 @@ static int end_frame(AVFilterLink *link)
return ff_end_frame(link->dst->outputs[0]); return ff_end_frame(link->dst->outputs[0]);
} }


static const AVFilterPad avfilter_vf_crop_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.start_frame = start_frame,
.draw_slice = draw_slice,
.end_frame = end_frame,
.get_video_buffer = ff_null_get_video_buffer,
.config_props = config_input,
},
{ NULL }
};

static const AVFilterPad avfilter_vf_crop_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.config_props = config_output,
},
{ NULL }
};

AVFilter avfilter_vf_crop = { AVFilter avfilter_vf_crop = {
.name = "crop", .name = "crop",
.description = NULL_IF_CONFIG_SMALL("Crop the input video to width:height:x:y."), .description = NULL_IF_CONFIG_SMALL("Crop the input video to width:height:x:y."),
@@ -355,16 +377,6 @@ AVFilter avfilter_vf_crop = {
.init = init, .init = init,
.uninit = uninit, .uninit = uninit,


.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.start_frame = start_frame,
.draw_slice = draw_slice,
.end_frame = end_frame,
.get_video_buffer = ff_null_get_video_buffer,
.config_props = config_input, },
{ .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.config_props = config_output, },
{ .name = NULL}},
.inputs = avfilter_vf_crop_inputs,
.outputs = avfilter_vf_crop_outputs,
}; };

+ 23
- 11
libavfilter/vf_cropdetect.c View File

@@ -197,6 +197,26 @@ static int end_frame(AVFilterLink *inlink)
return ff_end_frame(inlink->dst->outputs[0]); return ff_end_frame(inlink->dst->outputs[0]);
} }


static const AVFilterPad avfilter_vf_cropdetect_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.config_props = config_input,
.get_video_buffer = ff_null_get_video_buffer,
.start_frame = ff_null_start_frame,
.end_frame = end_frame,
},
{ NULL }
};

static const AVFilterPad avfilter_vf_cropdetect_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO
},
{ NULL }
};

AVFilter avfilter_vf_cropdetect = { AVFilter avfilter_vf_cropdetect = {
.name = "cropdetect", .name = "cropdetect",
.description = NULL_IF_CONFIG_SMALL("Auto-detect crop size."), .description = NULL_IF_CONFIG_SMALL("Auto-detect crop size."),
@@ -206,15 +226,7 @@ AVFilter avfilter_vf_cropdetect = {


.query_formats = query_formats, .query_formats = query_formats,


.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.config_props = config_input,
.get_video_buffer = ff_null_get_video_buffer,
.start_frame = ff_null_start_frame,
.end_frame = end_frame, },
{ .name = NULL}},

.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO },
{ .name = NULL}},
.inputs = avfilter_vf_cropdetect_inputs,

.outputs = avfilter_vf_cropdetect_outputs,
}; };

+ 23
- 11
libavfilter/vf_delogo.c View File

@@ -245,6 +245,27 @@ static int end_frame(AVFilterLink *inlink)
return 0; return 0;
} }


static const AVFilterPad avfilter_vf_delogo_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer = ff_null_get_video_buffer,
.start_frame = ff_inplace_start_frame,
.draw_slice = null_draw_slice,
.end_frame = end_frame,
.min_perms = AV_PERM_WRITE | AV_PERM_READ,
},
{ NULL }
};

static const AVFilterPad avfilter_vf_delogo_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
},
{ NULL }
};

AVFilter avfilter_vf_delogo = { AVFilter avfilter_vf_delogo = {
.name = "delogo", .name = "delogo",
.description = NULL_IF_CONFIG_SMALL("Remove logo from input video."), .description = NULL_IF_CONFIG_SMALL("Remove logo from input video."),
@@ -252,15 +273,6 @@ AVFilter avfilter_vf_delogo = {
.init = init, .init = init,
.query_formats = query_formats, .query_formats = query_formats,


.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer = ff_null_get_video_buffer,
.start_frame = ff_inplace_start_frame,
.draw_slice = null_draw_slice,
.end_frame = end_frame,
.min_perms = AV_PERM_WRITE | AV_PERM_READ },
{ .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}},
.inputs = avfilter_vf_delogo_inputs,
.outputs = avfilter_vf_delogo_outputs,
}; };

+ 24
- 12
libavfilter/vf_drawbox.c View File

@@ -124,6 +124,28 @@ static int draw_slice(AVFilterLink *inlink, int y0, int h, int slice_dir)
return ff_draw_slice(inlink->dst->outputs[0], y0, h, 1); return ff_draw_slice(inlink->dst->outputs[0], y0, h, 1);
} }


static const AVFilterPad avfilter_vf_drawbox_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.config_props = config_input,
.get_video_buffer = ff_null_get_video_buffer,
.start_frame = ff_null_start_frame,
.draw_slice = draw_slice,
.end_frame = ff_null_end_frame,
.min_perms = AV_PERM_WRITE | AV_PERM_READ,
},
{ NULL }
};

static const AVFilterPad avfilter_vf_drawbox_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
},
{ NULL }
};

AVFilter avfilter_vf_drawbox = { AVFilter avfilter_vf_drawbox = {
.name = "drawbox", .name = "drawbox",
.description = NULL_IF_CONFIG_SMALL("Draw a colored box on the input video."), .description = NULL_IF_CONFIG_SMALL("Draw a colored box on the input video."),
@@ -131,16 +153,6 @@ AVFilter avfilter_vf_drawbox = {
.init = init, .init = init,


.query_formats = query_formats, .query_formats = query_formats,
.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.config_props = config_input,
.get_video_buffer = ff_null_get_video_buffer,
.start_frame = ff_null_start_frame,
.draw_slice = draw_slice,
.end_frame = ff_null_end_frame,
.min_perms = AV_PERM_WRITE | AV_PERM_READ },
{ .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}},
.inputs = avfilter_vf_drawbox_inputs,
.outputs = avfilter_vf_drawbox_outputs,
}; };

+ 25
- 13
libavfilter/vf_drawtext.c View File

@@ -810,6 +810,29 @@ static int end_frame(AVFilterLink *inlink)
return 0; return 0;
} }


static const AVFilterPad avfilter_vf_drawtext_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer = ff_null_get_video_buffer,
.start_frame = ff_null_start_frame,
.draw_slice = null_draw_slice,
.end_frame = end_frame,
.config_props = config_input,
.min_perms = AV_PERM_WRITE |
AV_PERM_READ,
},
{ NULL }
};

static const AVFilterPad avfilter_vf_drawtext_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
},
{ NULL }
};

AVFilter avfilter_vf_drawtext = { AVFilter avfilter_vf_drawtext = {
.name = "drawtext", .name = "drawtext",
.description = NULL_IF_CONFIG_SMALL("Draw text on top of video frames using libfreetype library."), .description = NULL_IF_CONFIG_SMALL("Draw text on top of video frames using libfreetype library."),
@@ -818,19 +841,8 @@ AVFilter avfilter_vf_drawtext = {
.uninit = uninit, .uninit = uninit,
.query_formats = query_formats, .query_formats = query_formats,


.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer = ff_null_get_video_buffer,
.start_frame = ff_null_start_frame,
.draw_slice = null_draw_slice,
.end_frame = end_frame,
.config_props = config_input,
.min_perms = AV_PERM_WRITE |
AV_PERM_READ },
{ .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}},
.inputs = avfilter_vf_drawtext_inputs,
.outputs = avfilter_vf_drawtext_outputs,
.process_command = command, .process_command = command,
.priv_class = &drawtext_class, .priv_class = &drawtext_class,
}; };

+ 24
- 12
libavfilter/vf_fade.c View File

@@ -276,6 +276,28 @@ static int end_frame(AVFilterLink *inlink)
return ret; return ret;
} }


static const AVFilterPad avfilter_vf_fade_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.config_props = config_props,
.get_video_buffer = ff_null_get_video_buffer,
.start_frame = ff_null_start_frame,
.draw_slice = draw_slice,
.end_frame = end_frame,
.min_perms = AV_PERM_READ | AV_PERM_WRITE,
},
{ NULL }
};

static const AVFilterPad avfilter_vf_fade_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
},
{ NULL }
};

AVFilter avfilter_vf_fade = { AVFilter avfilter_vf_fade = {
.name = "fade", .name = "fade",
.description = NULL_IF_CONFIG_SMALL("Fade in/out input video."), .description = NULL_IF_CONFIG_SMALL("Fade in/out input video."),
@@ -284,17 +306,7 @@ AVFilter avfilter_vf_fade = {
.priv_size = sizeof(FadeContext), .priv_size = sizeof(FadeContext),
.query_formats = query_formats, .query_formats = query_formats,


.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.config_props = config_props,
.get_video_buffer = ff_null_get_video_buffer,
.start_frame = ff_null_start_frame,
.draw_slice = draw_slice,
.end_frame = end_frame,
.min_perms = AV_PERM_READ | AV_PERM_WRITE },
{ .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}},
.inputs = avfilter_vf_fade_inputs,
.outputs = avfilter_vf_fade_outputs,
.priv_class = &fade_class, .priv_class = &fade_class,
}; };

+ 24
- 12
libavfilter/vf_fieldorder.c View File

@@ -234,22 +234,34 @@ static int end_frame(AVFilterLink *inlink)
return ff_end_frame(outlink); return ff_end_frame(outlink);
} }


static const AVFilterPad avfilter_vf_fieldorder_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.config_props = config_input,
.start_frame = start_frame,
.get_video_buffer = get_video_buffer,
.draw_slice = draw_slice,
.end_frame = end_frame,
.min_perms = AV_PERM_READ | AV_PERM_PRESERVE,
},
{ NULL }
};

static const AVFilterPad avfilter_vf_fieldorder_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
},
{ NULL }
};

AVFilter avfilter_vf_fieldorder = { AVFilter avfilter_vf_fieldorder = {
.name = "fieldorder", .name = "fieldorder",
.description = NULL_IF_CONFIG_SMALL("Set the field order."), .description = NULL_IF_CONFIG_SMALL("Set the field order."),
.init = init, .init = init,
.priv_size = sizeof(FieldOrderContext), .priv_size = sizeof(FieldOrderContext),
.query_formats = query_formats, .query_formats = query_formats,
.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.config_props = config_input,
.start_frame = start_frame,
.get_video_buffer = get_video_buffer,
.draw_slice = draw_slice,
.end_frame = end_frame,
.min_perms = AV_PERM_READ | AV_PERM_PRESERVE },
{ .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}},
.inputs = avfilter_vf_fieldorder_inputs,
.outputs = avfilter_vf_fieldorder_outputs,
}; };

+ 44
- 20
libavfilter/vf_format.c View File

@@ -97,6 +97,26 @@ static int query_formats_format(AVFilterContext *ctx)
return 0; return 0;
} }


static const AVFilterPad avfilter_vf_format_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer = ff_null_get_video_buffer,
.start_frame = ff_null_start_frame,
.draw_slice = ff_null_draw_slice,
.end_frame = ff_null_end_frame,
},
{ NULL }
};

static const AVFilterPad avfilter_vf_format_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO
},
{ NULL }
};

AVFilter avfilter_vf_format = { AVFilter avfilter_vf_format = {
.name = "format", .name = "format",
.description = NULL_IF_CONFIG_SMALL("Convert the input video to one of the specified pixel formats."), .description = NULL_IF_CONFIG_SMALL("Convert the input video to one of the specified pixel formats."),
@@ -107,16 +127,8 @@ AVFilter avfilter_vf_format = {


.priv_size = sizeof(FormatContext), .priv_size = sizeof(FormatContext),


.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer= ff_null_get_video_buffer,
.start_frame = ff_null_start_frame,
.draw_slice = ff_null_draw_slice,
.end_frame = ff_null_end_frame, },
{ .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO },
{ .name = NULL}},
.inputs = avfilter_vf_format_inputs,
.outputs = avfilter_vf_format_outputs,
}; };
#endif /* CONFIG_FORMAT_FILTER */ #endif /* CONFIG_FORMAT_FILTER */


@@ -127,6 +139,26 @@ static int query_formats_noformat(AVFilterContext *ctx)
return 0; return 0;
} }


static const AVFilterPad avfilter_vf_noformat_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer = ff_null_get_video_buffer,
.start_frame = ff_null_start_frame,
.draw_slice = ff_null_draw_slice,
.end_frame = ff_null_end_frame,
},
{ NULL }
};

static const AVFilterPad avfilter_vf_noformat_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO
},
{ NULL }
};

AVFilter avfilter_vf_noformat = { AVFilter avfilter_vf_noformat = {
.name = "noformat", .name = "noformat",
.description = NULL_IF_CONFIG_SMALL("Force libavfilter not to use any of the specified pixel formats for the input to the next filter."), .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 = {


.priv_size = sizeof(FormatContext), .priv_size = sizeof(FormatContext),


.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer= ff_null_get_video_buffer,
.start_frame = ff_null_start_frame,
.draw_slice = ff_null_draw_slice,
.end_frame = ff_null_end_frame, },
{ .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO },
{ .name = NULL}},
.inputs = avfilter_vf_noformat_inputs,
.outputs = avfilter_vf_noformat_outputs,
}; };
#endif /* CONFIG_NOFORMAT_FILTER */ #endif /* CONFIG_NOFORMAT_FILTER */

+ 25
- 13
libavfilter/vf_fps.c View File

@@ -279,6 +279,29 @@ static int null_draw_slice(AVFilterLink *link, int y, int h, int slice_dir)
return 0; return 0;
} }


static const AVFilterPad avfilter_vf_fps_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.min_perms = AV_PERM_READ | AV_PERM_PRESERVE,
.start_frame = null_start_frame,
.draw_slice = null_draw_slice,
.end_frame = end_frame,
},
{ NULL }
};

static const AVFilterPad avfilter_vf_fps_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.rej_perms = AV_PERM_WRITE,
.request_frame = request_frame,
.config_props = config_props
},
{ NULL }
};

AVFilter avfilter_vf_fps = { AVFilter avfilter_vf_fps = {
.name = "fps", .name = "fps",
.description = NULL_IF_CONFIG_SMALL("Force constant framerate"), .description = NULL_IF_CONFIG_SMALL("Force constant framerate"),
@@ -288,18 +311,7 @@ AVFilter avfilter_vf_fps = {


.priv_size = sizeof(FPSContext), .priv_size = sizeof(FPSContext),


.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.min_perms = AV_PERM_READ | AV_PERM_PRESERVE,
.start_frame = null_start_frame,
.draw_slice = null_draw_slice,
.end_frame = end_frame, },
{ .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.rej_perms = AV_PERM_WRITE,
.request_frame = request_frame,
.config_props = config_props},
{ .name = NULL}},
.inputs = avfilter_vf_fps_inputs,
.outputs = avfilter_vf_fps_outputs,
.priv_class = &fps_class, .priv_class = &fps_class,
}; };

+ 34
- 16
libavfilter/vf_frei0r.c View File

@@ -368,6 +368,26 @@ static int end_frame(AVFilterLink *inlink)
return 0; return 0;
} }


static const AVFilterPad avfilter_vf_frei0r_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.draw_slice = null_draw_slice,
.config_props = config_input_props,
.end_frame = end_frame,
.min_perms = AV_PERM_READ
},
{ NULL }
};

static const AVFilterPad avfilter_vf_frei0r_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
},
{ NULL }
};

AVFilter avfilter_vf_frei0r = { AVFilter avfilter_vf_frei0r = {
.name = "frei0r", .name = "frei0r",
.description = NULL_IF_CONFIG_SMALL("Apply a frei0r effect."), .description = NULL_IF_CONFIG_SMALL("Apply a frei0r effect."),
@@ -378,17 +398,9 @@ AVFilter avfilter_vf_frei0r = {


.priv_size = sizeof(Frei0rContext), .priv_size = sizeof(Frei0rContext),


.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.draw_slice = null_draw_slice,
.config_props = config_input_props,
.end_frame = end_frame,
.min_perms = AV_PERM_READ },
{ .name = NULL}},

.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}},
.inputs = avfilter_vf_frei0r_inputs,

.outputs = avfilter_vf_frei0r_outputs,
}; };


static av_cold int source_init(AVFilterContext *ctx, const char *args) static av_cold int source_init(AVFilterContext *ctx, const char *args)
@@ -478,6 +490,16 @@ fail:
return ret; return ret;
} }


static const AVFilterPad avfilter_vsrc_frei0r_src_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.request_frame = source_request_frame,
.config_props = source_config_props
},
{ NULL }
};

AVFilter avfilter_vsrc_frei0r_src = { AVFilter avfilter_vsrc_frei0r_src = {
.name = "frei0r_src", .name = "frei0r_src",
.description = NULL_IF_CONFIG_SMALL("Generate a frei0r source."), .description = NULL_IF_CONFIG_SMALL("Generate a frei0r source."),
@@ -490,9 +512,5 @@ AVFilter avfilter_vsrc_frei0r_src = {


.inputs = NULL, .inputs = NULL,


.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.request_frame = source_request_frame,
.config_props = source_config_props },
{ .name = NULL}},
.outputs = avfilter_vsrc_frei0r_src_outputs,
}; };

+ 23
- 11
libavfilter/vf_gradfun.c View File

@@ -216,6 +216,27 @@ static int end_frame(AVFilterLink *inlink)
return 0; return 0;
} }


static const AVFilterPad avfilter_vf_gradfun_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.config_props = config_input,
.start_frame = ff_inplace_start_frame,
.draw_slice = null_draw_slice,
.end_frame = end_frame,
.min_perms = AV_PERM_READ,
},
{ NULL }
};

static const AVFilterPad avfilter_vf_gradfun_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
},
{ NULL }
};

AVFilter avfilter_vf_gradfun = { AVFilter avfilter_vf_gradfun = {
.name = "gradfun", .name = "gradfun",
.description = NULL_IF_CONFIG_SMALL("Debands video quickly using gradients."), .description = NULL_IF_CONFIG_SMALL("Debands video quickly using gradients."),
@@ -224,15 +245,6 @@ AVFilter avfilter_vf_gradfun = {
.uninit = uninit, .uninit = uninit,
.query_formats = query_formats, .query_formats = query_formats,


.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.config_props = config_input,
.start_frame = ff_inplace_start_frame,
.draw_slice = null_draw_slice,
.end_frame = end_frame,
.min_perms = AV_PERM_READ, },
{ .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}},
.inputs = avfilter_vf_gradfun_inputs,
.outputs = avfilter_vf_gradfun_outputs,
}; };

+ 22
- 10
libavfilter/vf_hflip.c View File

@@ -165,20 +165,32 @@ static int draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir)
return ff_draw_slice(inlink->dst->outputs[0], y, h, slice_dir); return ff_draw_slice(inlink->dst->outputs[0], y, h, slice_dir);
} }


static const AVFilterPad avfilter_vf_hflip_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.start_frame = start_frame,
.draw_slice = draw_slice,
.config_props = config_props,
.min_perms = AV_PERM_READ,
},
{ NULL }
};

static const AVFilterPad avfilter_vf_hflip_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
},
{ NULL }
};

AVFilter avfilter_vf_hflip = { AVFilter avfilter_vf_hflip = {
.name = "hflip", .name = "hflip",
.description = NULL_IF_CONFIG_SMALL("Horizontally flip the input video."), .description = NULL_IF_CONFIG_SMALL("Horizontally flip the input video."),
.priv_size = sizeof(FlipContext), .priv_size = sizeof(FlipContext),
.query_formats = query_formats, .query_formats = query_formats,


.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.start_frame = start_frame,
.draw_slice = draw_slice,
.config_props = config_props,
.min_perms = AV_PERM_READ, },
{ .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}},
.inputs = avfilter_vf_hflip_inputs,
.outputs = avfilter_vf_hflip_outputs,
}; };

+ 23
- 11
libavfilter/vf_hqdn3d.c View File

@@ -348,6 +348,26 @@ static int end_frame(AVFilterLink *inlink)
return 0; return 0;
} }


static const AVFilterPad avfilter_vf_hqdn3d_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.start_frame = ff_inplace_start_frame,
.draw_slice = null_draw_slice,
.config_props = config_input,
.end_frame = end_frame
},
{ NULL }
};

static const AVFilterPad avfilter_vf_hqdn3d_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO
},
{ NULL }
};

AVFilter avfilter_vf_hqdn3d = { AVFilter avfilter_vf_hqdn3d = {
.name = "hqdn3d", .name = "hqdn3d",
.description = NULL_IF_CONFIG_SMALL("Apply a High Quality 3D Denoiser."), .description = NULL_IF_CONFIG_SMALL("Apply a High Quality 3D Denoiser."),
@@ -357,15 +377,7 @@ AVFilter avfilter_vf_hqdn3d = {
.uninit = uninit, .uninit = uninit,
.query_formats = query_formats, .query_formats = query_formats,


.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.start_frame = ff_inplace_start_frame,
.draw_slice = null_draw_slice,
.config_props = config_input,
.end_frame = end_frame },
{ .name = NULL}},

.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO },
{ .name = NULL}},
.inputs = avfilter_vf_hqdn3d_inputs,

.outputs = avfilter_vf_hqdn3d_outputs,
}; };

+ 21
- 9
libavfilter/vf_libopencv.c View File

@@ -376,6 +376,25 @@ static int end_frame(AVFilterLink *inlink)
return 0; return 0;
} }


static const AVFilterPad avfilter_vf_ocv_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.draw_slice = null_draw_slice,
.end_frame = end_frame,
.min_perms = AV_PERM_READ
},
{ NULL }
};

static const AVFilterPad avfilter_vf_ocv_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
},
{ NULL }
};

AVFilter avfilter_vf_ocv = { AVFilter avfilter_vf_ocv = {
.name = "ocv", .name = "ocv",
.description = NULL_IF_CONFIG_SMALL("Apply transform using libopencv."), .description = NULL_IF_CONFIG_SMALL("Apply transform using libopencv."),
@@ -386,14 +405,7 @@ AVFilter avfilter_vf_ocv = {
.init = init, .init = init,
.uninit = uninit, .uninit = uninit,


.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.draw_slice = null_draw_slice,
.end_frame = end_frame,
.min_perms = AV_PERM_READ },
{ .name = NULL}},
.inputs = avfilter_vf_ocv_inputs,


.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}},
.outputs = avfilter_vf_ocv_outputs,
}; };

+ 21
- 9
libavfilter/vf_null.c View File

@@ -26,20 +26,32 @@
#include "internal.h" #include "internal.h"
#include "video.h" #include "video.h"


static const AVFilterPad avfilter_vf_null_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer = ff_null_get_video_buffer,
.start_frame = ff_null_start_frame,
.end_frame = ff_null_end_frame
},
{ NULL }
};

static const AVFilterPad avfilter_vf_null_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
},
{ NULL }
};

AVFilter avfilter_vf_null = { AVFilter avfilter_vf_null = {
.name = "null", .name = "null",
.description = NULL_IF_CONFIG_SMALL("Pass the source unchanged to the output."), .description = NULL_IF_CONFIG_SMALL("Pass the source unchanged to the output."),


.priv_size = 0, .priv_size = 0,


.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer = ff_null_get_video_buffer,
.start_frame = ff_null_start_frame,
.end_frame = ff_null_end_frame },
{ .name = NULL}},
.inputs = avfilter_vf_null_inputs,


.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}},
.outputs = avfilter_vf_null_outputs,
}; };

+ 36
- 22
libavfilter/vf_overlay.c View File

@@ -607,6 +607,40 @@ static int null_draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir)
return 0; return 0;
} }


static const AVFilterPad avfilter_vf_overlay_inputs[] = {
{
.name = "main",
.type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer= get_video_buffer,
.config_props = config_input_main,
.start_frame = start_frame_main,
.draw_slice = draw_slice_main,
.end_frame = end_frame_main,
.min_perms = AV_PERM_READ | AV_PERM_WRITE | AV_PERM_PRESERVE,
},
{
.name = "overlay",
.type = AVMEDIA_TYPE_VIDEO,
.config_props = config_input_overlay,
.start_frame = start_frame_over,
.draw_slice = null_draw_slice,
.end_frame = end_frame_over,
.min_perms = AV_PERM_READ | AV_PERM_PRESERVE,
},
{ NULL }
};

static const AVFilterPad avfilter_vf_overlay_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.rej_perms = AV_PERM_WRITE,
.config_props = config_output,
.request_frame = request_frame,
},
{ NULL }
};

AVFilter avfilter_vf_overlay = { AVFilter avfilter_vf_overlay = {
.name = "overlay", .name = "overlay",
.description = NULL_IF_CONFIG_SMALL("Overlay a video source on top of the input."), .description = NULL_IF_CONFIG_SMALL("Overlay a video source on top of the input."),
@@ -618,27 +652,7 @@ AVFilter avfilter_vf_overlay = {


.query_formats = query_formats, .query_formats = query_formats,


.inputs = (const AVFilterPad[]) {{ .name = "main",
.type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer= get_video_buffer,
.config_props = config_input_main,
.start_frame = start_frame_main,
.draw_slice = draw_slice_main,
.end_frame = end_frame_main,
.min_perms = AV_PERM_READ | AV_PERM_WRITE | AV_PERM_PRESERVE },
{ .name = "overlay",
.type = AVMEDIA_TYPE_VIDEO,
.config_props = config_input_overlay,
.start_frame = start_frame_over,
.draw_slice = null_draw_slice,
.end_frame = end_frame_over,
.min_perms = AV_PERM_READ | AV_PERM_PRESERVE },
{ .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.rej_perms = AV_PERM_WRITE,
.config_props = config_output,
.request_frame = request_frame, },
{ .name = NULL}},
.inputs = avfilter_vf_overlay_inputs,
.outputs = avfilter_vf_overlay_outputs,
.priv_class = &overlay_class, .priv_class = &overlay_class,
}; };

+ 24
- 12
libavfilter/vf_pad.c View File

@@ -388,6 +388,27 @@ static int draw_slice(AVFilterLink *link, int y, int h, int slice_dir)
return draw_send_bar_slice(link, y, h, slice_dir, -1); return draw_send_bar_slice(link, y, h, slice_dir, -1);
} }


static const AVFilterPad avfilter_vf_pad_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.config_props = config_input,
.get_video_buffer = get_video_buffer,
.start_frame = start_frame,
.draw_slice = draw_slice,
},
{ NULL }
};

static const AVFilterPad avfilter_vf_pad_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.config_props = config_output,
},
{ NULL }
};

AVFilter avfilter_vf_pad = { AVFilter avfilter_vf_pad = {
.name = "pad", .name = "pad",
.description = NULL_IF_CONFIG_SMALL("Pad input image to width:height[:x:y[:color]] (default x and y: 0, default color: black)."), .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 = {
.init = init, .init = init,
.query_formats = query_formats, .query_formats = query_formats,


.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.config_props = config_input,
.get_video_buffer = get_video_buffer,
.start_frame = start_frame,
.draw_slice = draw_slice, },
{ .name = NULL}},

.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.config_props = config_output, },
{ .name = NULL}},
.inputs = avfilter_vf_pad_inputs,

.outputs = avfilter_vf_pad_outputs,
}; };

+ 23
- 11
libavfilter/vf_pixdesctest.c View File

@@ -126,6 +126,26 @@ static int draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir)
return ff_draw_slice(inlink->dst->outputs[0], y, h, slice_dir); return ff_draw_slice(inlink->dst->outputs[0], y, h, slice_dir);
} }


static const AVFilterPad avfilter_vf_pixdesctest_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.start_frame = start_frame,
.draw_slice = draw_slice,
.config_props = config_props,
.min_perms = AV_PERM_READ,
},
{ NULL }
};

static const AVFilterPad avfilter_vf_pixdesctest_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
},
{ NULL }
};

AVFilter avfilter_vf_pixdesctest = { AVFilter avfilter_vf_pixdesctest = {
.name = "pixdesctest", .name = "pixdesctest",
.description = NULL_IF_CONFIG_SMALL("Test pixel format definitions."), .description = NULL_IF_CONFIG_SMALL("Test pixel format definitions."),
@@ -133,15 +153,7 @@ AVFilter avfilter_vf_pixdesctest = {
.priv_size = sizeof(PixdescTestContext), .priv_size = sizeof(PixdescTestContext),
.uninit = uninit, .uninit = uninit,


.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.start_frame = start_frame,
.draw_slice = draw_slice,
.config_props = config_props,
.min_perms = AV_PERM_READ, },
{ .name = NULL}},

.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}},
.inputs = avfilter_vf_pixdesctest_inputs,

.outputs = avfilter_vf_pixdesctest_outputs,
}; };

+ 22
- 10
libavfilter/vf_scale.c View File

@@ -395,6 +395,26 @@ static int draw_slice(AVFilterLink *link, int y, int h, int slice_dir)
return ret; return ret;
} }


static const AVFilterPad avfilter_vf_scale_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.start_frame = start_frame,
.draw_slice = draw_slice,
.min_perms = AV_PERM_READ,
},
{ NULL }
};

static const AVFilterPad avfilter_vf_scale_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.config_props = config_props,
},
{ NULL }
};

AVFilter avfilter_vf_scale = { AVFilter avfilter_vf_scale = {
.name = "scale", .name = "scale",
.description = NULL_IF_CONFIG_SMALL("Scale the input video to width:height size and/or convert the image format."), .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 = {


.priv_size = sizeof(ScaleContext), .priv_size = sizeof(ScaleContext),


.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.start_frame = start_frame,
.draw_slice = draw_slice,
.min_perms = AV_PERM_READ, },
{ .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.config_props = config_props, },
{ .name = NULL}},
.inputs = avfilter_vf_scale_inputs,
.outputs = avfilter_vf_scale_outputs,
}; };

+ 26
- 14
libavfilter/vf_select.c View File

@@ -417,6 +417,30 @@ static int query_formats(AVFilterContext *ctx)
return 0; return 0;
} }


static const AVFilterPad avfilter_vf_select_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer = ff_null_get_video_buffer,
.min_perms = AV_PERM_PRESERVE,
.config_props = config_input,
.start_frame = start_frame,
.draw_slice = draw_slice,
.end_frame = end_frame
},
{ NULL }
};

static const AVFilterPad avfilter_vf_select_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.poll_frame = poll_frame,
.request_frame = request_frame,
},
{ NULL }
};

AVFilter avfilter_vf_select = { AVFilter avfilter_vf_select = {
.name = "select", .name = "select",
.description = NULL_IF_CONFIG_SMALL("Select frames to pass in output."), .description = NULL_IF_CONFIG_SMALL("Select frames to pass in output."),
@@ -426,18 +450,6 @@ AVFilter avfilter_vf_select = {


.priv_size = sizeof(SelectContext), .priv_size = sizeof(SelectContext),


.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer = ff_null_get_video_buffer,
.min_perms = AV_PERM_PRESERVE,
.config_props = config_input,
.start_frame = start_frame,
.draw_slice = draw_slice,
.end_frame = end_frame },
{ .name = NULL }},
.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.poll_frame = poll_frame,
.request_frame = request_frame, },
{ .name = NULL}},
.inputs = avfilter_vf_select_inputs,
.outputs = avfilter_vf_select_outputs,
}; };

+ 23
- 11
libavfilter/vf_showinfo.c View File

@@ -85,6 +85,26 @@ static int end_frame(AVFilterLink *inlink)
return ff_end_frame(inlink->dst->outputs[0]); return ff_end_frame(inlink->dst->outputs[0]);
} }


static const AVFilterPad avfilter_vf_showinfo_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer = ff_null_get_video_buffer,
.start_frame = ff_null_start_frame,
.end_frame = end_frame,
.min_perms = AV_PERM_READ,
},
{ NULL }
};

static const AVFilterPad avfilter_vf_showinfo_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO
},
{ NULL }
};

AVFilter avfilter_vf_showinfo = { AVFilter avfilter_vf_showinfo = {
.name = "showinfo", .name = "showinfo",
.description = NULL_IF_CONFIG_SMALL("Show textual information for each video frame."), .description = NULL_IF_CONFIG_SMALL("Show textual information for each video frame."),
@@ -92,15 +112,7 @@ AVFilter avfilter_vf_showinfo = {
.priv_size = sizeof(ShowInfoContext), .priv_size = sizeof(ShowInfoContext),
.init = init, .init = init,


.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer = ff_null_get_video_buffer,
.start_frame = ff_null_start_frame,
.end_frame = end_frame,
.min_perms = AV_PERM_READ, },
{ .name = NULL}},

.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO },
{ .name = NULL}},
.inputs = avfilter_vf_showinfo_inputs,

.outputs = avfilter_vf_showinfo_outputs,
}; };

+ 23
- 11
libavfilter/vf_slicify.c View File

@@ -106,6 +106,27 @@ static int draw_slice(AVFilterLink *link, int y, int h, int slice_dir)
return 0; return 0;
} }


static const AVFilterPad avfilter_vf_slicify_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer = ff_null_get_video_buffer,
.start_frame = start_frame,
.draw_slice = draw_slice,
.config_props = config_props,
.end_frame = ff_null_end_frame,
},
{ NULL }
};

static const AVFilterPad avfilter_vf_slicify_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
},
{ NULL }
};

AVFilter avfilter_vf_slicify = { AVFilter avfilter_vf_slicify = {
.name = "slicify", .name = "slicify",
.description = NULL_IF_CONFIG_SMALL("Pass the images of input video on to next video filter as multiple slices."), .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 = {


.priv_size = sizeof(SliceContext), .priv_size = sizeof(SliceContext),


.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer = ff_null_get_video_buffer,
.start_frame = start_frame,
.draw_slice = draw_slice,
.config_props = config_props,
.end_frame = ff_null_end_frame, },
{ .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}},
.inputs = avfilter_vf_slicify_inputs,
.outputs = avfilter_vf_slicify_outputs,
}; };

+ 24
- 12
libavfilter/vf_transpose.c View File

@@ -266,6 +266,28 @@ static int draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir)
return trans->passthrough ? ff_null_draw_slice(inlink, y, h, slice_dir) : 0; return trans->passthrough ? ff_null_draw_slice(inlink, y, h, slice_dir) : 0;
} }


static const AVFilterPad avfilter_vf_transpose_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer= get_video_buffer,
.start_frame = start_frame,
.draw_slice = draw_slice,
.end_frame = end_frame,
.min_perms = AV_PERM_READ,
},
{ NULL }
};

static const AVFilterPad avfilter_vf_transpose_outputs[] = {
{
.name = "default",
.config_props = config_props_output,
.type = AVMEDIA_TYPE_VIDEO,
},
{ NULL }
};

AVFilter avfilter_vf_transpose = { AVFilter avfilter_vf_transpose = {
.name = "transpose", .name = "transpose",
.description = NULL_IF_CONFIG_SMALL("Transpose input video."), .description = NULL_IF_CONFIG_SMALL("Transpose input video."),
@@ -275,17 +297,7 @@ AVFilter avfilter_vf_transpose = {


.query_formats = query_formats, .query_formats = query_formats,


.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer= get_video_buffer,
.start_frame = start_frame,
.draw_slice = draw_slice,
.end_frame = end_frame,
.min_perms = AV_PERM_READ, },
{ .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default",
.config_props = config_props_output,
.type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}},
.inputs = avfilter_vf_transpose_inputs,
.outputs = avfilter_vf_transpose_outputs,
.priv_class = &transpose_class, .priv_class = &transpose_class,
}; };

+ 23
- 11
libavfilter/vf_unsharp.c View File

@@ -237,6 +237,26 @@ static int draw_slice(AVFilterLink *link, int y, int h, int slice_dir)
return 0; return 0;
} }


static const AVFilterPad avfilter_vf_unsharp_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.draw_slice = draw_slice,
.end_frame = end_frame,
.config_props = config_props,
.min_perms = AV_PERM_READ,
},
{ NULL }
};

static const AVFilterPad avfilter_vf_unsharp_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
},
{ NULL }
};

AVFilter avfilter_vf_unsharp = { AVFilter avfilter_vf_unsharp = {
.name = "unsharp", .name = "unsharp",
.description = NULL_IF_CONFIG_SMALL("Sharpen or blur the input video."), .description = NULL_IF_CONFIG_SMALL("Sharpen or blur the input video."),
@@ -247,15 +267,7 @@ AVFilter avfilter_vf_unsharp = {
.uninit = uninit, .uninit = uninit,
.query_formats = query_formats, .query_formats = query_formats,


.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.draw_slice = draw_slice,
.end_frame = end_frame,
.config_props = config_props,
.min_perms = AV_PERM_READ, },
{ .name = NULL}},

.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}},
.inputs = avfilter_vf_unsharp_inputs,

.outputs = avfilter_vf_unsharp_outputs,
}; };

+ 22
- 10
libavfilter/vf_vflip.c View File

@@ -96,20 +96,32 @@ static int draw_slice(AVFilterLink *link, int y, int h, int slice_dir)
return ff_draw_slice(ctx->outputs[0], link->h - (y+h), h, -1 * slice_dir); return ff_draw_slice(ctx->outputs[0], link->h - (y+h), h, -1 * slice_dir);
} }


static const AVFilterPad avfilter_vf_vflip_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer = get_video_buffer,
.start_frame = start_frame,
.draw_slice = draw_slice,
.config_props = config_input,
},
{ NULL }
};

static const AVFilterPad avfilter_vf_vflip_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
},
{ NULL }
};

AVFilter avfilter_vf_vflip = { AVFilter avfilter_vf_vflip = {
.name = "vflip", .name = "vflip",
.description = NULL_IF_CONFIG_SMALL("Flip the input video vertically."), .description = NULL_IF_CONFIG_SMALL("Flip the input video vertically."),


.priv_size = sizeof(FlipContext), .priv_size = sizeof(FlipContext),


.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer = get_video_buffer,
.start_frame = start_frame,
.draw_slice = draw_slice,
.config_props = config_input, },
{ .name = NULL}},
.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}},
.inputs = avfilter_vf_vflip_inputs,
.outputs = avfilter_vf_vflip_outputs,
}; };

+ 26
- 14
libavfilter/vf_yadif.c View File

@@ -441,6 +441,29 @@ static int config_props(AVFilterLink *link)
return 0; return 0;
} }


static const AVFilterPad avfilter_vf_yadif_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.start_frame = start_frame,
.draw_slice = null_draw_slice,
.end_frame = end_frame,
.min_perms = AV_PERM_PRESERVE,
},
{ NULL }
};

static const AVFilterPad avfilter_vf_yadif_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.poll_frame = poll_frame,
.request_frame = request_frame,
.config_props = config_props,
},
{ NULL }
};

AVFilter avfilter_vf_yadif = { AVFilter avfilter_vf_yadif = {
.name = "yadif", .name = "yadif",
.description = NULL_IF_CONFIG_SMALL("Deinterlace the input image."), .description = NULL_IF_CONFIG_SMALL("Deinterlace the input image."),
@@ -450,18 +473,7 @@ AVFilter avfilter_vf_yadif = {
.uninit = uninit, .uninit = uninit,
.query_formats = query_formats, .query_formats = query_formats,


.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.start_frame = start_frame,
.draw_slice = null_draw_slice,
.end_frame = end_frame,
.min_perms = AV_PERM_PRESERVE, },
{ .name = NULL}},

.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.poll_frame = poll_frame,
.request_frame = request_frame,
.config_props = config_props, },
{ .name = NULL}},
.inputs = avfilter_vf_yadif_inputs,

.outputs = avfilter_vf_yadif_outputs,
}; };

+ 11
- 9
libavfilter/vsink_nullsink.c View File

@@ -30,20 +30,22 @@ static int end_frame(AVFilterLink *link)
return 0; return 0;
} }


static const AVFilterPad avfilter_vsink_nullsink_inputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.start_frame = start_frame,
.end_frame = end_frame,
},
{ NULL },
};

AVFilter avfilter_vsink_nullsink = { AVFilter avfilter_vsink_nullsink = {
.name = "nullsink", .name = "nullsink",
.description = NULL_IF_CONFIG_SMALL("Do absolutely nothing with the input video."), .description = NULL_IF_CONFIG_SMALL("Do absolutely nothing with the input video."),


.priv_size = 0, .priv_size = 0,


.inputs = (const AVFilterPad[]) {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.start_frame = start_frame,
.end_frame = end_frame,
},
{ .name = NULL},
},
.inputs = avfilter_vsink_nullsink_inputs,
.outputs = NULL, .outputs = NULL,
}; };

+ 22
- 11
libavfilter/vsrc_testsrc.c View File

@@ -525,6 +525,16 @@ static int test_query_formats(AVFilterContext *ctx)
return 0; return 0;
} }


static const AVFilterPad avfilter_vsrc_testsrc_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.request_frame = request_frame,
.config_props = config_props,
},
{ NULL }
};

AVFilter avfilter_vsrc_testsrc = { AVFilter avfilter_vsrc_testsrc = {
.name = "testsrc", .name = "testsrc",
.description = NULL_IF_CONFIG_SMALL("Generate test pattern."), .description = NULL_IF_CONFIG_SMALL("Generate test pattern."),
@@ -535,12 +545,7 @@ AVFilter avfilter_vsrc_testsrc = {
.query_formats = test_query_formats, .query_formats = test_query_formats,


.inputs = NULL, .inputs = NULL,

.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.request_frame = request_frame,
.config_props = config_props, },
{ .name = NULL }},
.outputs = avfilter_vsrc_testsrc_outputs,
.priv_class = &testsrc_class, .priv_class = &testsrc_class,
}; };


@@ -639,6 +644,16 @@ static int rgbtest_config_props(AVFilterLink *outlink)
return config_props(outlink); return config_props(outlink);
} }


static const AVFilterPad avfilter_vsrc_rgbtestsrc_outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.request_frame = request_frame,
.config_props = rgbtest_config_props,
},
{ NULL }
};

AVFilter avfilter_vsrc_rgbtestsrc = { AVFilter avfilter_vsrc_rgbtestsrc = {
.name = "rgbtestsrc", .name = "rgbtestsrc",
.description = NULL_IF_CONFIG_SMALL("Generate RGB test pattern."), .description = NULL_IF_CONFIG_SMALL("Generate RGB test pattern."),
@@ -650,11 +665,7 @@ AVFilter avfilter_vsrc_rgbtestsrc = {


.inputs = NULL, .inputs = NULL,


.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.request_frame = request_frame,
.config_props = rgbtest_config_props, },
{ .name = NULL }},
.outputs = avfilter_vsrc_rgbtestsrc_outputs,
.priv_class = &rgbtestsrc_class, .priv_class = &rgbtestsrc_class,
}; };




+ 3
- 0
libavformat/mxfdec.c View File

@@ -951,6 +951,9 @@ static int mxf_get_sorted_table_segments(MXFContext *mxf, int *nb_sorted_segment
if (mxf->metadata_sets[i]->type == IndexTableSegment) if (mxf->metadata_sets[i]->type == IndexTableSegment)
nb_segments++; nb_segments++;


if (!nb_segments)
return AVERROR_INVALIDDATA;

if (!(unsorted_segments = av_calloc(nb_segments, sizeof(*unsorted_segments))) || if (!(unsorted_segments = av_calloc(nb_segments, sizeof(*unsorted_segments))) ||
!(*sorted_segments = av_calloc(nb_segments, sizeof(**sorted_segments)))) { !(*sorted_segments = av_calloc(nb_segments, sizeof(**sorted_segments)))) {
av_freep(sorted_segments); av_freep(sorted_segments);


+ 2
- 2
library.mak View File

@@ -25,7 +25,7 @@ $(TESTOBJS): CPPFLAGS += -DTEST


$(SUBDIR)$(LIBNAME): $(OBJS) $(SUBDIR)$(LIBNAME): $(OBJS)
$(RM) $@ $(RM) $@
$(AR) $(ARFLAGS) $(AR_O) $^ $(EXTRAOBJS)
$(AR) $(ARFLAGS) $(AR_O) $^
$(RANLIB) $@ $(RANLIB) $@


install-headers: install-lib$(NAME)-headers install-lib$(NAME)-pkgconfig install-headers: install-lib$(NAME)-headers install-lib$(NAME)-pkgconfig
@@ -45,7 +45,7 @@ $(SUBDIR)$(SLIBNAME): $(SUBDIR)$(SLIBNAME_WITH_MAJOR)


$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) $(SUBDIR)lib$(NAME).ver $(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) $(SUBDIR)lib$(NAME).ver
$(SLIB_CREATE_DEF_CMD) $(SLIB_CREATE_DEF_CMD)
$$(LD) $(SHFLAGS) $(LDFLAGS) $$(LD_O) $$(filter %.o,$$^) $(FFEXTRALIBS) $(EXTRAOBJS)
$$(LD) $(SHFLAGS) $(LDFLAGS) $$(LD_O) $$(filter %.o,$$^) $(FFEXTRALIBS)
$(SLIB_EXTRA_CMD) $(SLIB_EXTRA_CMD)


ifdef SUBDIR ifdef SUBDIR


+ 3
- 0
tests/fate/vcodec.mak View File

@@ -79,6 +79,9 @@ fate-vsynth%-h261: ENCOPTS = -qscale 11
FATE_VCODEC += h263 FATE_VCODEC += h263
fate-vsynth%-h263: ENCOPTS = -qscale 10 fate-vsynth%-h263: ENCOPTS = -qscale 10


FATE_VCODEC += h263-obmc
fate-vsynth%-h263-obmc: ENCOPTS = -qscale 10 -obmc 1

FATE_VCODEC += h263p FATE_VCODEC += h263p
fate-vsynth%-h263p: ENCOPTS = -qscale 2 -flags +aic -umv 1 -aiv 1 -ps 300 fate-vsynth%-h263p: ENCOPTS = -qscale 2 -flags +aic -umv 1 -aiv 1 -ps 300




+ 4
- 0
tests/ref/fate/vsynth1-h263-obmc View File

@@ -0,0 +1,4 @@
bdd8f9cafa39df97f2e395110f4419e0 *tests/data/fate/vsynth1-h263-obmc.avi
657328 tests/data/fate/vsynth1-h263-obmc.avi
844f7ee27fa122e199fe20987b41a15c *tests/data/fate/vsynth1-h263-obmc.out.rawvideo
stddev: 8.16 PSNR: 29.89 MAXDIFF: 113 bytes: 7603200/ 7603200

+ 4
- 0
tests/ref/fate/vsynth2-h263-obmc View File

@@ -0,0 +1,4 @@
482d48074d94ed72b0c7057b9c129b45 *tests/data/fate/vsynth2-h263-obmc.avi
154738 tests/data/fate/vsynth2-h263-obmc.avi
588d992d9d8096da8bdc5027268da914 *tests/data/fate/vsynth2-h263-obmc.out.rawvideo
stddev: 5.39 PSNR: 33.49 MAXDIFF: 82 bytes: 7603200/ 7603200

Loading…
Cancel
Save