From: DRC Date: Mon, 13 Nov 2017 14:15:50 +0000 (-0600) Subject: TurboJPEG C: Code formatting tweaks X-Git-Tag: 1.5.3~14 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=94e152b186c068e2571e98d207d1677c9fb2121c;p=libjpeg-turbo TurboJPEG C: Code formatting tweaks --- diff --git a/turbojpeg.c b/turbojpeg.c index c9bc619..a893599 100644 --- a/turbojpeg.c +++ b/turbojpeg.c @@ -790,8 +790,7 @@ DLLEXPORT int DLLCALL tjCompress2(tjhandle handle, const unsigned char *srcBuf, if(setjmp(this->jerr.setjmp_buffer)) { /* If we get here, the JPEG code has signaled an error. */ - retval=-1; - goto bailout; + retval=-1; goto bailout; } cinfo->image_width=width; @@ -907,8 +906,7 @@ DLLEXPORT int DLLCALL tjEncodeYUVPlanes(tjhandle handle, if(setjmp(this->jerr.setjmp_buffer)) { /* If we get here, the JPEG code has signaled an error. */ - retval=-1; - goto bailout; + retval=-1; goto bailout; } cinfo->image_width=width; @@ -990,8 +988,7 @@ DLLEXPORT int DLLCALL tjEncodeYUVPlanes(tjhandle handle, if(setjmp(this->jerr.setjmp_buffer)) { /* If we get here, the JPEG code has signaled an error. */ - retval=-1; - goto bailout; + retval=-1; goto bailout; } for(row=0; rowmax_v_samp_factor) @@ -1108,8 +1105,7 @@ DLLEXPORT int DLLCALL tjCompressFromYUVPlanes(tjhandle handle, if(setjmp(this->jerr.setjmp_buffer)) { /* If we get here, the JPEG code has signaled an error. */ - retval=-1; - goto bailout; + retval=-1; goto bailout; } cinfo->image_width=width; @@ -1171,8 +1167,7 @@ DLLEXPORT int DLLCALL tjCompressFromYUVPlanes(tjhandle handle, if(setjmp(this->jerr.setjmp_buffer)) { /* If we get here, the JPEG code has signaled an error. */ - retval=-1; - goto bailout; + retval=-1; goto bailout; } for(row=0; row<(int)cinfo->image_height; @@ -1404,8 +1399,7 @@ DLLEXPORT int DLLCALL tjDecompress2(tjhandle handle, if(setjmp(this->jerr.setjmp_buffer)) { /* If we get here, the JPEG code has signaled an error. */ - retval=-1; - goto bailout; + retval=-1; goto bailout; } jpeg_mem_src_tj(dinfo, jpegBuf, jpegSize); @@ -1456,8 +1450,7 @@ DLLEXPORT int DLLCALL tjDecompress2(tjhandle handle, if(setjmp(this->jerr.setjmp_buffer)) { /* If we get here, the JPEG code has signaled an error. */ - retval=-1; - goto bailout; + retval=-1; goto bailout; } for(i=0; i<(int)dinfo->output_height; i++) { @@ -1589,8 +1582,7 @@ DLLEXPORT int DLLCALL tjDecodeYUVPlanes(tjhandle handle, if(setjmp(this->jerr.setjmp_buffer)) { /* If we get here, the JPEG code has signaled an error. */ - retval=-1; - goto bailout; + retval=-1; goto bailout; } if(pixelFormat==TJPF_CMYK) @@ -1684,8 +1676,7 @@ DLLEXPORT int DLLCALL tjDecodeYUVPlanes(tjhandle handle, if(setjmp(this->jerr.setjmp_buffer)) { /* If we get here, the JPEG code has signaled an error. */ - retval=-1; - goto bailout; + retval=-1; goto bailout; } for(row=0; rowmax_v_samp_factor) @@ -1789,8 +1780,7 @@ DLLEXPORT int DLLCALL tjDecompressToYUVPlanes(tjhandle handle, if(setjmp(this->jerr.setjmp_buffer)) { /* If we get here, the JPEG code has signaled an error. */ - retval=-1; - goto bailout; + retval=-1; goto bailout; } if(!this->headerRead) @@ -1871,8 +1861,7 @@ DLLEXPORT int DLLCALL tjDecompressToYUVPlanes(tjhandle handle, if(setjmp(this->jerr.setjmp_buffer)) { /* If we get here, the JPEG code has signaled an error. */ - retval=-1; - goto bailout; + retval=-1; goto bailout; } if(flags&TJFLAG_FASTUPSAMPLE) dinfo->do_fancy_upsampling=FALSE; @@ -2060,8 +2049,7 @@ DLLEXPORT int DLLCALL tjTransform(tjhandle handle, if(setjmp(this->jerr.setjmp_buffer)) { /* If we get here, the JPEG code has signaled an error. */ - retval=-1; - goto bailout; + retval=-1; goto bailout; } jpeg_mem_src_tj(dinfo, jpegBuf, jpegSize); diff --git a/turbojpeg.h b/turbojpeg.h index f60caf8..410e98a 100644 --- a/turbojpeg.h +++ b/turbojpeg.h @@ -275,7 +275,6 @@ static const int tjGreenOffset[TJ_NUMPF] = {1, 1, 1, 1, 2, 2, 0, 1, 1, 2, 2, -1} * then the blue component will be pixel[tjBlueOffset[TJ_BGRX]]. */ static const int tjBlueOffset[TJ_NUMPF] = {2, 0, 2, 0, 1, 3, 0, 2, 0, 1, 3, -1}; - /** * Pixel size (in bytes) for a given pixel format. */