1. Field of the Invention
The invention relates to Joint Photographic Experts Group (JPEG) images, and more particularly to processing of JPEG images.
2. Description of the Related Art
Joint Photographic Experts Group (JPEG) is a standard established by the International Standards Organization (ISO) and International Telephone and Telegraph Consultative Committee (CCITT) for image compression. The JPEG standard comprises multiple formats including 420, 422V, 411, 422H, and 444. Because JPEG is a standard for storing compressed image, a JPEG image must be decoded to recover the original image before it is shown on a screen.
Regardless of which JPEG format a JPEG image belongs to, a JPEG image is decoded with a minimum coded unit (MCU). An MCU comprises a plurality of pixel blocks, wherein each pixel block comprises 8×8 pixels. The pixels are divided into intensity pixels and color pixels, wherein intensity pixels represent intensities and color pixels represent colors. Pixel blocks therefore are categorized as intensity pixel blocks and color pixel blocks.
FIG. 1A shows an MCU of JPEG images with 420 or 422V format. JPEG image 100 with 420 format comprises intensity pixels 102, blue color pixels 104, and red color pixels 106. An MCU of the JPEG image 100 comprises six pixel blocks 112˜117, wherein four are intensity pixel blocks Y0˜Y3 and two are color pixel blocks Cb and Cr. JPEG image 120 with 422V format comprises intensity pixels 122, blue color pixels 124, and red color pixels 126. An MCU of the JPEG image 120 comprises four pixel blocks 132˜135, wherein two are intensity pixel blocks Y0 and Y2 and the other two are color pixel blocks Cb and Cr.
FIG. 1B shows an MCU of JPEG images with 411, 422H, or 444 format. A JPEG image 140 with 411 format comprises intensity pixels 142, blue color pixels 144, and red color pixels 146. An MCU of the JPEG image 140 comprises six pixel blocks 152˜157, wherein four are intensity pixel blocks marked with Y0, Y1 and two are color pixel blocks Cb and Cr. Accordingly, a JPEG image 160 with 422H format comprises intensity pixels 162, blue color pixels 164, and red color pixels 166. An MCU of the JPEG image 160 comprises four pixel blocks 172˜175, wherein two are intensity pixel blocks Y0 and Y1 and the other two are color pixel blocks Cb and Cr. Additionally, a JPEG image 180 with 444 format comprises intensity pixels 182, blue color pixels 184, and red color pixels 186. An MCU of the JPEG image 180 comprises three pixel blocks 192˜194, including an intensity pixel block Y0 and two color pixel blocks Cb and Cr.
After a JPEG image is decoded to recover an original image, the original image must be scaled in advance to lower the number of pixels to a level suitable for screen display, because size of the original image does not always fit the size of a frame buffer for a screen showing the image. The scaled image is stored in a buffer module. After the frame buffer sends a request to the buffer module, the pixels of the scaled image are then output to the frame buffer.
The buffer module outputs the scaled image in either a 1-byte single write mode, an 8-byte burst write mode, or a 16-byte burst write mode. For the 1-byte single write mode, the buffer module outputs only one byte pixel data to the frame buffer in response to one request. For the 8-byte burst write mode, the buffer module outputs eight bytes of pixel data to the frame buffer in response to one request. For the 16-byte single write mode, the buffer module outputs 16 bytes of pixel data to the frame buffer in response to one request. When the amount of pixel data is large, the buffer module must adopt the 8-byte single write mode or 16-byte single write mode to output pixel data.
A conventional buffer module must have a few Mega bytes of capacity for storing pixel data to be shown on a screen. When buffer capacity increases, manufacturing cost of the buffer also increases. If a smaller buffer capacity module is used, the manufacturing cost of the buffer module is reduced. Therefore, a buffer module with high data output speed and limited capacity is required.