Changeset 213:36f5cb12e1a2 for dwt/internal/image/JPEGDecoder.d
- Timestamp:
- 05/17/08 11:34:28 (8 months ago)
- Files:
-
- dwt/internal/image/JPEGDecoder.d (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
dwt/internal/image/JPEGDecoder.d
r212 r213 21 21 import dwt.graphics.PaletteData; 22 22 import dwt.graphics.RGB; 23 import dwt.dwthelper.utils; 23 24 24 25 import tango.core.Exception; 25 26 import tango.util.Convert; 26 27 import Math = tango.math.Math; 27 import dwt.dwthelper.System;28 import dwt.dwthelper.utils;29 28 30 29 public class JPEGDecoder { … … 981 980 s &= 15; 982 981 if (s !is 0) { 983 if (s !is 1) { /* size of new coef should always be 1 */982 if (s !is 1) { /* size of new coef should always be 1 */ 984 983 // WARNMS(cinfo, JWRN_HUFF_BAD_CODE); 985 984 } … … 1244 1243 } else { /* EOBr, run length is 2^r + appended bits */ 1245 1244 EOBRUN = 1 << r; 1246 if (r !is 0) { /* EOBr, r > 0 */1245 if (r !is 0) { /* EOBr, r > 0 */ 1247 1246 // CHECK_BIT_BUFFER(br_state, r, return FALSE); 1248 1247 { … … 1282 1281 } 1283 1282 1284 bool decode_mcu_DC_first (jpeg_decompress_struct cinfo, short[][] MCU_data) { 1283 bool decode_mcu_DC_first (jpeg_decompress_struct cinfo, short[][] MCU_data) { 1285 1284 phuff_entropy_decoder entropy = this; 1286 1285 int Al = cinfo.Al; … … 1646 1645 /* Variables for Floyd-Steinberg dithering */ 1647 1646 // FSERRPTR fserrors[MAX_Q_COMPS]; /* accumulated errors */ 1648 bool on_odd_row; 1647 bool on_odd_row; 1649 1648 1650 1649 void start_pass (jpeg_decompress_struct cinfo, bool is_pre_scan) { … … 4450 4449 length -= count; 4451 4450 4452 if ((index & 0x10) !is 0) { /* AC table definition */4451 if ((index & 0x10) !is 0) { /* AC table definition */ 4453 4452 index -= 0x10; 4454 4453 htblptr = cinfo.ac_huff_tbl_ptrs[index] = new JHUFF_TBL(); … … 5239 5238 } 5240 5239 totallen -= APP0_DATA_LEN; 5241 if (totallen !is ((data[12] & 0xFF) * (data[13] & 0xFF) * 3)) {5240 if (totallen !is ((data[12] & 0xFF) * (data[13] & 0xFF) * 3)) { 5242 5241 // TRACEMS1(cinfo, 1, JTRC_JFIF_BADTHUMBNAILSIZE, cast(int) totallen); 5243 5242 }
