62 "rawprepare",
"basebuffer",
"demosaic",
"lens",
"ashift",
"liquify",
"rotatepixels",
63 "scalepixels",
"flip",
"clipping",
"crop",
"borders",
93 for(
size_t i = 0;
i < G_N_ELEMENTS(
_roster);
i++)
162 return (focused->operation_tags_filter() & record->
operation_tags) != 0;
183 for(GList *node = g_list_first(chain->
records); node; node = g_list_next(node))
224 const int32_t history_end,
const void **params)
228 *params =
module->default_params;
229 return module->default_enabled;
232 *params =
module->default_params;
233 gboolean
enabled =
module->default_enabled;
235 for(GList *item = g_list_nth(dev->
history, history_end - 1); item; item = g_list_previous(item))
238 if(
IS_NULL_PTR(hist) || hist->module != module)
continue;
255 int32_t raw_width = 0;
256 int32_t raw_height = 0;
261 gboolean complete =
TRUE;
270 for(GList *node = g_list_first(dev->
iop); node; node = g_list_next(node))
278 g_strlcpy(record->
op, module->op,
sizeof(record->
op));
279 record->
instance =
module->multi_priority;
283 const void *params = NULL;
294 gboolean published =
FALSE;
296 published =
module->geometry_record(module, params, record);
302 g_strdup_printf(
"%s.%d", module->op, module->multi_priority));
341 for(
const GList *node = g_list_first(chain->
records); node; node = g_list_next(node))
344 if(!strcmp(record->
op, op) && record->
instance == instance)
return record;
366 default:
return TRUE;
373 float *points,
const size_t points_count)
375 for(GList *node = g_list_first(chain->
records); node; node = g_list_next(node))
379 if(!
_in_bound(record, iop_order, direction))
continue;
387 const size_t points_count)
395 for(GList *node = g_list_first(chain->
records); node; node = g_list_next(node))
413 float *points,
const size_t points_count)
420 const size_t points_count)
430 const size_t points_count)
436 for(GList *node = g_list_last(chain->
records); node; node = g_list_previous(node))
440 if(!
_in_bound(record, iop_order, direction))
continue;
491 gchar **
names = (gchar **)g_malloc0((g_list_length(chain->
missing) + 1) *
sizeof(gchar *));
494 for(
const GList *node = g_list_first(chain->
missing); node; node = g_list_next(node))
495 names[
i++] = (gchar *)node->data;
496 gchar *joined = g_strjoinv(
", ",
names);
499 dt_print(
DT_DEBUG_DEV,
"[geometry] chain not authoritative: %d roster module(s) without a record: %s\n",
500 g_list_length(chain->
missing), joined);
511 const float origin[10] = { 0.f, 0.f, w, 0.f, 0.f, h, w, h, 0.5f * w, 0.5f * h };
514 memcpy(roundtrip, origin,
sizeof(roundtrip));
518 int not_identity = 0;
519 for(
int i = 0;
i < 5;
i++)
521 if(fabsf(roundtrip[2 *
i] - origin[2 *
i]) > 0.5f
522 || fabsf(roundtrip[2 *
i + 1] - origin[2 *
i + 1]) > 0.5f)
525 "[geometry] ROUND-TRIP DIVERGENCE at probe %d: (%.2f, %.2f) came back as (%.2f, %.2f)\n",
i,
526 origin[2 *
i], origin[2 *
i + 1], roundtrip[2 *
i], roundtrip[2 *
i + 1]);
532 float whole[2] = { 0.37f * w, 0.61f * h };
537 static const char *
const cut_names[2] = {
"BACK_EXCL|FORW_INCL",
"BACK_INCL|FORW_EXCL" };
538 int bound_diverged = 0;
540 for(
const GList *node = g_list_first(chain->
records); node; node = g_list_next(node))
545 for(
int c = 0; c < 2; c++)
547 float cut[2] = { 0.37f * w, 0.61f * h };
551 if(fabsf(cut[0] - whole[0]) > 0.5f || fabsf(cut[1] - whole[1]) > 0.5f)
554 "[geometry] BOUND DIVERGENCE at %s.%d %s: cut (%.2f, %.2f), whole (%.2f, %.2f)\n",
555 record->
op, record->
instance, cut_names[c], cut[0], cut[1], whole[0], whole[1]);
561 if(not_identity || bound_diverged)
gboolean dt_dev_geometry_get_raw_size(const dt_develop_t *dev, int32_t *width, int32_t *height)
int32_t dt_dev_get_history_end_ext(struct dt_develop_t *dev)
Get the current history end index (GUI perspective).
@ DT_DEV_TRANSFORM_DIR_BACK_EXCL
@ DT_DEV_TRANSFORM_DIR_BACK_INCL
@ DT_DEV_TRANSFORM_DIR_FORW_INCL
@ DT_DEV_TRANSFORM_DIR_ALL
@ DT_DEV_TRANSFORM_DIR_FORW_EXCL
GHashTable * names
GtkWidget* -> the name the application knows it by.
gboolean enabled
–doc was passed on the command line
static int dt_pthread_rwlock_unlock(dt_pthread_rwlock_t *rwlock) RELEASE_GENERIC(rwlock) NO_THREAD_SAFETY_ANALYSIS
static int dt_pthread_rwlock_rdlock(dt_pthread_rwlock_t *rwlock) ACQUIRE_SHARED(rwlock) NO_THREAD_SAFETY_ANALYSIS
static gboolean _suppressed_by_focus(const dt_geometry_chain_t *chain, const dt_geometry_record_t *record)
Is this record disabled for the current query by the focused module?
static const char *const _roster[]
const dt_geometry_record_t * dt_geometry_chain_find(const dt_geometry_chain_t *chain, const char *op, const int instance)
One module instance's record, or NULL. Use it for that module's own in/out dims.
dt_geometry_chain_t * dt_geometry_chain_new(void)
static gboolean _resolve_from_history(dt_develop_t *dev, dt_iop_module_t *module, const int32_t history_end, const void **params)
What will this module be committed with? Mirrors the pipe's own resolution.
int dt_geometry_chain_compose(dt_geometry_chain_t *chain, const double iop_order, const int direction, float *points, const size_t points_count)
Compose the chain over points, for a record evaluator that needs the transform stack around its own m...
static gint _by_iop_order(gconstpointer a, gconstpointer b)
static void _record_free(void *ptr)
static gboolean _on_roster(const char *op)
int dt_geometry_backtransform(dt_develop_t *dev, const double iop_order, const int direction, float *points, const size_t points_count)
Compose backward over the chain, in place.
static void _chain_clear(dt_geometry_chain_t *chain)
gboolean dt_geometry_chain_authoritative(const dt_geometry_chain_t *chain)
Can this chain answer questions yet?
uint64_t dt_geometry_chain_generation(const dt_geometry_chain_t *chain)
How many times this chain has been rebuilt. A GUI cache key for anything derived from the composed ge...
void dt_geometry_self_check(dt_develop_t *dev, const double chain_ms)
What the shadow harness became once there was nothing left to shadow.
gboolean dt_geometry_chain_processed_size(const dt_geometry_chain_t *chain, int *width, int *height)
The developed image's full-resolution size, from the chain's own fold.
static gboolean _in_bound(const dt_geometry_record_t *record, const double iop_order, const int direction)
Does this record fall inside the requested bound?
void dt_geometry_chain_free(dt_geometry_chain_t *chain)
static void _fold_sizes(dt_geometry_chain_t *chain)
Fold every record's map_size in pipe order, at full resolution and scale 1.
int dt_geometry_transform(dt_develop_t *dev, const double iop_order, const int direction, float *points, const size_t points_count)
Compose forward over the chain, in place. direction is a DT_DEV_TRANSFORM_DIR_*.
int dt_geometry_module_transform(dt_develop_t *dev, const dt_iop_module_t *module, float *points, const size_t points_count)
void dt_geometry_chain_rebuild(dt_develop_t *dev)
Rebuild the chain from the dev's current modules and history. GUI thread only.
static int _compose_forward(dt_geometry_chain_t *chain, const double iop_order, const int direction, float *points, const size_t points_count)
The forward fold over a chain, shared by the public entry point and by dt_geometry_chain_compose()....
Where things are on the image, answered without a pipeline.
gboolean dt_iop_get_cache_bypass(dt_iop_module_t *module)
@ IOP_FLAGS_NO_HISTORY_STACK
int32_t dt_get_debug_flags(void)
void dt_print(dt_debug_thread_t thread, const char *msg,...) __attribute__((format(printf
Print to stdout when thread is enabled, prefixed with seconds since startup.
#define IS_NULL_PTR(p)
C is way too permissive with !=, == and if(var) checks, which can mean too many things depending on w...
static void dt_free_gpointer(gpointer ptr)
g_free() one pointer, with the signature GDestroyNotify wants.
#define dt_free(ptr)
g_free() ptr and set it to NULL, skipping both if it is already NULL.
unsigned __int64 uint64_t
struct dt_iop_module_t *gboolean enabled
struct dt_iop_module_t * gui_module
dt_pthread_rwlock_t history_mutex
struct dt_geometry_chain_t * geometry_chain
One module instance's contribution, as data.
const dt_geometry_vtable_t * vtable
void(* free_data)(void *data)
int(* backtransform)(const void *data, const struct dt_geometry_record_t *const record, struct dt_geometry_chain_t *chain, float *points, size_t points_count)
The inverse of transform.
void(* map_size)(const void *data, const dt_iop_roi_t *const in, dt_iop_roi_t *out)
Full-resolution input rect -> output rect. Mirrors modify_roi_out() at scale 1.
int(* transform)(const void *data, const struct dt_geometry_record_t *const record, struct dt_geometry_chain_t *chain, float *points, size_t points_count)
Image coordinates in -> image coordinates out, in place, points_count pairs. ctx composes the sub-cha...
Region of interest passed through the pixelpipe.