]> granicus.if.org Git - libjpeg-turbo/commitdiff
Run the TurboJPEG conformance tests out of a directory in /tmp (for improved performa...
authorDRC <dcommander@users.sourceforge.net>
Fri, 22 Aug 2014 02:51:16 +0000 (02:51 +0000)
committerDRC <dcommander@users.sourceforge.net>
Fri, 22 Aug 2014 02:51:16 +0000 (02:51 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1371 632fc199-4ca6-4c93-a231-07263d6284db

java/TJBench.java
tjbenchtest.in
tjbenchtest.java.in

index e9ed2262668ee54d5501640d6f8f3550ed5fec60..36df1ab29cbde2dadf77158f3653b4ba239c922f 100644 (file)
@@ -204,7 +204,7 @@ class TJBench {
         tempStr = new String(fileName + "_" + subName[subsamp] + qualStr +
                              "_" + sizeStr + ".bmp");
       saveImage(tempStr, dstBuf, scaledw, scaledh, pf);
-      int ndx = tempStr.indexOf('.');
+      int ndx = tempStr.lastIndexOf('.');
       tempStr = new String(tempStr.substring(0, ndx) + "-err.bmp");
       if (srcBuf != null && sf.getNum() == 1 && sf.getDenom() == 1) {
         if (quiet == 0)
@@ -427,7 +427,7 @@ class TJBench {
     fis.read(srcBuf, 0, srcSize);
     fis.close();
 
-    int index = fileName.indexOf('.');
+    int index = fileName.lastIndexOf('.');
     if (index >= 0)
       fileName = new String(fileName.substring(0, index));
 
@@ -822,7 +822,7 @@ class TJBench {
         srcBuf = loadImage(argv[0], width, height, pf);
         w = width[0];  h = height[0];
         int index = -1;
-        if ((index = argv[0].indexOf('.')) >= 0)
+        if ((index = argv[0].lastIndexOf('.')) >= 0)
           argv[0] = argv[0].substring(0, index);
       }
 
index 72b93f8e2312254fe379c8641848146acfa3345c..b75fe8b40b47fcbef7127767915c681e84247cb8 100755 (executable)
@@ -22,7 +22,7 @@ runme()
 EXT=bmp
 IMAGES="vgl_5674_0098.${EXT} vgl_6434_0018a.${EXT} vgl_6548_0026a.${EXT} nightshot_iso_100.${EXT}"
 IMGDIR=@srcdir@/testimages
-OUTDIR=__tjbenchtest_output
+OUTDIR=`mktemp -d /tmp/__tjbenchtest_output.XXXXXX`
 EXEDIR=.
 BMPARG=
 if [ "$EXT" = "bmp" ]; then BMPARG=-bmp; fi
index ebff9c84697ec6832f7a34e8c1c53667a36a1890..44cdf4a4b9bfadb4cddef1a37d68b8f0f989e6f7 100755 (executable)
@@ -21,7 +21,7 @@ runme()
 
 IMAGES="vgl_5674_0098.bmp vgl_6434_0018a.bmp vgl_6548_0026a.bmp nightshot_iso_100.bmp"
 IMGDIR=@srcdir@/testimages
-OUTDIR=__tjbenchtest_java_output
+OUTDIR=`mktemp -d /tmp/__tjbenchtest_java_output.XXXXXX`
 EXEDIR=.
 JAVA="@JAVA@ -cp java/turbojpeg.jar -Djava.library.path=.libs"