]> granicus.if.org Git - libjpeg-turbo/commitdiff
Use the same naming convention for the output files as the Java tests
authorDRC <dcommander@users.sourceforge.net>
Thu, 31 Mar 2011 20:48:30 +0000 (20:48 +0000)
committerDRC <dcommander@users.sourceforge.net>
Thu, 31 Mar 2011 20:48:30 +0000 (20:48 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@547 632fc199-4ca6-4c93-a231-07263d6284db

jpegut.c
jpgtest.c

index 04eba24ebaf7e5ea5894afdc160717c11876ee94..a96dbbfe7951d75ce0db2c33dfb4082f4e515022 100644 (file)
--- a/jpegut.c
+++ b/jpegut.c
@@ -361,7 +361,7 @@ void gentestjpeg(tjhandle hnd, unsigned char *jpegbuf, unsigned long *size,
                snprintf(tempstr, 1024, "%s_enc_%s_%s_%s.yuv", basefilename, _pfstr[pf],
                        (flags&TJ_BOTTOMUP)? "BU":"TD", _subnames[subsamp]);
        else
-               snprintf(tempstr, 1024, "%s_enc_%s_%s_%sQ%d.jpg", basefilename, _pfstr[pf],
+               snprintf(tempstr, 1024, "%s_enc_%s_%s_%s_Q%d.jpg", basefilename, _pfstr[pf],
                        (flags&TJ_BOTTOMUP)? "BU":"TD", _subnames[subsamp], qual);
        writejpeg(jpegbuf, *size, tempstr);
        if(yuv==YUVENCODE)
index d0eac5450a6738f755f8a584a43dbfac735fe6e8..ab4d9f8ae01be4cc8c8608ab3baafaa1ba1878b9 100644 (file)
--- a/jpgtest.c
+++ b/jpgtest.c
@@ -70,7 +70,7 @@ int decomptest(unsigned char *srcbuf, unsigned char **jpegbuf,
        unsigned long *comptilesize, unsigned char *rgbbuf, int w, int h,
        int jpegsub, int qual, char *filename, int tilesizex, int tilesizey)
 {
-       char tempstr[1024], sizestr[20]="\0", qualstr[5]="\0", *ptr;
+       char tempstr[1024], sizestr[20]="\0", qualstr[6]="\0", *ptr;
        FILE *outfile=NULL;  tjhandle hnd=NULL;
        int flags=(forcemmx?TJ_FORCEMMX:0)|(forcesse?TJ_FORCESSE:0)
                |(forcesse2?TJ_FORCESSE2:0)|(forcesse3?TJ_FORCESSE3:0)
@@ -85,7 +85,7 @@ int decomptest(unsigned char *srcbuf, unsigned char **jpegbuf,
 
        if(qual>0)
        {
-               snprintf(qualstr, 5, "Q%d", qual);
+               snprintf(qualstr, 6, "_Q%d", qual);
                qualstr[4]=0;
        }
 
@@ -344,7 +344,7 @@ void dotest(unsigned char *srcbuf, int w, int h, int jpegsub, int qual,
                        if(yuv==YUVENCODE)
                                snprintf(tempstr, 1024, "%s_%s.yuv", filename, _subnames[jpegsub]);
                        else
-                               snprintf(tempstr, 1024, "%s_%sQ%d.jpg", filename, _subnames[jpegsub],
+                               snprintf(tempstr, 1024, "%s_%s_Q%d.jpg", filename, _subnames[jpegsub],
                                        qual);
                        if((outfile=fopen(tempstr, "wb"))==NULL)
                                _throwunix("opening reference image");
@@ -463,11 +463,12 @@ void dodecomptest(char *filename)
                _w=w;  _h=h;  _tilesizex=tilesizex;  _tilesizey=tilesizey;
                if(!quiet)
                {
-                       printf("\n%s size: %d x %d\n", dotile? "Tile":"Image", _tilesizex,
+                       printf("\n%s size: %d x %d", dotile? "Tile":"Image", _tilesizex,
                                _tilesizey);
                        if(scale_num!=1 || scale_denom!=1)
                                printf(" --> %d x %d", (_w*scale_num+scale_denom-1)/scale_denom,
                                        (_h*scale_num+scale_denom-1)/scale_denom);
+                       printf("\n");
                }
                else if(quiet==1)
                {