/*
 * this code is auto generated. do not edit. change the sources in tools/introspection/ instead.
 *
 * the parse tree:
 *
 * typedef
 *   struct dt_iop_denoiseprofile_params_t
 *     float
 *     radius 
 *       description: patch size
 *       default: 1.0
 *       range: 0.0 .. 12.0
 * 
 *     float
 *     nbhood 
 *       description: search radius
 *       default: 7.0
 *       range: 1.0 .. 30.0
 * 
 *     float
 *     strength 
 *       default: 1.0
 *       range: 0.001 .. 1000.0
 * 
 *     float
 *     shadows 
 *       description: preserve shadows
 *       default: 1.0
 *       range: 0.0 .. 1.8
 * 
 *     float
 *     bias 
 *       description: bias correction
 *       default: 0.0
 *       range: -1000.0 .. 100.0
 * 
 *     float
 *     scattering 
 *       description: scattering
 *       default: 0.0
 *       range: 0.0 .. 20.0
 * 
 *     float
 *     central_pixel_weight 
 *       description: central pixel weight
 *       default: 0.1
 *       range: 0.0 .. 10.0
 * 
 *     float
 *     overshooting 
 *       description: adjust autoset parameters
 *       default: 1.0
 *       range: 0.001 .. 1000.0
 * 
 *     float
 *     a [3]
 *       default: 0.0
 *       range: -G_MAXFLOAT .. G_MAXFLOAT
 * 
 *     float
 *     b [3]
 *       default: 0.0
 *       range: -G_MAXFLOAT .. G_MAXFLOAT
 * 
 *     enum dt_iop_denoiseprofile_mode_t
 *       MODE_NLMEANS : non-local means
 *       MODE_NLMEANS_AUTO : non-local means auto
 *       MODE_WAVELETS : wavelets
 *       MODE_WAVELETS_AUTO : wavelets auto
 *       MODE_VARIANCE : compute variance
 *     mode 
 *       default: MODE_WAVELETS
 * 
 *     float
 *     x [DT_DENOISE_PROFILE_NONE][DT_IOP_DENOISE_PROFILE_BANDS]
 *       default: 0.0
 *       range: -G_MAXFLOAT .. G_MAXFLOAT
 * 
 *     float
 *     y [DT_DENOISE_PROFILE_NONE][DT_IOP_DENOISE_PROFILE_BANDS]
 *       default: 0.5
 *       range: -G_MAXFLOAT .. G_MAXFLOAT
 * 
 *     boolean
 *     wb_adaptive_anscombe 
 *       description: whitebalance-adaptive transform
 *       default: TRUE
 * 
 *     boolean
 *     fix_anscombe_and_nlmeans_norm 
 *       description: fix various bugs in algorithm
 *       default: TRUE
 * 
 *     boolean
 *     use_new_vst 
 *       description: upgrade profiled transform
 *       default: TRUE
 * 
 *     enum dt_iop_denoiseprofile_wavelet_mode_t
 *       MODE_RGB : RGB
 *       MODE_Y0U0V0 : Y0U0V0
 *     wavelet_color_mode 
 *       description: color mode
 *       default: MODE_Y0U0V0
 * 
 *     boolean
 *     compensate_hilite_pres 
 *       description: compensate highlight preservation
 *       default: TRUE
 * 
 * dt_iop_denoiseprofile_params_t
 *
 */

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

#ifdef __cplusplus
extern "C"
{
#endif

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

static dt_introspection_field_t introspection_linear[25+1]
#if !( defined(__cplusplus) && !defined(__clang__) && defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) <= 406) )
= {
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"radius", (char*)"radius", N_((char*)"patch size"), sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->radius), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, radius), NULL },
    /*Min*/ 0.0, /*Max*/ 12.0, /*Default*/ 1.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"nbhood", (char*)"nbhood", N_((char*)"search radius"), sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->nbhood), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, nbhood), NULL },
    /*Min*/ 1.0, /*Max*/ 30.0, /*Default*/ 7.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"strength", (char*)"strength", (char*)"", sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->strength), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, strength), NULL },
    /*Min*/ 0.001, /*Max*/ 1000.0, /*Default*/ 1.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"shadows", (char*)"shadows", N_((char*)"preserve shadows"), sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->shadows), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, shadows), NULL },
    /*Min*/ 0.0, /*Max*/ 1.8, /*Default*/ 1.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"bias", (char*)"bias", N_((char*)"bias correction"), sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->bias), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, bias), NULL },
    /*Min*/ -1000.0, /*Max*/ 100.0, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"scattering", (char*)"scattering", N_((char*)"scattering"), sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->scattering), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, scattering), NULL },
    /*Min*/ 0.0, /*Max*/ 20.0, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"central_pixel_weight", (char*)"central_pixel_weight", N_((char*)"central pixel weight"), sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->central_pixel_weight), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, central_pixel_weight), NULL },
    /*Min*/ 0.0, /*Max*/ 10.0, /*Default*/ 0.1
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"overshooting", (char*)"overshooting", N_((char*)"adjust autoset parameters"), sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->overshooting), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, overshooting), NULL },
    /*Min*/ 0.001, /*Max*/ 1000.0, /*Default*/ 1.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"a[0]", (char*)"a[0]", (char*)"", sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->a[0]), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, a), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  }
},
{
  .Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"float[]", (char*)"a", (char*)"a", (char*)"", sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->a), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, a), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_denoiseprofile_params_t*)NULL)->a), /*type*/ DT_INTROSPECTION_TYPE_FLOAT, /*field*/ &introspection_linear[8]
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"b[0]", (char*)"b[0]", (char*)"", sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->b[0]), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, b), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  }
},
{
  .Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"float[]", (char*)"b", (char*)"b", (char*)"", sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->b), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, b), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_denoiseprofile_params_t*)NULL)->b), /*type*/ DT_INTROSPECTION_TYPE_FLOAT, /*field*/ &introspection_linear[10]
  }
},
{
  .Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_denoiseprofile_mode_t", (char*)"mode", (char*)"mode", (char*)"", sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->mode), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, mode), NULL },
    /*entries*/ 5, /*values*/ NULL, /*Default*/ MODE_WAVELETS
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"x[0][0]", (char*)"x[0][0]", (char*)"", sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->x[0][0]), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, x), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  }
},
{
  .Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"float[]", (char*)"x[0]", (char*)"x[0]", (char*)"", sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->x[0]), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, x), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_denoiseprofile_params_t*)NULL)->x[0]), /*type*/ DT_INTROSPECTION_TYPE_FLOAT, /*field*/ &introspection_linear[13]
  }
},
{
  .Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"float[][]", (char*)"x", (char*)"x", (char*)"", sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->x), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, x), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_denoiseprofile_params_t*)NULL)->x), /*type*/ DT_INTROSPECTION_TYPE_ARRAY, /*field*/ &introspection_linear[14]
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"y[0][0]", (char*)"y[0][0]", (char*)"", sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->y[0][0]), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, y), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.5
  }
},
{
  .Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"float[]", (char*)"y[0]", (char*)"y[0]", (char*)"", sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->y[0]), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, y), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_denoiseprofile_params_t*)NULL)->y[0]), /*type*/ DT_INTROSPECTION_TYPE_FLOAT, /*field*/ &introspection_linear[16]
  }
},
{
  .Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"float[][]", (char*)"y", (char*)"y", (char*)"", sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->y), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, y), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_denoiseprofile_params_t*)NULL)->y), /*type*/ DT_INTROSPECTION_TYPE_ARRAY, /*field*/ &introspection_linear[17]
  }
},
{
  .Bool = {
    { DT_INTROSPECTION_TYPE_BOOL, (char*)"bool", (char*)"wb_adaptive_anscombe", (char*)"wb_adaptive_anscombe", N_((char*)"whitebalance-adaptive transform"), sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->wb_adaptive_anscombe), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, wb_adaptive_anscombe), NULL },
    /*Default*/ TRUE
  }
},
{
  .Bool = {
    { DT_INTROSPECTION_TYPE_BOOL, (char*)"bool", (char*)"fix_anscombe_and_nlmeans_norm", (char*)"fix_anscombe_and_nlmeans_norm", N_((char*)"fix various bugs in algorithm"), sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->fix_anscombe_and_nlmeans_norm), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, fix_anscombe_and_nlmeans_norm), NULL },
    /*Default*/ TRUE
  }
},
{
  .Bool = {
    { DT_INTROSPECTION_TYPE_BOOL, (char*)"bool", (char*)"use_new_vst", (char*)"use_new_vst", N_((char*)"upgrade profiled transform"), sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->use_new_vst), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, use_new_vst), NULL },
    /*Default*/ TRUE
  }
},
{
  .Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_denoiseprofile_wavelet_mode_t", (char*)"wavelet_color_mode", (char*)"wavelet_color_mode", N_((char*)"color mode"), sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->wavelet_color_mode), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, wavelet_color_mode), NULL },
    /*entries*/ 2, /*values*/ NULL, /*Default*/ MODE_Y0U0V0
  }
},
{
  .Bool = {
    { DT_INTROSPECTION_TYPE_BOOL, (char*)"bool", (char*)"compensate_hilite_pres", (char*)"compensate_hilite_pres", N_((char*)"compensate highlight preservation"), sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->compensate_hilite_pres), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, compensate_hilite_pres), NULL },
    /*Default*/ TRUE
  }
},
{
  .Struct = {
    { DT_INTROSPECTION_TYPE_STRUCT, (char*)"dt_iop_denoiseprofile_params_t", (char*)"", (char*)"", (char*)"", sizeof(dt_iop_denoiseprofile_params_t), 0, NULL },
    /*entries*/ 18, /*fields*/ NULL
  }
},
  { .header = {DT_INTROSPECTION_TYPE_NONE, NULL, NULL, NULL, NULL, 0, 0, NULL} }
}
#endif
;

static dt_introspection_t introspection = {
  8,
  12,
  "dt_iop_denoiseprofile_params_t",
  sizeof(dt_iop_denoiseprofile_params_t),
  &introspection_linear[25-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].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"radius", (char*)"radius", N_((char*)"patch size"), sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->radius), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, radius), NULL },
    /*Min*/ 0.0, /*Max*/ 12.0, /*Default*/ 1.0
  };
  introspection_linear[1].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"nbhood", (char*)"nbhood", N_((char*)"search radius"), sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->nbhood), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, nbhood), NULL },
    /*Min*/ 1.0, /*Max*/ 30.0, /*Default*/ 7.0
  };
  introspection_linear[2].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"strength", (char*)"strength", (char*)"", sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->strength), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, strength), NULL },
    /*Min*/ 0.001, /*Max*/ 1000.0, /*Default*/ 1.0
  };
  introspection_linear[3].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"shadows", (char*)"shadows", N_((char*)"preserve shadows"), sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->shadows), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, shadows), NULL },
    /*Min*/ 0.0, /*Max*/ 1.8, /*Default*/ 1.0
  };
  introspection_linear[4].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"bias", (char*)"bias", N_((char*)"bias correction"), sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->bias), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, bias), NULL },
    /*Min*/ -1000.0, /*Max*/ 100.0, /*Default*/ 0.0
  };
  introspection_linear[5].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"scattering", (char*)"scattering", N_((char*)"scattering"), sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->scattering), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, scattering), NULL },
    /*Min*/ 0.0, /*Max*/ 20.0, /*Default*/ 0.0
  };
  introspection_linear[6].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"central_pixel_weight", (char*)"central_pixel_weight", N_((char*)"central pixel weight"), sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->central_pixel_weight), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, central_pixel_weight), NULL },
    /*Min*/ 0.0, /*Max*/ 10.0, /*Default*/ 0.1
  };
  introspection_linear[7].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"overshooting", (char*)"overshooting", N_((char*)"adjust autoset parameters"), sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->overshooting), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, overshooting), NULL },
    /*Min*/ 0.001, /*Max*/ 1000.0, /*Default*/ 1.0
  };
  introspection_linear[8].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"a[0]", (char*)"a[0]", (char*)"", sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->a[0]), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, a), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  };
  introspection_linear[9].Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"float[]", (char*)"a", (char*)"a", (char*)"", sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->a), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, a), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_denoiseprofile_params_t*)NULL)->a), /*type*/ DT_INTROSPECTION_TYPE_FLOAT, /*field*/ &introspection_linear[8]
  };
  introspection_linear[10].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"b[0]", (char*)"b[0]", (char*)"", sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->b[0]), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, b), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  };
  introspection_linear[11].Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"float[]", (char*)"b", (char*)"b", (char*)"", sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->b), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, b), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_denoiseprofile_params_t*)NULL)->b), /*type*/ DT_INTROSPECTION_TYPE_FLOAT, /*field*/ &introspection_linear[10]
  };
  introspection_linear[12].Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_denoiseprofile_mode_t", (char*)"mode", (char*)"mode", (char*)"", sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->mode), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, mode), NULL },
    /*entries*/ 5, /*values*/ NULL, /*Default*/ MODE_WAVELETS
  };
  introspection_linear[13].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"x[0][0]", (char*)"x[0][0]", (char*)"", sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->x[0][0]), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, x), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.0
  };
  introspection_linear[14].Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"float[]", (char*)"x[0]", (char*)"x[0]", (char*)"", sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->x[0]), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, x), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_denoiseprofile_params_t*)NULL)->x[0]), /*type*/ DT_INTROSPECTION_TYPE_FLOAT, /*field*/ &introspection_linear[13]
  };
  introspection_linear[15].Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"float[][]", (char*)"x", (char*)"x", (char*)"", sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->x), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, x), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_denoiseprofile_params_t*)NULL)->x), /*type*/ DT_INTROSPECTION_TYPE_ARRAY, /*field*/ &introspection_linear[14]
  };
  introspection_linear[16].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"y[0][0]", (char*)"y[0][0]", (char*)"", sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->y[0][0]), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, y), NULL },
    /*Min*/ -G_MAXFLOAT, /*Max*/ G_MAXFLOAT, /*Default*/ 0.5
  };
  introspection_linear[17].Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"float[]", (char*)"y[0]", (char*)"y[0]", (char*)"", sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->y[0]), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, y), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_denoiseprofile_params_t*)NULL)->y[0]), /*type*/ DT_INTROSPECTION_TYPE_FLOAT, /*field*/ &introspection_linear[16]
  };
  introspection_linear[18].Array = {
    { DT_INTROSPECTION_TYPE_ARRAY, (char*)"float[][]", (char*)"y", (char*)"y", (char*)"", sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->y), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, y), NULL },
    /*count*/ G_N_ELEMENTS(((dt_iop_denoiseprofile_params_t*)NULL)->y), /*type*/ DT_INTROSPECTION_TYPE_ARRAY, /*field*/ &introspection_linear[17]
  };
  introspection_linear[19].Bool = {
    { DT_INTROSPECTION_TYPE_BOOL, (char*)"bool", (char*)"wb_adaptive_anscombe", (char*)"wb_adaptive_anscombe", N_((char*)"whitebalance-adaptive transform"), sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->wb_adaptive_anscombe), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, wb_adaptive_anscombe), NULL },
    /*Default*/ TRUE
  };
  introspection_linear[20].Bool = {
    { DT_INTROSPECTION_TYPE_BOOL, (char*)"bool", (char*)"fix_anscombe_and_nlmeans_norm", (char*)"fix_anscombe_and_nlmeans_norm", N_((char*)"fix various bugs in algorithm"), sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->fix_anscombe_and_nlmeans_norm), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, fix_anscombe_and_nlmeans_norm), NULL },
    /*Default*/ TRUE
  };
  introspection_linear[21].Bool = {
    { DT_INTROSPECTION_TYPE_BOOL, (char*)"bool", (char*)"use_new_vst", (char*)"use_new_vst", N_((char*)"upgrade profiled transform"), sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->use_new_vst), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, use_new_vst), NULL },
    /*Default*/ TRUE
  };
  introspection_linear[22].Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_denoiseprofile_wavelet_mode_t", (char*)"wavelet_color_mode", (char*)"wavelet_color_mode", N_((char*)"color mode"), sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->wavelet_color_mode), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, wavelet_color_mode), NULL },
    /*entries*/ 2, /*values*/ NULL, /*Default*/ MODE_Y0U0V0
  };
  introspection_linear[23].Bool = {
    { DT_INTROSPECTION_TYPE_BOOL, (char*)"bool", (char*)"compensate_hilite_pres", (char*)"compensate_hilite_pres", N_((char*)"compensate highlight preservation"), sizeof(((dt_iop_denoiseprofile_params_t*)NULL)->compensate_hilite_pres), G_STRUCT_OFFSET(dt_iop_denoiseprofile_params_t, compensate_hilite_pres), NULL },
    /*Default*/ TRUE
  };
  introspection_linear[24].Struct = {
    { DT_INTROSPECTION_TYPE_STRUCT, (char*)"dt_iop_denoiseprofile_params_t", (char*)"", (char*)"", (char*)"", sizeof(dt_iop_denoiseprofile_params_t), 0, NULL },
    /*entries*/ 18, /*fields*/ NULL
  };
  introspection_linear[25].header = {DT_INTROSPECTION_TYPE_NONE, NULL, NULL, NULL, NULL, 0, 0, NULL};
#endif

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

  static dt_introspection_type_enum_tuple_t f12[] = { 
    { "MODE_NLMEANS", MODE_NLMEANS, N_((char*)"non-local means") },
    { "MODE_NLMEANS_AUTO", MODE_NLMEANS_AUTO, N_((char*)"non-local means auto") },
    { "MODE_WAVELETS", MODE_WAVELETS, N_((char*)"wavelets") },
    { "MODE_WAVELETS_AUTO", MODE_WAVELETS_AUTO, N_((char*)"wavelets auto") },
    { "MODE_VARIANCE", MODE_VARIANCE, N_((char*)"compute variance") },
    { NULL, 0 },
  };
  static dt_introspection_type_enum_tuple_t f22[] = { 
    { "MODE_RGB", MODE_RGB, N_((char*)"RGB") },
    { "MODE_Y0U0V0", MODE_Y0U0V0, N_((char*)"Y0U0V0") },
    { NULL, 0 },
  };
  static dt_introspection_field_t *f24[] = {
    &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[9],
    &introspection_linear[11],
    &introspection_linear[12],
    &introspection_linear[15],
    &introspection_linear[18],
    &introspection_linear[19],
    &introspection_linear[20],
    &introspection_linear[21],
    &introspection_linear[22],
    &introspection_linear[23],
    NULL
  };

  introspection_linear[12].Enum.values = f12;
  introspection_linear[22].Enum.values = f22;
  introspection_linear[24].Struct.fields = f24;

  return 0;
}

void * get_p(const void * param, const char * name)
{
  dt_iop_denoiseprofile_params_t * p = (dt_iop_denoiseprofile_params_t*)param;
  if(!strcmp(name, "radius"))
    return &(p->radius);
  else if(!strcmp(name, "nbhood"))
    return &(p->nbhood);
  else if(!strcmp(name, "strength"))
    return &(p->strength);
  else if(!strcmp(name, "shadows"))
    return &(p->shadows);
  else if(!strcmp(name, "bias"))
    return &(p->bias);
  else if(!strcmp(name, "scattering"))
    return &(p->scattering);
  else if(!strcmp(name, "central_pixel_weight"))
    return &(p->central_pixel_weight);
  else if(!strcmp(name, "overshooting"))
    return &(p->overshooting);
  else if(!strcmp(name, "a[0]"))
    return &(p->a[0]);
  else if(!strcmp(name, "a"))
    return &(p->a);
  else if(!strcmp(name, "b[0]"))
    return &(p->b[0]);
  else if(!strcmp(name, "b"))
    return &(p->b);
  else if(!strcmp(name, "mode"))
    return &(p->mode);
  else if(!strcmp(name, "x[0][0]"))
    return &(p->x[0][0]);
  else if(!strcmp(name, "x[0]"))
    return &(p->x[0]);
  else if(!strcmp(name, "x"))
    return &(p->x);
  else if(!strcmp(name, "y[0][0]"))
    return &(p->y[0][0]);
  else if(!strcmp(name, "y[0]"))
    return &(p->y[0]);
  else if(!strcmp(name, "y"))
    return &(p->y);
  else if(!strcmp(name, "wb_adaptive_anscombe"))
    return &(p->wb_adaptive_anscombe);
  else if(!strcmp(name, "fix_anscombe_and_nlmeans_norm"))
    return &(p->fix_anscombe_and_nlmeans_norm);
  else if(!strcmp(name, "use_new_vst"))
    return &(p->use_new_vst);
  else if(!strcmp(name, "wavelet_color_mode"))
    return &(p->wavelet_color_mode);
  else if(!strcmp(name, "compensate_hilite_pres"))
    return &(p->compensate_hilite_pres);
  else
    return NULL;
}

dt_introspection_field_t * get_f(const char * name)
{
  if(!g_ascii_strcasecmp(name, "radius"))
    return &(introspection_linear[0]);
  else if(!g_ascii_strcasecmp(name, "nbhood"))
    return &(introspection_linear[1]);
  else if(!g_ascii_strcasecmp(name, "strength"))
    return &(introspection_linear[2]);
  else if(!g_ascii_strcasecmp(name, "shadows"))
    return &(introspection_linear[3]);
  else if(!g_ascii_strcasecmp(name, "bias"))
    return &(introspection_linear[4]);
  else if(!g_ascii_strcasecmp(name, "scattering"))
    return &(introspection_linear[5]);
  else if(!g_ascii_strcasecmp(name, "central_pixel_weight"))
    return &(introspection_linear[6]);
  else if(!g_ascii_strcasecmp(name, "overshooting"))
    return &(introspection_linear[7]);
  else if(!g_ascii_strcasecmp(name, "a[0]"))
    return &(introspection_linear[8]);
  else if(!g_ascii_strcasecmp(name, "a"))
    return &(introspection_linear[9]);
  else if(!g_ascii_strcasecmp(name, "b[0]"))
    return &(introspection_linear[10]);
  else if(!g_ascii_strcasecmp(name, "b"))
    return &(introspection_linear[11]);
  else if(!g_ascii_strcasecmp(name, "mode"))
    return &(introspection_linear[12]);
  else if(!g_ascii_strcasecmp(name, "x[0][0]"))
    return &(introspection_linear[13]);
  else if(!g_ascii_strcasecmp(name, "x[0]"))
    return &(introspection_linear[14]);
  else if(!g_ascii_strcasecmp(name, "x"))
    return &(introspection_linear[15]);
  else if(!g_ascii_strcasecmp(name, "y[0][0]"))
    return &(introspection_linear[16]);
  else if(!g_ascii_strcasecmp(name, "y[0]"))
    return &(introspection_linear[17]);
  else if(!g_ascii_strcasecmp(name, "y"))
    return &(introspection_linear[18]);
  else if(!g_ascii_strcasecmp(name, "wb_adaptive_anscombe"))
    return &(introspection_linear[19]);
  else if(!g_ascii_strcasecmp(name, "fix_anscombe_and_nlmeans_norm"))
    return &(introspection_linear[20]);
  else if(!g_ascii_strcasecmp(name, "use_new_vst"))
    return &(introspection_linear[21]);
  else if(!g_ascii_strcasecmp(name, "wavelet_color_mode"))
    return &(introspection_linear[22]);
  else if(!g_ascii_strcasecmp(name, "compensate_hilite_pres"))
    return &(introspection_linear[23]);
  else
    return NULL;
}

#ifdef __cplusplus
}
#endif

