
CHAPTER 2 LIBRARY SPECIFICATIONS
143
2.5.4 Function Required for Customization
The functions required for compression processing are those that are stored in the locations to which the
data of the internal RAM work area are assigned by 1 MCU from VRAM. Different functions must be created
depending on the sampling ratio.
Table 2-47. Functions for Compression to Be Customized
Function name
Sampling ratio
void jpeg_getMCU22 (CJINFO*jinfo)
4:1:1 (H:V = 2:2)
void jpeg_getMCU41 (CJINFO*jinfo)
4:1:1 (H:V = 4:1)
void jpeg_getMCU21 (CJINFO*jinfo)
2:1:1 (H:V = 2:1)
void jpeg_getMCU11 (CJINFO*jinfo)
1:1:1 (H:V = 1:1)
For expansion, more functions must be created because reduction modes are used.
Table 2-48. Functions for Expansion to Be Customized
Function name
Sampling ratio
void jpeg_putMCU221 (DJINFO*jinfo)
4:1:1 (H:V = 2:2)
void jpeg_putMCU411 (DJINFO*jinfo)
4:1:1 (H:V = 4:1)
void jpeg_putMCU211 (DJINFO*jinfo)
2:1:1 (H:V = 2:1)
void jpeg_putMCU111 (DJINFO*jinfo)
1:1:1 (H:V = 1:1)
void jpeg_putMCU222 (DJINFO*jinfo)
4:1:1 (H:V = 2:2) (reduced to 1/4)
void jpeg_putMCU412 (DJINFO*jinfo)
4:1:1 (H:V = 4:1) (reduced to 1/4)
void jpeg_putMCU212 (DJINFO*jinfo)
2:1:1 (reduced to 1/4)
void jpeg_putMCU112 (DJINFO*jinfo)
1:1:1 (reduced to 1/4)
void jpeg_putMCU224 (DJINFO*jinfo)
4:1:1 (H:V = 2:2) (reduced to 1/16)
void jpeg_putMCU414 (DJINFO*jinfo)
4:1:1 (H:V = 4:1) (reduced to 1/16)
void jpeg_putMCU214 (DJINFO*jinfo)
2:1:1 (reduced to 1/16)
void jpeg_putMCU114 (DJINFO*jinfo)
1:1:1 (reduced to 1/16)
void jpeg_putMCU228 (DJINFO*jinfo)
4:1:1 (H:V = 2:2) (reduced to 1/64)
void jpeg_putMCU418 (DJINFO*jinfo)
4:1:1 (H:V = 4:1) (reduced to 1/64)
void jpeg_putMCU218 (DJINFO*jinfo)
2:1:1 (reduced to 1/64)
void jpeg_putMCU118 (DJINFO*jinfo)
1:1:1 (reduced to 1/64)
The argument of each function is only the JPEG structure (CJINFO for compression and DJINFO for
expansion). Particularly, when this structure is described in assembler, save the contents of r20 to r29 and
sp before the function is used, and restore these contents after the function has been executed, in compliance
with the C conventions.
The following information is required to create each function.