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

Generic equation change filter Originally written by Michael Niedermayer for the MPlayer project, and ported by Clément Bœsch for FFmpeg. More...

#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "libavutil/eval.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  GEQContext
 

Macros

#define OFFSET(x)   offsetof(GEQContext, x)
 
#define FLAGS   AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 

Enumerations

enum  {
  Y = 0, U, V, A,
  G, B, R
}
 
enum  {
  VAR_X, VAR_Y, VAR_W, VAR_H,
  VAR_N, VAR_SW, VAR_SH, VAR_T,
  VAR_VARS_NB
}
 

Functions

 AVFILTER_DEFINE_CLASS (geq)
 
static double getpix (void *priv, double x, double y, int plane)
 
static double lum (void *priv, double x, double y)
 
static double cb (void *priv, double x, double y)
 
static double cr (void *priv, double x, double y)
 
static double alpha (void *priv, double x, double y)
 
static av_cold int geq_init (AVFilterContext *ctx)
 
static int geq_query_formats (AVFilterContext *ctx)
 
static int geq_config_props (AVFilterLink *inlink)
 
static int geq_filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static av_cold void geq_uninit (AVFilterContext *ctx)
 

Variables

static const AVOption geq_options []
 
static const char *const var_names [] = { "X", "Y", "W", "H", "N", "SW", "SH", "T", NULL }
 
static const AVFilterPad geq_inputs []
 
static const AVFilterPad geq_outputs []
 
AVFilter ff_vf_geq
 

Detailed Description

Generic equation change filter Originally written by Michael Niedermayer for the MPlayer project, and ported by Clément Bœsch for FFmpeg.

Definition in file vf_geq.c.

Macro Definition Documentation

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

Definition at line 48 of file vf_geq.c.

Definition at line 49 of file vf_geq.c.

Enumeration Type Documentation

anonymous enum
Enumerator
Y 
U 
V 
A 
G 
B 
R 

Definition at line 46 of file vf_geq.c.

anonymous enum
Enumerator
VAR_X 
VAR_Y 
VAR_W 
VAR_H 
VAR_N 
VAR_SW 
VAR_SH 
VAR_T 
VAR_VARS_NB 

Definition at line 102 of file vf_geq.c.

Function Documentation

AVFILTER_DEFINE_CLASS ( geq  )
static double getpix ( void priv,
double  x,
double  y,
int  plane 
)
inlinestatic

Definition at line 71 of file vf_geq.c.

Referenced by alpha(), cb(), cr(), and lum().

static double lum ( void priv,
double  x,
double  y 
)
static

Definition at line 96 of file vf_geq.c.

Referenced by geq_init().

static double cb ( void priv,
double  x,
double  y 
)
static
static double cr ( void priv,
double  x,
double  y 
)
static
static double alpha ( void priv,
double  x,
double  y 
)
static

Definition at line 99 of file vf_geq.c.

Referenced by adaptive_gain_control(), av_parse_color(), avc_h_loop_filter_chroma422_mbaff_msa(), avc_h_loop_filter_chroma422_msa(), avc_h_loop_filter_luma_mbaff_intra_msa(), avc_h_loop_filter_luma_mbaff_msa(), avc_loopfilter_cb_or_cr_inter_edge_hor_msa(), avc_loopfilter_cb_or_cr_inter_edge_ver_msa(), avc_loopfilter_cb_or_cr_intra_edge_hor_msa(), avc_loopfilter_cb_or_cr_intra_edge_ver_msa(), avc_loopfilter_luma_inter_edge_hor_msa(), avc_loopfilter_luma_inter_edge_ver_msa(), avc_loopfilter_luma_intra_edge_hor_msa(), avc_loopfilter_luma_intra_edge_ver_msa(), blend_image(), blend_line(), blend_pixel(), bmp_decode_frame(), celt_decode_coarse_energy(), chroma_inter_body_mmi(), chroma_intra_body_mmi(), config_input(), config_output(), decode_dvd_subtitles(), dvbsub_parse_clut_segment(), dxt3_block_internal(), dxt5_block_internal(), encode_frame(), encode_headers(), ff_adaptive_gain_control(), ff_ass_split_override_codes(), ff_blend_mask(), ff_blend_rectangle(), ff_cavs_filter(), ff_deblock_h_chroma_8_mmi(), ff_deblock_h_chroma_intra_8_mmi(), ff_deblock_v8_luma_8_mmi(), ff_deblock_v8_luma_intra_8_mmi(), ff_deblock_v_chroma_8_mmi(), ff_deblock_v_chroma_intra_8_mmi(), ff_mdct_init(), ff_sws_alphablendaway(), fft_ref_init(), filter(), filter_frame(), filter_mb_edgech(), filter_mb_edgecv(), filter_mb_edgeh(), filter_mb_edgev(), filter_mb_mbaff_edgecv(), filter_mb_mbaff_edgev(), g2m_paint_cursor(), geq_init(), guess_palette(), loop_filter_c2(), loop_filter_l2(), mpeg4_decode_sprite_trajectory(), parse_palette_segment(), predict(), ps_tableinit(), Rgb16ToPlanarRgb16Wrapper(), rv40_adaptive_loop_filter(), rv40_loop_filter(), sbr_dequant(), sbr_hf_gen_c(), set_highshelf_rbj(), set_lp_rbj(), sub_left_prediction_bgr32(), tdsc_paint_cursor(), update_alpha(), and vp7_fade_frame().

static av_cold int geq_init ( AVFilterContext ctx)
static

Definition at line 104 of file vf_geq.c.

static int geq_query_formats ( AVFilterContext ctx)
static

Definition at line 166 of file vf_geq.c.

static int geq_config_props ( AVFilterLink inlink)
static

Definition at line 191 of file vf_geq.c.

static int geq_filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 204 of file vf_geq.c.

static av_cold void geq_uninit ( AVFilterContext ctx)
static

Definition at line 249 of file vf_geq.c.

Variable Documentation

const AVOption geq_options[]
static
Initial value:
= {
{ "lum_expr", "set luminance expression", OFFSET(expr_str[Y]), AV_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX, FLAGS },
{ "lum", "set luminance expression", OFFSET(expr_str[Y]), AV_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX, FLAGS },
{ "cb_expr", "set chroma blue expression", OFFSET(expr_str[U]), AV_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX, FLAGS },
{ "cb", "set chroma blue expression", OFFSET(expr_str[U]), AV_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX, FLAGS },
{ "cr_expr", "set chroma red expression", OFFSET(expr_str[V]), AV_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX, FLAGS },
{ "cr", "set chroma red expression", OFFSET(expr_str[V]), AV_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX, FLAGS },
{ "alpha_expr", "set alpha expression", OFFSET(expr_str[A]), AV_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX, FLAGS },
{ "a", "set alpha expression", OFFSET(expr_str[A]), AV_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX, FLAGS },
{ "red_expr", "set red expression", OFFSET(expr_str[R]), AV_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX, FLAGS },
{ "r", "set red expression", OFFSET(expr_str[R]), AV_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX, FLAGS },
{ "green_expr", "set green expression", OFFSET(expr_str[G]), AV_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX, FLAGS },
{ "g", "set green expression", OFFSET(expr_str[G]), AV_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX, FLAGS },
{ "blue_expr", "set blue expression", OFFSET(expr_str[B]), AV_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX, FLAGS },
{ "b", "set blue expression", OFFSET(expr_str[B]), AV_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX, FLAGS },
{NULL},
}
#define NULL
Definition: coverity.c:32
Definition: vf_geq.c:46
Definition: vf_geq.c:46
Definition: vf_geq.c:46
#define OFFSET(x)
Definition: vf_geq.c:48
Definition: vf_geq.c:46
Definition: vf_geq.c:46
Definition: vf_geq.c:46
#define FLAGS
Definition: vf_geq.c:49
Definition: vf_geq.c:46

Definition at line 51 of file vf_geq.c.

const char* const var_names[] = { "X", "Y", "W", "H", "N", "SW", "SH", "T", NULL }
static

Definition at line 101 of file vf_geq.c.

Referenced by geq_init().

const AVFilterPad geq_inputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = geq_config_props,
.filter_frame = geq_filter_frame,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int geq_config_props(AVFilterLink *inlink)
Definition: vf_geq.c:191
static int geq_filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: vf_geq.c:204

Definition at line 258 of file vf_geq.c.

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

Definition at line 268 of file vf_geq.c.

AVFilter ff_vf_geq
Initial value:
= {
.name = "geq",
.description = NULL_IF_CONFIG_SMALL("Apply generic equation to each pixel."),
.priv_size = sizeof(GEQContext),
.priv_class = &geq_class,
}
static const AVFilterPad geq_inputs[]
Definition: vf_geq.c:258
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
static av_cold void geq_uninit(AVFilterContext *ctx)
Definition: vf_geq.c:249
static const AVFilterPad geq_outputs[]
Definition: vf_geq.c:268
#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
static int geq_query_formats(AVFilterContext *ctx)
Definition: vf_geq.c:166
static av_cold int uninit(AVCodecContext *avctx)
Definition: crystalhd.c:337
#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: af_afftfilt.c:385
static const AVFilterPad inputs[]
Definition: af_afftfilt.c:375
static av_cold int geq_init(AVFilterContext *ctx)
Definition: vf_geq.c:104
static int flags
Definition: cpu.c:47
static int query_formats(AVFilterContext *ctx)
Definition: aeval.c:244

Definition at line 276 of file vf_geq.c.