From 0c2a0a67b611ee87280bbdd8dc7e5f8179a97f56 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 4 Dec 2013 01:51:27 +0100 Subject: vf_eq: revert unintended binary size increase The vf_eq context contains a very large lookup table, and the method of setting default values caused the vf_eq context to be included in the compiled code. --- video/filter/vf_eq.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/video/filter/vf_eq.c b/video/filter/vf_eq.c index c61c8f249b..a8341a64a0 100644 --- a/video/filter/vf_eq.c +++ b/video/filter/vf_eq.c @@ -506,20 +506,17 @@ const vf_info_t vf_info_eq = { .name = "eq", .open = &vf_open, .priv_size = sizeof(struct vf_priv_s), - .priv_defaults = &(const struct vf_priv_s){ - .par = {1.0, 1.0, 0.0, 1.0, 1.0, 1.0, 1.0, 1.0}, - }, .options = (const struct m_option[]){ -#define PARAM(name, n, min_, max_) \ - OPT_DOUBLE(name, par[n], CONF_RANGE, .min = min_, .max = max_) - PARAM("gamma", 0, 0.1, 10), - PARAM("contrast", 1, -2, 2), - PARAM("brightness", 2, -1, 1), - PARAM("saturation", 3, 0, 3), - PARAM("rg", 4, 0.1, 10), - PARAM("gg", 5, 0.1, 10), - PARAM("bg", 6, 0.1, 10), - PARAM("weight", 7, 0, 1), +#define PARAM(name, n, def, min_, max_) \ + OPT_DOUBLE(name, par[n], CONF_RANGE, .min = min_, .max = max_, OPTDEF_DOUBLE(def)) + PARAM("gamma", 0, 1.0, 0.1, 10), + PARAM("contrast", 1, 1.0, -2, 2), + PARAM("brightness", 2, 0.0, -1, 1), + PARAM("saturation", 3, 1.0, 0, 3), + PARAM("rg", 4, 1.0, 0.1, 10), + PARAM("gg", 5, 1.0, 0.1, 10), + PARAM("bg", 6, 1.0, 0.1, 10), + PARAM("weight", 7, 1.0, 0, 1), {0} }, }; -- cgit v1.2.3