This was mostly so that people could sharpen the input if they wanted to
(even though unsharp mask is not the best sharpener). BlurEffect was added
mainly because it felt wrong that one could only use a compound effect and not
the underlying one.
#include <stdarg.h>
#include <lauxlib.h>
#include <lua.hpp>
#include <stdarg.h>
#include <lauxlib.h>
#include <lua.hpp>
+#include <movit/blur_effect.h>
#include <movit/deinterlace_effect.h>
#include <movit/effect.h>
#include <movit/effect_chain.h>
#include <movit/deinterlace_effect.h>
#include <movit/effect.h>
#include <movit/effect_chain.h>
#include <movit/resample_effect.h>
#include <movit/resize_effect.h>
#include <movit/util.h>
#include <movit/resample_effect.h>
#include <movit/resize_effect.h>
#include <movit/util.h>
+#include <movit/unsharp_mask_effect.h>
#include <movit/white_balance_effect.h>
#include <movit/ycbcr.h>
#include <movit/ycbcr_input.h>
#include <movit/white_balance_effect.h>
#include <movit/ycbcr.h>
#include <movit/ycbcr_input.h>
return new MixEffect;
case LIFT_GAMMA_GAIN_EFFECT:
return new LiftGammaGainEffect;
return new MixEffect;
case LIFT_GAMMA_GAIN_EFFECT:
return new LiftGammaGainEffect;
+ case BLUR_EFFECT:
+ return new BlurEffect;
+ case UNSHARP_MASK_EFFECT:
+ return new UnsharpMaskEffect;
default:
fprintf(stderr, "Unhandled effect type %d\n", effect_type);
abort();
default:
fprintf(stderr, "Unhandled effect type %d\n", effect_type);
abort();
return wrap_lua_object_nonowned<EffectBlueprint>(L, "EffectBlueprint", LIFT_GAMMA_GAIN_EFFECT);
}
return wrap_lua_object_nonowned<EffectBlueprint>(L, "EffectBlueprint", LIFT_GAMMA_GAIN_EFFECT);
}
+int BlurEffect_new(lua_State* L)
+{
+ assert(lua_gettop(L) == 0);
+ return wrap_lua_object_nonowned<EffectBlueprint>(L, "EffectBlueprint", BLUR_EFFECT);
+}
+
+int UnsharpMaskEffect_new(lua_State* L)
+{
+ assert(lua_gettop(L) == 0);
+ return wrap_lua_object_nonowned<EffectBlueprint>(L, "EffectBlueprint", UNSHARP_MASK_EFFECT);
+}
+
int InputStateInfo_get_width(lua_State* L)
{
assert(lua_gettop(L) == 2);
int InputStateInfo_get_width(lua_State* L)
{
assert(lua_gettop(L) == 2);
+const luaL_Reg BlurEffect_funcs[] = {
+ { "new", BlurEffect_new },
+ { NULL, NULL }
+};
+
+const luaL_Reg UnsharpMaskEffect_funcs[] = {
+ { "new", UnsharpMaskEffect_new },
+ { NULL, NULL }
+};
+
// End of effects.
const luaL_Reg InputStateInfo_funcs[] = {
// End of effects.
const luaL_Reg InputStateInfo_funcs[] = {
register_class("ResizeEffect", ResizeEffect_funcs, RESIZE_EFFECT);
register_class("MultiplyEffect", MultiplyEffect_funcs, MULTIPLY_EFFECT);
register_class("MixEffect", MixEffect_funcs, MIX_EFFECT);
register_class("ResizeEffect", ResizeEffect_funcs, RESIZE_EFFECT);
register_class("MultiplyEffect", MultiplyEffect_funcs, MULTIPLY_EFFECT);
register_class("MixEffect", MixEffect_funcs, MIX_EFFECT);
+ register_class("BlurEffect", BlurEffect_funcs, BLUR_EFFECT);
+ register_class("UnsharpMaskEffect", UnsharpMaskEffect_funcs, UNSHARP_MASK_EFFECT);
register_class("LiftGammaGainEffect", LiftGammaGainEffect_funcs, LIFT_GAMMA_GAIN_EFFECT);
register_class("InputStateInfo", InputStateInfo_funcs);
register_class("ThemeMenu", ThemeMenu_funcs);
register_class("LiftGammaGainEffect", LiftGammaGainEffect_funcs, LIFT_GAMMA_GAIN_EFFECT);
register_class("InputStateInfo", InputStateInfo_funcs);
register_class("ThemeMenu", ThemeMenu_funcs);
MULTIPLY_EFFECT,
MIX_EFFECT,
LIFT_GAMMA_GAIN_EFFECT,
MULTIPLY_EFFECT,
MIX_EFFECT,
LIFT_GAMMA_GAIN_EFFECT,
+ BLUR_EFFECT,
+ UNSHARP_MASK_EFFECT,