FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
vf_eq.h
Go to the documentation of this file.
1 /*
2  * Original MPlayer filters by Richard Felker, Hampa Hug, Daniel Moreno,
3  * and Michael Niedermeyer.
4  *
5  * Copyright (c) 2014 James Darnley <james.darnley@gmail.com>
6  * Copyright (c) 2015 Arwa Arif <arwaarif1994@gmail.com>
7  *
8  * This file is part of FFmpeg.
9  *
10  * FFmpeg is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * FFmpeg is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License along
21  * with FFmpeg; if not, write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23  */
24 
25 #ifndef AVFILTER_EQ_H
26 #define AVFILTER_EQ_H
27 
28 #include "avfilter.h"
29 #include "libavutil/eval.h"
30 
31 static const char *const var_names[] = {
32  "n", // frame count
33  "pos", // frame position
34  "r", // frame rate
35  "t", // timestamp expressed in seconds
36  NULL
37 };
38 
39 enum var_name {
45 };
46 
47 typedef struct EQParameters {
48  void (*adjust)(struct EQParameters *eq, uint8_t *dst, int dst_stride,
49  const uint8_t *src, int src_stride, int w, int h);
50 
51  uint8_t lut[256];
52 
54  int lut_clean;
55 
56 } EQParameters;
57 
58 typedef struct EQContext {
59  const AVClass *class;
60 
62 
65  double contrast;
66 
69  double brightness;
70 
73  double saturation;
74 
75  char *gamma_expr;
77  double gamma;
78 
81  double gamma_weight;
82 
83  char *gamma_r_expr;
85  double gamma_r;
86 
87  char *gamma_g_expr;
89  double gamma_g;
90 
91  char *gamma_b_expr;
93  double gamma_b;
94 
95  double var_values[VAR_NB];
96 
97  void (*process)(struct EQParameters *par, uint8_t *dst, int dst_stride,
98  const uint8_t *src, int src_stride, int w, int h);
99 
101 } EQContext;
102 
104 
105 #endif /* AVFILTER_EQ_H */
char * gamma_b_expr
Definition: vf_eq.h:91
Definition: vf_eq.h:43
#define NULL
Definition: coverity.c:32
char * gamma_weight_expr
Definition: vf_eq.h:79
AVExpr * gamma_weight_pexpr
Definition: vf_eq.h:80
char * gamma_g_expr
Definition: vf_eq.h:87
Main libavfilter public API header.
Definition: vf_eq.h:44
double contrast
Definition: vf_eq.h:53
#define src
Definition: vp8dsp.c:254
double var_values[VAR_NB]
Definition: vf_eq.h:95
AVExpr * brightness_pexpr
Definition: vf_eq.h:68
AVExpr * contrast_pexpr
Definition: vf_eq.h:64
void ff_eq_init_x86(EQContext *eq)
Definition: vf_eq.c:87
uint8_t
uint8_t lut[256]
Definition: vf_eq.h:51
double gamma_b
Definition: vf_eq.h:93
Definition: eval.c:150
char * contrast_expr
Definition: vf_eq.h:63
void(* adjust)(struct EQParameters *eq, uint8_t *dst, int dst_stride, const uint8_t *src, int src_stride, int w, int h)
Definition: vf_eq.h:48
AVExpr * gamma_g_pexpr
Definition: vf_eq.h:88
AVExpr * gamma_b_pexpr
Definition: vf_eq.h:92
Definition: vf_eq.h:41
int lut_clean
Definition: vf_eq.h:54
enum EQContext::EvalMode eval_mode
double gamma_g
Definition: vf_eq.h:89
void(* process)(struct EQParameters *par, uint8_t *dst, int dst_stride, const uint8_t *src, int src_stride, int w, int h)
Definition: vf_eq.h:97
char * gamma_r_expr
Definition: vf_eq.h:83
#define eq(A, B)
Definition: vf_xbr.c:91
var_name
Definition: aeval.c:46
static const char *const var_names[]
Definition: vf_eq.h:31
double gamma_weight
Definition: vf_eq.h:53
AVExpr * gamma_r_pexpr
Definition: vf_eq.h:84
typedef void(APIENTRY *FF_PFNGLACTIVETEXTUREPROC)(GLenum texture)
EQParameters param[3]
Definition: vf_eq.h:61
char * brightness_expr
Definition: vf_eq.h:67
double gamma
Definition: vf_eq.h:77
AVExpr * gamma_pexpr
Definition: vf_eq.h:76
double gamma_weight
Definition: vf_eq.h:81
double brightness
Definition: vf_eq.h:53
Definition: vf_eq.h:40
Definition: vf_eq.h:42
char * gamma_expr
Definition: vf_eq.h:75
Describe the class of an AVClass context structure.
Definition: log.h:67
AVExpr * saturation_pexpr
Definition: vf_eq.h:72
double gamma
Definition: vf_eq.h:53
EvalMode
Definition: vf_eq.h:100
double brightness
Definition: vf_eq.h:69
double saturation
Definition: vf_eq.h:73
double gamma_r
Definition: vf_eq.h:85
char * saturation_expr
Definition: vf_eq.h:71
simple arithmetic expression evaluator
double contrast
Definition: vf_eq.h:65