#include "jinclude.h"
#include "jpeglib.h"
+#if defined(__VISAGECPP__)
+/* Visual Age fixups for multiple declarations */
+# define null_convert null_convert2 /* already in jcmaint.c */
+# define grayscale_convert grayscale_convert2 /* already in jcmaint.c */
+#endif
/* Private subobject */
/* Private state for YCC->RGB conversion */
int * Cr_r_tab; /* => table for Cr to R conversion */
int * Cb_b_tab; /* => table for Cb to B conversion */
- INT32 * Cr_g_tab; /* => table for Cr to G conversion */
- INT32 * Cb_g_tab; /* => table for Cb to G conversion */
+ JPEG_INT32 * Cr_g_tab; /* => table for Cr to G conversion */
+ JPEG_INT32 * Cb_g_tab; /* => table for Cb to G conversion */
} my_color_deconverter;
typedef my_color_deconverter * my_cconvert_ptr;
*/
#define SCALEBITS 16 /* speediest right-shift on some machines */
-#define ONE_HALF ((INT32) 1 << (SCALEBITS-1))
-#define FIX(x) ((INT32) ((x) * (1L<<SCALEBITS) + 0.5))
+#define ONE_HALF ((JPEG_INT32) 1 << (SCALEBITS-1))
+#define FIX(x) ((JPEG_INT32) ((x) * (1L<<SCALEBITS) + 0.5))
/*
{
my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
int i;
- INT32 x;
+ JPEG_INT32 x;
SHIFT_TEMPS
cconvert->Cr_r_tab = (int *)
cconvert->Cb_b_tab = (int *)
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
(MAXJSAMPLE+1) * SIZEOF(int));
- cconvert->Cr_g_tab = (INT32 *)
+ cconvert->Cr_g_tab = (JPEG_INT32 *)
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
- (MAXJSAMPLE+1) * SIZEOF(INT32));
- cconvert->Cb_g_tab = (INT32 *)
+ (MAXJSAMPLE+1) * SIZEOF(JPEG_INT32));
+ cconvert->Cb_g_tab = (JPEG_INT32 *)
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
- (MAXJSAMPLE+1) * SIZEOF(INT32));
+ (MAXJSAMPLE+1) * SIZEOF(JPEG_INT32));
for (i = 0, x = -CENTERJSAMPLE; i <= MAXJSAMPLE; i++, x++) {
/* i is the actual input pixel value, in the range 0..MAXJSAMPLE */
register JSAMPLE * range_limit = cinfo->sample_range_limit;
register int * Crrtab = cconvert->Cr_r_tab;
register int * Cbbtab = cconvert->Cb_b_tab;
- register INT32 * Crgtab = cconvert->Cr_g_tab;
- register INT32 * Cbgtab = cconvert->Cb_g_tab;
+ register JPEG_INT32 * Crgtab = cconvert->Cr_g_tab;
+ register JPEG_INT32 * Cbgtab = cconvert->Cb_g_tab;
SHIFT_TEMPS
while (--num_rows >= 0) {
register JSAMPLE * range_limit = cinfo->sample_range_limit;
register int * Crrtab = cconvert->Cr_r_tab;
register int * Cbbtab = cconvert->Cb_b_tab;
- register INT32 * Crgtab = cconvert->Cr_g_tab;
- register INT32 * Cbgtab = cconvert->Cb_g_tab;
+ register JPEG_INT32 * Crgtab = cconvert->Cr_g_tab;
+ register JPEG_INT32 * Cbgtab = cconvert->Cb_g_tab;
SHIFT_TEMPS
while (--num_rows >= 0) {
else
cinfo->output_components = cinfo->out_color_components;
}
+
+#if defined(__VISAGECPP__)
+# ifdef null_convert2
+# undef null_convert2
+# endif
+# ifdef grayscale_convert2
+# undef grayscale_convert2
+# endif
+#endif