Compression method of display system
Technical Field
The present invention relates to the field of display technologies, and in particular, to a compression method for a display system.
Background
In the production process of the display panel, Mura (uniform/uneven brightness) such as bright spots or dark spots is often generated due to a production process or the like, resulting in a reduction in the display quality of the panel. In order to eliminate Mura of the display device, the prior art generally employs a compensation table to store compensation information of each pixel in the display device. When a picture is projected, the driving board in the display device can search the compensation table, adjust signals, and adjust the signals of the too dark area and the too bright area of the display panel to be high, so that the uniform display effect is presented. In the compensation table, each pixel corresponds to a set of compensation information, each set of compensation information containing one or more compensation data. The physical meaning of the compensation data depends on the algorithm, usually the adjustment value or local gamma value of a specific gray level, and there is also an algorithm to set it as the voltage value to be adjusted.
In the prior art, the size of the compensation table is equal to the number of pixels multiplied by the size of each set of compensation information. For example, to compensate for the OLED display panel of 4k2k (3840 pixel columns and 2160 pixel rows). Assuming that the size of each set of compensation information is 24 bits (bit), and the number of colors is three, red, green and blue, the storage space occupied by the compensation table is 3840 × 2160 × 24 × 3, which is equal to 597 Mb. The compensation table occupies a large amount of system storage space, and a large amount of time is consumed in the process of transmitting and burning data on a production line, so that the operation speed and the production efficiency of the display device are reduced.
The conventional method is to transform on multiple lines of the compensation table, wherein the basic unit of transformation and coding is compensation data of multiple lines of pixels, and multiple line buffers (line buffers) are required for buffering multiple lines of data during hardware design, which greatly increases hardware cost and is contrary to the original purpose of the original cost-reducing algorithm. Moreover, if the transform block size is reduced blindly, for example, by changing the number of lines from 8 to 4, the compression effect is reduced. Therefore, there is a need to provide a compression method for a display system to solve the problems of the prior art.
Disclosure of Invention
It is an object of the present invention to provide a compression method for a display system, which rearranges data before conversion, and arranges the original row into N rows by folding, so as to reduce the hardware cost of the compression algorithm while ensuring the compression effect.
To achieve the above object, the present invention provides a compression method for a display system, comprising the steps of step S10, providing a compensation table; step S20, rearranging the pixel data of one line of the compensation table; step S30, dividing the line pixel data into a plurality of transformation blocks, wherein the transformation blocks are adjacent to each other and do not overlap each other; and step S40, carrying out transformation procedure to each transformation block, then quantizing and coding to obtain the compressed data of the line.
In an embodiment of the present invention, step S20 further includes:
s201, taking out the 1 st to Nth pixel data of the row of pixel data, and folding and arranging the pixel data into the transformation square blocks with the size of NxN;
s202, extracting the Nth multiplied by N +1 to the 2 XNth multiplied by N pixel data of the line pixel data, folding and arranging the transformation square block with the size of NXN, and adjoining the right side of the transformation square block in the step S201; and
s203, extracting the 2 × N +1 to 3 × N pixel data of the line pixel data, folding and arranging the transformation blocks with the size of N × N, and arranging the transformation blocks row by row in sequence adjacent to the right side of the transformation block in the step S202 to complete the compressed data of the line.
In an embodiment of the present invention, the method further includes arranging each of the transformation blocks in a row, and each of the transformation blocks is arranged below a previous transformation block in sequence.
In an embodiment of the invention, the method further includes arranging each of the transformation blocks in a serpentine shape, and the serpentine arrangement arranges each of the transformation blocks in a serpentine shape according to a right side, a lower left, a lower down, or an upper right direction.
In an embodiment of the invention, when the number of N × N pixels at the end of each row of the transform blocks arranged row by row cannot be satisfied, the last pixel data is copied to satisfy the number of N × N pixels.
In one embodiment of the present invention, in step S201, 64 pixel data of the row of pixel data are extracted, wherein the first row of each of the transformation blocks is the 1 st to 8 th pixels, the second row is the 9 th to 16 th pixels, the third row is the 17 th to 24 th pixels, and so on.
In an embodiment of the invention, the size of each transform block is 8 × 8.
In one embodiment of the present invention, in step S20, each line of pixel data after data rearrangement is converted into N lines, and the line width of each divided conversion block is 1/N divided by N (1/N).
In one embodiment of the present invention, in step S40, the transform is Discrete Cosine Transform (DCT), Discrete Sine Transform (DST), or hadamard transform, and the encoding is huffman encoding, run encoding, or arithmetic encoding.
In an embodiment of the present invention, the method further includes step S50, decompressing the compressed data of the line, then decoding, dequantizing, and inverse transforming to obtain the pixel data of the N lines, and then rearranging the pixel data of the N lines into the pixel data of the line for application in the display system.
The invention also has the following effects that before transformation, the data is rearranged, and the original row is folded and arranged into N rows, so as to reduce the occupation of the memory space, save the hardware resource of the system and reduce the cost.
Drawings
In order to illustrate the embodiments or the technical solutions in the prior art more clearly, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the invention, and it is obvious for a person skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a block diagram of a compression flow of a compression method of a display system according to the present invention;
FIG. 2 is a block diagram of a process for reordering data according to the present invention;
FIG. 3 is a block diagram illustrating the flow of step S20 in FIG. 2;
FIG. 4 is a schematic plan view of the compensation table rearrangement data of the compression method of the display system of the present invention; and
FIGS. 5A, 5B and 5C are diagrams of various embodiments of alignment data for the compression method of the display system of the present invention.
Detailed Description
Reference in the detailed description to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the invention. The appearances of the same phrases in various places in the specification are not necessarily limited to the same embodiment, but are to be construed as independent or alternative embodiments to other embodiments. In light of the disclosure of the embodiments provided by the present invention, it should be understood by those skilled in the art that the embodiments described in the present invention can have other combinations or variations consistent with the concept of the present invention.
Referring to fig. 1 and fig. 2, fig. 1 is a block diagram illustrating a compression process of a compression method of a display system according to the present invention, and fig. 2 is a block diagram illustrating a data rearrangement process according to the present invention. The present invention provides a compression method for a display system including, but not limited to, a television, monitor or display screen.
The compression method of the display system as shown in the figure includes the steps of step S10, providing a compensation table 1; step S20, rearranging the pixel data 11 of one line of the compensation table 1; step S30, dividing the line of pixel data 11 into a plurality of transformation blocks 12, wherein the transformation blocks 12 are adjacent to each other and do not overlap each other; and step S40, performing a transformation procedure on each transformation block 12, and then quantizing and encoding to obtain the compressed data of the line. In step S20, each of the lines of pixel data 11 after data rearrangement is converted into N lines, and the line width passing through each of the divided conversion blocks 12 is 1/N divided by N (1/N).
Referring to fig. 3, fig. 4 and fig. 5A together, wherein fig. 3 is a specific flowchart of step S20 in fig. 2, fig. 4 is a schematic plan view of a compensation table rearrangement data of a compression method of a display system according to the present invention, and fig. 5A is a schematic diagram of conversion blocks of the compression method of the display system according to the present invention arranged row by row. As shown in fig. 3, step S20 further includes:
s201, extracting the 1 st to nxn pixel data of the row of pixel data 11, and folding and arranging the transformation squares 12 in nxn size;
s202, extracting the N × N +1 th to 2 × N pixel data of the line pixel data 11, folding the conversion block 12 arranged in the N × N size, and adjoining the right side of the conversion block 12 in the step S201; and
s203, extracting the 2 × N +1 to 3 × N pixel data of the line pixel data 11, folding and arranging the transformation blocks 12 with the size of N × N, and arranging the transformation blocks 12 row by row in sequence adjacent to the right side of the transformation block 12 in the step S202 to complete the line compressed data.
In step S201, for example, 64 pixel data lines are extracted, wherein the first line of each of the transformation blocks 12 is the 1 st to 8 th pixels, the second line is the 9 th to 16 th pixels, the third line is the 17 th to 24 th pixels, and so on, and the transformation blocks are rearranged into 8 lines. In the embodiment shown in fig. 4, the size of each of the transform blocks 12 is preferably 8 × 8 (i.e., N × N).
As further shown in fig. 5B, each of the transformation blocks 12 further includes a row-by-row arrangement, that is, each of the transformation blocks 12 is arranged at the lower side of the previous transformation block 12 in sequence. However, in the embodiment shown in FIG. 5C, a serpentine arrangement of the transformation blocks 12 is also included, wherein the serpentine arrangement is arranged to serpentine-arrange the transformation blocks 12 in a right-side, left-bottom, down-side or right-top direction. In the embodiments of fig. 5A to 5C, after the transformation blocks 12 are rearranged, the data in the transformation blocks 12 still have neighboring similarity (the original adjacent pixels are arranged together as much as possible), so as to ensure the compression effect.
In addition, when the number of pixels N × N at the end of a row of each of the conversion blocks 12 arranged row by row, column by column, or in a serpentine shape cannot be satisfied, the last pixel data is copied to satisfy the number of pixels N × N. In step S40, the transform is Discrete Cosine Transform (DCT), Discrete Sine Transform (DST), or hadamard transform, and the encoding is huffman encoding, run encoding, or arithmetic encoding.
Step S50 is further included, where the compressed data 11 of the line is decompressed, then decoded, dequantized, and inversely transformed to obtain the pixel data of the N lines, and then the pixel data of the N lines is rearranged into the pixel data of the line for application in the display system.
The following description specifically illustrates the display system of the present invention rearranging data in a row-by-row arrangement. Assuming that there is a picture (compensation table) content of an ultra high definition (UD) display, the pixel data size is 3840x 2160. For each line of the picture, 64 pixel data are fetched from the head of the line and rearranged into 8x8 transformation squares. The specific arrangement of the transformation blocks is that the 1 st to 8 th pixel data are the first line of the transformation blocks, the 9 th to 16 th pixel data are the second line of the transformation blocks, the 17 th to 24 th pixel data are the third line of the transformation blocks, and so on. Then, the number of blocks from 65 th to 128 th of the row rearranged to 8x8 is placed on the right side of the previous transformed block, and then the number of blocks from 129 th to 192 th of the row rearranged to 8x8 is placed on the right side of the previous transformed block. In this way, each row of the compensation table is rearranged into 8 rows, with a row width of 3840/8 equal to 480.
The rearranged 8 lines of data are divided into 8x8 transform blocks which do not overlap with each other, DCT transform is performed on each transform block, and then quantization and arithmetic coding are performed, thereby completing the compression of the lines of data. During decompression, the compressed data is subjected to arithmetic decoding, inverse quantization and inverse DCT conversion to obtain 8 rows of data, and the 8 rows of data are rearranged into a row, so that a decompressed value of the row is obtained.
Therefore, before the conversion, the data is rearranged, and the original row is folded and arranged into N rows, so as to reduce the occupation of the memory space, save the hardware resource of the system and reduce the cost.
In view of the foregoing, while the present invention has been described in conjunction with specific embodiments thereof, it is to be understood that many alternatives, modifications, and variations will be apparent to those skilled in the art. Accordingly, it is intended to embrace all such alternatives, modifications, and variations that fall within the scope of the included claims.