FFmpeg
Loading...
Searching...
No Matches
vf_floodfill.c
Go to the documentation of this file.
1/*
2 * Copyright (c) 2017 Paul B Mahol
3 *
4 * This file is part of FFmpeg.
5 *
6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * FFmpeg is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with FFmpeg; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21#include "libavutil/mem.h"
22#include "libavutil/opt.h"
24#include "libavutil/pixdesc.h"
25#include "avfilter.h"
26#include "filters.h"
27#include "video.h"
28
29typedef struct Points {
30 uint16_t x, y;
31} Points;
32
33typedef struct FloodfillContext {
34 const AVClass *class;
35
36 int x, y;
37 int s[4];
38 int S[4];
39 int d[4];
40
43 unsigned int points_size;
44
45 int (*is_same)(const AVFrame *frame, int x, int y,
46 unsigned s0, unsigned s1, unsigned s2, unsigned s3);
47 void (*set_pixel)(AVFrame *frame, int x, int y,
48 unsigned d0, unsigned d1, unsigned d2, unsigned d3);
49 void (*pick_pixel)(const AVFrame *frame, int x, int y,
50 int *s0, int *s1, int *s2, int *s3);
52
53static int is_inside(int x, int y, int w, int h)
54{
55 if (x >= 0 && x < w && y >= 0 && y < h)
56 return 1;
57 return 0;
58}
59
60static int is_same4(const AVFrame *frame, int x, int y,
61 unsigned s0, unsigned s1, unsigned s2, unsigned s3)
62{
63 unsigned c0 = frame->data[0][y * frame->linesize[0] + x];
64 unsigned c1 = frame->data[1][y * frame->linesize[1] + x];
65 unsigned c2 = frame->data[2][y * frame->linesize[2] + x];
66 unsigned c3 = frame->data[3][y * frame->linesize[3] + x];
67
68 if (s0 == c0 && s1 == c1 && s2 == c2 && s3 == c3)
69 return 1;
70 return 0;
71}
72
73static int is_same4_16(const AVFrame *frame, int x, int y,
74 unsigned s0, unsigned s1, unsigned s2, unsigned s3)
75{
76 unsigned c0 = AV_RN16(frame->data[0] + y * frame->linesize[0] + 2 * x);
77 unsigned c1 = AV_RN16(frame->data[1] + y * frame->linesize[1] + 2 * x);
78 unsigned c2 = AV_RN16(frame->data[2] + y * frame->linesize[2] + 2 * x);
79 unsigned c3 = AV_RN16(frame->data[3] + y * frame->linesize[3] + 2 * x);
80
81 if (s0 == c0 && s1 == c1 && s2 == c2 && s3 == c3)
82 return 1;
83 return 0;
84}
85
86static int is_same3(const AVFrame *frame, int x, int y,
87 unsigned s0, unsigned s1, unsigned s2, unsigned s3)
88{
89 unsigned c0 = frame->data[0][y * frame->linesize[0] + x];
90 unsigned c1 = frame->data[1][y * frame->linesize[1] + x];
91 unsigned c2 = frame->data[2][y * frame->linesize[2] + x];
92
93 if (s0 == c0 && s1 == c1 && s2 == c2)
94 return 1;
95 return 0;
96}
97
98static int is_same3_16(const AVFrame *frame, int x, int y,
99 unsigned s0, unsigned s1, unsigned s2, unsigned s3)
100{
101 unsigned c0 = AV_RN16(frame->data[0] + y * frame->linesize[0] + 2 * x);
102 unsigned c1 = AV_RN16(frame->data[1] + y * frame->linesize[1] + 2 * x);
103 unsigned c2 = AV_RN16(frame->data[2] + y * frame->linesize[2] + 2 * x);
104
105 if (s0 == c0 && s1 == c1 && s2 == c2)
106 return 1;
107 return 0;
108}
109
110static int is_same1(const AVFrame *frame, int x, int y,
111 unsigned s0, unsigned s1, unsigned s2, unsigned s3)
112{
113 unsigned c0 = frame->data[0][y * frame->linesize[0] + x];
114
115 if (s0 == c0)
116 return 1;
117 return 0;
118}
119
120static int is_same1_16(const AVFrame *frame, int x, int y,
121 unsigned s0, unsigned s1, unsigned s2, unsigned s3)
122{
123 unsigned c0 = AV_RN16(frame->data[0] + y * frame->linesize[0] + 2 * x);
124
125 if (s0 == c0)
126 return 1;
127 return 0;
128}
129
130static void set_pixel1(AVFrame *frame, int x, int y,
131 unsigned d0, unsigned d1, unsigned d2, unsigned d3)
132{
133 frame->data[0][y * frame->linesize[0] + x] = d0;
134}
135
136static void set_pixel1_16(AVFrame *frame, int x, int y,
137 unsigned d0, unsigned d1, unsigned d2, unsigned d3)
138{
139 AV_WN16(frame->data[0] + y * frame->linesize[0] + 2 * x, d0);
140}
141
142static void set_pixel3(AVFrame *frame, int x, int y,
143 unsigned d0, unsigned d1, unsigned d2, unsigned d3)
144{
145 frame->data[0][y * frame->linesize[0] + x] = d0;
146 frame->data[1][y * frame->linesize[1] + x] = d1;
147 frame->data[2][y * frame->linesize[2] + x] = d2;
148}
149
150static void set_pixel3_16(AVFrame *frame, int x, int y,
151 unsigned d0, unsigned d1, unsigned d2, unsigned d3)
152{
153 AV_WN16(frame->data[0] + y * frame->linesize[0] + 2 * x, d0);
154 AV_WN16(frame->data[1] + y * frame->linesize[1] + 2 * x, d1);
155 AV_WN16(frame->data[2] + y * frame->linesize[2] + 2 * x, d2);
156}
157
158static void set_pixel4(AVFrame *frame, int x, int y,
159 unsigned d0, unsigned d1, unsigned d2, unsigned d3)
160{
161 frame->data[0][y * frame->linesize[0] + x] = d0;
162 frame->data[1][y * frame->linesize[1] + x] = d1;
163 frame->data[2][y * frame->linesize[2] + x] = d2;
164 frame->data[3][y * frame->linesize[3] + x] = d3;
165}
166
167static void set_pixel4_16(AVFrame *frame, int x, int y,
168 unsigned d0, unsigned d1, unsigned d2, unsigned d3)
169{
170 AV_WN16(frame->data[0] + y * frame->linesize[0] + 2 * x, d0);
171 AV_WN16(frame->data[1] + y * frame->linesize[1] + 2 * x, d1);
172 AV_WN16(frame->data[2] + y * frame->linesize[2] + 2 * x, d2);
173 AV_WN16(frame->data[3] + y * frame->linesize[3] + 2 * x, d3);
174}
175
176static void pick_pixel1(const AVFrame *frame, int x, int y,
177 int *s0, int *s1, int *s2, int *s3)
178{
179 if (*s0 < 0)
180 *s0 = frame->data[0][y * frame->linesize[0] + x];
181}
182
183static void pick_pixel1_16(const AVFrame *frame, int x, int y,
184 int *s0, int *s1, int *s2, int *s3)
185{
186 if (*s0 < 0)
187 *s0 = AV_RN16(frame->data[0] + y * frame->linesize[0] + 2 * x);
188}
189
190static void pick_pixel3(const AVFrame *frame, int x, int y,
191 int *s0, int *s1, int *s2, int *s3)
192{
193 if (*s0 < 0)
194 *s0 = frame->data[0][y * frame->linesize[0] + x];
195 if (*s1 < 0)
196 *s1 = frame->data[1][y * frame->linesize[1] + x];
197 if (*s2 < 0)
198 *s2 = frame->data[2][y * frame->linesize[2] + x];
199}
200
201static void pick_pixel3_16(const AVFrame *frame, int x, int y,
202 int *s0, int *s1, int *s2, int *s3)
203{
204 if (*s0 < 0)
205 *s0 = AV_RN16(frame->data[0] + y * frame->linesize[0] + 2 * x);
206 if (*s1 < 0)
207 *s1 = AV_RN16(frame->data[1] + y * frame->linesize[1] + 2 * x);
208 if (*s2 < 0)
209 *s2 = AV_RN16(frame->data[2] + y * frame->linesize[2] + 2 * x);
210}
211
212static void pick_pixel4(const AVFrame *frame, int x, int y,
213 int *s0, int *s1, int *s2, int *s3)
214{
215 if (*s0 < 0)
216 *s0 = frame->data[0][y * frame->linesize[0] + x];
217 if (*s1 < 0)
218 *s1 = frame->data[1][y * frame->linesize[1] + x];
219 if (*s2 < 0)
220 *s2 = frame->data[2][y * frame->linesize[2] + x];
221 if (*s3 < 0)
222 *s3 = frame->data[3][y * frame->linesize[3] + x];
223}
224
225static void pick_pixel4_16(const AVFrame *frame, int x, int y,
226 int *s0, int *s1, int *s2, int *s3)
227{
228 if (*s0 < 0)
229 *s0 = AV_RN16(frame->data[0] + y * frame->linesize[0] + 2 * x);
230 if (*s1 < 0)
231 *s1 = AV_RN16(frame->data[1] + y * frame->linesize[1] + 2 * x);
232 if (*s2 < 0)
233 *s2 = AV_RN16(frame->data[2] + y * frame->linesize[2] + 2 * x);
234 if (*s3 < 0)
235 *s3 = AV_RN16(frame->data[3] + y * frame->linesize[3] + 2 * x);
236}
237
238static int config_input(AVFilterLink *inlink)
239{
241 AVFilterContext *ctx = inlink->dst;
242 FloodfillContext *s = ctx->priv;
243 int depth;
244
245 s->nb_planes = av_pix_fmt_count_planes(inlink->format);
246 depth = desc->comp[0].depth;
247 if (depth == 8) {
248 switch (s->nb_planes) {
249 case 1: s->set_pixel = set_pixel1;
250 s->is_same = is_same1;
251 s->pick_pixel = pick_pixel1; break;
252 case 3: s->set_pixel = set_pixel3;
253 s->is_same = is_same3;
254 s->pick_pixel = pick_pixel3; break;
255 case 4: s->set_pixel = set_pixel4;
256 s->is_same = is_same4;
257 s->pick_pixel = pick_pixel4; break;
258 }
259 } else {
260 switch (s->nb_planes) {
261 case 1: s->set_pixel = set_pixel1_16;
262 s->is_same = is_same1_16;
263 s->pick_pixel = pick_pixel1_16; break;
264 case 3: s->set_pixel = set_pixel3_16;
265 s->is_same = is_same3_16;
266 s->pick_pixel = pick_pixel3_16; break;
267 case 4: s->set_pixel = set_pixel4_16;
268 s->is_same = is_same4_16;
269 s->pick_pixel = pick_pixel4_16; break;
270 }
271 }
272
273 return 0;
274}
275
277{
278 AVFilterContext *ctx = link->dst;
279 FloodfillContext *s = ctx->priv;
280 const unsigned d0 = s->d[0];
281 const unsigned d1 = s->d[1];
282 const unsigned d2 = s->d[2];
283 const unsigned d3 = s->d[3];
284 int s0 = s->s[0];
285 int s1 = s->s[1];
286 int s2 = s->s[2];
287 int s3 = s->s[3];
288 const int w = frame->width;
289 const int h = frame->height;
290 size_t nb_points, points_size;
291 int i, ret;
292 int front = 0;
293
294 if (w > UINT16_MAX + 1 || h > UINT16_MAX + 1 ||
295 av_size_mult(w, h, &nb_points) < 0 ||
296 av_size_mult(nb_points, 4 * sizeof(*s->points), &points_size) < 0) {
298 return AVERROR(EINVAL);
299 }
300
301 av_fast_malloc(&s->points, &s->points_size, points_size);
302 if (!s->points) {
304 return AVERROR(ENOMEM);
305 }
306
307 if (is_inside(s->x, s->y, w, h)) {
308 s->pick_pixel(frame, s->x, s->y, &s0, &s1, &s2, &s3);
309
310 s->S[0] = s0;
311 s->S[1] = s1;
312 s->S[2] = s2;
313 s->S[3] = s3;
314 for (i = 0; i < s->nb_planes; i++) {
315 if (s->S[i] != s->d[i])
316 break;
317 }
318
319 if (i == s->nb_planes)
320 goto end;
321
322 if (s->is_same(frame, s->x, s->y, s0, s1, s2, s3)) {
323 s->points[front].x = s->x;
324 s->points[front].y = s->y;
325 front++;
326 }
327
328 if (ret = ff_inlink_make_frame_writable(link, &frame)) {
330 return ret;
331 }
332
333 while (front > 0) {
334 int x, y;
335
336 front--;
337 x = s->points[front].x;
338 y = s->points[front].y;
339
340 if (s->is_same(frame, x, y, s0, s1, s2, s3)) {
341 s->set_pixel(frame, x, y, d0, d1, d2, d3);
342
343 if (is_inside(x + 1, y, w, h)) {
344 s->points[front] .x = x + 1;
345 s->points[front++].y = y;
346 }
347
348 if (is_inside(x - 1, y, w, h)) {
349 s->points[front] .x = x - 1;
350 s->points[front++].y = y;
351 }
352
353 if (is_inside(x, y + 1, w, h)) {
354 s->points[front] .x = x;
355 s->points[front++].y = y + 1;
356 }
357
358 if (is_inside(x, y - 1, w, h)) {
359 s->points[front] .x = x;
360 s->points[front++].y = y - 1;
361 }
362 }
363 }
364 }
365
366end:
367 return ff_filter_frame(ctx->outputs[0], frame);
368}
369
380
382{
383 FloodfillContext *s = ctx->priv;
384
385 av_freep(&s->points);
386}
387
389 {
390 .name = "default",
391 .type = AVMEDIA_TYPE_VIDEO,
392 .filter_frame = filter_frame,
393 .config_props = config_input,
394 },
395};
396
397#define OFFSET(x) offsetof(FloodfillContext, x)
398#define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
399
400static const AVOption floodfill_options[] = {
401 { "x", "set pixel x coordinate", OFFSET(x), AV_OPT_TYPE_INT, {.i64=0}, 0, UINT16_MAX, FLAGS },
402 { "y", "set pixel y coordinate", OFFSET(y), AV_OPT_TYPE_INT, {.i64=0}, 0, UINT16_MAX, FLAGS },
403 { "s0", "set source #0 component value", OFFSET(s[0]), AV_OPT_TYPE_INT, {.i64=0},-1, UINT16_MAX, FLAGS },
404 { "s1", "set source #1 component value", OFFSET(s[1]), AV_OPT_TYPE_INT, {.i64=0},-1, UINT16_MAX, FLAGS },
405 { "s2", "set source #2 component value", OFFSET(s[2]), AV_OPT_TYPE_INT, {.i64=0},-1, UINT16_MAX, FLAGS },
406 { "s3", "set source #3 component value", OFFSET(s[3]), AV_OPT_TYPE_INT, {.i64=0},-1, UINT16_MAX, FLAGS },
407 { "d0", "set destination #0 component value", OFFSET(d[0]), AV_OPT_TYPE_INT, {.i64=0}, 0, UINT16_MAX, FLAGS },
408 { "d1", "set destination #1 component value", OFFSET(d[1]), AV_OPT_TYPE_INT, {.i64=0}, 0, UINT16_MAX, FLAGS },
409 { "d2", "set destination #2 component value", OFFSET(d[2]), AV_OPT_TYPE_INT, {.i64=0}, 0, UINT16_MAX, FLAGS },
410 { "d3", "set destination #3 component value", OFFSET(d[3]), AV_OPT_TYPE_INT, {.i64=0}, 0, UINT16_MAX, FLAGS },
411 { NULL }
412};
413
415
417 .p.name = "floodfill",
418 .p.description = NULL_IF_CONFIG_SMALL("Fill area with same color with another color."),
419 .p.priv_class = &floodfill_class,
421 .priv_size = sizeof(FloodfillContext),
422 .uninit = uninit,
426};
static int config_input(AVFilterLink *inlink)
const FFFilter ff_vf_floodfill
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
Definition avfilter.c:1068
int ff_inlink_make_frame_writable(AVFilterLink *link, AVFrame **rframe)
Make sure a frame is writable.
Definition avfilter.c:1567
Main libavfilter public API header.
#define i(width, name, range_min, range_max)
Definition cbs_h264.c:63
#define s(width, name)
Definition cbs_vp9.c:198
#define FLAGS
Definition cmdutils.c:598
#define NULL
Definition coverity.c:32
static AVFrame * frame
static int filter_frame(DBEDecodeContext *s, AVFrame *frame)
Definition dolby_e.c:1067
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition opt.h:258
#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:196
#define AVERROR(e)
Definition error.h:45
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
Definition frame.c:64
void av_fast_malloc(void *ptr, unsigned int *size, size_t min_size)
Allocate a buffer, reusing the given one if large enough.
Definition mem.c:555
int av_size_mult(size_t a, size_t b, size_t *r)
Multiply two size_t values checking for overflow.
Definition mem.c:565
@ AVMEDIA_TYPE_VIDEO
Definition avutil.h:200
#define AV_WN16(p, v)
#define AV_RN16(p)
static av_cold void uninit(AVBitStreamFilterContext *ctx)
#define FILTER_INPUTS(array)
Definition filters.h:264
#define FILTER_OUTPUTS(array)
Definition filters.h:265
#define FILTER_PIXFMTS_ARRAY(array)
Definition filters.h:244
#define AVFILTER_DEFINE_CLASS(fname)
Definition filters.h:478
#define av_cold
Definition attributes.h:117
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition internal.h:88
const char * desc
Definition libsvtav1.c:83
uint8_t w
Definition llvidencdsp.c:39
Memory handling functions.
static const uint64_t c2
Definition murmur3.c:53
static const uint64_t c1
Definition murmur3.c:52
AVOptions.
int av_pix_fmt_count_planes(enum AVPixelFormat pix_fmt)
Definition pixdesc.c:3500
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
Definition pixdesc.c:3460
#define AV_PIX_FMT_GBRAP12
Definition pixfmt.h:569
#define AV_PIX_FMT_YUV444P12
Definition pixfmt.h:552
#define AV_PIX_FMT_YUV444P9
Definition pixfmt.h:544
#define AV_PIX_FMT_GRAY9
Definition pixfmt.h:524
#define AV_PIX_FMT_GBRAP16
Definition pixfmt.h:571
#define AV_PIX_FMT_GBRP9
Definition pixfmt.h:563
#define AV_PIX_FMT_YUVA444P10
Definition pixfmt.h:598
#define AV_PIX_FMT_GBRP10
Definition pixfmt.h:564
#define AV_PIX_FMT_GBRP12
Definition pixfmt.h:565
AVPixelFormat
Pixel format.
Definition pixfmt.h:71
@ AV_PIX_FMT_NONE
Definition pixfmt.h:72
@ AV_PIX_FMT_GRAY8
Y , 8bpp.
Definition pixfmt.h:81
@ AV_PIX_FMT_YUV444P
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
Definition pixfmt.h:78
@ AV_PIX_FMT_YUVA444P
planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
Definition pixfmt.h:174
@ AV_PIX_FMT_GBRAP
planar GBRA 4:4:4:4 32bpp
Definition pixfmt.h:212
@ AV_PIX_FMT_GBRP
planar GBR 4:4:4 24bpp
Definition pixfmt.h:165
#define AV_PIX_FMT_GRAY10
Definition pixfmt.h:525
#define AV_PIX_FMT_GRAY14
Definition pixfmt.h:527
#define AV_PIX_FMT_GRAY16
Definition pixfmt.h:528
#define AV_PIX_FMT_GBRAP10
Definition pixfmt.h:568
#define AV_PIX_FMT_YUVA444P16
Definition pixfmt.h:603
#define AV_PIX_FMT_GBRP16
Definition pixfmt.h:567
#define AV_PIX_FMT_YUV444P14
Definition pixfmt.h:555
#define AV_PIX_FMT_YUVA444P9
Definition pixfmt.h:595
#define AV_PIX_FMT_GBRP14
Definition pixfmt.h:566
#define AV_PIX_FMT_YUV444P16
Definition pixfmt.h:558
#define AV_PIX_FMT_YUV444P10
Definition pixfmt.h:548
Describe the class of an AVClass context structure.
Definition log.h:76
An instance of a filter.
Definition avfilter.h:273
A filter pad used for either input or output.
Definition filters.h:40
This structure describes decoded (raw) audio or video data.
Definition frame.h:472
AVOption.
Definition opt.h:428
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
Definition pixdesc.h:69
void(* set_pixel)(AVFrame *frame, int x, int y, unsigned d0, unsigned d1, unsigned d2, unsigned d3)
unsigned int points_size
void(* pick_pixel)(const AVFrame *frame, int x, int y, int *s0, int *s1, int *s2, int *s3)
int(* is_same)(const AVFrame *frame, int x, int y, unsigned s0, unsigned s1, unsigned s2, unsigned s3)
uint16_t y
uint16_t x
#define av_freep(p)
static AVFormatContext * ctx
Definition movenc.c:49
static enum AVPixelFormat pixel_fmts[]
Definition vf_amplify.c:52
static const AVOption floodfill_options[]
static void set_pixel3_16(AVFrame *frame, int x, int y, unsigned d0, unsigned d1, unsigned d2, unsigned d3)
static void set_pixel3(AVFrame *frame, int x, int y, unsigned d0, unsigned d1, unsigned d2, unsigned d3)
static int is_same1(const AVFrame *frame, int x, int y, unsigned s0, unsigned s1, unsigned s2, unsigned s3)
static int is_same4_16(const AVFrame *frame, int x, int y, unsigned s0, unsigned s1, unsigned s2, unsigned s3)
static void pick_pixel4_16(const AVFrame *frame, int x, int y, int *s0, int *s1, int *s2, int *s3)
static void pick_pixel1(const AVFrame *frame, int x, int y, int *s0, int *s1, int *s2, int *s3)
static int is_same3(const AVFrame *frame, int x, int y, unsigned s0, unsigned s1, unsigned s2, unsigned s3)
static int is_inside(int x, int y, int w, int h)
static int config_input(AVFilterLink *inlink)
static int is_same1_16(const AVFrame *frame, int x, int y, unsigned s0, unsigned s1, unsigned s2, unsigned s3)
static void pick_pixel3(const AVFrame *frame, int x, int y, int *s0, int *s1, int *s2, int *s3)
static void pick_pixel3_16(const AVFrame *frame, int x, int y, int *s0, int *s1, int *s2, int *s3)
static int is_same3_16(const AVFrame *frame, int x, int y, unsigned s0, unsigned s1, unsigned s2, unsigned s3)
static void pick_pixel4(const AVFrame *frame, int x, int y, int *s0, int *s1, int *s2, int *s3)
static int filter_frame(AVFilterLink *link, AVFrame *frame)
static void set_pixel1(AVFrame *frame, int x, int y, unsigned d0, unsigned d1, unsigned d2, unsigned d3)
static av_cold void uninit(AVFilterContext *ctx)
static void pick_pixel1_16(const AVFrame *frame, int x, int y, int *s0, int *s1, int *s2, int *s3)
static int is_same4(const AVFrame *frame, int x, int y, unsigned s0, unsigned s1, unsigned s2, unsigned s3)
#define OFFSET(x)
static const AVFilterPad floodfill_inputs[]
static void set_pixel4_16(AVFrame *frame, int x, int y, unsigned d0, unsigned d1, unsigned d2, unsigned d3)
static void set_pixel4(AVFrame *frame, int x, int y, unsigned d0, unsigned d1, unsigned d2, unsigned d3)
static void set_pixel1_16(AVFrame *frame, int x, int y, unsigned d0, unsigned d1, unsigned d2, unsigned d3)
const AVFilterPad ff_video_default_filterpad[1]
An AVFilterPad array whose only entry has name "default" and is of type AVMEDIA_TYPE_VIDEO.
Definition video.c:37