FFmpeg
vf_fftfilt.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 Arwa Arif <arwaarif1994@gmail.com>
3  * Copyright (c) 2017 Paul B Mahol
4  *
5  * This file is part of FFmpeg.
6  *
7  * FFmpeg is free software; you can redistribute it and/or modify it
8  * under the terms of the GNU Lesser General Public License as published
9  * by the Free Software Foundation; either version 2.1 of the License,
10  * 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  * FFT domain filtering.
25  */
26 
27 #include "libavfilter/internal.h"
28 #include "libavutil/common.h"
29 #include "libavutil/imgutils.h"
30 #include "libavutil/opt.h"
31 #include "libavutil/pixdesc.h"
32 #include "libavcodec/avfft.h"
33 #include "libavutil/eval.h"
34 
35 #define MAX_THREADS 32
36 #define MAX_PLANES 4
37 
38 enum EvalMode {
42 };
43 
44 typedef struct FFTFILTContext {
45  const AVClass *class;
46 
47  int eval_mode;
48  int depth;
49  int nb_planes;
53 
64 
65  int dc[MAX_PLANES];
68  double *weight[MAX_PLANES];
69 
70  int (*rdft_horizontal)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs);
71  int (*irdft_horizontal)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs);
73 
74 static const char *const var_names[] = { "X", "Y", "W", "H", "N", "WS", "HS", NULL };
76 
77 enum { Y = 0, U, V };
78 
79 #define OFFSET(x) offsetof(FFTFILTContext, x)
80 #define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
81 
82 static const AVOption fftfilt_options[] = {
83  { "dc_Y", "adjust gain in Y plane", OFFSET(dc[Y]), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1000, FLAGS },
84  { "dc_U", "adjust gain in U plane", OFFSET(dc[U]), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1000, FLAGS },
85  { "dc_V", "adjust gain in V plane", OFFSET(dc[V]), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1000, FLAGS },
86  { "weight_Y", "set luminance expression in Y plane", OFFSET(weight_str[Y]), AV_OPT_TYPE_STRING, {.str = "1"}, 0, 0, FLAGS },
87  { "weight_U", "set chrominance expression in U plane", OFFSET(weight_str[U]), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, FLAGS },
88  { "weight_V", "set chrominance expression in V plane", OFFSET(weight_str[V]), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, FLAGS },
89  { "eval", "specify when to evaluate expressions", OFFSET(eval_mode), AV_OPT_TYPE_INT, {.i64 = EVAL_MODE_INIT}, 0, EVAL_MODE_NB-1, FLAGS, "eval" },
90  { "init", "eval expressions once during initialization", 0, AV_OPT_TYPE_CONST, {.i64=EVAL_MODE_INIT}, .flags = FLAGS, .unit = "eval" },
91  { "frame", "eval expressions per-frame", 0, AV_OPT_TYPE_CONST, {.i64=EVAL_MODE_FRAME}, .flags = FLAGS, .unit = "eval" },
92  {NULL},
93 };
94 
95 AVFILTER_DEFINE_CLASS(fftfilt);
96 
97 static inline double lum(void *priv, double x, double y, int plane)
98 {
99  FFTFILTContext *s = priv;
100  return s->rdft_vdata[plane][(int)x * s->rdft_vlen[plane] + (int)y];
101 }
102 
103 static double weight_Y(void *priv, double x, double y) { return lum(priv, x, y, Y); }
104 static double weight_U(void *priv, double x, double y) { return lum(priv, x, y, U); }
105 static double weight_V(void *priv, double x, double y) { return lum(priv, x, y, V); }
106 
107 static void copy_rev(FFTSample *dest, int w, int w2)
108 {
109  int i;
110 
111  for (i = w; i < w + (w2-w)/2; i++)
112  dest[i] = dest[2*w - i - 1];
113 
114  for (; i < w2; i++)
115  dest[i] = dest[w2 - i];
116 }
117 
118 static int rdft_horizontal8(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
119 {
120  FFTFILTContext *s = ctx->priv;
121  AVFrame *in = arg;
122 
123  for (int plane = 0; plane < s->nb_planes; plane++) {
124  const int w = s->planewidth[plane];
125  const int h = s->planeheight[plane];
126  const int slice_start = (h * jobnr) / nb_jobs;
127  const int slice_end = (h * (jobnr+1)) / nb_jobs;
128 
129  for (int i = slice_start; i < slice_end; i++) {
130  const uint8_t *src = in->data[plane] + i * in->linesize[plane];
131  float *hdata = s->rdft_hdata[plane] + i * s->rdft_hlen[plane];
132 
133  for (int j = 0; j < w; j++)
134  hdata[j] = src[j];
135 
136  copy_rev(s->rdft_hdata[plane] + i * s->rdft_hlen[plane], w, s->rdft_hlen[plane]);
137  }
138 
139  for (int i = slice_start; i < slice_end; i++)
140  av_rdft_calc(s->hrdft[jobnr][plane], s->rdft_hdata[plane] + i * s->rdft_hlen[plane]);
141  }
142 
143  return 0;
144 }
145 
146 static int rdft_horizontal16(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
147 {
148  FFTFILTContext *s = ctx->priv;
149  AVFrame *in = arg;
150 
151  for (int plane = 0; plane < s->nb_planes; plane++) {
152  const int w = s->planewidth[plane];
153  const int h = s->planeheight[plane];
154  const int slice_start = (h * jobnr) / nb_jobs;
155  const int slice_end = (h * (jobnr+1)) / nb_jobs;
156 
157  for (int i = slice_start; i < slice_end; i++) {
158  const uint16_t *src = (const uint16_t *)(in->data[plane] + i * in->linesize[plane]);
159  float *hdata = s->rdft_hdata[plane] + i * s->rdft_hlen[plane];
160 
161  for (int j = 0; j < w; j++)
162  hdata[j] = src[j];
163 
164  copy_rev(s->rdft_hdata[plane] + i * s->rdft_hlen[plane], w, s->rdft_hlen[plane]);
165  }
166 
167  for (int i = slice_start; i < slice_end; i++)
168  av_rdft_calc(s->hrdft[jobnr][plane], s->rdft_hdata[plane] + i * s->rdft_hlen[plane]);
169  }
170 
171  return 0;
172 }
173 
174 static int irdft_horizontal8(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
175 {
176  FFTFILTContext *s = ctx->priv;
177  AVFrame *out = arg;
178 
179  for (int plane = 0; plane < s->nb_planes; plane++) {
180  const int w = s->planewidth[plane];
181  const int h = s->planeheight[plane];
182  const int slice_start = (h * jobnr) / nb_jobs;
183  const int slice_end = (h * (jobnr+1)) / nb_jobs;
184 
185  for (int i = slice_start; i < slice_end; i++)
186  av_rdft_calc(s->ihrdft[jobnr][plane], s->rdft_hdata[plane] + i * s->rdft_hlen[plane]);
187 
188  for (int i = slice_start; i < slice_end; i++) {
189  const float scale = 4.f / (s->rdft_hlen[plane] * s->rdft_vlen[plane]);
190  const float *src = s->rdft_hdata[plane] + i * s->rdft_hlen[plane];
191  uint8_t *dst = out->data[plane] + i * out->linesize[plane];
192 
193  for (int j = 0; j < w; j++)
194  dst[j] = av_clip_uint8(lrintf(src[j] * scale));
195  }
196  }
197 
198  return 0;
199 }
200 
201 static int irdft_horizontal16(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
202 {
203  FFTFILTContext *s = ctx->priv;
204  AVFrame *out = arg;
205 
206  for (int plane = 0; plane < s->nb_planes; plane++) {
207  int max = (1 << s->depth) - 1;
208  const int w = s->planewidth[plane];
209  const int h = s->planeheight[plane];
210  const int slice_start = (h * jobnr) / nb_jobs;
211  const int slice_end = (h * (jobnr+1)) / nb_jobs;
212 
213  for (int i = slice_start; i < slice_end; i++)
214  av_rdft_calc(s->ihrdft[jobnr][plane], s->rdft_hdata[plane] + i * s->rdft_hlen[plane]);
215 
216  for (int i = slice_start; i < slice_end; i++) {
217  const float scale = 4.f / (s->rdft_hlen[plane] * s->rdft_vlen[plane]);
218  const float *src = s->rdft_hdata[plane] + i * s->rdft_hlen[plane];
219  uint16_t *dst = (uint16_t *)(out->data[plane] + i * out->linesize[plane]);
220 
221  for (int j = 0; j < w; j++)
222  dst[j] = av_clip(lrintf(src[j] * scale), 0, max);
223  }
224  }
225 
226  return 0;
227 }
228 
230 {
231  FFTFILTContext *s = ctx->priv;
232  int ret = 0, plane;
233 
234  if (!s->dc[U] && !s->dc[V]) {
235  s->dc[U] = s->dc[Y];
236  s->dc[V] = s->dc[Y];
237  } else {
238  if (!s->dc[U]) s->dc[U] = s->dc[V];
239  if (!s->dc[V]) s->dc[V] = s->dc[U];
240  }
241 
242  if (!s->weight_str[U] && !s->weight_str[V]) {
243  s->weight_str[U] = av_strdup(s->weight_str[Y]);
244  s->weight_str[V] = av_strdup(s->weight_str[Y]);
245  } else {
246  if (!s->weight_str[U]) s->weight_str[U] = av_strdup(s->weight_str[V]);
247  if (!s->weight_str[V]) s->weight_str[V] = av_strdup(s->weight_str[U]);
248  }
249 
250  for (plane = 0; plane < 3; plane++) {
251  static double (*p[])(void *, double, double) = { weight_Y, weight_U, weight_V };
252  const char *const func2_names[] = {"weight_Y", "weight_U", "weight_V", NULL };
253  double (*func2[])(void *, double, double) = { weight_Y, weight_U, weight_V, p[plane], NULL };
254 
255  ret = av_expr_parse(&s->weight_expr[plane], s->weight_str[plane], var_names,
256  NULL, NULL, func2_names, func2, 0, ctx);
257  if (ret < 0)
258  break;
259  }
260  return ret;
261 }
262 
263 static void do_eval(FFTFILTContext *s, AVFilterLink *inlink, int plane)
264 {
265  double values[VAR_VARS_NB];
266  int i, j;
267 
268  values[VAR_N] = inlink->frame_count_out;
269  values[VAR_W] = s->planewidth[plane];
270  values[VAR_H] = s->planeheight[plane];
271  values[VAR_WS] = s->rdft_hlen[plane];
272  values[VAR_HS] = s->rdft_vlen[plane];
273 
274  for (i = 0; i < s->rdft_hlen[plane]; i++) {
275  values[VAR_X] = i;
276  for (j = 0; j < s->rdft_vlen[plane]; j++) {
277  values[VAR_Y] = j;
278  s->weight[plane][i * s->rdft_vlen[plane] + j] =
279  av_expr_eval(s->weight_expr[plane], values, s);
280  }
281  }
282 }
283 
285 {
286  FFTFILTContext *s = inlink->dst->priv;
287  const AVPixFmtDescriptor *desc;
288  int i, plane;
289 
290  desc = av_pix_fmt_desc_get(inlink->format);
291  s->depth = desc->comp[0].depth;
292  s->planewidth[1] = s->planewidth[2] = AV_CEIL_RSHIFT(inlink->w, desc->log2_chroma_w);
293  s->planewidth[0] = s->planewidth[3] = inlink->w;
294  s->planeheight[1] = s->planeheight[2] = AV_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
295  s->planeheight[0] = s->planeheight[3] = inlink->h;
296 
297  s->nb_planes = av_pix_fmt_count_planes(inlink->format);
298  s->nb_threads = FFMIN(32, ff_filter_get_nb_threads(inlink->dst));
299 
300  for (i = 0; i < desc->nb_components; i++) {
301  int w = s->planewidth[i];
302  int h = s->planeheight[i];
303 
304  /* RDFT - Array initialization for Horizontal pass*/
305  s->rdft_hlen[i] = 1 << (32 - ff_clz(w));
306  s->rdft_hbits[i] = av_log2(s->rdft_hlen[i]);
307  if (!(s->rdft_hdata[i] = av_malloc_array(h, s->rdft_hlen[i] * sizeof(FFTSample))))
308  return AVERROR(ENOMEM);
309 
310  for (int j = 0; j < s->nb_threads; j++) {
311  if (!(s->hrdft[j][i] = av_rdft_init(s->rdft_hbits[i], DFT_R2C)))
312  return AVERROR(ENOMEM);
313  if (!(s->ihrdft[j][i] = av_rdft_init(s->rdft_hbits[i], IDFT_C2R)))
314  return AVERROR(ENOMEM);
315  }
316 
317  /* RDFT - Array initialization for Vertical pass*/
318  s->rdft_vlen[i] = 1 << (32 - ff_clz(h));
319  s->rdft_vbits[i] = av_log2(s->rdft_vlen[i]);
320  if (!(s->rdft_vdata[i] = av_malloc_array(s->rdft_hlen[i], s->rdft_vlen[i] * sizeof(FFTSample))))
321  return AVERROR(ENOMEM);
322 
323  for (int j = 0; j < s->nb_threads; j++) {
324  if (!(s->vrdft[j][i] = av_rdft_init(s->rdft_vbits[i], DFT_R2C)))
325  return AVERROR(ENOMEM);
326  if (!(s->ivrdft[j][i] = av_rdft_init(s->rdft_vbits[i], IDFT_C2R)))
327  return AVERROR(ENOMEM);
328  }
329  }
330 
331  /*Luminance value - Array initialization*/
332  for (plane = 0; plane < 3; plane++) {
333  if(!(s->weight[plane] = av_malloc_array(s->rdft_hlen[plane], s->rdft_vlen[plane] * sizeof(double))))
334  return AVERROR(ENOMEM);
335 
336  if (s->eval_mode == EVAL_MODE_INIT)
337  do_eval(s, inlink, plane);
338  }
339 
340  if (s->depth <= 8) {
341  s->rdft_horizontal = rdft_horizontal8;
342  s->irdft_horizontal = irdft_horizontal8;
343  } else if (s->depth > 8) {
344  s->rdft_horizontal = rdft_horizontal16;
345  s->irdft_horizontal = irdft_horizontal16;
346  } else {
347  return AVERROR_BUG;
348  }
349  return 0;
350 }
351 
352 static int multiply_data(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
353 {
354  FFTFILTContext *s = ctx->priv;
355 
356  for (int plane = 0; plane < s->nb_planes; plane++) {
357  const int height = s->rdft_hlen[plane];
358  const int slice_start = (height * jobnr) / nb_jobs;
359  const int slice_end = (height * (jobnr+1)) / nb_jobs;
360  /*Change user defined parameters*/
361  for (int i = slice_start; i < slice_end; i++) {
362  const double *weight = s->weight[plane] + i * s->rdft_vlen[plane];
363  float *vdata = s->rdft_vdata[plane] + i * s->rdft_vlen[plane];
364 
365  for (int j = 0; j < s->rdft_vlen[plane]; j++)
366  vdata[j] *= weight[j];
367  }
368  }
369 
370  return 0;
371 }
372 
373 static int copy_vertical(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
374 {
375  FFTFILTContext *s = ctx->priv;
376 
377  for (int plane = 0; plane < s->nb_planes; plane++) {
378  const int hlen = s->rdft_hlen[plane];
379  const int vlen = s->rdft_vlen[plane];
380  const int slice_start = (hlen * jobnr) / nb_jobs;
381  const int slice_end = (hlen * (jobnr+1)) / nb_jobs;
382  const int h = s->planeheight[plane];
383  FFTSample *hdata = s->rdft_hdata[plane];
384  FFTSample *vdata = s->rdft_vdata[plane];
385 
386  for (int i = slice_start; i < slice_end; i++) {
387  for (int j = 0; j < h; j++)
388  vdata[i * vlen + j] = hdata[j * hlen + i];
389  copy_rev(vdata + i * vlen, h, vlen);
390  }
391  }
392 
393  return 0;
394 }
395 
396 static int rdft_vertical(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
397 {
398  FFTFILTContext *s = ctx->priv;
399 
400  for (int plane = 0; plane < s->nb_planes; plane++) {
401  const int height = s->rdft_hlen[plane];
402  const int slice_start = (height * jobnr) / nb_jobs;
403  const int slice_end = (height * (jobnr+1)) / nb_jobs;
404 
405  for (int i = slice_start; i < slice_end; i++)
406  av_rdft_calc(s->vrdft[jobnr][plane], s->rdft_vdata[plane] + i * s->rdft_vlen[plane]);
407  }
408 
409  return 0;
410 }
411 
412 static int irdft_vertical(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
413 {
414  FFTFILTContext *s = ctx->priv;
415 
416  for (int plane = 0; plane < s->nb_planes; plane++) {
417  const int height = s->rdft_hlen[plane];
418  const int slice_start = (height * jobnr) / nb_jobs;
419  const int slice_end = (height * (jobnr+1)) / nb_jobs;
420 
421  for (int i = slice_start; i < slice_end; i++)
422  av_rdft_calc(s->ivrdft[jobnr][plane], s->rdft_vdata[plane] + i * s->rdft_vlen[plane]);
423  }
424 
425  return 0;
426 }
427 
428 static int copy_horizontal(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
429 {
430  FFTFILTContext *s = ctx->priv;
431 
432  for (int plane = 0; plane < s->nb_planes; plane++) {
433  const int hlen = s->rdft_hlen[plane];
434  const int vlen = s->rdft_vlen[plane];
435  const int slice_start = (hlen * jobnr) / nb_jobs;
436  const int slice_end = (hlen * (jobnr+1)) / nb_jobs;
437  const int h = s->planeheight[plane];
438  FFTSample *hdata = s->rdft_hdata[plane];
439  FFTSample *vdata = s->rdft_vdata[plane];
440 
441  for (int i = slice_start; i < slice_end; i++)
442  for (int j = 0; j < h; j++)
443  hdata[j * hlen + i] = vdata[i * vlen + j];
444  }
445 
446  return 0;
447 }
448 
450 {
451  AVFilterContext *ctx = inlink->dst;
452  AVFilterLink *outlink = inlink->dst->outputs[0];
453  FFTFILTContext *s = ctx->priv;
454  AVFrame *out;
455 
456  out = ff_get_video_buffer(outlink, inlink->w, inlink->h);
457  if (!out) {
458  av_frame_free(&in);
459  return AVERROR(ENOMEM);
460  }
461 
463 
464  for (int plane = 0; plane < s->nb_planes; plane++) {
465  if (s->eval_mode == EVAL_MODE_FRAME)
466  do_eval(s, inlink, plane);
467  }
468 
469  ff_filter_execute(ctx, s->rdft_horizontal, in, NULL,
470  FFMIN(s->planeheight[1], s->nb_threads));
471 
473  FFMIN(s->planeheight[1], s->nb_threads));
474 
476  FFMIN(s->planeheight[1], s->nb_threads));
477 
479  FFMIN(s->planeheight[1], s->nb_threads));
480 
481  for (int plane = 0; plane < s->nb_planes; plane++)
482  s->rdft_vdata[plane][0] += s->rdft_hlen[plane] * s->rdft_vlen[plane] * s->dc[plane];
483 
485  FFMIN(s->planeheight[1], s->nb_threads));
486 
488  FFMIN(s->planeheight[1], s->nb_threads));
489 
490  ff_filter_execute(ctx, s->irdft_horizontal, out, NULL,
491  FFMIN(s->planeheight[1], s->nb_threads));
492 
493  av_frame_free(&in);
494  return ff_filter_frame(outlink, out);
495 }
496 
498 {
499  FFTFILTContext *s = ctx->priv;
500  int i;
501  for (i = 0; i < MAX_PLANES; i++) {
502  av_free(s->rdft_hdata[i]);
503  av_free(s->rdft_vdata[i]);
504  av_expr_free(s->weight_expr[i]);
505  av_free(s->weight[i]);
506  for (int j = 0; j < s->nb_threads; j++) {
507  av_rdft_end(s->hrdft[j][i]);
508  av_rdft_end(s->ihrdft[j][i]);
509  av_rdft_end(s->vrdft[j][i]);
510  av_rdft_end(s->ivrdft[j][i]);
511  }
512  }
513 }
514 
515 static const enum AVPixelFormat pixel_fmts_fftfilt[] = {
532 };
533 
534 static const AVFilterPad fftfilt_inputs[] = {
535  {
536  .name = "default",
537  .type = AVMEDIA_TYPE_VIDEO,
538  .config_props = config_props,
539  .filter_frame = filter_frame,
540  },
541 };
542 
543 static const AVFilterPad fftfilt_outputs[] = {
544  {
545  .name = "default",
546  .type = AVMEDIA_TYPE_VIDEO,
547  },
548 };
549 
551  .name = "fftfilt",
552  .description = NULL_IF_CONFIG_SMALL("Apply arbitrary expressions to pixels in frequency domain."),
553  .priv_size = sizeof(FFTFILTContext),
554  .priv_class = &fftfilt_class,
558  .init = initialize,
559  .uninit = uninit,
561 };
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:98
AVPixelFormat
AVPixelFormat
Pixel format.
Definition: pixfmt.h:64
av_clip
#define av_clip
Definition: common.h:96
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
rdft_horizontal8
static int rdft_horizontal8(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
Definition: vf_fftfilt.c:118
fftfilt_outputs
static const AVFilterPad fftfilt_outputs[]
Definition: vf_fftfilt.c:543
rdft_vertical
static int rdft_vertical(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
Definition: vf_fftfilt.c:396
out
FILE * out
Definition: movenc.c:54
U
@ U
Definition: vf_fftfilt.c:77
ff_filter_frame
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
Definition: avfilter.c:1018
av_pix_fmt_desc_get
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
Definition: pixdesc.c:2660
config_props
static int config_props(AVFilterLink *inlink)
Definition: vf_fftfilt.c:284
irdft_vertical
static int irdft_vertical(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
Definition: vf_fftfilt.c:412
FILTER_PIXFMTS_ARRAY
#define FILTER_PIXFMTS_ARRAY(array)
Definition: internal.h:171
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
ff_clz
#define ff_clz
Definition: intmath.h:142
av_frame_free
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
Definition: frame.c:109
AVFrame
This structure describes decoded (raw) audio or video data.
Definition: frame.h:317
pixdesc.h
w
uint8_t w
Definition: llviddspenc.c:38
FFTFILTContext::rdft_vbits
int rdft_vbits[MAX_PLANES]
Definition: vf_fftfilt.c:59
AVOption
AVOption.
Definition: opt.h:247
VAR_H
@ VAR_H
Definition: vf_fftfilt.c:75
AV_PIX_FMT_YUV420P10
#define AV_PIX_FMT_YUV420P10
Definition: pixfmt.h:404
irdft_horizontal16
static int irdft_horizontal16(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
Definition: vf_fftfilt.c:201
max
#define max(a, b)
Definition: cuda_runtime.h:33
AVFilter::name
const char * name
Filter name.
Definition: avfilter.h:169
FFTFILTContext::rdft_vdata
FFTSample * rdft_vdata[MAX_PLANES]
Definition: vf_fftfilt.c:63
func2_names
static const char *const func2_names[]
Definition: af_afftfilt.c:101
AV_PIX_FMT_GRAY9
#define AV_PIX_FMT_GRAY9
Definition: pixfmt.h:384
AVFrame::data
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
Definition: frame.h:338
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_fftfilt.c:497
FFTFILTContext::irdft_horizontal
int(* irdft_horizontal)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
Definition: vf_fftfilt.c:71
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
av_pix_fmt_count_planes
int av_pix_fmt_count_planes(enum AVPixelFormat pix_fmt)
Definition: pixdesc.c:2700
FFTFILTContext::nb_threads
int nb_threads
Definition: vf_fftfilt.c:50
EVAL_MODE_FRAME
@ EVAL_MODE_FRAME
Definition: vf_fftfilt.c:40
VAR_VARS_NB
@ VAR_VARS_NB
Definition: vf_fftfilt.c:75
do_eval
static void do_eval(FFTFILTContext *s, AVFilterLink *inlink, int plane)
Definition: vf_fftfilt.c:263
FFTFILTContext::rdft_hdata
FFTSample * rdft_hdata[MAX_PLANES]
Definition: vf_fftfilt.c:62
FFTFILTContext::hrdft
RDFTContext * hrdft[MAX_THREADS][MAX_PLANES]
Definition: vf_fftfilt.c:54
AV_PIX_FMT_YUV422P9
#define AV_PIX_FMT_YUV422P9
Definition: pixfmt.h:402
MAX_THREADS
#define MAX_THREADS
Definition: vf_fftfilt.c:35
IDFT_C2R
@ IDFT_C2R
Definition: avfft.h:73
scale
static av_always_inline float scale(float x, float s)
Definition: vf_v360.c:1388
AV_PIX_FMT_GRAY16
#define AV_PIX_FMT_GRAY16
Definition: pixfmt.h:388
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:50
FFTFILTContext::planewidth
int planewidth[MAX_PLANES]
Definition: vf_fftfilt.c:51
FFTFILTContext::ivrdft
RDFTContext * ivrdft[MAX_THREADS][MAX_PLANES]
Definition: vf_fftfilt.c:57
FFTFILTContext::eval_mode
int eval_mode
Definition: vf_fftfilt.c:47
AV_PIX_FMT_YUV444P10
#define AV_PIX_FMT_YUV444P10
Definition: pixfmt.h:407
func2
static double(*const func2[])(void *, double, double)
Definition: af_afftfilt.c:102
av_cold
#define av_cold
Definition: attributes.h:90
AV_PIX_FMT_YUV422P16
#define AV_PIX_FMT_YUV422P16
Definition: pixfmt.h:416
FFTFILTContext::rdft_horizontal
int(* rdft_horizontal)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
Definition: vf_fftfilt.c:70
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
s
#define s(width, name)
Definition: cbs_vp9.c:257
FFTFILTContext::vrdft
RDFTContext * vrdft[MAX_THREADS][MAX_PLANES]
Definition: vf_fftfilt.c:55
AV_PIX_FMT_YUV444P16
#define AV_PIX_FMT_YUV444P16
Definition: pixfmt.h:417
AV_CEIL_RSHIFT
#define AV_CEIL_RSHIFT(a, b)
Definition: common.h:51
FFTFILTContext::rdft_vlen
size_t rdft_vlen[MAX_PLANES]
Definition: vf_fftfilt.c:61
FFTFILTContext::dc
int dc[MAX_PLANES]
Definition: vf_fftfilt.c:65
slice_end
static int slice_end(AVCodecContext *avctx, AVFrame *pict)
Handle slice ends.
Definition: mpeg12dec.c:2042
AV_PIX_FMT_YUV420P9
#define AV_PIX_FMT_YUV420P9
Definition: pixfmt.h:401
AV_PIX_FMT_YUV420P16
#define AV_PIX_FMT_YUV420P16
Definition: pixfmt.h:415
ctx
AVFormatContext * ctx
Definition: movenc.c:48
av_expr_eval
double av_expr_eval(AVExpr *e, const double *const_values, void *opaque)
Evaluate a previously parsed expression.
Definition: eval.c:766
MAX_PLANES
#define MAX_PLANES
Definition: vf_fftfilt.c:36
OFFSET
#define OFFSET(x)
Definition: vf_fftfilt.c:79
AV_PIX_FMT_GRAY14
#define AV_PIX_FMT_GRAY14
Definition: pixfmt.h:387
FFTFILTContext::depth
int depth
Definition: vf_fftfilt.c:48
AVExpr
Definition: eval.c:157
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
ff_vf_fftfilt
const AVFilter ff_vf_fftfilt
Definition: vf_fftfilt.c:550
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: internal.h:191
VAR_N
@ VAR_N
Definition: vf_fftfilt.c:75
av_rdft_calc
void av_rdft_calc(RDFTContext *s, FFTSample *data)
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:385
irdft_horizontal8
static int irdft_horizontal8(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
Definition: vf_fftfilt.c:174
AVClass
Describe the class of an AVClass context structure.
Definition: log.h:66
NULL
#define NULL
Definition: coverity.c:32
FFTFILTContext::planeheight
int planeheight[MAX_PLANES]
Definition: vf_fftfilt.c:52
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:537
FFTFILTContext::rdft_hlen
size_t rdft_hlen[MAX_PLANES]
Definition: vf_fftfilt.c:60
VAR_WS
@ VAR_WS
Definition: vf_fftfilt.c:75
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
copy_horizontal
static int copy_horizontal(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
Definition: vf_fftfilt.c:428
src
#define src
Definition: vp8dsp.c:255
DFT_R2C
@ DFT_R2C
Definition: avfft.h:72
FFTSample
float FFTSample
Definition: avfft.h:35
avfft.h
AV_PIX_FMT_YUV422P10
#define AV_PIX_FMT_YUV422P10
Definition: pixfmt.h:405
AV_PIX_FMT_GRAY8
@ AV_PIX_FMT_GRAY8
Y , 8bpp.
Definition: pixfmt.h:74
initialize
static av_cold int initialize(AVFilterContext *ctx)
Definition: vf_fftfilt.c:229
fftfilt_options
static const AVOption fftfilt_options[]
Definition: vf_fftfilt.c:82
weight
static int weight(int i, int blen, int offset)
Definition: diracdec.c:1561
eval.h
FFTFILTContext::weight_str
char * weight_str[MAX_PLANES]
Definition: vf_fftfilt.c:66
dc
Tag MUST be and< 10hcoeff half pel interpolation filter coefficients, hcoeff[0] are the 2 middle coefficients[1] are the next outer ones and so on, resulting in a filter like:...eff[2], hcoeff[1], hcoeff[0], hcoeff[0], hcoeff[1], hcoeff[2] ... the sign of the coefficients is not explicitly stored but alternates after each coeff and coeff[0] is positive, so ...,+,-,+,-,+,+,-,+,-,+,... hcoeff[0] is not explicitly stored but found by subtracting the sum of all stored coefficients with signs from 32 hcoeff[0]=32 - hcoeff[1] - hcoeff[2] - ... a good choice for hcoeff and htaps is htaps=6 hcoeff={40,-10, 2} an alternative which requires more computations at both encoder and decoder side and may or may not be better is htaps=8 hcoeff={42,-14, 6,-2}ref_frames minimum of the number of available reference frames and max_ref_frames for example the first frame after a key frame always has ref_frames=1spatial_decomposition_type wavelet type 0 is a 9/7 symmetric compact integer wavelet 1 is a 5/3 symmetric compact integer wavelet others are reserved stored as delta from last, last is reset to 0 if always_reset||keyframeqlog quality(logarithmic quantizer scale) stored as delta from last, last is reset to 0 if always_reset||keyframemv_scale stored as delta from last, last is reset to 0 if always_reset||keyframe FIXME check that everything works fine if this changes between framesqbias dequantization bias stored as delta from last, last is reset to 0 if always_reset||keyframeblock_max_depth maximum depth of the block tree stored as delta from last, last is reset to 0 if always_reset||keyframequant_table quantization tableHighlevel bitstream structure:==============================--------------------------------------------|Header|--------------------------------------------|------------------------------------|||Block0||||split?||||yes no||||......... intra?||||:Block01 :yes no||||:Block02 :....... ..........||||:Block03 ::y DC ::ref index:||||:Block04 ::cb DC ::motion x :||||......... :cr DC ::motion y :||||....... ..........|||------------------------------------||------------------------------------|||Block1|||...|--------------------------------------------|------------ ------------ ------------|||Y subbands||Cb subbands||Cr subbands||||--- ---||--- ---||--- ---|||||LL0||HL0||||LL0||HL0||||LL0||HL0|||||--- ---||--- ---||--- ---||||--- ---||--- ---||--- ---|||||LH0||HH0||||LH0||HH0||||LH0||HH0|||||--- ---||--- ---||--- ---||||--- ---||--- ---||--- ---|||||HL1||LH1||||HL1||LH1||||HL1||LH1|||||--- ---||--- ---||--- ---||||--- ---||--- ---||--- ---|||||HH1||HL2||||HH1||HL2||||HH1||HL2|||||...||...||...|||------------ ------------ ------------|--------------------------------------------Decoding process:=================------------|||Subbands|------------||||------------|Intra DC||||LL0 subband prediction ------------|\ Dequantization ------------------- \||Reference frames|\ IDWT|------- -------|Motion \|||Frame 0||Frame 1||Compensation . OBMC v -------|------- -------|--------------. \------> Frame n output Frame Frame<----------------------------------/|...|------------------- Range Coder:============Binary Range Coder:------------------- The implemented range coder is an adapted version based upon "Range encoding: an algorithm for removing redundancy from a digitised message." by G. N. N. Martin. The symbols encoded by the Snow range coder are bits(0|1). The associated probabilities are not fix but change depending on the symbol mix seen so far. bit seen|new state ---------+----------------------------------------------- 0|256 - state_transition_table[256 - old_state];1|state_transition_table[old_state];state_transition_table={ 0, 0, 0, 0, 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 190, 191, 192, 194, 194, 195, 196, 197, 198, 199, 200, 201, 202, 202, 204, 205, 206, 207, 208, 209, 209, 210, 211, 212, 213, 215, 215, 216, 217, 218, 219, 220, 220, 222, 223, 224, 225, 226, 227, 227, 229, 229, 230, 231, 232, 234, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 248, 0, 0, 0, 0, 0, 0, 0};FIXME Range Coding of integers:------------------------- FIXME Neighboring Blocks:===================left and top are set to the respective blocks unless they are outside of the image in which case they are set to the Null block top-left is set to the top left block unless it is outside of the image in which case it is set to the left block if this block has no larger parent block or it is at the left side of its parent block and the top right block is not outside of the image then the top right block is used for top-right else the top-left block is used Null block y, cb, cr are 128 level, ref, mx and my are 0 Motion Vector Prediction:=========================1. the motion vectors of all the neighboring blocks are scaled to compensate for the difference of reference frames scaled_mv=(mv *(256 *(current_reference+1)/(mv.reference+1))+128)> the median of the scaled top and top right vectors is used as motion vector prediction the used motion vector is the sum of the predictor and(mvx_diff, mvy_diff) *mv_scale Intra DC Prediction block[y][x] dc[1]
Definition: snow.txt:400
av_rdft_init
RDFTContext * av_rdft_init(int nbits, enum RDFTransformType trans)
Set up a real FFT.
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
FFTFILTContext
Definition: vf_fftfilt.c:44
FFTFILTContext::ihrdft
RDFTContext * ihrdft[MAX_THREADS][MAX_PLANES]
Definition: vf_fftfilt.c:56
AV_PIX_FMT_YUV422P12
#define AV_PIX_FMT_YUV422P12
Definition: pixfmt.h:409
AV_PIX_FMT_YUV444P12
#define AV_PIX_FMT_YUV444P12
Definition: pixfmt.h:411
VAR_Y
@ VAR_Y
Definition: vf_fftfilt.c:75
height
#define height
copy_vertical
static int copy_vertical(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
Definition: vf_fftfilt.c:373
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:146
lrintf
#define lrintf(x)
Definition: libm_mips.h:72
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:271
FFTFILTContext::rdft_hbits
int rdft_hbits[MAX_PLANES]
Definition: vf_fftfilt.c:58
av_malloc_array
#define av_malloc_array(a, b)
Definition: tableprint_vlc.h:32
RDFTContext
Definition: rdft.h:28
common.h
ff_filter_get_nb_threads
int ff_filter_get_nb_threads(AVFilterContext *ctx)
Get number of threads for current filter instance.
Definition: avfilter.c:803
EvalMode
EvalMode
Definition: af_volume.h:39
FFMIN
#define FFMIN(a, b)
Definition: macros.h:49
VAR_W
@ VAR_W
Definition: vf_fftfilt.c:75
AVFILTER_DEFINE_CLASS
AVFILTER_DEFINE_CLASS(fftfilt)
AVFilterPad::name
const char * name
Pad name.
Definition: internal.h:56
var_names
static const char *const var_names[]
Definition: vf_fftfilt.c:74
FFTFILTContext::weight_expr
AVExpr * weight_expr[MAX_PLANES]
Definition: vf_fftfilt.c:67
Y
@ Y
Definition: vf_fftfilt.c:77
AV_PIX_FMT_YUV444P9
#define AV_PIX_FMT_YUV444P9
Definition: pixfmt.h:403
weight_U
static double weight_U(void *priv, double x, double y)
Definition: vf_fftfilt.c:104
AVFilter
Filter definition.
Definition: avfilter.h:165
FFTFILTContext::weight
double * weight[MAX_PLANES]
Definition: vf_fftfilt.c:68
ret
ret
Definition: filter_design.txt:187
fftfilt_inputs
static const AVFilterPad fftfilt_inputs[]
Definition: vf_fftfilt.c:534
V
@ V
Definition: vf_fftfilt.c:77
AV_PIX_FMT_YUV420P12
#define AV_PIX_FMT_YUV420P12
Definition: pixfmt.h:408
AV_PIX_FMT_YUV422P14
#define AV_PIX_FMT_YUV422P14
Definition: pixfmt.h:413
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: vf_fftfilt.c:449
AV_PIX_FMT_NONE
@ AV_PIX_FMT_NONE
Definition: pixfmt.h:65
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:224
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
rdft_horizontal16
static int rdft_horizontal16(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
Definition: vf_fftfilt.c:146
pixel_fmts_fftfilt
static enum AVPixelFormat pixel_fmts_fftfilt[]
Definition: vf_fftfilt.c:515
av_clip_uint8
#define av_clip_uint8
Definition: common.h:102
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:402
weight_V
static double weight_V(void *priv, double x, double y)
Definition: vf_fftfilt.c:105
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:121
av_strdup
char * av_strdup(const char *s)
Duplicate a string.
Definition: mem.c:279
desc
const char * desc
Definition: libsvtav1.c:79
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
copy_rev
static void copy_rev(FFTSample *dest, int w, int w2)
Definition: vf_fftfilt.c:107
AVPixFmtDescriptor
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
Definition: pixdesc.h:69
EVAL_MODE_INIT
@ EVAL_MODE_INIT
Definition: vf_fftfilt.c:39
av_free
#define av_free(p)
Definition: tableprint_vlc.h:34
lum
static double lum(void *priv, double x, double y, int plane)
Definition: vf_fftfilt.c:97
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: internal.h:192
imgutils.h
AVERROR_BUG
#define AVERROR_BUG
Internal bug, also see AVERROR_BUG2.
Definition: error.h:52
av_rdft_end
void av_rdft_end(RDFTContext *s)
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:362
weight_Y
static double weight_Y(void *priv, double x, double y)
Definition: vf_fftfilt.c:103
h
h
Definition: vp9dsp_template.c:2038
AV_PIX_FMT_YUV444P14
#define AV_PIX_FMT_YUV444P14
Definition: pixfmt.h:414
AV_OPT_TYPE_STRING
@ AV_OPT_TYPE_STRING
Definition: opt.h:228
FLAGS
#define FLAGS
Definition: vf_fftfilt.c:80
EVAL_MODE_NB
@ EVAL_MODE_NB
Definition: vf_fftfilt.c:41
AV_PIX_FMT_GRAY12
#define AV_PIX_FMT_GRAY12
Definition: pixfmt.h:386
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:143
FFTFILTContext::nb_planes
int nb_planes
Definition: vf_fftfilt.c:49
int
int
Definition: ffmpeg_filter.c:153
AV_OPT_TYPE_CONST
@ AV_OPT_TYPE_CONST
Definition: opt.h:233
av_log2
int av_log2(unsigned v)
Definition: intmath.c:26
VAR_X
@ VAR_X
Definition: vf_fftfilt.c:75
AV_PIX_FMT_YUV420P14
#define AV_PIX_FMT_YUV420P14
Definition: pixfmt.h:412
multiply_data
static int multiply_data(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
Definition: vf_fftfilt.c:352
VAR_HS
@ VAR_HS
Definition: vf_fftfilt.c:75