Use C-style comments
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1125 632fc199-4ca6-4c93-a231-07263d6284db
This commit is contained in:
@@ -78,7 +78,7 @@ int main(void)
|
|||||||
jerr.pub.output_message = my_output_message;
|
jerr.pub.output_message = my_output_message;
|
||||||
|
|
||||||
if(setjmp(jerr.jb)) {
|
if(setjmp(jerr.jb)) {
|
||||||
// this will execute if libjpeg has an error
|
/* this will execute if libjpeg has an error */
|
||||||
jcs_valid = 0;
|
jcs_valid = 0;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
@@ -105,7 +105,7 @@ int main(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(setjmp(jerr.jb)) {
|
if(setjmp(jerr.jb)) {
|
||||||
// this will execute if libjpeg has an error
|
/* this will execute if libjpeg has an error */
|
||||||
jcs_alpha_valid = 0;
|
jcs_alpha_valid = 0;
|
||||||
goto done2;
|
goto done2;
|
||||||
}
|
}
|
||||||
|
|||||||
16
turbojpeg.c
16
turbojpeg.c
@@ -538,9 +538,9 @@ DLLEXPORT unsigned long DLLCALL tjBufSize(int width, int height,
|
|||||||
if(width<1 || height<1 || jpegSubsamp<0 || jpegSubsamp>=NUMSUBOPT)
|
if(width<1 || height<1 || jpegSubsamp<0 || jpegSubsamp>=NUMSUBOPT)
|
||||||
_throw("tjBufSize(): Invalid argument");
|
_throw("tjBufSize(): Invalid argument");
|
||||||
|
|
||||||
// This allows for rare corner cases in which a JPEG image can actually be
|
/* This allows for rare corner cases in which a JPEG image can actually be
|
||||||
// larger than the uncompressed input (we wouldn't mention it if it hadn't
|
larger than the uncompressed input (we wouldn't mention it if it hadn't
|
||||||
// happened before.)
|
happened before.) */
|
||||||
mcuw=tjMCUWidth[jpegSubsamp];
|
mcuw=tjMCUWidth[jpegSubsamp];
|
||||||
mcuh=tjMCUHeight[jpegSubsamp];
|
mcuh=tjMCUHeight[jpegSubsamp];
|
||||||
chromasf=jpegSubsamp==TJSAMP_GRAY? 0: 4*64/(mcuw*mcuh);
|
chromasf=jpegSubsamp==TJSAMP_GRAY? 0: 4*64/(mcuw*mcuh);
|
||||||
@@ -556,9 +556,9 @@ DLLEXPORT unsigned long DLLCALL TJBUFSIZE(int width, int height)
|
|||||||
if(width<1 || height<1)
|
if(width<1 || height<1)
|
||||||
_throw("TJBUFSIZE(): Invalid argument");
|
_throw("TJBUFSIZE(): Invalid argument");
|
||||||
|
|
||||||
// This allows for rare corner cases in which a JPEG image can actually be
|
/* This allows for rare corner cases in which a JPEG image can actually be
|
||||||
// larger than the uncompressed input (we wouldn't mention it if it hadn't
|
larger than the uncompressed input (we wouldn't mention it if it hadn't
|
||||||
// happened before.)
|
happened before.) */
|
||||||
retval=PAD(width, 16) * PAD(height, 16) * 6 + 2048;
|
retval=PAD(width, 16) * PAD(height, 16) * 6 + 2048;
|
||||||
|
|
||||||
bailout:
|
bailout:
|
||||||
@@ -976,10 +976,10 @@ DLLEXPORT int DLLCALL tjCompressFromYUV(tjhandle handle, unsigned char *srcBuf,
|
|||||||
for(j=0; j<min(th[i], ch[i]-crow[i]); j++)
|
for(j=0; j<min(th[i], ch[i]-crow[i]); j++)
|
||||||
{
|
{
|
||||||
memcpy(tmpbuf[i][j], inbuf[i][crow[i]+j], cw[i]);
|
memcpy(tmpbuf[i][j], inbuf[i][crow[i]+j], cw[i]);
|
||||||
// Duplicate last sample in row to fill out MCU
|
/* Duplicate last sample in row to fill out MCU */
|
||||||
for(k=cw[i]; k<iw[i]; k++) tmpbuf[i][j][k]=tmpbuf[i][j][cw[i]-1];
|
for(k=cw[i]; k<iw[i]; k++) tmpbuf[i][j][k]=tmpbuf[i][j][cw[i]-1];
|
||||||
}
|
}
|
||||||
// Duplicate last row to fill out MCU
|
/* Duplicate last row to fill out MCU */
|
||||||
for(j=ch[i]-crow[i]; j<th[i]; j++)
|
for(j=ch[i]-crow[i]; j<th[i]; j++)
|
||||||
memcpy(tmpbuf[i][j], tmpbuf[i][ch[i]-crow[i]-1], iw[i]);
|
memcpy(tmpbuf[i][j], tmpbuf[i][ch[i]-crow[i]-1], iw[i]);
|
||||||
yuvptr[i]=tmpbuf[i];
|
yuvptr[i]=tmpbuf[i];
|
||||||
|
|||||||
Reference in New Issue
Block a user