FFmpeg
vf_geq.c
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006 Michael Niedermayer <michaelni@gmx.at>
3  * Copyright (C) 2012 Clément Bœsch <u pkh me>
4  *
5  * This file is part of FFmpeg.
6  *
7  * FFmpeg is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (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 GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with FFmpeg; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 
22 /**
23  * @file
24  * Generic equation change filter
25  * Originally written by Michael Niedermayer for the MPlayer project, and
26  * ported by Clément Bœsch for FFmpeg.
27  */
28 
29 #include "libavutil/avassert.h"
30 #include "libavutil/avstring.h"
31 #include "libavutil/eval.h"
32 #include "libavutil/opt.h"
33 #include "libavutil/pixdesc.h"
34 #include "internal.h"
35 
36 #define MAX_NB_THREADS 32
37 #define NB_PLANES 4
38 
43 };
44 
45 static const char *const var_names[] = { "X", "Y", "W", "H", "N", "SW", "SH", "T", NULL };
47 
48 typedef struct GEQContext {
49  const AVClass *class;
50  AVExpr *e[NB_PLANES][MAX_NB_THREADS]; ///< expressions for each plane and thread
51  char *expr_str[4+3]; ///< expression strings for each plane
52  AVFrame *picref; ///< current input buffer
53  uint8_t *dst; ///< reference pointer to the 8bits output
54  uint16_t *dst16; ///< reference pointer to the 16bits output
55  double values[VAR_VARS_NB]; ///< expression values
56  int hsub, vsub; ///< chroma subsampling
57  int planes; ///< number of planes
59  int is_rgb;
60  int bps;
61 
64 } GEQContext;
65 
66 enum { Y = 0, U, V, A, G, B, R };
67 
68 #define OFFSET(x) offsetof(GEQContext, x)
69 #define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
70 
71 static const AVOption geq_options[] = {
72  { "lum_expr", "set luminance expression", OFFSET(expr_str[Y]), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS },
73  { "lum", "set luminance expression", OFFSET(expr_str[Y]), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS },
74  { "cb_expr", "set chroma blue expression", OFFSET(expr_str[U]), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS },
75  { "cb", "set chroma blue expression", OFFSET(expr_str[U]), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS },
76  { "cr_expr", "set chroma red expression", OFFSET(expr_str[V]), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS },
77  { "cr", "set chroma red expression", OFFSET(expr_str[V]), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS },
78  { "alpha_expr", "set alpha expression", OFFSET(expr_str[A]), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS },
79  { "a", "set alpha expression", OFFSET(expr_str[A]), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS },
80  { "red_expr", "set red expression", OFFSET(expr_str[R]), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS },
81  { "r", "set red expression", OFFSET(expr_str[R]), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS },
82  { "green_expr", "set green expression", OFFSET(expr_str[G]), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS },
83  { "g", "set green expression", OFFSET(expr_str[G]), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS },
84  { "blue_expr", "set blue expression", OFFSET(expr_str[B]), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS },
85  { "b", "set blue expression", OFFSET(expr_str[B]), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS },
86  { "interpolation","set interpolation method", OFFSET(interpolation), AV_OPT_TYPE_INT, {.i64=INTERP_BILINEAR}, 0, NB_INTERP-1, FLAGS, "interp" },
87  { "i", "set interpolation method", OFFSET(interpolation), AV_OPT_TYPE_INT, {.i64=INTERP_BILINEAR}, 0, NB_INTERP-1, FLAGS, "interp" },
88  { "nearest", "nearest interpolation", 0, AV_OPT_TYPE_CONST, {.i64=INTERP_NEAREST}, 0, 0, FLAGS, "interp" },
89  { "n", "nearest interpolation", 0, AV_OPT_TYPE_CONST, {.i64=INTERP_NEAREST}, 0, 0, FLAGS, "interp" },
90  { "bilinear", "bilinear interpolation", 0, AV_OPT_TYPE_CONST, {.i64=INTERP_BILINEAR}, 0, 0, FLAGS, "interp" },
91  { "b", "bilinear interpolation", 0, AV_OPT_TYPE_CONST, {.i64=INTERP_BILINEAR}, 0, 0, FLAGS, "interp" },
92  {NULL},
93 };
94 
96 
97 static inline double getpix(void *priv, double x, double y, int plane)
98 {
99  int xi, yi;
100  GEQContext *geq = priv;
101  AVFrame *picref = geq->picref;
102  const uint8_t *src = picref->data[plane];
103  int linesize = picref->linesize[plane];
104  const int w = (plane == 1 || plane == 2) ? AV_CEIL_RSHIFT(picref->width, geq->hsub) : picref->width;
105  const int h = (plane == 1 || plane == 2) ? AV_CEIL_RSHIFT(picref->height, geq->vsub) : picref->height;
106 
107  if (!src)
108  return 0;
109 
110  if (geq->interpolation == INTERP_BILINEAR) {
111  xi = x = av_clipd(x, 0, w - 2);
112  yi = y = av_clipd(y, 0, h - 2);
113 
114  x -= xi;
115  y -= yi;
116 
117  if (geq->bps > 8) {
118  const uint16_t *src16 = (const uint16_t*)src;
119  linesize /= 2;
120 
121  return (1-y)*((1-x)*src16[xi + yi * linesize] + x*src16[xi + 1 + yi * linesize])
122  + y *((1-x)*src16[xi + (yi+1) * linesize] + x*src16[xi + 1 + (yi+1) * linesize]);
123  } else {
124  return (1-y)*((1-x)*src[xi + yi * linesize] + x*src[xi + 1 + yi * linesize])
125  + y *((1-x)*src[xi + (yi+1) * linesize] + x*src[xi + 1 + (yi+1) * linesize]);
126  }
127  } else {
128  xi = av_clipd(x, 0, w - 1);
129  yi = av_clipd(y, 0, h - 1);
130 
131  if (geq->bps > 8) {
132  const uint16_t *src16 = (const uint16_t*)src;
133  linesize /= 2;
134 
135  return src16[xi + yi * linesize];
136  } else {
137  return src[xi + yi * linesize];
138  }
139  }
140 }
141 
142 static int calculate_sums(GEQContext *geq, int plane, int w, int h)
143 {
144  int xi, yi;
145  AVFrame *picref = geq->picref;
146  const uint8_t *src = picref->data[plane];
147  int linesize = picref->linesize[plane];
148 
149  if (!geq->pixel_sums[plane])
150  geq->pixel_sums[plane] = av_malloc_array(w, h * sizeof (*geq->pixel_sums[plane]));
151  if (!geq->pixel_sums[plane])
152  return AVERROR(ENOMEM);
153  if (geq->bps > 8)
154  linesize /= 2;
155  for (yi = 0; yi < h; yi ++) {
156  if (geq->bps > 8) {
157  const uint16_t *src16 = (const uint16_t*)src;
158  double linesum = 0;
159 
160  for (xi = 0; xi < w; xi ++) {
161  linesum += src16[xi + yi * linesize];
162  geq->pixel_sums[plane][xi + yi * w] = linesum;
163  }
164  } else {
165  double linesum = 0;
166 
167  for (xi = 0; xi < w; xi ++) {
168  linesum += src[xi + yi * linesize];
169  geq->pixel_sums[plane][xi + yi * w] = linesum;
170  }
171  }
172  if (yi)
173  for (xi = 0; xi < w; xi ++) {
174  geq->pixel_sums[plane][xi + yi * w] += geq->pixel_sums[plane][xi + yi * w - w];
175  }
176  }
177  return 0;
178 }
179 
180 static inline double getpix_integrate_internal(GEQContext *geq, int x, int y, int plane, int w, int h)
181 {
182  if (x > w - 1) {
183  double boundary = getpix_integrate_internal(geq, w - 1, y, plane, w, h);
184  return 2*boundary - getpix_integrate_internal(geq, 2*(w - 1) - x, y, plane, w, h);
185  } else if (y > h - 1) {
186  double boundary = getpix_integrate_internal(geq, x, h - 1, plane, w, h);
187  return 2*boundary - getpix_integrate_internal(geq, x, 2*(h - 1) - y, plane, w, h);
188  } else if (x < 0) {
189  if (x == -1) return 0;
190  return - getpix_integrate_internal(geq, -x-2, y, plane, w, h);
191  } else if (y < 0) {
192  if (y == -1) return 0;
193  return - getpix_integrate_internal(geq, x, -y-2, plane, w, h);
194  }
195 
196  return geq->pixel_sums[plane][x + y * w];
197 }
198 
199 static inline double getpix_integrate(void *priv, double x, double y, int plane) {
200  GEQContext *geq = priv;
201  AVFrame *picref = geq->picref;
202  const uint8_t *src = picref->data[plane];
203  const int w = (plane == 1 || plane == 2) ? AV_CEIL_RSHIFT(picref->width, geq->hsub) : picref->width;
204  const int h = (plane == 1 || plane == 2) ? AV_CEIL_RSHIFT(picref->height, geq->vsub) : picref->height;
205 
206  if (!src)
207  return 0;
208 
209  return getpix_integrate_internal(geq, lrint(av_clipd(x, -w, 2*w)), lrint(av_clipd(y, -h, 2*h)), plane, w, h);
210 }
211 
212 //TODO: cubic interpolate
213 //TODO: keep the last few frames
214 static double lum(void *priv, double x, double y) { return getpix(priv, x, y, 0); }
215 static double cb(void *priv, double x, double y) { return getpix(priv, x, y, 1); }
216 static double cr(void *priv, double x, double y) { return getpix(priv, x, y, 2); }
217 static double alpha(void *priv, double x, double y) { return getpix(priv, x, y, 3); }
218 
219 static double lumsum(void *priv, double x, double y) { return getpix_integrate(priv, x, y, 0); }
220 static double cbsum(void *priv, double x, double y) { return getpix_integrate(priv, x, y, 1); }
221 static double crsub(void *priv, double x, double y) { return getpix_integrate(priv, x, y, 2); }
222 static double alphasum(void *priv, double x, double y) { return getpix_integrate(priv, x, y, 3); }
223 
225 {
226  GEQContext *geq = ctx->priv;
227  int plane, ret = 0;
228 
229  if (!geq->expr_str[Y] && !geq->expr_str[G] && !geq->expr_str[B] && !geq->expr_str[R]) {
230  av_log(ctx, AV_LOG_ERROR, "A luminance or RGB expression is mandatory\n");
231  ret = AVERROR(EINVAL);
232  goto end;
233  }
234  geq->is_rgb = !geq->expr_str[Y];
235 
236  if ((geq->expr_str[Y] || geq->expr_str[U] || geq->expr_str[V]) && (geq->expr_str[G] || geq->expr_str[B] || geq->expr_str[R])) {
237  av_log(ctx, AV_LOG_ERROR, "Either YCbCr or RGB but not both must be specified\n");
238  ret = AVERROR(EINVAL);
239  goto end;
240  }
241 
242  if (!geq->expr_str[U] && !geq->expr_str[V]) {
243  /* No chroma at all: fallback on luma */
244  geq->expr_str[U] = av_strdup(geq->expr_str[Y]);
245  geq->expr_str[V] = av_strdup(geq->expr_str[Y]);
246  } else {
247  /* One chroma unspecified, fallback on the other */
248  if (!geq->expr_str[U]) geq->expr_str[U] = av_strdup(geq->expr_str[V]);
249  if (!geq->expr_str[V]) geq->expr_str[V] = av_strdup(geq->expr_str[U]);
250  }
251 
252  if (!geq->expr_str[A]) {
253  char bps_string[8];
254  snprintf(bps_string, sizeof(bps_string), "%d", (1<<geq->bps) - 1);
255  geq->expr_str[A] = av_strdup(bps_string);
256  }
257  if (!geq->expr_str[G])
258  geq->expr_str[G] = av_strdup("g(X,Y)");
259  if (!geq->expr_str[B])
260  geq->expr_str[B] = av_strdup("b(X,Y)");
261  if (!geq->expr_str[R])
262  geq->expr_str[R] = av_strdup("r(X,Y)");
263 
264  if (geq->is_rgb ?
265  (!geq->expr_str[G] || !geq->expr_str[B] || !geq->expr_str[R])
266  :
267  (!geq->expr_str[U] || !geq->expr_str[V] || !geq->expr_str[A])) {
268  ret = AVERROR(ENOMEM);
269  goto end;
270  }
271 
272  for (plane = 0; plane < NB_PLANES; plane++) {
273  static double (*const p[])(void *, double, double) = {
274  lum , cb , cr , alpha ,
276  };
277  static const char *const func2_yuv_names[] = {
278  "lum" , "cb" , "cr" , "alpha" , "p",
279  "lumsum", "cbsum", "crsum", "alphasum", "psum",
280  NULL };
281  static const char *const func2_rgb_names[] = {
282  "g" , "b" , "r" , "alpha" , "p",
283  "gsum", "bsum", "rsum", "alphasum", "psum",
284  NULL };
285  const char *const *func2_names = geq->is_rgb ? func2_rgb_names : func2_yuv_names;
286  double (*const func2[])(void *, double, double) = {
287  lum , cb , cr , alpha , p[plane],
288  lumsum, cbsum, crsub, alphasum, p[plane + 4],
289  NULL };
290  int counter[10] = {0};
291 
292  for (int i = 0; i < MAX_NB_THREADS; i++) {
293  ret = av_expr_parse(&geq->e[plane][i], geq->expr_str[plane < 3 && geq->is_rgb ? plane+4 : plane], var_names,
294  NULL, NULL, func2_names, func2, 0, ctx);
295  if (ret < 0)
296  goto end;
297  }
298 
299  av_expr_count_func(geq->e[plane][0], counter, FF_ARRAY_ELEMS(counter), 2);
300  geq->needs_sum[plane] = counter[5] + counter[6] + counter[7] + counter[8] + counter[9];
301  }
302 
303 end:
304  return ret;
305 }
306 
308 {
309  GEQContext *geq = ctx->priv;
310  static const enum AVPixelFormat yuv_pix_fmts[] = {
328  };
329  static const enum AVPixelFormat rgb_pix_fmts[] = {
337  };
338  AVFilterFormats *fmts_list;
339 
340  if (geq->is_rgb) {
341  fmts_list = ff_make_format_list(rgb_pix_fmts);
342  } else
343  fmts_list = ff_make_format_list(yuv_pix_fmts);
344  if (!fmts_list)
345  return AVERROR(ENOMEM);
346  return ff_set_common_formats(ctx, fmts_list);
347 }
348 
350 {
351  GEQContext *geq = inlink->dst->priv;
353 
354  av_assert0(desc);
355 
356  geq->hsub = desc->log2_chroma_w;
357  geq->vsub = desc->log2_chroma_h;
358  geq->bps = desc->comp[0].depth;
359  geq->planes = desc->nb_components;
360  return 0;
361 }
362 
363 typedef struct ThreadData {
364  int height;
365  int width;
366  int plane;
367  int linesize;
368 } ThreadData;
369 
370 static int slice_geq_filter(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
371 {
372  GEQContext *geq = ctx->priv;
373  ThreadData *td = arg;
374  const int height = td->height;
375  const int width = td->width;
376  const int plane = td->plane;
377  const int linesize = td->linesize;
378  const int slice_start = (height * jobnr) / nb_jobs;
379  const int slice_end = (height * (jobnr+1)) / nb_jobs;
380  int x, y;
381 
382  double values[VAR_VARS_NB];
383  values[VAR_W] = geq->values[VAR_W];
384  values[VAR_H] = geq->values[VAR_H];
385  values[VAR_N] = geq->values[VAR_N];
386  values[VAR_SW] = geq->values[VAR_SW];
387  values[VAR_SH] = geq->values[VAR_SH];
388  values[VAR_T] = geq->values[VAR_T];
389 
390  if (geq->bps == 8) {
391  uint8_t *ptr = geq->dst + linesize * slice_start;
392  for (y = slice_start; y < slice_end; y++) {
393  values[VAR_Y] = y;
394 
395  for (x = 0; x < width; x++) {
396  values[VAR_X] = x;
397  ptr[x] = av_expr_eval(geq->e[plane][jobnr], values, geq);
398  }
399  ptr += linesize;
400  }
401  } else {
402  uint16_t *ptr16 = geq->dst16 + (linesize/2) * slice_start;
403  for (y = slice_start; y < slice_end; y++) {
404  values[VAR_Y] = y;
405  for (x = 0; x < width; x++) {
406  values[VAR_X] = x;
407  ptr16[x] = av_expr_eval(geq->e[plane][jobnr], values, geq);
408  }
409  ptr16 += linesize/2;
410  }
411  }
412 
413  return 0;
414 }
415 
417 {
418  int plane;
419  AVFilterContext *ctx = inlink->dst;
420  const int nb_threads = FFMIN(MAX_NB_THREADS, ff_filter_get_nb_threads(ctx));
421  GEQContext *geq = ctx->priv;
422  AVFilterLink *outlink = inlink->dst->outputs[0];
423  AVFrame *out;
424 
425  geq->values[VAR_N] = inlink->frame_count_out,
426  geq->values[VAR_T] = in->pts == AV_NOPTS_VALUE ? NAN : in->pts * av_q2d(inlink->time_base),
427 
428  geq->picref = in;
429  out = ff_get_video_buffer(outlink, outlink->w, outlink->h);
430  if (!out) {
431  av_frame_free(&in);
432  return AVERROR(ENOMEM);
433  }
435 
436  for (plane = 0; plane < geq->planes && out->data[plane]; plane++) {
437  const int width = (plane == 1 || plane == 2) ? AV_CEIL_RSHIFT(inlink->w, geq->hsub) : inlink->w;
438  const int height = (plane == 1 || plane == 2) ? AV_CEIL_RSHIFT(inlink->h, geq->vsub) : inlink->h;
439  const int linesize = out->linesize[plane];
440  ThreadData td;
441 
442  geq->dst = out->data[plane];
443  geq->dst16 = (uint16_t*)out->data[plane];
444 
445  geq->values[VAR_W] = width;
446  geq->values[VAR_H] = height;
447  geq->values[VAR_SW] = width / (double)inlink->w;
448  geq->values[VAR_SH] = height / (double)inlink->h;
449 
450  td.width = width;
451  td.height = height;
452  td.plane = plane;
453  td.linesize = linesize;
454 
455  if (geq->needs_sum[plane])
456  calculate_sums(geq, plane, width, height);
457 
458  ctx->internal->execute(ctx, slice_geq_filter, &td, NULL, FFMIN(height, nb_threads));
459  }
460 
461  av_frame_free(&geq->picref);
462  return ff_filter_frame(outlink, out);
463 }
464 
466 {
467  int i;
468  GEQContext *geq = ctx->priv;
469 
470  for (i = 0; i < NB_PLANES; i++)
471  for (int j = 0; j < MAX_NB_THREADS; j++)
472  av_expr_free(geq->e[i][j]);
473  for (i = 0; i < NB_PLANES; i++)
474  av_freep(&geq->pixel_sums);
475 }
476 
477 static const AVFilterPad geq_inputs[] = {
478  {
479  .name = "default",
480  .type = AVMEDIA_TYPE_VIDEO,
481  .config_props = geq_config_props,
482  .filter_frame = geq_filter_frame,
483  },
484  { NULL }
485 };
486 
487 static const AVFilterPad geq_outputs[] = {
488  {
489  .name = "default",
490  .type = AVMEDIA_TYPE_VIDEO,
491  },
492  { NULL }
493 };
494 
496  .name = "geq",
497  .description = NULL_IF_CONFIG_SMALL("Apply generic equation to each pixel."),
498  .priv_size = sizeof(GEQContext),
499  .init = geq_init,
500  .uninit = geq_uninit,
502  .inputs = geq_inputs,
503  .outputs = geq_outputs,
504  .priv_class = &geq_class,
506 };
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:99
AV_PIX_FMT_YUVA422P16
#define AV_PIX_FMT_YUVA422P16
Definition: pixfmt.h:442
AV_PIX_FMT_GBRAP16
#define AV_PIX_FMT_GBRAP16
Definition: pixfmt.h:421
td
#define td
Definition: regdef.h:70
AVPixelFormat
AVPixelFormat
Pixel format.
Definition: pixfmt.h:64
init
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:31
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
getpix
static double getpix(void *priv, double x, double y, int plane)
Definition: vf_geq.c:97
ff_make_format_list
AVFilterFormats * ff_make_format_list(const int *fmts)
Create a list of supported formats.
Definition: formats.c:286
var_names
static const char *const var_names[]
Definition: vf_geq.c:45
out
FILE * out
Definition: movenc.c:54
cb
static double cb(void *priv, double x, double y)
Definition: vf_geq.c:215
VAR_X
@ VAR_X
Definition: vf_geq.c:46
geq_query_formats
static int geq_query_formats(AVFilterContext *ctx)
Definition: vf_geq.c:307
ff_filter_frame
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
Definition: avfilter.c:1094
geq_uninit
static av_cold void geq_uninit(AVFilterContext *ctx)
Definition: vf_geq.c:465
av_pix_fmt_desc_get
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
Definition: pixdesc.c:2573
geq_outputs
static const AVFilterPad geq_outputs[]
Definition: vf_geq.c:487
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
av_frame_free
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
Definition: frame.c:204
AV_PIX_FMT_YUVA422P9
#define AV_PIX_FMT_YUVA422P9
Definition: pixfmt.h:434
AVFrame
This structure describes decoded (raw) audio or video data.
Definition: frame.h:324
pixdesc.h
AVFrame::width
int width
Definition: frame.h:382
AV_PIX_FMT_YUVA420P16
#define AV_PIX_FMT_YUVA420P16
Definition: pixfmt.h:441
w
uint8_t w
Definition: llviddspenc.c:39
AV_PIX_FMT_YUVA420P10
#define AV_PIX_FMT_YUVA420P10
Definition: pixfmt.h:436
AVOption
AVOption.
Definition: opt.h:248
AV_PIX_FMT_YUV420P10
#define AV_PIX_FMT_YUV420P10
Definition: pixfmt.h:399
R
@ R
Definition: vf_geq.c:66
av_expr_count_func
int av_expr_count_func(AVExpr *e, unsigned *counter, int size, int arg)
Track the presence of user provided functions and their number of occurrences in a parsed expression.
Definition: eval.c:761
NB_INTERP
@ NB_INTERP
Definition: vf_geq.c:42
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
AVFilter::name
const char * name
Filter name.
Definition: avfilter.h:149
GEQContext::planes
int planes
number of planes
Definition: vf_geq.c:57
AVFormatContext::internal
AVFormatInternal * internal
An opaque field for libavformat internal usage.
Definition: avformat.h:1698
AV_PIX_FMT_YUVA422P10
#define AV_PIX_FMT_YUVA422P10
Definition: pixfmt.h:437
lumsum
static double lumsum(void *priv, double x, double y)
Definition: vf_geq.c:219
crsub
static double crsub(void *priv, double x, double y)
Definition: vf_geq.c:221
func2_names
static const char *const func2_names[]
Definition: af_afftfilt.c:120
ThreadData::width
int width
Definition: vf_avgblur.c:62
AV_PIX_FMT_GRAY9
#define AV_PIX_FMT_GRAY9
Definition: pixfmt.h:379
AVFrame::data
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
Definition: frame.h:338
GEQContext::pixel_sums
double * pixel_sums[NB_PLANES]
Definition: vf_geq.c:62
AVFilterFormats
A list of supported formats for one end of a filter link.
Definition: formats.h:65
av_expr_parse
int av_expr_parse(AVExpr **expr, const char *s, const char *const *const_names, const char *const *func1_names, double(*const *funcs1)(void *, double), const char *const *func2_names, double(*const *funcs2)(void *, double, double), int log_offset, void *log_ctx)
Parse an expression.
Definition: eval.c:685
A
@ A
Definition: vf_geq.c:66
geq_config_props
static int geq_config_props(AVFilterLink *inlink)
Definition: vf_geq.c:349
VAR_N
@ VAR_N
Definition: vf_geq.c:46
AV_PIX_FMT_YUVA420P9
#define AV_PIX_FMT_YUVA420P9
Definition: pixfmt.h:433
GEQContext::interpolation
int interpolation
Definition: vf_geq.c:58
AV_PIX_FMT_GBRP14
#define AV_PIX_FMT_GBRP14
Definition: pixfmt.h:417
AV_PIX_FMT_GBRAP
@ AV_PIX_FMT_GBRAP
planar GBRA 4:4:4:4 32bpp
Definition: pixfmt.h:215
AV_PIX_FMT_GBRP10
#define AV_PIX_FMT_GBRP10
Definition: pixfmt.h:415
AV_PIX_FMT_YUVA444P16
#define AV_PIX_FMT_YUVA444P16
Definition: pixfmt.h:443
AV_PIX_FMT_YUV422P9
#define AV_PIX_FMT_YUV422P9
Definition: pixfmt.h:397
InterpolationMethods
InterpolationMethods
Definition: vf_geq.c:39
AV_PIX_FMT_GRAY16
#define AV_PIX_FMT_GRAY16
Definition: pixfmt.h:383
av_expr_free
void av_expr_free(AVExpr *e)
Free a parsed expression previously created with av_expr_parse().
Definition: eval.c:336
AVFilterPad
A filter pad used for either input or output.
Definition: internal.h:54
AV_PIX_FMT_YUV444P10
#define AV_PIX_FMT_YUV444P10
Definition: pixfmt.h:402
avassert.h
lrint
#define lrint
Definition: tablegen.h:53
func2
static double(*const func2[])(void *, double, double)
Definition: af_afftfilt.c:121
AV_LOG_ERROR
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:194
FF_ARRAY_ELEMS
#define FF_ARRAY_ELEMS(a)
Definition: sinewin_tablegen.c:29
av_cold
#define av_cold
Definition: attributes.h:90
inputs
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several inputs
Definition: filter_design.txt:243
AV_PIX_FMT_YUV422P16
#define AV_PIX_FMT_YUV422P16
Definition: pixfmt.h:411
ff_set_common_formats
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
MAX_NB_THREADS
#define MAX_NB_THREADS
Definition: vf_geq.c:36
OFFSET
#define OFFSET(x)
Definition: vf_geq.c:68
AV_PIX_FMT_GBRAP10
#define AV_PIX_FMT_GBRAP10
Definition: pixfmt.h:419
ThreadData::plane
int plane
Definition: vf_blend.c:58
width
#define width
U
@ U
Definition: vf_geq.c:66
AV_PIX_FMT_GBRAP12
#define AV_PIX_FMT_GBRAP12
Definition: pixfmt.h:420
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:412
AV_CEIL_RSHIFT
#define AV_CEIL_RSHIFT(a, b)
Definition: common.h:58
ThreadData::height
int height
Definition: vf_avgblur.c:61
slice_end
static int slice_end(AVCodecContext *avctx, AVFrame *pict)
Handle slice ends.
Definition: mpeg12dec.c:2032
av_q2d
static double av_q2d(AVRational a)
Convert an AVRational to a double.
Definition: rational.h:104
NB_PLANES
#define NB_PLANES
Definition: vf_geq.c:37
GEQContext::vsub
int vsub
chroma subsampling
Definition: vf_geq.c:56
ThreadData::linesize
int linesize
Definition: vf_avgblur.c:64
av_assert0
#define av_assert0(cond)
assert() equivalent, that is always enabled.
Definition: avassert.h:37
outputs
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
AV_PIX_FMT_YUV420P9
#define AV_PIX_FMT_YUV420P9
Definition: pixfmt.h:396
ff_vf_geq
AVFilter ff_vf_geq
Definition: vf_geq.c:495
AV_PIX_FMT_YUV420P16
#define AV_PIX_FMT_YUV420P16
Definition: pixfmt.h:410
G
@ G
Definition: vf_geq.c:66
ctx
AVFormatContext * ctx
Definition: movenc.c:48
xi
#define xi(width, name, var, range_min, range_max, subs,...)
Definition: cbs_h2645.c:404
av_expr_eval
double av_expr_eval(AVExpr *e, const double *const_values, void *opaque)
Evaluate a previously parsed expression.
Definition: eval.c:766
geq_options
static const AVOption geq_options[]
Definition: vf_geq.c:71
AV_PIX_FMT_GRAY14
#define AV_PIX_FMT_GRAY14
Definition: pixfmt.h:382
AVExpr
Definition: eval.c:157
V
@ V
Definition: vf_geq.c:66
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
B
@ B
Definition: vf_geq.c:66
NAN
#define NAN
Definition: mathematics.h:64
alpha
static double alpha(void *priv, double x, double y)
Definition: vf_geq.c:217
arg
const char * arg
Definition: jacosubdec.c:66
AV_PIX_FMT_GRAY10
#define AV_PIX_FMT_GRAY10
Definition: pixfmt.h:380
if
if(ret)
Definition: filter_design.txt:179
AV_PIX_FMT_GBRP16
#define AV_PIX_FMT_GBRP16
Definition: pixfmt.h:418
AVClass
Describe the class of an AVClass context structure.
Definition: log.h:67
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:659
INTERP_NEAREST
@ INTERP_NEAREST
Definition: vf_geq.c:40
getpix_integrate
static double getpix_integrate(void *priv, double x, double y, int plane)
Definition: vf_geq.c:199
VAR_VARS_NB
@ VAR_VARS_NB
Definition: vf_geq.c:46
GEQContext::picref
AVFrame * picref
current input buffer
Definition: vf_geq.c:52
src
#define src
Definition: vp8dsp.c:255
Y
@ Y
Definition: vf_geq.c:66
AV_PIX_FMT_YUV440P10
#define AV_PIX_FMT_YUV440P10
Definition: pixfmt.h:401
calculate_sums
static int calculate_sums(GEQContext *geq, int plane, int w, int h)
Definition: vf_geq.c:142
AV_PIX_FMT_YUV422P10
#define AV_PIX_FMT_YUV422P10
Definition: pixfmt.h:400
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:414
INTERP_BILINEAR
@ INTERP_BILINEAR
Definition: vf_geq.c:41
cbsum
static double cbsum(void *priv, double x, double y)
Definition: vf_geq.c:220
GEQContext::bps
int bps
Definition: vf_geq.c:60
GEQContext::e
AVExpr * e[NB_PLANES][MAX_NB_THREADS]
expressions for each plane and thread
Definition: vf_geq.c:50
eval.h
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:117
av_clipd
#define av_clipd
Definition: common.h:173
AV_PIX_FMT_YUV422P12
#define AV_PIX_FMT_YUV422P12
Definition: pixfmt.h:404
GEQContext::values
double values[VAR_VARS_NB]
expression values
Definition: vf_geq.c:55
AV_NOPTS_VALUE
#define AV_NOPTS_VALUE
Undefined timestamp value.
Definition: avutil.h:248
AV_PIX_FMT_YUV444P12
#define AV_PIX_FMT_YUV444P12
Definition: pixfmt.h:406
geq_init
static av_cold int geq_init(AVFilterContext *ctx)
Definition: vf_geq.c:224
height
#define height
FFMIN
#define FFMIN(a, b)
Definition: common.h:105
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:177
AV_PIX_FMT_YUVA444P10
#define AV_PIX_FMT_YUVA444P10
Definition: pixfmt.h:438
FLAGS
#define FLAGS
Definition: vf_geq.c:69
VAR_W
@ VAR_W
Definition: vf_geq.c:46
interpolation
static int interpolation(DeclickChannel *c, const double *src, int ar_order, double *acoefficients, int *index, int nb_errors, double *auxiliary, double *interpolated)
Definition: af_adeclick.c:365
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:126
in
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
Definition: audio_convert.c:326
GEQContext
Definition: vf_geq.c:48
i
int i
Definition: input.c:407
GEQContext::is_rgb
int is_rgb
Definition: vf_geq.c:59
lum
static double lum(void *priv, double x, double y)
Definition: vf_geq.c:214
AV_PIX_FMT_GBRP12
#define AV_PIX_FMT_GBRP12
Definition: pixfmt.h:416
av_malloc_array
#define av_malloc_array(a, b)
Definition: tableprint_vlc.h:32
ff_filter_get_nb_threads
int ff_filter_get_nb_threads(AVFilterContext *ctx)
Get number of threads for current filter instance.
Definition: avfilter.c:802
ThreadData
Used for passing data between threads.
Definition: dsddec.c:67
VAR_T
@ VAR_T
Definition: vf_geq.c:46
uint8_t
uint8_t
Definition: audio_convert.c:194
AVFilterPad::name
const char * name
Pad name.
Definition: internal.h:60
GEQContext::expr_str
char * expr_str[4+3]
expression strings for each plane
Definition: vf_geq.c:51
GEQContext::dst
uint8_t * dst
reference pointer to the 8bits output
Definition: vf_geq.c:53
GEQContext::dst16
uint16_t * dst16
reference pointer to the 16bits output
Definition: vf_geq.c:54
AV_PIX_FMT_YUV444P9
#define AV_PIX_FMT_YUV444P9
Definition: pixfmt.h:398
AVFilter
Filter definition.
Definition: avfilter.h:145
ret
ret
Definition: filter_design.txt:187
GEQContext::needs_sum
int needs_sum[NB_PLANES]
Definition: vf_geq.c:63
AV_PIX_FMT_YUVA444P9
#define AV_PIX_FMT_YUVA444P9
Definition: pixfmt.h:435
AV_PIX_FMT_YUV420P12
#define AV_PIX_FMT_YUV420P12
Definition: pixfmt.h:403
GEQContext::hsub
int hsub
Definition: vf_geq.c:56
AV_PIX_FMT_YUV422P14
#define AV_PIX_FMT_YUV422P14
Definition: pixfmt.h:408
VAR_H
@ VAR_H
Definition: vf_geq.c:46
VAR_SH
@ VAR_SH
Definition: vf_geq.c:46
AVFrame::height
int height
Definition: frame.h:382
geq_filter_frame
static int geq_filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: vf_geq.c:416
AV_PIX_FMT_NONE
@ AV_PIX_FMT_NONE
Definition: pixfmt.h:65
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:225
values
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return values
Definition: filter_design.txt:263
VAR_SW
@ VAR_SW
Definition: vf_geq.c:46
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:341
AVFILTER_DEFINE_CLASS
AVFILTER_DEFINE_CLASS(geq)
AV_PIX_FMT_GBRP
@ AV_PIX_FMT_GBRP
planar GBR 4:4:4 24bpp
Definition: pixfmt.h:168
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
av_strdup
char * av_strdup(const char *s)
Duplicate a string.
Definition: mem.c:253
desc
const char * desc
Definition: libsvtav1.c:79
alphasum
static double alphasum(void *priv, double x, double y)
Definition: vf_geq.c:222
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:81
yuv_pix_fmts
static enum AVPixelFormat yuv_pix_fmts[]
Definition: jpeg2000dec.c:262
cr
static double cr(void *priv, double x, double y)
Definition: vf_geq.c:216
VAR_Y
@ VAR_Y
Definition: vf_geq.c:46
av_freep
#define av_freep(p)
Definition: tableprint_vlc.h:35
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
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: aeval.c:244
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:561
AVFrame::linesize
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
Definition: frame.h:355
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:28
uninit
static av_cold int uninit(AVCodecContext *avctx)
Definition: crystalhd.c:279
h
h
Definition: vp9dsp_template.c:2038
AV_PIX_FMT_YUV444P14
#define AV_PIX_FMT_YUV444P14
Definition: pixfmt.h:409
rgb_pix_fmts
static enum AVPixelFormat rgb_pix_fmts[]
Definition: jpeg2000dec.c:260
avstring.h
AV_OPT_TYPE_STRING
@ AV_OPT_TYPE_STRING
Definition: opt.h:229
AV_PIX_FMT_GRAY12
#define AV_PIX_FMT_GRAY12
Definition: pixfmt.h:381
AV_OPT_TYPE_CONST
@ AV_OPT_TYPE_CONST
Definition: opt.h:234
snprintf
#define snprintf
Definition: snprintf.h:34
slice_geq_filter
static int slice_geq_filter(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
Definition: vf_geq.c:370
geq_inputs
static const AVFilterPad geq_inputs[]
Definition: vf_geq.c:477
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:176
AV_PIX_FMT_YUV420P14
#define AV_PIX_FMT_YUV420P14
Definition: pixfmt.h:407
getpix_integrate_internal
static double getpix_integrate_internal(GEQContext *geq, int x, int y, int plane, int w, int h)
Definition: vf_geq.c:180