diff options
author | DRC <dcommander@users.sourceforge.net> | 2014-08-22 03:00:37 +0000 |
---|---|---|
committer | DRC <dcommander@users.sourceforge.net> | 2014-08-22 03:00:37 +0000 |
commit | d92949b0ac7f2d90aa554e5c6eb8e99730e75f8e (patch) | |
tree | 8a081ec34b927fcd6ed07fc62e08aa72c91b673c | |
parent | 88b90bdc07c4bfffa5dd17cba512eb5a87719c3e (diff) |
Run the TurboJPEG conformance tests out of a directory in /tmp (for improved performance, if the source directory is on a remote file share.) Fix an issue in TJBench.java that prevented it from working properly if the source image resided in a directory with a dot in the name.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1373 632fc199-4ca6-4c93-a231-07263d6284db
-rw-r--r-- | java/TJBench.java | 6 | ||||
-rwxr-xr-x | tjbenchtest.in | 2 | ||||
-rwxr-xr-x | tjbenchtest.java.in | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/java/TJBench.java b/java/TJBench.java index 617d312..c9d110c 100644 --- a/java/TJBench.java +++ b/java/TJBench.java @@ -236,7 +236,7 @@ class TJBench { "_" + 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) @@ -432,7 +432,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)); @@ -846,7 +846,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); } diff --git a/tjbenchtest.in b/tjbenchtest.in index 5e08c9b..4c4e040 100755 --- a/tjbenchtest.in +++ b/tjbenchtest.in @@ -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= NSARG= diff --git a/tjbenchtest.java.in b/tjbenchtest.java.in index 2054603..acdabd0 100755 --- a/tjbenchtest.java.in +++ b/tjbenchtest.java.in @@ -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" BMPARG= |