Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
pixelpipe_hb.h File Reference
#include "common/atomic.h"
#include "common/image.h"
#include "common/imageio.h"
#include "common/iop_order.h"
#include "control/conf.h"
#include "develop/develop.h"
#include "develop/imageop.h"
#include "develop/pixelpipe_cache.h"
+ Include dependency graph for pixelpipe_hb.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  dt_dev_pixelpipe_raster_mask_t
 
struct  dt_dev_pixelpipe_iop_t
 
struct  dt_dev_pixelpipe_t
 

Macros

#define dt_dev_pixelpipe_synch_all(pipe, dev)   dt_dev_pixelpipe_synch_all_real(pipe, dev, __FUNCTION__)
 

Typedefs

typedef struct dt_dev_pixelpipe_raster_mask_t dt_dev_pixelpipe_raster_mask_t
 
typedef struct dt_dev_pixelpipe_iop_t dt_dev_pixelpipe_iop_t
 
typedef enum dt_dev_pixelpipe_change_t dt_dev_pixelpipe_change_t
 
typedef enum dt_dev_pixelpipe_status_t dt_dev_pixelpipe_status_t
 
typedef struct dt_dev_pixelpipe_t dt_dev_pixelpipe_t
 

Enumerations

enum  dt_dev_pixelpipe_change_t {
  DT_DEV_PIPE_UNCHANGED = 0 ,
  DT_DEV_PIPE_TOP_CHANGED = 1 << 0 ,
  DT_DEV_PIPE_REMOVE = 1 << 1 ,
  DT_DEV_PIPE_SYNCH = 1 << 2 ,
  DT_DEV_PIPE_ZOOMED = 1 << 3
}
 
enum  dt_dev_pixelpipe_status_t {
  DT_DEV_PIXELPIPE_DIRTY = 0 ,
  DT_DEV_PIXELPIPE_UNDEF = 1 ,
  DT_DEV_PIXELPIPE_VALID = 2 ,
  DT_DEV_PIXELPIPE_INVALID = 3
}
 

Functions

int dt_dev_pixelpipe_init (dt_dev_pixelpipe_t *pipe)
 
int dt_dev_pixelpipe_init_preview (dt_dev_pixelpipe_t *pipe)
 
int dt_dev_pixelpipe_init_export (dt_dev_pixelpipe_t *pipe, int32_t width, int32_t height, int levels, gboolean store_masks)
 
int dt_dev_pixelpipe_init_thumbnail (dt_dev_pixelpipe_t *pipe, int32_t width, int32_t height)
 
int dt_dev_pixelpipe_init_dummy (dt_dev_pixelpipe_t *pipe, int32_t width, int32_t height)
 
int dt_dev_pixelpipe_init_cached (dt_dev_pixelpipe_t *pipe)
 
void dt_dev_pixelpipe_set_input (dt_dev_pixelpipe_t *pipe, struct dt_develop_t *dev, int32_t imgid, int width, int height, float iscale, dt_mipmap_size_t size)
 
void dt_dev_pixelpipe_set_icc (dt_dev_pixelpipe_t *pipe, dt_colorspaces_color_profile_type_t icc_type, const gchar *icc_filename, dt_iop_color_intent_t icc_intent)
 
void dt_dev_pixelpipe_get_roi_out (dt_dev_pixelpipe_t *pipe, struct dt_develop_t *dev, const int width_in, const int height_in, int *width, int *height)
 
void dt_dev_pixelpipe_get_roi_in (dt_dev_pixelpipe_t *pipe, struct dt_develop_t *dev, const struct dt_iop_roi_t roi_out)
 
gboolean dt_dev_pixelpipe_activemodule_disables_currentmodule (struct dt_develop_t *dev, struct dt_iop_module_t *current_module)
 
void dt_dev_pixelpipe_cleanup (dt_dev_pixelpipe_t *pipe)
 
void dt_dev_pixelpipe_change (dt_dev_pixelpipe_t *pipe, struct dt_develop_t *dev)
 
void dt_dev_pixelpipe_cleanup_nodes (dt_dev_pixelpipe_t *pipe)
 
void dt_dev_pixelpipe_create_nodes (dt_dev_pixelpipe_t *pipe, struct dt_develop_t *dev)
 
void dt_dev_pixelpipe_synch_all_real (dt_dev_pixelpipe_t *pipe, struct dt_develop_t *dev, const char *caller_func)
 Find the last history item matching each pipeline node (module), in the order of pipeline execution. This is super important because modules providing raster masks need to be inited before modules using them, in the order of pipeline nodes. But history holds no guaranty that raster masks providers will be older than raster masks users, especially after history compression. So reading in history order is not an option.
 
void dt_dev_pixelpipe_synch_top (dt_dev_pixelpipe_t *pipe, struct dt_develop_t *dev)
 
int dt_dev_pixelpipe_process (dt_dev_pixelpipe_t *pipe, struct dt_develop_t *dev, int x, int y, int width, int height, double scale)
 
int dt_dev_pixelpipe_process_no_gamma (dt_dev_pixelpipe_t *pipe, struct dt_develop_t *dev, int x, int y, int width, int height, double scale)
 
void dt_dev_pixelpipe_disable_after (dt_dev_pixelpipe_t *pipe, const char *op)
 
void dt_dev_pixelpipe_disable_before (dt_dev_pixelpipe_t *pipe, const char *op)
 
float * dt_dev_get_raster_mask (dt_dev_pixelpipe_t *pipe, const struct dt_iop_module_t *raster_mask_source, const int raster_mask_id, const struct dt_iop_module_t *target_module, gboolean *free_mask, int *error)
 
void dt_dev_clear_rawdetail_mask (dt_dev_pixelpipe_t *pipe)
 
gboolean dt_dev_write_rawdetail_mask (dt_dev_pixelpipe_iop_t *piece, float *const rgb, const dt_iop_roi_t *const roi_in, const int mode)
 
float * dt_dev_distort_detail_mask (const dt_dev_pixelpipe_t *pipe, float *src, const struct dt_iop_module_t *target_module)
 
void dt_pixelpipe_get_global_hash (dt_dev_pixelpipe_t *pipe, struct dt_develop_t *dev)
 
gboolean dt_dev_pixelpipe_set_reentry (dt_dev_pixelpipe_t *pipe, uint64_t hash)
 Set the re-entry pipeline flag, only if no object is already capturing it. Re-entered pipelines run with cache disabled, but without flushing the whole cache. This was designed for cases where raster masks references are lost on pipeline, for example when going to lighttable and re-entering darkroom (pipe caches are not flushed for performance, if re-entering the same image), as to trigger a full pipe run and reinit references.
 
gboolean dt_dev_pixelpipe_unset_reentry (dt_dev_pixelpipe_t *pipe, uint64_t hash)
 Remove the re-entry pipeline flag, only if the object identifier is the one that set it. See dt_dev_pixelpipe_set_reentry.
 
gboolean dt_dev_pixelpipe_has_reentry (dt_dev_pixelpipe_t *pipe)
 
void dt_dev_pixelpipe_reset_reentry (dt_dev_pixelpipe_t *pipe)
 

Macro Definition Documentation

◆ dt_dev_pixelpipe_synch_all

#define dt_dev_pixelpipe_synch_all (   pipe,
  dev 
)    dt_dev_pixelpipe_synch_all_real(pipe, dev, __FUNCTION__)

Typedef Documentation

◆ dt_dev_pixelpipe_change_t

◆ dt_dev_pixelpipe_iop_t

◆ dt_dev_pixelpipe_raster_mask_t

◆ dt_dev_pixelpipe_status_t

◆ dt_dev_pixelpipe_t

this encapsulates the pixelpipe. a develop module will need several of these: for previews and full blits to cairo and for the export function.

Enumeration Type Documentation

◆ dt_dev_pixelpipe_change_t

Enumerator
DT_DEV_PIPE_UNCHANGED 
DT_DEV_PIPE_TOP_CHANGED 
DT_DEV_PIPE_REMOVE 
DT_DEV_PIPE_SYNCH 
DT_DEV_PIPE_ZOOMED 

◆ dt_dev_pixelpipe_status_t

Enumerator
DT_DEV_PIXELPIPE_DIRTY 
DT_DEV_PIXELPIPE_UNDEF 
DT_DEV_PIXELPIPE_VALID 
DT_DEV_PIXELPIPE_INVALID 

Function Documentation

◆ dt_dev_clear_rawdetail_mask()

◆ dt_dev_distort_detail_mask()

float * dt_dev_distort_detail_mask ( const dt_dev_pixelpipe_t pipe,
float *  src,
const struct dt_iop_module_t target_module 
)

◆ dt_dev_get_raster_mask()

float * dt_dev_get_raster_mask ( dt_dev_pixelpipe_t pipe,
const struct dt_iop_module_t raster_mask_source,
const int  raster_mask_id,
const struct dt_iop_module_t target_module,
gboolean *  free_mask,
int *  error 
)

◆ dt_dev_pixelpipe_activemodule_disables_currentmodule()

◆ dt_dev_pixelpipe_change()

◆ dt_dev_pixelpipe_cleanup()

◆ dt_dev_pixelpipe_cleanup_nodes()

◆ dt_dev_pixelpipe_create_nodes()

◆ dt_dev_pixelpipe_disable_after()

void dt_dev_pixelpipe_disable_after ( dt_dev_pixelpipe_t pipe,
const char *  op 
)

◆ dt_dev_pixelpipe_disable_before()

void dt_dev_pixelpipe_disable_before ( dt_dev_pixelpipe_t pipe,
const char *  op 
)

◆ dt_dev_pixelpipe_get_roi_in()

◆ dt_dev_pixelpipe_get_roi_out()

◆ dt_dev_pixelpipe_has_reentry()

gboolean dt_dev_pixelpipe_has_reentry ( dt_dev_pixelpipe_t pipe)

◆ dt_dev_pixelpipe_init()

◆ dt_dev_pixelpipe_init_cached()

int dt_dev_pixelpipe_init_cached ( dt_dev_pixelpipe_t pipe)

References dt_dev_pixelpipe_t::backbuf, dt_dev_pixelpipe_t::backbuf_height, dt_dev_pixelpipe_t::backbuf_mutex, dt_dev_pixelpipe_t::backbuf_scale, dt_dev_pixelpipe_t::backbuf_width, dt_dev_pixelpipe_t::backbuf_zoom_x, dt_dev_pixelpipe_t::backbuf_zoom_y, dt_dev_pixelpipe_t::busy_mutex, dt_dev_pixelpipe_t::bypass_blendif, dt_dev_pixelpipe_t::changed, dt_dev_pixelpipe_t::devid, dt_atomic_set_int(), DT_COLORSPACE_NONE, DT_DEV_DETAIL_MASK_NONE, DT_DEV_PIPE_UNCHANGED, DT_DEV_PIXELPIPE_DIRTY, DT_DEV_PIXELPIPE_DISPLAY_NONE, dt_dev_pixelpipe_reset_reentry(), DT_INTENT_LAST, dt_pthread_mutex_init(), FALSE, dt_dev_pixelpipe_t::flush_cache, dt_dev_pixelpipe_t::forms, dt_dev_pixelpipe_t::icc_filename, dt_dev_pixelpipe_t::icc_intent, dt_dev_pixelpipe_t::icc_type, dt_dev_pixelpipe_t::iheight, IMAGEIO_INT8, IMAGEIO_RGB, dt_dev_pixelpipe_t::input_profile_info, dt_dev_pixelpipe_t::input_timestamp, dt_dev_pixelpipe_t::iop, dt_dev_pixelpipe_t::iop_order_list, dt_dev_pixelpipe_t::iwidth, dt_dev_pixelpipe_t::last_history_hash, dt_dev_pixelpipe_t::levels, dt_dev_pixelpipe_t::mask_display, dt_dev_pixelpipe_t::nodes, dt_dev_pixelpipe_t::opencl_error, dt_dev_pixelpipe_t::output_backbuf, dt_dev_pixelpipe_t::output_backbuf_height, dt_dev_pixelpipe_t::output_backbuf_width, dt_dev_pixelpipe_t::output_imgid, dt_dev_pixelpipe_t::output_profile_info, dt_dev_pixelpipe_t::processed_height, dt_dev_pixelpipe_t::processed_width, dt_dev_pixelpipe_t::processing, dt_dev_pixelpipe_t::rawdetail_mask_data, dt_dev_pixelpipe_t::running, dt_dev_pixelpipe_t::shutdown, dt_dev_pixelpipe_t::status, dt_dev_pixelpipe_t::store_all_raster_masks, dt_dev_pixelpipe_t::tiling, UNKNOWN_IMAGE, dt_dev_pixelpipe_t::want_detail_mask, and dt_dev_pixelpipe_t::work_profile_info.

Referenced by dt_dev_pixelpipe_init(), dt_dev_pixelpipe_init_dummy(), dt_dev_pixelpipe_init_export(), dt_dev_pixelpipe_init_preview(), and dt_dev_pixelpipe_init_thumbnail().

◆ dt_dev_pixelpipe_init_dummy()

int dt_dev_pixelpipe_init_dummy ( dt_dev_pixelpipe_t pipe,
int32_t  width,
int32_t  height 
)

◆ dt_dev_pixelpipe_init_export()

int dt_dev_pixelpipe_init_export ( dt_dev_pixelpipe_t pipe,
int32_t  width,
int32_t  height,
int  levels,
gboolean  store_masks 
)

◆ dt_dev_pixelpipe_init_preview()

◆ dt_dev_pixelpipe_init_thumbnail()

int dt_dev_pixelpipe_init_thumbnail ( dt_dev_pixelpipe_t pipe,
int32_t  width,
int32_t  height 
)

◆ dt_dev_pixelpipe_process()

int dt_dev_pixelpipe_process ( dt_dev_pixelpipe_t pipe,
struct dt_develop_t dev,
int  x,
int  y,
int  width,
int  height,
double  scale 
)

◆ dt_dev_pixelpipe_process_no_gamma()

int dt_dev_pixelpipe_process_no_gamma ( dt_dev_pixelpipe_t pipe,
struct dt_develop_t dev,
int  x,
int  y,
int  width,
int  height,
double  scale 
)

◆ dt_dev_pixelpipe_reset_reentry()

◆ dt_dev_pixelpipe_set_icc()

void dt_dev_pixelpipe_set_icc ( dt_dev_pixelpipe_t pipe,
dt_colorspaces_color_profile_type_t  icc_type,
const gchar *  icc_filename,
dt_iop_color_intent_t  icc_intent 
)

◆ dt_dev_pixelpipe_set_input()

◆ dt_dev_pixelpipe_set_reentry()

gboolean dt_dev_pixelpipe_set_reentry ( dt_dev_pixelpipe_t pipe,
uint64_t  hash 
)

Set the re-entry pipeline flag, only if no object is already capturing it. Re-entered pipelines run with cache disabled, but without flushing the whole cache. This was designed for cases where raster masks references are lost on pipeline, for example when going to lighttable and re-entering darkroom (pipe caches are not flushed for performance, if re-entering the same image), as to trigger a full pipe run and reinit references.

It can be used for any case where a full pipeline recompute is needed once, based on runtime module requirements, but a full cache flush would be overkill.

NOTE: in main darkroom pipe, the coordinates of the ROI can change between runs from the same thread.

Parameters
pipe
hashUnique ID of the object attempting capture the re-entry flag. This should stay constant between 2 pipeline runs from the same thread.
Returns
gboolean TRUE if the object could capture the flag

References DT_DEBUG_DEV, dt_print(), FALSE, dt_dev_pixelpipe_t::reentry, dt_dev_pixelpipe_t::reentry_hash, and TRUE.

Referenced by dt_dev_get_raster_mask().

◆ dt_dev_pixelpipe_synch_all_real()

void dt_dev_pixelpipe_synch_all_real ( dt_dev_pixelpipe_t pipe,
dt_develop_t dev,
const char *  caller_func 
)

Find the last history item matching each pipeline node (module), in the order of pipeline execution. This is super important because modules providing raster masks need to be inited before modules using them, in the order of pipeline nodes. But history holds no guaranty that raster masks providers will be older than raster masks users, especially after history compression. So reading in history order is not an option.

Parameters
pipe
dev
caller_func

References _commit_history_to_node(), dt_dev_pixelpipe_iop_t::data, DT_DEBUG_DEV, DT_DEBUG_PIPE, dt_dev_get_history_end(), dt_iop_commit_params(), dt_print(), dt_dev_pixelpipe_iop_t::enabled, FALSE, dt_dev_pixelpipe_iop_t::global_hash, dt_dev_history_item_t::hash, dt_dev_pixelpipe_iop_t::hash, dt_develop_t::history, dt_dev_pixelpipe_t::last_history_hash, dt_dev_pixelpipe_t::nodes, TRUE, and dt_dev_pixelpipe_t::type.

◆ dt_dev_pixelpipe_synch_top()

◆ dt_dev_pixelpipe_unset_reentry()

gboolean dt_dev_pixelpipe_unset_reentry ( dt_dev_pixelpipe_t pipe,
uint64_t  hash 
)

Remove the re-entry pipeline flag, only if the object identifier is the one that set it. See dt_dev_pixelpipe_set_reentry.

Parameters
pipe
hashUnique ID of the object attempting capture the re-entry flag. This should stay constant between 2 pipeline runs from the same thread.
Returns
gboolean TRUE if the object could capture the flag

References DT_DEBUG_DEV, dt_print(), FALSE, dt_dev_pixelpipe_t::reentry, dt_dev_pixelpipe_t::reentry_hash, and TRUE.

Referenced by dt_dev_get_raster_mask().

◆ dt_dev_write_rawdetail_mask()

◆ dt_pixelpipe_get_global_hash()