TJBench Java: Properly handle transform warnings

+ warnings from TJDecompressor.decompressHeader()
This commit is contained in:
DRC
2019-01-01 21:16:33 -06:00
parent 1ff90822f1
commit 0fa5ae6b54

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (C)2009-2014, 2016-2018 D. R. Commander. All Rights Reserved. * Copyright (C)2009-2014, 2016-2019 D. R. Commander. All Rights Reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
@@ -202,7 +202,9 @@ final class TJBench {
int width = doTile ? Math.min(tilew, w - x) : scaledw; int width = doTile ? Math.min(tilew, w - x) : scaledw;
int height = doTile ? Math.min(tileh, h - y) : scaledh; int height = doTile ? Math.min(tileh, h - y) : scaledh;
try {
tjd.setSourceImage(jpegBuf[tile], jpegSize[tile]); tjd.setSourceImage(jpegBuf[tile], jpegSize[tile]);
} catch (TJException e) { handleTJException(e); }
if (doYUV) { if (doYUV) {
yuvImage.setBuf(yuvImage.getBuf(), width, yuvPad, height, subsamp); yuvImage.setBuf(yuvImage.getBuf(), width, yuvPad, height, subsamp);
try { try {
@@ -500,7 +502,9 @@ final class TJBench {
tjt = new TJTransformer(); tjt = new TJTransformer();
try {
tjt.setSourceImage(srcBuf, srcSize); tjt.setSourceImage(srcBuf, srcSize);
} catch (TJException e) { handleTJException(e); }
w = tjt.getWidth(); w = tjt.getWidth();
h = tjt.getHeight(); h = tjt.getHeight();
subsamp = tjt.getSubsamp(); subsamp = tjt.getSubsamp();
@@ -607,7 +611,9 @@ final class TJBench {
elapsed = 0.; elapsed = 0.;
while (true) { while (true) {
start = getTime(); start = getTime();
try {
tjt.transform(jpegBuf, t, flags); tjt.transform(jpegBuf, t, flags);
} catch (TJException e) { handleTJException(e); }
jpegSize = tjt.getTransformedSizes(); jpegSize = tjt.getTransformedSizes();
elapsed += getTime() - start; elapsed += getTime() - start;
if (iter >= 0) { if (iter >= 0) {