FFmpeg
vf_median.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019 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  * Redistribution and use in source and binary forms, with or without modification,
20  * are permitted provided that the following conditions are met:
21  */
22 
23 #include "libavutil/imgutils.h"
24 #include "libavutil/opt.h"
25 #include "libavutil/pixdesc.h"
26 #include "avfilter.h"
27 #include "internal.h"
28 #include "median.h"
29 #include "video.h"
30 
31 #define DEPTH 8
32 #include "median_template.c"
33 
34 #undef DEPTH
35 #define DEPTH 9
36 #include "median_template.c"
37 
38 #undef DEPTH
39 #define DEPTH 10
40 #include "median_template.c"
41 
42 #undef DEPTH
43 #define DEPTH 12
44 #include "median_template.c"
45 
46 #undef DEPTH
47 #define DEPTH 14
48 #include "median_template.c"
49 
50 #undef DEPTH
51 #define DEPTH 16
52 #include "median_template.c"
53 
54 #define OFFSET(x) offsetof(MedianContext, x)
55 #define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
56 
57 static const AVOption median_options[] = {
58  { "radius", "set median radius", OFFSET(radius), AV_OPT_TYPE_INT, {.i64=1}, 1, 127, FLAGS },
59  { "planes", "set planes to filter", OFFSET(planes), AV_OPT_TYPE_INT, {.i64=0xF}, 0, 0xF, FLAGS },
60  { "radiusV", "set median vertical radius", OFFSET(radiusV), AV_OPT_TYPE_INT, {.i64=0},0, 127, FLAGS },
61  { "percentile", "set median percentile", OFFSET(percentile), AV_OPT_TYPE_FLOAT, {.dbl=.5}, 0., 1., FLAGS },
62  { NULL }
63 };
64 
65 AVFILTER_DEFINE_CLASS(median);
66 
67 static void hadd(htype *dst, const htype *src, int bins)
68 {
69  for (int i = 0; i < bins; i++)
70  dst[i] += src[i];
71 }
72 
73 static void hsub(htype *dst, const htype *src, int bins)
74 {
75  for (int i = 0; i < bins; i++)
76  dst[i] -= src[i];
77 }
78 
79 static void hmuladd(htype *dst, const htype *src, int f, int bins)
80 {
81  for (int i = 0; i < bins; i++)
82  dst[i] += f * src[i];
83 }
84 
85 static const enum AVPixelFormat pix_fmts[] = {
105 };
106 
108 {
109  for (int i = 0; i < s->nb_planes; i++) {
110  if (!(s->planes & (1 << i)))
111  continue;
112 
113  if (s->planewidth[i] < s->radius * 2 + 1) {
114  av_log(inlink->dst, AV_LOG_WARNING, "The %d plane width %d must be not less than %d, clipping radius.\n", i, s->planewidth[i], s->radius * 2 + 1);
115  s->radius = (s->planewidth[i] - 1) / 2;
116  }
117 
118  if (s->planeheight[i] < s->radiusV * 2 + 1) {
119  av_log(inlink->dst, AV_LOG_WARNING, "The %d plane height %d must be not less than %d, clipping radiusV.\n", i, s->planeheight[i], s->radiusV * 2 + 1);
120  s->radiusV = (s->planeheight[i] - 1) / 2;
121  }
122  }
123 
124  s->t = (2 * s->radius * s->radiusV + s->radiusV + s->radius) * 2.f * s->percentile;
125 }
126 
128 {
130  MedianContext *s = inlink->dst->priv;
131 
132  s->depth = desc->comp[0].depth;
133  s->planewidth[1] = s->planewidth[2] = AV_CEIL_RSHIFT(inlink->w, desc->log2_chroma_w);
134  s->planewidth[0] = s->planewidth[3] = inlink->w;
135  s->planeheight[1] = s->planeheight[2] = AV_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
136  s->planeheight[0] = s->planeheight[3] = inlink->h;
137 
138  s->radiusV = !s->radiusV ? s->radius : s->radiusV;
139  s->nb_planes = av_pix_fmt_count_planes(inlink->format);
140 
142 
143  s->nb_threads = FFMAX(1, FFMIN(s->planeheight[1] / (s->radiusV + 1), ff_filter_get_nb_threads(inlink->dst)));
144  s->bins = 1 << ((s->depth + 1) / 2);
145  s->fine_size = s->bins * s->bins * inlink->w;
146  s->coarse_size = s->bins * inlink->w;
147  s->coarse = av_calloc(s->nb_threads, sizeof(*s->coarse));
148  s->fine = av_calloc(s->nb_threads, sizeof(*s->fine));
149  if (!s->coarse || !s->fine)
150  return AVERROR(ENOMEM);
151  for (int i = 0; i < s->nb_threads; i++) {
152  s->coarse[i] = av_malloc_array(s->coarse_size, sizeof(**s->coarse));
153  s->fine[i] = av_malloc_array(s->fine_size, sizeof(**s->fine));
154  if (!s->coarse[i] || !s->fine[i])
155  return AVERROR(ENOMEM);
156  }
157 
158  s->hadd = hadd;
159  s->hsub = hsub;
160  s->hmuladd = hmuladd;
161 
162  switch (s->depth) {
163  case 8: s->filter_plane = filter_plane_8; break;
164  case 9: s->filter_plane = filter_plane_9; break;
165  case 10: s->filter_plane = filter_plane_10; break;
166  case 12: s->filter_plane = filter_plane_12; break;
167  case 14: s->filter_plane = filter_plane_14; break;
168  case 16: s->filter_plane = filter_plane_16; break;
169  }
170 
171  return 0;
172 }
173 
174 typedef struct ThreadData {
175  AVFrame *in, *out;
176 } ThreadData;
177 
178 static int filter_slice(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
179 {
180  MedianContext *s = ctx->priv;
181  ThreadData *td = arg;
182  AVFrame *in = td->in;
183  AVFrame *out = td->out;
184 
185  for (int plane = 0; plane < s->nb_planes; plane++) {
186  const int h = s->planeheight[plane];
187  const int w = s->planewidth[plane];
188  const int slice_h_start = (h * jobnr) / nb_jobs;
189  const int slice_h_end = (h * (jobnr+1)) / nb_jobs;
190 
191  if (!(s->planes & (1 << plane))) {
192  av_image_copy_plane(out->data[plane] + slice_h_start * out->linesize[plane],
193  out->linesize[plane],
194  in->data[plane] + slice_h_start * in->linesize[plane],
195  in->linesize[plane],
196  w * ((s->depth + 7) / 8),
197  slice_h_end - slice_h_start);
198  continue;
199  }
200 
201  s->filter_plane(ctx, in->data[plane],
202  in->linesize[plane],
203  out->data[plane] + slice_h_start * out->linesize[plane],
204  out->linesize[plane], w, h,
205  slice_h_start, slice_h_end, jobnr);
206  }
207 
208  return 0;
209 }
210 
212 {
213  AVFilterContext *ctx = inlink->dst;
214  MedianContext *s = ctx->priv;
215  AVFilterLink *outlink = ctx->outputs[0];
216  ThreadData td;
217  AVFrame *out;
218 
219  out = ff_get_video_buffer(outlink, outlink->w, outlink->h);
220  if (!out) {
221  av_frame_free(&in);
222  return AVERROR(ENOMEM);
223  }
225 
226  td.in = in; td.out = out;
227  ff_filter_execute(ctx, filter_slice, &td, NULL, s->nb_threads);
228 
229  av_frame_free(&in);
230  return ff_filter_frame(outlink, out);
231 }
232 
234 {
235  MedianContext *s = ctx->priv;
236 
237  for (int i = 0; i < s->nb_threads && s->coarse && s->fine; i++) {
238  av_freep(&s->coarse[i]);
239  av_freep(&s->fine[i]);
240  }
241 
242  av_freep(&s->coarse);
243  av_freep(&s->fine);
244 }
245 
246 static int process_command(AVFilterContext *ctx, const char *cmd, const char *args,
247  char *res, int res_len, int flags)
248 {
249  MedianContext *s = ctx->priv;
250  int ret;
251 
252  ret = ff_filter_process_command(ctx, cmd, args, res, res_len, flags);
253  if (ret < 0)
254  return ret;
255 
256  if (!s->radiusV)
257  s->radiusV = s->radius;
258  check_params(s, ctx->inputs[0]);
259 
260  return 0;
261 }
262 
263 static const AVFilterPad median_inputs[] = {
264  {
265  .name = "default",
266  .type = AVMEDIA_TYPE_VIDEO,
267  .config_props = config_input,
268  .filter_frame = filter_frame,
269  },
270 };
271 
273  .name = "median",
274  .description = NULL_IF_CONFIG_SMALL("Apply Median filter."),
275  .priv_size = sizeof(MedianContext),
276  .priv_class = &median_class,
277  .uninit = uninit,
282  .process_command = process_command,
283 };
ff_get_video_buffer
AVFrame * ff_get_video_buffer(AVFilterLink *link, int w, int h)
Request a picture buffer with a specific set of permissions.
Definition: video.c:108
AV_PIX_FMT_YUVA422P16
#define AV_PIX_FMT_YUVA422P16
Definition: pixfmt.h:512
median.h
AV_PIX_FMT_GBRAP16
#define AV_PIX_FMT_GBRAP16
Definition: pixfmt.h:491
AV_LOG_WARNING
#define AV_LOG_WARNING
Something somehow does not look correct.
Definition: log.h:186
td
#define td
Definition: regdef.h:70
AVPixelFormat
AVPixelFormat
Pixel format.
Definition: pixfmt.h:64
median_template.c
AVERROR
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
opt.h
out
FILE * out
Definition: movenc.c:54
ff_filter_frame
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
Definition: avfilter.c:978
av_pix_fmt_desc_get
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
Definition: pixdesc.c:2964
FILTER_PIXFMTS_ARRAY
#define FILTER_PIXFMTS_ARRAY(array)
Definition: internal.h:172
htype
#define htype
Definition: median_template.c:36
inlink
The exact code depends on how similar the blocks are and how related they are to the and needs to apply these operations to the correct inlink or outlink if there are several Macros are available to factor that when no extra processing is inlink
Definition: filter_design.txt:212
MedianContext
Definition: median.h:28
av_frame_free
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
Definition: frame.c:100
OFFSET
#define OFFSET(x)
Definition: vf_median.c:54
AV_PIX_FMT_YUVA422P9
#define AV_PIX_FMT_YUVA422P9
Definition: pixfmt.h:504
AVFrame
This structure describes decoded (raw) audio or video data.
Definition: frame.h:340
pixdesc.h
AV_PIX_FMT_YUVA420P16
#define AV_PIX_FMT_YUVA420P16
Definition: pixfmt.h:511
w
uint8_t w
Definition: llviddspenc.c:38
AV_PIX_FMT_YUVA420P10
#define AV_PIX_FMT_YUVA420P10
Definition: pixfmt.h:506
AVOption
AVOption.
Definition: opt.h:251
AV_PIX_FMT_YUV420P10
#define AV_PIX_FMT_YUV420P10
Definition: pixfmt.h:468
AV_PIX_FMT_YUV440P
@ AV_PIX_FMT_YUV440P
planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
Definition: pixfmt.h:99
FFMAX
#define FFMAX(a, b)
Definition: macros.h:47
AVFilter::name
const char * name
Filter name.
Definition: avfilter.h:170
ThreadData::out
AVFrame * out
Definition: af_adeclick.c:526
video.h
ThreadData::in
AVFrame * in
Definition: af_adecorrelate.c:153
AV_PIX_FMT_YUVA422P10
#define AV_PIX_FMT_YUVA422P10
Definition: pixfmt.h:507
median_inputs
static const AVFilterPad median_inputs[]
Definition: vf_median.c:263
AV_PIX_FMT_GRAY9
#define AV_PIX_FMT_GRAY9
Definition: pixfmt.h:448
AVFrame::data
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
Definition: frame.h:361
av_image_copy_plane
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
hsub
static void hsub(htype *dst, const htype *src, int bins)
Definition: vf_median.c:73
av_pix_fmt_count_planes
int av_pix_fmt_count_planes(enum AVPixelFormat pix_fmt)
Definition: pixdesc.c:3004
AV_PIX_FMT_YUVA420P9
#define AV_PIX_FMT_YUVA420P9
Definition: pixfmt.h:503
AV_PIX_FMT_GBRP14
#define AV_PIX_FMT_GBRP14
Definition: pixfmt.h:486
AV_PIX_FMT_GBRAP
@ AV_PIX_FMT_GBRAP
planar GBRA 4:4:4:4 32bpp
Definition: pixfmt.h:205
AV_PIX_FMT_GBRP10
#define AV_PIX_FMT_GBRP10
Definition: pixfmt.h:484
AV_PIX_FMT_YUVA444P16
#define AV_PIX_FMT_YUVA444P16
Definition: pixfmt.h:513
AV_PIX_FMT_YUV422P9
#define AV_PIX_FMT_YUV422P9
Definition: pixfmt.h:466
AV_PIX_FMT_GRAY16
#define AV_PIX_FMT_GRAY16
Definition: pixfmt.h:452
AVFilterPad
A filter pad used for either input or output.
Definition: internal.h:47
AV_PIX_FMT_YUV444P10
#define AV_PIX_FMT_YUV444P10
Definition: pixfmt.h:471
AV_PIX_FMT_YUVJ411P
@ 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:276
av_cold
#define av_cold
Definition: attributes.h:90
AV_PIX_FMT_YUV422P16
#define AV_PIX_FMT_YUV422P16
Definition: pixfmt.h:480
ff_video_default_filterpad
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:36
AV_PIX_FMT_YUVJ422P
@ 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:79
AV_PIX_FMT_GBRAP10
#define AV_PIX_FMT_GBRAP10
Definition: pixfmt.h:488
s
#define s(width, name)
Definition: cbs_vp9.c:198
AV_PIX_FMT_GBRAP12
#define AV_PIX_FMT_GBRAP12
Definition: pixfmt.h:489
AV_PIX_FMT_YUVA420P
@ AV_PIX_FMT_YUVA420P
planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
Definition: pixfmt.h:101
AV_PIX_FMT_YUV444P16
#define AV_PIX_FMT_YUV444P16
Definition: pixfmt.h:481
AV_CEIL_RSHIFT
#define AV_CEIL_RSHIFT(a, b)
Definition: common.h:51
AV_PIX_FMT_YUVA444P12
#define AV_PIX_FMT_YUVA444P12
Definition: pixfmt.h:510
AV_PIX_FMT_YUV420P9
#define AV_PIX_FMT_YUV420P9
Definition: pixfmt.h:465
AV_PIX_FMT_YUV420P16
#define AV_PIX_FMT_YUV420P16
Definition: pixfmt.h:479
ctx
AVFormatContext * ctx
Definition: movenc.c:48
AV_PIX_FMT_GRAY14
#define AV_PIX_FMT_GRAY14
Definition: pixfmt.h:451
AV_PIX_FMT_YUV420P
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
Definition: pixfmt.h:66
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: internal.h:192
AV_PIX_FMT_YUVJ444P
@ 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:80
arg
const char * arg
Definition: jacosubdec.c:67
AV_PIX_FMT_GRAY10
#define AV_PIX_FMT_GRAY10
Definition: pixfmt.h:449
AV_PIX_FMT_GBRP16
#define AV_PIX_FMT_GBRP16
Definition: pixfmt.h:487
NULL
#define NULL
Definition: coverity.c:32
av_frame_copy_props
int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
Copy only "metadata" fields from src to dst.
Definition: frame.c:736
AV_PIX_FMT_YUVJ420P
@ 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:78
median_options
static const AVOption median_options[]
Definition: vf_median.c:57
AVFILTER_DEFINE_CLASS
AVFILTER_DEFINE_CLASS(median)
AV_PIX_FMT_YUV422P10
#define AV_PIX_FMT_YUV422P10
Definition: pixfmt.h:469
AV_PIX_FMT_GRAY8
@ AV_PIX_FMT_GRAY8
Y , 8bpp.
Definition: pixfmt.h:74
AV_PIX_FMT_GBRP9
#define AV_PIX_FMT_GBRP9
Definition: pixfmt.h:483
FLAGS
#define FLAGS
Definition: vf_median.c:55
check_params
static void check_params(MedianContext *s, AVFilterLink *inlink)
Definition: vf_median.c:107
config_input
static int config_input(AVFilterLink *inlink)
Definition: vf_median.c:127
f
f
Definition: af_crystalizer.c:121
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:106
hadd
static void hadd(htype *dst, const htype *src, int bins)
Definition: vf_median.c:67
AV_PIX_FMT_YUV422P12
#define AV_PIX_FMT_YUV422P12
Definition: pixfmt.h:473
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_median.c:233
AV_PIX_FMT_YUV444P12
#define AV_PIX_FMT_YUV444P12
Definition: pixfmt.h:475
ff_filter_process_command
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:851
AV_PIX_FMT_YUVA444P
@ AV_PIX_FMT_YUVA444P
planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
Definition: pixfmt.h:167
AV_PIX_FMT_YUVA444P10
#define AV_PIX_FMT_YUVA444P10
Definition: pixfmt.h:508
internal.h
AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
#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:147
AV_OPT_TYPE_FLOAT
@ AV_OPT_TYPE_FLOAT
Definition: opt.h:228
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:255
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: vf_median.c:211
process_command
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
Definition: vf_median.c:246
av_malloc_array
#define av_malloc_array(a, b)
Definition: tableprint_vlc.h:31
AV_PIX_FMT_GBRP12
#define AV_PIX_FMT_GBRP12
Definition: pixfmt.h:485
ff_filter_get_nb_threads
int ff_filter_get_nb_threads(AVFilterContext *ctx)
Get number of threads for current filter instance.
Definition: avfilter.c:786
ThreadData
Used for passing data between threads.
Definition: dsddec.c:69
planes
static const struct @363 planes[]
FFMIN
#define FFMIN(a, b)
Definition: macros.h:49
AV_PIX_FMT_YUVJ440P
@ 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:100
AVFilterPad::name
const char * name
Pad name.
Definition: internal.h:53
av_calloc
void * av_calloc(size_t nmemb, size_t size)
Definition: mem.c:262
AV_PIX_FMT_YUV444P9
#define AV_PIX_FMT_YUV444P9
Definition: pixfmt.h:467
AVFilter
Filter definition.
Definition: avfilter.h:166
ret
ret
Definition: filter_design.txt:187
AV_PIX_FMT_YUVA444P9
#define AV_PIX_FMT_YUVA444P9
Definition: pixfmt.h:505
AV_PIX_FMT_YUV420P12
#define AV_PIX_FMT_YUV420P12
Definition: pixfmt.h:472
AV_PIX_FMT_YUV422P14
#define AV_PIX_FMT_YUV422P14
Definition: pixfmt.h:477
pix_fmts
static enum AVPixelFormat pix_fmts[]
Definition: vf_median.c:85
ff_vf_median
const AVFilter ff_vf_median
Definition: vf_median.c:272
filter_slice
static int filter_slice(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
Definition: vf_median.c:178
AV_PIX_FMT_NONE
@ AV_PIX_FMT_NONE
Definition: pixfmt.h:65
AV_PIX_FMT_YUVA422P12
#define AV_PIX_FMT_YUVA422P12
Definition: pixfmt.h:509
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:225
avfilter.h
AV_PIX_FMT_YUV444P
@ AV_PIX_FMT_YUV444P
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
Definition: pixfmt.h:71
AVFilterContext
An instance of a filter.
Definition: avfilter.h:397
AV_PIX_FMT_GBRP
@ AV_PIX_FMT_GBRP
planar GBR 4:4:4 24bpp
Definition: pixfmt.h:158
AVFILTER_FLAG_SLICE_THREADS
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition: avfilter.h:117
desc
const char * desc
Definition: libsvtav1.c:83
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
AV_PIX_FMT_YUV422P
@ AV_PIX_FMT_YUV422P
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
Definition: pixfmt.h:70
AVPixFmtDescriptor
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
Definition: pixdesc.h:69
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: internal.h:193
av_freep
#define av_freep(p)
Definition: tableprint_vlc.h:34
src
INIT_CLIP pixel * src
Definition: h264pred_template.c:418
AV_PIX_FMT_YUV411P
@ AV_PIX_FMT_YUV411P
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
Definition: pixfmt.h:73
imgutils.h
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:474
AVFrame::linesize
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:385
AV_PIX_FMT_YUV410P
@ AV_PIX_FMT_YUV410P
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
Definition: pixfmt.h:72
av_log
#define av_log(a,...)
Definition: tableprint_vlc.h:27
AV_PIX_FMT_YUV440P12
#define AV_PIX_FMT_YUV440P12
Definition: pixfmt.h:474
h
h
Definition: vp9dsp_template.c:2038
hmuladd
static void hmuladd(htype *dst, const htype *src, int f, int bins)
Definition: vf_median.c:79
AV_PIX_FMT_YUV444P14
#define AV_PIX_FMT_YUV444P14
Definition: pixfmt.h:478
AV_PIX_FMT_GRAY12
#define AV_PIX_FMT_GRAY12
Definition: pixfmt.h:450
ff_filter_execute
static av_always_inline int ff_filter_execute(AVFilterContext *ctx, avfilter_action_func *func, void *arg, int *ret, int nb_jobs)
Definition: internal.h:144
AV_PIX_FMT_YUVA422P
@ AV_PIX_FMT_YUVA422P
planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples)
Definition: pixfmt.h:166
AV_PIX_FMT_YUV420P14
#define AV_PIX_FMT_YUV420P14
Definition: pixfmt.h:476