diff options
author | arwa arif <arwaarif1994@gmail.com> | 2015-03-13 11:46:42 +0530 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2015-03-20 09:41:32 +0100 |
commit | 9015ca359f271968edb16d19bad9fc340d8e3a3d (patch) | |
tree | 18a021dde0419880a033525f3bc1c1e4033a5e3f /libavfilter/vf_eq.h | |
parent | e6547cce72789d6e650ae3017dcf6370e24f6314 (diff) |
lavfi/eq: rework expression evaluation
In particular, add support for t, pos, n, r parameters, and add an eval
mode option.
Also, partially reword option documentation.
With several major edit by Stefano Sabatini.
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
Diffstat (limited to 'libavfilter/vf_eq.h')
-rw-r--r-- | libavfilter/vf_eq.h | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/libavfilter/vf_eq.h b/libavfilter/vf_eq.h index fe9c09caca..8525048b3f 100644 --- a/libavfilter/vf_eq.h +++ b/libavfilter/vf_eq.h @@ -28,28 +28,20 @@ #include "avfilter.h" #include "libavutil/eval.h" -static const char * const var_names[] = { - "contrast", - "brightness", - "saturation", - "gamma", - "gamma_weight", - "gamma_r", - "gamma_g", - "gamma_b", +static const char *const var_names[] = { + "n", // frame count + "pos", // frame position + "r", // frame rate + "t", // timestamp expressed in seconds NULL }; enum var_name { - VAR_CONTRAST , - VAR_BRIGHTNESS , - VAR_SATURATION , - VAR_GAMMA , - VAR_GAMMA_WEIGHT , - VAR_GAMMA_R , - VAR_GAMMA_G , - VAR_GAMMA_B , - VAR_VARS_NB , + VAR_N, + VAR_POS, + VAR_R, + VAR_T, + VAR_NB }; typedef struct EQParameters { @@ -70,33 +62,42 @@ typedef struct { char *contrast_expr; AVExpr *contrast_pexpr; + double contrast; char *brightness_expr; AVExpr *brightness_pexpr; + double brightness; char *saturation_expr; AVExpr *saturation_pexpr; + double saturation; char *gamma_expr; AVExpr *gamma_pexpr; + double gamma; char *gamma_weight_expr; AVExpr *gamma_weight_pexpr; + double gamma_weight; char *gamma_r_expr; AVExpr *gamma_r_pexpr; + double gamma_r; char *gamma_g_expr; AVExpr *gamma_g_pexpr; + double gamma_g; char *gamma_b_expr; AVExpr *gamma_b_pexpr; + double gamma_b; - double var_values[VAR_VARS_NB]; + double var_values[VAR_NB]; void (*process)(struct EQParameters *par, uint8_t *dst, int dst_stride, const uint8_t *src, int src_stride, int w, int h); + enum EvalMode { EVAL_MODE_INIT, EVAL_MODE_FRAME, EVAL_MODE_NB } eval_mode; } EQContext; void ff_eq_init_x86(EQContext *eq); |