Skip to content

Commit 27503d7

Browse files
committed
log lvl symbolic names: prefix with GPUJPEG
to avoid potential clashes
1 parent c45afd9 commit 27503d7

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

libgpujpeg/gpujpeg_common.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,10 @@ enum restart_int {
156156
};
157157

158158
enum verbosity {
159-
LL_NORMAL = 0, ///< normal verbosity
160-
LL_VERBOSE = 1, ///< print additional information
161-
LL_DEBUG = 2, ///< print more information, including internal ones
162-
LL_DEBUG2 = 3, ///< print maximum of information, including JPEG file internal structure
159+
GPUJPEG_LL_NORMAL = 0, ///< normal verbosity
160+
GPUJPEG_LL_VERBOSE = 1, ///< print additional information
161+
GPUJPEG_LL_DEBUG = 2, ///< print more information, including internal ones
162+
GPUJPEG_LL_DEBUG2 = 3, ///< print maximum of information, including JPEG file internal structure
163163
};
164164

165165
/**

src/gpujpeg_reader.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ gpujpeg_reader_read_dqt(struct gpujpeg_decoder* decoder, uint8_t** image, const
672672
// Prepare quantization table for read raw table
673673
gpujpeg_table_quantization_decoder_compute(table);
674674

675-
if (decoder->coder.param.verbose >= LL_DEBUG2) {
675+
if (decoder->coder.param.verbose >= GPUJPEG_LL_DEBUG2) {
676676
quant_table_dump(Pq, Tq, table);
677677
}
678678
}
@@ -809,7 +809,7 @@ gpujpeg_reader_read_sof0(struct gpujpeg_parameters * param, struct gpujpeg_image
809809
length -= 3;
810810
}
811811

812-
if (param->verbose >= LL_DEBUG2) {
812+
if (param->verbose >= GPUJPEG_LL_DEBUG2) {
813813
sof0_dump(param->comp_count, param->sampling_factor, comp_id, quant_map);
814814
}
815815

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

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

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

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

0 commit comments

Comments
 (0)