FFmpeg
Loading...
Searching...
No Matches
vf_pixelize.c
Go to the documentation of this file.
1/*
2 * Copyright (c) 2022 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/common.h"
22#include "libavutil/internal.h"
23#include "libavutil/imgutils.h"
24#include "libavutil/opt.h"
25
26#include "avfilter.h"
27#include "filters.h"
28#include "video.h"
29
36
37typedef struct PixelizeContext {
38 const AVClass *class;
39
40 int block_w[4], block_h[4];
41 int mode;
42
43 int depth;
44 int planes;
46 int linesize[4];
47 int planewidth[4];
49
52
53 int (*pixelize[PIXELIZE_MODES])(const uint8_t *src, uint8_t *dst,
54 ptrdiff_t src_linesize,
55 ptrdiff_t dst_linesize,
56 int w, int h);
58
88
89typedef struct ThreadData {
90 AVFrame *in, *out;
92
93#define PIXELIZE_AVG(name, type, stype) \
94static int pixelize_avg##name(const uint8_t *ssrc, uint8_t *ddst, \
95 ptrdiff_t src_linesize, ptrdiff_t dst_linesize, \
96 int w, int h) \
97{ \
98 const type *src = (const type *)ssrc; \
99 type *dst = (type *)ddst; \
100 stype sum = 0; \
101 type fill; \
102 for (int y = 0; y < h; y++) { \
103 for (int x = 0; x < w; x++) \
104 sum += src[x]; \
105 \
106 src += src_linesize / sizeof(type); \
107 } \
108 \
109 fill = sum / (w * h); \
110 \
111 for (int y = 0; y < h; y++) { \
112 for (int x = 0; x < w; x++) \
113 dst[x] = fill; \
114 \
115 dst += dst_linesize / sizeof(type); \
116 } \
117 \
118 return 0; \
119}
120
121#define PIXELIZE_MIN(name, type, stype) \
122static int pixelize_min##name(const uint8_t *ssrc, uint8_t *ddst, \
123 ptrdiff_t src_linesize, ptrdiff_t dst_linesize, \
124 int w, int h) \
125{ \
126 const type *src = (const type *)ssrc; \
127 type *dst = (type *)ddst; \
128 type fill = src[0]; \
129 \
130 for (int y = 0; y < h; y++) { \
131 for (int x = 0; x < w; x++) \
132 fill = FFMIN(src[x], fill); \
133 \
134 src += src_linesize / sizeof(type); \
135 } \
136 \
137 for (int y = 0; y < h; y++) { \
138 for (int x = 0; x < w; x++) \
139 dst[x] = fill; \
140 \
141 dst += dst_linesize / sizeof(type); \
142 } \
143 \
144 return 0; \
145}
146
147#define PIXELIZE_MAX(name, type, stype) \
148static int pixelize_max##name(const uint8_t *ssrc, uint8_t *ddst, \
149 ptrdiff_t src_linesize, ptrdiff_t dst_linesize, \
150 int w, int h) \
151{ \
152 const type *src = (const type *)ssrc; \
153 type *dst = (type *)ddst; \
154 type fill = src[0]; \
155 \
156 for (int y = 0; y < h; y++) { \
157 for (int x = 0; x < w; x++) \
158 fill = FFMAX(src[x], fill); \
159 \
160 src += src_linesize / sizeof(type); \
161 } \
162 \
163 for (int y = 0; y < h; y++) { \
164 for (int x = 0; x < w; x++) \
165 dst[x] = fill; \
166 \
167 dst += dst_linesize / sizeof(type); \
168 } \
169 \
170 return 0; \
171}
172
173PIXELIZE_AVG(8, uint8_t, unsigned)
174PIXELIZE_AVG(16, uint16_t, uint64_t)
175PIXELIZE_MIN(8, uint8_t, unsigned)
176PIXELIZE_MIN(16, uint16_t, uint64_t)
177PIXELIZE_MAX(8, uint8_t, unsigned)
178PIXELIZE_MAX(16, uint16_t, uint64_t)
179
180static int pixelize_slice(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
181{
182 PixelizeContext *s = ctx->priv;
183 const int mode = s->mode;
184 ThreadData *td = arg;
185 AVFrame *out = td->out;
186 AVFrame *in = td->in;
187
188 for (int p = 0; p < s->nb_planes; p++) {
189 const int wh = s->planeheight[p];
190 const int h = (s->planeheight[p] + s->block_h[p] - 1) / s->block_h[p];
191 const int w = (s->planewidth[p] + s->block_w[p] - 1) / s->block_w[p];
192 const int wslice_start = ff_slice_pos(wh, jobnr, nb_jobs);
193 const int wslice_end = ff_slice_pos(wh, jobnr + 1, nb_jobs);
194 const int slice_start = ff_slice_pos(h, jobnr, nb_jobs);
195 const int slice_end = ff_slice_pos(h, jobnr + 1, nb_jobs);
196 const ptrdiff_t out_linesize = out->linesize[p];
197 const ptrdiff_t in_linesize = in->linesize[p];
198 const uint8_t *src = in->data[p];
199 uint8_t *dst = out->data[p];
200
201 if (!((1 << p) & s->planes)) {
202 av_image_copy_plane(dst + wslice_start * out_linesize,
203 out_linesize,
204 src + wslice_start * in_linesize,
205 in_linesize,
206 s->linesize[p], wslice_end - wslice_start);
207 continue;
208 }
209
210 for (int y = slice_start; y < slice_end; y++) {
211 const int block_h = FFMIN(s->block_h[p], s->planeheight[p] - y * s->block_h[p]);
212 for (int x = 0; x < w; x++) {
213 const int block_w = FFMIN(s->block_w[p], s->planewidth[p] - x * s->block_w[p]);
214
215 s->pixelize[mode](src + s->block_h[p] * y * in_linesize +
216 x * s->block_w[p] * (1 + (s->depth > 8)),
217 dst + s->block_h[p] * y * out_linesize +
218 x * s->block_w[p] * (1 + (s->depth > 8)),
219 in_linesize, out_linesize, block_w, block_h);
220 }
221 }
222 }
223
224 return 0;
225}
226
227static int config_output(AVFilterLink *outlink)
228{
229 AVFilterContext *ctx = outlink->src;
230 PixelizeContext *s = ctx->priv;
231 AVFilterLink *inlink = ctx->inputs[0];
233 int ret;
234
235 desc = av_pix_fmt_desc_get(outlink->format);
236 if (!desc)
237 return AVERROR_BUG;
238 s->nb_planes = av_pix_fmt_count_planes(outlink->format);
239 s->depth = desc->comp[0].depth;
240
241 if ((ret = av_image_fill_linesizes(s->linesize, inlink->format, inlink->w)) < 0)
242 return ret;
243
244 s->planewidth[1] = s->planewidth[2] = AV_CEIL_RSHIFT(inlink->w, desc->log2_chroma_w);
245 s->planewidth[0] = s->planewidth[3] = inlink->w;
246
247 s->planeheight[1] = s->planeheight[2] = AV_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
248 s->planeheight[0] = s->planeheight[3] = inlink->h;
249
250 s->log2_chroma_w = desc->log2_chroma_w;
251 s->log2_chroma_h = desc->log2_chroma_h;
252
253 s->pixelize[PIXELIZE_AVG] = s->depth <= 8 ? pixelize_avg8 : pixelize_avg16;
254 s->pixelize[PIXELIZE_MIN] = s->depth <= 8 ? pixelize_min8 : pixelize_min16;
255 s->pixelize[PIXELIZE_MAX] = s->depth <= 8 ? pixelize_max8 : pixelize_max16;
256
257 return 0;
258}
259
260static int filter_frame(AVFilterLink *inlink, AVFrame *in)
261{
262 AVFilterContext *ctx = inlink->dst;
263 AVFilterLink *outlink = ctx->outputs[0];
264 PixelizeContext *s = ctx->priv;
265 ThreadData td;
266 AVFrame *out;
267 int ret;
268
269 s->block_w[1] = s->block_w[2] = FFMAX(1, s->block_w[0] >> s->log2_chroma_w);
270 s->block_w[3] = s->block_w[0] = s->block_w[1] << s->log2_chroma_w;
271
272 s->block_h[1] = s->block_h[2] = FFMAX(1, s->block_h[0] >> s->log2_chroma_h);
273 s->block_h[3] = s->block_h[0] = s->block_h[1] << s->log2_chroma_h;
274
275 if (av_frame_is_writable(in)) {
276 out = in;
277 } else {
278 out = ff_get_video_buffer(outlink, outlink->w, outlink->h);
279 if (!out) {
280 ret = AVERROR(ENOMEM);
281 goto fail;
282 }
283
284 ret = av_frame_copy_props(out, in);
285 if (ret < 0) {
287 goto fail;
288 }
289 }
290
291 td.out = out;
292 td.in = in;
294 FFMIN((s->planeheight[1] + s->block_h[1] - 1) / s->block_h[1],
296
297 if (out != in)
298 av_frame_free(&in);
299 return ff_filter_frame(outlink, out);
300fail:
301 av_frame_free(&in);
302 return ret;
303}
304
305#define OFFSET(x) offsetof(PixelizeContext, x)
306#define FLAGS (AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_RUNTIME_PARAM)
307
308static const AVOption pixelize_options[] = {
309 { "width", "set block width", OFFSET(block_w[0]), AV_OPT_TYPE_INT, {.i64=16}, 1, 1024, FLAGS },
310 { "w", "set block width", OFFSET(block_w[0]), AV_OPT_TYPE_INT, {.i64=16}, 1, 1024, FLAGS },
311 { "height", "set block height", OFFSET(block_h[0]), AV_OPT_TYPE_INT, {.i64=16}, 1, 1024, FLAGS },
312 { "h", "set block height", OFFSET(block_h[0]), AV_OPT_TYPE_INT, {.i64=16}, 1, 1024, FLAGS },
313 { "mode", "set the pixelize mode", OFFSET(mode), AV_OPT_TYPE_INT, {.i64=0}, 0, PIXELIZE_MODES-1, FLAGS, .unit = "mode" },
314 { "m", "set the pixelize mode", OFFSET(mode), AV_OPT_TYPE_INT, {.i64=0}, 0, PIXELIZE_MODES-1, FLAGS, .unit = "mode" },
315 { "avg", "average", 0, AV_OPT_TYPE_CONST, {.i64=PIXELIZE_AVG}, 0, 0, FLAGS, .unit = "mode" },
316 { "min", "minimum", 0, AV_OPT_TYPE_CONST, {.i64=PIXELIZE_MIN}, 0, 0, FLAGS, .unit = "mode" },
317 { "max", "maximum", 0, AV_OPT_TYPE_CONST, {.i64=PIXELIZE_MAX}, 0, 0, FLAGS, .unit = "mode" },
318 { "planes", "set what planes to filter", OFFSET(planes), AV_OPT_TYPE_FLAGS, {.i64=15}, 0, 15, FLAGS },
319 { "p", "set what planes to filter", OFFSET(planes), AV_OPT_TYPE_FLAGS, {.i64=15}, 0, 15, FLAGS },
320 { NULL },
321};
322
324
325static const AVFilterPad pixelize_inputs[] = {
326 {
327 .name = "default",
328 .type = AVMEDIA_TYPE_VIDEO,
329 .filter_frame = filter_frame,
330 },
331};
332
334 {
335 .name = "default",
336 .type = AVMEDIA_TYPE_VIDEO,
337 .config_props = config_output,
338 },
339};
340
342 .p.name = "pixelize",
343 .p.description = NULL_IF_CONFIG_SMALL("Pixelize video."),
344 .p.priv_class = &pixelize_class,
346 .priv_size = sizeof(PixelizeContext),
350 .process_command = ff_filter_process_command,
351};
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
Definition dsp.h:87
const FFFilter ff_vf_pixelize
static FILE * out
static AVFormatContext * ctx
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
Definition avfilter.c:1068
int ff_filter_process_command(AVFilterContext *ctx, const char *cmd, const char *arg, char *res, int res_len, int flags)
Generic processing of user supplied commands that are set in the same way as the filter options.
Definition avfilter.c:906
int ff_filter_execute(AVFilterContext *ctx, avfilter_action_func *func, void *arg, int *ret, int nb_jobs)
Definition avfilter.c:1696
int ff_filter_get_nb_threads(AVFilterContext *ctx)
Get number of threads for current filter instance.
Definition avfilter.c:846
Main libavfilter public API header.
#define s(width, name)
Definition cbs_vp9.c:198
#define FLAGS
Definition cmdutils.c:598
common internal and external API header
#define AV_CEIL_RSHIFT(a, b)
Definition common.h:60
#define NULL
Definition coverity.c:32
static int filter_frame(DBEDecodeContext *s, AVFrame *frame)
Definition dolby_e.c:1067
#define fail
Definition test.h:479
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.
Definition opt.h:298
@ AV_OPT_TYPE_FLAGS
Underlying C type is unsigned int.
Definition opt.h:254
@ 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 AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition avfilter.h:166
#define AVERROR_BUG
Internal bug, also see AVERROR_BUG2.
Definition error.h:52
#define AVERROR(e)
Definition error.h:45
int av_frame_is_writable(AVFrame *frame)
Check if the frame data is writable.
Definition frame.c:535
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
Definition frame.c:64
int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
Copy only "metadata" fields from src to dst.
Definition frame.c:599
@ AVMEDIA_TYPE_VIDEO
Definition avutil.h:200
void av_image_copy_plane(uint8_t *dst, int dst_linesize, const uint8_t *src, int src_linesize, int bytewidth, int height)
Copy image plane from src to dst.
Definition imgutils.c:374
int av_image_fill_linesizes(int linesizes[4], enum AVPixelFormat pix_fmt, int width)
Fill plane linesizes for an image with pixel format pix_fmt and width width.
Definition imgutils.c:89
misc image utilities
static int config_output(AVBitStreamFilterLink *outlink)
const char * arg
Definition jacosubdec.c:65
#define FILTER_INPUTS(array)
Definition filters.h:264
#define FILTER_OUTPUTS(array)
Definition filters.h:265
static int ff_slice_pos(int total, int jobnr, int nb_jobs)
Compute the boundary index for a slice when work of size total is split into nb_jobs slices.
Definition filters.h:763
#define FILTER_PIXFMTS_ARRAY(array)
Definition filters.h:244
#define AVFILTER_DEFINE_CLASS(fname)
Definition filters.h:478
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:88
static enum AVPixelFormat pix_fmts[]
Definition libkvazaar.c:296
const char * desc
Definition libsvtav1.c:83
static const struct @257111027162314367033347246032313251342043035002 planes[]
uint8_t w
Definition llvidencdsp.c:39
#define FFMIN(a, b)
Definition macros.h:49
#define FFMAX(a, b)
Definition macros.h:47
static int slice_end(AVCodecContext *avctx, AVFrame *pict, int *got_output)
Handle slice ends.
Definition mpeg12dec.c:1697
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_YUV420P16
Definition pixfmt.h:556
#define AV_PIX_FMT_YUV444P12
Definition pixfmt.h:552
#define AV_PIX_FMT_YUV444P9
Definition pixfmt.h:544
#define AV_PIX_FMT_YUV420P10
Definition pixfmt.h:545
#define AV_PIX_FMT_YUV440P12
Definition pixfmt.h:551
#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_YUV422P9
Definition pixfmt.h:543
#define AV_PIX_FMT_YUVA444P10
Definition pixfmt.h:598
#define AV_PIX_FMT_YUVA420P16
Definition pixfmt.h:601
#define AV_PIX_FMT_YUV420P12
Definition pixfmt.h:549
#define AV_PIX_FMT_YUVA420P10
Definition pixfmt.h:596
#define AV_PIX_FMT_YUVA422P9
Definition pixfmt.h:594
#define AV_PIX_FMT_YUV422P12
Definition pixfmt.h:550
#define AV_PIX_FMT_GBRP10
Definition pixfmt.h:564
#define AV_PIX_FMT_YUV422P10
Definition pixfmt.h:546
#define AV_PIX_FMT_GRAY12
Definition pixfmt.h:526
#define AV_PIX_FMT_GBRP12
Definition pixfmt.h:565
#define AV_PIX_FMT_YUV420P9
Definition pixfmt.h:542
#define AV_PIX_FMT_YUVA420P9
Definition pixfmt.h:593
#define AV_PIX_FMT_YUVA422P10
Definition pixfmt.h:597
#define AV_PIX_FMT_YUV420P14
Definition pixfmt.h:553
AVPixelFormat
Pixel format.
Definition pixfmt.h:71
@ AV_PIX_FMT_NONE
Definition pixfmt.h:72
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
Definition pixfmt.h:73
@ AV_PIX_FMT_YUV440P
planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
Definition pixfmt.h:106
@ AV_PIX_FMT_YUV422P
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
Definition pixfmt.h:77
@ AV_PIX_FMT_GRAY8
Y , 8bpp.
Definition pixfmt.h:81
@ AV_PIX_FMT_YUVA420P
planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
Definition pixfmt.h:108
@ AV_PIX_FMT_YUVJ440P
planar YUV 4:4:0 full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV440P and setting color_range
Definition pixfmt.h:107
@ AV_PIX_FMT_YUV410P
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
Definition pixfmt.h:79
@ AV_PIX_FMT_YUV411P
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
Definition pixfmt.h:80
@ 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_YUVJ411P
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples) full scale (JPEG), deprecated in favor ...
Definition pixfmt.h:283
@ AV_PIX_FMT_GBRAP
planar GBRA 4:4:4:4 32bpp
Definition pixfmt.h:212
@ AV_PIX_FMT_YUVJ422P
planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV422P and setting col...
Definition pixfmt.h:86
@ AV_PIX_FMT_YUVA422P
planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples)
Definition pixfmt.h:173
@ AV_PIX_FMT_GBRP
planar GBR 4:4:4 24bpp
Definition pixfmt.h:165
@ AV_PIX_FMT_YUVJ444P
planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV444P and setting col...
Definition pixfmt.h:87
@ AV_PIX_FMT_YUVJ420P
planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting col...
Definition pixfmt.h:85
#define AV_PIX_FMT_YUVA422P12
Definition pixfmt.h:599
#define AV_PIX_FMT_YUV422P14
Definition pixfmt.h:554
#define AV_PIX_FMT_GRAY10
Definition pixfmt.h:525
#define AV_PIX_FMT_GRAY14
Definition pixfmt.h:527
#define AV_PIX_FMT_YUV422P16
Definition pixfmt.h:557
#define AV_PIX_FMT_YUV440P10
Definition pixfmt.h:547
#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_YUVA422P16
Definition pixfmt.h:602
#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_YUVA444P12
Definition pixfmt.h:600
#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
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
Definition frame.h:493
int linesize[AV_NUM_DATA_POINTERS]
For video, a positive or negative value, which is typically indicating the size in bytes of each pict...
Definition frame.h:517
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
int(* pixelize[PIXELIZE_MODES])(const uint8_t *src, uint8_t *dst, ptrdiff_t src_linesize, ptrdiff_t dst_linesize, int w, int h)
Definition vf_pixelize.c:53
Used for passing data between threads.
Definition dsddec.c:71
AVFrame * out
Definition swscale.c:71
#define src
Definition vp8dsp.c:248
static const AVFilterPad pixelize_inputs[]
static int pixelize_slice(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
#define PIXELIZE_MAX(name, type, stype)
static const AVOption pixelize_options[]
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
static const AVFilterPad pixelize_outputs[]
#define PIXELIZE_AVG(name, type, stype)
Definition vf_pixelize.c:93
#define OFFSET(x)
static int config_output(AVFilterLink *outlink)
PixelizeModes
Definition vf_pixelize.c:30
@ PIXELIZE_MODES
Definition vf_pixelize.c:34
#define PIXELIZE_MIN(name, type, stype)
AVFrame * ff_get_video_buffer(AVFilterLink *link, int w, int h)
Request a picture buffer with a specific set of permissions.
Definition video.c:89
static int slice_start(SliceContext *sc, VVCContext *s, VVCFrameContext *fc, const CodedBitstreamUnit *unit, const int is_first_slice)
Definition dec.c:844