diff options
Diffstat (limited to 'libavfilter/vf_histeq.c')
-rw-r--r-- | libavfilter/vf_histeq.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/libavfilter/vf_histeq.c b/libavfilter/vf_histeq.c index 556680c124..a9cb60e847 100644 --- a/libavfilter/vf_histeq.c +++ b/libavfilter/vf_histeq.c @@ -142,7 +142,7 @@ static int config_input(AVFilterLink *inlink) b = src[x + map[B]]; \ } while (0) -static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *inpic) +static int filter_frame(AVFilterLink *inlink, AVFrame *inpic) { AVFilterContext *ctx = inlink->dst; HisteqContext *histeq = ctx->priv; @@ -150,16 +150,16 @@ static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *inpic) int strength = histeq->strength * 1000; int intensity = histeq->intensity * 1000; int x, y, i, luthi, lutlo, lut, luma, oluma, m; - AVFilterBufferRef *outpic; + AVFrame *outpic; unsigned int r, g, b, jran; uint8_t *src, *dst; - outpic = ff_get_video_buffer(outlink, AV_PERM_WRITE|AV_PERM_ALIGN, outlink->w, outlink->h); + outpic = ff_get_video_buffer(outlink, outlink->w, outlink->h); if (!outpic) { - avfilter_unref_bufferp(&inpic); + av_frame_free(&inpic); return AVERROR(ENOMEM); } - avfilter_copy_buffer_ref_props(outpic, inpic); + av_frame_copy_props(outpic, inpic); /* Seed random generator for antibanding. */ jran = LCG_SEED; @@ -261,7 +261,7 @@ static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *inpic) av_dlog(ctx, "out[%d]: %u\n", x, histeq->out_histogram[x]); #endif - avfilter_unref_bufferp(&inpic); + av_frame_free(&inpic); return ff_filter_frame(outlink, outpic); } @@ -271,7 +271,6 @@ static const AVFilterPad histeq_inputs[] = { .type = AVMEDIA_TYPE_VIDEO, .config_props = config_input, .filter_frame = filter_frame, - .min_perms = AV_PERM_READ, }, { NULL } }; |