/*
 * this code is auto generated. do not edit. change the sources in tools/introspection/ instead.
 *
 * the parse tree:
 *
 * typedef
 *   struct dt_iop_demosaic_params_t
 *     enum dt_iop_demosaic_greeneq_t
 *       DT_IOP_GREEN_EQ_NO : disabled
 *       DT_IOP_GREEN_EQ_LOCAL : local average
 *       DT_IOP_GREEN_EQ_FULL : full average
 *       DT_IOP_GREEN_EQ_BOTH : full and local average
 *     green_eq 
 *       description: match greens
 *       default: DT_IOP_GREEN_EQ_NO
 * 
 *     float
 *     median_thrs 
 *       description: edge threshold
 *       default: 0.0
 *       range: 0.0 .. 1.0
 * 
 *     enum dt_iop_demosaic_smooth_t
 *       DT_DEMOSAIC_SMOOTH_OFF : disabled
 *       DT_DEMOSAIC_SMOOTH_1 : once
 *       DT_DEMOSAIC_SMOOTH_2 : twice
 *       DT_DEMOSAIC_SMOOTH_3 : three times
 *       DT_DEMOSAIC_SMOOTH_4 : four times
 *       DT_DEMOSAIC_SMOOTH_5 : five times
 *     color_smoothing 
 *       description: color smoothing
 *       default: DT_DEMOSAIC_SMOOTH_OFF
 * 
 *     enum dt_iop_demosaic_method_t
 *       DT_IOP_DEMOSAIC_PPG : PPG
 *       DT_IOP_DEMOSAIC_AMAZE : AMaZE
 *       DT_IOP_DEMOSAIC_VNG4 : VNG4
 *       DT_IOP_DEMOSAIC_RCD : RCD
 *       DT_IOP_DEMOSAIC_LMMSE : LMMSE
 *       DT_IOP_DEMOSAIC_RCD_DUAL : RCD (dual)
 *       DT_IOP_DEMOSAIC_AMAZE_DUAL : AMaZE (dual)
 *       DT_IOP_DEMOSAIC_PASSTHROUGH_MONOCHROME : passthrough (monochrome)
 *       DT_IOP_DEMOSAIC_PASSTHROUGH_COLOR : photosite color (debug)
 *       DT_IOP_DEMOSAIC_VNG : VNG
 *       DT_IOP_DEMOSAIC_MARKESTEIJN : Markesteijn 1-pass
 *       DT_IOP_DEMOSAIC_MARKESTEIJN_3 : Markesteijn 3-pass
 *       DT_IOP_DEMOSAIC_FDC : frequency domain chroma
 *       DT_IOP_DEMOSAIC_MARKEST3_DUAL : Markesteijn 3-pass (dual)
 *       DT_IOP_DEMOSAIC_PASSTHR_MONOX : passthrough (monochrome)
 *       DT_IOP_DEMOSAIC_PASSTHR_COLORX : photosite color (debug)
 *       DT_IOP_DEMOSAIC_MONO : Monochrome
 *     demosaicing_method 
 *       description: method
 *       default: DT_IOP_DEMOSAIC_RCD
 * 
 *     enum dt_iop_demosaic_lmmse_t
 *       DT_LMMSE_REFINE_0 : basic
 *       DT_LMMSE_REFINE_1 : median
 *       DT_LMMSE_REFINE_2 : 3x median
 *       DT_LMMSE_REFINE_3 : refine & medians
 *       DT_LMMSE_REFINE_4 : 2x refine + medians
 *     lmmse_refine 
 *       description: LMMSE refine
 *       default: DT_LMMSE_REFINE_1
 * 
 *     float
 *     dual_thrs 
 *       description: dual threshold
 *       default: 0.2
 *       range: 0.0 .. 1.0
 * 
 *     float
 *     cs_radius 
 *       description: radius
 *       default: 0.0
 *       range: 0.0 .. 1.5
 * 
 *     float
 *     cs_thrs 
 *       description: contrast sensitivity
 *       default: 0.40
 *       range: 0.0 .. 1.0
 * 
 *     float
 *     cs_boost 
 *       description: corner boost
 *       default: 0.0
 *       range: 0.0 .. 1.5
 * 
 *     int
 *     cs_iter 
 *       description: iterations
 *       default: 8
 *       range: 1 .. 25
 * 
 *     float
 *     cs_center 
 *       description: sharp center
 *       default: 0.0
 *       range: 0.0 .. 1.0
 * 
 *     boolean
 *     cs_enabled 
 *       description: capture sharpen
 *       default: FALSE
 * 
 * dt_iop_demosaic_params_t
 *
 */

#include "/build/darktable/src/darktable-5.6.0/src/iop/demosaic.c"

#ifdef __cplusplus
extern "C"
{
#endif

#include <string.h>
#include "common/introspection.h"

static dt_introspection_field_t introspection_linear[13+1]
#if !( defined(__cplusplus) && !defined(__clang__) && defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) <= 406) )
= {
{
  .Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_demosaic_greeneq_t", (char*)"green_eq", (char*)"green_eq", N_((char*)"match greens"), sizeof(((dt_iop_demosaic_params_t*)NULL)->green_eq), G_STRUCT_OFFSET(dt_iop_demosaic_params_t, green_eq), NULL },
    /*entries*/ 4, /*values*/ NULL, /*Default*/ DT_IOP_GREEN_EQ_NO
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"median_thrs", (char*)"median_thrs", N_((char*)"edge threshold"), sizeof(((dt_iop_demosaic_params_t*)NULL)->median_thrs), G_STRUCT_OFFSET(dt_iop_demosaic_params_t, median_thrs), NULL },
    /*Min*/ 0.0, /*Max*/ 1.0, /*Default*/ 0.0
  }
},
{
  .Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_demosaic_smooth_t", (char*)"color_smoothing", (char*)"color_smoothing", N_((char*)"color smoothing"), sizeof(((dt_iop_demosaic_params_t*)NULL)->color_smoothing), G_STRUCT_OFFSET(dt_iop_demosaic_params_t, color_smoothing), NULL },
    /*entries*/ 6, /*values*/ NULL, /*Default*/ DT_DEMOSAIC_SMOOTH_OFF
  }
},
{
  .Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_demosaic_method_t", (char*)"demosaicing_method", (char*)"demosaicing_method", N_((char*)"method"), sizeof(((dt_iop_demosaic_params_t*)NULL)->demosaicing_method), G_STRUCT_OFFSET(dt_iop_demosaic_params_t, demosaicing_method), NULL },
    /*entries*/ 17, /*values*/ NULL, /*Default*/ DT_IOP_DEMOSAIC_RCD
  }
},
{
  .Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_demosaic_lmmse_t", (char*)"lmmse_refine", (char*)"lmmse_refine", N_((char*)"LMMSE refine"), sizeof(((dt_iop_demosaic_params_t*)NULL)->lmmse_refine), G_STRUCT_OFFSET(dt_iop_demosaic_params_t, lmmse_refine), NULL },
    /*entries*/ 5, /*values*/ NULL, /*Default*/ DT_LMMSE_REFINE_1
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"dual_thrs", (char*)"dual_thrs", N_((char*)"dual threshold"), sizeof(((dt_iop_demosaic_params_t*)NULL)->dual_thrs), G_STRUCT_OFFSET(dt_iop_demosaic_params_t, dual_thrs), NULL },
    /*Min*/ 0.0, /*Max*/ 1.0, /*Default*/ 0.2
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"cs_radius", (char*)"cs_radius", N_((char*)"radius"), sizeof(((dt_iop_demosaic_params_t*)NULL)->cs_radius), G_STRUCT_OFFSET(dt_iop_demosaic_params_t, cs_radius), NULL },
    /*Min*/ 0.0, /*Max*/ 1.5, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"cs_thrs", (char*)"cs_thrs", N_((char*)"contrast sensitivity"), sizeof(((dt_iop_demosaic_params_t*)NULL)->cs_thrs), G_STRUCT_OFFSET(dt_iop_demosaic_params_t, cs_thrs), NULL },
    /*Min*/ 0.0, /*Max*/ 1.0, /*Default*/ 0.40
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"cs_boost", (char*)"cs_boost", N_((char*)"corner boost"), sizeof(((dt_iop_demosaic_params_t*)NULL)->cs_boost), G_STRUCT_OFFSET(dt_iop_demosaic_params_t, cs_boost), NULL },
    /*Min*/ 0.0, /*Max*/ 1.5, /*Default*/ 0.0
  }
},
{
  .Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"cs_iter", (char*)"cs_iter", N_((char*)"iterations"), sizeof(((dt_iop_demosaic_params_t*)NULL)->cs_iter), G_STRUCT_OFFSET(dt_iop_demosaic_params_t, cs_iter), NULL },
    /*Min*/ 1, /*Max*/ 25, /*Default*/ 8
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"cs_center", (char*)"cs_center", N_((char*)"sharp center"), sizeof(((dt_iop_demosaic_params_t*)NULL)->cs_center), G_STRUCT_OFFSET(dt_iop_demosaic_params_t, cs_center), NULL },
    /*Min*/ 0.0, /*Max*/ 1.0, /*Default*/ 0.0
  }
},
{
  .Bool = {
    { DT_INTROSPECTION_TYPE_BOOL, (char*)"bool", (char*)"cs_enabled", (char*)"cs_enabled", N_((char*)"capture sharpen"), sizeof(((dt_iop_demosaic_params_t*)NULL)->cs_enabled), G_STRUCT_OFFSET(dt_iop_demosaic_params_t, cs_enabled), NULL },
    /*Default*/ FALSE
  }
},
{
  .Struct = {
    { DT_INTROSPECTION_TYPE_STRUCT, (char*)"dt_iop_demosaic_params_t", (char*)"", (char*)"", (char*)"", sizeof(dt_iop_demosaic_params_t), 0, NULL },
    /*entries*/ 12, /*fields*/ NULL
  }
},
  { .header = {DT_INTROSPECTION_TYPE_NONE, NULL, NULL, NULL, NULL, 0, 0, NULL} }
}
#endif
;

static dt_introspection_t introspection = {
  8,
  6,
  "dt_iop_demosaic_params_t",
  sizeof(dt_iop_demosaic_params_t),
  &introspection_linear[13-1],
  sizeof(dt_iop_module_t),
  G_STRUCT_OFFSET(dt_iop_module_t, default_params)
};

dt_introspection_field_t* get_introspection_linear()
{
  return introspection_linear;
}

dt_introspection_t* get_introspection()
{
  return &introspection;
}

int introspection_init(struct dt_iop_module_so_t *self, int api_version)
{
  // here we check that the generated code matches the api at compile time and also at runtime
  if(introspection.api_version != DT_INTROSPECTION_VERSION || api_version != DT_INTROSPECTION_VERSION)
    return 1;

#if defined(__cplusplus) && !defined(__clang__) && defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) <= 406)
  introspection_linear[0].Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_demosaic_greeneq_t", (char*)"green_eq", (char*)"green_eq", N_((char*)"match greens"), sizeof(((dt_iop_demosaic_params_t*)NULL)->green_eq), G_STRUCT_OFFSET(dt_iop_demosaic_params_t, green_eq), NULL },
    /*entries*/ 4, /*values*/ NULL, /*Default*/ DT_IOP_GREEN_EQ_NO
  };
  introspection_linear[1].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"median_thrs", (char*)"median_thrs", N_((char*)"edge threshold"), sizeof(((dt_iop_demosaic_params_t*)NULL)->median_thrs), G_STRUCT_OFFSET(dt_iop_demosaic_params_t, median_thrs), NULL },
    /*Min*/ 0.0, /*Max*/ 1.0, /*Default*/ 0.0
  };
  introspection_linear[2].Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_demosaic_smooth_t", (char*)"color_smoothing", (char*)"color_smoothing", N_((char*)"color smoothing"), sizeof(((dt_iop_demosaic_params_t*)NULL)->color_smoothing), G_STRUCT_OFFSET(dt_iop_demosaic_params_t, color_smoothing), NULL },
    /*entries*/ 6, /*values*/ NULL, /*Default*/ DT_DEMOSAIC_SMOOTH_OFF
  };
  introspection_linear[3].Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_demosaic_method_t", (char*)"demosaicing_method", (char*)"demosaicing_method", N_((char*)"method"), sizeof(((dt_iop_demosaic_params_t*)NULL)->demosaicing_method), G_STRUCT_OFFSET(dt_iop_demosaic_params_t, demosaicing_method), NULL },
    /*entries*/ 17, /*values*/ NULL, /*Default*/ DT_IOP_DEMOSAIC_RCD
  };
  introspection_linear[4].Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_demosaic_lmmse_t", (char*)"lmmse_refine", (char*)"lmmse_refine", N_((char*)"LMMSE refine"), sizeof(((dt_iop_demosaic_params_t*)NULL)->lmmse_refine), G_STRUCT_OFFSET(dt_iop_demosaic_params_t, lmmse_refine), NULL },
    /*entries*/ 5, /*values*/ NULL, /*Default*/ DT_LMMSE_REFINE_1
  };
  introspection_linear[5].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"dual_thrs", (char*)"dual_thrs", N_((char*)"dual threshold"), sizeof(((dt_iop_demosaic_params_t*)NULL)->dual_thrs), G_STRUCT_OFFSET(dt_iop_demosaic_params_t, dual_thrs), NULL },
    /*Min*/ 0.0, /*Max*/ 1.0, /*Default*/ 0.2
  };
  introspection_linear[6].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"cs_radius", (char*)"cs_radius", N_((char*)"radius"), sizeof(((dt_iop_demosaic_params_t*)NULL)->cs_radius), G_STRUCT_OFFSET(dt_iop_demosaic_params_t, cs_radius), NULL },
    /*Min*/ 0.0, /*Max*/ 1.5, /*Default*/ 0.0
  };
  introspection_linear[7].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"cs_thrs", (char*)"cs_thrs", N_((char*)"contrast sensitivity"), sizeof(((dt_iop_demosaic_params_t*)NULL)->cs_thrs), G_STRUCT_OFFSET(dt_iop_demosaic_params_t, cs_thrs), NULL },
    /*Min*/ 0.0, /*Max*/ 1.0, /*Default*/ 0.40
  };
  introspection_linear[8].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"cs_boost", (char*)"cs_boost", N_((char*)"corner boost"), sizeof(((dt_iop_demosaic_params_t*)NULL)->cs_boost), G_STRUCT_OFFSET(dt_iop_demosaic_params_t, cs_boost), NULL },
    /*Min*/ 0.0, /*Max*/ 1.5, /*Default*/ 0.0
  };
  introspection_linear[9].Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"cs_iter", (char*)"cs_iter", N_((char*)"iterations"), sizeof(((dt_iop_demosaic_params_t*)NULL)->cs_iter), G_STRUCT_OFFSET(dt_iop_demosaic_params_t, cs_iter), NULL },
    /*Min*/ 1, /*Max*/ 25, /*Default*/ 8
  };
  introspection_linear[10].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"cs_center", (char*)"cs_center", N_((char*)"sharp center"), sizeof(((dt_iop_demosaic_params_t*)NULL)->cs_center), G_STRUCT_OFFSET(dt_iop_demosaic_params_t, cs_center), NULL },
    /*Min*/ 0.0, /*Max*/ 1.0, /*Default*/ 0.0
  };
  introspection_linear[11].Bool = {
    { DT_INTROSPECTION_TYPE_BOOL, (char*)"bool", (char*)"cs_enabled", (char*)"cs_enabled", N_((char*)"capture sharpen"), sizeof(((dt_iop_demosaic_params_t*)NULL)->cs_enabled), G_STRUCT_OFFSET(dt_iop_demosaic_params_t, cs_enabled), NULL },
    /*Default*/ FALSE
  };
  introspection_linear[12].Struct = {
    { DT_INTROSPECTION_TYPE_STRUCT, (char*)"dt_iop_demosaic_params_t", (char*)"", (char*)"", (char*)"", sizeof(dt_iop_demosaic_params_t), 0, NULL },
    /*entries*/ 12, /*fields*/ NULL
  };
  introspection_linear[13].header = {DT_INTROSPECTION_TYPE_NONE, NULL, NULL, NULL, NULL, 0, 0, NULL};
#endif

  for(int i = 0; i <= 13; i++)
    introspection_linear[i].header.so = self;

  static dt_introspection_type_enum_tuple_t f0[] = { 
    { "DT_IOP_GREEN_EQ_NO", DT_IOP_GREEN_EQ_NO, N_((char*)"disabled") },
    { "DT_IOP_GREEN_EQ_LOCAL", DT_IOP_GREEN_EQ_LOCAL, N_((char*)"local average") },
    { "DT_IOP_GREEN_EQ_FULL", DT_IOP_GREEN_EQ_FULL, N_((char*)"full average") },
    { "DT_IOP_GREEN_EQ_BOTH", DT_IOP_GREEN_EQ_BOTH, N_((char*)"full and local average") },
    { NULL, 0 },
  };
  static dt_introspection_type_enum_tuple_t f2[] = { 
    { "DT_DEMOSAIC_SMOOTH_OFF", DT_DEMOSAIC_SMOOTH_OFF, N_((char*)"disabled") },
    { "DT_DEMOSAIC_SMOOTH_1", DT_DEMOSAIC_SMOOTH_1, N_((char*)"once") },
    { "DT_DEMOSAIC_SMOOTH_2", DT_DEMOSAIC_SMOOTH_2, N_((char*)"twice") },
    { "DT_DEMOSAIC_SMOOTH_3", DT_DEMOSAIC_SMOOTH_3, N_((char*)"three times") },
    { "DT_DEMOSAIC_SMOOTH_4", DT_DEMOSAIC_SMOOTH_4, N_((char*)"four times") },
    { "DT_DEMOSAIC_SMOOTH_5", DT_DEMOSAIC_SMOOTH_5, N_((char*)"five times") },
    { NULL, 0 },
  };
  static dt_introspection_type_enum_tuple_t f3[] = { 
    { "DT_IOP_DEMOSAIC_PPG", DT_IOP_DEMOSAIC_PPG, N_((char*)"PPG") },
    { "DT_IOP_DEMOSAIC_AMAZE", DT_IOP_DEMOSAIC_AMAZE, N_((char*)"AMaZE") },
    { "DT_IOP_DEMOSAIC_VNG4", DT_IOP_DEMOSAIC_VNG4, N_((char*)"VNG4") },
    { "DT_IOP_DEMOSAIC_RCD", DT_IOP_DEMOSAIC_RCD, N_((char*)"RCD") },
    { "DT_IOP_DEMOSAIC_LMMSE", DT_IOP_DEMOSAIC_LMMSE, N_((char*)"LMMSE") },
    { "DT_IOP_DEMOSAIC_RCD_DUAL", DT_IOP_DEMOSAIC_RCD_DUAL, N_((char*)"RCD (dual)") },
    { "DT_IOP_DEMOSAIC_AMAZE_DUAL", DT_IOP_DEMOSAIC_AMAZE_DUAL, N_((char*)"AMaZE (dual)") },
    { "DT_IOP_DEMOSAIC_PASSTHROUGH_MONOCHROME", DT_IOP_DEMOSAIC_PASSTHROUGH_MONOCHROME, N_((char*)"passthrough (monochrome)") },
    { "DT_IOP_DEMOSAIC_PASSTHROUGH_COLOR", DT_IOP_DEMOSAIC_PASSTHROUGH_COLOR, N_((char*)"photosite color (debug)") },
    { "DT_IOP_DEMOSAIC_VNG", DT_IOP_DEMOSAIC_VNG, N_((char*)"VNG") },
    { "DT_IOP_DEMOSAIC_MARKESTEIJN", DT_IOP_DEMOSAIC_MARKESTEIJN, N_((char*)"Markesteijn 1-pass") },
    { "DT_IOP_DEMOSAIC_MARKESTEIJN_3", DT_IOP_DEMOSAIC_MARKESTEIJN_3, N_((char*)"Markesteijn 3-pass") },
    { "DT_IOP_DEMOSAIC_FDC", DT_IOP_DEMOSAIC_FDC, N_((char*)"frequency domain chroma") },
    { "DT_IOP_DEMOSAIC_MARKEST3_DUAL", DT_IOP_DEMOSAIC_MARKEST3_DUAL, N_((char*)"Markesteijn 3-pass (dual)") },
    { "DT_IOP_DEMOSAIC_PASSTHR_MONOX", DT_IOP_DEMOSAIC_PASSTHR_MONOX, N_((char*)"passthrough (monochrome)") },
    { "DT_IOP_DEMOSAIC_PASSTHR_COLORX", DT_IOP_DEMOSAIC_PASSTHR_COLORX, N_((char*)"photosite color (debug)") },
    { "DT_IOP_DEMOSAIC_MONO", DT_IOP_DEMOSAIC_MONO, N_((char*)"Monochrome") },
    { NULL, 0 },
  };
  static dt_introspection_type_enum_tuple_t f4[] = { 
    { "DT_LMMSE_REFINE_0", DT_LMMSE_REFINE_0, N_((char*)"basic") },
    { "DT_LMMSE_REFINE_1", DT_LMMSE_REFINE_1, N_((char*)"median") },
    { "DT_LMMSE_REFINE_2", DT_LMMSE_REFINE_2, N_((char*)"3x median") },
    { "DT_LMMSE_REFINE_3", DT_LMMSE_REFINE_3, N_((char*)"refine & medians") },
    { "DT_LMMSE_REFINE_4", DT_LMMSE_REFINE_4, N_((char*)"2x refine + medians") },
    { NULL, 0 },
  };
  static dt_introspection_field_t *f12[] = {
    &introspection_linear[0],
    &introspection_linear[1],
    &introspection_linear[2],
    &introspection_linear[3],
    &introspection_linear[4],
    &introspection_linear[5],
    &introspection_linear[6],
    &introspection_linear[7],
    &introspection_linear[8],
    &introspection_linear[9],
    &introspection_linear[10],
    &introspection_linear[11],
    NULL
  };

  introspection_linear[0].Enum.values = f0;
  introspection_linear[2].Enum.values = f2;
  introspection_linear[3].Enum.values = f3;
  introspection_linear[4].Enum.values = f4;
  introspection_linear[12].Struct.fields = f12;

  return 0;
}

void * get_p(const void * param, const char * name)
{
  dt_iop_demosaic_params_t * p = (dt_iop_demosaic_params_t*)param;
  if(!strcmp(name, "green_eq"))
    return &(p->green_eq);
  else if(!strcmp(name, "median_thrs"))
    return &(p->median_thrs);
  else if(!strcmp(name, "color_smoothing"))
    return &(p->color_smoothing);
  else if(!strcmp(name, "demosaicing_method"))
    return &(p->demosaicing_method);
  else if(!strcmp(name, "lmmse_refine"))
    return &(p->lmmse_refine);
  else if(!strcmp(name, "dual_thrs"))
    return &(p->dual_thrs);
  else if(!strcmp(name, "cs_radius"))
    return &(p->cs_radius);
  else if(!strcmp(name, "cs_thrs"))
    return &(p->cs_thrs);
  else if(!strcmp(name, "cs_boost"))
    return &(p->cs_boost);
  else if(!strcmp(name, "cs_iter"))
    return &(p->cs_iter);
  else if(!strcmp(name, "cs_center"))
    return &(p->cs_center);
  else if(!strcmp(name, "cs_enabled"))
    return &(p->cs_enabled);
  else
    return NULL;
}

dt_introspection_field_t * get_f(const char * name)
{
  if(!g_ascii_strcasecmp(name, "green_eq"))
    return &(introspection_linear[0]);
  else if(!g_ascii_strcasecmp(name, "median_thrs"))
    return &(introspection_linear[1]);
  else if(!g_ascii_strcasecmp(name, "color_smoothing"))
    return &(introspection_linear[2]);
  else if(!g_ascii_strcasecmp(name, "demosaicing_method"))
    return &(introspection_linear[3]);
  else if(!g_ascii_strcasecmp(name, "lmmse_refine"))
    return &(introspection_linear[4]);
  else if(!g_ascii_strcasecmp(name, "dual_thrs"))
    return &(introspection_linear[5]);
  else if(!g_ascii_strcasecmp(name, "cs_radius"))
    return &(introspection_linear[6]);
  else if(!g_ascii_strcasecmp(name, "cs_thrs"))
    return &(introspection_linear[7]);
  else if(!g_ascii_strcasecmp(name, "cs_boost"))
    return &(introspection_linear[8]);
  else if(!g_ascii_strcasecmp(name, "cs_iter"))
    return &(introspection_linear[9]);
  else if(!g_ascii_strcasecmp(name, "cs_center"))
    return &(introspection_linear[10]);
  else if(!g_ascii_strcasecmp(name, "cs_enabled"))
    return &(introspection_linear[11]);
  else
    return NULL;
}

#ifdef __cplusplus
}
#endif

