JCOEF is a short, it can be changed to an int for a speed increase. JCOEFPTR is "JCOEF FAR *" (currently a short *). JSAMPLE is unsigned char JSAMPROW is "JSAMPLE FAR *" (pointer to one image row of pixel samples)