From c9e183b490add7e3712974fec85db6c86c13b671 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Sat, 16 Jun 2012 09:47:46 +0000 Subject: [PATCH] lavfi: update some deprecated functions Signed-off-by: Paul B Mahol --- libavfilter/af_aconvert.c | 8 ++++---- libavfilter/af_amerge.c | 6 +++--- libavfilter/af_aresample.c | 14 +++++++------- libavfilter/af_astreamsync.c | 8 ++++---- libavfilter/af_earwax.c | 6 +++--- libavfilter/af_pan.c | 2 +- libavfilter/af_silencedetect.c | 4 ++-- libavfilter/af_volume.c | 4 ++-- libavfilter/asrc_aevalsrc.c | 4 ++-- libavfilter/avfiltergraph.c | 10 +++++----- libavfilter/defaults.c | 6 ++---- libavfilter/drawutils.c | 3 ++- libavfilter/formats.c | 2 +- libavfilter/sink_buffer.c | 10 +++++----- libavfilter/src_movie.c | 4 ++-- libavfilter/vf_bbox.c | 6 +++--- libavfilter/vf_blackdetect.c | 8 ++++---- libavfilter/vf_colormatrix.c | 12 +++++++----- libavfilter/vf_deshake.c | 8 +++++--- libavfilter/vf_hflip.c | 4 ++-- libavfilter/vf_idet.c | 13 +++++++------ libavfilter/vf_removelogo.c | 14 ++++++++------ libavfilter/vf_select.c | 2 +- libavfilter/vf_setfield.c | 5 +++-- libavfilter/vf_super2xsai.c | 8 +++++--- libavfilter/vf_swapuv.c | 8 +++++--- libavfilter/vf_thumbnail.c | 13 +++++++------ libavfilter/vf_tile.c | 2 +- libavfilter/vf_tinterlace.c | 26 +++++++++++++------------- libavfilter/video.c | 2 +- libavfilter/vsrc_cellauto.c | 12 +++++++----- libavfilter/vsrc_life.c | 12 +++++++----- libavfilter/vsrc_mandelbrot.c | 12 +++++++----- libavfilter/vsrc_mptestsrc.c | 12 +++++++----- 34 files changed, 145 insertions(+), 125 deletions(-) diff --git a/libavfilter/af_aconvert.c b/libavfilter/af_aconvert.c index 9e2785641d..3cf593b723 100644 --- a/libavfilter/af_aconvert.c +++ b/libavfilter/af_aconvert.c @@ -75,14 +75,14 @@ static int query_formats(AVFilterContext *ctx) AVFilterLink *outlink = ctx->outputs[0]; AVFilterChannelLayouts *layouts; - avfilter_formats_ref(avfilter_make_all_formats(AVMEDIA_TYPE_AUDIO), + ff_formats_ref(avfilter_make_all_formats(AVMEDIA_TYPE_AUDIO), &inlink->out_formats); if (aconvert->out_sample_fmt != AV_SAMPLE_FMT_NONE) { formats = NULL; - avfilter_add_format(&formats, aconvert->out_sample_fmt); - avfilter_formats_ref(formats, &outlink->in_formats); + ff_add_format(&formats, aconvert->out_sample_fmt); + ff_formats_ref(formats, &outlink->in_formats); } else - avfilter_formats_ref(avfilter_make_all_formats(AVMEDIA_TYPE_AUDIO), + ff_formats_ref(avfilter_make_all_formats(AVMEDIA_TYPE_AUDIO), &outlink->in_formats); ff_channel_layouts_ref(ff_all_channel_layouts(), diff --git a/libavfilter/af_amerge.c b/libavfilter/af_amerge.c index a8942a18f0..43d2a75890 100644 --- a/libavfilter/af_amerge.c +++ b/libavfilter/af_amerge.c @@ -119,8 +119,8 @@ static int query_formats(AVFilterContext *ctx) if ((inlayout[i] >> c) & 1) *(route[i]++) = out_ch_number++; } - formats = avfilter_make_format_list(ff_packed_sample_fmts_array); - avfilter_set_common_sample_formats(ctx, formats); + formats = ff_make_format_list(ff_packed_sample_fmts_array); + ff_set_common_formats(ctx, formats); for (i = 0; i < am->nb_inputs; i++) { layouts = NULL; ff_add_channel_layout(&layouts, inlayout[i]); @@ -315,7 +315,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque) .min_perms = AV_PERM_READ | AV_PERM_PRESERVE, }; snprintf(name, sizeof(name), "in%d", i); - avfilter_insert_inpad(ctx, i, &pad); + ff_insert_inpad(ctx, i, &pad); } return 0; } diff --git a/libavfilter/af_aresample.c b/libavfilter/af_aresample.c index 8ead3147a9..81f326ff47 100644 --- a/libavfilter/af_aresample.c +++ b/libavfilter/af_aresample.c @@ -91,29 +91,29 @@ static int query_formats(AVFilterContext *ctx) AVFilterLink *inlink = ctx->inputs[0]; AVFilterLink *outlink = ctx->outputs[0]; - AVFilterFormats *in_formats = avfilter_all_formats(AVMEDIA_TYPE_AUDIO); + AVFilterFormats *in_formats = ff_all_formats(AVMEDIA_TYPE_AUDIO); AVFilterFormats *out_formats; AVFilterFormats *in_samplerates = ff_all_samplerates(); AVFilterFormats *out_samplerates; AVFilterChannelLayouts *in_layouts = ff_all_channel_layouts(); AVFilterChannelLayouts *out_layouts; - avfilter_formats_ref (in_formats, &inlink->out_formats); - avfilter_formats_ref (in_samplerates, &inlink->out_samplerates); + ff_formats_ref (in_formats, &inlink->out_formats); + ff_formats_ref (in_samplerates, &inlink->out_samplerates); ff_channel_layouts_ref(in_layouts, &inlink->out_channel_layouts); if(out_rate > 0) { - out_samplerates = avfilter_make_format_list((int[]){ out_rate, -1 }); + out_samplerates = ff_make_format_list((int[]){ out_rate, -1 }); } else { out_samplerates = ff_all_samplerates(); } - avfilter_formats_ref(out_samplerates, &outlink->in_samplerates); + ff_formats_ref(out_samplerates, &outlink->in_samplerates); if(out_format != AV_SAMPLE_FMT_NONE) { - out_formats = avfilter_make_format_list((int[]){ out_format, -1 }); + out_formats = ff_make_format_list((int[]){ out_format, -1 }); } else out_formats = avfilter_make_all_formats(AVMEDIA_TYPE_AUDIO); - avfilter_formats_ref(out_formats, &outlink->in_formats); + ff_formats_ref(out_formats, &outlink->in_formats); if(out_layout) { out_layouts = avfilter_make_format64_list((int64_t[]){ out_layout, -1 }); diff --git a/libavfilter/af_astreamsync.c b/libavfilter/af_astreamsync.c index 3d919d1f2a..18a2fe6217 100644 --- a/libavfilter/af_astreamsync.c +++ b/libavfilter/af_astreamsync.c @@ -85,11 +85,11 @@ static int query_formats(AVFilterContext *ctx) for (i = 0; i < 2; i++) { formats = ctx->inputs[i]->in_formats; - avfilter_formats_ref(formats, &ctx->inputs[i]->out_formats); - avfilter_formats_ref(formats, &ctx->outputs[i]->in_formats); + ff_formats_ref(formats, &ctx->inputs[i]->out_formats); + ff_formats_ref(formats, &ctx->outputs[i]->in_formats); rates = ff_all_samplerates(); - avfilter_formats_ref(rates, &ctx->inputs[i]->out_samplerates); - avfilter_formats_ref(rates, &ctx->outputs[i]->in_samplerates); + ff_formats_ref(rates, &ctx->inputs[i]->out_samplerates); + ff_formats_ref(rates, &ctx->outputs[i]->in_samplerates); layouts = ctx->inputs[i]->in_channel_layouts; ff_channel_layouts_ref(layouts, &ctx->inputs[i]->out_channel_layouts); ff_channel_layouts_ref(layouts, &ctx->outputs[i]->in_channel_layouts); diff --git a/libavfilter/af_earwax.c b/libavfilter/af_earwax.c index d4884f0624..d86b410a1e 100644 --- a/libavfilter/af_earwax.c +++ b/libavfilter/af_earwax.c @@ -82,11 +82,11 @@ static int query_formats(AVFilterContext *ctx) AVFilterFormats *formats = NULL; AVFilterChannelLayouts *layout = NULL; - avfilter_add_format(&formats, AV_SAMPLE_FMT_S16); - avfilter_set_common_sample_formats(ctx, formats); + ff_add_format(&formats, AV_SAMPLE_FMT_S16); + ff_set_common_formats(ctx, formats); ff_add_channel_layout(&layout, AV_CH_LAYOUT_STEREO); ff_set_common_channel_layouts(ctx, layout); - ff_set_common_samplerates(ctx, avfilter_make_format_list(sample_rates)); + ff_set_common_samplerates(ctx, ff_make_format_list(sample_rates)); return 0; } diff --git a/libavfilter/af_pan.c b/libavfilter/af_pan.c index 0a1bf32061..aed59cd284 100644 --- a/libavfilter/af_pan.c +++ b/libavfilter/af_pan.c @@ -217,7 +217,7 @@ static int query_formats(AVFilterContext *ctx) pan->pure_gains = are_gains_pure(pan); /* libswr supports any sample and packing formats */ - avfilter_set_common_sample_formats(ctx, avfilter_make_all_formats(AVMEDIA_TYPE_AUDIO)); + ff_set_common_formats(ctx, avfilter_make_all_formats(AVMEDIA_TYPE_AUDIO)); formats = ff_all_samplerates(); if (!formats) diff --git a/libavfilter/af_silencedetect.c b/libavfilter/af_silencedetect.c index 27191cd314..331ea87d2d 100644 --- a/libavfilter/af_silencedetect.c +++ b/libavfilter/af_silencedetect.c @@ -137,10 +137,10 @@ static int query_formats(AVFilterContext *ctx) return AVERROR(ENOMEM); ff_set_common_channel_layouts(ctx, layouts); - formats = avfilter_make_format_list(sample_fmts); + formats = ff_make_format_list(sample_fmts); if (!formats) return AVERROR(ENOMEM); - avfilter_set_common_sample_formats(ctx, formats); + ff_set_common_formats(ctx, formats); formats = ff_all_samplerates(); if (!formats) diff --git a/libavfilter/af_volume.c b/libavfilter/af_volume.c index 7c51884195..e01453b3b4 100644 --- a/libavfilter/af_volume.c +++ b/libavfilter/af_volume.c @@ -97,10 +97,10 @@ static int query_formats(AVFilterContext *ctx) return AVERROR(ENOMEM); ff_set_common_channel_layouts(ctx, layouts); - formats = avfilter_make_format_list(sample_fmts); + formats = ff_make_format_list(sample_fmts); if (!formats) return AVERROR(ENOMEM); - avfilter_set_common_sample_formats(ctx, formats); + ff_set_common_formats(ctx, formats); formats = ff_all_samplerates(); if (!formats) diff --git a/libavfilter/asrc_aevalsrc.c b/libavfilter/asrc_aevalsrc.c index 59e5503f77..85e0ee5620 100644 --- a/libavfilter/asrc_aevalsrc.c +++ b/libavfilter/asrc_aevalsrc.c @@ -199,9 +199,9 @@ static int query_formats(AVFilterContext *ctx) int64_t chlayouts[] = { eval->chlayout, -1 }; int sample_rates[] = { eval->sample_rate, -1 }; - avfilter_set_common_sample_formats (ctx, avfilter_make_format_list(sample_fmts)); + ff_set_common_formats (ctx, ff_make_format_list(sample_fmts)); ff_set_common_channel_layouts(ctx, avfilter_make_format64_list(chlayouts)); - ff_set_common_samplerates(ctx, avfilter_make_format_list(sample_rates)); + ff_set_common_samplerates(ctx, ff_make_format_list(sample_rates)); return 0; } diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c index 0f363b28e9..1af77e4a14 100644 --- a/libavfilter/avfiltergraph.c +++ b/libavfilter/avfiltergraph.c @@ -189,7 +189,7 @@ static int filter_query_formats(AVFilterContext *ctx) formats = avfilter_make_all_formats(type); if (!formats) return AVERROR(ENOMEM); - avfilter_set_common_formats(ctx, formats); + ff_set_common_formats(ctx, formats); if (type == AVMEDIA_TYPE_AUDIO) { samplerates = ff_all_samplerates(); if (!samplerates) @@ -231,9 +231,9 @@ static int insert_conv_filter(AVFilterGraph *graph, AVFilterLink *link, filter_query_formats(filt_ctx); if ( ((link = filt_ctx-> inputs[0]) && - !avfilter_merge_formats(link->in_formats, link->out_formats)) || + !ff_merge_formats(link->in_formats, link->out_formats)) || ((link = filt_ctx->outputs[0]) && - !avfilter_merge_formats(link->in_formats, link->out_formats)) + !ff_merge_formats(link->in_formats, link->out_formats)) ) { av_log(NULL, AV_LOG_ERROR, "Impossible to convert between the formats supported by the filter " @@ -295,7 +295,7 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx) return AVERROR(EINVAL); if (link->type == AVMEDIA_TYPE_VIDEO && - !avfilter_merge_formats(link->in_formats, link->out_formats)) { + !ff_merge_formats(link->in_formats, link->out_formats)) { /* couldn't merge format lists, auto-insert scale filter */ snprintf(filt_args, sizeof(filt_args), "0:0:%s", @@ -310,7 +310,7 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx) /* Merge all three list before checking: that way, in all * three categories, aconvert will use a common format * whenever possible. */ - formats = avfilter_merge_formats(link->in_formats, link->out_formats); + formats = ff_merge_formats(link->in_formats, link->out_formats); chlayouts = ff_merge_channel_layouts(link->in_channel_layouts , link->out_channel_layouts); samplerates = ff_merge_samplerates (link->in_samplerates, link->out_samplerates); diff --git a/libavfilter/defaults.c b/libavfilter/defaults.c index c25c037c2a..c18eacd23a 100644 --- a/libavfilter/defaults.c +++ b/libavfilter/defaults.c @@ -34,13 +34,11 @@ static void set_common_formats(AVFilterContext *ctx, AVFilterFormats *fmts, int i; for (i = 0; i < ctx->input_count; i++) if (ctx->inputs[i] && ctx->inputs[i]->type == type) - avfilter_formats_ref(fmts, - (AVFilterFormats **)((uint8_t *)ctx->inputs[i]+offout)); + ff_formats_ref(fmts, (AVFilterFormats **)((uint8_t *)ctx->inputs[i]+offout)); for (i = 0; i < ctx->output_count; i++) if (ctx->outputs[i] && ctx->outputs[i]->type == type) - avfilter_formats_ref(fmts, - (AVFilterFormats **)((uint8_t *)ctx->outputs[i]+offin)); + ff_formats_ref(fmts, (AVFilterFormats **)((uint8_t *)ctx->outputs[i]+offin)); if (!fmts->refcount) { av_free(fmts->formats); diff --git a/libavfilter/drawutils.c b/libavfilter/drawutils.c index 9abe28b59b..83968abf7d 100644 --- a/libavfilter/drawutils.c +++ b/libavfilter/drawutils.c @@ -23,6 +23,7 @@ #include "libavutil/colorspace.h" #include "libavutil/pixdesc.h" #include "drawutils.h" +#include "formats.h" enum { RED = 0, GREEN, BLUE, ALPHA }; @@ -505,7 +506,7 @@ AVFilterFormats *ff_draw_supported_pixel_formats(unsigned flags) if (ff_draw_init(&draw, i, flags) >= 0) pix_fmts[n++] = i; pix_fmts[n++] = PIX_FMT_NONE; - return avfilter_make_format_list(pix_fmts); + return ff_make_format_list(pix_fmts); } #ifdef TEST diff --git a/libavfilter/formats.c b/libavfilter/formats.c index 0b1ef30d22..8cdd3bee9a 100644 --- a/libavfilter/formats.c +++ b/libavfilter/formats.c @@ -299,7 +299,7 @@ AVFilterFormats *avfilter_make_all_packing_formats(void) -1, }; - return avfilter_make_format_list(packing); + return ff_make_format_list(packing); } #endif diff --git a/libavfilter/sink_buffer.c b/libavfilter/sink_buffer.c index 35c0b16b41..27f21b017d 100644 --- a/libavfilter/sink_buffer.c +++ b/libavfilter/sink_buffer.c @@ -152,7 +152,7 @@ int av_buffersink_poll_frame(AVFilterContext *ctx) BufferSinkContext *buf = ctx->priv; AVFilterLink *inlink = ctx->inputs[0]; - return av_fifo_size(buf->fifo)/sizeof(AVFilterBufferRef *) + avfilter_poll_frame(inlink); + return av_fifo_size(buf->fifo)/sizeof(AVFilterBufferRef *) + ff_poll_frame(inlink); } #if FF_API_OLD_VSINK_API @@ -201,9 +201,9 @@ static int vsink_query_formats(AVFilterContext *ctx) BufferSinkContext *buf = ctx->priv; if (buf->pixel_fmts) - avfilter_set_common_pixel_formats(ctx, avfilter_make_format_list(buf->pixel_fmts)); + ff_set_common_formats(ctx, ff_make_format_list(buf->pixel_fmts)); else - avfilter_default_query_formats(ctx); + ff_default_query_formats(ctx); return 0; } @@ -272,9 +272,9 @@ static int asink_query_formats(AVFilterContext *ctx) AVFilterFormats *formats = NULL; AVFilterChannelLayouts *layouts = NULL; - if (!(formats = avfilter_make_format_list(buf->sample_fmts))) + if (!(formats = ff_make_format_list(buf->sample_fmts))) return AVERROR(ENOMEM); - avfilter_set_common_sample_formats(ctx, formats); + ff_set_common_formats(ctx, formats); if (!(layouts = avfilter_make_format64_list(buf->channel_layouts))) return AVERROR(ENOMEM); diff --git a/libavfilter/src_movie.c b/libavfilter/src_movie.c index eea2db3e8c..a3239c19f8 100644 --- a/libavfilter/src_movie.c +++ b/libavfilter/src_movie.c @@ -371,8 +371,8 @@ static int amovie_query_formats(AVFilterContext *ctx) int64_t chlayouts[] = { c->channel_layout ? c->channel_layout : av_get_default_channel_layout(c->channels), -1 }; - avfilter_set_common_sample_formats (ctx, avfilter_make_format_list(sample_fmts)); - ff_set_common_samplerates (ctx, avfilter_make_format_list(sample_rates)); + ff_set_common_formats (ctx, ff_make_format_list(sample_fmts)); + ff_set_common_samplerates (ctx, ff_make_format_list(sample_rates)); ff_set_common_channel_layouts(ctx, avfilter_make_format64_list(chlayouts)); return 0; diff --git a/libavfilter/vf_bbox.c b/libavfilter/vf_bbox.c index f8dc625524..6fc693517c 100644 --- a/libavfilter/vf_bbox.c +++ b/libavfilter/vf_bbox.c @@ -52,7 +52,7 @@ static int query_formats(AVFilterContext *ctx) PIX_FMT_NONE, }; - avfilter_set_common_pixel_formats(ctx, avfilter_make_format_list(pix_fmts)); + ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); return 0; } @@ -87,7 +87,7 @@ static void end_frame(AVFilterLink *inlink) bbox->frame++; avfilter_unref_buffer(picref); - avfilter_end_frame(inlink->dst->outputs[0]); + ff_end_frame(inlink->dst->outputs[0]); } AVFilter avfilter_vf_bbox = { @@ -100,7 +100,7 @@ AVFilter avfilter_vf_bbox = { .inputs = (const AVFilterPad[]) { { .name = "default", .type = AVMEDIA_TYPE_VIDEO, - .get_video_buffer = avfilter_null_get_video_buffer, + .get_video_buffer = ff_null_get_video_buffer, .start_frame = ff_null_start_frame_keep_ref, .end_frame = end_frame, .min_perms = AV_PERM_READ, }, diff --git a/libavfilter/vf_blackdetect.c b/libavfilter/vf_blackdetect.c index a53927b5bd..abb22bdfb3 100644 --- a/libavfilter/vf_blackdetect.c +++ b/libavfilter/vf_blackdetect.c @@ -79,7 +79,7 @@ static int query_formats(AVFilterContext *ctx) PIX_FMT_NONE }; - avfilter_set_common_pixel_formats(ctx, avfilter_make_format_list(pix_fmts)); + ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); return 0; } @@ -134,7 +134,7 @@ static void draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir) p += picref->linesize[0]; } - avfilter_draw_slice(ctx->outputs[0], y, h, slice_dir); + ff_draw_slice(ctx->outputs[0], y, h, slice_dir); } static void end_frame(AVFilterLink *inlink) @@ -176,7 +176,7 @@ static void end_frame(AVFilterLink *inlink) blackdetect->frame_count++; blackdetect->nb_black_pixels = 0; avfilter_unref_buffer(picref); - avfilter_end_frame(inlink->dst->outputs[0]); + ff_end_frame(inlink->dst->outputs[0]); } AVFilter avfilter_vf_blackdetect = { @@ -191,7 +191,7 @@ AVFilter avfilter_vf_blackdetect = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_input, .draw_slice = draw_slice, - .get_video_buffer = avfilter_null_get_video_buffer, + .get_video_buffer = ff_null_get_video_buffer, .start_frame = ff_null_start_frame_keep_ref, .end_frame = end_frame, }, { .name = NULL } diff --git a/libavfilter/vf_colormatrix.c b/libavfilter/vf_colormatrix.c index fa20b6a545..80814deb67 100644 --- a/libavfilter/vf_colormatrix.c +++ b/libavfilter/vf_colormatrix.c @@ -31,6 +31,8 @@ #include #include #include "avfilter.h" +#include "formats.h" +#include "video.h" #include "libavutil/pixdesc.h" #include "libavutil/avstring.h" @@ -325,7 +327,7 @@ static int query_formats(AVFilterContext *ctx) PIX_FMT_NONE }; - avfilter_set_common_pixel_formats(ctx, avfilter_make_format_list(pix_fmts)); + ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); return 0; } @@ -333,7 +335,7 @@ static int query_formats(AVFilterContext *ctx) static AVFilterBufferRef *get_video_buffer(AVFilterLink *inlink, int perms, int w, int h) { AVFilterBufferRef *picref = - avfilter_get_video_buffer(inlink->dst->outputs[0], perms, w, h); + ff_get_video_buffer(inlink->dst->outputs[0], perms, w, h); return picref; } @@ -343,7 +345,7 @@ static void start_frame(AVFilterLink *link, AVFilterBufferRef *picref) link->dst->outputs[0]->out_buf = outpicref; - avfilter_start_frame(link->dst->outputs[0], outpicref); + ff_start_frame(link->dst->outputs[0], outpicref); } static void end_frame(AVFilterLink *link) @@ -359,8 +361,8 @@ static void end_frame(AVFilterLink *link) else process_frame_uyvy422(color, out, link->cur_buf); - avfilter_draw_slice(ctx->outputs[0], 0, link->dst->outputs[0]->h, 1); - avfilter_end_frame(ctx->outputs[0]); + ff_draw_slice(ctx->outputs[0], 0, link->dst->outputs[0]->h, 1); + ff_end_frame(ctx->outputs[0]); avfilter_unref_buffer(link->cur_buf); } diff --git a/libavfilter/vf_deshake.c b/libavfilter/vf_deshake.c index cdece5c1bf..6b2a3d4c7d 100644 --- a/libavfilter/vf_deshake.c +++ b/libavfilter/vf_deshake.c @@ -50,6 +50,8 @@ */ #include "avfilter.h" +#include "formats.h" +#include "video.h" #include "libavutil/common.h" #include "libavutil/mem.h" #include "libavutil/pixdesc.h" @@ -390,7 +392,7 @@ static int query_formats(AVFilterContext *ctx) PIX_FMT_YUVJ444P, PIX_FMT_YUVJ440P, PIX_FMT_NONE }; - avfilter_set_common_pixel_formats(ctx, avfilter_make_format_list(pix_fmts)); + ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); return 0; } @@ -525,8 +527,8 @@ static void end_frame(AVFilterLink *link) deshake->ref = in; // Draw the transformed frame information - avfilter_draw_slice(link->dst->outputs[0], 0, link->h, 1); - avfilter_end_frame(link->dst->outputs[0]); + ff_draw_slice(link->dst->outputs[0], 0, link->h, 1); + ff_end_frame(link->dst->outputs[0]); avfilter_unref_buffer(out); } diff --git a/libavfilter/vf_hflip.c b/libavfilter/vf_hflip.c index bfc83f2fda..459cfab886 100644 --- a/libavfilter/vf_hflip.c +++ b/libavfilter/vf_hflip.c @@ -88,14 +88,14 @@ static void start_frame(AVFilterLink *inlink, AVFilterBufferRef *picref) AVFilterLink *outlink = inlink->dst->outputs[0]; outlink->out_buf = - avfilter_get_video_buffer(outlink, AV_PERM_WRITE, outlink->w, outlink->h); + ff_get_video_buffer(outlink, AV_PERM_WRITE, outlink->w, outlink->h); avfilter_copy_buffer_ref_props(outlink->out_buf, picref); /* copy palette if required */ if (av_pix_fmt_descriptors[inlink->format].flags & PIX_FMT_PAL) memcpy(inlink->dst->outputs[0]->out_buf->data[1], picref->data[1], AVPALETTE_SIZE); - avfilter_start_frame(outlink, avfilter_ref_buffer(outlink->out_buf, ~0)); + ff_start_frame(outlink, avfilter_ref_buffer(outlink->out_buf, ~0)); } static void draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir) diff --git a/libavfilter/vf_idet.c b/libavfilter/vf_idet.c index 0441c78fd0..48aad5f417 100644 --- a/libavfilter/vf_idet.c +++ b/libavfilter/vf_idet.c @@ -22,6 +22,7 @@ #include "libavutil/common.h" #include "libavutil/pixdesc.h" #include "avfilter.h" +#include "internal.h" #undef NDEBUG #include @@ -185,7 +186,7 @@ static void start_frame(AVFilterLink *link, AVFilterBufferRef *picref) if (!idet->prev) idet->prev = avfilter_ref_buffer(idet->cur, AV_PERM_READ); - avfilter_start_frame(ctx->outputs[0], avfilter_ref_buffer(idet->cur, AV_PERM_READ)); + ff_start_frame(ctx->outputs[0], avfilter_ref_buffer(idet->cur, AV_PERM_READ)); } static void end_frame(AVFilterLink *link) @@ -203,8 +204,8 @@ static void end_frame(AVFilterLink *link) filter(ctx); - avfilter_draw_slice(ctx->outputs[0], 0, link->h, 1); - avfilter_end_frame(ctx->outputs[0]); + ff_draw_slice(ctx->outputs[0], 0, link->h, 1); + ff_end_frame(ctx->outputs[0]); } static int request_frame(AVFilterLink *link) @@ -227,12 +228,12 @@ static int poll_frame(AVFilterLink *link) IDETContext *idet = link->src->priv; int ret, val; - val = avfilter_poll_frame(link->src->inputs[0]); + val = ff_poll_frame(link->src->inputs[0]); if (val >= 1 && !idet->next) { //FIXME change API to not requre this red tape if ((ret = avfilter_request_frame(link->src->inputs[0])) < 0) return ret; - val = avfilter_poll_frame(link->src->inputs[0]); + val = ff_poll_frame(link->src->inputs[0]); } assert(idet->next || !val); @@ -286,7 +287,7 @@ static int query_formats(AVFilterContext *ctx) PIX_FMT_NONE }; - avfilter_set_common_pixel_formats(ctx, avfilter_make_format_list(pix_fmts)); + ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); return 0; } diff --git a/libavfilter/vf_removelogo.c b/libavfilter/vf_removelogo.c index b1a6fc7e23..c912fc38d7 100644 --- a/libavfilter/vf_removelogo.c +++ b/libavfilter/vf_removelogo.c @@ -71,6 +71,8 @@ #include "libavutil/imgutils.h" #include "avfilter.h" +#include "formats.h" +#include "video.h" #include "bbox.h" #include "lavfutils.h" #include "lswsutils.h" @@ -190,7 +192,7 @@ static void convert_mask_to_strength_mask(uint8_t *data, int linesize, static int query_formats(AVFilterContext *ctx) { enum PixelFormat pix_fmts[] = { PIX_FMT_YUV420P, PIX_FMT_NONE }; - avfilter_set_common_pixel_formats(ctx, avfilter_make_format_list(pix_fmts)); + ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); return 0; } @@ -476,7 +478,7 @@ static void start_frame(AVFilterLink *inlink, AVFilterBufferRef *inpicref) AVFilterBufferRef *outpicref; if (inpicref->perms & AV_PERM_PRESERVE) { - outpicref = avfilter_get_video_buffer(outlink, AV_PERM_WRITE, + outpicref = ff_get_video_buffer(outlink, AV_PERM_WRITE, outlink->w, outlink->h); avfilter_copy_buffer_ref_props(outpicref, inpicref); outpicref->video->w = outlink->w; @@ -485,7 +487,7 @@ static void start_frame(AVFilterLink *inlink, AVFilterBufferRef *inpicref) outpicref = inpicref; outlink->out_buf = outpicref; - avfilter_start_frame(outlink, avfilter_ref_buffer(outpicref, ~0)); + ff_start_frame(outlink, avfilter_ref_buffer(outpicref, ~0)); } static void end_frame(AVFilterLink *inlink) @@ -512,8 +514,8 @@ static void end_frame(AVFilterLink *inlink) removelogo->half_mask_data, inlink->w/2, inlink->w/2, inlink->h/2, direct, &removelogo->half_mask_bbox); - avfilter_draw_slice(outlink, 0, inlink->h, 1); - avfilter_end_frame(outlink); + ff_draw_slice(outlink, 0, inlink->h, 1); + ff_end_frame(outlink); avfilter_unref_buffer(inpicref); if (!direct) avfilter_unref_buffer(outpicref); @@ -554,7 +556,7 @@ AVFilter avfilter_vf_removelogo = { .inputs = (const AVFilterPad[]) { { .name = "default", .type = AVMEDIA_TYPE_VIDEO, - .get_video_buffer = avfilter_null_get_video_buffer, + .get_video_buffer = ff_null_get_video_buffer, .config_props = config_props_input, .draw_slice = null_draw_slice, .start_frame = start_frame, diff --git a/libavfilter/vf_select.c b/libavfilter/vf_select.c index aa996cb36e..1fc71eb9b4 100644 --- a/libavfilter/vf_select.c +++ b/libavfilter/vf_select.c @@ -390,7 +390,7 @@ static int query_formats(AVFilterContext *ctx) PIX_FMT_RGB24, PIX_FMT_BGR24, PIX_FMT_NONE }; - avfilter_set_common_pixel_formats(ctx, avfilter_make_format_list(pix_fmts)); + ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); } return 0; } diff --git a/libavfilter/vf_setfield.c b/libavfilter/vf_setfield.c index 00be599265..d50a252e23 100644 --- a/libavfilter/vf_setfield.c +++ b/libavfilter/vf_setfield.c @@ -24,6 +24,7 @@ */ #include "avfilter.h" +#include "video.h" enum SetFieldMode { MODE_AUTO = -1, @@ -79,7 +80,7 @@ static void start_frame(AVFilterLink *inlink, AVFilterBufferRef *inpicref) outpicref->video->interlaced = 1; outpicref->video->top_field_first = setfield->mode; } - avfilter_start_frame(inlink->dst->outputs[0], outpicref); + ff_start_frame(inlink->dst->outputs[0], outpicref); } AVFilter avfilter_vf_setfield = { @@ -92,7 +93,7 @@ AVFilter avfilter_vf_setfield = { .inputs = (const AVFilterPad[]) { { .name = "default", .type = AVMEDIA_TYPE_VIDEO, - .get_video_buffer = avfilter_null_get_video_buffer, + .get_video_buffer = ff_null_get_video_buffer, .start_frame = start_frame, }, { .name = NULL } }, diff --git a/libavfilter/vf_super2xsai.c b/libavfilter/vf_super2xsai.c index 1b0b6a03da..adfc41db37 100644 --- a/libavfilter/vf_super2xsai.c +++ b/libavfilter/vf_super2xsai.c @@ -29,6 +29,8 @@ #include "libavutil/pixdesc.h" #include "libavutil/intreadwrite.h" #include "avfilter.h" +#include "formats.h" +#include "video.h" typedef struct { /* masks used for two pixels interpolation */ @@ -238,7 +240,7 @@ static int query_formats(AVFilterContext *ctx) PIX_FMT_NONE }; - avfilter_set_common_pixel_formats(ctx, avfilter_make_format_list(pix_fmts)); + ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); return 0; } @@ -313,8 +315,8 @@ static void end_frame(AVFilterLink *inlink) inlink->w, inlink->h); avfilter_unref_buffer(inpicref); - avfilter_draw_slice(outlink, 0, outlink->h, 1); - avfilter_end_frame(outlink); + ff_draw_slice(outlink, 0, outlink->h, 1); + ff_end_frame(outlink); avfilter_unref_buffer(outpicref); } diff --git a/libavfilter/vf_swapuv.c b/libavfilter/vf_swapuv.c index 6e3533381f..1a13edae5d 100644 --- a/libavfilter/vf_swapuv.c +++ b/libavfilter/vf_swapuv.c @@ -24,12 +24,14 @@ */ #include "avfilter.h" +#include "formats.h" +#include "video.h" static AVFilterBufferRef *get_video_buffer(AVFilterLink *link, int perms, int w, int h) { AVFilterBufferRef *picref = - avfilter_default_get_video_buffer(link, perms, w, h); + ff_default_get_video_buffer(link, perms, w, h); uint8_t *tmp; int tmp2; @@ -54,7 +56,7 @@ static void start_frame(AVFilterLink *link, AVFilterBufferRef *inpicref) outpicref->linesize[1] = inpicref->linesize[2]; outpicref->linesize[2] = inpicref->linesize[1]; - avfilter_start_frame(link->dst->outputs[0], outpicref); + ff_start_frame(link->dst->outputs[0], outpicref); } static int query_formats(AVFilterContext *ctx) @@ -68,7 +70,7 @@ static int query_formats(AVFilterContext *ctx) PIX_FMT_NONE, }; - avfilter_set_common_pixel_formats(ctx, avfilter_make_format_list(pix_fmts)); + ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); return 0; } diff --git a/libavfilter/vf_thumbnail.c b/libavfilter/vf_thumbnail.c index 0b7ba06482..215f50a509 100644 --- a/libavfilter/vf_thumbnail.c +++ b/libavfilter/vf_thumbnail.c @@ -28,6 +28,7 @@ */ #include "avfilter.h" +#include "internal.h" #define HIST_SIZE (3*256) @@ -151,10 +152,10 @@ static void end_frame(AVFilterLink *inlink) picref = thumb->frames[best_frame_idx].buf; av_log(ctx, AV_LOG_INFO, "frame id #%d (pts_time=%f) selected\n", best_frame_idx, picref->pts * av_q2d(inlink->time_base)); - avfilter_start_frame(outlink, picref); + ff_start_frame(outlink, picref); thumb->frames[best_frame_idx].buf = NULL; - avfilter_draw_slice(outlink, 0, inlink->h, 1); - avfilter_end_frame(outlink); + ff_draw_slice(outlink, 0, inlink->h, 1); + ff_end_frame(outlink); } static av_cold void uninit(AVFilterContext *ctx) @@ -188,7 +189,7 @@ static int poll_frame(AVFilterLink *link) { ThumbContext *thumb = link->src->priv; AVFilterLink *inlink = link->src->inputs[0]; - int ret, available_frames = avfilter_poll_frame(inlink); + int ret, available_frames = ff_poll_frame(inlink); /* If the input link is not able to provide any frame, we can't do anything * at the moment and thus have zero thumbnail available. */ @@ -212,7 +213,7 @@ static int query_formats(AVFilterContext *ctx) PIX_FMT_RGB24, PIX_FMT_BGR24, PIX_FMT_NONE }; - avfilter_set_common_pixel_formats(ctx, avfilter_make_format_list(pix_fmts)); + ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); return 0; } @@ -226,7 +227,7 @@ AVFilter avfilter_vf_thumbnail = { .inputs = (const AVFilterPad[]) { { .name = "default", .type = AVMEDIA_TYPE_VIDEO, - .get_video_buffer = avfilter_null_get_video_buffer, + .get_video_buffer = ff_null_get_video_buffer, .start_frame = null_start_frame, .draw_slice = draw_slice, .end_frame = end_frame, diff --git a/libavfilter/vf_tile.c b/libavfilter/vf_tile.c index 6ae787d930..e6971de9ee 100644 --- a/libavfilter/vf_tile.c +++ b/libavfilter/vf_tile.c @@ -103,7 +103,7 @@ static void start_frame(AVFilterLink *inlink, AVFilterBufferRef *picref) if (tile->current) return; - outlink->out_buf = avfilter_get_video_buffer(outlink, AV_PERM_WRITE, + outlink->out_buf = ff_get_video_buffer(outlink, AV_PERM_WRITE, outlink->w, outlink->h); avfilter_copy_buffer_ref_props(outlink->out_buf, picref); outlink->out_buf->video->w = outlink->w; diff --git a/libavfilter/vf_tinterlace.c b/libavfilter/vf_tinterlace.c index adf10b1a32..8f9dc004fc 100644 --- a/libavfilter/vf_tinterlace.c +++ b/libavfilter/vf_tinterlace.c @@ -76,7 +76,7 @@ static int query_formats(AVFilterContext *ctx) PIX_FMT_NONE }; - avfilter_set_common_pixel_formats(ctx, avfilter_make_format_list(pix_fmts)); + ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); return 0; } @@ -224,7 +224,7 @@ static void end_frame(AVFilterLink *inlink) switch (tinterlace->mode) { case MODE_MERGE: /* move the odd frame into the upper field of the new image, even into * the lower field, generating a double-height video at half framerate */ - out = avfilter_get_video_buffer(outlink, AV_PERM_WRITE, outlink->w, outlink->h); + out = ff_get_video_buffer(outlink, AV_PERM_WRITE, outlink->w, outlink->h); avfilter_copy_buffer_ref_props(out, cur); out->video->h = outlink->h; out->video->interlaced = 1; @@ -251,7 +251,7 @@ static void end_frame(AVFilterLink *inlink) case MODE_PAD: /* expand each frame to double height, but pad alternate * lines with black; framerate unchanged */ - out = avfilter_get_video_buffer(outlink, AV_PERM_WRITE, outlink->w, outlink->h); + out = ff_get_video_buffer(outlink, AV_PERM_WRITE, outlink->w, outlink->h); avfilter_copy_buffer_ref_props(out, cur); out->video->h = outlink->h; @@ -273,7 +273,7 @@ static void end_frame(AVFilterLink *inlink) case MODE_INTERLEAVE_TOP: /* top field first */ case MODE_INTERLEAVE_BOTTOM: /* bottom field first */ tff = tinterlace->mode == MODE_INTERLEAVE_TOP; - out = avfilter_get_video_buffer(outlink, AV_PERM_WRITE, outlink->w, outlink->h); + out = ff_get_video_buffer(outlink, AV_PERM_WRITE, outlink->w, outlink->h); avfilter_copy_buffer_ref_props(out, cur); out->video->interlaced = 1; out->video->top_field_first = tff; @@ -295,13 +295,13 @@ static void end_frame(AVFilterLink *inlink) out = avfilter_ref_buffer(cur, AV_PERM_READ); out->video->interlaced = 1; - avfilter_start_frame(outlink, out); - avfilter_draw_slice(outlink, 0, outlink->h, 1); - avfilter_end_frame(outlink); + ff_start_frame(outlink, out); + ff_draw_slice(outlink, 0, outlink->h, 1); + ff_end_frame(outlink); /* output mix of current and next frame */ tff = next->video->top_field_first; - out = avfilter_get_video_buffer(outlink, AV_PERM_WRITE, outlink->w, outlink->h); + out = ff_get_video_buffer(outlink, AV_PERM_WRITE, outlink->w, outlink->h); avfilter_copy_buffer_ref_props(out, next); out->video->interlaced = 1; @@ -318,9 +318,9 @@ static void end_frame(AVFilterLink *inlink) break; } - avfilter_start_frame(outlink, out); - avfilter_draw_slice(outlink, 0, outlink->h, 1); - avfilter_end_frame(outlink); + ff_start_frame(outlink, out); + ff_draw_slice(outlink, 0, outlink->h, 1); + ff_end_frame(outlink); tinterlace->frame++; } @@ -331,12 +331,12 @@ static int poll_frame(AVFilterLink *outlink) AVFilterLink *inlink = outlink->src->inputs[0]; int ret, val; - val = avfilter_poll_frame(inlink); + val = ff_poll_frame(inlink); if (val == 1 && !tinterlace->next) { if ((ret = avfilter_request_frame(inlink)) < 0) return ret; - val = avfilter_poll_frame(inlink); + val = ff_poll_frame(inlink); } assert(tinterlace->next); diff --git a/libavfilter/video.c b/libavfilter/video.c index dce3478ea5..ab6e2cd5b8 100644 --- a/libavfilter/video.c +++ b/libavfilter/video.c @@ -220,7 +220,7 @@ void ff_start_frame(AVFilterLink *link, AVFilterBufferRef *picref) void ff_null_start_frame_keep_ref(AVFilterLink *inlink, AVFilterBufferRef *picref) { - avfilter_start_frame(inlink->dst->outputs[0], avfilter_ref_buffer(picref, ~0)); + ff_start_frame(inlink->dst->outputs[0], avfilter_ref_buffer(picref, ~0)); } void ff_null_end_frame(AVFilterLink *link) diff --git a/libavfilter/vsrc_cellauto.c b/libavfilter/vsrc_cellauto.c index 1f6ba6a1e5..b08205e419 100644 --- a/libavfilter/vsrc_cellauto.c +++ b/libavfilter/vsrc_cellauto.c @@ -31,6 +31,8 @@ #include "libavutil/parseutils.h" #include "libavutil/random_seed.h" #include "avfilter.h" +#include "formats.h" +#include "video.h" typedef struct { const AVClass *class; @@ -305,7 +307,7 @@ static int request_frame(AVFilterLink *outlink) { CellAutoContext *cellauto = outlink->src->priv; AVFilterBufferRef *picref = - avfilter_get_video_buffer(outlink, AV_PERM_WRITE, cellauto->w, cellauto->h); + ff_get_video_buffer(outlink, AV_PERM_WRITE, cellauto->w, cellauto->h); picref->video->sample_aspect_ratio = (AVRational) {1, 1}; if (cellauto->generation == 0 && cellauto->start_full) { int i; @@ -322,9 +324,9 @@ static int request_frame(AVFilterLink *outlink) show_cellauto_row(outlink->src); #endif - avfilter_start_frame(outlink, avfilter_ref_buffer(picref, ~0)); - avfilter_draw_slice(outlink, 0, cellauto->h, 1); - avfilter_end_frame(outlink); + ff_start_frame(outlink, avfilter_ref_buffer(picref, ~0)); + ff_draw_slice(outlink, 0, cellauto->h, 1); + ff_end_frame(outlink); avfilter_unref_buffer(picref); return 0; @@ -333,7 +335,7 @@ static int request_frame(AVFilterLink *outlink) static int query_formats(AVFilterContext *ctx) { static const enum PixelFormat pix_fmts[] = { PIX_FMT_MONOBLACK, PIX_FMT_NONE }; - avfilter_set_common_pixel_formats(ctx, avfilter_make_format_list(pix_fmts)); + ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); return 0; } diff --git a/libavfilter/vsrc_life.c b/libavfilter/vsrc_life.c index 4846f5d302..756ad687b6 100644 --- a/libavfilter/vsrc_life.c +++ b/libavfilter/vsrc_life.c @@ -32,6 +32,8 @@ #include "libavutil/parseutils.h" #include "libavutil/random_seed.h" #include "avfilter.h" +#include "formats.h" +#include "video.h" typedef struct { const AVClass *class; @@ -431,7 +433,7 @@ static void fill_picture_rgb(AVFilterContext *ctx, AVFilterBufferRef *picref) static int request_frame(AVFilterLink *outlink) { LifeContext *life = outlink->src->priv; - AVFilterBufferRef *picref = avfilter_get_video_buffer(outlink, AV_PERM_WRITE, life->w, life->h); + AVFilterBufferRef *picref = ff_get_video_buffer(outlink, AV_PERM_WRITE, life->w, life->h); picref->video->sample_aspect_ratio = (AVRational) {1, 1}; picref->pts = life->pts++; picref->pos = -1; @@ -442,9 +444,9 @@ static int request_frame(AVFilterLink *outlink) show_life_grid(outlink->src); #endif - avfilter_start_frame(outlink, avfilter_ref_buffer(picref, ~0)); - avfilter_draw_slice(outlink, 0, life->h, 1); - avfilter_end_frame(outlink); + ff_start_frame(outlink, avfilter_ref_buffer(picref, ~0)); + ff_draw_slice(outlink, 0, life->h, 1); + ff_end_frame(outlink); avfilter_unref_buffer(picref); return 0; @@ -462,7 +464,7 @@ static int query_formats(AVFilterContext *ctx) pix_fmts[0] = PIX_FMT_MONOBLACK; life->draw = fill_picture_monoblack; } - avfilter_set_common_pixel_formats(ctx, avfilter_make_format_list(pix_fmts)); + ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); return 0; } diff --git a/libavfilter/vsrc_mandelbrot.c b/libavfilter/vsrc_mandelbrot.c index 2ecb03d9b2..1760570a92 100644 --- a/libavfilter/vsrc_mandelbrot.c +++ b/libavfilter/vsrc_mandelbrot.c @@ -27,6 +27,8 @@ */ #include "avfilter.h" +#include "formats.h" +#include "video.h" #include "libavutil/imgutils.h" #include "libavutil/opt.h" #include "libavutil/parseutils.h" @@ -161,7 +163,7 @@ static int query_formats(AVFilterContext *ctx) PIX_FMT_NONE }; - avfilter_set_common_pixel_formats(ctx, avfilter_make_format_list(pix_fmts)); + ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); return 0; } @@ -385,15 +387,15 @@ static void draw_mandelbrot(AVFilterContext *ctx, uint32_t *color, int linesize, static int request_frame(AVFilterLink *link) { MBContext *mb = link->src->priv; - AVFilterBufferRef *picref = avfilter_get_video_buffer(link, AV_PERM_WRITE, mb->w, mb->h); + AVFilterBufferRef *picref = ff_get_video_buffer(link, AV_PERM_WRITE, mb->w, mb->h); picref->video->sample_aspect_ratio = (AVRational) {1, 1}; picref->pts = mb->pts++; picref->pos = -1; - avfilter_start_frame(link, avfilter_ref_buffer(picref, ~0)); + ff_start_frame(link, avfilter_ref_buffer(picref, ~0)); draw_mandelbrot(link->src, (uint32_t*)picref->data[0], picref->linesize[0]/4, picref->pts); - avfilter_draw_slice(link, 0, mb->h, 1); - avfilter_end_frame(link); + ff_draw_slice(link, 0, mb->h, 1); + ff_end_frame(link); avfilter_unref_buffer(picref); return 0; diff --git a/libavfilter/vsrc_mptestsrc.c b/libavfilter/vsrc_mptestsrc.c index 98c79888f4..c2ae5a1a4c 100644 --- a/libavfilter/vsrc_mptestsrc.c +++ b/libavfilter/vsrc_mptestsrc.c @@ -28,6 +28,8 @@ #include "libavutil/parseutils.h" #include "libavutil/pixdesc.h" #include "avfilter.h" +#include "formats.h" +#include "video.h" #define WIDTH 512 #define HEIGHT 512 @@ -320,7 +322,7 @@ static int query_formats(AVFilterContext *ctx) PIX_FMT_YUV420P, PIX_FMT_NONE }; - avfilter_set_common_pixel_formats(ctx, avfilter_make_format_list(pix_fmts)); + ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); return 0; } @@ -334,7 +336,7 @@ static int request_frame(AVFilterLink *outlink) if (test->max_pts >= 0 && test->pts > test->max_pts) return AVERROR_EOF; - picref = avfilter_get_video_buffer(outlink, AV_PERM_WRITE, w, h); + picref = ff_get_video_buffer(outlink, AV_PERM_WRITE, w, h); picref->pts = test->pts++; // clean image @@ -360,9 +362,9 @@ static int request_frame(AVFilterLink *outlink) test->frame_nb++; - avfilter_start_frame(outlink, avfilter_ref_buffer(picref, ~0)); - avfilter_draw_slice(outlink, 0, picref->video->h, 1); - avfilter_end_frame(outlink); + ff_start_frame(outlink, avfilter_ref_buffer(picref, ~0)); + ff_draw_slice(outlink, 0, picref->video->h, 1); + ff_end_frame(outlink); avfilter_unref_buffer(picref); return 0;