private void verify(MemoryCacheImageOutputStream cache, int index) throws IOException { if (verifier == null) return; cache.seek(0); verifier.setInput(cache); verifyParam.setDestination(bi2); long start = System.currentTimeMillis(); bi2 = verifier.read(0, verifyParam); int maxDiff = maxDiff(bi.getRaster(), bi2.getRaster()); long end = System.currentTimeMillis(); if (LOG.isDebugEnabled()) LOG.debug("Verified compressed frame #{} in {} ms - max pixel value error: {}", new Object[] { index + 1, end - start, maxDiff }); if (maxDiff > maxPixelValueError) throw new CompressionVerificationException(maxDiff); }
return maxDiff(csm, ((DataBufferByte) db).getBankData(), csm2, ((DataBufferByte) db2).getBankData()); case DataBuffer.TYPE_USHORT: return maxDiff(csm, ((DataBufferUShort) db).getData(), csm2, ((DataBufferUShort) db2).getData()); case DataBuffer.TYPE_SHORT: return maxDiff(csm, ((DataBufferShort) db).getData(), csm2, ((DataBufferShort) db2).getData()); default: