Skip to content

Commit

Permalink
log lvl symbolic names: prefix with GPUJPEG
Browse files Browse the repository at this point in the history
to avoid potential clashes
  • Loading branch information
MartinPulec committed Jan 3, 2025
1 parent c45afd9 commit 27503d7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions libgpujpeg/gpujpeg_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,10 @@ enum restart_int {
};

enum verbosity {
LL_NORMAL = 0, ///< normal verbosity
LL_VERBOSE = 1, ///< print additional information
LL_DEBUG = 2, ///< print more information, including internal ones
LL_DEBUG2 = 3, ///< print maximum of information, including JPEG file internal structure
GPUJPEG_LL_NORMAL = 0, ///< normal verbosity
GPUJPEG_LL_VERBOSE = 1, ///< print additional information
GPUJPEG_LL_DEBUG = 2, ///< print more information, including internal ones
GPUJPEG_LL_DEBUG2 = 3, ///< print maximum of information, including JPEG file internal structure
};

/**
Expand Down
10 changes: 5 additions & 5 deletions src/gpujpeg_reader.c
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ gpujpeg_reader_read_dqt(struct gpujpeg_decoder* decoder, uint8_t** image, const
// Prepare quantization table for read raw table
gpujpeg_table_quantization_decoder_compute(table);

if (decoder->coder.param.verbose >= LL_DEBUG2) {
if (decoder->coder.param.verbose >= GPUJPEG_LL_DEBUG2) {
quant_table_dump(Pq, Tq, table);
}
}
Expand Down Expand Up @@ -809,7 +809,7 @@ gpujpeg_reader_read_sof0(struct gpujpeg_parameters * param, struct gpujpeg_image
length -= 3;
}

if (param->verbose >= LL_DEBUG2) {
if (param->verbose >= GPUJPEG_LL_DEBUG2) {
sof0_dump(param->comp_count, param->sampling_factor, comp_id, quant_map);
}

Expand Down Expand Up @@ -919,7 +919,7 @@ gpujpeg_reader_read_dht(struct gpujpeg_decoder* decoder, uint8_t** image, const
// Compute huffman table for read values
gpujpeg_table_huffman_decoder_compute(table);

if (decoder->coder.param.verbose >= LL_DEBUG2) {
if (decoder->coder.param.verbose >= GPUJPEG_LL_DEBUG2) {
huff_table_dump(Th, Tc, table);
}

Expand Down Expand Up @@ -1183,7 +1183,7 @@ sos_check_dump(int verbose, int comp_count, int Ss, int Se, int Ah, int Al)
WARN_MSG("Some of SOS parameters not valid for sequential DCT.\n");
invalid_val = true;
}
if (!invalid_val && verbose < LL_DEBUG2) {
if (!invalid_val && verbose < GPUJPEG_LL_DEBUG2) {
return;
}
printf("SOS components=%d Ss=%d Se=%d Ah=%d Al=%d\n", comp_count, Ss, Se, Ah, Al);
Expand Down Expand Up @@ -1277,7 +1277,7 @@ gpujpeg_reader_read_sos(struct gpujpeg_decoder* decoder, struct gpujpeg_reader*
decoder->comp_table_huffman_map[component_index][GPUJPEG_HUFFMAN_DC] = table_dc;
decoder->comp_table_huffman_map[component_index][GPUJPEG_HUFFMAN_AC] = table_ac;

if ( decoder->coder.param.verbose >= LL_DEBUG2 ) {
if ( decoder->coder.param.verbose >= GPUJPEG_LL_DEBUG2 ) {
printf("SOS component #%d table DC: %d table AC: %d\n", comp_id, table_dc, table_ac);
}
}
Expand Down

0 comments on commit 27503d7

Please sign in to comment.