From: Cristy Date: Sun, 29 Jul 2018 22:55:33 +0000 (-0400) Subject: Switch to ANSI C comments X-Git-Tag: 7.0.8-9~24 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cab28078d5c34582a63eb553f76a7dc1f24f4975;p=imagemagick Switch to ANSI C comments --- diff --git a/MagickCore/accelerate.c b/MagickCore/accelerate.c index 0b5ba7f62..a8377cb41 100644 --- a/MagickCore/accelerate.c +++ b/MagickCore/accelerate.c @@ -1001,11 +1001,11 @@ static MagickBooleanType ComputeContrastStretchImage(Image *image, if (image->debug != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); - //exception=(&image->exception); + /* exception=(&image->exception); */ /* - * initialize opencl env - */ + Initialize opencl environment. + */ device = RequestOpenCLDevice(clEnv); queue = AcquireOpenCLCommandQueue(device); @@ -3136,7 +3136,7 @@ static Image *ComputeLocalContrastImage(const Image *image,MagickCLEnv clEnv, { imageColumns = (unsigned int) image->columns; imageRows = (unsigned int) image->rows; - iRadius = (cl_int) (image->rows > image->columns ? image->rows : image->columns) * 0.002f * fabs(radius); // Normalized radius, 100% gives blur radius of 20% of the largest dimension + iRadius = (cl_int) (image->rows > image->columns ? image->rows : image->columns) * 0.002f * fabs(radius); /* Normalized radius, 100% gives blur radius of 20% of the largest dimension */ passes = (((1.0f * imageRows) * imageColumns * iRadius) + 3999999999) / 4000000000.0f; passes = (passes < 1) ? 1: passes; @@ -3620,9 +3620,11 @@ static Image* ComputeMotionBlurImage(const Image *image,MagickCLEnv clEnv, goto cleanup; } - // If the host pointer is aligned to the size of CLPixelPacket, - // then use the host buffer directly from the GPU; otherwise, - // create a buffer on the GPU and copy the data over + /* + If the host pointer is aligned to the size of CLPixelPacket, then use + the host buffer directly from the GPU; otherwise, create a buffer on + the GPU and copy the data over + */ if (ALIGNED(inputPixels,CLPixelPacket)) { mem_flags = CL_MEM_READ_ONLY|CL_MEM_USE_HOST_PTR; @@ -3631,7 +3633,9 @@ static Image* ComputeMotionBlurImage(const Image *image,MagickCLEnv clEnv, { mem_flags = CL_MEM_READ_ONLY|CL_MEM_COPY_HOST_PTR; } - // create a CL buffer from image pixel buffer + /* + create a CL buffer from image pixel buffer + */ length = image->columns * image->rows; imageBuffer = clEnv->library->clCreateBuffer(device->context, mem_flags, length * sizeof(CLPixelPacket), (void*)inputPixels, &clStatus); @@ -3671,7 +3675,9 @@ static Image* ComputeMotionBlurImage(const Image *image,MagickCLEnv clEnv, mem_flags = CL_MEM_WRITE_ONLY; hostPtr = NULL; } - // create a CL buffer from image pixel buffer + /* + Create a CL buffer from image pixel buffer. + */ length = image->columns * image->rows; filteredImageBuffer = clEnv->library->clCreateBuffer(device->context, mem_flags, length * sizeof(CLPixelPacket), hostPtr, &clStatus); @@ -3748,7 +3754,9 @@ static Image* ComputeMotionBlurImage(const Image *image,MagickCLEnv clEnv, } - // get the OpenCL kernel + /* + Get the OpenCL kernel + */ motionBlurKernel = AcquireOpenCLKernel(device,"MotionBlur"); if (motionBlurKernel == NULL) { @@ -3757,7 +3765,9 @@ static Image* ComputeMotionBlurImage(const Image *image,MagickCLEnv clEnv, goto cleanup; } - // set the kernel arguments + /* + Set the kernel arguments. + */ i = 0; clStatus=clEnv->library->clSetKernelArg(motionBlurKernel,i++,sizeof(cl_mem), (void *)&imageBuffer); @@ -3793,7 +3803,9 @@ static Image* ComputeMotionBlurImage(const Image *image,MagickCLEnv clEnv, goto cleanup; } - // launch the kernel + /* + Launch the kernel. + */ local_work_size[0] = 16; local_work_size[1] = 16; global_work_size[0] = (size_t)padGlobalWorkgroupSizeToLocalWorkgroupSize( diff --git a/MagickCore/opencl.c b/MagickCore/opencl.c index d5530e650..8db1aa118 100644 --- a/MagickCore/opencl.c +++ b/MagickCore/opencl.c @@ -2723,8 +2723,8 @@ MagickPrivate MagickBooleanType RecordProfileData(MagickCLDevice device, name=DestroyString(name); return(MagickTrue); } - start/=1000; // usecs - end/=1000; // usecs + start/=1000; /* usecs */ + end/=1000; elapsed=end-start; LockSemaphoreInfo(device->lock); i=0; diff --git a/MagickWand/magick-cli.c b/MagickWand/magick-cli.c index 8bd7aa16c..a6d236fd3 100644 --- a/MagickWand/magick-cli.c +++ b/MagickWand/magick-cli.c @@ -827,7 +827,7 @@ Magick_Command_Cleanup: char *text; - format="%w,%h,%m"; // Get this from image_info Option splaytree + format="%w,%h,%m"; /* Get this from image_info Option splaytree */ text=InterpretImageProperties(image_info,cli_wand->wand.images,format, exception); if (text == (char *) NULL) diff --git a/MagickWand/operation.c b/MagickWand/operation.c index 6216e68b9..365c118df 100644 --- a/MagickWand/operation.c +++ b/MagickWand/operation.c @@ -5211,7 +5211,9 @@ WandExport void CLIOption(MagickCLI *cli_wand,const char *option,...) if ( (option_type & SettingOptionFlags) != 0 ) { CLISettingOptionInfo(cli_wand, option, arg1, arg2); - // FUTURE: Sync Specific Settings into Image Properities (not global) + /* + FUTURE: Sync Specific Settings into Image Properities (not global) + */ } /* Operators that do not need images - read, write, stack, clone */ diff --git a/MagickWand/wandcli.c b/MagickWand/wandcli.c index 4a73394bf..75f19212f 100644 --- a/MagickWand/wandcli.c +++ b/MagickWand/wandcli.c @@ -241,8 +241,10 @@ WandExport MagickBooleanType CLICatchException(MagickCLI *cli_wand, if (cli_wand->wand.debug != MagickFalse) (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",cli_wand->wand.name); - // FUTURE: '-regard_warning' should make this more sensitive. - // Note pipelined options may like more control over this level + /* + FUTURE: '-regard_warning' should make this more sensitive. + Note pipelined options may like more control over this level + */ status=cli_wand->wand.exception->severity > ErrorException ? MagickTrue : MagickFalse; diff --git a/coders/dds.c b/coders/dds.c index 6148c6a6a..d7e55d5d2 100644 --- a/coders/dds.c +++ b/coders/dds.c @@ -2950,7 +2950,7 @@ static void WriteDDSInfo(Image *image, const size_t pixelFormat, if (pixelFormat == DDPF_FOURCC) { (void) WriteBlobLSBLong(image,(unsigned int) compression); - for(i=0;i < 5;i++) // bitcount / masks + for(i=0;i < 5;i++) /* bitcount / masks */ (void) WriteBlobLSBLong(image,0x00); } else @@ -2975,7 +2975,7 @@ static void WriteDDSInfo(Image *image, const size_t pixelFormat, } (void) WriteBlobLSBLong(image,caps); - for(i=0;i < 4;i++) // ddscaps2 + reserved region + for(i=0;i < 4;i++) /* ddscaps2 + reserved region */ (void) WriteBlobLSBLong(image,0x00); } diff --git a/coders/tiff.c b/coders/tiff.c index d463577fc..7098a6da0 100644 --- a/coders/tiff.c +++ b/coders/tiff.c @@ -292,7 +292,7 @@ static void InitPSDInfo(const Image *image, PSDInfo *info) info->mode=10; info->channels=1U; if (image->storage_class == PseudoClass) - info->mode=2; // indexed mode + info->mode=2; /* indexed mode */ else { info->channels=(unsigned short) image->number_channels; diff --git a/coders/xcf.c b/coders/xcf.c index 901caed2c..c05ddf284 100644 --- a/coders/xcf.c +++ b/coders/xcf.c @@ -735,8 +735,8 @@ static MagickBooleanType load_hierarchy(Image *image,XCFDocInfo *inDocInfo, offset, junk; - (void) ReadBlobMSBLong(image); // width - (void) ReadBlobMSBLong(image); // height + (void) ReadBlobMSBLong(image); /* width */ + (void) ReadBlobMSBLong(image); /* height */ inDocInfo->bytes_per_pixel=ReadBlobMSBLong(image); /* load in the levels...we make sure that the number of levels