Skip to content

Commit b972f77

Browse files
committed
gpujpeg_preprocessor_decode_no_transform: +DEBUG_MSG
1 parent 6c086d3 commit b972f77

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/gpujpeg_postprocessor.cu

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -381,10 +381,12 @@ static bool
381381
gpujpeg_preprocessor_decode_no_transform(struct gpujpeg_coder* coder)
382382
{
383383
if ( coder->param.comp_count >= 3 && coder->param_image.color_space != coder->param.color_space_internal ) {
384-
/*fprintf(stderr, "Decoding JPEG to a planar pixel format is supported only when no color transformation is required. "
384+
DEBUG_MSG(coder->param.verbose,
385+
"Decoding JPEG to a planar pixel format is supported "
386+
"only when no color transformation is required. "
385387
"JPEG internal color space is set to \"%s\", image is \"%s\".\n",
386388
gpujpeg_color_space_get_name(coder->param.color_space_internal),
387-
gpujpeg_color_space_get_name(coder->param_image.color_space));*/
389+
gpujpeg_color_space_get_name(coder->param_image.color_space));
388390
return false;
389391
}
390392

@@ -394,9 +396,10 @@ gpujpeg_preprocessor_decode_no_transform(struct gpujpeg_coder* coder)
394396
if ( coder->component[i].sampling_factor.horizontal != sampling_factors[i].horizontal ||
395397
coder->component[i].sampling_factor.vertical != sampling_factors[i].vertical ) {
396398
// const char *name = gpujpeg_pixel_format_get_name(coder->param_image.pixel_format);
397-
/*fprintf(stderr, "Decoding JPEG to a planar pixel format cannot change subsampling (%s to %s).\n",
398-
gpujpeg_subsampling_get_name(coder->param.comp_count, coder->component),
399-
gpujpeg_pixel_format_get_name(coder->param_image.pixel_format));*/
399+
DEBUG_MSG(coder->param.verbose,
400+
"Decoding JPEG to a planar pixel format cannot change subsampling (%s to %s).\n",
401+
gpujpeg_subsampling_get_name(coder->param.comp_count, coder->param.sampling_factor),
402+
gpujpeg_pixel_format_get_name(coder->param_image.pixel_format));
400403
return false;
401404
}
402405
}

0 commit comments

Comments
 (0)