Referring to
The image de-blocking method of the embodiment is as following:
First, in step 200, determine whether a horizontal position (the x-th column) of the pixel P to be processed is located on a vertical boundary V of the block B, that is, whether x % 8 is equal to 7 or 0, wherein x is a positive integer. If the pixel P is located on the vertical boundary V of the block B, that is, x % 8 is equal to 7 or 0, in the step 210, perform a horizontal de-blocking operation on the decompressed pixel data, such as V1˜V6 of a number of pixels P adjacent left and right to the pixel P to be processed at the same scan line, and then perform a determination operation in the step 220. If the pixel P is not located on the vertical boundary V of the block B, that is, x % 8 is not equal to 0 or 7, directly perform the step 220 to determine whether a vertical position (the y-th row) of the pixel P to be processed is located adjacent upward to a horizontal boundary H, that is, whether y % 8 is equal to 7. If the pixel P is located adjacent upward to the horizontal boundary H, that is, y % 8 is equal to 7, perform the step 230 of a first-stage vertical de-blocking operation as shown in
To describe in detailed, in the first vertical de-blocking operation, the de-blocking pixel data D2 of the pixel P2 of the second row R2 of pixels and the de-blocking pixel data D1 of the pixel P1 of the first row R1 of pixels are calculated according to a relative relationship among the decompressed pixel data H2 of the pixel P2 of the second row R2 of pixels, the decompressed pixel data H1 of the pixel P1 of the first row R1 of pixels and the decompressed pixel data H3 of the pixel P3 of the third row R3 of pixels. For example, as shown in
Following that, if the pixel P is not located adjacent upward to the horizontal boundary H of the block B, that is, y % 8 is not equal to 7, perform the step 240 to determine whether the pixel P is located adjacent downward to the horizontal boundary H of the block B, that is, whether y % 8 is equal to 0. If the pixel P is located adjacent downward to the horizontal boundary H of the block B, that is, y % 8 is equal to 0, perform the step 250 of a second-stage vertical de-blocking operation as shown in
To be described in details, the second vertical de-blocking operation is performed to calculate the de-blocking pixel data D3 of the pixel P3 of the third row R3 of pixels and the de-blocking pixel data D4 of the pixel P4 of the fourth row R4 of pixels according to a relative relationship among the decompressed pixel data H3 of the pixel P3 of the third row R3 of pixels, the de-blocking pixel data D2 of the pixel P2 of the second row R2 of pixels and the decompressed pixel data H4 of the pixel P4 of the fourth row R4 of pixels. For example, as shown in
Finally, if the pixel P is not located adjacent downward to the horizontal boundary H of the block B, that is, y % 8 is not equal to 0, end the process.
In the first stage of vertical de-blocking operation, the invention needs only three line buffers to store the decompressed pixel data H1˜H3 corresponding to the first row R1, the second row R2 and the third row R3 of pixels. In the second stage of vertical de-blocking operation, the invention stores the decompressed pixel data H4 corresponding to the fourth row R4 of pixels in the line buffer for storing the decompressed pixel data H1 of the first row R1 of pixels in the first stage. Similarly, the memory space needs only three line buffers. Therefore, the invention does not have to use at least 6 line buffers to store the decompressed pixel data of six rows of pixels as in the prior-art skill, which can effectively reduce memory space of the display.
As mentioned above, although the first vertical de-blocking operation is exemplified to calculate the de-blocking pixel data of the two rows of pixels adjacent upward to a horizontal boundary according to the decompressed pixel data of two rows of pixels adjacent upward to the horizontal boundary and a row of pixels adjacent downward to the horizontal boundary and the second vertical de-blocking operation is exemplified to calculate the de-blocking pixel data of the two rows of pixels adjacent downward to the horizontal boundary according to the decompressed pixel data of a row of pixels adjacent upward to the horizontal boundary and two rows of pixels adjacent downward to the horizontal boundary in the invention for illustration, the first-stage operation of the invention can also calculate the de-blocking pixel data of three or more than three rows of pixels adjacent upward to the horizontal boundary according to the decompressed pixel data of three or more than three rows of pixels adjacent upward to the horizontal boundary and one or more than one row of pixels adjacent downward to the horizontal boundary, and the second-stage operation calculates the de-blocking pixel data of the three or more than three rows of pixels adjacent downward to the horizontal boundary according to the de-blocking pixel data of the one or more than one row of pixels adjacent upward to the horizontal boundary and the decompressed pixel data of the three or more than three rows of pixels adjacent downward to the horizontal boundary. As long as in the first-stage operation, the de-blocking pixel data of the two rows of pixels adjacent upward to the horizontal boundary is calculated by using at least two rows of pixels adjacent upward to the horizontal boundary and a row of pixel adjacent downward to the horizontal boundary and in the second-stage operation, the de-blocking pixel data of the two rows of pixels adjacent downward to the horizontal boundary by using at least one row of pixels adjacent upward to the horizontal boundary and two rows of pixels adjacent downward to the horizontal boundary to achieve the purpose of saving display memory, all the alternatives will not depart from the scope of the invention.
The image de-blocking method disclosed by the above embodiment of the invention performs the vertical de-blocking operation in two stages. In the first stage, de-blocking pixel data of two rows of pixels adjacent upward to a horizontal boundary is obtained according to the decompressed pixel data of the two rows of pixels adjacent upward to the horizontal boundary and one row of pixels adjacent downward to the horizontal boundary. In the second stage, the de-blocking pixel data of two rows of pixels adjacent downward to the horizontal boundary is obtained according to the de-blocking pixel data of one row of pixels adjacent upward to the horizontal boundary and the decompressed pixel data of the two rows of pixels adjacent downward to the horizontal boundary. Therefore, not only the above blocking effect can be prevented, but also the manufacturing cost of the display can be effectively reduced for the display needs only the memory space capable of storing the decompressed pixel data of three rows of pixels in the vertical de-blocking operation.
While the invention has been described by way of example and in terms of a preferred embodiment, it is to be understood that the invention is not limited thereto. On the contrary, it is intended to cover various modifications and similar arrangements and procedures, and the scope of the appended claims therefore should be accorded the broadest interpretation so as to encompass all such modifications and similar arrangements and procedures.
Number | Date | Country | Kind |
---|---|---|---|
95134623 | Sep 2006 | TW | national |