Add @Deprecated to the deprecated Java methods, so javac will actually print deprecation warnings, as opposed to just listing the methods as deprecated in javadoc; remove the use of the deprecated methods by our own test programs.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@1171 632fc199-4ca6-4c93-a231-07263d6284db
This commit is contained in:
@@ -150,7 +150,7 @@ class TJBench {
|
||||
if (yuv == YUVDECODE)
|
||||
tjd.decompressToYUV(dstBuf, flags);
|
||||
else
|
||||
tjd.decompress(dstBuf, scaledw, pitch, scaledh, pf, flags);
|
||||
tjd.decompress(dstBuf, 0, 0, scaledw, pitch, scaledh, pf, flags);
|
||||
|
||||
/* Benchmark */
|
||||
for (i = 0, start = getTime(); (elapsed = getTime() - start) < benchTime;
|
||||
@@ -341,7 +341,7 @@ class TJBench {
|
||||
subNameLong[subsamp], jpegQual);
|
||||
for (i = 0; i < h; i++)
|
||||
System.arraycopy(srcBuf, w * ps * i, tmpBuf, pitch * i, w * ps);
|
||||
tjc.setSourceImage(srcBuf, tilew, pitch, tileh, pf);
|
||||
tjc.setSourceImage(srcBuf, 0, 0, tilew, pitch, tileh, pf);
|
||||
tjc.setJPEGQuality(jpegQual);
|
||||
tjc.setSubsamp(subsamp);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C)2011-2012 D. R. Commander. All Rights Reserved.
|
||||
* Copyright (C)2011-2012, 2014 D. R. Commander. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@@ -326,7 +326,7 @@ public class TJExample implements TJCustomFilter {
|
||||
if (img != null)
|
||||
jpegBuf = tjc.compress(img, flags);
|
||||
else {
|
||||
tjc.setSourceImage(bmpBuf, width, 0, height, TJ.PF_BGRX);
|
||||
tjc.setSourceImage(bmpBuf, 0, 0, width, 0, height, TJ.PF_BGRX);
|
||||
jpegBuf = tjc.compress(flags);
|
||||
}
|
||||
jpegSize = tjc.getCompressedSize();
|
||||
|
||||
@@ -621,7 +621,7 @@ public class TJUnitTest {
|
||||
else
|
||||
tjc.compress(img, dstBuf, flags);
|
||||
} else {
|
||||
tjc.setSourceImage(srcBuf, w, 0, h, pf);
|
||||
tjc.setSourceImage(srcBuf, 0, 0, w, 0, h, pf);
|
||||
if (yuv == YUVENCODE)
|
||||
tjc.encodeYUV(dstBuf, flags);
|
||||
else
|
||||
@@ -831,7 +831,7 @@ public class TJUnitTest {
|
||||
for (i = 0; i < w * h * 4; i++) {
|
||||
srcBuf[i] = (byte)(r.nextInt(2) * 255);
|
||||
}
|
||||
tjc.setSourceImage(srcBuf, w, 0, h, TJ.PF_BGRX);
|
||||
tjc.setSourceImage(srcBuf, 0, 0, w, 0, h, TJ.PF_BGRX);
|
||||
tjc.setSubsamp(subsamp);
|
||||
tjc.setJPEGQuality(100);
|
||||
if (yuv == YUVENCODE)
|
||||
@@ -847,7 +847,7 @@ public class TJUnitTest {
|
||||
for (i = 0; i < h * w * 4; i++) {
|
||||
srcBuf[i] = (byte)(r.nextInt(2) * 255);
|
||||
}
|
||||
tjc.setSourceImage(srcBuf, h, 0, w, TJ.PF_BGRX);
|
||||
tjc.setSourceImage(srcBuf, 0, 0, h, 0, w, TJ.PF_BGRX);
|
||||
if (yuv == YUVENCODE)
|
||||
tjc.encodeYUV(dstBuf, 0);
|
||||
else
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C)2011-2013 D. R. Commander. All Rights Reserved.
|
||||
* Copyright (C)2011-2014 D. R. Commander. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@@ -145,6 +145,7 @@ public class TJCompressor {
|
||||
* @deprecated Use
|
||||
* {@link #setSourceImage(byte[], int, int, int, int, int, int)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public void setSourceImage(byte[] srcImage, int width, int pitch,
|
||||
int height, int pixelFormat) throws Exception {
|
||||
setSourceImage(srcImage, 0, 0, width, pitch, height, pixelFormat);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C)2011-2013 D. R. Commander. All Rights Reserved.
|
||||
* Copyright (C)2011-2014 D. R. Commander. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@@ -313,6 +313,7 @@ public class TJDecompressor {
|
||||
* @deprecated Use
|
||||
* {@link #decompress(byte[], int, int, int, int, int, int, int)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public void decompress(byte[] dstBuf, int desiredWidth, int pitch,
|
||||
int desiredHeight, int pixelFormat, int flags)
|
||||
throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user