A common image coding procedure mainly comprises processes of digital signal transform and quantization. The digital signal transform is performed in a unit of image blocks comprising a plurality of pixels, and selectively conforms to common protocols, e.g., Joint Photographic Experts Group (JPEG), Motion Picture Experts Group (MPEG) 2, MPEG 4 and H.264. The quantization is performed after the digital signal transform to scale down the number of pixels of the image block, so as to reduce a number of bits for representing a single pixel number, and thereby reducing a data amount for representing a single block. By performing the quantization on each of the image blocks, the image block can be divided into different levels. Since the image blocks undergoing the digital signal transform and the quantization generally comprise a large amount of zero quantization coefficients (each of the quantization coefficients corresponds to a single pixel), additional bit numbers are needed for storing the zero quantization coefficients, which is extremely unfavorable for processing the image encoding to a large amount of blocks.
Therefore, an encoding program called run-length coding (RLC) is applied to encode such blocks comprising a large amount of the zero quantization coefficients, so as to reduce the number of bits and the data amount for storing a single block. Basic principles of the RLC are depicted herein with a binary bitstream. Assume a binary bitstream of “00001100”, it is converted to “402120” with the RLC to represent three RLC strings comprising four successive bits of “0”, two successive bits of “1” and two successive bits of “0”. With principles similar to the above, the image coding utilizing the RLC is capable of reducing the number of bits or the data amount for storing each of the image blocks.
However, the image coding utilizing the RLC also has disadvantages. First, after undergoing the digital signal processing and the quantization, a plurality of quantization coefficients of a single block needs to be linearly scanned one by one for performing the RLC. However, when a plurality of successive zero-runs RLC strings and a plurality of successive nonzero-runs RLC strings are generated during a scanning process for performing RLC on the plurality of quantization coefficients of a single image block, the linearly scanning is rather time-consuming. In addition, when a position of a last non-zero quantization coefficient of a single block is confirmed, it is unnecessary to scan the remainder of zero quantization coefficients for the sake of reducing processing time and increasing efficiency.