Skip to content

Commit

Permalink
CODECS: Use SAIL_LOG_TRACE instead of SAIL_LOG_DEBUG
Browse files Browse the repository at this point in the history
  • Loading branch information
HappySeaFox committed Sep 23, 2024
1 parent b4a668b commit f3bab2e
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions src/sail-codecs/avif/helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ sail_status_t avif_private_fetch_iccp(const struct avifRWData *avif_iccp, struct

if (avif_iccp->data != NULL) {
SAIL_TRY(sail_alloc_iccp_from_data(avif_iccp->data, avif_iccp->size, iccp));
SAIL_LOG_DEBUG("AVIF: Found ICC profile %u bytes long", (unsigned)avif_iccp->size);
SAIL_LOG_TRACE("AVIF: Found ICC profile %u bytes long", (unsigned)avif_iccp->size);
} else {
SAIL_LOG_DEBUG("AVIF: ICC profile is not found");
SAIL_LOG_TRACE("AVIF: ICC profile is not found");
}

return SAIL_OK;
Expand Down
4 changes: 2 additions & 2 deletions src/sail-codecs/common/bmp/bmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,9 @@ sail_status_t bmp_private_read_init(struct sail_io *io, const struct sail_load_o
&bmp_state->source_pixel_format));

if (bmp_state->version < SAIL_BMP_V3) {
SAIL_LOG_DEBUG("BMP: Version(%d)", bmp_state->version);
SAIL_LOG_TRACE("BMP: Version(%d)", bmp_state->version);
} else {
SAIL_LOG_DEBUG("BMP: Version(%d), compression(%u)", bmp_state->version, bmp_state->v3.compression);
SAIL_LOG_TRACE("BMP: Version(%d), compression(%u)", bmp_state->version, bmp_state->v3.compression);
}

/* Read palette. */
Expand Down
2 changes: 1 addition & 1 deletion src/sail-codecs/jpeg/helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ sail_status_t jpeg_private_fetch_iccp(struct jpeg_decompress_struct *decompress_
JOCTET *data = NULL;
unsigned data_size = 0;

SAIL_LOG_DEBUG("JPEG: ICC profile is %sfound",
SAIL_LOG_TRACE("JPEG: ICC profile is %sfound",
jpeg_read_icc_profile(decompress_context, &data, &data_size)
? "" : "not ");

Expand Down
4 changes: 2 additions & 2 deletions src/sail-codecs/jpeg/jpeg.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,14 +349,14 @@ SAIL_EXPORT sail_status_t sail_codec_save_seek_next_frame_v8_jpeg(void *state, c
/* Save meta data. */
if (jpeg_state->save_options->options & SAIL_OPTION_META_DATA && image->meta_data_node != NULL) {
SAIL_TRY(jpeg_private_write_meta_data(jpeg_state->compress_context, image->meta_data_node));
SAIL_LOG_DEBUG("JPEG: Meta data has been written");
SAIL_LOG_TRACE("JPEG: Meta data has been written");
}

/* Save ICC profile. */
#ifdef SAIL_HAVE_JPEG_ICCP
if (jpeg_state->save_options->options & SAIL_OPTION_ICCP && image->iccp != NULL) {
jpeg_write_icc_profile(jpeg_state->compress_context, image->iccp->data, (unsigned)image->iccp->size);
SAIL_LOG_DEBUG("JPEG: ICC profile has been written");
SAIL_LOG_TRACE("JPEG: ICC profile has been written");
}
#endif

Expand Down
8 changes: 4 additions & 4 deletions src/sail-codecs/png/helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -391,11 +391,11 @@ sail_status_t png_private_write_meta_data(png_structp png_ptr, png_infop info_pt
if (meta_data->value->type == SAIL_VARIANT_TYPE_DATA) {
/* Skip "Exif\0\0" if any. */
if (meta_data->value->size >= 4 && memcmp(sail_variant_to_data(meta_data->value), "Exif", 4) == 0) {
SAIL_LOG_DEBUG("PNG: Saving raw EXIF %u bytes long w/o header", (unsigned)meta_data->value->size - 6);
SAIL_LOG_TRACE("PNG: Saving raw EXIF %u bytes long w/o header", (unsigned)meta_data->value->size - 6);
png_set_eXIf_1(png_ptr, info_ptr, (png_uint_32)meta_data->value->size - 6,
((png_bytep)sail_variant_to_data(meta_data->value)) + 6);
} else {
SAIL_LOG_DEBUG("PNG: Saving raw EXIF %u bytes long", (unsigned)meta_data->value->size);
SAIL_LOG_TRACE("PNG: Saving raw EXIF %u bytes long", (unsigned)meta_data->value->size);
png_set_eXIf_1(png_ptr, info_ptr, (png_uint_32)meta_data->value->size, meta_data->value->value);
}
} else {
Expand Down Expand Up @@ -478,9 +478,9 @@ sail_status_t png_private_fetch_iccp(png_structp png_ptr, png_infop info_ptr, st

if (ok) {
SAIL_TRY(sail_alloc_iccp_from_data(data, data_size, iccp));
SAIL_LOG_DEBUG("PNG: Found ICC profile '%s' %u bytes long", name, data_size);
SAIL_LOG_TRACE("PNG: Found ICC profile '%s' %u bytes long", name, data_size);
} else {
SAIL_LOG_DEBUG("PNG: ICC profile is not found");
SAIL_LOG_TRACE("PNG: ICC profile is not found");
}

return SAIL_OK;
Expand Down
6 changes: 3 additions & 3 deletions src/sail-codecs/png/png.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ SAIL_EXPORT sail_status_t sail_codec_load_seek_next_frame_v8_png(void *state, st
if (png_state->is_apng) {
/* APNG feature: a hidden frame. */
if (!png_state->skipped_hidden && png_get_first_frame_is_hidden(png_state->png_ptr, png_state->info_ptr)) {
SAIL_LOG_DEBUG("PNG: Skipping hidden frame");
SAIL_LOG_TRACE("PNG: Skipping hidden frame");
SAIL_TRY_OR_CLEANUP(png_private_skip_hidden_frame(png_state->first_image->bytes_per_line,
png_state->first_image->height,
png_state->png_ptr,
Expand Down Expand Up @@ -531,7 +531,7 @@ SAIL_EXPORT sail_status_t sail_codec_save_seek_next_frame_v8_png(void *state, co
/* Save meta data. */
if (png_state->save_options->options & SAIL_OPTION_META_DATA && image->meta_data_node != NULL) {
SAIL_TRY(png_private_write_meta_data(png_state->png_ptr, png_state->info_ptr, image->meta_data_node));
SAIL_LOG_DEBUG("PNG: Meta data has been written");
SAIL_LOG_TRACE("PNG: Meta data has been written");
}

png_set_IHDR(png_state->png_ptr,
Expand All @@ -556,7 +556,7 @@ SAIL_EXPORT sail_status_t sail_codec_save_seek_next_frame_v8_png(void *state, co
(const png_bytep)image->iccp->data,
(unsigned)image->iccp->size);

SAIL_LOG_DEBUG("PNG: ICC profile has been written");
SAIL_LOG_TRACE("PNG: ICC profile has been written");
}

/* Save palette. */
Expand Down
4 changes: 2 additions & 2 deletions src/sail-codecs/tiff/tiff.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,12 +301,12 @@ SAIL_EXPORT sail_status_t sail_codec_save_seek_next_frame_v8_tiff(void *state, c
/* Save ICC profile. */
if (tiff_state->save_options->options & SAIL_OPTION_ICCP && image->iccp != NULL) {
TIFFSetField(tiff_state->tiff, TIFFTAG_ICCPROFILE, image->iccp->size, image->iccp->data);
SAIL_LOG_DEBUG("TIFF: ICC profile has been saved");
SAIL_LOG_TRACE("TIFF: ICC profile has been saved");
}

/* Save meta data. */
if (tiff_state->save_options->options & SAIL_OPTION_META_DATA && image->meta_data_node != NULL) {
SAIL_LOG_DEBUG("TIFF: Saving meta data");
SAIL_LOG_TRACE("TIFF: Saving meta data");
SAIL_TRY(tiff_private_write_meta_data(tiff_state->tiff, image->meta_data_node));
}

Expand Down

0 comments on commit f3bab2e

Please sign in to comment.