FFmpeg  4.4.9
vf_boxblur.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2002 Michael Niedermayer <michaelni@gmx.at>
3  * Copyright (c) 2011 Stefano Sabatini
4  *
5  * This file is part of FFmpeg.
6  *
7  * FFmpeg is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * FFmpeg is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along
18  * with FFmpeg; if not, write to the Free Software Foundation, Inc.,
19  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20  */
21 
22 /**
23  * @file
24  * Apply a boxblur filter to the input video.
25  * Ported from MPlayer libmpcodecs/vf_boxblur.c.
26  */
27 
28 #include "libavutil/avassert.h"
29 #include "libavutil/avstring.h"
30 #include "libavutil/common.h"
31 #include "libavutil/opt.h"
32 #include "avfilter.h"
33 #include "formats.h"
34 #include "internal.h"
35 #include "video.h"
36 #include "boxblur.h"
37 
38 
39 typedef struct BoxBlurContext {
40  const AVClass *class;
44 
45  int hsub, vsub;
46  int radius[4];
47  int power[4];
48  uint8_t *temp[2]; ///< temporary buffer used in blur_power()
50 
52 {
53  BoxBlurContext *s = ctx->priv;
54 
55  av_freep(&s->temp[0]);
56  av_freep(&s->temp[1]);
57 }
58 
60 {
62  int fmt, ret;
63 
64  for (fmt = 0; av_pix_fmt_desc_get(fmt); fmt++) {
67  desc->comp[0].depth <= 16 &&
68  (desc->flags & AV_PIX_FMT_FLAG_PLANAR || desc->nb_components == 1) &&
69  (!(desc->flags & AV_PIX_FMT_FLAG_BE) == !HAVE_BIGENDIAN || desc->comp[0].depth == 8) &&
70  (ret = ff_add_format(&formats, fmt)) < 0)
71  return ret;
72  }
73 
75 }
76 
77 static int config_input(AVFilterLink *inlink)
78 {
80  AVFilterContext *ctx = inlink->dst;
81  BoxBlurContext *s = ctx->priv;
82  int w = inlink->w, h = inlink->h;
83  int ret;
84 
85  if (!(s->temp[0] = av_malloc(2*FFMAX(w, h))) ||
86  !(s->temp[1] = av_malloc(2*FFMAX(w, h))))
87  return AVERROR(ENOMEM);
88 
89  s->hsub = desc->log2_chroma_w;
90  s->vsub = desc->log2_chroma_h;
91 
92  ret = ff_boxblur_eval_filter_params(inlink,
93  &s->luma_param,
94  &s->chroma_param,
95  &s->alpha_param);
96 
97  if (ret != 0) {
98  av_log(ctx, AV_LOG_ERROR, "Failed to evaluate "
99  "filter params: %d.\n", ret);
100  return ret;
101  }
102 
103  s->radius[Y] = s->luma_param.radius;
104  s->radius[U] = s->radius[V] = s->chroma_param.radius;
105  s->radius[A] = s->alpha_param.radius;
106 
107  s->power[Y] = s->luma_param.power;
108  s->power[U] = s->power[V] = s->chroma_param.power;
109  s->power[A] = s->alpha_param.power;
110 
111  return 0;
112 }
113 
114 /* Naive boxblur would sum source pixels from x-radius .. x+radius
115  * for destination pixel x. That would be O(radius*width).
116  * If you now look at what source pixels represent 2 consecutive
117  * output pixels, then you see they are almost identical and only
118  * differ by 2 pixels, like:
119  * src0 111111111
120  * dst0 1
121  * src1 111111111
122  * dst1 1
123  * src0-src1 1 -1
124  * so when you know one output pixel you can find the next by just adding
125  * and subtracting 1 input pixel.
126  * The following code adopts this faster variant.
127  */
128 #define BLUR(type, depth) \
129 static inline void blur ## depth(type *dst, int dst_step, const type *src, \
130  int src_step, int len, int radius) \
131 { \
132  const int length = radius*2 + 1; \
133  const int inv = ((1<<16) + length/2)/length; \
134  int x, sum = src[radius*src_step]; \
135  \
136  for (x = 0; x < radius; x++) \
137  sum += src[x*src_step]<<1; \
138  \
139  sum = sum*inv + (1<<15); \
140  \
141  for (x = 0; x <= radius; x++) { \
142  sum += (src[(radius+x)*src_step] - src[(radius-x)*src_step])*inv; \
143  dst[x*dst_step] = sum>>16; \
144  } \
145  \
146  for (; x < len-radius; x++) { \
147  sum += (src[(radius+x)*src_step] - src[(x-radius-1)*src_step])*inv; \
148  dst[x*dst_step] = sum >>16; \
149  } \
150  \
151  for (; x < len; x++) { \
152  sum += (src[(2*len-radius-x-1)*src_step] - src[(x-radius-1)*src_step])*inv; \
153  dst[x*dst_step] = sum>>16; \
154  } \
155 }
156 
157 BLUR(uint8_t, 8)
158 BLUR(uint16_t, 16)
159 
160 #undef BLUR
161 
162 static inline void blur(uint8_t *dst, int dst_step, const uint8_t *src, int src_step,
163  int len, int radius, int pixsize)
164 {
165  if (pixsize == 1) blur8 (dst, dst_step , src, src_step , len, radius);
166  else if (pixsize == 2)
167  blur16((uint16_t*)dst, dst_step>>1, (const uint16_t*)src, src_step>>1, len, radius);
168  else
169  av_assert0(0);
170 }
171 
172 static inline void blur_power(uint8_t *dst, int dst_step, const uint8_t *src, int src_step,
173  int len, int radius, int power, uint8_t *temp[2], int pixsize)
174 {
175  uint8_t *a = temp[0], *b = temp[1];
176 
177  if (radius && power) {
178  blur(a, pixsize, src, src_step, len, radius, pixsize);
179  for (; power > 2; power--) {
180  uint8_t *c;
181  blur(b, pixsize, a, pixsize, len, radius, pixsize);
182  c = a; a = b; b = c;
183  }
184  if (power > 1) {
185  blur(dst, dst_step, a, pixsize, len, radius, pixsize);
186  } else {
187  int i;
188  if (pixsize == 1) {
189  for (i = 0; i < len; i++)
190  dst[i*dst_step] = a[i];
191  } else
192  for (i = 0; i < len; i++)
193  *(uint16_t*)(dst + i*dst_step) = ((uint16_t*)a)[i];
194  }
195  } else {
196  int i;
197  if (pixsize == 1) {
198  for (i = 0; i < len; i++)
199  dst[i*dst_step] = src[i*src_step];
200  } else
201  for (i = 0; i < len; i++)
202  *(uint16_t*)(dst + i*dst_step) = *(uint16_t*)(src + i*src_step);
203  }
204 }
205 
206 static void hblur(uint8_t *dst, int dst_linesize, const uint8_t *src, int src_linesize,
207  int w, int h, int radius, int power, uint8_t *temp[2], int pixsize)
208 {
209  int y;
210 
211  if (radius == 0 && dst == src)
212  return;
213 
214  for (y = 0; y < h; y++)
215  blur_power(dst + y*dst_linesize, pixsize, src + y*src_linesize, pixsize,
216  w, radius, power, temp, pixsize);
217 }
218 
219 static void vblur(uint8_t *dst, int dst_linesize, const uint8_t *src, int src_linesize,
220  int w, int h, int radius, int power, uint8_t *temp[2], int pixsize)
221 {
222  int x;
223 
224  if (radius == 0 && dst == src)
225  return;
226 
227  for (x = 0; x < w; x++)
228  blur_power(dst + x*pixsize, dst_linesize, src + x*pixsize, src_linesize,
229  h, radius, power, temp, pixsize);
230 }
231 
232 static int filter_frame(AVFilterLink *inlink, AVFrame *in)
233 {
234  AVFilterContext *ctx = inlink->dst;
235  BoxBlurContext *s = ctx->priv;
236  AVFilterLink *outlink = inlink->dst->outputs[0];
237  AVFrame *out;
238  int plane;
239  int cw = AV_CEIL_RSHIFT(inlink->w, s->hsub), ch = AV_CEIL_RSHIFT(in->height, s->vsub);
240  int w[4] = { inlink->w, cw, cw, inlink->w };
241  int h[4] = { in->height, ch, ch, in->height };
243  const int depth = desc->comp[0].depth;
244  const int pixsize = (depth+7)/8;
245 
246  out = ff_get_video_buffer(outlink, outlink->w, outlink->h);
247  if (!out) {
248  av_frame_free(&in);
249  return AVERROR(ENOMEM);
250  }
252 
253  for (plane = 0; plane < 4 && in->data[plane] && in->linesize[plane]; plane++)
254  hblur(out->data[plane], out->linesize[plane],
255  in ->data[plane], in ->linesize[plane],
256  w[plane], h[plane], s->radius[plane], s->power[plane],
257  s->temp, pixsize);
258 
259  for (plane = 0; plane < 4 && in->data[plane] && in->linesize[plane]; plane++)
260  vblur(out->data[plane], out->linesize[plane],
261  out->data[plane], out->linesize[plane],
262  w[plane], h[plane], s->radius[plane], s->power[plane],
263  s->temp, pixsize);
264 
265  av_frame_free(&in);
266 
267  return ff_filter_frame(outlink, out);
268 }
269 
270 #define OFFSET(x) offsetof(BoxBlurContext, x)
271 #define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
272 
273 static const AVOption boxblur_options[] = {
274  { "luma_radius", "Radius of the luma blurring box", OFFSET(luma_param.radius_expr), AV_OPT_TYPE_STRING, {.str="2"}, .flags = FLAGS },
275  { "lr", "Radius of the luma blurring box", OFFSET(luma_param.radius_expr), AV_OPT_TYPE_STRING, {.str="2"}, .flags = FLAGS },
276  { "luma_power", "How many times should the boxblur be applied to luma", OFFSET(luma_param.power), AV_OPT_TYPE_INT, {.i64=2}, 0, INT_MAX, .flags = FLAGS },
277  { "lp", "How many times should the boxblur be applied to luma", OFFSET(luma_param.power), AV_OPT_TYPE_INT, {.i64=2}, 0, INT_MAX, .flags = FLAGS },
278 
279  { "chroma_radius", "Radius of the chroma blurring box", OFFSET(chroma_param.radius_expr), AV_OPT_TYPE_STRING, {.str=NULL}, .flags = FLAGS },
280  { "cr", "Radius of the chroma blurring box", OFFSET(chroma_param.radius_expr), AV_OPT_TYPE_STRING, {.str=NULL}, .flags = FLAGS },
281  { "chroma_power", "How many times should the boxblur be applied to chroma", OFFSET(chroma_param.power), AV_OPT_TYPE_INT, {.i64=-1}, -1, INT_MAX, .flags = FLAGS },
282  { "cp", "How many times should the boxblur be applied to chroma", OFFSET(chroma_param.power), AV_OPT_TYPE_INT, {.i64=-1}, -1, INT_MAX, .flags = FLAGS },
283 
284  { "alpha_radius", "Radius of the alpha blurring box", OFFSET(alpha_param.radius_expr), AV_OPT_TYPE_STRING, {.str=NULL}, .flags = FLAGS },
285  { "ar", "Radius of the alpha blurring box", OFFSET(alpha_param.radius_expr), AV_OPT_TYPE_STRING, {.str=NULL}, .flags = FLAGS },
286  { "alpha_power", "How many times should the boxblur be applied to alpha", OFFSET(alpha_param.power), AV_OPT_TYPE_INT, {.i64=-1}, -1, INT_MAX, .flags = FLAGS },
287  { "ap", "How many times should the boxblur be applied to alpha", OFFSET(alpha_param.power), AV_OPT_TYPE_INT, {.i64=-1}, -1, INT_MAX, .flags = FLAGS },
288 
289  { NULL }
290 };
291 
293 
295  {
296  .name = "default",
297  .type = AVMEDIA_TYPE_VIDEO,
298  .config_props = config_input,
299  .filter_frame = filter_frame,
300  },
301  { NULL }
302 };
303 
305  {
306  .name = "default",
307  .type = AVMEDIA_TYPE_VIDEO,
308  },
309  { NULL }
310 };
311 
313  .name = "boxblur",
314  .description = NULL_IF_CONFIG_SMALL("Blur the input."),
315  .priv_size = sizeof(BoxBlurContext),
316  .priv_class = &boxblur_class,
317  .uninit = uninit,
322 };
static const AVFilterPad inputs[]
Definition: af_acontrast.c:193
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
#define U(x)
Definition: vp56_arith.h:37
#define A(x)
Definition: vp56_arith.h:28
#define av_cold
Definition: attributes.h:88
uint8_t pi<< 24) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8, uint8_t,(*(const uint8_t *) pi - 0x80) *(1.0f/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t,(*(const uint8_t *) pi - 0x80) *(1.0/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t,(*(const int16_t *) pi >> 8)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *) pi *(1.0/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t,(*(const int32_t *) pi >> 24)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8(lrintf(*(const float *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16(lrintf(*(const float *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(const float *) pi *(1U<< 31)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8(lrint(*(const double *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16(lrint(*(const double *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(const double *) pi *(1U<< 31)))) #define SET_CONV_FUNC_GROUP(ofmt, ifmt) static void set_generic_function(AudioConvert *ac) { } void ff_audio_convert_free(AudioConvert **ac) { if(! *ac) return;ff_dither_free(&(*ac) ->dc);av_freep(ac);} AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt, int channels, int sample_rate, int apply_map) { AudioConvert *ac;int in_planar, out_planar;ac=av_mallocz(sizeof(*ac));if(!ac) return NULL;ac->avr=avr;ac->out_fmt=out_fmt;ac->in_fmt=in_fmt;ac->channels=channels;ac->apply_map=apply_map;if(avr->dither_method !=AV_RESAMPLE_DITHER_NONE &&av_get_packed_sample_fmt(out_fmt)==AV_SAMPLE_FMT_S16 &&av_get_bytes_per_sample(in_fmt) > 2) { ac->dc=ff_dither_alloc(avr, out_fmt, in_fmt, channels, sample_rate, apply_map);if(!ac->dc) { av_free(ac);return NULL;} return ac;} in_planar=ff_sample_fmt_is_planar(in_fmt, channels);out_planar=ff_sample_fmt_is_planar(out_fmt, channels);if(in_planar==out_planar) { ac->func_type=CONV_FUNC_TYPE_FLAT;ac->planes=in_planar ? ac->channels :1;} else if(in_planar) ac->func_type=CONV_FUNC_TYPE_INTERLEAVE;else ac->func_type=CONV_FUNC_TYPE_DEINTERLEAVE;set_generic_function(ac);if(ARCH_AARCH64) ff_audio_convert_init_aarch64(ac);if(ARCH_ARM) ff_audio_convert_init_arm(ac);if(ARCH_X86) ff_audio_convert_init_x86(ac);return ac;} int ff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in) { int use_generic=1;int len=in->nb_samples;int p;if(ac->dc) { av_log(ac->avr, AV_LOG_TRACE, "%d samples - audio_convert: %s to %s (dithered)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt));return ff_convert_dither(ac-> in
uint8_t
simple assert() macros that are a bit more flexible than ISO C assert().
#define av_assert0(cond)
assert() equivalent, that is always enabled.
Definition: avassert.h:37
#define V
Definition: avdct.c:30
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
Definition: avfilter.c:1099
Main libavfilter public API header.
int ff_boxblur_eval_filter_params(AVFilterLink *inlink, FilterParam *luma_param, FilterParam *chroma_param, FilterParam *alpha_param)
Definition: boxblur.c:46
#define Y
Definition: boxblur.h:38
#define flags(name, subs,...)
Definition: cbs_av1.c:572
#define s(width, name)
Definition: cbs_vp9.c:257
common internal and external API header
#define AV_CEIL_RSHIFT(a, b)
Definition: common.h:58
#define FFMAX(a, b)
Definition: common.h:103
#define HAVE_BIGENDIAN
Definition: config.h:202
#define NULL
Definition: coverity.c:32
int ff_set_common_formats(AVFilterContext *ctx, AVFilterFormats *formats)
A helper for query_formats() which sets all links to the same list of formats.
Definition: formats.c:587
int ff_add_format(AVFilterFormats **avff, int64_t fmt)
Add fmt to the list of media formats contained in *avff.
Definition: formats.c:332
@ AV_OPT_TYPE_INT
Definition: opt.h:225
@ AV_OPT_TYPE_STRING
Definition: opt.h:229
#define AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
Some filters support a generic "enable" expression option that can be used to enable or disable a fil...
Definition: avfilter.h:126
#define AVERROR(e)
Definition: error.h:43
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
Definition: frame.c:203
int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
Copy only "metadata" fields from src to dst.
Definition: frame.c:658
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:194
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
int i
Definition: input.c:407
common internal API header
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:117
const char * desc
Definition: libsvtav1.c:83
uint8_t w
Definition: llviddspenc.c:39
AVOptions.
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
Definition: pixdesc.c:2573
#define AV_PIX_FMT_FLAG_BITSTREAM
All values of a component are bit-wise packed end to end.
Definition: pixdesc.h:136
#define AV_PIX_FMT_FLAG_HWACCEL
Pixel format is an HW accelerated format.
Definition: pixdesc.h:140
#define AV_PIX_FMT_FLAG_PLANAR
At least one pixel component is not in the first data plane.
Definition: pixdesc.h:144
#define AV_PIX_FMT_FLAG_BE
Pixel format is big-endian.
Definition: pixdesc.h:128
#define AV_PIX_FMT_FLAG_PAL
Pixel format has a palette in data[1], values are indexes in this palette.
Definition: pixdesc.h:132
formats
Definition: signature.h:48
Describe the class of an AVClass context structure.
Definition: log.h:67
An instance of a filter.
Definition: avfilter.h:341
AVFilterLink ** outputs
array of pointers to output links
Definition: avfilter.h:353
A list of supported formats for one end of a filter link.
Definition: formats.h:65
A filter pad used for either input or output.
Definition: internal.h:54
const char * name
Pad name.
Definition: internal.h:60
Filter definition.
Definition: avfilter.h:145
const char * name
Filter name.
Definition: avfilter.h:149
This structure describes decoded (raw) audio or video data.
Definition: frame.h:318
AVOption.
Definition: opt.h:248
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
Definition: pixdesc.h:81
FilterParam luma_param
Definition: vf_boxblur.c:41
int radius[4]
Definition: vf_boxblur.c:46
int power[4]
Definition: vf_boxblur.c:47
uint8_t * temp[2]
temporary buffer used in blur_power()
Definition: vf_boxblur.c:48
FilterParam chroma_param
Definition: vf_boxblur.c:42
FilterParam alpha_param
Definition: vf_boxblur.c:43
#define av_freep(p)
#define av_malloc(s)
#define av_log(a,...)
#define src
Definition: vp8dsp.c:255
FILE * out
Definition: movenc.c:54
AVFormatContext * ctx
Definition: movenc.c:48
static void vblur(uint8_t *dst, int dst_linesize, const uint8_t *src, int src_linesize, int w, int h, int radius, int power, uint8_t *temp[2], int pixsize)
Definition: vf_boxblur.c:219
static const AVFilterPad avfilter_vf_boxblur_inputs[]
Definition: vf_boxblur.c:294
#define BLUR(type, depth)
Definition: vf_boxblur.c:128
AVFilter ff_vf_boxblur
Definition: vf_boxblur.c:312
static int query_formats(AVFilterContext *ctx)
Definition: vf_boxblur.c:59
static int config_input(AVFilterLink *inlink)
Definition: vf_boxblur.c:77
static const AVFilterPad avfilter_vf_boxblur_outputs[]
Definition: vf_boxblur.c:304
#define FLAGS
Definition: vf_boxblur.c:271
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: vf_boxblur.c:232
static const AVOption boxblur_options[]
Definition: vf_boxblur.c:273
static void blur_power(uint8_t *dst, int dst_step, const uint8_t *src, int src_step, int len, int radius, int power, uint8_t *temp[2], int pixsize)
Definition: vf_boxblur.c:172
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_boxblur.c:51
static void hblur(uint8_t *dst, int dst_linesize, const uint8_t *src, int src_linesize, int w, int h, int radius, int power, uint8_t *temp[2], int pixsize)
Definition: vf_boxblur.c:206
#define OFFSET(x)
Definition: vf_boxblur.c:270
AVFILTER_DEFINE_CLASS(boxblur)
static void blur(uint8_t *dst, int dst_step, const uint8_t *src, int src_step, int len, int radius, int pixsize)
Definition: vf_boxblur.c:162
const char * b
Definition: vf_curves.c:119
else temp
Definition: vf_mcdeint.c:259
AVFrame * ff_get_video_buffer(AVFilterLink *link, int w, int h)
Request a picture buffer with a specific set of permissions.
Definition: video.c:104
int len
static double c[64]