From 7e350379f87e7f74420b4813170fe808e2313911 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 28 Nov 2012 08:41:07 +0100 Subject: lavfi: switch to AVFrame. Deprecate AVFilterBuffer/AVFilterBufferRef and everything related to it and use AVFrame instead. --- libavfilter/vf_lut.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'libavfilter/vf_lut.c') diff --git a/libavfilter/vf_lut.c b/libavfilter/vf_lut.c index f265795fa8..f0cb48bd4a 100644 --- a/libavfilter/vf_lut.c +++ b/libavfilter/vf_lut.c @@ -295,28 +295,28 @@ static int config_props(AVFilterLink *inlink) return 0; } -static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *in) +static int filter_frame(AVFilterLink *inlink, AVFrame *in) { AVFilterContext *ctx = inlink->dst; LutContext *lut = ctx->priv; AVFilterLink *outlink = ctx->outputs[0]; - AVFilterBufferRef *out; + AVFrame *out; uint8_t *inrow, *outrow, *inrow0, *outrow0; int i, j, k, plane; - out = ff_get_video_buffer(outlink, AV_PERM_WRITE, outlink->w, outlink->h); + out = ff_get_video_buffer(outlink, outlink->w, outlink->h); if (!out) { - avfilter_unref_bufferp(&in); + av_frame_free(&in); return AVERROR(ENOMEM); } - avfilter_copy_buffer_ref_props(out, in); + av_frame_copy_props(out, in); if (lut->is_rgb) { /* packed */ inrow0 = in ->data[0]; outrow0 = out->data[0]; - for (i = 0; i < in->video->h; i ++) { + for (i = 0; i < in->height; i ++) { inrow = inrow0; outrow = outrow0; for (j = 0; j < inlink->w; j++) { @@ -337,7 +337,7 @@ static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *in) inrow = in ->data[plane]; outrow = out->data[plane]; - for (i = 0; i < in->video->h >> vsub; i ++) { + for (i = 0; i < in->height >> vsub; i ++) { for (j = 0; j < inlink->w>>hsub; j++) outrow[j] = lut->lut[plane][inrow[j]]; inrow += in ->linesize[plane]; @@ -346,7 +346,7 @@ static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *in) } } - avfilter_unref_bufferp(&in); + av_frame_free(&in); return ff_filter_frame(outlink, out); } @@ -355,7 +355,7 @@ static const AVFilterPad inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .filter_frame = filter_frame, .config_props = config_props, - .min_perms = AV_PERM_READ, }, + }, { .name = NULL} }; static const AVFilterPad outputs[] = { -- cgit v1.2.3