diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-11-28 08:41:07 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2013-03-08 07:37:18 +0100 |
commit | 7e350379f87e7f74420b4813170fe808e2313911 (patch) | |
tree | 031201839361d40af8b4c829f9c9f179e7d9f58d /libavfilter/vf_hqdn3d.c | |
parent | 77b2cd7b41d7ec8008b6fac753c04f77824c514c (diff) | |
download | ffmpeg-7e350379f87e7f74420b4813170fe808e2313911.tar.gz |
lavfi: switch to AVFrame.
Deprecate AVFilterBuffer/AVFilterBufferRef and everything related to it
and use AVFrame instead.
Diffstat (limited to 'libavfilter/vf_hqdn3d.c')
-rw-r--r-- | libavfilter/vf_hqdn3d.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/libavfilter/vf_hqdn3d.c b/libavfilter/vf_hqdn3d.c index 6161b5e6f4..3251b6ffc1 100644 --- a/libavfilter/vf_hqdn3d.c +++ b/libavfilter/vf_hqdn3d.c @@ -305,39 +305,39 @@ static int config_input(AVFilterLink *inlink) return 0; } -static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *in) +static int filter_frame(AVFilterLink *inlink, AVFrame *in) { HQDN3DContext *hqdn3d = inlink->dst->priv; AVFilterLink *outlink = inlink->dst->outputs[0]; - AVFilterBufferRef *out; + AVFrame *out; int direct, c; - if ((in->perms & AV_PERM_WRITE) && !(in->perms & AV_PERM_PRESERVE)) { + if (av_frame_is_writable(in)) { direct = 1; out = in; } else { - 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); - out->video->w = outlink->w; - out->video->h = outlink->h; + av_frame_copy_props(out, in); + out->width = outlink->w; + out->height = outlink->h; } for (c = 0; c < 3; c++) { denoise(hqdn3d, in->data[c], out->data[c], hqdn3d->line, &hqdn3d->frame_prev[c], - in->video->w >> (!!c * hqdn3d->hsub), - in->video->h >> (!!c * hqdn3d->vsub), + in->width >> (!!c * hqdn3d->hsub), + in->height >> (!!c * hqdn3d->vsub), in->linesize[c], out->linesize[c], hqdn3d->coefs[c?2:0], hqdn3d->coefs[c?3:1]); } if (!direct) - avfilter_unref_bufferp(&in); + av_frame_free(&in); return ff_filter_frame(outlink, out); } |