Clean up effect enums a bit.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 1 Oct 2012 18:37:27 +0000 (20:37 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 1 Oct 2012 18:37:27 +0000 (20:37 +0200)
effect_chain.cpp
effect_id.h
main.cpp

index 2bae9ed..9246a4d 100644 (file)
@@ -34,13 +34,13 @@ void EffectChain::add_output(const ImageFormat &format)
 Effect *instantiate_effect(EffectId effect)
 {
        switch (effect) {
-       case GAMMA_CONVERSION:
+       case EFFECT_GAMMA_EXPANSION:
                return new GammaExpansionEffect();
-       case RGB_PRIMARIES_CONVERSION:
-               return new GammaExpansionEffect();
-       case LIFT_GAMMA_GAIN:
+       case EFFECT_GAMMA_COMPRESSION:
+               return new GammaCompressionEffect();
+       case EFFECT_LIFT_GAMMA_GAIN:
                return new LiftGammaGainEffect();
-       case SATURATION:
+       case EFFECT_SATURATION:
                return new SaturationEffect();
        }
        assert(false);
index 20cd3b9..97e0e13 100644 (file)
@@ -3,12 +3,13 @@
 
 enum EffectId {
        // Mostly for internal use.
-       GAMMA_CONVERSION = 0,
-       RGB_PRIMARIES_CONVERSION,
+       EFFECT_GAMMA_EXPANSION = 0,
+       EFFECT_GAMMA_COMPRESSION,
+       EFFECT_RGB_PRIMARIES_CONVERSION,
 
        // Color.
-       LIFT_GAMMA_GAIN,
-       SATURATION,
+       EFFECT_LIFT_GAMMA_GAIN,
+       EFFECT_SATURATION,
 };
 
 #endif // !defined(_EFFECT_ID_H)
index 333cdfc..cdf4f61 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -183,8 +183,8 @@ int main(int argc, char **argv)
        inout_format.gamma_curve = GAMMA_sRGB;
 
        chain.add_input(inout_format);
-       Effect *lift_gamma_gain_effect = chain.add_effect(LIFT_GAMMA_GAIN);
-       Effect *saturation_effect = chain.add_effect(SATURATION);
+       Effect *lift_gamma_gain_effect = chain.add_effect(EFFECT_LIFT_GAMMA_GAIN);
+       Effect *saturation_effect = chain.add_effect(EFFECT_SATURATION);
        chain.add_output(inout_format);
        chain.finalize();