diff options
author | Arwa Arif <arwaarif1994@gmail.com> | 2015-02-19 01:26:44 +0530 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-02-20 00:06:37 +0100 |
commit | 627d2a7628fe178ee29e9b01d13912f8a15f98c8 (patch) | |
tree | c22e002e107ca91ebe9499c14d316891263f028c /libavfilter/vf_eq.h | |
parent | b11edbd289e454a173914049ae4643a5498520d9 (diff) |
avfilter/vf_eq: Add process_command to eq.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_eq.h')
-rw-r--r-- | libavfilter/vf_eq.h | 56 |
1 files changed, 50 insertions, 6 deletions
diff --git a/libavfilter/vf_eq.h b/libavfilter/vf_eq.h index 7e7c054261..fe9c09caca 100644 --- a/libavfilter/vf_eq.h +++ b/libavfilter/vf_eq.h @@ -26,6 +26,31 @@ #define AVFILTER_EQ_H #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", + 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 , +}; typedef struct EQParameters { void (*adjust)(struct EQParameters *eq, uint8_t *dst, int dst_stride, @@ -35,6 +60,7 @@ typedef struct EQParameters { double brightness, contrast, gamma, gamma_weight; int lut_clean; + } EQParameters; typedef struct { @@ -42,13 +68,31 @@ typedef struct { EQParameters param[3]; - double contrast; - double brightness; - double saturation; + char *contrast_expr; + AVExpr *contrast_pexpr; + + char *brightness_expr; + AVExpr *brightness_pexpr; + + char *saturation_expr; + AVExpr *saturation_pexpr; + + char *gamma_expr; + AVExpr *gamma_pexpr; + + char *gamma_weight_expr; + AVExpr *gamma_weight_pexpr; + + char *gamma_r_expr; + AVExpr *gamma_r_pexpr; + + char *gamma_g_expr; + AVExpr *gamma_g_pexpr; + + char *gamma_b_expr; + AVExpr *gamma_b_pexpr; - double gamma; - double gamma_weight; - double gamma_r, gamma_g, gamma_b; + double var_values[VAR_VARS_NB]; void (*process)(struct EQParameters *par, uint8_t *dst, int dst_stride, const uint8_t *src, int src_stride, int w, int h); |