FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
vf_lut.c File Reference

Compute a look-up table for binding the input value to the output value, and apply it to input video. More...

#include "libavutil/attributes.h"
#include "libavutil/bswap.h"
#include "libavutil/common.h"
#include "libavutil/eval.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "drawutils.h"
#include "formats.h"
#include "internal.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  LutContext
 

Macros

#define Y   0
 
#define U   1
 
#define V   2
 
#define R   0
 
#define G   1
 
#define B   2
 
#define A   3
 
#define OFFSET(x)   offsetof(LutContext, x)
 
#define FLAGS   AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
 
#define YUV_FORMATS
 
#define RGB_FORMATS
 
#define DEFINE_LUT_FILTER(name_, description_)
 

Enumerations

enum  var_name {
  VAR_CH, VAR_N, VAR_NB_IN_CHANNELS, VAR_NB_OUT_CHANNELS,
  VAR_T, VAR_S, VAR_VARS_NB, VAR_VALUE1,
  VAR_VALUE2, VAR_VARS_NB, VAR_TB, VAR_PTS,
  VAR_START_PTS, VAR_PREV_PTS, VAR_PREV_SELECTED_PTS, VAR_T,
  VAR_START_T, VAR_PREV_T, VAR_PREV_SELECTED_T, VAR_PICT_TYPE,
  VAR_I, VAR_P, VAR_B, VAR_S,
  VAR_SI, VAR_SP, VAR_BI, VAR_PICT_TYPE_I,
  VAR_PICT_TYPE_P, VAR_PICT_TYPE_B, VAR_PICT_TYPE_S, VAR_PICT_TYPE_SI,
  VAR_PICT_TYPE_SP, VAR_PICT_TYPE_BI, VAR_INTERLACE_TYPE, VAR_INTERLACE_TYPE_P,
  VAR_INTERLACE_TYPE_T, VAR_INTERLACE_TYPE_B, VAR_CONSUMED_SAMPLES_N, VAR_SAMPLES_N,
  VAR_SAMPLE_RATE, VAR_N, VAR_SELECTED_N, VAR_PREV_SELECTED_N,
  VAR_KEY, VAR_POS, VAR_SCENE, VAR_CONCATDEC_SELECT,
  VAR_VARS_NB, VAR_FRAME_RATE, VAR_INTERLACED, VAR_N,
  VAR_NB_CONSUMED_SAMPLES, VAR_NB_SAMPLES, VAR_POS, VAR_PREV_INPTS,
  VAR_PREV_INT, VAR_PREV_OUTPTS, VAR_PREV_OUTT, VAR_PTS,
  VAR_SAMPLE_RATE, VAR_STARTPTS, VAR_STARTT, VAR_T,
  VAR_TB, VAR_RTCTIME, VAR_RTCSTART, VAR_S,
  VAR_SR, VAR_VARS_NB, VAR_AVTB, VAR_INTB,
  VAR_SR, VAR_VARS_NB, VAR_W, VAR_H,
  VAR_A, VAR_DAR, VAR_SAR, VAR_HSUB,
  VAR_VSUB, VARS_NB, VAR_W, VAR_H,
  VAR_CW, VAR_CH, VAR_HSUB, VAR_VSUB,
  VARS_NB, VAR_IN_W, VAR_IW, VAR_IN_H,
  VAR_IH, VAR_OUT_W, VAR_OW, VAR_OUT_H,
  VAR_OH, VAR_A, VAR_SAR, VAR_DAR,
  VAR_HSUB, VAR_VSUB, VAR_X, VAR_Y,
  VAR_N, VAR_POS, VAR_T, VAR_VARS_NB,
  VAR_DAR, VAR_HSUB, VAR_VSUB, VAR_IN_H,
  VAR_IH, VAR_IN_W, VAR_IW, VAR_SAR,
  VAR_X, VAR_Y, VAR_H, VAR_W,
  VAR_T, VAR_MAX, VARS_NB, VAR_DAR,
  VAR_HSUB, VAR_VSUB, VAR_LINE_H, VAR_LH,
  VAR_MAIN_H, VAR_h, VAR_H, VAR_MAIN_W,
  VAR_w, VAR_W, VAR_MAX_GLYPH_A, VAR_ASCENT,
  VAR_MAX_GLYPH_D, VAR_DESCENT, VAR_MAX_GLYPH_H, VAR_MAX_GLYPH_W,
  VAR_N, VAR_SAR, VAR_T, VAR_TEXT_H,
  VAR_TH, VAR_TEXT_W, VAR_TW, VAR_X,
  VAR_Y, VAR_PICT_TYPE, VAR_VARS_NB, VAR_N,
  VAR_POS, VAR_R, VAR_T, VAR_NB,
  VAR_N, VAR_PTS, VAR_R, VAR_T,
  VAR_TB, VAR_NB, VAR_W, VAR_H,
  VAR_VAL, VAR_MAXVAL, VAR_MINVAL, VAR_NEGVAL,
  VAR_CLIPVAL, VAR_VARS_NB, VAR_MAIN_W, VAR_MW,
  VAR_MAIN_H, VAR_MH, VAR_OVERLAY_W, VAR_OW,
  VAR_OVERLAY_H, VAR_OH, VAR_HSUB, VAR_VSUB,
  VAR_X, VAR_Y, VAR_N, VAR_POS,
  VAR_T, VAR_VARS_NB, VAR_IN_W, VAR_IW,
  VAR_IN_H, VAR_IH, VAR_OUT_W, VAR_OW,
  VAR_OUT_H, VAR_OH, VAR_X, VAR_Y,
  VAR_A, VAR_SAR, VAR_DAR, VAR_HSUB,
  VAR_VSUB, VARS_NB, VAR_IN_W, VAR_IW,
  VAR_IN_H, VAR_IH, VAR_OUT_W, VAR_OW,
  VAR_OUT_H, VAR_OH, VAR_HSUB, VAR_VSUB,
  VAR_N, VAR_T, VAR_VARS_NB, VAR_IN_W,
  VAR_IW, VAR_IN_H, VAR_IH, VAR_OUT_W,
  VAR_OW, VAR_OUT_H, VAR_OH, VAR_A,
  VAR_SAR, VAR_DAR, VAR_HSUB, VAR_VSUB,
  VAR_OHSUB, VAR_OVSUB, VARS_NB, VAR_W,
  VAR_H, VAR_N, VAR_PTS, VAR_R,
  VAR_T, VAR_TB, VAR_NB, VAR_IN_W,
  VAR_IW, VAR_IN_H, VAR_IH, VAR_OUT_W,
  VAR_OW, VAR_OUT_H, VAR_OH, VAR_IN,
  VAR_ON, VAR_DURATION, VAR_PDURATION, VAR_TIME,
  VAR_FRAME, VAR_ZOOM, VAR_PZOOM, VAR_X,
  VAR_PX, VAR_Y, VAR_PY, VAR_A,
  VAR_SAR, VAR_DAR, VAR_HSUB, VAR_VSUB,
  VARS_NB, VAR_IN_W, VAR_IW, VAR_IN_H,
  VAR_IH, VAR_OUT_W, VAR_OW, VAR_OUT_H,
  VAR_OH, VAR_A, VAR_SAR, VAR_DAR,
  VAR_HSUB, VAR_VSUB, VAR_OHSUB, VAR_OVSUB,
  VARS_NB, VAR_X, VAR_Y, VAR_W,
  VAR_H, VAR_TIME, VAR_SPEED, VAR_TEMPO,
  VAR_ORDER, VAR_PATTERN, VAR_ROW, VAR_VARS_NB
}
 

Functions

static av_cold void uninit (AVFilterContext *ctx)
 
static int query_formats (AVFilterContext *ctx)
 
static double clip (void *opaque, double val)
 Clip value val in the minval - maxval range. More...
 
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 contained in the same interval. More...
 
static double compute_gammaval709 (void *opaque, double gamma)
 Compute ITU Rec.709 gamma correction of value val. More...
 
static int config_props (AVFilterLink *inlink)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 

Variables

static const char *const var_names []
 
static const AVOption options []
 
static enum AVPixelFormat yuv_pix_fmts [] = { YUV_FORMATS, AV_PIX_FMT_NONE }
 
static enum AVPixelFormat rgb_pix_fmts [] = { RGB_FORMATS, AV_PIX_FMT_NONE }
 
static enum AVPixelFormat all_pix_fmts [] = { RGB_FORMATS, YUV_FORMATS, AV_PIX_FMT_NONE }
 
static double(*const funcs1 [])(void *, double)
 
static const char *const funcs1_names []
 
static const AVFilterPad inputs []
 
static const AVFilterPad outputs []
 

Detailed Description

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.

Macro Definition Documentation

#define Y   0

Definition at line 74 of file vf_lut.c.

Referenced by config_props().

#define U   1

Definition at line 75 of file vf_lut.c.

Referenced by config_props().

#define V   2

Definition at line 76 of file vf_lut.c.

Referenced by config_props().

#define R   0

Definition at line 77 of file vf_lut.c.

#define G   1

Definition at line 78 of file vf_lut.c.

#define B   2

Definition at line 79 of file vf_lut.c.

#define A   3

Definition at line 80 of file vf_lut.c.

Referenced by config_props().

#define OFFSET (   x)    offsetof(LutContext, x)

Definition at line 82 of file vf_lut.c.

Definition at line 83 of file vf_lut.c.

#define YUV_FORMATS
Value:
planar YUV 4:4:0,20bpp, (1 Cr & Cb sample per 1x2 Y samples), little-endian
Definition: pixfmt.h:283
planar YUV 4:2:0,21bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
Definition: pixfmt.h:253
planar YUV 4:2:2,28bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
Definition: pixfmt.h:257
planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
Definition: pixfmt.h:171
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
Definition: pixfmt.h:68
planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
Definition: pixfmt.h:140
planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
Definition: pixfmt.h:103
planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
Definition: pixfmt.h:259
planar YUV 4:2:0 40bpp, (1 Cr & Cb sample per 2x2 Y & A samples, little-endian)
Definition: pixfmt.h:203
planar YUV 4:4:0 full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV440P and setting color_range...
Definition: pixfmt.h:102
planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV422P and setting col...
Definition: pixfmt.h:76
planar YUV 4:2:0, 13.5bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
Definition: pixfmt.h:169
planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
Definition: pixfmt.h:177
planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples)
Definition: pixfmt.h:188
planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
Definition: pixfmt.h:173
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
Definition: pixfmt.h:67
planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting col...
Definition: pixfmt.h:75
planar YUV 4:2:0,18bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
Definition: pixfmt.h:251
planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
Definition: pixfmt.h:179
planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
Definition: pixfmt.h:189
planar YUV 4:4:0,24bpp, (1 Cr & Cb sample per 1x2 Y samples), little-endian
Definition: pixfmt.h:285
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
Definition: pixfmt.h:69
planar YUV 4:2:2 48bpp, (1 Cr & Cb sample per 2x1 Y & A samples, little-endian)
Definition: pixfmt.h:205
planar YUV 4:4:4 64bpp, (1 Cr & Cb sample per 1x1 Y & A samples, little-endian)
Definition: pixfmt.h:207
planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
Definition: pixfmt.h:175
planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
Definition: pixfmt.h:144
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
Definition: pixfmt.h:63
planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
Definition: pixfmt.h:255
planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
Definition: pixfmt.h:142
planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV444P and setting col...
Definition: pixfmt.h:77
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
Definition: pixfmt.h:70
planar YUV 4:4:4,42bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
Definition: pixfmt.h:261
planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
Definition: pixfmt.h:101

Definition at line 112 of file vf_lut.c.

#define RGB_FORMATS
Value:
packed RGB 8:8:8, 24bpp, RGBRGB...
Definition: pixfmt.h:65
packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as lit...
Definition: pixfmt.h:112
packed ABGR 8:8:8:8, 32bpp, ABGRABGR...
Definition: pixfmt.h:96
packed BGRA 8:8:8:8, 32bpp, BGRABGRA...
Definition: pixfmt.h:97
packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
Definition: pixfmt.h:94
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
Definition: pixfmt.h:95
packed RGB 8:8:8, 24bpp, BGRBGR...
Definition: pixfmt.h:66
packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is st...
Definition: pixfmt.h:218

Definition at line 125 of file vf_lut.c.

#define DEFINE_LUT_FILTER (   name_,
  description_ 
)
Value:
AVFilter ff_vf_##name_ = { \
.name = #name_, \
.description = NULL_IF_CONFIG_SMALL(description_), \
.priv_size = sizeof(LutContext), \
.priv_class = &name_ ## _class, \
.init = name_##_init, \
.uninit = uninit, \
.inputs = inputs, \
}
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
#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:122
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:176
static const AVFilterPad outputs[]
Definition: vf_lut.c:481
static int query_formats(AVFilterContext *ctx)
Definition: vf_lut.c:135
Filter definition.
Definition: avfilter.h:141
const char * name
Filter name.
Definition: avfilter.h:145
static int flags
Definition: cpu.c:47
static const AVFilterPad inputs[]
Definition: vf_lut.c:473
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_lut.c:100

Definition at line 488 of file vf_lut.c.

Enumeration Type Documentation

enum var_name
Enumerator
VAR_CH 
VAR_N 
VAR_NB_IN_CHANNELS 
VAR_NB_OUT_CHANNELS 
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N_H 
VAR_IH 
VAR_OUT_W 
VAR_OW 
VAR_OUT_H 
VAR_OH 
VAR_HSUB 
VAR_VSUB 
VAR_N 
VAR_T 
VAR_VARS_NB 
VAR_IN_W 
VAR_IW 
VAR_IN_H 
VAR_IH 
VAR_OUT_W 
VAR_OW 
VAR_OUT_H 
VAR_OH 
VAR_A 
VAR_SAR 
VAR_DAR 
VAR_HSUB 
VAR_VSUB 
VAR_OHSUB 
VAR_OVSUB 
VARS_NB 
VAR_W 
VAR_H 
VAR_N 
VAR_PTS 
VAR_R 
VAR_T 
VAR_TB 
VAR_NB 
VAR_IN_W 
VAR_IW 
VAR_IN_H 
VAR_IH 
VAR_OUT_W 
VAR_OW 
VAR_OUT_H 
VAR_OH 
VAR_IN 
VAR_ON 
VAR_DURATION 
VAR_PDURATION 
VAR_TIME 
VAR_FRAME 
VAR_ZOOM 
VAR_PZOOM 
VAR_X 
VAR_PX 
VAR_Y 
VAR_PY 
VAR_A 
VAR_SAR 
VAR_DAR 
VAR_HSUB 
VAR_VSUB 
VARS_NB 
VAR_IN_W 
VAR_IW 
VAR_IN_H 
VAR_IH 
VAR_OUT_W 
VAR_OW 
VAR_OUT_H 
VAR_OH 
VAR_A 
VAR_SAR 
VAR_DAR 
VAR_HSUB 
VAR_VSUB 
VAR_OHSUB 
VAR_OVSUB 
VARS_NB 
VAR_X 
VAR_Y 
VAR_W 
VAR_H 
VAR_TIME 
VAR_SPEED 
VAR_TEMPO 
VAR_ORDER 
VAR_PATTERN 
VAR_ROW 
VAR_VARS_NB 

Definition at line 50 of file vf_lut.c.

Function Documentation

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 100 of file vf_lut.c.

static int query_formats ( AVFilterContext ctx)
static

Definition at line 135 of file vf_lut.c.

static double clip ( void opaque,
double  val 
)
static

Clip value val in the minval - maxval range.

Definition at line 151 of file vf_lut.c.

Referenced by filter(), rv40_loop_filter(), and vc1_filter_line().

static double compute_gammaval ( void opaque,
double  gamma 
)
static

Compute gamma correction for value val, assuming the minval-maxval range, val is clipped to a value contained in the same interval.

Definition at line 164 of file vf_lut.c.

static double compute_gammaval709 ( void opaque,
double  gamma 
)
static

Compute ITU Rec.709 gamma correction of value val.

Definition at line 177 of file vf_lut.c.

static int config_props ( AVFilterLink inlink)
static

Definition at line 203 of file vf_lut.c.

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 328 of file vf_lut.c.

Variable Documentation

const char* const var_names[]
static
Initial value:
= {
"w",
"h",
"val",
"maxval",
"minval",
"negval",
"clipval",
}
#define NULL
Definition: coverity.c:32

Definition at line 39 of file vf_lut.c.

Referenced by config_props().

const AVOption options[]
static
Initial value:
= {
{ "c0", "set component #0 expression", OFFSET(comp_expr_str[0]), AV_OPT_TYPE_STRING, { .str = "val" }, .flags = FLAGS },
{ "c1", "set component #1 expression", OFFSET(comp_expr_str[1]), AV_OPT_TYPE_STRING, { .str = "val" }, .flags = FLAGS },
{ "c2", "set component #2 expression", OFFSET(comp_expr_str[2]), AV_OPT_TYPE_STRING, { .str = "val" }, .flags = FLAGS },
{ "c3", "set component #3 expression", OFFSET(comp_expr_str[3]), AV_OPT_TYPE_STRING, { .str = "val" }, .flags = FLAGS },
{ "y", "set Y expression", OFFSET(comp_expr_str[Y]), AV_OPT_TYPE_STRING, { .str = "val" }, .flags = FLAGS },
{ "u", "set U expression", OFFSET(comp_expr_str[U]), AV_OPT_TYPE_STRING, { .str = "val" }, .flags = FLAGS },
{ "v", "set V expression", OFFSET(comp_expr_str[V]), AV_OPT_TYPE_STRING, { .str = "val" }, .flags = FLAGS },
{ "r", "set R expression", OFFSET(comp_expr_str[R]), AV_OPT_TYPE_STRING, { .str = "val" }, .flags = FLAGS },
{ "g", "set G expression", OFFSET(comp_expr_str[G]), AV_OPT_TYPE_STRING, { .str = "val" }, .flags = FLAGS },
{ "b", "set B expression", OFFSET(comp_expr_str[B]), AV_OPT_TYPE_STRING, { .str = "val" }, .flags = FLAGS },
{ "a", "set A expression", OFFSET(comp_expr_str[A]), AV_OPT_TYPE_STRING, { .str = "val" }, .flags = FLAGS },
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define G
Definition: vf_lut.c:78
#define A
Definition: vf_lut.c:80
#define R
Definition: vf_lut.c:77
#define OFFSET(x)
Definition: vf_lut.c:82
#define U
Definition: vf_lut.c:75
#define V
Definition: vf_lut.c:76
#define Y
Definition: vf_lut.c:74
#define FLAGS
Definition: vf_lut.c:83
#define B
Definition: vf_lut.c:79

Definition at line 85 of file vf_lut.c.

enum AVPixelFormat yuv_pix_fmts[] = { YUV_FORMATS, AV_PIX_FMT_NONE }
static

Definition at line 131 of file vf_lut.c.

Referenced by config_props(), and query_formats().

enum AVPixelFormat rgb_pix_fmts[] = { RGB_FORMATS, AV_PIX_FMT_NONE }
static

Definition at line 132 of file vf_lut.c.

Referenced by config_props(), and query_formats().

enum AVPixelFormat all_pix_fmts[] = { RGB_FORMATS, YUV_FORMATS, AV_PIX_FMT_NONE }
static

Definition at line 133 of file vf_lut.c.

Referenced by query_formats().

double(* const funcs1[])(void *, double)
static
Initial value:
= {
}
#define NULL
Definition: coverity.c:32
static double compute_gammaval709(void *opaque, double gamma)
Compute ITU Rec.709 gamma correction of value val.
Definition: vf_lut.c:177
static double clip(void *opaque, double val)
Clip value val in the minval - maxval range.
Definition: vf_lut.c:151
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:164

Definition at line 189 of file vf_lut.c.

Referenced by av_expr_parse(), av_expr_parse_and_eval(), and config_props().

const char* const funcs1_names[]
static
Initial value:
= {
"clip",
"gammaval",
"gammaval709",
}
#define NULL
Definition: coverity.c:32

Definition at line 196 of file vf_lut.c.

Referenced by config_props().

const AVFilterPad inputs[]
static
Initial value:
= {
{ .name = "default",
.filter_frame = filter_frame,
.config_props = config_props,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: vf_lut.c:328
static int config_props(AVFilterLink *inlink)
Definition: vf_lut.c:203

Definition at line 473 of file vf_lut.c.

const AVFilterPad outputs[]
static
Initial value:
= {
{ .name = "default",
},
{ NULL }
}
#define NULL
Definition: coverity.c:32

Definition at line 481 of file vf_lut.c.