vf_lut.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2011 Stefano Sabatini
3  *
4  * This file is part of Libav.
5  *
6  * Libav 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  * Libav 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 Libav; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
27 #include "libavutil/common.h"
28 #include "libavutil/eval.h"
29 #include "libavutil/mathematics.h"
30 #include "libavutil/opt.h"
31 #include "libavutil/pixdesc.h"
32 #include "avfilter.h"
33 #include "formats.h"
34 #include "internal.h"
35 #include "video.h"
36 
37 static const char *const var_names[] = {
38  "E",
39  "PHI",
40  "PI",
41  "w",
42  "h",
43  "val",
44  "maxval",
45  "minval",
46  "negval",
47  "clipval",
48  NULL
49 };
50 
51 enum var_name {
63 };
64 
65 typedef struct {
66  const AVClass *class;
67  uint8_t lut[4][256];
68  char *comp_expr_str[4];
69  AVExpr *comp_expr[4];
70  int hsub, vsub;
71  double var_values[VAR_VARS_NB];
72  int is_rgb, is_yuv;
73  int rgba_map[4];
74  int step;
75  int negate_alpha; /* only used by negate */
76 } LutContext;
77 
78 #define Y 0
79 #define U 1
80 #define V 2
81 #define R 0
82 #define G 1
83 #define B 2
84 #define A 3
85 
86 #define OFFSET(x) offsetof(LutContext, x)
87 
88 static const AVOption lut_options[] = {
89  {"c0", "set component #0 expression", OFFSET(comp_expr_str[0]), AV_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
90  {"c1", "set component #1 expression", OFFSET(comp_expr_str[1]), AV_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
91  {"c2", "set component #2 expression", OFFSET(comp_expr_str[2]), AV_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
92  {"c3", "set component #3 expression", OFFSET(comp_expr_str[3]), AV_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
93  {"y", "set Y expression", OFFSET(comp_expr_str[Y]), AV_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
94  {"u", "set U expression", OFFSET(comp_expr_str[U]), AV_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
95  {"v", "set V expression", OFFSET(comp_expr_str[V]), AV_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
96  {"r", "set R expression", OFFSET(comp_expr_str[R]), AV_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
97  {"g", "set G expression", OFFSET(comp_expr_str[G]), AV_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
98  {"b", "set B expression", OFFSET(comp_expr_str[B]), AV_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
99  {"a", "set A expression", OFFSET(comp_expr_str[A]), AV_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
100  {NULL},
101 };
102 
103 static const char *lut_get_name(void *ctx)
104 {
105  return "lut";
106 }
107 
108 static const AVClass lut_class = {
109  "LutContext",
110  lut_get_name,
111  lut_options
112 };
113 
114 static int init(AVFilterContext *ctx, const char *args)
115 {
116  LutContext *lut = ctx->priv;
117  int ret;
118 
119  lut->class = &lut_class;
120  av_opt_set_defaults(lut);
121 
122  lut->var_values[VAR_PHI] = M_PHI;
123  lut->var_values[VAR_PI] = M_PI;
124  lut->var_values[VAR_E ] = M_E;
125 
126  lut->is_rgb = !strcmp(ctx->filter->name, "lutrgb");
127  lut->is_yuv = !strcmp(ctx->filter->name, "lutyuv");
128  if (args && (ret = av_set_options_string(lut, args, "=", ":")) < 0)
129  return ret;
130 
131  return 0;
132 }
133 
134 static av_cold void uninit(AVFilterContext *ctx)
135 {
136  LutContext *lut = ctx->priv;
137  int i;
138 
139  for (i = 0; i < 4; i++) {
140  av_expr_free(lut->comp_expr[i]);
141  lut->comp_expr[i] = NULL;
142  av_freep(&lut->comp_expr_str[i]);
143  }
144 }
145 
146 #define YUV_FORMATS \
147  AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV420P, \
148  AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV440P, \
149  AV_PIX_FMT_YUVA420P, \
150  AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUVJ420P, \
151  AV_PIX_FMT_YUVJ440P
152 
153 #define RGB_FORMATS \
154  AV_PIX_FMT_ARGB, AV_PIX_FMT_RGBA, \
155  AV_PIX_FMT_ABGR, AV_PIX_FMT_BGRA, \
156  AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24
157 
161 
163 {
164  LutContext *lut = ctx->priv;
165 
166  enum AVPixelFormat *pix_fmts = lut->is_rgb ? rgb_pix_fmts :
168 
170  return 0;
171 }
172 
176 static double clip(void *opaque, double val)
177 {
178  LutContext *lut = opaque;
179  double minval = lut->var_values[VAR_MINVAL];
180  double maxval = lut->var_values[VAR_MAXVAL];
181 
182  return av_clip(val, minval, maxval);
183 }
184 
189 static double compute_gammaval(void *opaque, double gamma)
190 {
191  LutContext *lut = opaque;
192  double val = lut->var_values[VAR_CLIPVAL];
193  double minval = lut->var_values[VAR_MINVAL];
194  double maxval = lut->var_values[VAR_MAXVAL];
195 
196  return pow((val-minval)/(maxval-minval), gamma) * (maxval-minval)+minval;
197 }
198 
199 static double (* const funcs1[])(void *, double) = {
200  clip,
202  NULL
203 };
204 
205 static const char * const funcs1_names[] = {
206  "clip",
207  "gammaval",
208  NULL
209 };
210 
211 static int config_props(AVFilterLink *inlink)
212 {
213  AVFilterContext *ctx = inlink->dst;
214  LutContext *lut = ctx->priv;
215  const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format);
216  int min[4], max[4];
217  int val, comp, ret;
218 
219  lut->hsub = desc->log2_chroma_w;
220  lut->vsub = desc->log2_chroma_h;
221 
222  lut->var_values[VAR_W] = inlink->w;
223  lut->var_values[VAR_H] = inlink->h;
224 
225  switch (inlink->format) {
226  case AV_PIX_FMT_YUV410P:
227  case AV_PIX_FMT_YUV411P:
228  case AV_PIX_FMT_YUV420P:
229  case AV_PIX_FMT_YUV422P:
230  case AV_PIX_FMT_YUV440P:
231  case AV_PIX_FMT_YUV444P:
232  case AV_PIX_FMT_YUVA420P:
233  min[Y] = min[U] = min[V] = 16;
234  max[Y] = 235;
235  max[U] = max[V] = 240;
236  min[A] = 0; max[A] = 255;
237  break;
238  default:
239  min[0] = min[1] = min[2] = min[3] = 0;
240  max[0] = max[1] = max[2] = max[3] = 255;
241  }
242 
243  lut->is_yuv = lut->is_rgb = 0;
244  if (ff_fmt_is_in(inlink->format, yuv_pix_fmts)) lut->is_yuv = 1;
245  else if (ff_fmt_is_in(inlink->format, rgb_pix_fmts)) lut->is_rgb = 1;
246 
247  if (lut->is_rgb) {
248  switch (inlink->format) {
249  case AV_PIX_FMT_ARGB: lut->rgba_map[A] = 0; lut->rgba_map[R] = 1; lut->rgba_map[G] = 2; lut->rgba_map[B] = 3; break;
250  case AV_PIX_FMT_ABGR: lut->rgba_map[A] = 0; lut->rgba_map[B] = 1; lut->rgba_map[G] = 2; lut->rgba_map[R] = 3; break;
251  case AV_PIX_FMT_RGBA:
252  case AV_PIX_FMT_RGB24: lut->rgba_map[R] = 0; lut->rgba_map[G] = 1; lut->rgba_map[B] = 2; lut->rgba_map[A] = 3; break;
253  case AV_PIX_FMT_BGRA:
254  case AV_PIX_FMT_BGR24: lut->rgba_map[B] = 0; lut->rgba_map[G] = 1; lut->rgba_map[R] = 2; lut->rgba_map[A] = 3; break;
255  }
256  lut->step = av_get_bits_per_pixel(desc) >> 3;
257  }
258 
259  for (comp = 0; comp < desc->nb_components; comp++) {
260  double res;
261 
262  /* create the parsed expression */
263  ret = av_expr_parse(&lut->comp_expr[comp], lut->comp_expr_str[comp],
264  var_names, funcs1_names, funcs1, NULL, NULL, 0, ctx);
265  if (ret < 0) {
266  av_log(ctx, AV_LOG_ERROR,
267  "Error when parsing the expression '%s' for the component %d.\n",
268  lut->comp_expr_str[comp], comp);
269  return AVERROR(EINVAL);
270  }
271 
272  /* compute the lut */
273  lut->var_values[VAR_MAXVAL] = max[comp];
274  lut->var_values[VAR_MINVAL] = min[comp];
275 
276  for (val = 0; val < 256; val++) {
277  lut->var_values[VAR_VAL] = val;
278  lut->var_values[VAR_CLIPVAL] = av_clip(val, min[comp], max[comp]);
279  lut->var_values[VAR_NEGVAL] =
280  av_clip(min[comp] + max[comp] - lut->var_values[VAR_VAL],
281  min[comp], max[comp]);
282 
283  res = av_expr_eval(lut->comp_expr[comp], lut->var_values, lut);
284  if (isnan(res)) {
285  av_log(ctx, AV_LOG_ERROR,
286  "Error when evaluating the expression '%s' for the value %d for the component #%d.\n",
287  lut->comp_expr_str[comp], val, comp);
288  return AVERROR(EINVAL);
289  }
290  lut->lut[comp][val] = av_clip((int)res, min[comp], max[comp]);
291  av_log(ctx, AV_LOG_DEBUG, "val[%d][%d] = %d\n", comp, val, lut->lut[comp][val]);
292  }
293  }
294 
295  return 0;
296 }
297 
299 {
300  AVFilterContext *ctx = inlink->dst;
301  LutContext *lut = ctx->priv;
302  AVFilterLink *outlink = ctx->outputs[0];
303  AVFilterBufferRef *out;
304  uint8_t *inrow, *outrow, *inrow0, *outrow0;
305  int i, j, k, plane;
306 
307  out = ff_get_video_buffer(outlink, AV_PERM_WRITE, outlink->w, outlink->h);
308  if (!out) {
310  return AVERROR(ENOMEM);
311  }
313 
314  if (lut->is_rgb) {
315  /* packed */
316  inrow0 = in ->data[0];
317  outrow0 = out->data[0];
318 
319  for (i = 0; i < in->video->h; i ++) {
320  inrow = inrow0;
321  outrow = outrow0;
322  for (j = 0; j < inlink->w; j++) {
323  for (k = 0; k < lut->step; k++)
324  outrow[k] = lut->lut[lut->rgba_map[k]][inrow[k]];
325  outrow += lut->step;
326  inrow += lut->step;
327  }
328  inrow0 += in ->linesize[0];
329  outrow0 += out->linesize[0];
330  }
331  } else {
332  /* planar */
333  for (plane = 0; plane < 4 && in->data[plane]; plane++) {
334  int vsub = plane == 1 || plane == 2 ? lut->vsub : 0;
335  int hsub = plane == 1 || plane == 2 ? lut->hsub : 0;
336 
337  inrow = in ->data[plane];
338  outrow = out->data[plane];
339 
340  for (i = 0; i < in->video->h >> vsub; i ++) {
341  for (j = 0; j < inlink->w>>hsub; j++)
342  outrow[j] = lut->lut[plane][inrow[j]];
343  inrow += in ->linesize[plane];
344  outrow += out->linesize[plane];
345  }
346  }
347  }
348 
350  return ff_filter_frame(outlink, out);
351 }
352 
353 static const AVFilterPad inputs[] = {
354  { .name = "default",
355  .type = AVMEDIA_TYPE_VIDEO,
356  .filter_frame = filter_frame,
357  .config_props = config_props,
358  .min_perms = AV_PERM_READ, },
359  { .name = NULL}
360 };
361 static const AVFilterPad outputs[] = {
362  { .name = "default",
363  .type = AVMEDIA_TYPE_VIDEO, },
364  { .name = NULL}
365 };
366 #define DEFINE_LUT_FILTER(name_, description_, init_) \
367  AVFilter avfilter_vf_##name_ = { \
368  .name = #name_, \
369  .description = NULL_IF_CONFIG_SMALL(description_), \
370  .priv_size = sizeof(LutContext), \
371  \
372  .init = init_, \
373  .uninit = uninit, \
374  .query_formats = query_formats, \
375  \
376  .inputs = inputs, \
377  .outputs = outputs, \
378  }
379 
380 #if CONFIG_LUT_FILTER
381 DEFINE_LUT_FILTER(lut, "Compute and apply a lookup table to the RGB/YUV input video.", init);
382 #endif
383 #if CONFIG_LUTYUV_FILTER
384 DEFINE_LUT_FILTER(lutyuv, "Compute and apply a lookup table to the YUV input video.", init);
385 #endif
386 #if CONFIG_LUTRGB_FILTER
387 DEFINE_LUT_FILTER(lutrgb, "Compute and apply a lookup table to the RGB input video.", init);
388 #endif
389 
390 #if CONFIG_NEGATE_FILTER
391 
392 static int negate_init(AVFilterContext *ctx, const char *args)
393 {
394  LutContext *lut = ctx->priv;
395  char lut_params[64];
396 
397  if (args)
398  sscanf(args, "%d", &lut->negate_alpha);
399 
400  av_log(ctx, AV_LOG_DEBUG, "negate_alpha:%d\n", lut->negate_alpha);
401 
402  snprintf(lut_params, sizeof(lut_params), "c0=negval:c1=negval:c2=negval:a=%s",
403  lut->negate_alpha ? "negval" : "val");
404 
405  return init(ctx, lut_params);
406 }
407 
408 DEFINE_LUT_FILTER(negate, "Negate input video.", negate_init);
409 
410 #endif
char * comp_expr_str[4]
Definition: vf_lut.c:68
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
Definition: pixdesc.c:1435
AVOption.
Definition: opt.h:233
AVFilterBufferRefVideoProps * video
video buffer specific properties
Definition: avfilter.h:159
static const char * lut_get_name(void *ctx)
Definition: vf_lut.c:103
#define G
Definition: vf_lut.c:82
#define A
Definition: vf_lut.c:84
int linesize[8]
number of bytes per line
Definition: avfilter.h:157
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
Definition: pixfmt.h:70
packed RGB 8:8:8, 24bpp, RGBRGB...
Definition: pixfmt.h:67
int av_get_bits_per_pixel(const AVPixFmtDescriptor *pixdesc)
Return the number of bits per pixel used by the pixel format described by pixdesc.
Definition: pixdesc.c:1408
void av_opt_set_defaults(void *s)
Set the values of all AVOption fields to their default values.
Definition: opt.c:505
uint8_t lut[4][256]
lookup table for each component
Definition: vf_lut.c:67
#define RGB_FORMATS
Definition: vf_lut.c:153
int ff_filter_frame(AVFilterLink *link, AVFilterBufferRef *frame)
Send a frame of data to the next filter.
Definition: avfilter.c:459
int av_set_options_string(void *ctx, const char *opts, const char *key_val_sep, const char *pairs_sep)
Parse the key/value pairs list in opts.
Definition: opt.c:587
#define DEFINE_LUT_FILTER(name_, description_, init_)
Definition: vf_lut.c:366
static const char *const funcs1_names[]
Definition: vf_lut.c:205
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:489
uint8_t log2_chroma_w
Amount to shift the luma width right to find the chroma width.
Definition: pixdesc.h:66
static enum AVPixelFormat yuv_pix_fmts[]
Definition: vf_lut.c:158
void av_freep(void *arg)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer ...
Definition: mem.c:151
AVFilterFormats * ff_make_format_list(const int *fmts)
Create a list of supported formats.
Definition: formats.c:165
#define AV_PERM_READ
can read from the buffer
Definition: avfilter.h:97
const char * name
Pad name.
Definition: internal.h:39
static const char *const var_names[]
Definition: vf_lut.c:37
#define R
Definition: vf_lut.c:81
planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
Definition: pixfmt.h:102
uint8_t
AVOptions.
static const AVClass lut_class
Definition: vf_lut.c:108
static av_always_inline av_const int isnan(float x)
Definition: libm.h:85
static double(*const funcs1[])(void *, double)
Definition: vf_lut.c:199
Definition: eval.c:125
void avfilter_unref_bufferp(AVFilterBufferRef **ref)
Remove a reference to a buffer and set the pointer to NULL.
Definition: buffer.c:88
const AVClass * class
Definition: vf_lut.c:66
packed ABGR 8:8:8:8, 32bpp, ABGRABGR...
Definition: pixfmt.h:95
int rgba_map[4]
Definition: vf_lut.c:73
var_name
Definition: vf_boxblur.c:47
void 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:375
int ff_fmt_is_in(int fmt, const int *fmts)
Tell is a format is contained in the provided list terminated by -1.
Definition: formats.c:154
Definition: vf_lut.c:52
A filter pad used for either input or output.
Definition: internal.h:33
#define YUV_FORMATS
Definition: vf_lut.c:146
static enum AVPixelFormat all_pix_fmts[]
Definition: vf_lut.c:160
AVFilterBufferRef * ff_get_video_buffer(AVFilterLink *link, int perms, int w, int h)
Request a picture buffer with a specific set of permissions.
Definition: video.c:145
int h
image height
Definition: avfilter.h:123
uint8_t log2_chroma_h
Amount to shift the luma height right to find the chroma height.
Definition: pixdesc.h:75
Definition: vf_lut.c:53
packed BGRA 8:8:8:8, 32bpp, BGRABGRA...
Definition: pixfmt.h:96
void * priv
private data for use by the filter
Definition: avfilter.h:439
void av_log(void *avcl, int level, const char *fmt,...)
Definition: log.c:146
packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
Definition: pixfmt.h:93
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
Definition: pixfmt.h:94
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
Definition: pixfmt.h:69
double var_values[VAR_VARS_NB]
Definition: vf_lut.c:71
uint8_t nb_components
The number of components each pixel has, (1-4)
Definition: pixdesc.h:57
int hsub
Definition: vf_lut.c:70
#define OFFSET(x)
Definition: vf_lut.c:86
#define M_E
Definition: ratecontrol.c:39
#define U
Definition: vf_lut.c:79
packed RGB 8:8:8, 24bpp, BGRBGR...
Definition: pixfmt.h:68
A reference to an AVFilterBuffer.
Definition: avfilter.h:139
NULL
Definition: eval.c:52
Definition: vf_lut.c:57
int is_rgb
Definition: vf_lut.c:72
void av_expr_free(AVExpr *e)
Free a parsed expression previously created with av_expr_parse().
Definition: eval.c:192
static const AVFilterPad outputs[]
Definition: vf_lut.c:361
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
Definition: pixdesc.h:55
static const AVOption lut_options[]
Definition: vf_lut.c:88
static int query_formats(AVFilterContext *ctx)
Definition: vf_lut.c:162
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
Definition: pixfmt.h:71
Describe the class of an AVClass context structure.
Definition: log.h:33
Definition: vf_lut.c:55
#define M_PHI
Definition: mathematics.h:34
const char * name
filter name
Definition: avfilter.h:372
static int init(AVFilterContext *ctx, const char *args)
Definition: vf_lut.c:114
int step
Definition: vf_lut.c:74
AVExpr * comp_expr[4]
Definition: vf_lut.c:69
AVFilterLink ** outputs
array of pointers to output links
Definition: avfilter.h:433
static enum AVPixelFormat rgb_pix_fmts[]
Definition: vf_lut.c:159
static const AVFilterPad inputs[]
Definition: vf_lut.c:353
static int config_props(AVFilterLink *inlink)
Definition: vf_lut.c:211
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
Definition: pixfmt.h:65
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_lut.c:134
#define V
Definition: vf_lut.c:80
common internal and external API header
static double clip(void *opaque, double val)
Clip value val in the minval - maxval range.
Definition: vf_lut.c:176
void avfilter_copy_buffer_ref_props(AVFilterBufferRef *dst, AVFilterBufferRef *src)
Copy properties of src to dst, without copying the actual data.
Definition: buffer.c:164
#define Y
Definition: vf_lut.c:78
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
Definition: pixfmt.h:72
#define AV_PERM_WRITE
can write to the buffer
Definition: avfilter.h:98
double av_expr_eval(AVExpr *e, const double *const_values, void *opaque)
Evaluate a previously parsed expression.
Definition: eval.c:539
AVFilter * filter
the AVFilter of which this is an instance
Definition: avfilter.h:421
uint8_t * data[8]
picture/audio data for each plane
Definition: avfilter.h:141
int negate_alpha
Definition: vf_lut.c:75
int vsub
Definition: vf_lut.c:70
static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *in)
Definition: vf_lut.c:298
An instance of a filter.
Definition: avfilter.h:418
static double compute_gammaval(void *opaque, double gamma)
Compute gamma correction for value val, assuming the minval-maxval range, val is clipped to a value c...
Definition: vf_lut.c:189
static void comp(unsigned char *dst, int dst_stride, unsigned char *src, int src_stride, int add)
Definition: eamad.c:73
planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
Definition: pixfmt.h:100
Definition: vf_lut.c:54
internal API functions
#define B
Definition: vf_lut.c:83
float min
AVPixelFormat
Pixel format.
Definition: pixfmt.h:63
int is_yuv
Definition: vf_lut.c:72
Definition: vf_lut.c:56
simple arithmetic expression evaluator