/*
 * this code is auto generated. do not edit. change the sources in tools/introspection/ instead.
 *
 * the parse tree:
 *
 * typedef
 *   struct dt_iop_filmicrgb_params_t
 *     float
 *     grey_point_source 
 *       description: middle gray luminance
 *       default: 18.45
 *       range: 0 .. 100
 * 
 *     float
 *     black_point_source 
 *       description: black relative exposure
 *       default: -8.0
 *       range: -16 .. -0.1
 * 
 *     float
 *     white_point_source 
 *       description: white relative exposure
 *       default: 4.0
 *       range: 0.1 .. 16
 * 
 *     float
 *     reconstruct_threshold 
 *       description: threshold
 *       default: 0.0
 *       range: -6.0 .. 6.0
 * 
 *     float
 *     reconstruct_feather 
 *       description: transition
 *       default: 3.0
 *       range: 0.25 .. 6.0
 * 
 *     float
 *     reconstruct_bloom_vs_details 
 *       description: bloom ↔ reconstruct
 *       default: 100.0
 *       range: -100.0 .. 100.0
 * 
 *     float
 *     reconstruct_grey_vs_color 
 *       description: gray ↔ colorful details
 *       default: 100.0
 *       range: -100.0 .. 100.0
 * 
 *     float
 *     reconstruct_structure_vs_texture 
 *       description: structure ↔ texture
 *       default: 0.0
 *       range: -100.0 .. 100.0
 * 
 *     float
 *     security_factor 
 *       description: dynamic range scaling
 *       default: 0
 *       range: -50 .. 200
 * 
 *     float
 *     grey_point_target 
 *       description: target middle gray
 *       default: 18.45
 *       range: 1 .. 50
 * 
 *     float
 *     black_point_target 
 *       description: target black luminance
 *       default: 0.01517634
 *       range: 0.000 .. 20.000
 * 
 *     float
 *     white_point_target 
 *       description: target white luminance
 *       default: 100
 *       range: 0 .. 1600
 * 
 *     float
 *     output_power 
 *       description: hardness
 *       default: 4.0
 *       range: 1 .. 10
 * 
 *     float
 *     latitude 
 *       description: linear region
 *       default: 0.01
 *       range: 0.01 .. 99
 * 
 *     float
 *     contrast 
 *       default: 1.0
 *       range: 0 .. 5
 * 
 *     float
 *     saturation 
 *       description: extreme luminance saturation
 *       default: 0
 *       range: -200 .. 200
 * 
 *     float
 *     balance 
 *       description: shadows ↔ highlights balance
 *       default: 0.0
 *       range: -50 .. 50
 * 
 *     float
 *     noise_level 
 *       description: add noise in highlights
 *       default: 0.2f
 *       range: 0.0 .. 6.0
 * 
 *     enum dt_iop_filmicrgb_methods_type_t
 *       DT_FILMIC_METHOD_NONE : no
 *       DT_FILMIC_METHOD_MAX_RGB : max RGB
 *       DT_FILMIC_METHOD_LUMINANCE : luminance Y
 *       DT_FILMIC_METHOD_POWER_NORM : RGB power norm
 *       DT_FILMIC_METHOD_EUCLIDEAN_NORM_V1 : RGB euclidean norm (legacy)
 *       DT_FILMIC_METHOD_EUCLIDEAN_NORM_V2 : RGB euclidean norm
 *     preserve_color 
 *       description: preserve chrominance
 *       default: DT_FILMIC_METHOD_POWER_NORM
 * 
 *     enum dt_iop_filmicrgb_colorscience_type_t
 *       DT_FILMIC_COLORSCIENCE_V1 : v3 (2019)
 *       DT_FILMIC_COLORSCIENCE_V2 : v4 (2020)
 *       DT_FILMIC_COLORSCIENCE_V3 : v5 (2021)
 *       DT_FILMIC_COLORSCIENCE_V4 : v6 (2022)
 *       DT_FILMIC_COLORSCIENCE_V5 : v7 (2023)
 *     version 
 *       description: color science
 *       default: DT_FILMIC_COLORSCIENCE_V5
 * 
 *     boolean
 *     auto_hardness 
 *       description: auto adjust hardness
 *       default: TRUE
 * 
 *     boolean
 *     custom_grey 
 *       description: use custom middle-gray values
 *       default: FALSE
 * 
 *     int
 *     high_quality_reconstruction 
 *       description: iterations of high-quality reconstruction
 *       default: 1
 *       range: 0 .. 10
 * 
 *     enum dt_iop_filmic_noise_distribution_t
 *       DT_FILMIC_NOISE_UNIFORM : uniform
 *       DT_FILMIC_NOISE_GAUSSIAN : gaussian
 *       DT_FILMIC_NOISE_POISSONIAN : poissonian
 *     noise_distribution 
 *       description: type of noise
 *       default: DT_NOISE_GAUSSIAN
 * 
 *     enum dt_iop_filmicrgb_curve_type_t
 *       DT_FILMIC_CURVE_POLY_4 : hard
 *       DT_FILMIC_CURVE_POLY_3 : soft
 *       DT_FILMIC_CURVE_RATIONAL : safe
 *     shadows 
 *       description: contrast in shadows
 *       default: DT_FILMIC_CURVE_POLY_4
 * 
 *     enum dt_iop_filmicrgb_curve_type_t
 *       DT_FILMIC_CURVE_POLY_4 : hard
 *       DT_FILMIC_CURVE_POLY_3 : soft
 *       DT_FILMIC_CURVE_RATIONAL : safe
 *     highlights 
 *       description: contrast in highlights
 *       default: DT_FILMIC_CURVE_POLY_4
 * 
 *     boolean
 *     compensate_icc_black 
 *       description: compensate output ICC profile black point
 *       default: FALSE
 * 
 *     enum dt_iop_filmicrgb_spline_version_type_t
 *       DT_FILMIC_SPLINE_VERSION_V1 : v1 (2019)
 *       DT_FILMIC_SPLINE_VERSION_V2 : v2 (2020)
 *       DT_FILMIC_SPLINE_VERSION_V3 : v3 (2021)
 *     spline_version 
 *       description: spline handling
 *       default: DT_FILMIC_SPLINE_VERSION_V3
 * 
 *     boolean
 *     enable_highlight_reconstruction 
 *       description: enable highlight reconstruction
 *       default: FALSE
 * 
 * dt_iop_filmicrgb_params_t
 *
 */

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

#ifdef __cplusplus
extern "C"
{
#endif

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

static dt_introspection_field_t introspection_linear[30+1]
#if !( defined(__cplusplus) && !defined(__clang__) && defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) <= 406) )
= {
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"grey_point_source", (char*)"grey_point_source", N_((char*)"middle gray luminance"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->grey_point_source), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, grey_point_source), NULL },
    /*Min*/ 0, /*Max*/ 100, /*Default*/ 18.45
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"black_point_source", (char*)"black_point_source", N_((char*)"black relative exposure"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->black_point_source), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, black_point_source), NULL },
    /*Min*/ -16, /*Max*/ -0.1, /*Default*/ -8.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"white_point_source", (char*)"white_point_source", N_((char*)"white relative exposure"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->white_point_source), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, white_point_source), NULL },
    /*Min*/ 0.1, /*Max*/ 16, /*Default*/ 4.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"reconstruct_threshold", (char*)"reconstruct_threshold", N_((char*)"threshold"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->reconstruct_threshold), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, reconstruct_threshold), NULL },
    /*Min*/ -6.0, /*Max*/ 6.0, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"reconstruct_feather", (char*)"reconstruct_feather", N_((char*)"transition"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->reconstruct_feather), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, reconstruct_feather), NULL },
    /*Min*/ 0.25, /*Max*/ 6.0, /*Default*/ 3.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"reconstruct_bloom_vs_details", (char*)"reconstruct_bloom_vs_details", N_((char*)"bloom ↔ reconstruct"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->reconstruct_bloom_vs_details), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, reconstruct_bloom_vs_details), NULL },
    /*Min*/ -100.0, /*Max*/ 100.0, /*Default*/ 100.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"reconstruct_grey_vs_color", (char*)"reconstruct_grey_vs_color", N_((char*)"gray ↔ colorful details"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->reconstruct_grey_vs_color), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, reconstruct_grey_vs_color), NULL },
    /*Min*/ -100.0, /*Max*/ 100.0, /*Default*/ 100.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"reconstruct_structure_vs_texture", (char*)"reconstruct_structure_vs_texture", N_((char*)"structure ↔ texture"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->reconstruct_structure_vs_texture), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, reconstruct_structure_vs_texture), NULL },
    /*Min*/ -100.0, /*Max*/ 100.0, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"security_factor", (char*)"security_factor", N_((char*)"dynamic range scaling"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->security_factor), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, security_factor), NULL },
    /*Min*/ -50, /*Max*/ 200, /*Default*/ 0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"grey_point_target", (char*)"grey_point_target", N_((char*)"target middle gray"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->grey_point_target), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, grey_point_target), NULL },
    /*Min*/ 1, /*Max*/ 50, /*Default*/ 18.45
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"black_point_target", (char*)"black_point_target", N_((char*)"target black luminance"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->black_point_target), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, black_point_target), NULL },
    /*Min*/ 0.000, /*Max*/ 20.000, /*Default*/ 0.01517634
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"white_point_target", (char*)"white_point_target", N_((char*)"target white luminance"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->white_point_target), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, white_point_target), NULL },
    /*Min*/ 0, /*Max*/ 1600, /*Default*/ 100
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"output_power", (char*)"output_power", N_((char*)"hardness"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->output_power), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, output_power), NULL },
    /*Min*/ 1, /*Max*/ 10, /*Default*/ 4.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"latitude", (char*)"latitude", N_((char*)"linear region"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->latitude), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, latitude), NULL },
    /*Min*/ 0.01, /*Max*/ 99, /*Default*/ 0.01
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"contrast", (char*)"contrast", (char*)"", sizeof(((dt_iop_filmicrgb_params_t*)NULL)->contrast), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, contrast), NULL },
    /*Min*/ 0, /*Max*/ 5, /*Default*/ 1.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"saturation", (char*)"saturation", N_((char*)"extreme luminance saturation"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->saturation), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, saturation), NULL },
    /*Min*/ -200, /*Max*/ 200, /*Default*/ 0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"balance", (char*)"balance", N_((char*)"shadows ↔ highlights balance"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->balance), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, balance), NULL },
    /*Min*/ -50, /*Max*/ 50, /*Default*/ 0.0
  }
},
{
  .Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"noise_level", (char*)"noise_level", N_((char*)"add noise in highlights"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->noise_level), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, noise_level), NULL },
    /*Min*/ 0.0, /*Max*/ 6.0, /*Default*/ 0.2f
  }
},
{
  .Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_filmicrgb_methods_type_t", (char*)"preserve_color", (char*)"preserve_color", N_((char*)"preserve chrominance"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->preserve_color), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, preserve_color), NULL },
    /*entries*/ 6, /*values*/ NULL, /*Default*/ DT_FILMIC_METHOD_POWER_NORM
  }
},
{
  .Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_filmicrgb_colorscience_type_t", (char*)"version", (char*)"version", N_((char*)"color science"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->version), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, version), NULL },
    /*entries*/ 5, /*values*/ NULL, /*Default*/ DT_FILMIC_COLORSCIENCE_V5
  }
},
{
  .Bool = {
    { DT_INTROSPECTION_TYPE_BOOL, (char*)"bool", (char*)"auto_hardness", (char*)"auto_hardness", N_((char*)"auto adjust hardness"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->auto_hardness), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, auto_hardness), NULL },
    /*Default*/ TRUE
  }
},
{
  .Bool = {
    { DT_INTROSPECTION_TYPE_BOOL, (char*)"bool", (char*)"custom_grey", (char*)"custom_grey", N_((char*)"use custom middle-gray values"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->custom_grey), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, custom_grey), NULL },
    /*Default*/ FALSE
  }
},
{
  .Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"high_quality_reconstruction", (char*)"high_quality_reconstruction", N_((char*)"iterations of high-quality reconstruction"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->high_quality_reconstruction), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, high_quality_reconstruction), NULL },
    /*Min*/ 0, /*Max*/ 10, /*Default*/ 1
  }
},
{
  .Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_filmic_noise_distribution_t", (char*)"noise_distribution", (char*)"noise_distribution", N_((char*)"type of noise"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->noise_distribution), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, noise_distribution), NULL },
    /*entries*/ 3, /*values*/ NULL, /*Default*/ DT_NOISE_GAUSSIAN
  }
},
{
  .Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_filmicrgb_curve_type_t", (char*)"shadows", (char*)"shadows", N_((char*)"contrast in shadows"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->shadows), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, shadows), NULL },
    /*entries*/ 3, /*values*/ NULL, /*Default*/ DT_FILMIC_CURVE_POLY_4
  }
},
{
  .Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_filmicrgb_curve_type_t", (char*)"highlights", (char*)"highlights", N_((char*)"contrast in highlights"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->highlights), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, highlights), NULL },
    /*entries*/ 3, /*values*/ NULL, /*Default*/ DT_FILMIC_CURVE_POLY_4
  }
},
{
  .Bool = {
    { DT_INTROSPECTION_TYPE_BOOL, (char*)"bool", (char*)"compensate_icc_black", (char*)"compensate_icc_black", N_((char*)"compensate output ICC profile black point"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->compensate_icc_black), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, compensate_icc_black), NULL },
    /*Default*/ FALSE
  }
},
{
  .Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_filmicrgb_spline_version_type_t", (char*)"spline_version", (char*)"spline_version", N_((char*)"spline handling"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->spline_version), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, spline_version), NULL },
    /*entries*/ 3, /*values*/ NULL, /*Default*/ DT_FILMIC_SPLINE_VERSION_V3
  }
},
{
  .Bool = {
    { DT_INTROSPECTION_TYPE_BOOL, (char*)"bool", (char*)"enable_highlight_reconstruction", (char*)"enable_highlight_reconstruction", N_((char*)"enable highlight reconstruction"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->enable_highlight_reconstruction), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, enable_highlight_reconstruction), NULL },
    /*Default*/ FALSE
  }
},
{
  .Struct = {
    { DT_INTROSPECTION_TYPE_STRUCT, (char*)"dt_iop_filmicrgb_params_t", (char*)"", (char*)"", (char*)"", sizeof(dt_iop_filmicrgb_params_t), 0, NULL },
    /*entries*/ 29, /*fields*/ NULL
  }
},
  { .header = {DT_INTROSPECTION_TYPE_NONE, NULL, NULL, NULL, NULL, 0, 0, NULL} }
}
#endif
;

static dt_introspection_t introspection = {
  8,
  6,
  "dt_iop_filmicrgb_params_t",
  sizeof(dt_iop_filmicrgb_params_t),
  &introspection_linear[30-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*)"grey_point_source", (char*)"grey_point_source", N_((char*)"middle gray luminance"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->grey_point_source), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, grey_point_source), NULL },
    /*Min*/ 0, /*Max*/ 100, /*Default*/ 18.45
  };
  introspection_linear[1].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"black_point_source", (char*)"black_point_source", N_((char*)"black relative exposure"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->black_point_source), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, black_point_source), NULL },
    /*Min*/ -16, /*Max*/ -0.1, /*Default*/ -8.0
  };
  introspection_linear[2].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"white_point_source", (char*)"white_point_source", N_((char*)"white relative exposure"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->white_point_source), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, white_point_source), NULL },
    /*Min*/ 0.1, /*Max*/ 16, /*Default*/ 4.0
  };
  introspection_linear[3].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"reconstruct_threshold", (char*)"reconstruct_threshold", N_((char*)"threshold"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->reconstruct_threshold), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, reconstruct_threshold), NULL },
    /*Min*/ -6.0, /*Max*/ 6.0, /*Default*/ 0.0
  };
  introspection_linear[4].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"reconstruct_feather", (char*)"reconstruct_feather", N_((char*)"transition"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->reconstruct_feather), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, reconstruct_feather), NULL },
    /*Min*/ 0.25, /*Max*/ 6.0, /*Default*/ 3.0
  };
  introspection_linear[5].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"reconstruct_bloom_vs_details", (char*)"reconstruct_bloom_vs_details", N_((char*)"bloom ↔ reconstruct"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->reconstruct_bloom_vs_details), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, reconstruct_bloom_vs_details), NULL },
    /*Min*/ -100.0, /*Max*/ 100.0, /*Default*/ 100.0
  };
  introspection_linear[6].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"reconstruct_grey_vs_color", (char*)"reconstruct_grey_vs_color", N_((char*)"gray ↔ colorful details"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->reconstruct_grey_vs_color), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, reconstruct_grey_vs_color), NULL },
    /*Min*/ -100.0, /*Max*/ 100.0, /*Default*/ 100.0
  };
  introspection_linear[7].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"reconstruct_structure_vs_texture", (char*)"reconstruct_structure_vs_texture", N_((char*)"structure ↔ texture"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->reconstruct_structure_vs_texture), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, reconstruct_structure_vs_texture), NULL },
    /*Min*/ -100.0, /*Max*/ 100.0, /*Default*/ 0.0
  };
  introspection_linear[8].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"security_factor", (char*)"security_factor", N_((char*)"dynamic range scaling"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->security_factor), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, security_factor), NULL },
    /*Min*/ -50, /*Max*/ 200, /*Default*/ 0
  };
  introspection_linear[9].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"grey_point_target", (char*)"grey_point_target", N_((char*)"target middle gray"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->grey_point_target), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, grey_point_target), NULL },
    /*Min*/ 1, /*Max*/ 50, /*Default*/ 18.45
  };
  introspection_linear[10].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"black_point_target", (char*)"black_point_target", N_((char*)"target black luminance"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->black_point_target), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, black_point_target), NULL },
    /*Min*/ 0.000, /*Max*/ 20.000, /*Default*/ 0.01517634
  };
  introspection_linear[11].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"white_point_target", (char*)"white_point_target", N_((char*)"target white luminance"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->white_point_target), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, white_point_target), NULL },
    /*Min*/ 0, /*Max*/ 1600, /*Default*/ 100
  };
  introspection_linear[12].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"output_power", (char*)"output_power", N_((char*)"hardness"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->output_power), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, output_power), NULL },
    /*Min*/ 1, /*Max*/ 10, /*Default*/ 4.0
  };
  introspection_linear[13].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"latitude", (char*)"latitude", N_((char*)"linear region"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->latitude), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, latitude), NULL },
    /*Min*/ 0.01, /*Max*/ 99, /*Default*/ 0.01
  };
  introspection_linear[14].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"contrast", (char*)"contrast", (char*)"", sizeof(((dt_iop_filmicrgb_params_t*)NULL)->contrast), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, contrast), NULL },
    /*Min*/ 0, /*Max*/ 5, /*Default*/ 1.0
  };
  introspection_linear[15].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"saturation", (char*)"saturation", N_((char*)"extreme luminance saturation"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->saturation), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, saturation), NULL },
    /*Min*/ -200, /*Max*/ 200, /*Default*/ 0
  };
  introspection_linear[16].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"balance", (char*)"balance", N_((char*)"shadows ↔ highlights balance"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->balance), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, balance), NULL },
    /*Min*/ -50, /*Max*/ 50, /*Default*/ 0.0
  };
  introspection_linear[17].Float = {
    { DT_INTROSPECTION_TYPE_FLOAT, (char*)"float", (char*)"noise_level", (char*)"noise_level", N_((char*)"add noise in highlights"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->noise_level), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, noise_level), NULL },
    /*Min*/ 0.0, /*Max*/ 6.0, /*Default*/ 0.2f
  };
  introspection_linear[18].Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_filmicrgb_methods_type_t", (char*)"preserve_color", (char*)"preserve_color", N_((char*)"preserve chrominance"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->preserve_color), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, preserve_color), NULL },
    /*entries*/ 6, /*values*/ NULL, /*Default*/ DT_FILMIC_METHOD_POWER_NORM
  };
  introspection_linear[19].Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_filmicrgb_colorscience_type_t", (char*)"version", (char*)"version", N_((char*)"color science"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->version), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, version), NULL },
    /*entries*/ 5, /*values*/ NULL, /*Default*/ DT_FILMIC_COLORSCIENCE_V5
  };
  introspection_linear[20].Bool = {
    { DT_INTROSPECTION_TYPE_BOOL, (char*)"bool", (char*)"auto_hardness", (char*)"auto_hardness", N_((char*)"auto adjust hardness"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->auto_hardness), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, auto_hardness), NULL },
    /*Default*/ TRUE
  };
  introspection_linear[21].Bool = {
    { DT_INTROSPECTION_TYPE_BOOL, (char*)"bool", (char*)"custom_grey", (char*)"custom_grey", N_((char*)"use custom middle-gray values"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->custom_grey), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, custom_grey), NULL },
    /*Default*/ FALSE
  };
  introspection_linear[22].Int = {
    { DT_INTROSPECTION_TYPE_INT, (char*)"int", (char*)"high_quality_reconstruction", (char*)"high_quality_reconstruction", N_((char*)"iterations of high-quality reconstruction"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->high_quality_reconstruction), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, high_quality_reconstruction), NULL },
    /*Min*/ 0, /*Max*/ 10, /*Default*/ 1
  };
  introspection_linear[23].Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_filmic_noise_distribution_t", (char*)"noise_distribution", (char*)"noise_distribution", N_((char*)"type of noise"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->noise_distribution), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, noise_distribution), NULL },
    /*entries*/ 3, /*values*/ NULL, /*Default*/ DT_NOISE_GAUSSIAN
  };
  introspection_linear[24].Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_filmicrgb_curve_type_t", (char*)"shadows", (char*)"shadows", N_((char*)"contrast in shadows"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->shadows), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, shadows), NULL },
    /*entries*/ 3, /*values*/ NULL, /*Default*/ DT_FILMIC_CURVE_POLY_4
  };
  introspection_linear[25].Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_filmicrgb_curve_type_t", (char*)"highlights", (char*)"highlights", N_((char*)"contrast in highlights"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->highlights), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, highlights), NULL },
    /*entries*/ 3, /*values*/ NULL, /*Default*/ DT_FILMIC_CURVE_POLY_4
  };
  introspection_linear[26].Bool = {
    { DT_INTROSPECTION_TYPE_BOOL, (char*)"bool", (char*)"compensate_icc_black", (char*)"compensate_icc_black", N_((char*)"compensate output ICC profile black point"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->compensate_icc_black), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, compensate_icc_black), NULL },
    /*Default*/ FALSE
  };
  introspection_linear[27].Enum = {
    { DT_INTROSPECTION_TYPE_ENUM, (char*)"dt_iop_filmicrgb_spline_version_type_t", (char*)"spline_version", (char*)"spline_version", N_((char*)"spline handling"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->spline_version), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, spline_version), NULL },
    /*entries*/ 3, /*values*/ NULL, /*Default*/ DT_FILMIC_SPLINE_VERSION_V3
  };
  introspection_linear[28].Bool = {
    { DT_INTROSPECTION_TYPE_BOOL, (char*)"bool", (char*)"enable_highlight_reconstruction", (char*)"enable_highlight_reconstruction", N_((char*)"enable highlight reconstruction"), sizeof(((dt_iop_filmicrgb_params_t*)NULL)->enable_highlight_reconstruction), G_STRUCT_OFFSET(dt_iop_filmicrgb_params_t, enable_highlight_reconstruction), NULL },
    /*Default*/ FALSE
  };
  introspection_linear[29].Struct = {
    { DT_INTROSPECTION_TYPE_STRUCT, (char*)"dt_iop_filmicrgb_params_t", (char*)"", (char*)"", (char*)"", sizeof(dt_iop_filmicrgb_params_t), 0, NULL },
    /*entries*/ 29, /*fields*/ NULL
  };
  introspection_linear[30].header = {DT_INTROSPECTION_TYPE_NONE, NULL, NULL, NULL, NULL, 0, 0, NULL};
#endif

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

  static dt_introspection_type_enum_tuple_t f18[] = { 
    { "DT_FILMIC_METHOD_NONE", DT_FILMIC_METHOD_NONE, N_((char*)"no") },
    { "DT_FILMIC_METHOD_MAX_RGB", DT_FILMIC_METHOD_MAX_RGB, N_((char*)"max RGB") },
    { "DT_FILMIC_METHOD_LUMINANCE", DT_FILMIC_METHOD_LUMINANCE, N_((char*)"luminance Y") },
    { "DT_FILMIC_METHOD_POWER_NORM", DT_FILMIC_METHOD_POWER_NORM, N_((char*)"RGB power norm") },
    { "DT_FILMIC_METHOD_EUCLIDEAN_NORM_V1", DT_FILMIC_METHOD_EUCLIDEAN_NORM_V1, N_((char*)"RGB euclidean norm (legacy)") },
    { "DT_FILMIC_METHOD_EUCLIDEAN_NORM_V2", DT_FILMIC_METHOD_EUCLIDEAN_NORM_V2, N_((char*)"RGB euclidean norm") },
    { NULL, 0 },
  };
  static dt_introspection_type_enum_tuple_t f19[] = { 
    { "DT_FILMIC_COLORSCIENCE_V1", DT_FILMIC_COLORSCIENCE_V1, N_((char*)"v3 (2019)") },
    { "DT_FILMIC_COLORSCIENCE_V2", DT_FILMIC_COLORSCIENCE_V2, N_((char*)"v4 (2020)") },
    { "DT_FILMIC_COLORSCIENCE_V3", DT_FILMIC_COLORSCIENCE_V3, N_((char*)"v5 (2021)") },
    { "DT_FILMIC_COLORSCIENCE_V4", DT_FILMIC_COLORSCIENCE_V4, N_((char*)"v6 (2022)") },
    { "DT_FILMIC_COLORSCIENCE_V5", DT_FILMIC_COLORSCIENCE_V5, N_((char*)"v7 (2023)") },
    { NULL, 0 },
  };
  static dt_introspection_type_enum_tuple_t f23[] = { 
    { "DT_FILMIC_NOISE_UNIFORM", DT_FILMIC_NOISE_UNIFORM, N_((char*)"uniform") },
    { "DT_FILMIC_NOISE_GAUSSIAN", DT_FILMIC_NOISE_GAUSSIAN, N_((char*)"gaussian") },
    { "DT_FILMIC_NOISE_POISSONIAN", DT_FILMIC_NOISE_POISSONIAN, N_((char*)"poissonian") },
    { NULL, 0 },
  };
  static dt_introspection_type_enum_tuple_t f24[] = { 
    { "DT_FILMIC_CURVE_POLY_4", DT_FILMIC_CURVE_POLY_4, N_((char*)"hard") },
    { "DT_FILMIC_CURVE_POLY_3", DT_FILMIC_CURVE_POLY_3, N_((char*)"soft") },
    { "DT_FILMIC_CURVE_RATIONAL", DT_FILMIC_CURVE_RATIONAL, N_((char*)"safe") },
    { NULL, 0 },
  };
  static dt_introspection_type_enum_tuple_t f27[] = { 
    { "DT_FILMIC_SPLINE_VERSION_V1", DT_FILMIC_SPLINE_VERSION_V1, N_((char*)"v1 (2019)") },
    { "DT_FILMIC_SPLINE_VERSION_V2", DT_FILMIC_SPLINE_VERSION_V2, N_((char*)"v2 (2020)") },
    { "DT_FILMIC_SPLINE_VERSION_V3", DT_FILMIC_SPLINE_VERSION_V3, N_((char*)"v3 (2021)") },
    { NULL, 0 },
  };
  static dt_introspection_field_t *f29[] = {
    &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],
    &introspection_linear[12],
    &introspection_linear[13],
    &introspection_linear[14],
    &introspection_linear[15],
    &introspection_linear[16],
    &introspection_linear[17],
    &introspection_linear[18],
    &introspection_linear[19],
    &introspection_linear[20],
    &introspection_linear[21],
    &introspection_linear[22],
    &introspection_linear[23],
    &introspection_linear[24],
    &introspection_linear[25],
    &introspection_linear[26],
    &introspection_linear[27],
    &introspection_linear[28],
    NULL
  };

  introspection_linear[18].Enum.values = f18;
  introspection_linear[19].Enum.values = f19;
  introspection_linear[23].Enum.values = f23;
  introspection_linear[24].Enum.values = f24;
  introspection_linear[25].Enum.values = f24;
  introspection_linear[27].Enum.values = f27;
  introspection_linear[29].Struct.fields = f29;

  return 0;
}

void * get_p(const void * param, const char * name)
{
  dt_iop_filmicrgb_params_t * p = (dt_iop_filmicrgb_params_t*)param;
  if(!strcmp(name, "grey_point_source"))
    return &(p->grey_point_source);
  else if(!strcmp(name, "black_point_source"))
    return &(p->black_point_source);
  else if(!strcmp(name, "white_point_source"))
    return &(p->white_point_source);
  else if(!strcmp(name, "reconstruct_threshold"))
    return &(p->reconstruct_threshold);
  else if(!strcmp(name, "reconstruct_feather"))
    return &(p->reconstruct_feather);
  else if(!strcmp(name, "reconstruct_bloom_vs_details"))
    return &(p->reconstruct_bloom_vs_details);
  else if(!strcmp(name, "reconstruct_grey_vs_color"))
    return &(p->reconstruct_grey_vs_color);
  else if(!strcmp(name, "reconstruct_structure_vs_texture"))
    return &(p->reconstruct_structure_vs_texture);
  else if(!strcmp(name, "security_factor"))
    return &(p->security_factor);
  else if(!strcmp(name, "grey_point_target"))
    return &(p->grey_point_target);
  else if(!strcmp(name, "black_point_target"))
    return &(p->black_point_target);
  else if(!strcmp(name, "white_point_target"))
    return &(p->white_point_target);
  else if(!strcmp(name, "output_power"))
    return &(p->output_power);
  else if(!strcmp(name, "latitude"))
    return &(p->latitude);
  else if(!strcmp(name, "contrast"))
    return &(p->contrast);
  else if(!strcmp(name, "saturation"))
    return &(p->saturation);
  else if(!strcmp(name, "balance"))
    return &(p->balance);
  else if(!strcmp(name, "noise_level"))
    return &(p->noise_level);
  else if(!strcmp(name, "preserve_color"))
    return &(p->preserve_color);
  else if(!strcmp(name, "version"))
    return &(p->version);
  else if(!strcmp(name, "auto_hardness"))
    return &(p->auto_hardness);
  else if(!strcmp(name, "custom_grey"))
    return &(p->custom_grey);
  else if(!strcmp(name, "high_quality_reconstruction"))
    return &(p->high_quality_reconstruction);
  else if(!strcmp(name, "noise_distribution"))
    return &(p->noise_distribution);
  else if(!strcmp(name, "shadows"))
    return &(p->shadows);
  else if(!strcmp(name, "highlights"))
    return &(p->highlights);
  else if(!strcmp(name, "compensate_icc_black"))
    return &(p->compensate_icc_black);
  else if(!strcmp(name, "spline_version"))
    return &(p->spline_version);
  else if(!strcmp(name, "enable_highlight_reconstruction"))
    return &(p->enable_highlight_reconstruction);
  else
    return NULL;
}

dt_introspection_field_t * get_f(const char * name)
{
  if(!g_ascii_strcasecmp(name, "grey_point_source"))
    return &(introspection_linear[0]);
  else if(!g_ascii_strcasecmp(name, "black_point_source"))
    return &(introspection_linear[1]);
  else if(!g_ascii_strcasecmp(name, "white_point_source"))
    return &(introspection_linear[2]);
  else if(!g_ascii_strcasecmp(name, "reconstruct_threshold"))
    return &(introspection_linear[3]);
  else if(!g_ascii_strcasecmp(name, "reconstruct_feather"))
    return &(introspection_linear[4]);
  else if(!g_ascii_strcasecmp(name, "reconstruct_bloom_vs_details"))
    return &(introspection_linear[5]);
  else if(!g_ascii_strcasecmp(name, "reconstruct_grey_vs_color"))
    return &(introspection_linear[6]);
  else if(!g_ascii_strcasecmp(name, "reconstruct_structure_vs_texture"))
    return &(introspection_linear[7]);
  else if(!g_ascii_strcasecmp(name, "security_factor"))
    return &(introspection_linear[8]);
  else if(!g_ascii_strcasecmp(name, "grey_point_target"))
    return &(introspection_linear[9]);
  else if(!g_ascii_strcasecmp(name, "black_point_target"))
    return &(introspection_linear[10]);
  else if(!g_ascii_strcasecmp(name, "white_point_target"))
    return &(introspection_linear[11]);
  else if(!g_ascii_strcasecmp(name, "output_power"))
    return &(introspection_linear[12]);
  else if(!g_ascii_strcasecmp(name, "latitude"))
    return &(introspection_linear[13]);
  else if(!g_ascii_strcasecmp(name, "contrast"))
    return &(introspection_linear[14]);
  else if(!g_ascii_strcasecmp(name, "saturation"))
    return &(introspection_linear[15]);
  else if(!g_ascii_strcasecmp(name, "balance"))
    return &(introspection_linear[16]);
  else if(!g_ascii_strcasecmp(name, "noise_level"))
    return &(introspection_linear[17]);
  else if(!g_ascii_strcasecmp(name, "preserve_color"))
    return &(introspection_linear[18]);
  else if(!g_ascii_strcasecmp(name, "version"))
    return &(introspection_linear[19]);
  else if(!g_ascii_strcasecmp(name, "auto_hardness"))
    return &(introspection_linear[20]);
  else if(!g_ascii_strcasecmp(name, "custom_grey"))
    return &(introspection_linear[21]);
  else if(!g_ascii_strcasecmp(name, "high_quality_reconstruction"))
    return &(introspection_linear[22]);
  else if(!g_ascii_strcasecmp(name, "noise_distribution"))
    return &(introspection_linear[23]);
  else if(!g_ascii_strcasecmp(name, "shadows"))
    return &(introspection_linear[24]);
  else if(!g_ascii_strcasecmp(name, "highlights"))
    return &(introspection_linear[25]);
  else if(!g_ascii_strcasecmp(name, "compensate_icc_black"))
    return &(introspection_linear[26]);
  else if(!g_ascii_strcasecmp(name, "spline_version"))
    return &(introspection_linear[27]);
  else if(!g_ascii_strcasecmp(name, "enable_highlight_reconstruction"))
    return &(introspection_linear[28]);
  else
    return NULL;
}

#ifdef __cplusplus
}
#endif

