Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
masks_geometry.c File Reference
#include "darktable.h"
#include "develop/develop.h"
#include "develop/dev_geometry.h"
#include "develop/geometry/geometry.h"
#include "develop/masks.h"
#include "develop/masks_debug.h"
#include "develop/masks/masks_functions.h"
#include "develop/masks/masks_distort.h"
#include "widgets/widget_settings.h"
#include "math/math.h"
#include "system/mem_alloc.h"
#include <cairo/cairo.h>
#include <glib.h>
#include <glib/gstdio.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
+ Include dependency graph for masks_geometry.c:

Go to the source code of this file.

Data Structures

struct  _runs_t
 
struct  _band_t
 
struct  _brush_case_t
 
struct  _row_table_t
 
struct  _overlay_timing_t
 

Macros

#define IMG_W   5184
 
#define IMG_H   3888
 
#define MASKS_BASELINE_MAX_DELTA   8 /* per channel, of 255 */
 
#define MASKS_BASELINE_MAX_SHARE   0.0002 /* share of pixels allowed to differ at all */
 
#define MASKS_BASELINE_NOISE_PX   64
 
#define PATH_SAMPLES_PER_SEGMENT   2001
 
#define OVERLAY_SCREEN_W   2560
 
#define OVERLAY_SCREEN_H   1440
 

Typedefs

typedef enum _disc_pick_t _disc_pick_t
 
typedef enum _runs_mode_t _runs_mode_t
 
typedef struct _runs_t _runs_t
 
typedef struct _band_t _band_t
 
typedef struct _brush_case_t _brush_case_t
 
typedef struct _row_table_t _row_table_t
 
typedef struct _overlay_timing_t _overlay_timing_t
 

Enumerations

enum  _disc_pick_t {
  DISC_OWED ,
  DISC_PERMITTED
}
 
enum  _runs_mode_t {
  RUNS_MISSING ,
  RUNS_EXCESS
}
 

Functions

static dt_masks_node_brush_t_brush_node (const float x, const float y, const float c1x, const float c1y, const float c2x, const float c2y, const float radius)
 
static dt_masks_node_polygon_t_polygon_node_state (const float x, const float y, const float c1x, const float c1y, const float c2x, const float c2y, const float radius, const dt_masks_points_states_t state)
 
static dt_masks_node_polygon_t_polygon_node (const float x, const float y, const float c1x, const float c1y, const float c2x, const float c2y, const float radius)
 
static GList * _brush_from_table (const float table[][9], const int count)
 
static void _stamp_disc_rows (int32_t *const diff, const size_t stride, const int w, const int h, const int cx, const int cy, const int r_i)
 
static void _brush_disc_union (const GList *const nodes, const int w, const int h, const _disc_pick_t pick, uint8_t *const map)
 
static void _flood_component (const uint8_t *const flag, uint8_t *const seen, int *const stack, const int w, const int h, const size_t seed, long *const sum)
 
static void _coverage_runs (const float *mask, const uint8_t *reference, const int w, const int h, const _runs_mode_t mode, _runs_t *const out)
 
static void _measure (const float *mask, const int w, const int h, double *coverage, int *hole_count, int *largest_hole)
 
static void _set_frame (dt_develop_t *dev, const int w, const int h)
 
static void _surface_diff (cairo_surface_t *const a, cairo_surface_t *const b, size_t *const differing, int *const worst, int *const wx, int *const wy)
 
static void _outline_density_apply (dt_develop_t *dev, const double image_px_per_device_px)
 
static gboolean _baseline_check (const char *path, const char *name)
 
static void _write_missing_map (const char *dir, const char *name, const float *const mask, const uint8_t *const reference, const int w, const int h)
 
static GList * _brush_from_table11 (const float table[][11], const int count)
 
static _band_t _outline_band_check (dt_develop_t *dev, dt_masks_form_t *form, const uint8_t *owed, const uint8_t *permitted, const int w, const int h)
 
static void _judge_raster (dt_develop_t *dev, dt_masks_form_t *form, const _brush_case_t *const c, const float *const mask, const uint8_t *const owed, const uint8_t *const permitted)
 
static int _path_dense_samples (const GList *const nodes, const int w, const int h, const _disc_pick_t pick, float *const px, float *const py, int32_t *const diff)
 
static gboolean _row_table_put (const _row_table_t *const t, const int y, const float x)
 
static void _path_row_crossings (const float *const px, const float *const py, const int count, const int h, const _row_table_t *const t)
 
static void _path_interior (const float *const px, const float *const py, const int count, const int w, const int h, int32_t *const diff, const size_t stride)
 
static void _polygon_disc_union (const GList *const nodes, const int w, const int h, const _disc_pick_t pick, uint8_t *const map)
 
static void _run_polygon_form_at (dt_develop_t *dev, dt_masks_form_t *form, const _brush_case_t *const c)
 
static void _run_brush_nodes_at (dt_develop_t *dev, GList *nodes, const _brush_case_t *const c)
 
static void _run_brush_case_at (dt_develop_t *dev, const float table[][9], const int count, const _brush_case_t *const c)
 
static void _run_brush_case11_at (dt_develop_t *dev, const float table[][11], const int count, const _brush_case_t *const c)
 
static void _run_brush_case (dt_develop_t *dev, const float table[][9], const int count, const char *name, const char *dir, const int budget_px)
 
static void _run_case_at (dt_develop_t *dev, dt_masks_form_t *form, const char *name, const char *dir, const int max_holes, const int max_hole_px, const int img_w, const int img_h)
 
static void _run_case (dt_develop_t *dev, dt_masks_form_t *form, const char *name, const char *dir, const int max_holes, const int max_hole_px)
 
static void _overlay_skipped (const dt_masks_form_gui_points_t *const gp, int *skipped, int *ranges)
 
static int _overlay_skip_of (const dt_masks_form_gui_points_t *const gp, const int i)
 
static void _overlay_dump_skips (const dt_masks_form_gui_points_t *const gp, const char *name, const dt_masks_overlay_transform_t *const transform)
 
static void _overlay_frame (dt_develop_t *dev, cairo_surface_t *surface, const dt_masks_overlay_transform_t *const transform)
 
static long _overlay_leftovers (dt_develop_t *dev, cairo_surface_t *surface, const dt_masks_overlay_transform_t *const transform)
 
static void _overlay_report (dt_develop_t *dev, const char *name, const int img_w, const int img_h, const gboolean selected, const _overlay_timing_t *const timing, const dt_masks_overlay_transform_t *const transform)
 
static void _time_hit_test (dt_develop_t *dev, dt_masks_form_t *form, const char *name, const int img_w, const int img_h)
 
static void _time_overlay_form (dt_develop_t *dev, dt_masks_form_t *form, const char *name, const char *dir, const int img_w, const int img_h, const int frames)
 
static gboolean _painted_bbox (cairo_surface_t *surface, int *x0, int *y0, int *x1, int *y1)
 
static void _check_hidpi_placement (dt_develop_t *dev, dt_masks_form_t *form, const char *name, const int img_w, const int img_h)
 
static void _time_overlay_brush (dt_develop_t *dev, GList *nodes, const char *name, const char *dir, const int img_w, const int img_h, const int frames)
 
static dt_masks_form_t_group_member (dt_develop_t *dev, const dt_masks_type_t type, const dt_masks_functions_t *functions, GList *nodes, const int formid, const char *name)
 
static void _time_overlay_group (dt_develop_t *dev, const char *dir, const int frames)
 
static void _time_overlay_all (dt_develop_t *dev, const char *dir, const int frames)
 
int main (int argc, char *argv[])
 

Variables

static int failures = 0
 
static const float _brush_1313 [11][9]
 
static const float _brush_cusp_tbl [3][9]
 
static const float _brush_hairpin_tbl [3][9]
 
static const float _brush_zigzag_tbl [6][9]
 
static const float _brush_selfcross_tbl [5][9]
 
static const float _brush_concave_tbl [5][9]
 
static const float _brush_1360 [43][11]
 
static const float _brush_1352 [7][11]
 
static const float _brush_1074 [8][11]
 
static const float _brush_1074b [8][11]
 
static const float _polygon_1788045925 [15][8]
 
static const char * baseline_dir = NULL
 
static int _outline_step_override = 0
 
static gboolean baseline_update = FALSE
 
static gboolean time_overlay = FALSE
 
static int time_overlay_frames = 30
 
static int baseline_missing = 0
 

Macro Definition Documentation

◆ IMG_H

#define IMG_H   3888

Definition at line 64 of file masks_geometry.c.

◆ IMG_W

#define IMG_W   5184

Rasterised geometry for mask shapes that are known to break.

Every shape here is a defect that shipped, reduced to the geometry that causes it. The runner rasterises each one, writes the alpha as a PNG, and reports simple, stable measures of it – coverage, and the count and size of enclosed holes. Those numbers are the regression signal; the PNGs are how a human sees what the numbers mean.

Why measures and not a golden-image diff: the rasteriser's exact anti-aliasing is allowed to change, and a byte comparison would fail on every legitimate improvement while still missing a hole that moved. A hole is what these bugs ARE, so a hole is what is counted.

The overlay is rendered too, over the alpha, because the two layers are confused so easily: a brush cusp losing coverage and a dashed outline drawing self-intersecting circles are different bugs, and an always-FALSE flag once deleted geometry the rasteriser needed in order to tidy a line the GUI drew. Seeing them superimposed is what tells them apart.

Run: ansel-test-masks-geometry [output-dir]

Definition at line 63 of file masks_geometry.c.

◆ MASKS_BASELINE_MAX_DELTA

#define MASKS_BASELINE_MAX_DELTA   8 /* per channel, of 255 */

Definition at line 637 of file masks_geometry.c.

◆ MASKS_BASELINE_MAX_SHARE

#define MASKS_BASELINE_MAX_SHARE   0.0002 /* share of pixels allowed to differ at all */

Definition at line 638 of file masks_geometry.c.

◆ MASKS_BASELINE_NOISE_PX

#define MASKS_BASELINE_NOISE_PX   64

Definition at line 646 of file masks_geometry.c.

◆ OVERLAY_SCREEN_H

#define OVERLAY_SCREEN_H   1440

Definition at line 1338 of file masks_geometry.c.

◆ OVERLAY_SCREEN_W

#define OVERLAY_SCREEN_W   2560

Definition at line 1337 of file masks_geometry.c.

◆ PATH_SAMPLES_PER_SEGMENT

#define PATH_SAMPLES_PER_SEGMENT   2001

Definition at line 1001 of file masks_geometry.c.

Typedef Documentation

◆ _band_t

typedef struct _band_t _band_t

The drawn outline against the disc union.

What the GUI draws is meant to be the boundary of what the pipe paints. The two maps the raster is judged against bound that boundary from both sides – a boundary point is outside the owed map (the union shrunk by two pixels) and inside the permitted one (grown by three) – so every border sample the outline keeps must land in that band. One that lands deep inside the union is a fold, a joint arc or a crossing the outline failed to hide (issue #1352's chords); one outside the permitted map is a spoke to nowhere (issue #1360). Counts both, and how long the GUI-side build took, which is the cost a drag pays.

◆ _brush_case_t

typedef struct _brush_case_t _brush_case_t

One brush case: what to call it, where to write, what to tolerate, at what frame size.

◆ _disc_pick_t

typedef enum _disc_pick_t _disc_pick_t

◆ _overlay_timing_t

◆ _row_table_t

typedef struct _row_table_t _row_table_t

◆ _runs_mode_t

typedef enum _runs_mode_t _runs_mode_t

◆ _runs_t

typedef struct _runs_t _runs_t

How much coverage disagrees with the reference, and where the largest connected run is.

Enumeration Type Documentation

◆ _disc_pick_t

Enumerator
DISC_OWED 
DISC_PERMITTED 

Definition at line 155 of file masks_geometry.c.

◆ _runs_mode_t

Enumerator
RUNS_MISSING 
RUNS_EXCESS 

Definition at line 261 of file masks_geometry.c.

Function Documentation

◆ _baseline_check()

static gboolean _baseline_check ( const char *  path,
const char *  name 
)
static

Compare path against its baseline, or create the baseline when updating. Returns TRUE when the render is acceptable (or there is nothing to compare against).

Definition at line 718 of file masks_geometry.c.

References _outline_step_override, _surface_diff(), baseline_dir, baseline_missing, baseline_update, double(), FALSE, IS_NULL_PTR, MASKS_BASELINE_MAX_DELTA, MASKS_BASELINE_MAX_SHARE, MASKS_BASELINE_NOISE_PX, name, and TRUE.

Referenced by _judge_raster(), and _run_case_at().

◆ _brush_disc_union()

static void _brush_disc_union ( const GList *const  nodes,
const int  w,
const int  h,
const _disc_pick_t  pick,
uint8_t *const  map 
)
static

◆ _brush_from_table()

static GList * _brush_from_table ( const float  table[][9],
const int  count 
)
static

Definition at line 126 of file masks_geometry.c.

References _brush_node(), and i.

Referenced by _run_brush_case_at(), _time_overlay_all(), and _time_overlay_group().

◆ _brush_from_table11()

static GList * _brush_from_table11 ( const float  table[][11],
const int  count 
)
static

Definition at line 839 of file masks_geometry.c.

References _brush_node(), i, and n.

Referenced by _run_brush_case11_at(), _time_overlay_all(), and _time_overlay_group().

◆ _brush_node()

static dt_masks_node_brush_t * _brush_node ( const float  x,
const float  y,
const float  c1x,
const float  c1y,
const float  c2x,
const float  c2y,
const float  radius 
)
static

Definition at line 70 of file masks_geometry.c.

References DT_MASKS_POINT_STATE_NORMAL, n, dt_masks_node_brush_t::node, and x.

Referenced by _brush_from_table(), and _brush_from_table11().

◆ _check_hidpi_placement()

◆ _coverage_runs()

static void _coverage_runs ( const float *  mask,
const uint8_t *  reference,
const int  w,
const int  h,
const _runs_mode_t  mode,
_runs_t *const  out 
)
static

Largest connected run of coverage that disagrees with the reference, and its total: MISSING is owed and unpainted, EXCESS is painted and not permitted.

Definition at line 313 of file masks_geometry.c.

References _flood_component(), flag, i, IS_NULL_PTR, out, reference(), RUNS_MISSING, and _runs_t::total.

Referenced by _judge_raster().

◆ _flood_component()

static void _flood_component ( const uint8_t *const  flag,
uint8_t *const  seen,
int *const  stack,
const int  w,
const int  h,
const size_t  seed,
long *const  sum 
)
inlinestatic

Definition at line 274 of file masks_geometry.c.

References flag, k, and top.

Referenced by _coverage_runs().

◆ _group_member()

static dt_masks_form_t * _group_member ( dt_develop_t dev,
const dt_masks_type_t  type,
const dt_masks_functions_t functions,
GList *  nodes,
const int  formid,
const char *  name 
)
static

◆ _judge_raster()

◆ _measure()

static void _measure ( const float *  mask,
const int  w,
const int  h,
double coverage,
int *  hole_count,
int *  largest_hole 
)
static

Coverage plus enclosed holes: an unpainted component that does not touch the border.

Definition at line 367 of file masks_geometry.c.

References double(), FALSE, i, IS_NULL_PTR, k, size, top, TRUE, and x.

Referenced by _run_case_at().

◆ _outline_band_check()

static _band_t _outline_band_check ( dt_develop_t dev,
dt_masks_form_t form,
const uint8_t *  owed,
const uint8_t *  permitted,
const int  w,
const int  h 
)
static

◆ _outline_density_apply()

static void _outline_density_apply ( dt_develop_t dev,
const double  image_px_per_device_px 
)
static

◆ _overlay_dump_skips()

◆ _overlay_frame()

static void _overlay_frame ( dt_develop_t dev,
cairo_surface_t *  surface,
const dt_masks_overlay_transform_t *const  transform 
)
static

◆ _overlay_leftovers()

static long _overlay_leftovers ( dt_develop_t dev,
cairo_surface_t *  surface,
const dt_masks_overlay_transform_t *const  transform 
)
static

◆ _overlay_report()

static void _overlay_report ( dt_develop_t dev,
const char *  name,
const int  img_w,
const int  img_h,
const gboolean  selected,
const _overlay_timing_t *const  timing,
const dt_masks_overlay_transform_t *const  transform 
)
static

◆ _overlay_skip_of()

static int _overlay_skip_of ( const dt_masks_form_gui_points_t *const  gp,
const int  i 
)
static

◆ _overlay_skipped()

static void _overlay_skipped ( const dt_masks_form_gui_points_t *const  gp,
int *  skipped,
int *  ranges 
)
static

◆ _painted_bbox()

static gboolean _painted_bbox ( cairo_surface_t *  surface,
int *  x0,
int *  y0,
int *  x1,
int *  y1 
)
static

Definition at line 1638 of file masks_geometry.c.

References FALSE, MAX, MIN, p, TRUE, and x.

Referenced by _check_hidpi_placement().

◆ _path_dense_samples()

static int _path_dense_samples ( const GList *const  nodes,
const int  w,
const int  h,
const _disc_pick_t  pick,
float *const  px,
float *const  py,
int32_t *const  diff 
)
static

◆ _path_interior()

static void _path_interior ( const float *const  px,
const float *const  py,
const int  count,
const int  w,
const int  h,
int32_t *const  diff,
const size_t  stride 
)
static

Definition at line 1101 of file masks_geometry.c.

References _path_row_crossings(), _row_table_t::count, IS_NULL_PTR, m, MAX, MIN, row, and v.

Referenced by _polygon_disc_union().

◆ _path_row_crossings()

static void _path_row_crossings ( const float *const  px,
const float *const  py,
const int  count,
const int  h,
const _row_table_t *const  t 
)
static

Definition at line 1071 of file masks_geometry.c.

References _row_table_put(), i, MAX, MIN, and t.

Referenced by _path_interior().

◆ _polygon_disc_union()

static void _polygon_disc_union ( const GList *const  nodes,
const int  w,
const int  h,
const _disc_pick_t  pick,
uint8_t *const  map 
)
static

◆ _polygon_node()

static dt_masks_node_polygon_t * _polygon_node ( const float  x,
const float  y,
const float  c1x,
const float  c1y,
const float  c2x,
const float  c2y,
const float  radius 
)
static

Definition at line 99 of file masks_geometry.c.

References _polygon_node_state(), DT_MASKS_POINT_STATE_NORMAL, and x.

Referenced by _time_overlay_all(), _time_overlay_group(), and main().

◆ _polygon_node_state()

static dt_masks_node_polygon_t * _polygon_node_state ( const float  x,
const float  y,
const float  c1x,
const float  c1y,
const float  c2x,
const float  c2y,
const float  radius,
const dt_masks_points_states_t  state 
)
static

Definition at line 84 of file masks_geometry.c.

References n, dt_masks_node_polygon_t::node, state, and x.

Referenced by _polygon_node(), and main().

◆ _row_table_put()

static gboolean _row_table_put ( const _row_table_t *const  t,
const int  y,
const float  x 
)
inlinestatic

Definition at line 1054 of file masks_geometry.c.

References _row_table_t::at, FALSE, IS_NULL_PTR, t, TRUE, and x.

Referenced by _path_row_crossings().

◆ _run_brush_case()

static void _run_brush_case ( dt_develop_t dev,
const float  table[][9],
const int  count,
const char *  name,
const char *  dir,
const int  budget_px 
)
static

Definition at line 1262 of file masks_geometry.c.

References _run_brush_case_at(), IMG_H, IMG_W, and name.

Referenced by main().

◆ _run_brush_case11_at()

static void _run_brush_case11_at ( dt_develop_t dev,
const float  table[][11],
const int  count,
const _brush_case_t *const  c 
)
static

Definition at line 1256 of file masks_geometry.c.

References _brush_from_table11(), and _run_brush_nodes_at().

Referenced by main().

◆ _run_brush_case_at()

static void _run_brush_case_at ( dt_develop_t dev,
const float  table[][9],
const int  count,
const _brush_case_t *const  c 
)
static

Definition at line 1250 of file masks_geometry.c.

References _brush_from_table(), and _run_brush_nodes_at().

Referenced by _run_brush_case(), and main().

◆ _run_brush_nodes_at()

static void _run_brush_nodes_at ( dt_develop_t dev,
GList *  nodes,
const _brush_case_t *const  c 
)
static

◆ _run_case()

static void _run_case ( dt_develop_t dev,
dt_masks_form_t form,
const char *  name,
const char *  dir,
const int  max_holes,
const int  max_hole_px 
)
static

Definition at line 1317 of file masks_geometry.c.

References _run_case_at(), IMG_H, IMG_W, and name.

Referenced by main().

◆ _run_case_at()

static void _run_case_at ( dt_develop_t dev,
dt_masks_form_t form,
const char *  name,
const char *  dir,
const int  max_holes,
const int  max_hole_px,
const int  img_w,
const int  img_h 
)
static

◆ _run_polygon_form_at()

static void _run_polygon_form_at ( dt_develop_t dev,
dt_masks_form_t form,
const _brush_case_t *const  c 
)
static

Run one polygon through both consumers and judge it. The form is the caller's.

Definition at line 1193 of file masks_geometry.c.

References _judge_raster(), _polygon_disc_union(), _set_frame(), DISC_OWED, DISC_PERMITTED, dt_free_align, dt_masks_debug_rasterise(), failures, IS_NULL_PTR, and dt_masks_form_t::points.

Referenced by main().

◆ _set_frame()

◆ _stamp_disc_rows()

static void _stamp_disc_rows ( int32_t *const  diff,
const size_t  stride,
const int  w,
const int  h,
const int  cx,
const int  cy,
const int  r_i 
)
inlinestatic

Definition at line 159 of file masks_geometry.c.

References MAX, and MIN.

Referenced by _brush_disc_union(), and _path_dense_samples().

◆ _surface_diff()

static void _surface_diff ( cairo_surface_t *const  a,
cairo_surface_t *const  b,
size_t *const  differing,
int *const  worst,
int *const  wx,
int *const  wy 
)
static

Compare two same-sized ARGB surfaces: how many pixels differ at all, and the worst per-channel delta with where it is. Lifted out of the baseline check because "are these the same picture" is a separate question from "what do I do about it", and nesting a triple loop inside the decision made both harder to read.

Definition at line 652 of file masks_geometry.c.

References d, and x.

Referenced by _baseline_check().

◆ _time_hit_test()

◆ _time_overlay_all()

◆ _time_overlay_brush()

static void _time_overlay_brush ( dt_develop_t dev,
GList *  nodes,
const char *  name,
const char *  dir,
const int  img_w,
const int  img_h,
const int  frames 
)
static

◆ _time_overlay_form()

◆ _time_overlay_group()

◆ _write_missing_map()

static void _write_missing_map ( const char *  dir,
const char *  name,
const float *const  mask,
const uint8_t *const  reference,
const int  w,
const int  h 
)
static

A picture of exactly what is owed and missing: red where the disc union covers a pixel the rasteriser left empty, over the mask itself. This is the artefact to look at first when a case fails – it says WHERE the stroke went missing, which no scalar can.

Definition at line 806 of file masks_geometry.c.

References CLAMPF, g, i, name, reference(), row, and x.

Referenced by _judge_raster().

◆ main()

int main ( int  argc,
char *  argv[] 
)
Todo:
: test if file with replaced ext exists
Todo:
: add a callback to set the bpp without going through the config
Todo:
: have a parameter in command line to get the export presets

Definition at line 1883 of file masks_geometry.c.

References _brush_1074, _brush_1074b, _brush_1313, _brush_1352, _brush_1360, _brush_concave_tbl, _brush_cusp_tbl, _brush_hairpin_tbl, _brush_selfcross_tbl, _brush_zigzag_tbl, _outline_step_override, _polygon_1788045925, _polygon_node(), _polygon_node_state(), _run_brush_case(), _run_brush_case11_at(), _run_brush_case_at(), _run_case(), _run_polygon_form_at(), _time_overlay_all(), ANSEL_TEST_BINARY_DIR, ANSEL_TEST_SOURCE_DIR, baseline_dir, baseline_missing, baseline_update, dt_masks_node_ellipse_t::border, dt_masks_node_ellipse_t::center, dt_masks_anchor_gradient_t::center, dt_cleanup(), dt_dev_geometry_init(), dt_dev_geometry_set_processed_size(), dt_dev_geometry_set_raw_size(), dt_geometry_chain_authoritative(), dt_geometry_chain_new(), dt_geometry_chain_rebuild(), dt_init(), DT_MASKS_CIRCLE, DT_MASKS_ELLIPSE, DT_MASKS_ELLIPSE_EQUIDISTANT, dt_masks_functions_circle, dt_masks_functions_ellipse, dt_masks_functions_gradient, dt_masks_functions_polygon, DT_MASKS_GRADIENT, DT_MASKS_GRADIENT_STATE_SIGMOIDAL, DT_MASKS_POLYGON, dt_pthread_rwlock_destroy(), dt_pthread_rwlock_init(), f, failures, FALSE, dt_masks_node_ellipse_t::flags, dt_masks_form_t::formid, dt_masks_form_t::functions, g, dt_develop_t::geometry_chain, dt_develop_t::history_mutex, i, IMG_H, IMG_W, IS_NULL_PTR, dt_develop_t::masks_mutex, MAX, dt_masks_form_t::name, dt_masks_form_t::points, r, dt_masks_node_ellipse_t::radius, dt_masks_node_ellipse_t::rotation, time_overlay, time_overlay_frames, TRUE, dt_masks_form_t::type, dt_masks_form_t::version, and x.

Variable Documentation

◆ _brush_1074

const float _brush_1074[8][11]
static
Initial value:
= {
{ 0.758693337f, 0.601638496f, 0.760810494f, 0.609281301f, 0.762927711f, 0.616924226f, 0.0375316516f, 0.0375316516f, 1.0f, 0.660000026f, 1 },
{ 0.748442948f, 0.644278347f, 0.751883447f, 0.688123882f, 0.755324066f, 0.731969476f, 0.097397998f, 0.097397998f, 1.0f, 0.660000026f, 1 },
{ 0.729495943f, 0.881070495f, 0.729165137f, 0.923407614f, 0.728834331f, 0.965744674f, 0.0375316516f, 0.0375316516f, 1.0f, 0.660000026f, 1 },
{ 0.720828474f, 0.935475111f, 0.712888777f, 0.937285244f, 0.704949141f, 0.939095378f, 0.0375316516f, 0.0375316516f, 1.0f, 0.660000026f, 1 },
{ 0.694164455f, 0.938894272f, 0.681527078f, 0.934268355f, 0.668889761f, 0.929642439f, 0.0375316516f, 0.0375316516f, 1.0f, 0.660000026f, 1 },
{ 0.646394014f, 0.915664196f, 0.637064874f, 0.909529805f, 0.627735794f, 0.903395414f, 0.0375316516f, 0.0375316516f, 1.0f, 0.660000026f, 1 },
{ 0.630183876f, 0.897663355f, 0.625552356f, 0.897462249f, 0.620920897f, 0.897261143f, 0.0375316516f, 0.0375316516f, 1.0f, 0.660000026f, 1 },
{ 0.614701509f, 0.904702842f, 0.609275997f, 0.908323109f, 0.603850603f, 0.911943376f, 0.0375316516f, 0.0375316516f, 1.0f, 0.660000026f, 1 },
}

Definition at line 555 of file masks_geometry.c.

Referenced by _time_overlay_all(), and main().

◆ _brush_1074b

const float _brush_1074b[8][11]
static
Initial value:
= {
{ 0.751560571f, 0.636493056f, 0.749378858f, 0.628718171f, 0.753744213f, 0.64426794f, 0.0381944444f, 0.0381944444f, 1.0f, 0.660000026f, 1 },
{ 0.745943287f, 0.718943866f, 0.742395833f, 0.674337384f, 0.749488812f, 0.763550347f, 0.0991030093f, 0.0991030093f, 1.0f, 0.660000026f, 1 },
{ 0.722523148f, 0.958313079f, 0.722864583f, 0.915240162f, 0.722181713f, 1.001386f, 0.0381944444f, 0.0381944444f, 1.0f, 0.660000026f, 1 },
{ 0.705744599f, 0.972430556f, 0.713929398f, 0.970590278f, 0.697559799f, 0.974273727f, 0.0381944444f, 0.0381944444f, 1.0f, 0.660000026f, 1 },
{ 0.673414352f, 0.969363426f, 0.686442901f, 0.974068287f, 0.660387731f, 0.964655671f, 0.0381944444f, 0.0381944444f, 1.0f, 0.660000026f, 1 },
{ 0.627581019f, 0.944195602f, 0.637197145f, 0.950434028f, 0.617962963f, 0.937954282f, 0.0381944444f, 0.0381944444f, 1.0f, 0.660000026f, 1 },
{ 0.615711806f, 0.931918403f, 0.62048804f, 0.932120949f, 0.6109375f, 0.931712963f, 0.0381944444f, 0.0381944444f, 1.0f, 0.660000026f, 1 },
{ 0.598933256f, 0.942965856f, 0.604527392f, 0.939282407f, 0.593341049f, 0.946649306f, 0.0381944444f, 0.0381944444f, 1.0f, 0.660000026f, 1 },
}

Definition at line 573 of file masks_geometry.c.

Referenced by _time_overlay_all(), _time_overlay_group(), and main().

◆ _brush_1313

const float _brush_1313[11][9]
static
Initial value:
= {
{ 0.471628428f, 0.0363773443f, 0.480041265f, 0.0386592895f, 0.46321559f, 0.0340954065f, 0.00624799589f, 1.0f, 0.66f },
{ 0.446389854f, 0.0295315273f, 0.454724789f, 0.0302576013f, 0.438054889f, 0.0288054571f, 0.00704672467f, 1.0f, 0.66f },
{ 0.421618611f, 0.0320209153f, 0.425721943f, 0.0304650553f, 0.417515308f, 0.0335767828f, 0.00707301404f, 1.0f, 0.66f },
{ 0.395679384f, 0.0483706258f, 0.404481769f, 0.0413173735f, 0.38687706f, 0.0554238781f, 0.0267287921f, 1.0f, 0.66f },
{ 0.368804485f, 0.0743404329f, 0.380839676f, 0.0592248067f, 0.356769323f, 0.0894560665f, 0.00639372552f, 1.0f, 0.66f },
{ 0.323468447f, 0.139064401f, 0.336321443f, 0.124024376f, 0.31061548f, 0.154104441f, 0.0175853837f, 1.0f, 0.66f },
{ 0.291686505f, 0.164580554f, 0.29908672f, 0.159394339f, 0.28428629f, 0.169766784f, 0.0175853837f, 1.0f, 0.66f },
{ 0.279067189f, 0.170181692f, 0.285639763f, 0.161496982f, 0.272494644f, 0.178866416f, 0.0175853837f, 1.0f, 0.66f },
{ 0.252251089f, 0.216688871f, 0.252251089f, 0.216688871f, 0.252251089f, 0.216688871f, 0.0175853837f, 1.0f, 0.66f },
{ 0.229524732f, 0.17267108f, 0.237051532f, 0.181563243f, 0.221997947f, 0.163778931f, 0.0175853837f, 1.0f, 0.66f },
{ 0.207090423f, 0.16333589f, 0.214568526f, 0.16644761f, 0.199612319f, 0.160224169f, 0.0175853837f, 1.0f, 0.66f },
}

Definition at line 111 of file masks_geometry.c.

Referenced by _time_overlay_all(), _time_overlay_group(), and main().

◆ _brush_1352

const float _brush_1352[7][11]
static
Initial value:
= {
{ 0.465645701f, 0.0646421909f, 0.474728316f, 0.0589693412f, 0.456563115f, 0.0703150481f, 0.0239629708f, 0.0239629708f, 1.0f, 0.660000026f, 1 },
{ 0.438397855f, 0.0816607475f, 0.445377052f, 0.0763829798f, 0.431418657f, 0.0869385153f, 0.0239629708f, 0.0239629708f, 1.0f, 0.660000026f, 1 },
{ 0.423770666f, 0.0963087901f, 0.428022474f, 0.0899883211f, 0.419518888f, 0.102629259f, 0.0239629708f, 0.0239629708f, 1.0f, 0.660000026f, 1 },
{ 0.412887126f, 0.119583569f, 0.415665925f, 0.10959287f, 0.410108328f, 0.129574269f, 0.0239629708f, 0.0239629708f, 1.0f, 0.660000026f, 1 },
{ 0.407097936f, 0.156252995f, 0.410558552f, 0.147158578f, 0.40363735f, 0.165347442f, 0.0239629708f, 0.0239629708f, 1.0f, 0.660000026f, 1 },
{ 0.392123342f, 0.174150184f, 0.395232916f, 0.141441733f, 0.389013737f, 0.206858635f, 0.018198235f, 0.018198235f, 1.0f, 0.660000026f, 2 },
{ 0.36773169f, 0.193801045f, 0.375862241f, 0.187250778f, 0.35960114f, 0.200351343f, 0.0239629708f, 0.0239629708f, 1.0f, 0.660000026f, 1 },
}

Definition at line 540 of file masks_geometry.c.

Referenced by _time_overlay_all(), _time_overlay_group(), and main().

◆ _brush_1360

const float _brush_1360[43][11]
static

Definition at line 488 of file masks_geometry.c.

Referenced by _time_overlay_all(), _time_overlay_group(), and main().

◆ _brush_concave_tbl

const float _brush_concave_tbl[5][9]
static
Initial value:
= {
{ 0.20f, 0.30f, 0.16f, 0.30f, 0.28f, 0.32f, 0.045f, 1.0f, 0.66f },
{ 0.44f, 0.36f, 0.36f, 0.34f, 0.50f, 0.38f, 0.045f, 1.0f, 0.66f },
{ 0.50f, 0.50f, 0.50f, 0.44f, 0.50f, 0.56f, 0.045f, 1.0f, 0.66f },
{ 0.44f, 0.64f, 0.50f, 0.62f, 0.36f, 0.66f, 0.045f, 1.0f, 0.66f },
{ 0.20f, 0.70f, 0.28f, 0.68f, 0.16f, 0.70f, 0.045f, 1.0f, 0.66f },
}

Definition at line 473 of file masks_geometry.c.

Referenced by _time_overlay_all(), _time_overlay_group(), and main().

◆ _brush_cusp_tbl

const float _brush_cusp_tbl[3][9]
static
Initial value:
= {
{ 0.30f, 0.30f, 0.275f, 0.30f, 0.35f, 0.405f, 0.030f, 1.0f, 0.66f },
{ 0.50f, 0.72f, 0.50f, 0.72f, 0.50f, 0.72f, 0.030f, 1.0f, 0.66f },
{ 0.70f, 0.30f, 0.65f, 0.405f, 0.725f, 0.30f, 0.030f, 1.0f, 0.66f },
}

Definition at line 436 of file masks_geometry.c.

Referenced by _time_overlay_all(), _time_overlay_group(), and main().

◆ _brush_hairpin_tbl

const float _brush_hairpin_tbl[3][9]
static
Initial value:
= {
{ 0.42f, 0.20f, 0.40f, 0.20f, 0.44f, 0.345f, 0.035f, 1.0f, 0.66f },
{ 0.50f, 0.78f, 0.50f, 0.78f, 0.50f, 0.78f, 0.035f, 1.0f, 0.66f },
{ 0.58f, 0.20f, 0.56f, 0.345f, 0.60f, 0.20f, 0.035f, 1.0f, 0.66f },
}

Definition at line 444 of file masks_geometry.c.

Referenced by _time_overlay_all(), _time_overlay_group(), and main().

◆ _brush_selfcross_tbl

const float _brush_selfcross_tbl[5][9]
static
Initial value:
= {
{ 0.25f, 0.30f, 0.20f, 0.30f, 0.35f, 0.34f, 0.030f, 1.0f, 0.66f },
{ 0.62f, 0.42f, 0.52f, 0.39f, 0.70f, 0.44f, 0.030f, 1.0f, 0.66f },
{ 0.62f, 0.62f, 0.72f, 0.58f, 0.52f, 0.66f, 0.030f, 1.0f, 0.66f },
{ 0.30f, 0.44f, 0.40f, 0.50f, 0.24f, 0.41f, 0.030f, 1.0f, 0.66f },
{ 0.30f, 0.24f, 0.27f, 0.30f, 0.33f, 0.20f, 0.030f, 1.0f, 0.66f },
}

Definition at line 463 of file masks_geometry.c.

Referenced by _time_overlay_all(), _time_overlay_group(), and main().

◆ _brush_zigzag_tbl

const float _brush_zigzag_tbl[6][9]
static
Initial value:
= {
{ 0.15f, 0.35f, 0.113f, 0.35f, 0.187f, 0.425f, 0.022f, 1.0f, 0.66f },
{ 0.30f, 0.65f, 0.30f, 0.65f, 0.30f, 0.65f, 0.022f, 1.0f, 0.66f },
{ 0.45f, 0.35f, 0.45f, 0.35f, 0.45f, 0.35f, 0.022f, 1.0f, 0.66f },
{ 0.60f, 0.65f, 0.60f, 0.65f, 0.60f, 0.65f, 0.022f, 1.0f, 0.66f },
{ 0.75f, 0.35f, 0.75f, 0.35f, 0.75f, 0.35f, 0.022f, 1.0f, 0.66f },
{ 0.88f, 0.60f, 0.847f, 0.545f, 0.913f, 0.60f, 0.022f, 1.0f, 0.66f },
}

Definition at line 452 of file masks_geometry.c.

Referenced by _time_overlay_all(), _time_overlay_group(), and main().

◆ _outline_step_override

int _outline_step_override = 0
static

Definition at line 694 of file masks_geometry.c.

Referenced by _baseline_check(), _outline_density_apply(), and main().

◆ _polygon_1788045925

const float _polygon_1788045925[15][8]
static
Initial value:
= {
{ 0.109192476f, 0.048409186f, 0.102207638f, 0.045089375f, 0.116177313f, 0.051728997f, 0.021000000f, 1 },
{ 0.141800687f, 0.053578191f, 0.133969516f, 0.053021252f, 0.149631873f, 0.054135136f, 0.021000000f, 1 },
{ 0.156179547f, 0.051750816f, 0.152295023f, 0.049384728f, 0.160064086f, 0.054116912f, 0.021000000f, 1 },
{ 0.165107980f, 0.067774758f, 0.159996808f, 0.066224061f, 0.170219168f, 0.069325462f, 0.021000000f, 1 },
{ 0.186846718f, 0.061055038f, 0.181864932f, 0.064845644f, 0.191828534f, 0.057264429f, 0.021000000f, 1 },
{ 0.194998786f, 0.045031108f, 0.191052154f, 0.047960225f, 0.198945418f, 0.042101998f, 0.021000000f, 1 },
{ 0.210526481f, 0.043480407f, 0.206644550f, 0.040637448f, 0.214408413f, 0.046323366f, 0.021000000f, 1 },
{ 0.218290374f, 0.062088847f, 0.215120122f, 0.055455282f, 0.221460640f, 0.068722412f, 0.021000000f, 1 },
{ 0.229547918f, 0.083281785f, 0.225083694f, 0.080955729f, 0.234012157f, 0.085607842f, 0.021000000f, 1 },
{ 0.245075703f, 0.076045178f, 0.241193786f, 0.074408330f, 0.248957604f, 0.077682026f, 0.021000000f, 1 },
{ 0.252839506f, 0.093102910f, 0.253421843f, 0.087416999f, 0.252257198f, 0.098788828f, 0.021000000f, 1 },
{ 0.241581917f, 0.110160641f, 0.254290909f, 0.109167710f, 0.228872970f, 0.111153573f, 0.021000000f, 1 },
{ 0.176586017f, 0.099060528f, 0.176586017f, 0.099060528f, 0.176586017f, 0.099060528f, 0.021000000f, 2 },
{ 0.099036753f, 0.105304882f, 0.111819178f, 0.116205104f, 0.086254336f, 0.094404668f, 0.021000000f, 1 },
{ 0.099891551f, 0.033659276f, 0.098198950f, 0.043141894f, 0.101584166f, 0.024176663f, 0.021000000f, 1 },
}

Definition at line 600 of file masks_geometry.c.

Referenced by _time_overlay_all(), _time_overlay_group(), and main().

◆ baseline_dir

const char* baseline_dir = NULL
static

Definition at line 685 of file masks_geometry.c.

Referenced by _baseline_check(), and main().

◆ baseline_missing

int baseline_missing = 0
static

Definition at line 714 of file masks_geometry.c.

Referenced by _baseline_check(), and main().

◆ baseline_update

gboolean baseline_update = FALSE
static

Definition at line 711 of file masks_geometry.c.

Referenced by _baseline_check(), and main().

◆ failures

◆ time_overlay

gboolean time_overlay = FALSE
static

Definition at line 712 of file masks_geometry.c.

Referenced by main().

◆ time_overlay_frames

int time_overlay_frames = 30
static

Definition at line 713 of file masks_geometry.c.

Referenced by main().