mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2025-08-05 04:25:29 -04:00
Minor clean-up.
This commit is contained in:
parent
02a4277413
commit
217f4dc371
@ -68,13 +68,13 @@ public interface JPEG {
|
||||
int APP15 = 0xFFEF;
|
||||
|
||||
// Start of Frame segment markers (SOFn).
|
||||
/** SOF0: Baseline DCT, Huffman encoded. */
|
||||
/** SOF0: Baseline DCT, Huffman coding. */
|
||||
int SOF0 = 0xFFC0;
|
||||
/** SOF0: Extended DCT, Huffman encoded. */
|
||||
/** SOF0: Extended DCT, Huffman coding. */
|
||||
int SOF1 = 0xFFC1;
|
||||
/** SOF2: Progressive DCT, Huffman encoded. */
|
||||
/** SOF2: Progressive DCT, Huffman coding. */
|
||||
int SOF2 = 0xFFC2;
|
||||
/** SOF3: Lossless sequential, Huffman encoded. */
|
||||
/** SOF3: Lossless sequential, Huffman coding. */
|
||||
int SOF3 = 0xFFC3;
|
||||
/** SOF5: Sequential DCT, differential Huffman coding. */
|
||||
int SOF5 = 0xFFC5;
|
||||
@ -86,7 +86,7 @@ public interface JPEG {
|
||||
int SOF9 = 0xFFC9;
|
||||
/** SOF10: Progressive DCT, arithmetic coding. */
|
||||
int SOF10 = 0xFFCA;
|
||||
/** SOF11: Lossless sequential, arithmetic encoded. */
|
||||
/** SOF11: Lossless sequential, arithmetic coding. */
|
||||
int SOF11 = 0xFFCB;
|
||||
/** SOF13: Sequential DCT, differential arithmetic coding. */
|
||||
int SOF13 = 0xFFCD;
|
||||
|
@ -232,7 +232,7 @@ public final class JPEGQuality {
|
||||
throw new IIOException("Duplicate DQT table index: " + num);
|
||||
}
|
||||
|
||||
if (bits > 1) {
|
||||
if (bits < 0 || bits > 1) {
|
||||
throw new IIOException("Bad DQT bit info: " + bits);
|
||||
}
|
||||
|
||||
@ -247,11 +247,13 @@ public final class JPEGQuality {
|
||||
for (int j = 0, qtDataLength = qtData.length; j < qtDataLength; j++) {
|
||||
tables[num][j] = (short) (qtData[j] & 0xff);
|
||||
}
|
||||
|
||||
break;
|
||||
case 1:
|
||||
for (int j = 0, qtDataLength = qtData.length; j < qtDataLength; j += 2) {
|
||||
tables[num][j / 2] = (short) ((qtData[j] & 0xff) << 8 | (qtData[j + 1] & 0xff));
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user