Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/common/colorspaces.c
Original file line number Diff line number Diff line change
Expand Up @@ -1732,9 +1732,9 @@ const char *dt_colorspaces_get_name(dt_colorspaces_color_profile_type_t type,
switch(type)
{
case DT_COLORSPACE_NONE:
return NULL;
return _("DT_COLORSPACE_NONE");
case DT_COLORSPACE_FILE:
return filename;
return filename && filename[0] ? filename : _("no filename");
case DT_COLORSPACE_SRGB:
return _("sRGB");
case DT_COLORSPACE_ADOBERGB:
Expand Down
12 changes: 6 additions & 6 deletions src/common/mipmap_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -1322,7 +1322,7 @@ static void _init_f(dt_mipmap_buffer_t *mipmap_buf,

if(!buf.buf)
{
fprintf(stderr,"load_status = %d\n",(int)image->load_status);
dt_print(DT_DEBUG_ALWAYS, "[mimpmap _init_f] for ID=%d load_status=%d",image->id, (int)image->load_status);
if(image->load_status == DT_IMAGEIO_FILE_NOT_FOUND)
dt_control_log(_("image `%s' is not available!"), image->filename);
else if(image->load_status == DT_IMAGEIO_LOAD_FAILED || image->load_status == DT_IMAGEIO_IOERROR ||
Expand All @@ -1345,35 +1345,35 @@ static void _init_f(dt_mipmap_buffer_t *mipmap_buf,
if(image->buf_dsc.filters != 9u && image->buf_dsc.datatype == TYPE_FLOAT)
{
dt_print_pipe(DT_DEBUG_PIPE,
"mipmap mosaic_half_size_f", NULL, NULL, DT_DEVICE_CPU, &roi_in, &roi_out);
"mipmap mosaic_half_size_f", NULL, NULL, DT_DEVICE_NONE, &roi_in, &roi_out);
dt_iop_clip_and_zoom_mosaic_half_size_f((float *const)out, (const float *const)buf.buf, &roi_out, &roi_in,
roi_out.width, roi_in.width, image->buf_dsc.filters);
}
else if(image->buf_dsc.filters != 9u && image->buf_dsc.datatype == TYPE_UINT16)
{
dt_print_pipe(DT_DEBUG_PIPE,
"mipmap mosaic_half_size", NULL, NULL, DT_DEVICE_CPU, &roi_in, &roi_out);
"mipmap mosaic_half_size", NULL, NULL, DT_DEVICE_NONE, &roi_in, &roi_out);
dt_iop_clip_and_zoom_mosaic_half_size((uint16_t * const)out, (const uint16_t *)buf.buf, &roi_out, &roi_in,
roi_out.width, roi_in.width, image->buf_dsc.filters);
}
else if(image->buf_dsc.filters == 9u && image->buf_dsc.datatype == TYPE_UINT16)
{
dt_print_pipe(DT_DEBUG_PIPE,
"mipmap mosaic_third_size_xtrans", NULL, NULL, DT_DEVICE_CPU, &roi_in, &roi_out);
"mipmap mosaic_third_size_xtrans", NULL, NULL, DT_DEVICE_NONE, &roi_in, &roi_out);
dt_iop_clip_and_zoom_mosaic_third_size_xtrans((uint16_t * const)out, (const uint16_t *)buf.buf, &roi_out,
&roi_in, roi_out.width, roi_in.width, image->buf_dsc.xtrans);
}
else if(image->buf_dsc.filters == 9u && image->buf_dsc.datatype == TYPE_FLOAT)
{
dt_print_pipe(DT_DEBUG_PIPE,
"mipmap mosaic_third_size_xtrans_f", NULL, NULL, DT_DEVICE_CPU, &roi_in, &roi_out);
"mipmap mosaic_third_size_xtrans_f", NULL, NULL, DT_DEVICE_NONE, &roi_in, &roi_out);
dt_iop_clip_and_zoom_mosaic_third_size_xtrans_f(out, (const float *)buf.buf, &roi_out, &roi_in,
roi_out.width, roi_in.width, image->buf_dsc.xtrans);
}
else
{
dt_print_pipe(DT_DEBUG_ALWAYS,
"mipmap unreachable_codepath", NULL, NULL, DT_DEVICE_CPU, &roi_in, &roi_out);
"mipmap unreachable_codepath", NULL, NULL, DT_DEVICE_NONE, &roi_in, &roi_out);
dt_unreachable_codepath();
}
}
Expand Down
21 changes: 8 additions & 13 deletions src/common/wb_presets.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,16 @@ void dt_wb_presets_init(const char *alternative)
else
g_strlcpy(filename, alternative, sizeof(filename));

dt_print(DT_DEBUG_CONTROL, "[wb_presets] loading wb_presets from `%s'", filename);
if(!g_file_test(filename, G_FILE_TEST_EXISTS)) return;
const gboolean preset_file = g_file_test(filename, G_FILE_TEST_EXISTS);
dt_print(DT_DEBUG_CONTROL, "[wb_presets] loading wb_presets from `%s'%s",
filename, preset_file ? "" : " missing");
if(!preset_file) return;

JsonParser *parser = json_parser_new();
if(!json_parser_load_from_file(parser, filename, &error))
{
dt_print(DT_DEBUG_ALWAYS,
"[wb_presets] error: parsing json from `%s' failed\n%s", filename, error->message);
"[wb_presets] error: parsing json from `%s' failed: %s", filename, error->message);
g_error_free(error);
g_object_unref(parser);
return;
Expand All @@ -158,8 +160,6 @@ void dt_wb_presets_init(const char *alternative)
JsonReader *reader = NULL;
gboolean valid = TRUE;

dt_print(DT_DEBUG_CONTROL, "[wb_presets] loading noiseprofile file");

JsonNode *root = json_parser_get_root(parser);
if(!root) _ERROR("can't get the root node");

Expand Down Expand Up @@ -198,15 +198,13 @@ void dt_wb_presets_init(const char *alternative)
g_strdup(json_reader_get_string_value(reader));
json_reader_end_member(reader);

dt_print(DT_DEBUG_CONTROL, "[wb_presets] found maker `%s'",
wb_presets[wb_presets_count].make);
// go through all models and check those

if(!json_reader_read_member(reader, "models"))
_ERROR("missing `models`");

const int n_models = json_reader_count_elements(reader);
dt_print(DT_DEBUG_CONTROL, "[wb_presets] found %d models", n_models);
dt_print(DT_DEBUG_CONTROL, "[wb_presets] found %d models for maker `%s'", n_models, wb_presets[wb_presets_count].make);

for(int j = 0; j < n_models; j++)
{
Expand All @@ -223,15 +221,12 @@ void dt_wb_presets_init(const char *alternative)

json_reader_end_member(reader);

dt_print(DT_DEBUG_CONTROL, "[wb_presets] found %s",
wb_presets[wb_presets_count].model);

if(!json_reader_read_member(reader, "presets"))
_ERROR("missing `presets`");

const int n_presets = json_reader_count_elements(reader);
dt_print(DT_DEBUG_CONTROL, "[wb_presets] found %d presets",
n_presets);
dt_print(DT_DEBUG_CONTROL, "[wb_presets] found %d presets for `%s'",
n_presets, wb_presets[wb_presets_count].model);

for(int k = 0; k < n_presets; k++)
{
Expand Down
5 changes: 2 additions & 3 deletions src/develop/pixelpipe_hb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1286,8 +1286,7 @@ static gboolean _pixelpipe_process_on_CPU(dt_dev_pixelpipe_t *pipe,
dt_iop_colorspace_to_name(cst_from),
dt_iop_colorspace_to_name(cst_to),
work_profile
? dt_colorspaces_get_name(work_profile->type,
work_profile->filename)
? dt_colorspaces_get_name(work_profile->type, work_profile->filename)
: "no work profile");
}

Expand Down Expand Up @@ -1669,7 +1668,7 @@ static gboolean _dev_pixelpipe_process_rec(dt_dev_pixelpipe_t *pipe,
&& aligned_input)
{
*output = pipe->input;
dt_print_pipe(DT_DEBUG_PIPE,
dt_print_pipe(DT_DEBUG_PIPE | DT_DEBUG_VERBOSE,
"pipe data: full",
pipe, module, DT_DEVICE_NONE, &roi_in, roi_out);
}
Expand Down
Loading