Compression and decompression method and system for demura compensation values

By segmenting DEMURA compensation values ​​into data blocks and using sliding window prediction, and combining the maximum number of consecutive encoded residuals and the maximum number of consecutive uncoded residuals for selective residual coding, the problem of low compression accuracy of DEMURA compensation values ​​is solved, achieving higher compression ratio and reconstruction accuracy.

CN117674854BActive Publication Date: 2026-06-26GLENFLY TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GLENFLY TECH CO LTD
Filing Date
2022-08-26
Publication Date
2026-06-26

Smart Images

  • Figure CN117674854B_ABST
    Figure CN117674854B_ABST
Patent Text Reader

Abstract

The application discloses a compression and decompression method and system of DEMURA compensation values. The compression method comprises the following steps: dividing the DEMURA compensation values; calculating the predicted values and the residual errors of each sub-data; calculating the maximum continuous coded residual error number and the maximum continuous uncoded residual error number of a data block; calculating the residual error coding table of the data block; and writing the sub-data coding, the residual error coding table, the maximum continuous coded residual error number and the maximum continuous uncoded residual error number of the first M sub-data of the data block into the compressed binary bit stream. The decompression method comprises the following steps: analyzing the binary bit stream; calculating the predicted values of each sub-data; calculating the residual error decoding table of the data block; and reconstructing the data block. The technical scheme of the application fully utilizes the correlation of the data in the spatial domain by means of the sliding window prediction, residual error coding and residual error decoding of part of the data, so that the compression rate is improved and the accuracy of the reconstructed values is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a method and system for compressing and decompressing DEMURA compensation values. Background Technology

[0002] Due to limitations in its manufacturing process, OLED (Organic Light-Emitting Diode) screens exhibit uneven brightness across pixels at the same grayscale level. This phenomenon is known as the MURA (unevenness) effect. Figure 1 The image shown illustrates the effect of a solid grayscale image displayed due to the non-uniformity of a certain panel. To eliminate the MURA effect of the panel, compensation values ​​for each pixel at specific gray levels are typically burned into the ROM (Read-Only Memory) of the panel display driver chip. In this compression system, the gray levels are referred to as binding points. The amount of data burned increases significantly with the increase in panel size. Taking a 2560x1600 panel as an example, and requiring the storage of compensation values ​​for 3 gray levels, each compensation value being 6 bits, then storing the compensation values ​​for the three RGB channels requires a total of 221.184 Mbits of ROM resources.

[0003] To save ROM resources and reduce chip costs, the compensation value is usually compressed, and the compressed binary bit stream is burned into the ROM. Summary of the Invention

[0004] One of the objectives of this invention is to overcome the shortcomings of the prior art. In view of the problem that the low accuracy of DEMURA compensation value compression in the prior art leads to a large difference between the original DEMURA compensation value and the actual DEMURA compensation value during decoding and reconstruction, this invention provides a method and system for compressing and decompressing DEMURA compensation values.

[0005] To achieve the above objectives, the present invention is implemented through the following technical solution:

[0006] In a first aspect, the present invention provides a method for compressing DEMURA compensation values, the compression method comprising:

[0007] Step S100: Segment the DEMURA compensation value to obtain multiple data blocks, each data block comprising X+1 sub-data D0 to D... X ;

[0008] Step S200: For each data block, based on the (N+1)th sub-data D N The previous M sub-data D N-M To D N-1 For each sub-data D N Make predictions and obtain the predicted values ​​P for each sub-data.M To P X and residual Z M To Z X ;

[0009] Step S300: Calculate the maximum number of consecutive encoded residuals K0 and the maximum number of consecutive uncoded residuals K1 of the data block based on the number of bits B allocated to the data block;

[0010] Step S400: Based on the predicted value P M To P X The residual Z M To Z X The maximum number of consecutive encoded residuals K0 and the maximum number of consecutive uncoded residuals K1 are used to perform residual encoding on the determined sub-data that needs to be encoded, thereby obtaining the residual encoding table S of the data block. C ;

[0011] Step S500: Extract the first M sub-data D0 to D10 of the data block respectively. M-1 Sub-data encoding, residual encoding table S C The maximum number of consecutive encoded residuals K0 and the maximum number of consecutive uncoded residuals K1 are written into the compressed binary bit stream;

[0012] Where M, N, X, K0, and K1 are natural numbers, and M ≤ N ≤ X.

[0013] Secondly, the present invention provides a method for decompressing DEMURA compensation values, the decompression method comprising:

[0014] Step 600: Parse the binary bit stream to obtain the first M sub-data D0 to D1 of multiple data blocks. M-1 Residual coding table S C The maximum number of consecutive encoded residuals K0 and the maximum number of consecutive uncoded residuals K1, wherein the data block includes X+1 sub-data D0 to D1. X ;

[0015] Step 700: For each data block, based on the (N+1)th sub-data D N The reconstructed values ​​R of the previous M sub-data points N-M To R N-1 Combined with the residual coding table S C For the (N+1)th sub-data D N Make predictions and obtain the predicted values ​​P for each sub-data. M To P X ;

[0016] Step 800: Based on the predicted value P M To P XThe maximum number of consecutive encoded residuals K0 and the maximum number of consecutive uncoded residuals K1, combined with the residual encoding table S C For the sub-data D that needs to be decoded N Perform residual decoding to obtain the residual decoding table S of the data block. D ;

[0017] Step 900: Based on the first M sub-data D0 to D M-1 The predicted value P M To P X and the residual decoding table S D Reconstruct the individual sub-data D0 to D of the data block. X ;

[0018] Where M, N, X, K0, and K1 are natural numbers, and M ≤ N ≤ X.

[0019] Thirdly, the present invention provides a compression system for DEMURA compensation values, the compression system comprising a segmentation module, a first prediction module, a calculation module, a residual encoding module, and a writing module that are interconnected.

[0020] The segmentation module is used to segment the DEMURA compensation value to obtain multiple data blocks, each data block comprising X+1 sub-data points D0 to D... X ;

[0021] The first prediction module is used to predict each data block based on the (N+1)th sub-data D. N The previous M sub-data D N-M To D N-1 For each sub-data D N Make predictions and obtain the predicted values ​​P for each sub-data. M To P X and residual Z M To Z X ;

[0022] The calculation module is used to calculate the maximum number of consecutive encoded residuals K0 and the maximum number of consecutive uncoded residuals K1 of the data block based on the number of bits B allocated to the data block;

[0023] The residual coding module is used to base the prediction value P M To P X The residual Z M To Z X The maximum number of consecutive encoded residuals K0 and the maximum number of consecutive uncoded residuals K1 are used to perform residual encoding on the determined sub-data that needs to be encoded, thereby obtaining the residual encoding table S of the data block. C ;

[0024] The writing module is used to write the first M sub-data D0 to D1 of the data block respectively. M-1 Sub-data encoding, residual encoding table S C The maximum number of consecutive encoded residuals K0 and the maximum number of consecutive uncoded residuals K1 are written into the compressed binary bit stream;

[0025] Where M, N, X, K0, and K1 are natural numbers, and M ≤ N ≤ X.

[0026] Fourthly, the present invention provides a decompression system for DEMURA compensation values, the decompression system comprising an interconnected parsing module, a second prediction module, a residual decoding module, and a reconstruction module;

[0027] The parsing module is used to parse the binary bit stream to obtain the first M sub-data D0 to D1 of multiple data blocks. M-1 Residual coding table S C The maximum number of consecutive encoded residuals K0 and the maximum number of consecutive uncoded residuals K1, wherein the data block includes X+1 sub-data D0 to D1. X ;

[0028] The second prediction module is used to predict each data block based on the (N+1)th sub-data point D. N The reconstructed values ​​R of the previous M sub-data points N-M To R N-1 Combined with the residual coding table S C For the (N+1)th sub-data D N Make predictions and obtain the predicted values ​​P for each sub-data. M To P X ;

[0029] The residual decoding module is used to determine the predicted value P. M To P X The maximum number of consecutive encoded residuals K0 and the maximum number of consecutive uncoded residuals K1, combined with the residual encoding table S C For the sub-data D that needs to be decoded N Perform residual decoding to obtain the residual decoding table S of the data block. D ;

[0030] The reconstruction module is used to reconstruct the data based on the first M sub-data points D0 to D10. M-1 The predicted value P M To P X and the residual decoding table S D Reconstruct the individual sub-data D0 to D of the data block. X ;

[0031] Where M, N, X, K0, and K1 are natural numbers, and M ≤ N ≤ X.

[0032] Fifthly, the present invention provides a computer-readable storage medium storing a computer program that, when run on a computer, causes the computer to perform the compression method for DEMURA compensation values ​​as described in the first aspect and the decompression method for DEMURA compensation values ​​as described in the second aspect.

[0033] In a sixth aspect, the present invention provides a computer program product comprising a computer program that, when run on a computer, causes the computer to perform the DEMURA compensation value compression method as described in the first aspect and the DEMURA compensation value decompression method as described in the second aspect.

[0034] The DEMURA compensation value compression and decompression method and system disclosed in this invention fully utilizes the spatial correlation of data through sliding window prediction, performs residual coding and residual decoding on some of the data, and further improves the accuracy of the reconstructed values ​​while improving the compression rate. Attached Figure Description

[0035] The present invention is described with reference to the following figures:

[0036] Figure 1 This is a schematic diagram of the display image when the display panel exhibits the MURA (non-uniformity) effect;

[0037] Figure 2 This is a schematic flowchart of the compression method in Embodiment 1 of the present invention;

[0038] Figure 3 This is a schematic diagram of the specific process of step S200 in the compression method of Embodiment 1 of the present invention;

[0039] Figure 4 This is a schematic diagram of the translation of sliding window A in the compression method of Embodiment 1 of the present invention;

[0040] Figure 5 This is another schematic diagram of the translation of sliding window A in the compression method of Embodiment 1 of the present invention;

[0041] Figure 6 This is a schematic diagram of the specific process of step S230 in the compression method of Embodiment 1 of the present invention;

[0042] Figure 7 This is a schematic diagram of the sliding window A selecting sub-data when performing step S232 in the compression method of Embodiment 1 of the present invention;

[0043] Figure 8This is a schematic diagram of the sliding window A selecting sub-data when performing step S233 in the compression method of Embodiment 1 of the present invention;

[0044] Figure 9 This is a schematic diagram of the sliding window A selecting sub-data when performing step S234 in the compression method of Embodiment 1 of the present invention;

[0045] Figure 10 This is a schematic diagram of the specific process of step S300 in the compression method of Embodiment 1 of the present invention;

[0046] Figure 11 This is a schematic diagram of the specific process of step S400 in the compression method of Embodiment 1 of the present invention;

[0047] Figure 12 This is a schematic diagram of the specific process of step S500 in the compression method of Embodiment 1 of the present invention;

[0048] Figure 13 This is a schematic diagram of the segmented data blocks in the compression method of Embodiment 1 of the present invention;

[0049] Figure 14 This is a schematic diagram of the original compensation values ​​of sub-data in a data block in the compression method of Embodiment 1 of the present invention;

[0050] Figure 15 This is a schematic diagram of the predicted values ​​of sub-data in a data block in the compression method of Embodiment 1 of the present invention;

[0051] Figure 16 This is a schematic diagram of the residuals of sub-data in a data block in the compression method of Embodiment 1 of the present invention;

[0052] Figure 17 This is a schematic diagram of the residual encoding table of the data block in the compression method of Embodiment 1 of the present invention;

[0053] Figure 18 This is a schematic diagram of the specific process of step S600 in the decompression method of Embodiment 2 of the present invention;

[0054] Figure 19 This is a schematic diagram of the specific process of step S700 in the decompression method of Embodiment 2 of the present invention;

[0055] Figure 20 This is a schematic diagram of the specific process of step S730 in the decompression method of Embodiment 2 of the present invention;

[0056] Figure 21 This is a schematic diagram of the specific process of step S800 in the decompression method of Embodiment 2 of the present invention;

[0057] Figure 22 This is a schematic diagram of the compression system in Embodiment 3 of the present invention;

[0058] Figure 23 This is a schematic diagram of the decompression system in Embodiment 4 of the present invention. Detailed Implementation

[0059] To better understand the technical solution of this application, the embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0060] It should be understood that the described embodiments are merely some, not all, of the embodiments in this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.

[0061] Existing known compression schemes for DEMURA compensation values ​​typically use compression algorithms to compress the DEMURA compensation values, saving ROM resources and reducing chip costs. However, both spatial compression algorithms and Huffman coding suffer from limitations in their simplification. Furthermore, the data characteristics of DEMURA compensation values ​​vary across different panels, affecting the compression ratio and hindering efficient compression of DEMURA compensation values ​​for all panels. This invention provides a method and system for compressing and decompressing DEMURA compensation values ​​that addresses these technical problems, improves the compression ratio, and enhances the accuracy of data block reconstruction at the decoding end.

[0062] Example 1

[0063] Embodiment 1 of the present invention discloses a compression method for DEMURA compensation values, which achieves different compression rates and compression accuracies for different data blocks by selectively encoding the residuals of some sub-data in the data block at the encoding end.

[0064] See Figure 2 The compression method in this embodiment 1 includes:

[0065] Step S100: Divide the DEMURA compensation value to obtain multiple data blocks. Each data block includes X+1 sub-data D0 to D... X ;

[0066] Step S200: For each data block, based on the (N+1)th sub-data D N The previous M sub-data D N-M To D N-1 For each sub-data D N Make predictions and obtain the predicted values ​​P for each sub-data. M To P X and residual Z M To ZX ;

[0067] Step S300: Based on the number of bits B allocated to the data block, calculate the maximum number of consecutive encoded residuals K0 and the maximum number of consecutive uncoded residuals K1 of the data block;

[0068] Step S400: Based on the predicted value P M To P X Residual Z M To Z X The maximum number of consecutive encoded residuals K0 and the maximum number of consecutive uncoded residuals K1 are used to perform residual coding on the determined sub-data that needs to be encoded, resulting in the residual coding table S of the data block. C ;

[0069] Step S500: Extract the first M sub-data D0 to D from the data block respectively. M-1 Sub-data encoding, residual encoding table S C The maximum number of consecutive encoded residuals K0 and the maximum number of consecutive uncoded residuals K1 are written into the compressed binary bit stream.

[0070] Specifically, in steps S100 to S500, M, N, X, K0, and K1 are natural numbers, where M ≤ N ≤ X. The DEMURA compensation value is a two-dimensional array composed of multiple sub-data points. Each sub-data point represents the compensation value to be assigned to a pixel at a specific location. These compensation values ​​are used to compensate for the pixels at each location to optimize the display. When compressing the DEMURA compensation value, the entire two-dimensional array is not compressed. Instead, the two-dimensional array is divided into multiple data blocks with a width of W and a height of H, and then each data block is compressed. Here, W indicates that the data block has W columns, and H indicates that the data block has H rows. Each data block includes X+1 sub-data points D0 to D1. X For each data block, the compression method in this embodiment 1, during step S200, compresses the first M sub-data blocks D0 to D... M-1 Without making a prediction, starting from the (M+1)th sub-data point D M Initially, for each sub-data D of the data block... M To D X Make a prediction and calculate the residual to obtain the predicted value P. M To P X and residual Z M To Z X Then, the sub-data D that needs to be encoded NThe data blocks are compressed using residual coding. In step S300, the number of bits B allocated to each data block is typically determined by the number of pixels in that block that require compensation values. Different data blocks may have the same or different number of bits B allocated, and consequently, the number of residuals K0 for continuous coding and the number of residuals K1 for continuous non-coding may also differ depending on the data block. Steps S200 and S300 do not have a strict execution order; they can be executed sequentially or simultaneously. In step S400, the final residual coding table S is obtained. C Not all sub-data D N All of them undergo residual coding, but selectively, only a portion of the sub-data D is processed. N Perform residual coding. During step S500, the residual coding table S... C Both the maximum number of consecutive encoded residuals K0 and the maximum number of consecutive uncoded residuals K1 can be directly written into the compressed binary bitstream, while the first M sub-data D0 to D... M-1 The value is written in binary form to the compressed binary bitstream. Thus, in the binary bitstream, the position and size of the compensation value for the pixel in the data block are presented in the form of binary bits 0 and 1. The binary bitstream is a binary string used to store the data obtained after the DEMURA compensation value is compressed.

[0071] The compression method of this embodiment 1 reduces the number of binary bits 0 and 1 written into the binary bit stream after compression by selectively performing residual coding on some sub-data in the data block, thereby improving the compression ratio. At the same time, the accuracy of the reconstructed values ​​of the residual-coded sub-data is kept within a reasonable range by using residual coding, thus avoiding the problem of sacrificing compression accuracy in pursuit of a high compression ratio.

[0072] See Figure 3 In the compression method of this embodiment 1, step S200 specifically includes:

[0073] Step S210: For each data block, establish a sliding window A of length M;

[0074] Step S220: Sliding window A selects the (N+1)th sub-data point D. N The previous M sub-data D N-M To D N-1 ;

[0075] Step S230: Based on the (N+1)th sub-data D N The previous M sub-data D N-M To D N-1 For the (N+1)th sub-data D N Make a prediction to obtain the (N+1)th sub-data point D.N The predicted value P N ;

[0076] Step S240: Based on the (N + 1)-th sub-data D N and the predicted value P N , obtain the residual Z N ;

[0077] Step S250: Determine the magnitude relationship between N and X;

[0078] Step S260: If N < X, move the sliding window A by the length of one sub-data, set N = N + 1, and return to execute Step S220;

[0079] Step S270: If N = X, end the prediction of each sub-data D N in the data block.

[0080] Figure 3 As shown, the specific process of Step S200 is to set up the sliding window A and calculate the predicted value P N of each sub-data D N one by one by translating the sliding window A by the length of one sub-data each time, and then calculate the residual Z N of each sub-data D N , where N ≥ M. Specifically, the data block is a two-dimensional array structure, and each sub-data D N in the data block is numbered from left to right and top to bottom as {D0, D1, …, D N , …, D X}, as shown in Figure 4 and Figure 5 . The residual Z N of the sub-data D N is calculated through the original compensation value of the sub-data D N and the predicted value P N . The original compensation value is the compensation value corresponding to the pixel at the position of this sub-data D N in the data block. If it is directly represented by D N , then the residual Z N satisfies Z N = D N - P N . The length of the sliding window A is M and the height is 1. A length of M means there are M sub-data lengths, and a height of 1 means there is 1 sub-data height. Since the sliding window A itself selects M sub-data, the predicted values of the first M sub-data {D0, D1, …, D M-1} in the data block cannot be calculated through Step S230. Step S230 starts to calculate the predicted value P M and the residual Z N one by one from the (M + 1)-th sub-data DN The first M sub-data {D0, D1, ..., D M-1 No predictions are made, and no residuals are calculated. After completing the calculation of sub-data D... N-1 Predicted value P N-1 Then, sliding window A shifts to the right by the length of one sub-data point and selects sub-data point D. N The previous M sub-data {D N-M D N-M+1 ,…,D N-1 If the sub-data D to be predicted N The previous sub-data D N-1 Compared with its previous sub-data D N-2 If the data is in the same row as the data block, then sliding window A moves directly to the right by the length of one sub-data block, starting from sub-data block D. N-2 Move to sub-data D N-1 ,like Figure 4 As shown. If the sub-data D to be predicted N The previous sub-data D N-1 Compared with its previous sub-data D N-2 If the data is on a different row from the data block, when the sliding window A moves to the right, the portion of the data that exceeds the length of one sub-data item in the data block will be moved to the first sub-data item D of the next row. N-1 ,like Figure 5 As shown. By sliding window A one by one, the sub-data {D0, D1, ..., D} in the data block are calculated sequentially. X The predicted value of} is {P} M ,P M+1 ,…,P X} and residual {Z M Z M+1 ,…,Z X Each time the sliding window A moves to the right, the relationship between N and X is determined to identify the sub-data point D for prediction. N Is it the last sub-data D? X If N < X, then it means that the sub-data D N Not the last sub-data D X There are still XN sub-data points D N To predict, the sliding window A can be shifted to the right by the length of one sub-data point, and N is incremented by 1 so that N = N + 1. The next prediction sub-data point D is then made. N+1 If N = X, then it represents the sub-data D. N That is, the last sub-data D X There are no other sub-data D to be predicted in the data block. N At this point, sliding window A stops translating, and the data block ends its translation of sub-data D. N The prediction.

[0081] In step S200, the specific process of step S230 is as follows: Figure 6 ,include:

[0082] Step S231: Determine the relationship between N and M;

[0083] Step S232: If N = M, then transfer the first M sub-data D0 to D... M-1 As sub-data D N The reconstructed values ​​R of the previous M sub-data points N-M To R N-1 ;

[0084] Step S233: If N≥2M, then based on the (N+1)th sub-data D N The predicted value P of the previous M sub-data N-M To P N-1 Combined with residual Z N-M To Z N-1 Calculate sub-data D N The reconstructed values ​​R of the previous M sub-data points N-M To R N-1 ;

[0085] Step S234: If M < N < 2M, then the data located in sub-data D will be... N The previous 2M-N sub-data D N-M To D M-1 As sub-data D N The previous 2M-N sub-data reconstructed values ​​R N-M To R M-1 And based on the (N+1)th sub-data D N The previous NM sub-data D M To D N-1 Predicted value P M To P N-1 Combined with residual Z M To Z N-1 Calculate sub-data D N The reconstructed value R of the previous NM sub-data M To R N-1 To obtain sub-data D N The reconstructed values ​​R of the previous M sub-data points N-M To R N-1 ;

[0086] Step S235: Based on the reconstructed value R N-M To R N-1 The offset off is derived from the length M of the sliding window;

[0087] Step S236: Based on the (N+1)th sub-data D N The reconstructed values ​​R of the previous M sub-data points N-M To RN-1 Using the offset off and the length M of the sliding window, we obtain the (N+1)th sub-data point D. N Predicted value P N .

[0088] Specifically, in step S230, different processes are executed depending on the value of N, thus predicting the sub-data D. N First, determine the relationship between N and M, and then execute the following three processes.

[0089] Firstly, such as Figure 7 As shown, when N = M, the sub-data to be predicted is the (M+1)th sub-data D. M The (M+1)th sub-data D M The first M sub-data {D0, D1, ..., D M-1} represents the first M sub-data items of the data block. At this point, we do not consider the first M sub-data items {D0, D1, ..., D...} M-1 Instead of making predictions, we directly use the first M sub-data points {D0, D1, ..., D}. M-1 The original compensation values ​​of} are used as its reconstructed values ​​{R0, R1, ..., R}. M-1 The original compensation value uses sub-data {D0, D1, ..., D}. M-1}express.

[0090] Secondly, such as Figure 8 As shown, when N≥2M, the sub-data to be predicted are the (2M+1)th to (X+1)th sub-data {D} 2M D 2M+1 , ..., D X There are a total of X-2M+1 sub-data points. When the sub-data point to be predicted is the 2M+1th sub-data point D... 2M At that time, its previous M sub-data are {D} M D M+1 , ..., D 2M-1}, the M sub-data {D M D M+1 , ..., D 2M-1 The data does not include any of the first M subdata points {D0, D1, ..., D} that are not predicted. M-1 Therefore, according to sub-data D 2M The previous M sub-data {D M D M+1 , ..., D 2M-1 The predicted value of} is {P} M P M+1 , ..., P 2M-1}, combined with residual {Z M Z M+1 , ..., Z2M-1}, calculate sub-data D 2M Reconstruction value P 2M And so on, calculating the 2M+1 to X+1th sub-data {D} 2M D 2M+1 , ..., D X The reconstructed value of {R} 2M R 2M+1 , ..., R X}

[0091] Thirdly, such as Figure 9 As shown, when M < N < 2M, the sub-data to be predicted are the (M+2)th to the 2Mth sub-data {D} M+1 D M+2 , ..., D 2M-1 There are a total of M-1 sub-data points, and this part of the sub-data points {D} M+1 D M+2 , ..., D 2M-1 Each sub-data D in} N The previous M sub-data were {D N-M D N-M+1, ..., D N-1}, the M sub-data are {D N-M D N-M+1 , ..., D N-1 It consists of two parts, namely 2M-N sub-data {D}. N-M D N-M+1 , ..., D M-1} and NM sub-data {D M D M+1 , ..., D N-1}; where there are 2M-N sub-data {D N-M D N-M+1 , ..., D M-1} represents the first M sub-data points {D0, D1, ..., D} that are not predicted. M-1 The 2M-N sub-data in} therefore directly use the 2M-N sub-data {D N-M D N-M+1 , ..., D M-1 The original compensation value of} is used as its reconstructed value {R}. N-M R N-M+1 , ..., R M-1}; while NM sub-data {D M D M+1 , ..., D N-1 The reconstructed value of {R} M R M+1 , ..., R N-1} is based on each sub-data DN The previous NM sub-data {D M D M+1 , ..., D N-1 The predicted value of} is {P} M P M+1 , ..., P N-1}, combined with residual {Z M Z M+1 , ..., Z N-1}, calculate the (M+2)th to Nth sub-data {D M D M+1 , ..., D N-1 The reconstructed value of {R} M R M+1 , ..., R N-1}

[0092] To facilitate compression and calculation, the predicted value PN is preferably rounded down, but when using sub-data D... N The reconstructed values ​​of the previous M sub-data points {R N-M R N-M+1 , ..., R N-1 Calculate the predicted value P N At that time, the predicted value P will inevitably appear. N For cases where the value is not an integer, an offset `off` is introduced in step 230 to provide rounding functionality and correct the predicted value P. N This makes the predicted value P N The integer is used. Calculate the predicted value P. N Various mathematical methods can be used. In this embodiment 1, the compression method preferably adopts the mean value algorithm, which calculates each sub-data D using formula (1). N Predicted value P N Formula (1) is as follows:

[0093] P N =(R N-1 +R N-2 +...+R N-M +off) / M (1).

[0094] By reconstructing the value {R} N-M R N-M+1 , ..., R N-1 Adding the offset off ensures that the denominator in formula (1) is divisible by the numerator M, resulting in the final predicted value P. N It is an integer. The offset *off* is calculated using formula (2), which is as follows:

[0095]

[0096] The calculation results of formulas (1) and (2) only retain the integer part. For example, when M is 5 and sign is 1, off takes the integer part of 2.5, which is 2.

[0097] After completing the entire process of step S200, and completing the processing of each sub-data {D} M D M+1 , ..., D X After prediction and residual calculation, the compression method of this embodiment 1 begins to calculate two variables in the preset rules used for residual encoding of the data block. These two variables are the maximum number of consecutive encoded residuals K0 and the maximum number of consecutive uncoded residuals K1. See [link to documentation]. Figure 10 Step S300 specifically includes:

[0098] Step S310: Obtain the width W and width H of the data block, the number of bits B allocated to the data block, and the original number of bits B' of each sub-data in the data block;

[0099] Step S320: Calculate the original data size S0 of the data block based on the number of bits B, the original number of bits B', the width W of the data block, and the width H.

[0100] Step S330: Calculate the compression factor G of the data block based on the number of bits B and the original data size S0 of the data block;

[0101] Step S340: Based on the compression factor G, the width W and width H of the data block, and the length M of the sliding window, calculate the maximum number of consecutive encoded residuals K0 and the maximum number of consecutive uncoded residuals K1 when performing residual encoding on the data block.

[0102] To achieve a certain compression ratio, the compression method in this embodiment 1 does not allocate all sub-data {D} at the encoding end. M D M+1 , ..., D X The residual {Z} M Z M+1 , ..., Z X Instead of writing all data into the compressed binary bitstream through encoding, it will selectively process a subset of the data according to preset rules. N residual Z N Encoding is then performed. It should be noted that the preset rules used in the compression method of this embodiment 1 at the encoding end are also applied to the residual decoding performed during decompression at the decoding end, so as to achieve encoding and decoding matching.

[0103] The preset rule includes two variables: the maximum number of consecutive encoded residuals K0 and the maximum number of consecutive uncoded residuals K1. If K0 sub-data points D are consecutively processed... N After residual coding, the next sub-data D is processed.N+1 Residual coding is no longer performed. If K1 consecutive sub-data points D are processed... N Without residual coding, the next sub-data D N+1 Residual encoding is performed. The values ​​of the two variables, the maximum number of consecutive encoded residuals K0 and the maximum number of consecutive uncoded residuals K1, are not empirical values ​​or arbitrary values, but are related to the compression ratio G of the compression system, the width W and width H of the data block, and the length M of the sliding window.

[0104] First, the compression system allocates different numbers of bits B to different data blocks. The size of the number of bits B allocated to each data block is related to the number of original compensation values ​​it contains. The number of bits D for each sub-data block... N The original compensation value also has the original number of bits B', and each sub-data D is known. N The original number of bits B' is used to calculate the original data size S0 of the data block, which is calculated by combining the width W and width H of the data block with formula (3). Formula (3) is as follows:

[0105] S0=W×H×B′ (3).

[0106] Then, based on the original data size S0 of the data block calculated by formula (3), and combined with the number of bits B allocated to the data block, the compression factor G of the data block is calculated by formula (4), as follows:

[0107] G = S0 / B (4).

[0108] Finally, based on the compression factor G, the width W and height H of the data block, and the length M of the sliding window A calculated by formula (4), the maximum number of consecutive encoded residuals K0 and the maximum number of consecutive uncoded residuals K1 are calculated by formula (5), as follows:

[0109] K0=floor((M×W×H) / (G×(W×HM))+1)

[0110] K1=floor((G-1)×M×W×H / (G×(W×HM))+1) (5).

[0111] In formula (5), floor represents the floor operation. The width W and width H of the data block and the length M of the sliding window are known quantities. The compression factor G can be calculated by formulas (3) and (4).

[0112] For example, when W=8, H=5, M=4, B=60Mb, B'=6Mb, according to formulas (3) and (4), the original data size S0=240Mb and G=4 can be calculated. According to formula (5), the maximum number of consecutive encoded residuals K0=2 and the maximum number of consecutive uncoded residuals K1=4.

[0113] The compression method in this embodiment 1, by executing the entire process of step S300, obtains the maximum number of consecutive encoded residuals K0 and the maximum number of consecutive uncoded residuals K1 suitable for data blocks of different sizes and under different conditions. This ensures that the residual encoding of different data blocks can conform to the actual situation of the data block. It does not blindly pursue compression ratio or compression accuracy, but rather takes both into account, so as to improve the compression ratio while ensuring high compression accuracy.

[0114] The data block containing each sub-data {D} is obtained by executing S200. M D M+1 ,…,D X The predicted value of} is {P} M ,P M+1 ,…,P X} and residual {Z M Z M+1 ,…,Z X After obtaining the maximum number of consecutive encoded residuals K0 and the maximum number of consecutive uncoded residuals K1 through S300, the compression method of this embodiment 1 performs residual encoding on the data block through step S400. See [link to relevant documentation]. Figure 11 Step S400 specifically includes:

[0115] Step S401: Initialize the first M sub-data D0 to D in the data block M-1 The residuals Z0 to Z M-1 ;

[0116] Step S402: From the (M+1)th sub-data D M To begin, set the flag bit F, the temporary flag bit F0, and the residual count Q for continuous encoding. C and continuous uncoded residual count T C And initialize it to 0;

[0117] Step S403: Determine if it is located in sub-data D N Previously used to calculate the predicted value P N The reconstructed values ​​R of the M sub-data N-M To R N-1 Check if the number of identical values ​​e in the data meets the preset conditions. If it does, set the temporary flag F0 to 1.

[0118] Step S404: Statistical subdata D N The number of residuals Q from previous consecutive encodingsC Determine Q C Is it greater than K0?

[0119] Step S405: If Q C If the value is greater than K0, then set the flag F to 0;

[0120] Step S406: If Q C If K ≤ K0, then the statistical subdata D N The number T of previously uncoded residuals C Determine T C Is it greater than K1?

[0121] Step S407: If T C If the value is greater than K1, then set the flag F to 1;

[0122] Step S408: If T C If K1 ≤ K1, then set the flag F to the same value as the temporary flag F0;

[0123] Step S409: Determine the value of flag F;

[0124] Step S410: If the value of flag F is 1, then let Q... C =Q C +1, T C =0;

[0125] Step S411: If the value of flag F is 0, then let T... C =T C +1, Q C =0;

[0126] Step S412: Determine the relationship between N and X;

[0127] Step S413: If N < X, then let N = N + 1 and return to step S403;

[0128] Step S414: If N≥X, then end the encoding of the data block;

[0129] Step S415: Analyze the data of each sub-data D in the data block. N The residual encoding is used to obtain the residual encoding table S of the data block. C .

[0130] Specifically, in step 400, since the first M sub-data {D0,D1,…,D...} of the data block... M-1 Since no prediction is made, there are no residuals, or the residuals can be considered to be 0. Therefore, the first M sub-data points {D0, D1, ..., D} are analyzed first. M-1 The residuals {Z0, Z1, ..., Z} M-1Initialize to N / A. Starting from the (M+1)th sub-data D... M Initially, sub-data D is represented by setting the flag bit F. N Whether residual coding was performed, and if so, whether sub-data D needs to be processed. N If residual coding is performed, then flag F = 1. If sub-data D is not required... N When performing residual coding, the flag F = 0. A temporary flag F0 is set to indicate the data used for predicting the sub-data D. N M sub-data {D N-M D N-M+1 ,…,D N-1 The reconstructed value of {R} N-M ,R N-M+1 ,…,R N-1 The case of the number of identical values ​​e in} is used to determine the case of the number of identical values ​​e, and the preset condition for determining the number of identical values ​​e is the reconstructed value {R}. N-M ,R N-M+1 ,…,R N-1 Check if there are at least (M / 2+1) identical values ​​in the array. If the number of identical values ​​e satisfies e≥(M / 2+1), then the temporary flag F0=1; if the number of identical values ​​e satisfies e<(M / 2+1), then the temporary flag F0=0. Set the residual count Q for continuous encoding. C Used for statistical subdata D N The flag F has been set for how many consecutive sub-data points have been previously, and this is determined by checking Q. C The relationship between the value of D and K0 determines the sub-data D. N The value of the flag F is either 0 or 1, which determines whether to apply the sub-data D. N Perform residual coding. Set a count T of consecutive uncoded residuals. C Used for statistical subdata D N How many consecutive sub-data points have not had the flag F set, and how to determine T? C The relationship between the size of K1 and the sub-data D determines the sub-data D. N The value of the flag F is either 0 or 1, which determines whether to apply the sub-data D. N Perform residual coding. If sub-data D N There was already a Q before. C The flag F is set continuously for each sub-data item, indicating that Q has been continuously encoded. C If there are residuals, then determine Q. C The relationship between Q and K0; if Q C If >K0, then the flag F is set to 0, indicating that the sub-data D N Residual coding is no longer performed; if Q C If K ≤ K0, then the statistical subdata D N The number T of consecutive sub-data items whose flag F was not set CIf sub-data D N There was already a T before. C The flag F has not been set for any consecutive sub-data, meaning that the current consecutive T sub-data has not been set for any sub-data. C If no residual encoding is performed on any of the sub-data, then determine T. C The relationship between T and K1; if T C If the value is greater than K1, then the flag F is set to 1, indicating that the sub-data D is... N Perform residual coding; if T C If K1 is less than or equal to K1, then the value of flag F is set to the same as the value of temporary flag F0; if temporary flag F0 = 0 at this time, then flag F = 0, and the sub-data D is processed accordingly. N Residual coding is no longer performed; if the temporary flag F0 = 1 at this time, then the flag F = 1, and the sub-data D is processed accordingly. N Perform residual coding. If flag F = 1 at this time, then let Q... C =Q C +1, T C =0, meaning the residual count Q of continuous encoding C Increment by 1 to count the continuous uncoded residuals T. C Reset to 0. If flag F = 0 at this time, then let T... C =T C +1, Q C =0, meaning the number of consecutive uncoded residuals T C Increment by 1, the residual count Q of the continuous encoding C Reset to 0. Complete sub-data D. N After residual coding or no coding, if subdata D N Not the last sub-data D in the data block X If N < X, then let N = N + 1, that is, add 1 to N and continue to judge the next sub-data D. N+1 Whether to perform residual coding, and so on, until N=X, that is, the last sub-data D of the data block is completed. X Perform residual coding judgment to represent all sub-data {D} in the data block. M D M+1 ,…,D X All residual encoding judgments have been completed; at this point, the encoding of the data block ends. Finally, the individual sub-data D in the data block... N The residual coding situation forms the residual coding table F C To represent the sub-data D in the data block that is residual encoded. N The position and its corresponding residual Z N .

[0131] The compression method in this embodiment 1 selectively compresses a portion of the sub-data D in the data block through step 400. NResidual coding can reduce the size of data encoded into the binary bitstream, improve the compression ratio of data blocks, and simultaneously reduce the size of the residual-coded sub-data D. N It can guarantee the reconstructed value R after decompression. N The accuracy of the data blocks ensures that, during the reconstruction process, the residual-coded sub-data D... N Reconstruction value R N The sub-data D, which is identical to the original compensation value but has not undergone residual coding, N Reconstruction value R N Despite the predicted value P N This indicates that, due to the spatial correlation between adjacent sub-data, the predicted value P... N The error between the original compensation value and the actual value will not be large, which can basically guarantee the compression accuracy of the data block.

[0132] After completing the residual encoding of the data block, the compression method of this embodiment 1 writes the data obtained in the previous steps into the binary bit stream through step S500, see [link to previous steps]. Figure 12 Step S500 specifically includes:

[0133] Step S510: Process the first M sub-data D0 to D in the data block M-1 Encode the first M sub-data to obtain sub-data codes C0 to C10. M-1 ;

[0134] Step S520: Encode the sub-data C0 to C M-1 and residual coding table S C As a compressed code segment for a data block, the maximum number of consecutive coded residuals K0 and the maximum number of consecutive uncoded residuals K1 are used as the judgment code segment for the data block;

[0135] Step S530: Write the binary code of the data block composed of the compressed code segment and the judgment code segment into the compressed binary bit stream.

[0136] Specifically, in the compression method of this embodiment 1, the data written into the binary bitstream at the encoding end must be usable for reconstructing the data block after decompression at the decoding end, and the preset rules used by the decoding end when performing residual decoding on the data block are the same as those at the encoding end. To improve prediction accuracy, the compression method of this embodiment 1 directly applies the first M sub-data {D0, D1, ..., D...} of the data block. M-1 The data is directly encoded to obtain the sub-data encoding {C0, C1, ..., C} in binary form. M-1}, and residual coding table S CTogether, they form a compressed code segment, which is the basis for the decoding end to reconstruct the data block. However, the maximum number of consecutive coded residuals K0 and the maximum number of consecutive uncoded residuals K1 are not directly reconstructed in the data block by the decoding end. Instead, they serve as judgment code segments to help the decoding end selectively reconstruct a portion of the sub-data D in the data block. N Residual decoding is performed, and the residual decoding at the decoding end and the residual encoding at the encoding end can form an encoding-decoding match, further improving the accuracy of reconstructing the data block. The binary encoding of the data block, composed of compressed code segments and judgment code segments, is written into the compressed binary bit stream. The high compression ratio at the encoding end results in less resource consumption for the binary encoding, and the guarantee of compression accuracy at the encoding end ensures that the data contained in the binary encoding will not cause damage to the accuracy of the data block reconstruction at the decoding end.

[0137] The steps of the compression method in Embodiment 1 will be described below using a display panel with a size of 2560×1600 as an example. In this display panel, uneven pixels among the 2560×1600 pixels need to be compensated, resulting in a DEMURA compensation value in the form of a 2560×1600 two-dimensional array. First, step S100 is executed to divide the DEMURA compensation value into several data blocks. In the compression method of Embodiment 1, the divided data blocks are illustrated using an 8×5 size as an example, but this does not mean that the size of the data blocks can only be 8×5; the specific size is determined according to actual needs. See [link to documentation]. Figure 13 In this 8×5 data block, X = 39, containing 40 sub-data items in 8 rows and 5 columns {D0, D1, ..., D...} 39 The original compensation value is as follows: Figure 14As shown. Step S210 establishes a sliding window A of length M = 4, and sets N = 4. It is stipulated that the first four sub-data points {D0, D1, D2, D3} of the data block are not predicted; prediction begins from the fifth sub-data point D4. Step S220 involves sliding window A first selecting the first four sub-data points {D0, D1, D2, D3} of the data block to predict the fifth sub-data point D4. The original compensation values ​​of these first four sub-data points {D0, D1, D2, D3} are {2, 1, -1, -1}. Then, step S231 determines the relationship between N and X. Since N = 4, step S232 directly uses the original compensation values ​​of these first four sub-data points {D0, D1, D2, D3} as the reconstructed values ​​{R0, R1, R2, R3}, i.e., the reconstructed values ​​{R0, R1, R2, R3} are {2, 1, -1, -1}. Next, execute step S235, substituting the length M = 4 of the sliding window A into formula (2) to calculate the offset off = 2. Then execute step S236, substituting the offset off into formula (1) to calculate the predicted value P4 = 1 for the 5th sub-data D4. Then execute step S240, calculating the difference between the original compensation value D4 and the predicted value P4 to obtain the residual Z4 = -3. Then execute S250, since sub-data D4 is not the last sub-data D of the data block... 39Therefore, step S260 is executed, where sliding window A shifts to the right by the length of one sub-data point, changing the four sub-data points selected by sliding window A from {D0,D1,D2,D3} to {D1,D2,D3,D4}, and N is incremented by 1. The process then returns to step S220 to predict the next sub-data point D5. Since N=5, the four sub-data points selected by sliding window A are {D1,D2,D3,D4}, which includes three of the previous four sub-data points {D0,D1,D2,D3}. Therefore, step S234 is executed. The reconstructed values ​​{R1,R2,R3} of sub-data {D1,D2,D3} are {1,-1,-1}. The reconstructed value R4 of sub-data D4 is the sum of its predicted value P4 and residual Z4, i.e., R4 = -2. Therefore, the reconstructed values ​​{R1,R2,R3,R4} of the four sub-data {D1,D2,D3,D4} before sub-data D5 are {1,-1,-1,-2}. The predicted value P5 = -1 and the residual Z5 = -1 are calculated. Let N continue to increase by 1 to predict sub-data D6, and so on. The prediction calculation method for sub-data D6 and sub-data D7 is the same as that for sub-data D5. Sub-data belonging to the first four sub-data {D0,D1,D2,D3} are directly represented by the original compensation value, while sub-data not belonging to the first four sub-data {D0,D1,D2,D3} are calculated by adding the predicted value and the residual. When N=8, the four sub-data {D4,D5,D6,D7} selected by sliding window A do not include the first four sub-data {D0,D1,D2,D3}. Therefore, step S233 is executed, adding the predicted values ​​{P4,P5,P6,P7} obtained from the previous prediction of the four sub-data {D4,D5,D6,D7} to the residual {Z4,Z5,Z6,Z7} to obtain the four sub-data {D4,D5,D6,D7}. The reconstructed values ​​of D5, D6, D7 are {R4, R5, R6, R7}, where the predicted values ​​{P4, P5, P6, P7} are {1, -1, -2, -2}, the residuals {Z4, Z5, Z6, Z7} are {-3, -1, 2, 3}, and the reconstructed values ​​{R4, R5, R6, R7} are {-2, -2, 0, 1}. Calculations show that the predicted value of sub-data D8 is P8 = -1, and the residual is Z8 = 3. Next, the sliding window A is shifted to the right by the length of one sub-data point, changing the four sub-data points selected by the sliding window A from {D4, D5, D6, D7} to {D5, D6, D7, D8}. N is incremented by 1, and the process returns to step S220 to predict the next sub-data point D9, and so on, until the last sub-data point D is predicted. 39 Among them, subdata {D9,D... 10 ,…,D 39 The predicted values ​​and residuals are calculated using step S233 in all cases. The final result is as follows: Figure 15 The predicted values ​​shown are {P4, P5, ..., P} 39} and such Figure 16The residuals {Z4, Z5, ..., Z...} shown are... 39}

[0138] Assuming the number of bits B allocated to the data block is 200Mb, the original number of bits B' occupied by each sub-data in the data block is 20Mb. Substituting the original number of bits B' = 20Mb, width W = 8, and height H = 5 into formula (3), we obtain the original data size S0 = 800Mb of the data block. Then, substituting the original data size S0 = 800Mb and the number of bits B = 200Mb into formula (4), we obtain the compression factor G = 4 of the data block. Then, substituting the width W = 8, height H = 5, length M = 4, and compression factor G = 4 into formula (5), we calculate that the maximum number of consecutive encoded residuals K0 of the data block is 2, and the maximum number of consecutive uncoded residuals K1 is 4.

[0139] The residuals {Z0, Z1, Z2, Z3} of the first four sub-data {D0, D1, D2, D3} are initialized to N / A, indicating that the first four sub-data {D0, D1, D2, D3} will not be residual encoded. Then, a flag F indicating whether residual encoding is selected for the current sub-data is set, and a flag indicating whether residual encoding is selected for the current sub-data is set. N The previous 4 sub-data {D N-4 D N-3 D N-2 D N-1 The temporary flag F0 indicates whether the number of identical values ​​e in the current sub-data D meets the preset condition. N The number Q of continuously encoded residuals during encoding judgment C The setting indicates the current sub-data D N The number T of residuals that have not been encoded consecutively during the encoding judgment. C And set the flag bit F, the temporary flag bit F0, and the number of continuously encoded residuals Q. C The number of consecutive uncoded residuals T C All are initialized to 0, and N is initialized to 4, then based on... Figure 15 The predicted values ​​shown are {P4, P5, ..., P} 39},like Figure 16 The residuals {Z4, Z5, ..., Z...} shown are... 39Given K0 = 2 and K1 = 4, residual coding is performed sequentially starting from the 5th sub-data point D4. First, the number of identical values ​​e in the reconstructed values ​​{R0, R1, R2, R3} of the four sub-data points {D0, D1, D2, D3} used to calculate the predicted value P4 before the 5th sub-data point D4 is counted. According to the previous steps, the preset condition is that the temporary flag F0 is set to 1 when the number of identical values ​​e ≥ 3. However, the reconstructed values ​​{R0, R1, R2, R3} of the first four sub-data points {D0, D1, D2, D3} are {2, 1, -1, -1}, where the number of identical values ​​e = 2, which does not meet the preset condition; therefore, the temporary flag F0 remains 0. Counting the sub-data points sequentially forward from the 5th sub-data point D4, it is found that D3, D2, D1, and D0 have not undergone residual coding; therefore, the number of continuously coded residuals Q is... C When Q is 0, Q is... C =0 is less than K0=2, so by counting again, we can find the number of consecutive uncoded residuals T. C The value is 4, at which point T C =4 equals K1=4, so the flag F is set to the same value as the temporary flag F0, i.e., F=0. Since the flag F=0, it indicates that residual encoding is not performed on the current sub-data D4, and the residual Z4 of the 5th sub-data D4 is initialized to N / A. Therefore, the number of consecutive unencoded residuals T is... C Add 1 to increase the number of residuals Q in the continuous encoding. C To return to zero, that is, to let T be zero. C =T C +1, Q C =0. The current sub-data D4 is the 5th sub-data in the data block, and we have not yet reached the last sub-data D. 39 Therefore, let N = N + 1, and continue with residual coding for the next sub-data D5. For the 6th sub-data D5, since the 5th sub-data D4 did not use residual coding, its reconstructed value R4 = P4 + Z4 = 1. The reconstructed values ​​{R1, R2, R3, R4} of the four sub-data {D1, D2, D3, D4} preceding sub-data D5 are {1, -1, -1, -2}, where the number of identical values ​​e = 2, which does not meet the preset condition. Therefore, the temporary flag F0 remains 0, and the number of consecutively encoded residuals Q is counted. C If the value is 0, which is less than K0 = 2, then count the number T of consecutive uncoded residuals. C Since the value is 5, which is greater than K1 = 4, the flag F is set to 1, indicating that residual encoding is selected for the current sub-data D5, resulting in residual Z5 = -1 for sub-data D5. The number of continuously encoded residuals Q is then determined. C Add 1 to the number of consecutive uncoded residuals T. C To zero, that is, to let Q be zero. C =Q C +1, T C=0, then increment N by 1, and continue residual encoding for the next sub-data D6. Continue in this manner until the last sub-data D is completed. 39 The residual encoding is used to determine the sub-data {D4,D5,…,D}. 39 Sub-data D that needs to be encoded in} N and the corresponding residual Z N Encode it, and finally get the following: Figure 17 The residual coding table F shown C Finally, the first four sub-data items {D0, D1, D2, D3} in the data block are directly encoded to obtain the sub-data encoding {C0, C1, C2, C3} in binary form, which is then compared with... Figure 17 The residual coding table F shown C The compressed code segment is formed, and the maximum number of consecutive coded residuals K0=2 and the maximum number of consecutive uncoded residuals K1=4 are encoded into the judgment code segment. The compressed code segment and the judgment code segment together form the binary code of the data block and are written into the compressed binary bit stream.

[0140] Example 2

[0141] Embodiment 2 of the present invention discloses a decompression method for DEMURA compensation values. By selectively decoding the residuals of some sub-data in the data block at the decoding end, different compression rates and compression accuracies are achieved for different data blocks, thereby improving the accuracy of reconstruction.

[0142] See Figure 18 The decompression method in this embodiment 2 includes:

[0143] Step 600: Parse the binary bit stream to obtain the first M sub-data D0 to D1 of multiple data blocks. M-1 Residual coding table S C The maximum number of consecutive encoded residuals K0 and the maximum number of consecutive uncoded residuals K1, wherein the data block includes X+1 sub-data D0 to D X ;

[0144] Step 700: For each data block, based on the (N+1)th sub-data D N The reconstructed values ​​R of the previous M sub-data points N-M To R N-1 Combined with residual coding table S C For the (N+1)th sub-data D N Make predictions and obtain the predicted values ​​P for each sub-data. M To P X ;

[0145] Step 800: Based on the predicted value P M To P XThe maximum number of consecutive encoded residuals K0 and the maximum number of consecutive uncoded residuals K1, combined with the residual coding table S C For the sub-data D that needs to be decoded N Perform residual decoding to obtain the residual decoding table S of the data block. D ;

[0146] Step 900: Based on the first M sub-data D0 to D M-1 Predicted value P M To P X and residual decoding table S D Reconstruct the data block's sub-data D0 to D... X ;

[0147] Specifically, in steps S600 to S900, M, N, X, K0, and K1 are natural numbers, where M ≤ N ≤ X. The binary bitstream contains the binary encoding of each data block generated by the compression method of this embodiment 1. Each sub-data in the data block represents the compensation value to be assigned to the pixel at each position. These compensation values ​​are used to compensate the pixels at each position to optimize the display. When decompressing the binary bitstream, the data blocks are decompressed one by one, thereby reconstructing a two-dimensional array composed of multiple data blocks with a width of W and a height of H, completing the decompression of the DEMURA compensation value. Here, W indicates that the data block has W columns, H indicates that the data block has H rows, and each data block includes X+1 sub-data {D0, D1, ..., D...}. X By executing step S600, parsing the binary bit stream yields a compressed code segment and a judgment code segment. The compressed code segment contains the first M sub-data {D0, D1, ..., D...}. M-1} and residual coding table S C The code segment is determined to contain the maximum number of consecutive coded residuals K0 and the maximum number of consecutive uncoded residuals K1. For each data block, the decompression method in this embodiment 2, during step S700, decompresses the first M sub-data blocks {D0, D1, ..., D...}. M-1 Without making a prediction, start from the (M+1)th sub-data point D M Initially, combine the residual coding table S C For each sub-data {D} of the data block M D M+1 ,…,D X} Make a prediction and obtain the predicted value {P} M ,P M+1 ,…,P X During step S800, the final residual decoding table S is obtained. D Not all sub-data D N All data underwent residual decoding, but only a portion of the sub-data D was selectively processed. NPerform residual decoding. When step S900 is executed, the original compensation values of the first M sub-data {D0, D1, …, D M-1} are directly used as the reconstruction values of the first M sub-data of the reconstructed data block. For the (M + 1)-th sub-data D M to the last sub-data D X among them, for the sub-data D D that has not been subjected to residual decoding in the residual decoding table S N , its predicted value P N is directly used as its reconstruction value, while for the sub-data D N that has been subjected to residual decoding, its reconstruction value is the sum of the predicted value P N and the residual Z N . Finally, the sub-data {D0, D1, …, D X} of each data block are reconstructed.

[0148] Adopting the decompression method of this Embodiment 2, by selectively performing residual decoding on some sub-data in the data block, it matches the residual encoding performed at the encoding end, which helps to improve the compression ratio. At the same time, by means of residual decoding, the number of reconstructed sub-data is maintained within a reasonable range, avoiding the problem of reducing the accuracy of the reconstruction value in the pursuit of a high compression ratio blindly.

[0149] Refer to Figure 19 , in the decompression method of this Embodiment 2, step S700 specifically includes:

[0150] Step S710: For each data block, establish a sliding window A with a length of M;

[0151] Step S720: The sliding window A selects the first M sub-data D N to D N-M before the (N + 1)-th sub-data D N-1 ;

[0152] Step S730: Based on the predicted values P N to P N-M of the first M sub-data before the (N + 1)-th sub-data D N-1 , combined with the residual encoding table S C , predict the (N + 1)-th sub-data D N to obtain the predicted value P N of the (N + 1)-th sub-data D N ;

[0153] Step S740: Judge the size relationship between N and X;

[0154] Step S750: If N < X, move the sliding window A by the length of one sub-data, let N = N + 1, and return to execute step S720; <000135​Step S760: If N = X, then end the processing of each sub-data D in the data block. N The prediction.

[0156] Figure 19 The diagram shows the specific process of step S700, which involves setting up a sliding window A and calculating each sub-data point D by shifting it by one sub-data point length at a time. N Predicted value P N Where N ≥ M. Specifically, the data block is a two-dimensional array structure, and each sub-data D in the data block N Numbered sequentially from left to right and top to bottom as {D0, D1, ..., D N ,…,D X},like Figure 4 and Figure 5 As shown. Sub-data D N Predicted value P N Through sub-data D N The previous M sub-data {D N-M D N-M+1 ,…,D N-1 The reconstructed value of {R} N-M ,R N-M+1 ,…,R N-1} and residual Z N The calculation shows that the original compensation value is located in the data block at the sub-data D. N The compensation value corresponding to the pixel at the position is directly used as D. N Indicates, such as Figure 14 As shown, residual Z N like Figure 16 As shown. The sliding window A has a length of M and a height of 1. The length M represents the length of M sub-data items, and the height 1 represents the height of 1 sub-data item. Since the sliding window A itself selects M sub-data items, the first M sub-data items of the data block {D0, D1, ..., D...} are... M-1 The predicted value of} cannot be calculated through step S730. Step S730 starts from the (M+1)th sub-data D M Start calculating the predicted value P one by one N The first M sub-data {D0, D1, ..., D M-1 No prediction is made. After completing the calculation of sub-data D... N-1 Predicted value P N-1 Then, sliding window A shifts to the right by the length of one sub-data point and selects sub-data point D. N The previous M sub-data {D N-M D N-M+1 ,…,D N-1 If the sub-data D to be predicted N The previous sub-data D N-1 Compared with its previous sub-data DN-2 If the data is in the same row as the data block, then sliding window A moves directly to the right by the length of one sub-data block, starting from sub-data block D. N-2 Move to sub-data D N-1 ,like Figure 4 As shown. If the sub-data D to be predicted N The previous sub-data D N-1 Compared with its previous sub-data D N-2 If the data is on a different row from the data block, when the sliding window A moves to the right, the portion of the data that exceeds the length of one sub-data item in the data block will be moved to the first sub-data item D of the next row. N-1 ,like Figure 5 As shown. By sliding window A one by one, the sub-data {D0, D1, ..., D} in the data block are calculated sequentially. X The predicted value of} is {P} M ,P M+1 ,…,P X Each time the sliding window A moves to the right, the relationship between N and X is determined to identify the sub-data point D for prediction. N Is it the last sub-data D? X If N < X, then it means that the sub-data D N Not the last sub-data D X There are still XN sub-data points D N To predict, the sliding window A can be shifted to the right by the length of one sub-data point, and N is incremented by 1 so that N = N + 1. The next prediction sub-data point D is then made. N+1 If N = X, then it represents the sub-data D. N That is, the last sub-data D X There are no other sub-data D to be predicted in the data block. N At this point, sliding window A stops translating, and the data block ends its translation of sub-data D. N The prediction.

[0157] In step S700, the specific process of step S730 is as follows: Figure 20 ,include:

[0158] Step S731: Determine the relationship between N and M;

[0159] Step S732: If N = M, then transfer the first M sub-data D0 to D... M-1 As sub-data D N The reconstructed values ​​R of the previous M sub-data points N-M To R N-1 ;

[0160] Step S733: If N≥2M, then based on the (N+1)th sub-data D N The predicted value P of the previous M sub-data N-MTo P N-1 Combined with residual coding table S C Calculate sub-data D N The reconstructed values ​​R of the previous M sub-data points N-M To R N-1 ;

[0161] Step S734: If M < N < 2M, then the data located in sub-data D will be... N The previous 2M-N sub-data D N-M To D M-1 As sub-data D N The previous 2M-N sub-data reconstructed values ​​R N-M To R M-1 And based on the (N+1)th sub-data D N The previous NM sub-data D M To D N-1 Predicted value P M To P N-1 Combined with residual coding table S C Calculate sub-data D N The reconstructed value R of the previous NM sub-data M To R N-1 To obtain sub-data D N The reconstructed values ​​R of the previous M sub-data points N-M To R N-1 ;

[0162] Step S735: Based on the reconstructed value R N-M To R N-1 The offset off is derived from the length M of the sliding window;

[0163] Step S736: Based on the (N+1)th sub-data D N The reconstructed values ​​R of the previous M sub-data points N-M To R N-1 Using the offset off and the length M of the sliding window, we obtain the (N+1)th sub-data point D. N Predicted value P N .

[0164] Specifically, in step S730, different processes are executed depending on the value of N, therefore, in predicting sub-data D... N First, determine the relationship between N and M, and then execute the following three processes.

[0165] Firstly, such as Figure 7 As shown, when N = M, the sub-data to be predicted is the (M+1)th sub-data D. M The (M+1)th sub-data D M The first M sub-data {D0,D1,…,D M-1} represents the first M sub-data items of the data block. At this point, we do not consider the first M sub-data items {D0, D1, ..., D...} M-1 Instead of making predictions, we directly use the first M sub-data points {D0, D1, ..., D}. M-1 The original compensation values ​​of} are used as its reconstructed values ​​{R0, R1, ..., R}. M-1 The original compensation value uses sub-data {D0, D1, ..., D}. M-1}express.

[0166] Secondly, such as Figure 8 As shown, when N≥2M, the sub-data to be predicted are the (2M+1)th to (X+1)th sub-data {D} 2M D 2M+1 , ..., D X There are a total of X-2M+1 sub-data points. When the sub-data point to be predicted is the 2M+1th sub-data point D... 2M At that time, its previous M sub-data are {D} M D M+1 , ..., D 2M-1}, the M sub-data {D M D M+1 , ..., D 2M-1 The data does not include any of the first M subdata points {D0, D1, ..., D} that are not predicted. M-1 Therefore, according to sub-data D 2M The previous M sub-data {D M D M+1 , ..., D 2M-1 The predicted value of} is {P} M P M+1 , ..., P 2M-1}, combined with residual {Z M Z M+1 , ..., Z 2M-1}, calculate sub-data D 2M Reconstruction value P 2M And so on, calculating the 2M+1 to X+1th sub-data {D} 2M D 2M+1 , ..., D X The reconstructed value of {R} 2M R 2M+1 , ..., R x}

[0167] Thirdly, such as Figure 9 As shown, when M < N < 2M, the sub-data to be predicted are the (M+2)th to the 2Mth sub-data {D} M+1 D M+2 , ..., D 2M-1There are a total of M-1 sub-data points, and this part of the sub-data points {D} M+1 D M+2 , ..., D 2M-1 Each sub-data D in} N The previous M sub-data were {D N-M D N-M+1 , ..., D N-1}, the M sub-data are {D N-M D N-M+1 , ..., D N-1} consists of two parts, namely 2M-N sub-data {D N-M D N-M+1 , ..., D M-1} and NM sub-data {D M D M+1 , ..., D N-1}; where there are 2M-N sub-data {D N-M D N-M+1 , ..., D M-1} represents the first M sub-data points {D0, D1, ..., D} that are not predicted. M-1 The 2M-N sub-data in} therefore directly use the 2M-N sub-data {D N-M D N-M+1 , ..., D M-1 The original compensation value of} is used as its reconstructed value {R}. N-M R N-M+1 , ..., R M-1}; while NM sub-data {D M D M+1 , ..., D N-1 The reconstructed value of {R} M R M+1 , ..., R N-1} is based on each sub-data D N The previous NM sub-data {D M D M+1 , ..., D N-1 The predicted value of} is {P} M P M+1 , ..., P N-1}, combined with residual {Z M Z M+1 , ..., Z N-1}, calculate the (M+2)th to Nth sub-data {D M D M+1 , ..., D N-1 The reconstructed value of {R} M R M+1 , ..., R N-1}

[0168] For ease of decompression and calculation, the predicted value P N The value is preferably rounded down, but when using sub-data D N The reconstructed values ​​of the previous M sub-data points {R N-M R N-M+1 , ..., R N-1 Calculate the predicted value P N At that time, the predicted value P will inevitably appear. N For cases where the value is not an integer, an offset `off` is introduced in step 730 to provide rounding functionality and correct the predicted value P. N This makes the predicted value P N The integer is used. Calculate the predicted value P. N Various mathematical methods can be used. In this embodiment 2, the decompression method preferably adopts the mean algorithm, which calculates each sub-data D using formula (1). N Predicted value P N Formula (1) is as follows:

[0169] P N =(R N-1 +R N-2 +...+R N-M +off) / M (1).

[0170] By reconstructing the value {R} N-M R N-M+1 , ..., R N-1 Adding the offset off ensures that the denominator in formula (1) is divisible by the numerator M, resulting in an integer predicted value PN. The offset off is calculated using formula (2), which is as follows:

[0171]

[0172] The calculation results of formulas (1) and (2) only retain the integer part. For example, when M is 5 and sign is 1, off takes the integer part of 2.5, which is 2.

[0173] After parsing and obtaining the maximum number of consecutive encoded residuals K0 and the maximum number of consecutive uncoded residuals K1 from step S600, the decompression method of this embodiment 2 performs residual decoding on the data block in step S800. (See [link to previous section]). Figure 21 Step 800 specifically includes:

[0174] Step S801: Initialize the first M sub-data D0 to D in the data block M-1 The residuals Z0 to Z M-1 ;

[0175] Step S802: From the (M+1)th sub-data DM To begin, set the flag F, the temporary flag F0, and the residual count Q for continuous decoding. D and the residual count T of continuous undecoded D And initialize it to 0;

[0176] Step S803: Determine if it is located in sub-data D N Previously used to calculate the predicted value P N The reconstructed values ​​R of the M sub-data N-M To R N-1 Check if the number of identical values ​​e in the data meets the preset conditions. If it does, set the temporary flag F0 to 1.

[0177] Step S804: Statistical subdata D N The number of residuals Q from previous consecutive decoding D Determine Q D Is it greater than K0?

[0178] Step S805: If Q D If the value is greater than K0, then set the flag F to 0;

[0179] Step S806: If Q D If K ≤ K0, then the statistical subdata D N The number of residuals T that were not decoded consecutively before D Determine T D Is it greater than K1?

[0180] Step S807: If T D If the value is greater than K1, then set the flag F to 1;

[0181] Step S808: If T D If K1 ≤ K1, then set the flag F to the same value as the temporary flag F0;

[0182] Step S809: Determine the value of flag F;

[0183] Step S810: If the value of flag F is 1, then let Q... D =Q D +1, T D =0;

[0184] Step S811: If the value of flag F is 0, then let T... D =T D +1, Q D =0;

[0185] Step S812: Determine the relationship between N and X;

[0186] Step S813: If N < X, then let N = N + 1 and return to step S803;

[0187] Step S814: If N≥X, then end the decoding of the data block;

[0188] Step S815: Analyze the data of each sub-data D in the data block. N The residual decoding yields the residual decoding table S of the data block. D .

[0189] Specifically, in step 800, since the first M sub-data {D0,D1,…,D...} of the data block... M-1 Since no prediction is made, there are no residuals, or the residuals can be considered to be 0. Therefore, the first M sub-data points {D0, D1, ..., D} are analyzed first. M-1 The residuals {Z0, Z1, ..., Z} M-1 Initialize to N / A. Starting from the (M+1)th sub-data D... M Initially, sub-data D is represented by setting the flag bit F. N Has residual decoding been performed? If so, is it necessary to perform sub-data D? N When performing residual decoding, the flag F = 1. If sub-data D is not required... N When performing residual decoding, the flag F = 0. A temporary flag F0 is set to indicate the data used for predicting the sub-data D. N M sub-data {D N-M D N-M+1 ,…,D N-1 The reconstructed value of {R} N-M ,R N-M+1 ,…,R N-1 The case of the number of identical values ​​e in} is used to determine the case of the number of identical values ​​e, and the preset condition for determining the number of identical values ​​e is the reconstructed value {R}. N-M ,R N-M+1 ,…,R N-1 Check if there are at least (M / 2+1) identical values ​​in the array. If the number of identical values ​​e satisfies e≥(M / 2+1), then the temporary flag F0=1; if the number of identical values ​​e satisfies e<(M / 2+1), then the temporary flag F0=0. Set the residual count Q for continuous decoding. D Used for statistical subdata D N The flag F has been set for how many consecutive sub-data points have been previously, and this is determined by checking Q. D The relationship between the value of D and K0 determines the sub-data D. N The value of the flag F is either 0 or 1, which determines whether to apply the sub-data D. N Perform residual decoding. Set a residual count T for consecutive undecoded iterations. D Used for statistical subdata D N How many consecutive sub-data points have not had the flag F set, and how to determine T? D The relationship between the size of K1 and the sub-data D determines the sub-data D.N The value of the flag F is either 0 or 1, which determines whether to apply the sub-data D. N Perform residual decoding. If sub-data D N There was already a Q before. D The flag F is set continuously for each sub-data item, indicating that Q has been continuously decoded. D If there are residuals, then determine Q. D The relationship between Q and K0; if Q D If >K0, then the flag F is set to 0, indicating that the sub-data D N Residual decoding is no longer performed; if Q D If K ≤ K0, then the statistical subdata D N The number T of consecutive sub-data items whose flag F was not set D If sub-data D N There was already a T before. D The flag F has not been set for any consecutive sub-data, meaning that the current consecutive T sub-data has not been set for any sub-data. D If no residual decoding is performed on any of the sub-data, then determine T. D The relationship between T and K1; if T D If the value is greater than K1, then the flag F is set to 1, indicating that the sub-data D is... N Perform residual decoding; if T D If K1 is less than or equal to K1, then the value of flag F is set to the same as the value of temporary flag F0; if temporary flag F0 = 0 at this time, then flag F = 0, and the sub-data D is processed accordingly. N Residual decoding is no longer performed; if the temporary flag F0 = 1 at this time, then the flag F = 1, and the sub-data D is processed. N Perform residual decoding. If flag F = 1 at this time, then let Q... D =Q D +1, T D =0, meaning the residual count Q of continuous decoding D Increment by 1 to the residual count T of consecutive undecoded iterations. D Reset to 0. If flag F = 0 at this time, then let T... D =T D +1, Q D =0, meaning the residual count T of continuously undecoded events. D Increment by 1, the residual count Q of continuous decoding D Reset to 0. Complete sub-data D. N After residual decoding or no decoding, if subdata D N Not the last sub-data D in the data block X If N < X, then let N = N + 1, that is, add 1 to N and continue to judge the next sub-data D. N+1 Whether to perform residual decoding, and so on, until N=X, that is, the last sub-data D of the data block is completed. XThe residual decoding is performed to determine the total sub-data {D} within the data block. M D M+1 ,…,D X All residual decoding checks have been completed; at this point, the decoding of the data block ends. Finally, the individual sub-data D in the data block... N The residual decoding situation forms the residual decoding table F. D To represent the sub-data D in the data block for residual decoding. N The position and its corresponding residual Z N .

[0190] The decompression method in this embodiment 2 selectively decompresses a portion of the sub-data D in the data block through step 800. N Residual decoding is performed, using the same preset rules as the encoder to achieve encoding-decoding matching, thereby improving the compression ratio of data blocks. Simultaneously, the sub-data D that underwent residual decoding... N It can guarantee the reconstructed value R after decompression. N The accuracy of the data block ensures that, during the reconstruction process, the sub-data D after residual decoding... N Reconstruction value R N The sub-data D, which is identical to the original compensation value and has not undergone residual decoding, N Reconstruction value R N Despite the predicted value P N This indicates that, due to the spatial correlation between adjacent sub-data, the predicted value P... N The error between the original compensation value and the actual value will not be large, which can basically guarantee the compression accuracy of the data block.

[0191] After completing the residual encoding of the data block, the decompression method in this embodiment 2 begins to decompress each sub-data {D0, D1, ..., D...} of the data block. X The reconstruction is performed, and in step S900, the first M sub-data are reconstructed into data blocks D0 to D10. M-1 Residual decoding table S D The residual Z corresponding to the sub-data of the decoded residual N Compared with the predicted value P N After addition, the data blocks are reconstructed into D. N-M To D X Part of the residual decoding table S D The predicted value P corresponding to the sub-data that has not undergone decoding residual N Reconstructed as data blocks D N-M To D X Part of it.

[0192] The decompression method in this embodiment 2 uses the same preset rules as the compression method in embodiment 1. At the decoding end, the original compensation value of each sub-data in each data block is reproduced as much as possible. Under the premise of satisfying a high compression rate, the difference between the reconstructed value of each sub-data and the original compensation value is small, which improves the accuracy of data block reconstruction.

[0193] The following describes the steps performed by the decompression method in Embodiment 2 using a display panel with a size of 2560×1600 as an example. For the binary bitstream, step S600 is executed to parse it, obtaining the first M sub-data D0 to D1 of multiple data blocks. M-1 Residual coding table S C The maximum number of consecutive encoded residuals K0 and the maximum number of consecutive uncoded residuals K1, wherein the data block includes X+1 sub-data D0 to D X Based on this, the individual data blocks are reconstructed, thereby reconstructing a 2560×1600 display panel. In this display panel, uneven pixels within the 2560×1600 pixels need to be compensated, resulting in a 2560×1600 two-dimensional array of DEMURA compensation values. These DEMURA compensation values ​​are divided into several data blocks at the encoding end. In the decompression method of this embodiment 2, the divided data blocks are illustrated using an 8×5 size as an example, but this does not mean that the size of the data blocks can only be 8×5; the specific size is determined according to actual needs. See also... Figure 13 In this 8×5 data block, X = 39, containing 40 sub-data items in 8 rows and 5 columns {D0, D1, ..., D...} 39 The original compensation value is as follows: Figure 14 As shown. Step S710 establishes a sliding window A of length M = 4, and sets N = 4. It is stipulated that the first four sub-data points {D0, D1, D2, D3} of the data block are not predicted; prediction begins from the fifth sub-data point D4. Step S720 involves sliding window A first selecting the first four sub-data points {D0, D1, D2, D3} of the data block to predict the fifth sub-data point D4. The original compensation values ​​of these first four sub-data points {D0, D1, D2, D3} are {2, 1, -1, -1}. Then, step S731 determines the relationship between N and X. Since N = 4, step S732 directly uses the original compensation values ​​of these first four sub-data points {D0, D1, D2, D3} as the reconstructed values ​​{R0, R1, R2, R3}, i.e., the reconstructed values ​​{R0, R1, R2, R3} are {2, 1, -1, -1}. Next, step S735 is executed, substituting the length M = 4 of the sliding window A into formula (2) to calculate the offset off = 2. Then, step S736 is executed, substituting the offset off into formula (1) to calculate the predicted value P4 = 1 for the 5th sub-data D4. Then, step S740 is executed, since sub-data D4 is not the last sub-data D of the data block...39 Therefore, step S750 is executed, where sliding window A shifts to the right by the length of one sub-data point, changing the four sub-data points selected by sliding window A from {D0,D1,D2,D3} to {D1,D2,D3,D4}, and N is incremented by 1. The process then returns to step S720 to predict the next sub-data point D5. Since N=5, the four sub-data points selected by sliding window A are {D1,D2,D3,D4}, which includes three of the previous four sub-data points {D0,D1,D2,D3}. Therefore, step S734 is executed. The reconstructed values ​​{R1,R2,R3} of sub-data {D1,D2,D3} are {1,-1,-1}. The reconstructed value R4 of sub-data D4 is the sum of its predicted value P4 and residual Z4, i.e., R4 = -2. Therefore, the reconstructed values ​​{R1,R2,R3,R4} of the four sub-data {D1,D2,D3,D4} before sub-data D5 are {1,-1,-1,-2}. The predicted value P5 = -1 and the residual Z5 = -1 are calculated. Let N continue to increase by 1 to predict sub-data D6, and so on. The prediction calculation method for sub-data D6 and sub-data D7 is the same as that for sub-data D5. Sub-data belonging to the first four sub-data {D0, D1, D2, D3} are directly represented by the original compensation value, while sub-data not belonging to the first four sub-data {D0, D1, D2, D3} are calculated by adding the predicted value and the residual. When N = 8, the four sub-data {D4, D5, D6, D7} selected by sliding window A do not include the first four sub-data {D0, D1, D2, D3}. Therefore, step S733 is executed, adding the predicted values ​​{P4, P5, P6, P7} obtained from the previous prediction of the four sub-data {D4, D5, D6, D7} to the residual {Z4, Z5, Z6, Z7} to obtain the four sub-data {D4, D5, D6, D7}. The reconstructed values ​​of D5, D6, D7 are {R4, R5, R6, R7}, where the predicted values ​​{P4, P5, P6, P7} are {1, -1, -2, -2}, the residuals {Z4, Z5, Z6, Z7} are {-3, -1, 2, 3}, and the reconstructed values ​​{R4, R5, R6, R7} are {-2, -2, 0, 1}. The predicted value of sub-data D8 is calculated to be P8 = -1, and the residual is Z8 = 3. Next, the sliding window A is shifted to the right by the length of one sub-data point, changing the four sub-data points selected by the sliding window A from {D4, D5, D6, D7} to {D5, D6, D7, D8}. N is incremented by 1, and the process returns to step S720 to predict the next sub-data point D9, and so on, until the last sub-data point D is predicted. 39 Among them, subdata {D9,D... 10 ,…,D 39 The predicted values ​​and residuals are calculated using step S733 in all cases. The final result is as follows: Figure 15 The predicted values ​​shown are {P4, P5, ..., P} 39} and such Figure 16 The residuals {Z4, Z5, ..., Z...} shown are... 39}

[0194] Based on the maximum number of consecutive decoded residuals K0 (2) and the maximum number of consecutive undecoded residuals K1 (4) obtained from parsing the binary bitstream, residual decoding is performed on the data block. The residuals {Z0, Z1, Z2, Z3} of the first four sub-data points {D0, D1, D2, D3} are initialized to N / A, indicating that the first four sub-data points {D0, D1, D2, D3} will not undergo residual decoding. Then, a flag F indicating whether residual decoding is selected for the current sub-data point is set, and a flag indicating whether residual decoding is selected for the current sub-data point D is set... N The previous 4 sub-data {D N-4 D N-3 D N-2 D N-1 The temporary flag F0 indicates whether the number of identical values ​​e in the current sub-data D meets the preset condition. N The number of residuals Q that have been continuously decoded during decoding is determined. D The setting indicates the current sub-data D N The number T of residuals that have not been decoded consecutively during the decoding judgment. D And set the flag F, the temporary flag F0, and the number of residuals Q from continuous decoding. D The number of residuals T that are not decoded consecutively D All are initialized to 0, and N is initialized to 4, then based on... Figure 15 The predicted values ​​shown are {P4, P5, ..., P} 39},like Figure 16 The residuals {Z4, Z5, ..., Z...} shown are... 39 Given K0 = 2 and K1 = 4, residual decoding is performed sequentially starting from the 5th sub-data point D4. First, the number of identical values ​​e in the reconstructed values ​​{R0, R1, R2, R3} of the four sub-data points {D0, D1, D2, D3} used to calculate the predicted value P4 before the 5th sub-data point D4 is counted. According to previous steps, the preset condition is that the temporary flag F0 is set to 1 when the number of identical values ​​e ≥ 3. However, the reconstructed values ​​{R0, R1, R2, R3} of the first four sub-data points {D0, D1, D2, D3} are {2, 1, -1, -1}, where the number of identical values ​​e = 2, which does not meet the preset condition; therefore, the temporary flag F0 remains 0. Counting the sub-data points sequentially forward from the 5th sub-data point D4, it is found that D3, D2, D1, and D0 have not undergone residual decoding; therefore, the number of continuously decoded residuals Q is... D When Q is 0, Q is... D =0 is less than K0=2, so by counting again, we can find the number of residuals T that are not decoded consecutively. D The value is 4, at which point T D=4 equals K1=4, so the flag F is set to the same value as the temporary flag F0, i.e., F=0. Since flag F=0, it indicates that residual decoding will not be performed on the current sub-data D4, and the residual Z4 of the 5th sub-data D4 is initialized to N / A. Therefore, the number of consecutive undecoded residuals T is... D Add 1 to increase the number of residuals Q from the consecutive decoding. D To return to zero, that is, to let T be zero. D =T D +1, Q D =0. The current sub-data D4 is the 5th sub-data in the data block, and we have not yet reached the last sub-data D. 39 Therefore, let N = N+1, and continue with residual decoding for the next sub-data D5. For the 6th sub-data D5, since residual decoding was not selected for the 5th sub-data D4, its reconstructed value R4 = P4 + Z4 = 1. The reconstructed values ​​{R1, R2, R3, R4} of the four sub-data {D1, D2, D3, D4} preceding sub-data D5 are {1, -1, -1, -2}, where the number of identical values ​​e = 2, which does not meet the preset condition. Therefore, the temporary flag F0 remains 0, and the number of residuals Q from consecutive decoding is counted. D If the value is 0, which is less than K0 = 2, then count the number of consecutive undecoded residuals T. D Since the value is 5, which is greater than K1 = 4, the flag F is set to 1, indicating that residual decoding is performed on the current sub-data D5, resulting in residual Z5 = -1 for sub-data D5. The number of continuously decoded residuals Q is then determined. D Add 1 to the number of consecutive undecoded residuals T. D To zero, that is, to let Q be zero. D =Q D +1, T D =0, then increment N by 1, and continue with residual decoding of the next sub-data D6. Continue in this manner until the last sub-data D is completed. 39 Residual decoding is used to determine the sub-data {D4,D5,…,D}. 39 The sub-data D that needs to be decoded in} N and the corresponding residual Z N Decoding is performed, and the final result is as follows: Figure 17 The residual decoding table F shown D Then, the original compensation values ​​of the first four sub-data in the data block are directly reconstructed as {D0, D1, D2, D3}, and the residual decoding table S is... D The residual Z corresponding to the sub-data of the decoded residual N Compared with the predicted value P N After addition, the data is reconstructed into a data block {D}. N-M D N-M+1 ,…,D X Part of} will be the residual decoding table S DThe predicted value P corresponding to the sub-data that has not undergone decoding residual N Reconstructed into data blocks {D N-M D N-M+1 ,…,D X A portion of}. Ultimately, the reconstructed data blocks {D0, D1, ..., D} are obtained. X}

[0195] Example 3

[0196] Embodiment 3 of the present invention discloses a compression system for DEMURA compensation values, which achieves different compression rates and compression accuracies for different data blocks by selectively encoding the residuals of some sub-data in the data block at the encoding end.

[0197] See Figure 22 The compression system includes a segmentation module 10, a first prediction module 20, a calculation module 30, a residual coding module 40, and a writing module 50 that are interconnected.

[0198] The segmentation module 10 is used to segment the DEMURA compensation value to obtain multiple data blocks, each data block including X+1 sub-data D0 to D... X The first prediction module 20 is used to predict each data block based on the (N+1)th sub-data point D. N The previous M sub-data D N-M To D N-1 For each sub-data D N Make predictions and obtain the predicted values ​​P for each sub-data. M To P X and residual Z M To Z X The calculation module 30 is used to calculate the maximum number of consecutive encoded residuals K0 and the maximum number of consecutive uncoded residuals K1 of the data block based on the number of bits B allocated to the data block; the residual coding module 40 is used to calculate the maximum number of consecutive encoded residuals K0 and the maximum number of consecutive uncoded residuals K1 of the data block based on the predicted value P. M To P X Residual Z M To Z X The maximum number of consecutive encoded residuals K0 and the maximum number of consecutive uncoded residuals K1 are used to perform residual coding on the determined sub-data that needs to be encoded, resulting in the residual coding table S of the data block. C The write module 50 is used to write the first M sub-data D0 to D of the data block respectively. M-1 Sub-data encoding, residual encoding table S C The maximum number of consecutive encoded residuals K0 and the maximum number of consecutive uncoded residuals K1 are written into the compressed binary bit stream.

[0199] Specifically, in the compression system of this embodiment 3, M, N, X, K0, and K1 are natural numbers, where M ≤ N ≤ X. The DEMURA compensation value is a two-dimensional array composed of multiple sub-data. Each sub-data represents the compensation value to be assigned to a pixel at a specific location. These compensation values ​​are used to compensate for the pixels at each location to optimize the display. When compressing the DEMURA compensation value, the entire two-dimensional array is not compressed. Instead, the two-dimensional array is divided into multiple data blocks with a width of W and a height of H by the segmentation module 10, and then each data block is compressed. Here, W indicates that the data block has W columns, and H indicates that the data block has H rows. Each data block includes X+1 sub-data D0 to D1. X For each data block, the first prediction module 20 of the compression system in this embodiment 3 performs prediction on the first M sub-data blocks D0 to D10. M-1 Without making a prediction, starting from the (M+1)th sub-data point D M Initially, for each sub-data D of the data block... M To D X Make a prediction and calculate the residual to obtain the predicted value P. M To P X and residual Z M To Z X Then, the sub-data D that needs to be encoded N The data blocks are compressed using residual coding. When the calculation module 30 calculates the number of continuously encoded residuals K0 and the number of continuously uncoded residuals K1, the number of bits B allocated to each data block is usually determined by the number of pixels in that data block that need to be assigned compensation values. The number of bits B allocated to different data blocks may be the same or different. Therefore, the number of continuously encoded residuals K0 and the number of continuously uncoded residuals K1 calculated by the calculation module 30 may also differ depending on the data block. The first prediction module 20 and the calculation module 30 do not have a strict execution order; they can be executed sequentially or simultaneously. When the residual coding module 40 is working, the final residual coding table S is obtained. C Not all sub-data D N All of them undergo residual coding, but selectively, only a portion of the sub-data D is processed. N Residual encoding is performed. When the write module 50 is operating, the residual encoding table S... C Both the maximum number of consecutive encoded residuals K0 and the maximum number of consecutive uncoded residuals K1 can be directly written into the compressed binary bitstream, while the first M sub-data D0 to D... M-1After encoding, sub-data encoding is obtained. Sub-data encoding is written into the compressed binary bitstream. In the binary bitstream, the position and size of the compensation value for pixels in the data block are presented in the form of bit count. The binary bitstream is a binary string used to store the data obtained after the DEMURA compensation value is compressed.

[0200] The compression system of this embodiment 3 reduces the size of the string written into the binary bit stream after compression by selectively performing residual encoding on some sub-data in the data block, thereby improving the compression ratio. At the same time, the number of sub-data subjected to residual encoding is kept within a reasonable range by using residual encoding, thus avoiding the problem of sacrificing compression accuracy in pursuit of a high compression ratio.

[0201] Example 4

[0202] Embodiment 4 of the present invention discloses a decompression system for DEMURA compensation values. By selectively decoding the residuals of some sub-data in the data block at the decoding end, different compression rates and compression accuracies are achieved for different data blocks, thereby improving the accuracy of reconstruction.

[0203] See Figure 23 The decompression system includes an interconnected parsing module 60, a second prediction module 70, a residual decoding module 80, and a reconstruction module 90.

[0204] Among them, the parsing module 60 is used to parse the binary bit stream to obtain the first M sub-data D0 to D of multiple data blocks. M-1 Residual coding table S C The maximum number of consecutive encoded residuals K0 and the maximum number of consecutive uncoded residuals K1, wherein the data block includes X+1 sub-data D0 to D X The second prediction module 70 is used to predict each data block based on the (N+1)th sub-data point D. N The reconstructed values ​​R of the previous M sub-data points N-M To R N-1 Combined with residual coding table S C For the (N+1)th sub-data D N Make predictions and obtain the predicted values ​​P for each sub-data. M To P X The residual decoding module 80 is used to decode based on the predicted value P. M To P X The maximum number of consecutive encoded residuals K0 and the maximum number of consecutive uncoded residuals K1, combined with the residual coding table S C For the sub-data D that needs to be decoded N Perform residual decoding to obtain the residual decoding table S of the data block. D Reconstruction module 90 is used to reconstruct the data based on the first M sub-data points D0 to D10.M-1 Predicted value P M To P X and residual decoding table S D Reconstruct the data block's sub-data D0 to D... X .

[0205] Specifically, in the decompression system of this embodiment 4, M, N, X, K0, and K1 are natural numbers, where M ≤ N ≤ X. The binary bitstream contains the binary encoding of each data block generated by the compression method of this embodiment 1. Each sub-data in the data block represents the compensation value to be assigned to the pixel at each position. These compensation values ​​are used to compensate the pixels at each position to optimize the display. When decompressing the binary bitstream, the data blocks are decompressed one by one, thereby reconstructing a two-dimensional array composed of multiple data blocks with a width of W and a height of H, completing the decompression of the DEMURA compensation value. Here, W indicates that the data block has W columns, H indicates that the data block has H rows, and each data block includes X+1 sub-data {D0, D1, ..., D...}. X The parsing module 60 parses the binary bitstream to obtain compressed code segments and judgment code segments. The compressed code segment contains the first M sub-data {D0, D1, ..., D...}. M-1} and residual coding table S C The code segment is determined to contain the maximum number of consecutive coded residuals K0 and the maximum number of consecutive uncoded residuals K1. For each data block, during the operation of the first prediction module, the first M sub-data {D0, D1, ..., D...} are analyzed. M-1 Without making a prediction, start from the (M+1)th sub-data point D M Initially, combine the residual coding table S C For each sub-data {D} of the data block M D M+1 ,…,D X} Make a prediction and obtain the predicted value {P} M ,P M+1 ,…,P X During the computation module's operation, the final residual decoding table S is obtained. D Not all sub-data D N All data underwent residual decoding, but only a portion of the sub-data D was selectively processed. N Perform residual decoding. When reconstruction module 90 is working, the first M sub-data {D0, D1, ..., D...} are... M-1 The original compensation value of} is directly used as the reconstruction value of the first M sub-data of the reconstructed data block, and the (M+1)th sub-data D M Up to the last sub-data D X In the residual decoding table S D Subdata D that has not undergone residual decoding N Use its predicted value P directlyN As its reconstructed value, the sub-data D after residual decoding N The reconstructed value is the predicted value P. N With residual Z N The sum of these sub-data blocks is then used to reconstruct the sub-data {D0, D1, ..., D...}. X}

[0206] The decompression method of this embodiment 2, by selectively performing residual decoding on some sub-data in the data block and matching it with the residual encoding performed at the encoding end, helps to improve the compression ratio. At the same time, by using residual decoding, the number of reconstructed sub-data is kept within a reasonable range, avoiding the problem of reducing the accuracy of reconstructed values ​​by blindly pursuing a high compression ratio.

[0207] Example 5

[0208] Embodiment 5 of the present invention discloses a computer-readable storage medium storing a computer program that, when run on a computer, causes the computer to perform the DEMURA compensation value compression method as disclosed in Embodiment 1 and the DEMURA compensation value decompression method as disclosed in Embodiment 2.

[0209] Example 6

[0210] Embodiment 4 of the present invention discloses a computer program product, which includes a computer program that, when run on a computer, causes the computer to execute the DEMURA compensation value compression method disclosed in Embodiment 1 and the DEMURA compensation value decompression method disclosed in Embodiment 2.

[0211] The DEMURA compensation value compression and decompression method and system disclosed in this invention fully utilizes the spatial correlation of data through sliding window prediction, performs residual coding and residual decoding on some of the data, and further improves the accuracy of the reconstructed values ​​while improving the compression rate.

[0212] It should be understood that the above description of specific embodiments of the present invention is only for illustrating the technical approach and features of the present invention, and is intended to enable those skilled in the art to understand the content of the present invention and implement it accordingly. However, the present invention is not limited to the specific embodiments described above. All changes or modifications made within the scope of the claims of the present invention should be covered within the protection scope of the present invention.

Claims

1. A method for compressing DEMURA compensation values, characterized in that, The compression method includes: Step S100: Segment the DEMURA compensation value to obtain multiple data blocks, each data block comprising X+1 sub-data D0 to D... X ; Step S200: For each data block, based on the (N+1)th sub-data D N The previous M sub-data D N-M To D N-1 For each sub-data D N Make predictions and obtain the predicted values ​​P for each sub-data. M To P X and residual Z M To Z X Wherein, the residual Z M To Z X Calculated based on the original compensation value and the predicted value of the sub-data; Step S300: Calculate the maximum number of consecutive coded residuals K0 and the maximum number of consecutive uncoded residuals K1 of the data block according to the number of bits B allocated to the data block; wherein, the number of residuals K1 is calculated from the compression ratio calculated according to the number of bits B of the data block, the width and height of the data block, and the length of the sliding window. Step S400: Based on the predicted value P M To P X The residual Z M To Z X The maximum number of consecutive encoded residuals K0 and the maximum number of consecutive uncoded residuals K1 are used to perform residual encoding on the determined sub-data that needs to be encoded, thereby obtaining the residual encoding table S of the data block. C ; Step S500: Extract the first M sub-data D0 to D10 of the data block respectively. M-1 Sub-data encoding, residual encoding table S C The maximum number of consecutive encoded residuals K0 and the maximum number of consecutive uncoded residuals K1 are written into the compressed binary bit stream; Where M, N, X, K0, and K1 are natural numbers, and M ≤ N ≤ X.

2. The compression method according to claim 1, characterized in that, Step S200 specifically includes: Step S210: For each data block, establish a sliding window A with a length of M. Step S220: The sliding window A selects the (N+1)th sub-data D. N The previous M sub-data D N-M To D N-1 ; Step S230: Based on the (N+1)th sub-data D N The previous M sub-data D N-M To D N-1 For the (N+1)th sub-data D N Make a prediction to obtain the (N+1)th sub-data point D. N Predicted value P N ; Step S240: Based on the (N+1)th sub-data D N and predicted value P N The residual Z is obtained. N ; Step S250: Determine the size relationship between N and X. Step S260: If N < X, move the sliding window A by the length of one sub-data, let N = N + 1, and return to execute step S220. Step S270: If N=X, then the processing of each sub-data D in the data block ends. N The prediction.

3. The compression method according to claim 2, characterized in that, Step S230 specifically includes: Step S231: Determine the size relationship between N and M. Step S232: If N=M, then transfer the first M sub-data D0 to D... M-1 As sub-data D N The reconstructed values ​​R of the previous M sub-data points N-M To R N-1 ; Step S233: If N≥2M, then based on the (N+1)th sub-data D N The predicted value P of the previous M sub-data N-M To P N-1 Combined with residual Z N-M To Z N-1 Calculate sub-data D N The reconstructed values ​​R of the previous M sub-data points N-M To R N-1 ; Step S234: If M < N < 2M, then the data located in sub-data D will be... N The previous 2M-N sub-data D N-M To D M-1 As sub-data D N The previous 2M-N sub-data reconstructed values ​​R N-M To R M-1 And based on the (N+1)th sub-data D N The previous NM sub-data D M To D N-1 Predicted value P M To P N-1 Combined with residual Z M To Z N-1 Calculate sub-data D N The reconstructed value R of the previous NM sub-data M To R N-1 To obtain sub-data D N The reconstructed values ​​R of the previous M sub-data points N-M To R N-1 ; Step S235: Based on the reconstructed value R N-M To R N-1 The offset off is derived from the length M of the sliding window; Step S236: Based on the (N+1)th sub-data D N The reconstructed values ​​R of the previous M sub-data points N-M To R N-1 The offset off and the length M of the sliding window are used to obtain the (N+1)th sub-data D. N Predicted value P N .

4. The compression method according to claim 2, characterized in that, Step S300 specifically includes: Step S310: Obtain the width W and height H of the data block, the number of bits B allocated to the data block, and the original number of bits B' of each sub-data in the data block. Step S320: Calculate the original data size S0 of the data block according to the number of bits B, the original number of bits B', the width W and height H of the data block. Step S330: Calculate the compression ratio G of the data block based on the number of bits B and the original data size S0 of the data block. Step S340: Calculate the maximum number of consecutive coded residuals K0 and the maximum number of consecutive uncoded residuals K1 when performing residual coding on the data block according to the compression ratio G, the width W and height H of the data block, and the length M of the sliding window.

5. The compression method according to claim 1, characterized in that, Step S400 specifically includes: Step S401: Initialize the first M sub-data D0 to D in the data block M-1 The residuals Z0 to Z M-1 ; Step S402: From the (M+1)th sub-data D M To begin, set the flag bit F, the temporary flag bit F0, and the residual count Q for continuous encoding. C and continuous uncoded residual count T C And initialize it to 0; Step S403: Determine if it is located in sub-data D N Previously used to calculate the predicted value P N The reconstructed values ​​R of the M sub-data N-M To R N-1 If the number of identical values ​​e in the middle meets the preset conditions, the temporary flag F0 is set to 1 if the preset conditions are met; Step S404: Statistical subdata D N The number of residuals Q from previous consecutive encodings C Determine the Q C Is it greater than K0? Step S405: If Q C If K > K0, then set the flag bit F to 0; Step S406: If Q C If K ≤ K0, then the statistical subdata D N The number T of previously uncoded residuals C Determine the T C Is it greater than K1? Step S407: If T C If the value is greater than K1, then the flag bit F is set to 1; Step S408: If T C If K1 ≤ K1, then the flag bit F is set to the same value as the temporary flag bit F0; Step S409: Determine the value of the flag bit F. Step S410: If the value of the flag bit F is 1, then let Q... C =Q C +1, T C =0; Step S411: If the value of the flag bit F is 0, then let T... C =T C +1, Q C =0; Step S412: Determine the size relationship between N and X. Step S413: If N < X, let N = N + 1, and return to step S403. Step S415: Calculate the values ​​of each sub-data D in the data block. N The residual encoding is used to obtain the residual encoding table S of the data block. C .

6. The compression method according to claim 1, characterized in that, Step S414: If N ≥ X, end the coding of the data block. Step S510: Process the first M sub-data D0 to D in the data block M-1 Encode the first M sub-data to obtain sub-data codes C0 to C10. M-1 ; Step S520: Encode the sub-data into C0 to C10. M-1 and the residual encoding table S C As the compressed code segment of the data block, the maximum number of consecutive encoded residuals K0 and the maximum number of consecutive uncoded residuals K1 are used as the judgment code segment of the data block; Step S500 specifically includes:

7. A method for decompressing DEMURA compensation values, characterized in that, Step S530: Combine the compressed code segment and the judgment code segment to write the binary coding of the data block into the compressed binary bit stream. Step 600: Parse the binary bit stream to obtain the first M sub-data D0 to D1 of multiple data blocks. M-1 Residual coding table S C The maximum number of consecutive encoded residuals K0 and the maximum number of consecutive uncoded residuals K1, wherein the data block includes X+1 sub-data D0 to D1. X ; Step 700: For each data block, based on the (N+1)th sub-data D N The reconstructed values ​​R of the previous M sub-data points N-M To R N-1 Combined with the residual coding table S C For the (N+1)th sub-data D N Make predictions and obtain the predicted values ​​P for each sub-data. M To P X ; Step 800: Based on the predicted value P M To P X The maximum number of consecutive encoded residuals K0 and the maximum number of consecutive uncoded residuals K1, combined with the residual encoding table S C For the sub-data D that needs to be decoded N Perform residual decoding to obtain the residual decoding table S of the data block. D ; Step 900: Based on the first M sub-data D0 to D M-1 The predicted value P M To P X and the residual decoding table S D Reconstruct the individual sub-data D0 to D of the data block. X ; The decompression method includes:

8. The decompression method according to claim 7, characterized in that, Where M, N, X, K0, and K1 are natural numbers, and M ≤ N ≤ X. Step S700 specifically includes: Step S720: The sliding window A selects the (N+1)th sub-data D. N The previous M sub-data D N-M To D N-1 ; Step S730: Based on the (N+1)th sub-data D N The predicted value P of the previous M sub-data N-M To P N-1 Combined with the residual coding table S C For the (N+1)th sub-data D N Make a prediction to obtain the (N+1)th sub-data point D. N Predicted value P N ; Step S710: For each data block, establish a sliding window A with a length of M. Step S740: Determine the size relationship between N and X. Step S760: If N=X, then the processing of each sub-data D in the data block ends. N The prediction.

9. The decompression method according to claim 8, characterized in that, Step S750: If N < X, move the sliding window A by the length of one sub-data, let N = N + 1, and return to execute step S720. Step S730 specifically includes: Step S732: If N=M, then transfer the first M sub-data D0 to D... M-1 As sub-data D N The reconstructed values ​​R of the previous M sub-data points N-M To R N-1 ; Step S733: If N≥2M, then based on the (N+1)th sub-data D N The predicted value P of the previous M sub-data N-M To P N-1 Combined with residual coding table S C Calculate sub-data D N The reconstructed values ​​R of the previous M sub-data points N-M To R N-1 ; Step S734: If M < N < 2M, then the data located in sub-data D will be... N The previous 2M-N sub-data D N-M To D M-1 As sub-data D N The previous 2M-N sub-data reconstructed values ​​R N-M To R M-1 And based on the (N+1)th sub-data D N The previous NM sub-data D M To D N-1 Predicted value P M To P N-1 Combined with residual coding table S C Calculate sub-data D N The reconstructed value R of the previous NM sub-data M To R N-1 To obtain sub-data D N The reconstructed values ​​R of the previous M sub-data points N-M To R N-1 ; Step S735: Based on the reconstructed value R N-M To R N-1 The offset off is derived from the length M of the sliding window; Step S736: Based on the (N+1)th sub-data D N The reconstructed values ​​R of the previous M sub-data points N-M To R N-1 The offset off and the length M of the sliding window are used to obtain the (N+1)th sub-data D. N Predicted value P N .

10. The decompression method according to claim 7, characterized in that, Step S731: Determine the size relationship between N and M. Step S801: Initialize the first M sub-data D0 to D in the data block M-1 The residuals Z0 to Z M-1 ; Step S802: From the (M+1)th sub-data D M To begin, set the flag F, the temporary flag F0, and the residual count Q for continuous decoding. D and the residual count T of continuous undecoded D And initialize it to 0; Step S803: Determine if it is located in sub-data D N Previously used to calculate the predicted value P N The reconstructed values ​​R of the M sub-data N-M To R N-1 If the number of identical values ​​e in the middle meets the preset conditions, the temporary flag F0 is set to 1 if the preset conditions are met; Step S804: Statistical subdata D N The number of residuals Q from previous consecutive decoding D Determine the Q D Is it greater than K0? Step S805: If Q D If K > K0, then set the flag bit F to 0; Step S806: If Q D If K ≤ K0, then the statistical subdata D N The number of residuals T that were not decoded consecutively before D Determine the T D Is it greater than K1? Step S807: If T D If the value is greater than K1, then the flag bit F is set to 1; Step S808: If T D If K1 ≤ K1, then the flag bit F is set to the same value as the temporary flag bit F0; Step 800 specifically includes: Step S810: If the value of the flag bit F is 1, then let Q... D =Q D +1, T D =0; Step S811: If the value of the flag bit F is 0, then let T... D =T D +1, Q D =0; Step S809: Determine the value of the flag bit F. Step S812: Determine the size relationship between N and X. Step S813: If N < X, let N = N + 1, and return to step S803. Step S814: If N ≥ X, end the decoding of the data block. Step S815: Calculate the values ​​of each sub-data D in the data block. N The residual decoding is performed to obtain the residual decoding table S of the data block. D .

11. The decompression method according to claim 7, characterized in that, In step S900, the first M sub-data are reconstructed into D0 to D1 of the data block. M-1 The residual decoding table S D The residual Z corresponding to the sub-data of the decoded residual N Compared with the predicted value P N After addition, the data block is reconstructed into D. N-M To D X Part of the residual decoding table S D The predicted value P corresponding to the sub-data that has not undergone decoding residual N Reconstructed as D of the data block N-M To D X Part of it.

12. A compression system for DEMURA compensation values, characterized in that, The compression system includes interconnected segmentation module, first prediction module, calculation module, residual coding module and writing module; The segmentation module is used to segment the DEMURA compensation value to obtain multiple data blocks, each data block comprising X+1 sub-data points D0 to D... X ; The first prediction module is used to predict each data block based on the (N+1)th sub-data D. N The previous M sub-data D N-M To D N-1 For each sub-data D N Make predictions and obtain the predicted values ​​P for each sub-data. M To P X and residual Z M To Z X ; The calculation module is used to calculate the maximum number of consecutive encoded residuals K0 and the maximum number of consecutive uncoded residuals K1 of the data block based on the number of bits B allocated to the data block; The residual coding module is used to base the prediction value P M To P X The residual Z M To Z X The maximum number of consecutive encoded residuals K0 and the maximum number of consecutive uncoded residuals K1 are used to perform residual encoding on the determined sub-data that needs to be encoded, thereby obtaining the residual encoding table S of the data block. C ; The writing module is used to write the first M sub-data D0 to D1 of the data block respectively. M-1 Sub-data encoding, residual encoding table S C The maximum number of consecutive encoded residuals K0 and the maximum number of consecutive uncoded residuals K1 are written into the compressed binary bit stream; Where M, N, X, K0, and K1 are natural numbers, and M ≤ N ≤ X.

13. A decompression system for DEMURA compensation values, characterized in that, The decompression system includes an interconnected parsing module, a second prediction module, a residual decoding module, and a reconstruction module. The parsing module is used to parse the binary bit stream to obtain the first M sub-data D0 to D1 of multiple data blocks. M-1 Residual coding table S C The maximum number of consecutive encoded residuals K0 and the maximum number of consecutive uncoded residuals K1, wherein the data block includes X+1 sub-data D0 to D1. X ; The second prediction module is used to predict each data block based on the (N+1)th sub-data point D. N The reconstructed values ​​R of the previous M sub-data points N-M To R N-1 Combined with the residual coding table S C For the (N+1)th sub-data D N Make predictions and obtain the predicted values ​​P for each sub-data. M To P X ; The residual decoding module is used to determine the predicted value P. M To P X The maximum number of consecutive encoded residuals K0 and the maximum number of consecutive uncoded residuals K1, combined with the residual encoding table S C For the sub-data D that needs to be decoded N Perform residual decoding to obtain the residual decoding table S of the data block. D ; The reconstruction module is used to reconstruct the data based on the first M sub-data points D0 to D10. M-1 The predicted value P M To P X and the residual decoding table S D Reconstruct the individual sub-data D0 to D of the data block. X ; Where M, N, X, K0, and K1 are natural numbers, and M ≤ N ≤ X.

14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when run on a computer, causes the computer to perform the compression method of the DEMURA compensation value as described in any one of claims 1 to 6 and the decompression method of the DEMURA compensation value as described in any one of claims 7 to 11.

15. A computer program product, characterized in that, The computer program product includes a computer program that, when run on a computer, causes the computer to perform the compression method of the DEMURA compensation value as described in any one of claims 1 to 6 and the decompression method of the DEMURA compensation value as described in any one of claims 7 to 11.