vf_unsharp: adopt a more natural order of params in apply_unsharp()

Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
Stefano Sabatini 2011-08-12 09:22:31 +02:00 committed by Anton Khirnov
parent de7b58da3e
commit e6d17ba426

View File

@ -63,8 +63,8 @@ typedef struct {
FilterParam chroma; ///< chroma parameters (width, height, amount) FilterParam chroma; ///< chroma parameters (width, height, amount)
} UnsharpContext; } UnsharpContext;
static void apply_unsharp(uint8_t *dst, const uint8_t *src, static void apply_unsharp( uint8_t *dst, int dst_stride,
int dst_stride, int src_stride, const uint8_t *src, int src_stride,
int width, int height, FilterParam *fp) int width, int height, FilterParam *fp)
{ {
uint32_t **sc = fp->sc; uint32_t **sc = fp->sc;
@ -208,9 +208,9 @@ static void end_frame(AVFilterLink *link)
AVFilterBufferRef *in = link->cur_buf; AVFilterBufferRef *in = link->cur_buf;
AVFilterBufferRef *out = link->dst->outputs[0]->out_buf; AVFilterBufferRef *out = link->dst->outputs[0]->out_buf;
apply_unsharp(out->data[0], in->data[0], out->linesize[0], in->linesize[0], link->w, link->h, &unsharp->luma); apply_unsharp(out->data[0], out->linesize[0], in->data[0], in->linesize[0], link->w, link->h, &unsharp->luma);
apply_unsharp(out->data[1], in->data[1], out->linesize[1], in->linesize[1], CHROMA_WIDTH(link), CHROMA_HEIGHT(link), &unsharp->chroma); apply_unsharp(out->data[1], out->linesize[1], in->data[1], in->linesize[1], CHROMA_WIDTH(link), CHROMA_HEIGHT(link), &unsharp->chroma);
apply_unsharp(out->data[2], in->data[2], out->linesize[2], in->linesize[2], CHROMA_WIDTH(link), CHROMA_HEIGHT(link), &unsharp->chroma); apply_unsharp(out->data[2], out->linesize[2], in->data[2], in->linesize[2], CHROMA_WIDTH(link), CHROMA_HEIGHT(link), &unsharp->chroma);
avfilter_unref_buffer(in); avfilter_unref_buffer(in);
avfilter_draw_slice(link->dst->outputs[0], 0, link->h, 1); avfilter_draw_slice(link->dst->outputs[0], 0, link->h, 1);