34 * In particular, the way the AWT code handled progressive JPEGs seems
35 * to me to be only accidentally correct and somewhat inefficient. The
36 * scheme used here represents the way I think it should work. (REV 11/00)
37 */
38
39 #include <stdlib.h>
40 #include <setjmp.h>
41 #include <assert.h>
42 #include <string.h>
43 #include <limits.h>
44
45 /* java native interface headers */
46 #include "jni.h"
47 #include "jni_util.h"
48
49 #include "com_sun_imageio_plugins_jpeg_JPEGImageReader.h"
50 #include "com_sun_imageio_plugins_jpeg_JPEGImageWriter.h"
51
52 /* headers from the JPEG library */
53 #include <jpeglib.h>
54 #include "jerror.h"
55
56 #undef MAX
57 #define MAX(a,b) ((a) > (b) ? (a) : (b))
58
59 /* Cached Java method ids */
60 static jmethodID JPEGImageReader_readInputDataID;
61 static jmethodID JPEGImageReader_skipInputBytesID;
62 static jmethodID JPEGImageReader_warningOccurredID;
63 static jmethodID JPEGImageReader_warningWithMessageID;
64 static jmethodID JPEGImageReader_setImageDataID;
65 static jmethodID JPEGImageReader_acceptPixelsID;
66 static jmethodID JPEGImageReader_pushBackID;
67 static jmethodID JPEGImageReader_passStartedID;
68 static jmethodID JPEGImageReader_passCompleteID;
69 static jmethodID JPEGImageWriter_writeOutputDataID;
70 static jmethodID JPEGImageWriter_warningOccurredID;
71 static jmethodID JPEGImageWriter_warningWithMessageID;
72 static jmethodID JPEGImageWriter_writeMetadataID;
73 static jmethodID JPEGImageWriter_grabPixelsID;
74 static jfieldID JPEGQTable_tableID;
|
34 * In particular, the way the AWT code handled progressive JPEGs seems
35 * to me to be only accidentally correct and somewhat inefficient. The
36 * scheme used here represents the way I think it should work. (REV 11/00)
37 */
38
39 #include <stdlib.h>
40 #include <setjmp.h>
41 #include <assert.h>
42 #include <string.h>
43 #include <limits.h>
44
45 /* java native interface headers */
46 #include "jni.h"
47 #include "jni_util.h"
48
49 #include "com_sun_imageio_plugins_jpeg_JPEGImageReader.h"
50 #include "com_sun_imageio_plugins_jpeg_JPEGImageWriter.h"
51
52 /* headers from the JPEG library */
53 #include <jpeglib.h>
54 #include <jerror.h>
55
56 #undef MAX
57 #define MAX(a,b) ((a) > (b) ? (a) : (b))
58
59 /* Cached Java method ids */
60 static jmethodID JPEGImageReader_readInputDataID;
61 static jmethodID JPEGImageReader_skipInputBytesID;
62 static jmethodID JPEGImageReader_warningOccurredID;
63 static jmethodID JPEGImageReader_warningWithMessageID;
64 static jmethodID JPEGImageReader_setImageDataID;
65 static jmethodID JPEGImageReader_acceptPixelsID;
66 static jmethodID JPEGImageReader_pushBackID;
67 static jmethodID JPEGImageReader_passStartedID;
68 static jmethodID JPEGImageReader_passCompleteID;
69 static jmethodID JPEGImageWriter_writeOutputDataID;
70 static jmethodID JPEGImageWriter_warningOccurredID;
71 static jmethodID JPEGImageWriter_warningWithMessageID;
72 static jmethodID JPEGImageWriter_writeMetadataID;
73 static jmethodID JPEGImageWriter_grabPixelsID;
74 static jfieldID JPEGQTable_tableID;
|