Skip to content

Commit 6c086d3

Browse files
committed
gpujpeg_preprocessor_decode_no_transform: return bool
readibility
1 parent 9145112 commit 6c086d3

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/gpujpeg_postprocessor.cu

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -377,14 +377,15 @@ gpujpeg_preprocessor_select_decode_kernel(struct gpujpeg_coder* coder)
377377
return NULL;
378378
}
379379

380-
static int gpujpeg_preprocessor_decode_no_transform(struct gpujpeg_coder * coder)
380+
static bool
381+
gpujpeg_preprocessor_decode_no_transform(struct gpujpeg_coder* coder)
381382
{
382383
if ( coder->param.comp_count >= 3 && coder->param_image.color_space != coder->param.color_space_internal ) {
383384
/*fprintf(stderr, "Decoding JPEG to a planar pixel format is supported only when no color transformation is required. "
384385
"JPEG internal color space is set to \"%s\", image is \"%s\".\n",
385386
gpujpeg_color_space_get_name(coder->param.color_space_internal),
386387
gpujpeg_color_space_get_name(coder->param_image.color_space));*/
387-
return 0;
388+
return false;
388389
}
389390

390391
const struct gpujpeg_component_sampling_factor* sampling_factors =
@@ -396,10 +397,10 @@ static int gpujpeg_preprocessor_decode_no_transform(struct gpujpeg_coder * coder
396397
/*fprintf(stderr, "Decoding JPEG to a planar pixel format cannot change subsampling (%s to %s).\n",
397398
gpujpeg_subsampling_get_name(coder->param.comp_count, coder->component),
398399
gpujpeg_pixel_format_get_name(coder->param_image.pixel_format));*/
399-
return 0;
400+
return false;
400401
}
401402
}
402-
return 1;
403+
return true;
403404
}
404405

405406
/* Documented at declaration */

0 commit comments

Comments
 (0)