Compute a look-up table for binding the input value to the output value, and apply it to input video. More...
#include "libavutil/eval.h"#include "libavutil/mathematics.h"#include "libavutil/opt.h"#include "libavutil/pixdesc.h"#include "avfilter.h"#include "internal.h"Go to the source code of this file.
Compute a look-up table for binding the input value to the output value, and apply it to input video.
Definition in file vf_lut.c.
| #define DEFINE_LUT_FILTER | ( | name_, | ||
| description_, | ||||
| init_ | ||||
| ) |
AVFilter avfilter_vf_##name_ = { \ .name = #name_, \ .description = NULL_IF_CONFIG_SMALL(description_), \ .priv_size = sizeof(LutContext), \ \ .init = init_, \ .uninit = uninit, \ .query_formats = query_formats, \ \ .inputs = (AVFilterPad[]) {{ .name = "default", \ .type = AVMEDIA_TYPE_VIDEO, \ .draw_slice = draw_slice, \ .config_props = config_props, \ .min_perms = AV_PERM_READ, }, \ { .name = NULL}}, \ .outputs = (AVFilterPad[]) {{ .name = "default", \ .type = AVMEDIA_TYPE_VIDEO, }, \ { .name = NULL}}, \ }
| #define OFFSET | ( | x | ) | offsetof(LutContext, x) |
| #define RGB_FORMATS |
PIX_FMT_ARGB, PIX_FMT_RGBA, \
PIX_FMT_ABGR, PIX_FMT_BGRA, \
PIX_FMT_RGB24, PIX_FMT_BGR24
| #define YUV_FORMATS |
PIX_FMT_YUV444P, PIX_FMT_YUV422P, PIX_FMT_YUV420P, \
PIX_FMT_YUV411P, PIX_FMT_YUV410P, PIX_FMT_YUV440P, \
PIX_FMT_YUVA420P, \
PIX_FMT_YUVJ444P, PIX_FMT_YUVJ422P, PIX_FMT_YUVJ420P, \
PIX_FMT_YUVJ440P
| enum var_name |
| static double clip | ( | void * | opaque, | |
| double | val | |||
| ) | [static] |
Clip value val in the minval - maxval range.
Definition at line 173 of file vf_lut.c.
Referenced by rv40_loop_filter(), and vc1_filter_line().
| static double compute_gammaval | ( | void * | opaque, | |
| double | gamma | |||
| ) | [static] |
| static int config_props | ( | AVFilterLink * | inlink | ) | [static] |
| DEFINE_LUT_FILTER | ( | lutrgb | , | |
| "Compute and apply a lookup table to the RGB input video." | , | |||
| init | ||||
| ) |
| DEFINE_LUT_FILTER | ( | lut | , | |
| "Compute and apply a lookup table to the RGB/YUV input video." | , | |||
| init | ||||
| ) |
| DEFINE_LUT_FILTER | ( | lutyuv | , | |
| "Compute and apply a lookup table to the YUV input video." | , | |||
| init | ||||
| ) |
| DEFINE_LUT_FILTER | ( | negate | , | |
| "Negate input video." | , | |||
| negate_init | ||||
| ) |
| static void draw_slice | ( | AVFilterLink * | inlink, | |
| int | y, | |||
| int | h, | |||
| int | slice_dir | |||
| ) | [static] |
| static int init | ( | AVFilterContext * | ctx, | |
| const char * | args, | |||
| void * | opaque | |||
| ) | [static] |
Definition at line 111 of file vf_lut.c.
Referenced by negate_init().
| static int negate_init | ( | AVFilterContext * | ctx, | |
| const char * | args, | |||
| void * | opaque | |||
| ) | [static] |
| static int query_formats | ( | AVFilterContext * | ctx | ) | [static] |
| static av_cold void uninit | ( | AVFilterContext * | ctx | ) | [static] |
enum PixelFormat all_pix_fmts[] = { RGB_FORMATS, YUV_FORMATS, PIX_FMT_NONE } [static] |
Definition at line 157 of file vf_lut.c.
Referenced by query_formats().
double(* const funcs1[])(void *, double) [static] |
{
clip,
compute_gammaval,
NULL
}
Definition at line 196 of file vf_lut.c.
Referenced by av_expr_parse(), av_expr_parse_and_eval(), and config_props().
const char* const funcs1_names[] [static] |
{
"clip",
"gammaval",
NULL
}
Definition at line 202 of file vf_lut.c.
Referenced by config_props().
{
"LutContext",
lut_get_name,
lut_options
}
const AVOption lut_options[] [static] |
{
{"c0", "set component #0 expression", OFFSET(comp_expr_str[0]), FF_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
{"c1", "set component #1 expression", OFFSET(comp_expr_str[1]), FF_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
{"c2", "set component #2 expression", OFFSET(comp_expr_str[2]), FF_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
{"c3", "set component #3 expression", OFFSET(comp_expr_str[3]), FF_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
{"y", "set Y expression", OFFSET(comp_expr_str[Y]), FF_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
{"u", "set U expression", OFFSET(comp_expr_str[U]), FF_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
{"v", "set V expression", OFFSET(comp_expr_str[V]), FF_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
{"r", "set R expression", OFFSET(comp_expr_str[R]), FF_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
{"g", "set G expression", OFFSET(comp_expr_str[G]), FF_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
{"b", "set B expression", OFFSET(comp_expr_str[B]), FF_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
{"a", "set A expression", OFFSET(comp_expr_str[A]), FF_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
{NULL},
}
enum PixelFormat rgb_pix_fmts[] = { RGB_FORMATS, PIX_FMT_NONE } [static] |
Definition at line 156 of file vf_lut.c.
Referenced by config_props(), and query_formats().
const char* var_names[] [static] |
{
"E",
"PHI",
"PI",
"w",
"h",
"val",
"maxval",
"minval",
"negval",
"clipval",
NULL
}
Definition at line 34 of file vf_lut.c.
Referenced by config_props().
enum PixelFormat yuv_pix_fmts[] = { YUV_FORMATS, PIX_FMT_NONE } [static] |
Definition at line 155 of file vf_lut.c.
Referenced by config_props(), and query_formats().