Fix various CR/LF issues
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@443 632fc199-4ca6-4c93-a231-07263d6284db
This commit is contained in:
41
jpgtest.c
41
jpgtest.c
@@ -237,10 +237,10 @@ void dotest(unsigned char *srcbuf, int w, int h, int jpegsub, int qual,
|
||||
if(!quiet)
|
||||
{
|
||||
if(yuv==YUVENCODE)
|
||||
printf("\n>>>>> %s (%s) <--> YUV %s <<<<<\n", _pfname[pf],
|
||||
printf(">>>>> %s (%s) <--> YUV %s <<<<<\n", _pfname[pf],
|
||||
bu?"Bottom-up":"Top-down", _subnamel[jpegsub]);
|
||||
else
|
||||
printf("\n>>>>> %s (%s) <--> JPEG %s Q%d <<<<<\n", _pfname[pf],
|
||||
printf(">>>>> %s (%s) <--> JPEG %s Q%d <<<<<\n", _pfname[pf],
|
||||
bu?"Bottom-up":"Top-down", _subnamel[jpegsub], qual);
|
||||
}
|
||||
if(yuv==YUVDECODE) dotile=0;
|
||||
@@ -331,7 +331,10 @@ void dotest(unsigned char *srcbuf, int w, int h, int jpegsub, int qual,
|
||||
fclose(outfile); outfile=NULL;
|
||||
if(!quiet) printf("Reference image written to %s\n", tempstr);
|
||||
}
|
||||
if(yuv==YUVENCODE) goto bailout;
|
||||
if(yuv==YUVENCODE)
|
||||
{
|
||||
if(quiet==1) printf("\n"); goto bailout;
|
||||
}
|
||||
|
||||
// Decompression test
|
||||
if(decomptest(srcbuf, jpegbuf, comptilesize, rgbbuf, w, h, jpegsub, qual,
|
||||
@@ -400,7 +403,7 @@ void dodecomptest(char *filename)
|
||||
|
||||
if(quiet==1)
|
||||
{
|
||||
printf("\nAll performance values in Mpixels/sec\n\n");
|
||||
printf("All performance values in Mpixels/sec\n\n");
|
||||
printf("Bitmap\tBitmap\tJPEG\tImage Size\tDecomp\n"),
|
||||
printf("Format\tOrder\tFormat\t X Y \tPerf\n\n");
|
||||
printf("%s\t%s\t%s\t%-4d %-4d\t", _pfname[pf], bu?"BU":"TD",
|
||||
@@ -409,9 +412,9 @@ void dodecomptest(char *filename)
|
||||
else
|
||||
{
|
||||
if(yuv==YUVDECODE)
|
||||
printf("\n>>>>> JPEG --> YUV %s <<<<<\n", _subnamel[jpegsub]);
|
||||
printf(">>>>> JPEG --> YUV %s <<<<<\n", _subnamel[jpegsub]);
|
||||
else
|
||||
printf("\n>>>>> JPEG --> %s (%s) <<<<<\n", _pfname[pf],
|
||||
printf(">>>>> JPEG --> %s (%s) <<<<<\n", _pfname[pf],
|
||||
bu?"Bottom-up":"Top-down");
|
||||
printf("\nImage size: %d x %d", w, h);
|
||||
if(scalefactor!=1) printf(" --> %d x %d", (w+scalefactor-1)/scalefactor,
|
||||
@@ -471,18 +474,20 @@ int main(int argc, char *argv[])
|
||||
if(!stricmp(temp, ".jpg") || !stricmp(temp, ".jpeg")) decomponly=1;
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
|
||||
if(argc>minarg)
|
||||
{
|
||||
for(i=minarg; i<argc; i++)
|
||||
{
|
||||
if(!stricmp(argv[i], "-yuvencode"))
|
||||
{
|
||||
printf("Testing YUV planar encoding\n");
|
||||
printf("Testing YUV planar encoding\n\n");
|
||||
yuv=YUVENCODE; hiqual=qual=100;
|
||||
}
|
||||
if(!stricmp(argv[i], "-yuvdecode"))
|
||||
{
|
||||
printf("Testing YUV planar decoding\n");
|
||||
printf("Testing YUV planar decoding\n\n");
|
||||
yuv=YUVDECODE;
|
||||
}
|
||||
}
|
||||
@@ -510,27 +515,27 @@ int main(int argc, char *argv[])
|
||||
if(!stricmp(argv[i], "-tile")) dotile=1;
|
||||
if(!stricmp(argv[i], "-forcesse3"))
|
||||
{
|
||||
printf("Using SSE3 code\n");
|
||||
printf("Using SSE3 code\n\n");
|
||||
forcesse3=1;
|
||||
}
|
||||
if(!stricmp(argv[i], "-forcesse2"))
|
||||
{
|
||||
printf("Using SSE2 code\n");
|
||||
printf("Using SSE2 code\n\n");
|
||||
forcesse2=1;
|
||||
}
|
||||
if(!stricmp(argv[i], "-forcesse"))
|
||||
{
|
||||
printf("Using SSE code\n");
|
||||
printf("Using SSE code\n\n");
|
||||
forcesse=1;
|
||||
}
|
||||
if(!stricmp(argv[i], "-forcemmx"))
|
||||
{
|
||||
printf("Using MMX code\n");
|
||||
printf("Using MMX code\n\n");
|
||||
forcemmx=1;
|
||||
}
|
||||
if(!stricmp(argv[i], "-fastupsample"))
|
||||
{
|
||||
printf("Using fast upsampling code\n");
|
||||
printf("Using fast upsampling code\n\n");
|
||||
fastupsample=1;
|
||||
}
|
||||
if(!stricmp(argv[i], "-rgb")) pf=BMP_RGB;
|
||||
@@ -570,7 +575,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if(quiet==1 && !decomponly)
|
||||
{
|
||||
printf("\nAll performance values in Mpixels/sec\n\n");
|
||||
printf("All performance values in Mpixels/sec\n\n");
|
||||
printf("Bitmap\tBitmap\tJPEG\tJPEG\tTile Size\tCompr\tCompr\tDecomp\n");
|
||||
printf("Format\tOrder\tFormat\tQual\t X Y \tPerf \tRatio\tPerf\n\n");
|
||||
}
|
||||
@@ -578,19 +583,21 @@ int main(int argc, char *argv[])
|
||||
if(decomponly)
|
||||
{
|
||||
dodecomptest(argv[1]);
|
||||
printf("\n");
|
||||
goto bailout;
|
||||
}
|
||||
for(i=hiqual; i>=qual; i--)
|
||||
dotest(bmpbuf, w, h, TJ_GRAYSCALE, i, argv[1]);
|
||||
if(quiet) printf("\n");
|
||||
printf("\n");
|
||||
for(i=hiqual; i>=qual; i--)
|
||||
dotest(bmpbuf, w, h, TJ_420, i, argv[1]);
|
||||
if(quiet) printf("\n");
|
||||
printf("\n");
|
||||
for(i=hiqual; i>=qual; i--)
|
||||
dotest(bmpbuf, w, h, TJ_422, i, argv[1]);
|
||||
if(quiet) printf("\n");
|
||||
printf("\n");
|
||||
for(i=hiqual; i>=qual; i--)
|
||||
dotest(bmpbuf, w, h, TJ_444, i, argv[1]);
|
||||
printf("\n");
|
||||
|
||||
bailout:
|
||||
if(bmpbuf) free(bmpbuf);
|
||||
|
||||
Reference in New Issue
Block a user