Coding device, display chip, and electronic device
By using encoding devices and display chips in the display technology, the brightness compensation data of pixel points is processed based on the quantization parameters of clustered data, the problem of uneven brightness of the display screen is solved, and high-accurate encoded data storage is achieved, and storage resource occupation is reduced.
Patent Information
- Application Number
- CN202510189963.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-20
- Publication Date
- 2025-05-30
AI Technical Summary
In the field of display technology, due to production process and material factors, the Mura phenomenon of uneven brightness of the display screen is required to encode and store the brightness compensation data of each pixel point to reduce the consumption of storage resources.
An encoding device and a display chip are provided, by acquiring cluster data corresponding to multiple pixel points on the display screen, determining the quantized data of each pixel point based on the quantization parameters of the clustered data, and determining the encoded data based on the quantized data, so as to reduce quantization errors and improve the accuracy of the encoded data.
Through quantization and coding technology, the error of quantized data is reduced and the accuracy of encoded data is improved, thereby effectively solving the problem of uneven brightness of the display screen and reducing the consumption of storage resources.
Smart Images

Figure CN120071802A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the field of display technologies, and particularly to an encoding device, a display chip, and an electronic device. Background Art
[0002] In the field of display technologies, due to factors such as manufacturing processes and materials, there is a phenomenon of uneven brightness on the display screen, which is called the Mura (unevenness) phenomenon. In response to this, it is possible to determine the brightness compensation data of each pixel point on the display screen, and compensate the brightness of the display screen according to the brightness compensation data, thereby solving the Mura phenomenon.
[0003] However, since there are a large number of pixel points on the display screen, and different pixel points correspond to different brightness compensation data, the brightness compensation data is large. Based on this, it is necessary to cluster the brightness compensation data of each pixel point to obtain clustering data, encode the clustering data corresponding to each pixel point, and store the encoded data of each pixel point to reduce the occupancy of storage resources. Based on this, how to encode the clustering data corresponding to each pixel point has become a problem that needs to be solved urgently. Summary of the Invention
[0004] The present application provides an encoding device, a display chip, and an electronic device, which can be used to solve the problems in the related technologies. The technical solutions include the following content.
[0005] On the one hand, an encoding device is provided. The encoding device includes an encoding circuit, and the encoding circuit is configured to:
[0006] Obtain clustering data corresponding to multiple pixel points on the display screen, where the clustering data corresponding to the pixel point represents the clustering cluster to which the brightness compensation data of the pixel point belongs, and there are multiple types of clustering data;
[0007] Determine the quantization parameter of any one of the multiple types of clustering data according to the brightness compensation data of each pixel point corresponding to any one of the multiple types of clustering data and the brightness compensation data of each pixel point corresponding to the adjacent clustering data, where the adjacent clustering data is the clustering data that satisfies the adjacent condition with the any one of the multiple types of clustering data;
[0008] Determine the quantization data of each pixel point according to the quantization parameters of various clustering data;
[0009] Determine the encoded data of each pixel point based on the quantization data of each pixel point.
[0010] On the other hand, a display chip is provided. The display chip includes a decoding circuit, and the decoding circuit is configured to:
[0011] Obtain the encoded data of multiple pixel points to be decoded;
[0012] Determine the quantization data of each pixel point according to the encoding data of the plurality of pixel points;
[0013] Determine the reconstruction data of each pixel point according to the quantization data of each pixel point, where the reconstruction data of the pixel point represents the clustering cluster to which the brightness compensation data of the pixel point belongs;
[0014] Determine the brightness compensation data of each pixel point according to the reconstruction data of each pixel point.
[0015] On the other hand, an encoding method is provided, and the method includes:
[0016] Obtain clustering data corresponding to a plurality of pixel points on the display screen, where the clustering data corresponding to the pixel point represents the clustering cluster to which the brightness compensation data of the pixel point belongs, and there are multiple types of clustering data;
[0017] Determine the quantization parameter of any one of the multiple types of clustering data according to the brightness compensation data of each pixel point corresponding to any one of the multiple types of clustering data and the brightness compensation data of each pixel point corresponding to the adjacent clustering data, where the adjacent clustering data is the clustering data that satisfies the adjacent condition with the any one of the multiple types of clustering data among the multiple types of clustering data;
[0018] Determine the quantization data of each pixel point according to the quantization parameters of various types of clustering data;
[0019] Determine the encoding data of each pixel point based on the quantization data of each pixel point.
[0020] On the other hand, a decoding method is provided, and the method includes:
[0021] Obtain the encoding data of a plurality of pixel points to be decoded;
[0022] Determine the quantization data of each pixel point according to the encoding data of the plurality of pixel points;
[0023] Determine the reconstruction data of each pixel point according to the quantization data of each pixel point, where the reconstruction data of the pixel point represents the clustering cluster to which the brightness compensation data of the pixel point belongs;
[0024] Determine the brightness compensation data of each pixel point according to the reconstruction data of each pixel point.
[0025] On the other hand, an electronic device is provided, and the electronic device includes the above encoding device or display chip.
[0026] The technical solution provided by this application at least brings the following beneficial effects:
[0027] In the encoding circuit provided by this application, since the clustering data corresponding to a pixel point represents the clustering cluster to which the brightness compensation data of the pixel point belongs, therefore, determining the quantization parameter of any clustering data according to the brightness compensation data of each pixel point corresponding to any clustering data and the brightness compensation data of each pixel point corresponding to the adjacent clustering data is equivalent to determining the quantization parameter of any clustering data according to the data distribution conforming to any clustering data and the data distribution conforming to the adjacent clustering data. Subsequently, when determining the quantization data of each pixel point according to the quantization parameters of various clustering data, the quantization data of the clustering data can be made to approach the quantization data of the adjacent clustering data that is closer to the data distribution conforming to the clustering data, reducing the error of the quantization data, thereby improving the accuracy of the encoded data. Description of the Drawings
[0028] To more clearly illustrate the technical solutions in the embodiments of this application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of this application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0029] Figure 1 is a schematic structural diagram of an encoding device provided by an embodiment of this application;
[0030] Figure 2 is a flowchart of an encoding method provided by an embodiment of this application;
[0031] Figure 3 is a schematic diagram of the distance between clustering data provided by an embodiment of this application;
[0032] Figure 4 is a schematic diagram of a pixel block and its adjacent pixel points provided by an embodiment of this application;
[0033] Figure 5 is a schematic diagram of another pixel block and its adjacent pixel points provided by an embodiment of this application;
[0034] Figure 6 is a schematic diagram of the relationship between frequency, quantization data, and mapping data provided by an embodiment of this application;
[0035] Figure 7 is a schematic diagram of a tree structure and its Huffman coding provided by an embodiment of this application;
[0036] Figure 8 is a schematic diagram of a pixel block and its compressed data provided by an embodiment of this application;
[0037] Figure 9 is a schematic diagram of an encoding device and a display chip provided by an embodiment of this application;
[0038] Figure 10 It is a schematic structural diagram of a display chip provided by an embodiment of the present application;
[0039] Figure 11 It is a flowchart of a decoding method provided by an embodiment of the present application;
[0040] Figure 12 It is a schematic structural diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0041] To make the objectives, technical solutions and advantages of the present application clearer, the following will further describe the embodiments of the present application in detail with reference to the accompanying drawings.
[0042] It should be noted that the terms "first", "second", etc. in the present application are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that such terms can be interchanged under appropriate circumstances so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0043] As Figure 1 shown, an embodiment of the present application provides an encoding device, and the type of the encoding device is not limited herein. The encoding device includes an encoding circuit 10, and the structure of the encoding circuit 10 is not limited herein. Among them, the encoding circuit 10 is configured to execute the steps as Figure 2 shown.
[0044] Step 201, obtain clustering data corresponding to multiple pixel points on the display screen, where the clustering data corresponding to the pixel points represents the clustering cluster to which the brightness compensation data of the pixel points belongs, and there are multiple types of clustering data.
[0045] In the field of display technology, due to factors such as manufacturing processes and materials, there is a phenomenon of uneven brightness on the display screen, and this phenomenon is called the Mura (uneven brightness) phenomenon. In this example, the brightness compensation data of each pixel point on the display screen can be obtained, and the brightness compensation data of the pixel points is used to compensate the brightness of the pixel points so that the brightness of each pixel point after compensation is the same, that is, the brightness of the display screen is the same, thereby solving the Mura phenomenon. Among them, the acquisition method of the brightness compensation data of the pixel points is not limited herein.
[0046] The brightness compensation data of a pixel includes data in at least one dimension. For example, if a pixel corresponds to three channels of Red-Green-Blue (RGB), and each channel is a dimension, then the brightness compensation data of the pixel includes the data of the R channel, the data of the G channel, and the data of the B channel, and the brightness compensation data of the pixel can be represented by (R, G, B). Another example is that if three dimensions of high compensation (offset_h), medium compensation (offset_m), and low compensation (offset_l) are preset, then the brightness compensation data of the pixel includes the data of offset_h, the data of offset_m, and the data of offset_l, and the brightness compensation data of the pixel can be represented by (offset_h, offset_m, offset_l).
[0047] In the field of display technology, the technology for solving the Mura phenomenon is called Demura technology. Generally, the number of pixels on a display screen is large, and the brightness compensation data of pixels is large. Therefore, Demura technology can adopt the strategy of offline compression and online decompression. Among them, online decompression is the inverse process of offline compression. For offline compression, generally, it includes two compression steps. The first compression step is to use a clustering scheme to compress the brightness compensation data in at least one dimension into one-dimensional clustering data, and the clustering data can be represented by index. For example, index can represent the three-dimensional data of (offset_h, offset_m, offset_l). The second compression step is to compress index. It can be understood that one of the goals of compression is to achieve lossless compression as much as possible, that is, it is necessary to control the error caused by compression within a set error range. In addition, another goal of compression is to ensure the compression ratio and reduce the data volume. The encoding method of the embodiment of the present application is introduced in detail below. This method can minimize the compression error as much as possible while ensuring the compression ratio.
[0048] In the embodiment of the present application, the brightness compensation data of each pixel can be clustered to obtain multiple clustering clusters. Each clustering cluster includes the brightness compensation data of at least one pixel, and any two clustering clusters include the brightness compensation data of different pixels. The clustering method is not limited here. For example, the brightness compensation data of each pixel can be clustered according to the K-means clustering method. Each clustering cluster has a uniquely corresponding clustering data, and this clustering data is used to represent the clustering cluster. The clustering data exists in the form of a numerical value, and in different scenarios, the clustering data has different names. For example, the clustering data can also be called a number, an index, etc. For example, assuming that there are 64 clustering clusters, then the numerical values from 0 to 63 can be used to represent the 64 clustering clusters respectively, and the clustering data can be the numerical values from 0 to 63, or other data representing the numerical values from 0 to 63.
[0049] Since the brightness compensation data of each pixel on the display screen belongs to a clustering cluster, and there is a unique corresponding clustering data for the clustering cluster, each pixel on the display screen corresponds to a clustering data, enabling the encoding circuit to obtain the clustering data corresponding to each pixel. The clustering data corresponding to any two pixels may be the same or different.
[0050] Step 202: Determine the quantization parameter of any one of the multiple clustering data according to the brightness compensation data of each pixel corresponding to any one of the multiple clustering data and the brightness compensation data of each pixel corresponding to the adjacent clustering data, where the adjacent clustering data is the clustering data that satisfies the adjacent condition with any one of the multiple clustering data.
[0051] In this example, the clustering data exists in the form of values, and satisfying the adjacent condition means that the values are adjacent. For example, if the multiple clustering data includes all positive integers, then the clustering data i (i is a positive integer greater than 1) satisfies the adjacent condition with the clustering data i - 1, and the clustering data i satisfies the adjacent condition with the clustering data i + 1.
[0052] Sort all the clustering data in descending order of values or in ascending order of values. For any one of the clustering data, determine one or two adjacent clustering data that are adjacent in position from the sorted clustering data. Since the sorting is based on values, the adjacent in position is essentially adjacent in values. Among them, there is one adjacent clustering data for the first and last clustering data, and each non - first and non - last clustering data has two adjacent clustering data, where one adjacent clustering data is greater than this clustering data and the other adjacent clustering data is less than this clustering data.
[0053] For any one of the clustering data, determine the quantization parameter of any one of the clustering data according to the brightness compensation data of each pixel corresponding to any one of the clustering data and the brightness compensation data of each pixel corresponding to the adjacent clustering data. The determination method is not limited here.
[0054] For example, the adjacent clustering data includes the first clustering data and the second clustering data. Step 202 includes: determining a first distance according to the brightness compensation data of each pixel corresponding to any one of the clustering data and the brightness compensation data of each pixel corresponding to the first clustering data, where the first distance represents the error of the brightness compensation data between any one of the clustering data and the first clustering data; determining a second distance according to the brightness compensation data of each pixel corresponding to any one of the clustering data and the brightness compensation data of each pixel corresponding to the second clustering data, where the second distance represents the error of the brightness compensation data between any one of the clustering data and the second clustering data; and determining the quantization parameter of any one of the clustering data according to the first distance and the second distance.
[0055] In this example, any cluster data is neither the first nor the last cluster data. If there are two adjacent cluster data for any cluster data, then any cluster data can be called the central cluster data. One adjacent cluster data of the central cluster data is the first cluster data, and the other adjacent cluster data is the second cluster data. The first cluster data is greater than this cluster data, and the second cluster data is less than this cluster data. Or, the first cluster data is less than this cluster data, and the second cluster data is greater than this cluster data.
[0056] The average value can be calculated based on the brightness compensation data of each pixel point corresponding to any cluster data to obtain the central reference data. In addition, the average value can be calculated based on the brightness compensation data of each pixel point corresponding to the first cluster data to obtain the first reference data. According to the central reference data and the first reference data, the first distance is determined. Among them, if the brightness compensation data is one-dimensional data, then the first reference data and the central reference data are also one-dimensional data, and the difference between the first reference data and the central reference data can be used as the first distance; if the brightness compensation data is at least two-dimensional data, then the first reference data and the central reference data are also at least two-dimensional data, and the first distance can be calculated according to the formula of Euclidean distance based on the first reference data and the central reference data.
[0057] Similarly, the average value can be calculated based on the brightness compensation data of each pixel point corresponding to the second cluster data to obtain the second reference data. According to the calculation principle of the first distance, the second distance is determined based on the central reference data and the second reference data, and the calculation process will not be elaborated here.
[0058] As Figure 3 shown, assume that the first reference data n - 1, the second reference data n + 1, and the central reference data n all include: data of offset_h, data of offset_m, and data of offset_l. Based on this, a three-dimensional coordinate system is established, and the three coordinate axes of the three-dimensional coordinate system are offset_h, offset_m, and offset_l respectively. The first reference data n - 1, the second reference data n + 1, and the central reference data n can be determined in the three-dimensional coordinate system, so that the first distance L- between the first reference data n - 1 and the central reference data n and the second distance L+ between the second reference data n + 1 and the central reference data n can be calculated.
[0059] If the first distance is less than the second distance, determine the quantization parameter of any cluster data as the first value; if the first distance is equal to the second distance, determine the quantization parameter of any cluster data as the second value; if the first distance is greater than the second distance, determine the quantization parameter of any cluster data as the third value. Wherein, the first value is different from the third value, and the second value may be the same as or different from the first value, and the second value may be the same as or different from the third value. For example, the first value is -1, and the second value and the third value are +1, that is, if L- < L+, the quantization parameter is -1, and if L- > L+ or L- = L+, the quantization parameter is +1. It can be seen that the quantization parameter of the cluster data is used to make the cluster data approach the adjacent cluster data with a smaller error. For example, when L- > L+, the distance between the first reference data n-1 and the central reference data n is greater than the distance between the second reference data n+1 and the central reference data n. In this case, the quantization parameter is +1, which can make the central reference data n approach the second reference data n+1 with a smaller error. Similarly, when L- < L+, the distance between the first reference data n-1 and the central reference data n is less than the distance between the second reference data n+1 and the central reference data n. In this case, the quantization parameter is -1, which can make the central reference data n approach the first reference data n-1 with a smaller error.
[0060] For another example, for the first or last cluster data, calculate a fourth distance according to the brightness compensation data of each pixel point corresponding to this cluster data and the brightness compensation data of each pixel point corresponding to the adjacent cluster data. The fourth distance characterizes the error of the brightness compensation data between this cluster data and the adjacent cluster data. Wherein, the calculation method of the fourth distance is similar to that of the first distance and the second distance, and will not be elaborated here. If the fourth distance is less than the distance threshold, the quantization parameter of this cluster data is the first value (or the third value); if the fourth distance is equal to the distance threshold, the quantization parameter of this cluster data is the second value; if the quantization parameter of the cluster data is greater than the distance threshold, the quantization parameter of this cluster data is the third value (or the first value). The distance threshold can be determined according to manual experience or according to each first distance and each second distance. For example, the distance threshold is the average value of each first distance and each second distance.
[0061] Determine a quantization parameter based on a first distance and a second distance, such that the quantization parameter is used to make the central clustered data approach the adjacent clustered data with a smaller error therebetween. Subsequently, when quantizing the central clustered data based on the quantization parameter, the quantization direction of the central clustered data approaches the quantization direction of the adjacent clustered data with a smaller error from the central clustered data, which is beneficial to reducing the quantization error and improving the accuracy of the quantized data, thereby improving the accuracy of the encoded data. It can be understood that the encoding method in the embodiments of the present application is a compression scheme, which can reduce the compression error caused by encoding.
[0062] Step 203: Determine the quantized data of each pixel point according to the quantization parameters of various clustered data.
[0063] Since each pixel point corresponds to a type of clustered data, therefore, the clustered data corresponding to this pixel point can be quantized according to the quantized data of this type of clustered data to obtain the quantized data of this pixel point, and the quantization method is not limited herein.
[0064] In an exemplary embodiment, step 203 includes steps 2031 to 2033 (not shown in the figure).
[0065] Step 2031: Determine the target prediction data of each pixel point according to the clustered data corresponding to multiple pixel points.
[0066] In the field of data encoding, prediction is an important step. In this example, the prediction step is to use the clustered data corresponding to the current pixel point and the reconstruction data of the adjacent pixel points that have been reconstructed to determine the target prediction data of the current pixel point, and the target prediction data of the pixel point is used to determine the reconstruction data of the pixel point.
[0067] That is to say, for the pixel point where the prediction step is first executed, the target prediction data of the pixel point can be determined based on the clustered data corresponding to the pixel point according to a preset rule. For example, the clustered data corresponding to the pixel point can be used as the target prediction data of the pixel point; for the pixel point where the prediction step is not first executed, the reconstruction data of the adjacent pixel points can be determined based on the target prediction data of the adjacent pixel points, and the target prediction data of the current pixel point can be determined according to the reconstruction data of the adjacent pixel points and the clustered data corresponding to the current pixel point.
[0068] Optionally, step 2031 includes: dividing multiple pixel points to obtain at least two pixel blocks, each pixel block including at least two pixel points; for any one of the at least two pixel blocks, obtaining at least two candidate prediction results of any one pixel block, and selecting a target prediction result from the at least two candidate prediction results based on the clustered data corresponding to each pixel point in any one pixel block, the target prediction result including the target prediction data of each pixel point in any one pixel block.
[0069] The embodiments of the present application do not limit the way of dividing pixel points. For example, according to a 2×2 pixel window, every four pixel points are divided into a pixel block. In this way, multiple pixel points can be divided into at least two pixel blocks, and any two pixel blocks include different pixel points. Any one pixel block corresponds to at least two prediction schemes, and candidate prediction results corresponding to each prediction scheme can be obtained. The embodiments of the present application do not limit the number and type of prediction schemes. A possible implementation is shown below.
[0070] In this example, as Figure 4 shown, the pixel block includes 2×2 pixel points 401, and the adjacent pixel points 402 of the pixel block include 12 pixel points. The target prediction data of the current pixel point 401 can be determined according to the reconstruction data of the adjacent pixel points 402. Among them, the reconstruction data can be expressed as di, where i takes an integer from 0 to 11, and the target prediction data can be expressed as pj, where j takes any integer from 0 to 3. Optionally, there are 4 prediction schemes, and the relationship between the target prediction data and the reconstruction data for each prediction scheme is shown in Table 1 below, where AVG represents the symbol of the average value.
[0071] Table 1
[0072] Encoding Prediction scheme 00 p0 = d9, p1 = d9, p2 = d11, p3 = d11 01 p0 = d5, p1 = d5, p2 = d5, p3 = d5 10 p0 = d6, p1 = d7, p2 = d6, p3 = d7 11 p0 = p1 = p2 = p3 = AVG(d8 + d9 + d10 + d11)
[0073] According to the above method, the candidate prediction results of each prediction scheme corresponding to each pixel block can be determined. It can be understood that if the pixel block is located in the edge area of the display screen, the pixel points can be extended by pixel filling, so as to determine the adjacent pixel points of the pixel block based on the extended pixel points. As Figure 5 shown, the display screen 500 includes a plurality of original pixel points 502 (shown as diagonal shaded parts). The pixel points are extended by pixel filling, so that the extended pixel points include both the original pixel points 502 and the filled pixel points 501 (shown as gray shaded parts). When the pixel block is located in the edge area of the display screen 500, the adjacent pixel points are determined based on the extended pixel points, so that the adjacent pixel points include the filled pixel points 501. Optionally, the adjacent pixel points also include the original pixel points 502.
[0074] After determining the candidate prediction results of each pixel block, one candidate prediction result can be selected from at least two candidate prediction results based on the clustering data corresponding to each pixel point in the pixel block, and this candidate prediction result is the target prediction result. The selection method is not limited here. A possible implementation is shown below.
[0075] In an exemplary embodiment, the candidate prediction results include candidate prediction data for each pixel point in any pixel block. Selecting a target prediction result from at least two candidate prediction results based on the clustering data corresponding to each pixel point in any pixel block includes: for any candidate prediction result among the at least two candidate prediction results, determining a third distance based on the candidate prediction data and the clustering data for each pixel point in the any candidate prediction result, where the third distance represents the error between the candidate prediction data and the clustering data in the any candidate prediction result; selecting, from the at least two candidate prediction results, the candidate prediction result corresponding to the smallest third distance as the target prediction result.
[0076] For a candidate prediction result of a pixel block, the error between the candidate prediction data and the clustering data for each pixel point can be calculated to obtain the third distance, and the calculation method is not limited herein. For example, the standard deviation or variance can be calculated based on the candidate prediction data and the clustering data for each pixel point to obtain the third distance. Alternatively, the difference between the candidate prediction data and the clustering data for each pixel point can be calculated, and the average value of the differences for each pixel point can be used as the third distance.
[0077] In the above manner, for a pixel block, the third distance corresponding to each candidate prediction result can be calculated. The candidate prediction result corresponding to the smallest third distance selected from the third distances corresponding to each candidate prediction result is used as the target prediction result. By using the candidate prediction result with the smallest error from the clustering data, the error during prediction can be reduced, the accuracy of the target prediction result can be improved, and thus the accuracy of the encoded data can be improved.
[0078] Step 2032, calculate the first error data between the target prediction data and the clustering data for each pixel point.
[0079] That is to say, for each pixel point, subtract the clustering data from the target prediction data of the pixel point, or subtract the target prediction data from the clustering data corresponding to the pixel point to obtain the first error data of the pixel point.
[0080] Step 2033, determine the quantization data for each pixel point according to the quantization parameters of various clustering data and the first error data of each pixel point.
[0081] In practical applications, step 2033 may have different implementation manners. Exemplarily, if the first error data of a pixel point is an even number, directly quantize the first error data of the pixel point to obtain the quantization data of the pixel point. For example, divide the first error data of the pixel point by 2 to obtain the quantization data of the pixel point, that is where n qThe quantization data represents a pixel point, and n represents the first error data of the pixel point. If the first error data of the pixel point is odd, first update the first error data of the pixel point according to the quantization parameter of the clustering data, and then quantize the updated first error data of the pixel point to obtain the quantization data of the pixel point. For example, add the quantization parameter to the first error data of the pixel point to update the first error data of the pixel point, and divide the updated first error data of the pixel point by 2 to obtain the quantization data of the pixel point. Assume that the quantization parameter is +1 when L->L+ or L- = L+, then Assume that the quantization parameter is -1 when L- < L+, then
[0082]
[0083] It can be understood that since an even number can be divided by 2, directly quantizing an even number can achieve error-free quantization. However, an odd number cannot be divided by 2, so quantization of an odd number will inevitably introduce errors, and it is necessary to reduce the quantization error as much as possible.
[0084] In this example, the quantization parameter of the clustering data is used to make the clustering data approach the adjacent clustering data with smaller error, and the first error data is determined based on the clustering data. Therefore, updating the first error data of the pixel point according to the quantization parameter of the clustering data can reduce the error of the updated first error data of the pixel point, so that when subsequently quantizing the updated first error data of the pixel point, the quantization error can be reduced, thereby reducing the compression error and improving the accuracy of the encoded data.
[0085] Alternatively, in a possible implementation, multiple pixel points are divided into at least two pixel blocks. Step 2033 includes: for any one of the at least two pixel blocks, determine a quantization flag according to the luminance compensation data of each pixel point in the any one pixel block, where the quantization flag represents whether quantization is performed; under the condition that the quantization flag represents performing quantization, select the quantization parameter of the any one pixel block from the quantization parameters of various clustering data, and quantize the first error data of each pixel point in the any one pixel block according to the quantization parameter of the any one pixel block to obtain the quantization data of each pixel point in the any one pixel block; under the condition that the quantization flag represents not performing quantization, use the first error data of each pixel point in the any one pixel block as the quantization data of each pixel point in the any one pixel block.
[0086] For any one pixel block, the quantization flag can be determined according to the luminance compensation data of each pixel point in the pixel block. The quantization flag is a first flag or a second flag, where the first flag represents that the pixel block performs quantization, and the second flag represents that the pixel block does not perform quantization.
[0087] In an exemplary embodiment, determining a quantization identifier according to the brightness compensation data of each pixel point in any pixel block includes: determining at least one statistical parameter of an average value and a maximum value according to the brightness compensation data of each pixel point in any pixel block; if each statistical parameter is less than the corresponding parameter threshold, determining that the quantization identifier indicates that quantization is performed; if there is a statistical parameter that is not less than the corresponding parameter threshold, determining that the quantization identifier indicates that quantization is not performed.
[0088] If the statistical parameter includes an average value, calculate the average value according to the brightness compensation data of each pixel point in the pixel block; if the statistical parameter includes a maximum value, select the maximum brightness compensation data from the brightness compensation data of each pixel point in the pixel block. Taking a pixel block including 2×2 pixel points as an example, the average value satisfies: AVG(data0, data1, data2, data3), and the maximum value satisfies: MAX(data0, data1, data2, data3), where data0, data1, data2, and data3 sequentially represent the brightness compensation data of each pixel point in the pixel block.
[0089] The average value corresponds to one threshold, and the maximum value corresponds to another threshold, and these two thresholds may be the same or different. If the statistical parameter only includes an average value, then: when the average value is less than the corresponding threshold, determine that the quantization identifier is the first identifier; when the average value is greater than or equal to the corresponding threshold, determine that the quantization identifier is the second identifier. If the statistical parameter only includes a maximum value, then: when the maximum value is less than the corresponding threshold, determine that the quantization identifier is the first identifier; when the maximum value is greater than or equal to the corresponding threshold, determine that the quantization identifier is the second identifier. If the statistical parameter includes an average value and a maximum value, then: when the average value is less than the corresponding threshold and the maximum value is also less than the corresponding threshold, determine that the quantization identifier is the first identifier; when the average value is greater than or equal to the corresponding threshold, and / or, the maximum value is greater than or equal to the corresponding threshold, determine that the quantization identifier is the second identifier.
[0090] It can be understood that if the brightness compensation data of a pixel point includes data of at least one dimension, then: for each dimension, according to the above implementation principle, determine the statistical parameter of this dimension according to the data of each pixel point in the pixel block in this dimension. When the statistical parameters of each dimension are all less than the corresponding parameter threshold, determine that the quantization identifier is the first identifier; when there is a certain or certain dimensions whose statistical parameters are greater than or equal to the corresponding parameter thresholds, determine that the quantization identifier is the second identifier.
[0091] For example, the brightness compensation data of pixel points includes the data of offset_h, the data of offset_m, and the data of offset_l. Then, calculate the mean value and the maximum and minimum values according to the data of offset_h of each pixel point in the pixel block, calculate the mean value and the maximum and minimum values according to the data of offset_m of each pixel point in the pixel block, and calculate the mean value and the maximum and minimum values according to the data of offset_l of each pixel point in the pixel block. Finally, three mean values and three maximum and minimum values can be obtained. Different mean values correspond to different thresholds, and different maximum and minimum values also correspond to different thresholds. If each mean value is less than the corresponding threshold, and each maximum and minimum value is also less than the corresponding threshold, then determine the quantization identifier as the first identifier; if there is a mean value greater than or equal to the corresponding threshold, and / or, there is a maximum and minimum value greater than or equal to the corresponding threshold, then determine the quantization identifier as the second identifier.
[0092] When the quantization identifier is the first identifier, since the first identifier indicates to perform quantization, therefore, quantization can be performed on the pixel block. Specifically, the pixel block includes the clustering data corresponding to each pixel point, and each type of clustering data corresponds to a quantization parameter. Therefore, the quantization parameter corresponding to the clustering data in the pixel block can be selected from the quantization parameters of various clustering data to obtain the quantization parameter of the pixel block. The quantization parameter of the pixel block includes the quantization parameters of each pixel point in the pixel block. Subsequently, according to the quantization parameter of the pixel block, the first error data of each pixel point in the pixel block is quantized to obtain the quantization data of the pixel point.
[0093] In practical applications, the quantization method can be flexibly selected according to the situation. For example, when the first error data of the pixel points in the pixel block is an even number, directly quantize the first error data of the pixel point to obtain the quantization data of the pixel point. When the first error data of the pixel points in the pixel block is an odd number, first update the first error data of the pixel point according to the quantization parameter of the pixel point, and then quantize the updated first error data of the pixel point to obtain the quantization data of the pixel point.
[0094] When the quantization identifier is the second identifier, since the second identifier indicates not to perform quantization, therefore, the first error data of the pixel point can be directly used as the quantization data of the pixel point.
[0095] It should be noted that the quantization methods shown above are only exemplary, and the quantization method can be changed according to the actual situation. For example, when the first error data of each pixel point in the pixel block is an even number, the quantization identifier of the pixel block can be directly determined as the first identifier, that is, quantization is performed on the pixel block. When there is an odd number of first error data of pixel points in the pixel block, determine the quantization identifier of the pixel block according to the brightness compensation data of each pixel point in the pixel block to determine whether to perform quantization on the pixel block.
[0096] Determine statistical parameters based on the brightness compensation data of each pixel in the pixel block, and determine a quantization identifier according to the statistical parameters and a parameter threshold, that is, determine whether to perform quantization on the pixel block, so as to quantize the pixel block with a relatively small error in the overall brightness compensation data, reduce the error caused by quantization, and is beneficial to improving the accuracy of the encoded data. Moreover, the parameter threshold can be flexibly set according to the actual situation, which is beneficial to meeting the requirements of the compression ratio and achieving a balance between the data volume and accuracy of the brightness compensation data. That is, the embodiments of the present application can minimize the compression error while ensuring the compression ratio.
[0097] Step 204: Determine the encoded data of each pixel point based on the quantization data of each pixel point.
[0098] That is to say, for each pixel point, convert the quantization data of the pixel point into the corresponding encoded data. In practical applications, the implementation manner of step 204 can be flexibly changed. For example, if there are multiple types of quantization data, determine the frequency of each type of quantization data based on the quantization data of each pixel point, and determine the encoded data of each pixel point based on the frequency of each type of quantization data. The implementation principle is similar to the content of steps 2042 to 2043 described below, and will not be elaborated here.
[0099] In a possible implementation manner, the quantization data of the pixel point is a negative number or a non-negative number. Step 204 includes steps 2041 to 2043 (not shown in the figure).
[0100] Step 2041: Map the quantization data of each pixel point to the corresponding mapped data. The mapped data is a non-negative number, and there are multiple types of mapped data.
[0101] In the embodiments of the present application, if the quantization data of the pixel point is a non-negative number (i.e., a positive number or 0), then use the quantization data of the pixel point as the mapped data of the pixel point to ensure that the mapped data of this part of the pixel points is a non-negative number. If the quantization data of the pixel point is a negative number, then map the quantization data of the pixel point to a non-negative number according to a certain mapping method to obtain the mapped data of the pixel point, so as to ensure that the mapped data of this part of the pixel points is also a non-negative number. The mapping method is not limited herein. For example, the mapping method is: directly calculate the absolute value of the quantization data of the pixel point, or the mapping method is: add a specified value to the quantization data of the pixel point.
[0102] Exemplarily, assume that the quantization data of a pixel is within a numerical range that is symmetric about 0 on the left and right. For example, when the quantization data is 6b (bit) data, the range of the quantization data is from -63 to +63, that is, the numerical range is [-63, 63]. In this case, the quantization data in the range from -63 to -1 is added with 64 to obtain the mapped data, that is: Dp = D0 + 64 (D0 < 0); while the quantization data in the range from 0 to 63 is used as the mapped data, that is: Dp = D0 (D0 > 0 or D0 = 0). The obtained mapped data is within the data range from 0 to 63, that is, the numerical range is [0, 63]. It is a non - negative number. From the foregoing, one mapping method is: adding 2 to the quantization data of the pixel point n , to obtain the mapped data of the pixel point, where n is the bit width of the quantization data, and its unit can be bit.
[0103] By mapping the quantization data to the mapped data, the types of the mapped data are reduced, so that when determining the encoded data according to the frequencies of various mapped data subsequently, the determination efficiency can be accelerated and the encoding speed can be improved.
[0104] Step 2042: Based on the mapped data of each pixel point, determine the frequencies of various mapped data.
[0105] In this example, the total number of mapped data corresponding to the display screen is M (M is a positive integer). For example, if the mapped data is within the data range from 0 to 63 and the mapped data is an integer, there are 64 kinds of mapped data. The mapped data of any pixel point on the display screen is one of the M kinds of mapped data. For example, the mapped data of a pixel point on the display screen is 32. Based on this, for each kind of mapped data, the number of pixel points corresponding to the mapped data can be counted, and the frequency of the mapped data can be determined according to this number. For example, taking the number of pixel points corresponding to the mapped data as the frequency of the mapped data, or dividing the number of pixel points corresponding to the mapped data by the total number of pixel points on the display screen, and multiplying the division result by a specified number to obtain the frequency of the mapped data.
[0106] It should be noted that the quantization data is within a numerical range that is symmetric about 0 on the left and right. If the frequencies of various quantization data are statistically calculated based on the quantization data of each pixel point, generally, the frequencies of various quantization data show a characteristic distribution where the frequency at the center is the highest and the frequency is lower the farther away from the center. As Figure 6 shown in (1) of, taking the numerical range of the quantization data being [-63, 63] as an example, the frequency at the center, that is, 0, is the highest, and the farther away from 0 on both the left and right sides, the lower the frequency. The mapped data is within the numerical range of non - negative numbers. Determining the frequencies of various mapped data in the manner of step 2024, generally, the frequencies of various mapped data show a characteristic distribution where the frequency is higher the closer to both ends of the numerical range. As Figure 6As shown in (2) thereof, taking the case where the mapped data is within the numerical range of [0, 63] as an example, the closer to the left end of the numerical range, i.e., 0, the higher the frequency, and the closer to the right end of the numerical range, i.e., 63, the higher the frequency.
[0107] Step 2043: Determine the encoded data of each pixel point based on the frequencies of various mapped data.
[0108] In the embodiments of the present application, a tree structure can be determined based on the frequencies of various mapped data. The nodes of the tree structure include the frequencies of the mapped data, and the encoded data of each pixel point is determined according to the tree structure. In actual applications, the tree structure can be flexibly selected, and different tree structures result in different determination methods for the encoded data of pixel points. A possible tree structure and the determination method for the encoded data are shown below.
[0109] Taking the tree structure as a Huffman tree as an example, the encoded data can be called Huffman coding. As shown in 7, Figure 7 (1) thereof shows the mapped data and its frequency. Among them, the frequency of the mapped data is equal to the frequency of the mapped data divided by the total number of pixel points in the display screen. In actual applications, the tree structure can be directly determined based on the frequencies of various mapped data, or the frequencies of various mapped data can be first determined according to the frequencies of various mapped data, and then the tree structure can be determined based on the frequencies of various mapped data.
[0110] It is possible to first Figure 7 From the frequencies of various mapped data shown in (1) thereof, determine the two smallest frequencies, that is, determine the frequency "0.05" of the mapped data "2" and the frequency "0.1" of the mapped data "4", to obtain two nodes in the tree structure. These two nodes are located in Figure 7 the fifth layer of the tree structure shown in (2) thereof. Calculate the sum of the frequencies of these two nodes to obtain 0.15. In Figure 7 (1) thereof, replace the two frequencies determined in the previous step with 0.15, and then determine the two smallest frequencies therein, that is, determine the sum of the frequencies of the mapped data "2" and "4", which is "0.15", and the frequency "0.15" of the mapped data "3", to obtain another two nodes in the tree structure. These two nodes are located in Figure 7 the fourth layer of the tree structure shown in (2) thereof. Calculate the sum of the frequencies of these two nodes to obtain 0.3. In Figure 7 (1) thereof, replace the two frequencies determined in the previous step with 0.3, and then determine the two smallest frequencies therein, that is, determine the sum of the frequencies of the mapped data "2", "3", "4", which is "0.3", and the frequency "0.2" of the mapped data "0", to obtain another two nodes in the tree structure. These two nodes are located in Figure 7 the third layer of the tree structure shown in (2) thereof. Calculate the sum of the frequencies of these two nodes to obtain 0.5. InFigure 7 In (1) of [reference], replace the two frequencies determined in the previous step with 0.5, and then determine the two smallest frequencies among them, that is, determine the frequencies of mapping data "0", "2", "3", "4" and "0.5", and the frequency of mapping data "1" which is "0.5", to obtain another two nodes in the tree structure. These two nodes are located Figure 7 in the second layer of the tree structure shown in (2) of [reference]. Calculate the sum of the frequencies of these two nodes, getting 1. In Figure 7 in (1) of [reference], replace the two frequencies determined in the previous step with 1. At this time, Figure 7 in (1) of [reference], there is only the frequency "1" left. Take the frequency "1" as Figure 7 the root node of the tree structure shown in (2) of [reference].
[0111] Next, based on Figure 7 the tree structure shown in (2) of [reference], determine the Huffman codes of each node. Among them, the root node may or may not have a Huffman code. The Huffman code of each node can be expressed as [i, j], where i represents the mapping data corresponding to the node, and j represents the Huffman code corresponding to the mapping data. If the frequency of the node is the sum of the frequencies of at least two mapping data, that is, the node corresponds to at least two mapping data, then "i" in the Huffman code of the node can be omitted. In this case, the Huffman code of the node can be expressed as [, j].
[0112] Taking the case where the root node does not have a Huffman code as an example, in this example, determine the Huffman codes of each node except the root node in the tree structure in the order from top to bottom. First, determine the Huffman codes of each node in the second layer of the tree structure. For example, the Huffman codes of these two nodes are [, 1] and [1, 0] in sequence. For any node in a layer other than the second layer in the tree structure, the Huffman code of this node can be determined according to the Huffman code of the node in the previous layer corresponding to it. For example, according to the Huffman code [, 11] of the left node in the third layer, determine the Huffman codes of the two nodes in the fourth layer, which are [, 111] and [3, 110] respectively. Finally, the Huffman codes of each node in the tree structure are as shown in Figure 7 in (2) of [reference], and Figure 7 in (1) of [reference] also shows the Huffman codes of each mapping data.
[0113] In another possible implementation manner, step 2043 includes: determining a tree structure based on the frequencies of various mapping data, where the nodes of the tree structure include the frequencies of mapping data, and the number of layers of the tree structure is not greater than the layer threshold; determining the encoded data corresponding to the frequencies of various mapping data according to the tree structure; and determining the encoded data of each pixel point according to the encoded data corresponding to the frequencies of various mapping data.
[0114] In the embodiment of the present application, the number of layers of the tree structure is not greater than the layer number threshold. The method for determining the layer number threshold is not limited here. For example, the layer number threshold can be a value determined based on manual experience or a value determined randomly. For ease of description, a tree structure with a number of layers not greater than the layer number threshold is called a tree structure with a limited length.
[0115] Still taking the Huffman tree as an example, the tree structure with limited length can be called a Huffman tree with limited length, and its encoded data can be called a Huffman code with limited length. Figure 7 The mapping data and frequency shown in (1) are determined as follows Figure 7 The restricted length Huffman tree shown in (3) in . Compared with Figure 7 The Huffman tree shown in (2) in the figure is equivalent to: Figure 7 In the Huffman tree shown in (2), the two nodes of the fifth layer (i.e., nodes "0.05" and "0.1") are promoted to the fourth layer, and a node of the second layer (i.e., node "0.2") is transferred to the fourth layer, so that the nodes "0.05", "0.1", "0.2" and the original node "0.15" of the fourth layer appear in the fourth layer. In this way, the Figure 7 The number of layers of the Huffman tree shown in (2) in the equation is obtained. Figure 7 The restricted length Huffman tree shown in (3) reduces the number of layers of the Huffman tree.
[0116] Next, based on Figure 7 The tree structure shown in (3) in the figure is used to determine the Huffman code of each node. Taking the case where the root node does not have a Huffman code as an example, in this example, the Huffman code of each node in the tree structure except the root node is determined in order from top to bottom. First, the Huffman code of each node in the second layer of the tree structure is determined. For example, the Huffman codes of these two nodes are [, 1] and [1, 0], respectively. For a node in any layer of the tree structure except the second layer, the Huffman code of the node can be determined based on the Huffman code of the node in the previous layer corresponding to the node. For example, based on the Huffman code [, 11] of the left node in the third layer, the Huffman codes of the two nodes in the fourth layer are determined to be [2, 110] and [3, 111], respectively; based on the Huffman code [, 10] of the right node in the third layer, the Huffman codes of the two nodes in the fourth layer are determined to be [0, 100] and [4, 101], respectively. Finally, the Huffman code of the restricted length corresponding to each node in the restricted length tree structure is as follows: Figure 7 As shown in (3) in , and Figure 7 (1) in FIG. 1 also shows the Huffman coding of the restricted length of each mapping data.
[0117] Alternatively, for any target node corresponding to the frequency of mapped data, determine the encoded data corresponding to the frequency of any mapped data according to the layer number of the target layer where the target node is located and the position of the target node in the target layer.
[0118] Taking Figure 7 the tree structure shown in (4) therein as an example, this tree structure is a Huffman tree with a limited length. Taking the case where there is no Huffman code for the root node as an example, in this example, the Huffman codes of each node in the tree structure except the root node can be determined. For any layer in the tree structure, the Huffman code of the node can be determined according to the layer number and the position of the node in the layer. For example, for the fourth layer of the tree structure, based on the layer number being 4, it can be determined that the length of the Huffman code of each node in this layer is 3. For the first node in the fourth layer, determine the Huffman code of this node as [2, 100]; for the second node in the fourth layer, determine the Huffman code of this node as the Huffman code of the previous node plus 1, that is, the Huffman code of the second node in the fourth layer is [3, 101]; for the third node in the fourth layer, determine the Huffman code of this node as the Huffman code of the previous node plus 1, that is, the Huffman code of the third node in the fourth layer is [0, 110]; for the fourth node in the fourth layer, determine the Huffman code of this node as the Huffman code of the previous node plus 1, that is, the Huffman code of the fourth node in the fourth layer is [4, 111]. And so on, the Huffman codes of each node can be determined. For the convenience of distinction, the Huffman code in this example is called the normalized Huffman code. Finally, the normalized Huffman codes corresponding to each node in the tree structure with a limited length are as shown in Figure 7 (4) therein, and Figure 7 (1) therein also shows the normalized Huffman codes of each mapped data.
[0119] From the above determination method of the normalized Huffman code, it can be seen that for the target node, according to the layer number of the target layer where the target node is located, determine the length of the normalized Huffman code corresponding to the target node, and according to the length corresponding to the target node and its position in the target layer, determine the normalized Huffman code corresponding to the target node. Since there is no need to first determine the Huffman codes of each node in the tree structure except the root node in the order from top to bottom and then determine the Huffman code of the target node, but directly determine the normalized Huffman code corresponding to the target node according to the layer number of the target layer where the target node is located and its position in the target layer, therefore, the determination efficiency of the normalized Huffman code is higher, and the coding efficiency can be improved. Among them, the normalized Huffman code corresponding to the target node is the encoded data of the target node. Since the target node represents the frequency of the mapped data, the encoded data of the target node is also the encoded data corresponding to the frequency of the mapped data.
[0120] Since each pixel corresponds to a mapping data, therefore, by determining the coding data corresponding to the frequencies of various mapping data, the coding data of each pixel can be determined.
[0121] In a possible implementation, multiple pixels are divided into at least two pixel blocks. The encoding circuit of the embodiments of the present application is further configured to: store the compressed data of each pixel block in a memory, and the compressed data of the pixel block includes at least one of the following: a type identifier, which characterizes the types of content included in the compressed data of the pixel block; a prediction identifier, which characterizes the determination method of the target prediction result of the pixel block; a quantization identifier, which characterizes whether quantization is performed; and the coding data of each pixel in the pixel block.
[0122] As mentioned above, the embodiments of the present application do not limit the division method. Exemplarily, a pixel block includes 2×2 pixels. As Figure 8 shown in (1) below, the pixel block includes 2×2 pixels, and each pixel can be represented as (i, j), (i, j + 1), (i + 1, j), and (i + 1, j + 1) in sequence.
[0123] For each pixel block, the compressed data of the pixel block can be obtained. In practical applications, the content of the compressed data can be flexibly selected according to the situation. Optionally, the compressed data includes a type identifier (skip), and the type identifier characterizes the types of content included in the compressed data of the pixel block. For example, the type identifier can characterize whether the compressed data of the pixel block includes coding data. The compressed data can also include a prediction identifier (prediction vector), and the prediction identifier characterizes the determination method of the target prediction result of the pixel block, that is, the prediction identifier characterizes the prediction scheme. Optionally, the prediction identifier is the coding of the prediction scheme. For example, the prediction identifier is the coding of any one of the prediction schemes in Table 1. The compressed data can also include a quantization identifier (quantization), and the quantization identifier characterizes whether quantization is performed. Optionally, the quantization identifier is a first identifier or a second identifier. The first identifier characterizes that the pixel block performs quantization, and the second identifier characterizes that the pixel block does not perform quantization. The compressed data can also include the coding data of each pixel in the pixel block, and the coding data of the pixel includes any one of the Huffman coding of the pixel, the Huffman coding with a limited length, and the normalized Huffman coding.
[0124] Exemplarily, for Figure 8 the pixel block shown in (1) below, the compressed data of the pixel block is as Figure 8As shown in (2) therein. That is to say, the compressed data of the pixel block includes a type identifier skip, a prediction identifier prediction vector, a quantization identifier quantization, the encoded data data0 of pixel point (i, j), the encoded data data1 of pixel point (i, j + 1), the encoded data data2 of pixel point (i + 1, j), and the encoded data data3 of pixel point (i + 1, j + 1). Among them, as shown in Table 2, Table 2 shows various contents included in the compressed data and their description information.
[0125] Table 2
[0126]
[0127] From the above Table 2 and Figure 8 (2) therein, it can be seen that among the various contents included in the compressed data of the pixel block, the data volume occupied by the encoded data of the pixel points is the largest. The encoded data of the pixel points is at least 4b and can reach up to 48b at most. Optionally, if the pixel point corresponds to multiple channels and the encoded data of the pixel point includes the encoded data of each channel. For example, the pixel point corresponds to three channels of RGB (Red, Green, Blue), and the encoded data of the pixel point includes the encoded data of the R channel, the encoded data of the G channel, and the encoded data of the B channel. In this case, data mixing can be performed on the encoded data of each channel. In practical applications, the compressed data of each pixel block can be stored in a memory, and the type of the memory is not limited here. For example, the memory can be a Static Random-Access Memory (SRAM).
[0128] As Figure 9 shown, the encoding device is connected to the memory. The encoding device has five functions, which are, in sequence: prediction, quantization, statistics, encoding, and mixing. Among them, the prediction function is used to determine the target prediction data of each pixel point, the quantization function is used to determine the quantization data of each pixel point based on the target prediction data of each pixel point, the statistics function is used to count each frequency based on the quantization data of each pixel point, the encoding function is used to determine the encoded data of each pixel point based on each frequency, and the mixing function is used to perform data mixing on the encoded data of each channel when the encoded data of the pixel point includes the encoded data of multiple channels. The encoding device can generate the compressed data of the pixel block based on the above functions and input the compressed data of the pixel block into the memory to store the compressed data through the memory.
[0129] In the above encoding circuit, since the clustering data corresponding to a pixel point represents the clustering cluster to which the brightness compensation data of the pixel point belongs, therefore, determining the quantization parameter of any clustering data according to the brightness compensation data of each pixel point corresponding to any clustering data and the brightness compensation data of each pixel point corresponding to the adjacent clustering data is equivalent to determining the quantization parameter of any clustering data according to the data distribution that any clustering data conforms to and the data distribution that the adjacent clustering data conforms to. Subsequently, when determining the quantization data of each pixel point according to the quantization parameters of various clustering data, the quantization data of the clustering data can be made to approach the quantization data of the adjacent clustering data that is closer to the data distribution that the clustering data conforms to, reducing the error of the quantization data, thereby improving the accuracy of the encoded data.
[0130] As Figure 10 shown, an embodiment of the present application provides a display chip, and the type of the display chip is not limited herein. The display chip includes a decoding circuit 20, and the structure of the decoding circuit 20 is not limited herein. Among them, the decoding circuit 20 is configured to perform the steps as Figure 11 shown.
[0131] Step 1101, obtain the encoded data of multiple pixel points to be decoded.
[0132] Among them, the obtaining method of the encoded data of the pixel point can be seen in the above description of the encoding device, and will not be elaborated here.
[0133] In a possible implementation manner, the decoding circuit 20 is further configured to: read the compressed data of each pixel block from the memory, and the compressed data of the pixel block includes at least one of the following: a type identifier, which is used to determine the encoded data of each pixel point in the pixel block; a prediction identifier, which is used to determine the target prediction data of each pixel point in the pixel block; a quantization identifier, which is used to combine the quantization data of each pixel point to determine the second error data of each pixel point; the encoded data of each pixel point in the pixel block.
[0134] In this example, the decoding circuit 20 can read the compressed data of each pixel block from the memory, and the content of the compressed data has a corresponding description above, and will not be elaborated here.
[0135] Among them, the type identifier skip represents the types of content included in the compressed data of the pixel block. For example, the type identifier can represent whether the compressed data of the pixel block includes encoded data. Optionally, skip = 1 indicates that the encoded data of each pixel point in the pixel block is 0, and the pixel block only includes skip and the prediction vector prediction vector. That is, skip = 1 indicates that the compressed data of the pixel block does not include encoded data. In this case, the decoding circuit 20 directly determines that the encoded data of each pixel point in the pixel block is 0. skip = 0 indicates that the pixel block includes skip, prediction vector, quantization identifier quantization, and the encoded data of each pixel point in the pixel block. That is, skip = 0 indicates that the compressed data of the pixel block includes encoded data. In this case, the decoding circuit 20 determines the encoded data of each pixel point in the pixel block from the compressed data of the pixel block.
[0136] Step 1102: Determine the quantization data of each pixel point according to the encoded data of multiple pixel points.
[0137] As mentioned above, the encoding circuit 10 can determine the encoded data of each pixel point based on the frequencies of various mapping data (or quantization data). That is, each encoded data corresponds to a mapping data (or quantization data). Based on this, the decoding circuit 20 can map the encoded data of each pixel point to the mapping data (or quantization data) of each pixel point based on the correspondence between the encoded data and the mapping data. And since the encoding circuit 10 maps the quantization data of each pixel point to the corresponding mapping data, the decoding circuit 20 can map the mapping data of each pixel point to the quantization data of each pixel point based on the correspondence between the quantization data and the mapping data.
[0138] In a possible implementation, step 1102 includes: determining the mapping data of each pixel point according to the encoded data of each pixel point, where the mapping data is a non - negative number; mapping the mapping data of each pixel point to the quantization data of each pixel point, where the quantization data is a negative number or a non - negative number.
[0139] Optionally, the compressed data of the pixel block can include the mapping identifier of each pixel point, and the mapping identifier of the pixel point is used to represent whether the pixel point performs mapping. If the mapping identifier of the pixel point represents that the pixel point performs mapping, it means that the encoding circuit 10 maps the quantization data of the pixel point to the corresponding mapping data. In this case, the decoding circuit 20 performs the inverse operation of the encoding circuit 10 and maps the mapping data of each pixel point to the quantization data of each pixel point. If the mapping identifier of the pixel point represents that the pixel point does not perform mapping, it means that the encoding circuit 10 uses the quantization data of the pixel point as the corresponding mapping data. In this case, the decoding circuit 20 uses the mapping data of each pixel point as the corresponding quantization data.
[0140] Step 1103: Determine the reconstruction data of each pixel point according to the quantization data of each pixel point. The reconstruction data of a pixel point represents the cluster to which the brightness compensation data of the pixel point belongs.
[0141] As mentioned above, the encoding circuit 10 can determine the quantization data of each pixel point according to the clustering data corresponding to multiple pixel points. Based on this, the decoding circuit 20 can reconstruct the quantization data of the pixel points based on the quantization data of each pixel point.
[0142] In a possible implementation, step 1103 includes: obtaining the target prediction data of each pixel point; determining the second error data of each pixel point according to the quantization data of each pixel point; and determining the reconstruction data of each pixel point according to the second error data and the target prediction data of each pixel point.
[0143] In this example, the compressed data of the pixel block includes a prediction identifier prediction vector. The decoding circuit 20 can extract the prediction identifier from the compressed data and determine the prediction scheme based on the prediction identifier. For example, the prediction scheme is the prediction scheme numbered 01 in Table 1. Then, according to the prediction scheme indicated by the prediction identifier, determine the target prediction data of each pixel point. The implementation method can be seen in the above description and will not be elaborated here.
[0144] In addition, the compressed data includes a quantization identifier, which is used to indicate whether quantization is performed. If the quantization identifier indicates that quantization is not performed, the quantization data of the pixel point is used as the second error data of the pixel point; if the quantization identifier indicates that quantization is performed, the quantization data of the pixel point is dequantized to obtain the second error data of the pixel point. Optionally, multiply the quantization data of the pixel point by 2 to obtain the second error data of the pixel point.
[0145] After that, add the second error data and the target prediction data of the pixel point to obtain the reconstruction data of the pixel point. It should be noted that if the second error data of the pixel point is 0, or the second error data of the pixel point is the same as the first error data, the reconstruction data of the pixel point is equal to the prediction data of the pixel point; if the second error data of the pixel point is not 0 and is different from the first error data of the pixel point, the reconstruction data of the pixel point is different from the clustering data corresponding to the pixel point.
[0146] Such as Figure 9As shown, the display chip is connected to the memory. The display chip has five functions, which are, in sequence: de-mixing, decoding, prediction, de-quantization, and reconstruction. Among them, the memory is used to store compressed data. The display chip can read the compressed data from the memory and decode the compressed data of the pixel blocks based on the above functions to obtain reconstructed data. Among them, the mixing function is used to de-mix the multi-channel data after data mixing when the compressed data includes the multi-channel data after data mixing, so as to obtain multi-channel encoded data. The decoding function is used to determine the quantization data of each pixel point based on the encoded data of each pixel point. The de-quantization function is used to de-quantize the quantization data of each pixel point to obtain the second error data of each pixel point. The prediction function is used to determine the target prediction data of each pixel point. The reconstruction function is used to reconstruct the reconstructed data of each pixel point based on the second error data and the target prediction data of each pixel point.
[0147] Step 1104: Determine the brightness compensation data of each pixel point according to the reconstructed data of each pixel point.
[0148] As mentioned in the content of step 201, the encoding circuit 10 can cluster the brightness compensation data of each pixel point to obtain multiple clustering clusters. In this example, for any clustering cluster, the encoding circuit 10 determines the average value according to the brightness compensation data of each pixel point in the clustering cluster, and this average value can represent the clustering center of the clustering cluster. Store the clustering data representing the clustering cluster and its corresponding average value in the memory.
[0149] After the decoding circuit 20 determines the reconstructed data of each pixel point, since the reconstructed data of the pixel point represents a clustering cluster, the clustering data representing the clustering cluster is the reconstructed data of the pixel point. For the reconstructed data of any pixel point, the decoding circuit 20 reads the reconstructed data and its corresponding average value from the memory, and this average value is the brightness compensation data of the pixel point.
[0150] The above decoding circuit determines the quantization data of each pixel point according to the encoded data of multiple pixel points, and determines the reconstructed data of each pixel point according to the quantization data of each pixel point, so as to decode the encoded data of the pixel point and reconstruct the clustering cluster to which the brightness compensation data of the pixel point belongs, so that the brightness of the display screen can be compensated according to the brightness compensation data of the pixel point, and the Mura phenomenon can be solved.
[0151] As Figure 2 shown, an embodiment of the present application provides an encoding method, which is executed by an encoding circuit, and the encoding method includes the following steps.
[0152] Step 201: Obtain the clustering data corresponding to multiple pixel points on the display screen. The clustering data corresponding to the pixel point represents the clustering cluster to which the brightness compensation data of the pixel point belongs, and there are multiple types of clustering data.
[0153] Step 202: Determine the quantization parameter of any one of the multiple clustering data according to the brightness compensation data of each pixel point corresponding to any one of the multiple clustering data and the brightness compensation data of each pixel point corresponding to the adjacent clustering data, where the adjacent clustering data is the clustering data that satisfies the adjacent condition with any one of the multiple clustering data.
[0154] Step 203: Determine the quantization data of each pixel point according to the quantization parameters of various clustering data.
[0155] Step 204: Determine the coding data of each pixel point based on the quantization data of each pixel point.
[0156] In a possible implementation, the adjacent clustering data includes the first clustering data and the second clustering data; Step 202 includes: Determine the first distance according to the brightness compensation data of each pixel point corresponding to any one of the clustering data and the brightness compensation data of each pixel point corresponding to the first clustering data, where the first distance represents the error of the brightness compensation data between any one of the clustering data and the first clustering data; Determine the second distance according to the brightness compensation data of each pixel point corresponding to any one of the clustering data and the brightness compensation data of each pixel point corresponding to the second clustering data, where the second distance represents the error of the brightness compensation data between any one of the clustering data and the second clustering data; Determine the quantization parameter of any one of the clustering data according to the first distance and the second distance.
[0157] In a possible implementation, Step 203 includes: Determine the target prediction data of each pixel point according to the clustering data corresponding to multiple pixel points; Calculate the first error data between the target prediction data of each pixel point and the clustering data; Determine the quantization data of each pixel point according to the quantization parameters of various clustering data and the first error data of each pixel point.
[0158] In a possible implementation, determining the target prediction data of each pixel point according to the clustering data corresponding to multiple pixel points includes: Divide multiple pixel points to obtain at least two pixel blocks, where a pixel block includes at least two pixel points; For any one of the at least two pixel blocks, obtain at least two candidate prediction results of any one of the pixel blocks, and based on the clustering data corresponding to each pixel point in any one of the pixel blocks, select the target prediction result from the at least two candidate prediction results, where the target prediction result includes the target prediction data of each pixel point in any one of the pixel blocks.
[0159] In a possible implementation, the candidate prediction result includes the candidate prediction data of each pixel point in any one of the pixel blocks; Selecting the target prediction result from the at least two candidate prediction results based on the clustering data corresponding to each pixel point in any one of the pixel blocks includes:
[0160] For any one of at least two candidate prediction results, based on the candidate prediction data and clustering data of each pixel point in any one of the candidate prediction results, determine a third distance, where the third distance characterizes the error between the candidate prediction data and the clustering data in any one of the candidate prediction results;
[0161] Select, from at least two candidate prediction results, the candidate prediction result corresponding to the smallest third distance as the target prediction result.
[0162] In a possible implementation, multiple pixel points are divided into at least two pixel blocks; according to the quantization parameters of various clustering data and the first error data of each pixel point, determine the quantization data of each pixel point, including:
[0163] For any one of at least two pixel blocks, determine a quantization identifier according to the brightness compensation data of each pixel point in any one of the pixel blocks, where the quantization identifier characterizes whether quantization is performed;
[0164] Under the condition that the quantization identifier indicates that quantization is to be performed, select the quantization parameter of any one of the pixel blocks from the quantization parameters of various clustering data, and according to the quantization parameter of any one of the pixel blocks, quantize the first error data of each pixel point in any one of the pixel blocks to obtain the quantization data of each pixel point in any one of the pixel blocks;
[0165] Under the condition that the quantization identifier indicates that quantization is not to be performed, use the first error data of each pixel point in any one of the pixel blocks as the quantization data of each pixel point in any one of the pixel blocks.
[0166] In a possible implementation, determining the quantization identifier according to the brightness compensation data of each pixel point in any one of the pixel blocks includes:
[0167] Determine at least one statistical parameter such as the mean value and the maximum and minimum values according to the brightness compensation data of each pixel point in any one of the pixel blocks;
[0168] If each statistical parameter is less than the corresponding parameter threshold, determine that the quantization identifier indicates that quantization is to be performed;
[0169] If there is a statistical parameter not less than the corresponding parameter threshold, determine that the quantization identifier indicates that quantization is not to be performed.
[0170] In a possible implementation, the quantization data of a pixel point is negative or non - negative; based on the quantization data of each pixel point, determine the coding data of each pixel point, including:
[0171] Map the quantization data of each pixel point to the corresponding mapped data, where the mapped data is non - negative and there are multiple types of mapped data;
[0172] Based on the mapped data of each pixel point, determine the frequencies of various mapped data;
[0173] Determine the encoded data of each pixel point based on the frequencies of various mapping data.
[0174] In a possible implementation, determining the encoded data of each pixel point based on the frequencies of various mapping data includes:
[0175] Determine a tree structure based on the frequencies of various mapping data, where the nodes of the tree structure include the frequencies of the mapping data, and the number of layers of the tree structure is not greater than the layer threshold;
[0176] Determine the encoded data corresponding to the frequencies of various mapping data according to the tree structure;
[0177] Determine the encoded data of each pixel point according to the encoded data corresponding to the frequencies of various mapping data.
[0178] In a possible implementation, multiple pixel points are divided into at least two pixel blocks; the circuit is further configured to:
[0179] Store the compressed data of each pixel block in a memory, where the compressed data of the pixel block includes at least one of the following:
[0180] Type identifier, which represents the types of content included in the compressed data of the pixel block;
[0181] Prediction identifier, which represents the determination method of the target prediction result of the pixel block;
[0182] Quantization identifier, which represents whether quantization is performed;
[0183] The encoded data of each pixel point in the pixel block.
[0184] It should be understood that the above method embodiments and the content executed by the encoding device belong to the same concept. For the specific implementation process, please refer to the method embodiments and will not be elaborated here.
[0185] In the above encoding method, since the clustering data corresponding to the pixel point represents the clustering cluster to which the brightness compensation data of the pixel point belongs, therefore, according to the brightness compensation data of each pixel point corresponding to any clustering data and the brightness compensation data of each pixel point corresponding to the adjacent clustering data, determining the quantization parameter of any clustering data is equivalent to determining the quantization parameter of any clustering data according to the data distribution that any clustering data conforms to and the data distribution that the adjacent clustering data conforms to. Subsequently, when determining the quantization data of each pixel point according to the quantization parameters of various clustering data, the quantization data of the clustering data can be made to approach the quantization data of the adjacent clustering data that is closer to the data distribution that the clustering data conforms to, reducing the error of the quantization data, thereby improving the accuracy of the encoded data.
[0186] Such asFigure 11 As shown in Figure 11 , an embodiment of the present application provides a decoding method, which is executed by a decoding circuit, and the decoding method includes the following steps.
[0187] Step 1101: Obtain the encoded data of multiple pixel points to be decoded.
[0188] Step 1102: Determine the quantization data of each pixel point according to the encoded data of the multiple pixel points.
[0189] Step 1103: Determine the reconstructed data of each pixel point according to the quantization data of each pixel point. The reconstructed data of the pixel point represents the cluster to which the brightness compensation data of the pixel point belongs.
[0190] Step 1104: Determine the brightness compensation data of each pixel point according to the reconstructed data of each pixel point.
[0191] In a possible implementation manner, determining the quantization data of each pixel point according to the encoded data of the multiple pixel points includes:
[0192] Determine the mapping data of each pixel point according to the encoded data of each pixel point. The mapping data is a non-negative number;
[0193] Map the mapping data of each pixel point to the quantization data of each pixel point. The quantization data is a negative number or a non-negative number.
[0194] In a possible implementation manner, determining the reconstructed data of each pixel point according to the quantization data of each pixel point includes:
[0195] Obtain the target prediction data of each pixel point;
[0196] Determine the second error data of each pixel point according to the quantization data of each pixel point;
[0197] Determine the reconstructed data of each pixel point according to the second error data and the target prediction data of each pixel point.
[0198] In a possible implementation manner, the method further includes:
[0199] Read the compressed data of each pixel block from the memory. The compressed data of the pixel block includes at least one of the following:
[0200] Type identifier, which is used to determine the encoded data of each pixel point in the pixel block;
[0201] Prediction identifier, which is used to determine the target prediction data of each pixel point in the pixel block;
[0202] A quantization identifier, which is used to determine the second error data of each pixel point in combination with the quantization data of each pixel point;
[0203] The encoded data of each pixel point in the pixel block.
[0204] It should be understood that the above method embodiments and the content executed by the display chip belong to the same concept. For the specific implementation process, please refer to the method embodiments and will not be elaborated here.
[0205] The above decoding method determines the quantization data of each pixel point according to the encoded data of multiple pixel points, and determines the reconstruction data of each pixel point according to the quantization data of each pixel point, so as to decode the encoded data of the pixel point and reconstruct the clustering cluster to which the brightness compensation data of the pixel point belongs. Therefore, the brightness of the display screen can be compensated according to the brightness compensation data of the pixel point, and the Mura phenomenon can be solved.
[0206] Such as Figure 12 shown, an embodiment of the present application also provides an electronic device. The electronic device includes a display chip 1201, and the display chip 1201 is configured to execute a decoding method related to Figure 11 . Optionally, the electronic device further includes a memory, or the display chip 1201 includes a memory. The memory is used to store the encoded data, and the display chip 1201 is used to read the stored encoded data from the memory and execute a decoding method related to Figure 11 based on the encoded data.
[0207] It should be understood that "a plurality of" mentioned herein refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after.
[0208] The above serial numbers of the embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.
[0209] The above are only exemplary embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the principle of the present application shall be included in the protection scope of the present application.
Claims
1. A coding device, characterized in that: The encoding device comprises an encoding circuit, wherein the encoding circuit is configured to: Acquire clustering data corresponding to a plurality of pixel points on a display screen, wherein the clustering data corresponding to the pixel points represents a cluster cluster to which brightness compensation data of the pixel points belongs, and the clustering data is of multiple types; Determining a quantization parameter of any cluster data according to brightness compensation data of each pixel point corresponding to any cluster data among the plurality of cluster data and brightness compensation data of each pixel point corresponding to adjacent cluster data, wherein the adjacent cluster data is cluster data among the plurality of cluster data that meets an adjacent condition with the any cluster data; Determine the quantitative data of each pixel point according to the quantitative parameters of various clustering data; Based on the quantized data of each pixel point, the coded data of each pixel point is determined.
2. The device according to claim 1, characterized in that The adjacent cluster data includes first cluster data and second cluster data; the determining of the quantization parameter of any cluster data according to the brightness compensation data of each pixel point corresponding to any cluster data among the plurality of cluster data and the brightness compensation data of each pixel point corresponding to the adjacent cluster data includes: Determine a first distance according to brightness compensation data of each pixel point corresponding to any one of the cluster data and brightness compensation data of each pixel point corresponding to the first cluster data, wherein the first distance represents an error in brightness compensation data between the any one of the cluster data and the first cluster data; Determine a second distance according to brightness compensation data of each pixel point corresponding to any one of the cluster data and brightness compensation data of each pixel point corresponding to the second cluster data, wherein the second distance represents an error in brightness compensation data between the any one of the cluster data and the second cluster data; A quantization parameter of any clustering data is determined according to the first distance and the second distance.
3. The device according to claim 1, characterized in that The step of determining the quantized data of each pixel point according to the quantized parameters of various clustering data includes: Determining target prediction data for each pixel point according to clustering data corresponding to the plurality of pixel points; Calculating first error data between target prediction data and cluster data of each pixel point; The quantization data of each pixel point is determined according to the quantization parameters of various clustering data and the first error data of each pixel point.
4. The device according to claim 3, characterized in that The step of determining target prediction data of each pixel point according to the clustering data corresponding to the plurality of pixel points comprises: Dividing the plurality of pixel points to obtain at least two pixel blocks, wherein the pixel block includes at least two pixel points; For any pixel block among the at least two pixel blocks, at least two candidate prediction results of the any pixel block are obtained, and based on the clustering data corresponding to each pixel point in the any pixel block, a target prediction result is selected from the at least two candidate prediction results, wherein the target prediction result includes the target prediction data of each pixel point in the any pixel block.
5. The device according to claim 4, characterized in that The candidate prediction results include candidate prediction data of each pixel point in any one of the pixel blocks; and selecting a target prediction result from the at least two candidate prediction results based on cluster data corresponding to each pixel point in any one of the pixel blocks includes: For any candidate prediction result of the at least two candidate prediction results, determining a third distance based on candidate prediction data and cluster data of each pixel point in the any candidate prediction result, the third distance representing an error between the candidate prediction data and the cluster data in the any candidate prediction result; From the at least two candidate prediction results, select the candidate prediction result corresponding to the smallest third distance as the target prediction result.
6. The device according to claim 3, characterized in that The plurality of pixels are divided into at least two pixel blocks; and the quantization data of each pixel is determined according to the quantization parameters of various clustering data and the first error data of each pixel, including: For any pixel block of the at least two pixel blocks, determining a quantization flag according to brightness compensation data of each pixel point in the any pixel block, the quantization flag indicating whether to perform quantization; Under the condition that the quantization identifier represents the execution of quantization, selecting a quantization parameter of the any pixel block from the quantization parameters of the various clustering data, and quantizing the first error data of each pixel point in the any pixel block according to the quantization parameter of the any pixel block to obtain quantization data of each pixel point in the any pixel block; Under the condition that the quantization flag indicates that quantization is not to be performed, the first error data of each pixel point in any pixel block is used as the quantization data of each pixel point in any pixel block.
7. The device according to claim 6, characterized in that The step of determining the quantization flag according to the brightness compensation data of each pixel point in any pixel block includes: Determine at least one statistical parameter of a mean value and a maximum value according to the brightness compensation data of each pixel point in any pixel block; If all statistical parameters are less than the corresponding parameter thresholds, determining that the quantization flag indicates that quantization is being performed; If there is a statistical parameter that is not less than the corresponding parameter threshold, it is determined that the quantization flag indicates that quantization is not performed.
8. The device according to any one of claims 1 to 7, characterized in that: The quantized data of the pixel point is a negative number or a non-negative number; and determining the encoding data of each pixel point based on the quantized data of each pixel point includes: Mapping the quantized data of each pixel point into corresponding mapping data, wherein the mapping data is a non-negative number and the mapping data is of multiple types; Based on the mapping data of each pixel point, determining the frequency of various mapping data; Based on the frequencies of the various mapping data, the encoding data of each pixel is determined.
9. The device according to claim 8, characterized in that The determining the encoding data of each pixel point based on the frequency of the various mapping data includes: Determine a tree structure based on the frequencies of the various mapping data, the nodes of the tree structure include the frequencies of the mapping data, and the number of layers of the tree structure is not greater than a layer number threshold; Determine the coded data corresponding to the frequencies of various mapping data according to the tree structure; The encoding data of each pixel point is determined according to the encoding data corresponding to the frequencies of the various mapping data.
10. A display chip, characterized in that: The display chip includes a decoding circuit, and the decoding circuit is configured as follows: Obtaining encoded data of a plurality of pixels to be decoded; Determining quantized data of each pixel point according to the coded data of the plurality of pixel points; Determining reconstruction data of each pixel point according to the quantized data of each pixel point, wherein the reconstruction data of the pixel point represents the cluster to which the brightness compensation data of the pixel point belongs; The brightness compensation data of each pixel point is determined according to the reconstructed data of each pixel point; the brightness compensation data is used to perform brightness compensation processing on the image data to be displayed.
11. The chip according to claim 10, characterized in that: The step of determining the quantized data of each pixel point according to the coded data of the plurality of pixel points comprises: Determine mapping data of each pixel point according to the encoding data of each pixel point, wherein the mapping data is a non-negative number; The mapping data of each pixel point is mapped into quantized data of each pixel point, where the quantized data is a negative number or a non-negative number.
12. The chip according to claim 10, characterized in that: Determining the reconstruction data of each pixel point according to the quantized data of each pixel point includes: Obtain target prediction data for each pixel; Determine second error data of each pixel point according to the quantized data of each pixel point; The reconstructed data of each pixel point is determined according to the second error data and the target prediction data of each pixel point.
13. A coding method, characterized in that: The method comprises: Acquire clustering data corresponding to a plurality of pixel points on a display screen, wherein the clustering data corresponding to the pixel points represents a cluster cluster to which brightness compensation data of the pixel points belongs, and the clustering data is of multiple types; Determining a quantization parameter of any cluster data according to brightness compensation data of each pixel point corresponding to any cluster data among the plurality of cluster data and brightness compensation data of each pixel point corresponding to adjacent cluster data, wherein the adjacent cluster data is cluster data among the plurality of cluster data that meets an adjacent condition with the any cluster data; Determine the quantitative data of each pixel point according to the quantitative parameters of various clustering data; Based on the quantized data of each pixel point, the coded data of each pixel point is determined.
14. The method according to claim 13, characterized in that The adjacent cluster data includes first cluster data and second cluster data; the determining of the quantization parameter of any cluster data according to the brightness compensation data of each pixel point corresponding to any cluster data among the plurality of cluster data and the brightness compensation data of each pixel point corresponding to the adjacent cluster data includes: Determine a first distance according to brightness compensation data of each pixel point corresponding to any one of the cluster data and brightness compensation data of each pixel point corresponding to the first cluster data, wherein the first distance represents an error in brightness compensation data between the any one of the cluster data and the first cluster data; Determine a second distance according to brightness compensation data of each pixel point corresponding to any one of the cluster data and brightness compensation data of each pixel point corresponding to the second cluster data, wherein the second distance represents an error in brightness compensation data between the any one of the cluster data and the second cluster data; A quantization parameter of any clustering data is determined according to the first distance and the second distance.
15. The method according to claim 13 or 14, characterized in that The quantized data of the pixel point is a negative number or a non-negative number; and determining the encoding data of each pixel point based on the quantized data of each pixel point includes: Mapping the quantized data of each pixel point into corresponding mapping data, wherein the mapping data is a non-negative number and the mapping data is of multiple types; Based on the mapping data of each pixel point, determining the frequency of various mapping data; Based on the frequencies of the various mapping data, the encoding data of each pixel is determined.
16. The method according to claim 15, characterized in that The determining the encoding data of each pixel point based on the frequency of the various mapping data includes: Determine a tree structure based on the frequencies of the various mapping data, the nodes of the tree structure include the frequencies of the mapping data, and the number of layers of the tree structure is not greater than a layer number threshold; Determine the coded data corresponding to the frequencies of various mapping data according to the tree structure; The encoding data of each pixel point is determined according to the encoding data corresponding to the frequencies of the various mapping data.
17. A decoding method, characterized in that: The method comprises: Obtaining encoded data of a plurality of pixels to be decoded; Determining quantized data of each pixel point according to the coded data of the plurality of pixel points; Determining reconstruction data of each pixel point according to the quantized data of each pixel point, wherein the reconstruction data of the pixel point represents the cluster to which the brightness compensation data of the pixel point belongs; The brightness compensation data of each pixel point is determined according to the reconstructed data of each pixel point.
18. An electronic device, characterized in that: The electronic device comprises the encoding device according to any one of claims 1 to 9 or the display chip according to any one of claims 10 to 12.