]> git.sesse.net Git - mlt/blob - src/modules/plus/filter_lift_gamma_gain.yml
Add lift_gamma_gain filter.
[mlt] / src / modules / plus / filter_lift_gamma_gain.yml
1 schema_version: 0.1
2 type: filter
3 identifier: lift_gamma_gain
4 title: Lift, Gamma, and Gain
5 version: 1
6 copyright: Brian Matherly
7 creator: Brian Matherly
8 license: LGPLv2.1
9 language: en
10 tags:
11   - Video
12 description: >
13   A simple lift/gamma/gain effect, used for color grading.
14 notes: >
15   Very roughly speaking, lift=shadows, gamma=midtones and gain=highlights,
16   although all parameters affect the entire curve. Mathematically speaking,
17   it is a bit unusual to look at gamma as a color, but it works pretty well
18   in practice.
19   The classic formula is: output = (gain * (x + lift * (1-x)))^(1/gamma).
20   The lift is a case where we actually would _not_ want linear light;
21   since black by definition becomes equal to the lift color, we want lift to
22   be pretty close to black, but in linear light that means lift affects the
23   rest of the curve relatively little. Thus, we actually convert to gamma 2.2
24   before lift, and then back again afterwards. (Gain and gamma are,
25   up to constants, commutative with the de-gamma operation.)
26
27 parameters:
28   - identifier: lift_r
29     title: Lift Red
30     type: float
31     minimum: 0.0
32     default: 0.0
33     mutable: yes
34
35   - identifier: lift_g
36     title: Lift Green
37     type: float
38     minimum: 0.0
39     default: 0.0
40     mutable: yes
41
42   - identifier: lift_b
43     title: Lift Blue
44     type: float
45     minimum: 0.0
46     default: 0.0
47     mutable: yes
48
49   - identifier: gamma_r
50     title: Gamma Red
51     type: float
52     minimum: 0.0
53     default: 1.0
54     mutable: yes
55
56   - identifier: gamma_g
57     title: Gamma Green
58     type: float
59     minimum: 0.0
60     default: 1.0
61     mutable: yes
62
63   - identifier: gamma_b
64     title: Gamma Blue
65     type: float
66     minimum: 0.0
67     default: 1.0
68     mutable: yes
69
70   - identifier: gain_r
71     title: Gain Red
72     type: float
73     minimum: 0.0
74     default: 1.0
75     mutable: yes
76
77   - identifier: gain_g
78     title: Gain Green
79     type: float
80     minimum: 0.0
81     default: 1.0
82     mutable: yes
83
84   - identifier: gain_b
85     title: Gain Blue
86     type: float
87     minimum: 0.0
88     default: 1.0
89     mutable: yes