Data compression method and device, electronic equipment and storage medium
By precoding the pixel block brightness correction data of the OLED screen and determining the target compression parameters, the problem of uneven screen brightness is solved, and the data volume is reduced and the brightness uniformity is achieved.
Patent Information
- Application Number
- CN202510253443.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-04
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2045-03-04
AI Technical Summary
The problem of uneven brightness of the display panel of OLED screens leads to huge amount of pixel-level brightness correction data and requires compression, but when the existing technology is difficult to effectively compress, it leads to uneven brightness.
By precoding the brightness correction data corresponding to the pixel blocks in the target area, the initial compression parameters and data damage information are determined, the target compression parameters are determined based on the data damage information and the initial compression parameters, and the brightness correction data is compressed based on the target compression parameters.
Reduce the difference in data damage between different pixel blocks, and avoid serious data damage in some pixel blocks, while minor data damage in some pixel blocks, thereby ensuring the uniformity of compressed brightness correction data to screen brightness.
Smart Images

Figure CN120111213A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of data compression, and in particular to a data compression method, device, electronic device and storage medium. Background Art
[0002] Organic Light-Emitting Diode (OLED) screens are prone to uneven brightness of the display panel due to the limitations of the manufacturing process. Therefore, before the screen leaves the factory, the brightness correction data corresponding to each pixel in the screen is usually determined, and then when the screen displays the picture, the brightness correction data is used to perform pixel-level brightness correction on the displayed picture. However, the amount of pixel-level brightness correction data is very large and usually needs to be compressed. Summary of the invention
[0003] The present disclosure aims to solve one of the technical problems in the related art at least to some extent.
[0004] The first embodiment of the present disclosure provides a data compression method, including:
[0005] Pre-encoding brightness correction data corresponding to a pixel block in a target area, and determining initial compression parameters and data damage information corresponding to the pixel block;
[0006] Determining a target compression parameter corresponding to the pixel block according to the data damage information corresponding to the pixel block and the initial compression parameter;
[0007] The brightness correction data corresponding to the pixel block is compressed based on the target compression parameter corresponding to the pixel block.
[0008] A second aspect of the present disclosure provides a data compression device, including:
[0009] A first determination module is used to pre-code brightness correction data corresponding to a pixel block in a target area, and determine initial compression parameters and data damage information corresponding to the pixel block;
[0010] A second determination module, configured to determine a target compression parameter corresponding to the pixel block according to the data damage information corresponding to the pixel block and the initial compression parameter;
[0011] The compression module is used to compress the brightness correction data corresponding to the pixel block based on the target compression parameter corresponding to the pixel block.
[0012] The third aspect of the present disclosure provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the data compression method provided in the first aspect of the present disclosure is implemented.
[0013] The fourth aspect embodiment of the present disclosure proposes a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the data compression method proposed in the first aspect embodiment of the present disclosure is implemented.
[0014] The fifth aspect of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the data compression method proposed in the first aspect of the present disclosure.
[0015] The sixth aspect embodiment of the present disclosure provides a chip, including a processing unit and an interface circuit, wherein the processing unit obtains program instructions through the interface circuit, and the program instructions are executed by the processing unit, and the processing unit is used to execute the data compression method proposed in the first aspect embodiment of the present disclosure.
[0016] The data compression method, device, electronic device and storage medium provided by the present disclosure have the following beneficial effects:
[0017] In the disclosed embodiment, the brightness correction data corresponding to the pixel blocks in the target area are pre-encoded to determine the initial compression parameters and data damage information corresponding to the pixel blocks; the target compression parameters corresponding to the pixel blocks are determined according to the data damage information and the initial compression parameters corresponding to the pixel blocks; and the brightness correction data corresponding to the pixel blocks are compressed based on the target compression parameters corresponding to the pixel blocks. Thus, the initial compression parameters corresponding to each pixel block can be adjusted based on the data damage information between the brightness correction data before compression corresponding to the pixel blocks and the brightness correction data after compression to obtain the target compression parameters, thereby reducing the difference in data damage between different pixel blocks, avoiding that the data damage of some pixel blocks is more serious and the data damage of a certain pixel block is less serious, thereby avoiding the uneven brightness between the pixel blocks after the brightness of the pixel blocks is corrected based on the compressed brightness correction data. While compressing the brightness correction data to reduce the amount of data, the brightness uniformity between different pixel blocks is guaranteed after the brightness of the screen is corrected based on the compressed brightness correction data.
[0018] Additional aspects and advantages of the present disclosure will be given in part in the following description and in part will be obvious from the following description or learned through practice of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The above and / or additional aspects and advantages of the present disclosure will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0020] Figure 1 A flowchart of a data compression method provided by an embodiment of the present disclosure;
[0021] Figure 2 A flowchart of a data compression method provided by another embodiment of the present disclosure;
[0022] Figure 3 A flowchart of a data compression method provided by another embodiment of the present disclosure;
[0023] Figure 4 A schematic diagram of the structure of a data compression device provided by another embodiment of the present disclosure;
[0024] Figure 5 A block diagram of an exemplary electronic device suitable for implementing the embodiments of the present disclosure is shown;
[0025] Figure 6 It is a schematic diagram of the structure of the chip proposed in the embodiment of the present disclosure. DETAILED DESCRIPTION
[0026] Some embodiments of the present disclosure will be described in detail here, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. Various changes, modifications and equivalents of the methods, devices and / or systems described herein will become apparent after understanding the present disclosure. For example, the order of operations described herein is merely an example and is not limited to those orders set forth herein, but can be changed as becomes apparent after understanding the present disclosure, except for operations that must be performed in a specific order. In addition, for clarity and brevity, descriptions of features known in the art may be omitted.
[0027] The embodiments described in some embodiments of the present disclosure below do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0028] In the related art, the screen can be divided into different pixel blocks, and the brightness correction data corresponding to each pixel block can be compressed respectively, so as to improve the compression flexibility. However, it may cause different damage to the brightness correction data after compression of each pixel block, which may lead to inconsistent brightness compensation effects between different pixel blocks when brightness compensation is finally performed, thus causing the problem of uneven brightness compensation.
[0029] The data compression method, device, electronic device and storage medium according to the embodiments of the present disclosure are described below with reference to the accompanying drawings.
[0030] Figure 1 A flowchart of a data compression method provided by an embodiment of the present disclosure.
[0031] The embodiment of the present disclosure is illustrated by configuring the data compression method in a data compression device. The data compression device can be applied to any electronic device or chip so that the electronic device or chip can perform a data compression function.
[0032] like Figure 1 As shown, the data compression method may include the following steps:
[0033] Step 101 : pre-encode brightness correction data corresponding to a pixel block in a target area, and determine initial compression parameters and data damage information corresponding to the pixel block.
[0034] In some embodiments, the target area may be the entire display screen. Alternatively, when the display screen is relatively large, the display screen may be first divided into a plurality of target areas, and then data compression is performed for each target area, thereby reducing the amount of data processing and improving processing efficiency.
[0035] The pixel block may be an area composed of a plurality of pixels.
[0036] In some embodiments, the target area may be divided into a plurality of pixel blocks.
[0037] In some embodiments, the target area may be divided into a plurality of rectangular areas of the same size, each rectangular area being a pixel block.
[0038] It should be noted that different encoding methods have different corresponding compression parameters. For example, if the compression method is entropy encoding, the corresponding compression parameter is a quantization parameter; or, if the compression method is clustering compression, the corresponding compression parameter is a clustering threshold. This disclosure does not limit this.
[0039] In some embodiments, the initial compression parameters corresponding to each pixel block in the target area may be the same or different, which is not limited in the present disclosure.
[0040] In some embodiments, the brightness correction data corresponding to each pixel block may include correction data corresponding to each pixel point in the pixel block.
[0041] In some embodiments, the brightness correction data corresponding to each pixel block may be correction data corresponding to any color (e.g., red, green, or blue). It should be noted that the logic for compressing the correction data for each color is the same. Therefore, the compressed data corresponding to any color is described in detail in the present disclosure.
[0042] In some embodiments, based on a preset compression rate, the brightness correction data corresponding to the pixel block is pre-encoded, and the initial compression parameters and initial compression data corresponding to the pixel block are determined. Then, the data damage information corresponding to the pixel block is determined based on the brightness correction data and the initial compression data corresponding to the pixel block.
[0043] The preset compression rate may be 80%, 50%, 60%, etc. This disclosure does not limit this.
[0044] In some embodiments, the total length of the brightness correction data corresponding to each pixel block and the product of a preset compression rate can be determined as the maximum length corresponding to each pixel block; based on the maximum length, the brightness correction data corresponding to the pixel block is pre-encoded to determine the initial compression parameters corresponding to the pixel block.
[0045] For example, the total length of the brightness correction data corresponding to the pixel block A is L1, and the compression rate is 50%, then the maximum length corresponding to the pixel block A is 0.5*L1, and then the initial compression parameter corresponding to the pixel block A is determined. It should be noted that, based on the initial compression parameter corresponding to the pixel block A, after compressing the brightness correction data corresponding to the pixel block A, the length of the initial compressed data obtained is less than or equal to 0.5*L1.
[0046] In some embodiments, the maximum length of the brightness correction data of all pixel blocks after compression can be determined by multiplying the total length of the brightness correction data corresponding to all pixel blocks in the target area by the preset compression rate, and the initial compression parameter can be determined according to the maximum length, wherein the initial compression parameter corresponding to each pixel block is the same.
[0047] In some embodiments, the initial compressed data may be decompressed to obtain decompressed data, and then the decompressed data may be compared with the brightness correction data to determine the data damage information corresponding to each pixel block.
[0048] In some embodiments, the data damage information may be a mean square error value between the brightness correction data and the decompressed data corresponding to each pixel, a peak signal-to-noise ratio, etc. This disclosure does not limit this.
[0049] Step 102: Determine a target compression parameter corresponding to the pixel block according to the data damage information corresponding to the pixel block and the initial compression parameter.
[0050] In some embodiments, when the data damage information corresponding to the pixel block meets the conditions, the initial compression parameters corresponding to the pixel block are determined as the target compression parameters corresponding to the pixel block; when the data damage information corresponding to the pixel block does not meet the conditions, the initial compression parameters are adjusted to reduce the data damage information corresponding to the pixel block, and the adjusted initial compression data is determined as the target compression parameters corresponding to the pixel block.
[0051] In some embodiments, when the data damage information is a mean square error value, if the mean square error value is less than an error threshold, it is determined that the data damage information meets the condition; if the mean square error value is greater than or equal to the error threshold, it is determined that the data damage information does not meet the condition.
[0052] In some embodiments, when the data damage information is a peak signal-to-noise ratio, when the peak signal-to-noise ratio is less than an error threshold, it is determined that the data damage information meets the condition; when the peak signal-to-noise ratio is greater than or equal to the error threshold, it is determined that the data damage information does not meet the condition.
[0053] It should be noted that, when the data damage information does not meet the conditions, it means that the damage of the compressed brightness correction data is serious, which may cause the brightness of the screen to be compensated based on the compressed brightness correction data, and the brightness difference with other pixel blocks is large. Therefore, it is necessary to adjust the initial compression parameter to reduce the data damage information corresponding to the pixel block. For example, if the type of the initial compression parameter is a quantization parameter, the initial compression parameter is adjusted down. This disclosure does not limit this.
[0054] Step 103: compressing the brightness correction data corresponding to the pixel block based on the target compression parameter corresponding to the pixel block.
[0055] In the disclosed embodiment, after determining the target compression parameters corresponding to the pixel block, the brightness correction data corresponding to the pixel block can be compressed based on the target compression parameters corresponding to the pixel block and written into the terminal device where the screen is located.
[0056] In the disclosed embodiment, the brightness correction data corresponding to the pixel blocks in the target area are pre-encoded to determine the initial compression parameters and data damage information corresponding to the pixel blocks; the target compression parameters corresponding to the pixel blocks are determined according to the data damage information and the initial compression parameters corresponding to the pixel blocks; and the brightness correction data corresponding to the pixel blocks are compressed based on the target compression parameters corresponding to the pixel blocks. Thus, the initial compression parameters corresponding to each pixel block can be adjusted based on the data damage information between the brightness correction data before compression corresponding to the pixel blocks and the brightness correction data after compression to obtain the target compression parameters, thereby reducing the difference in data damage between different pixel blocks, avoiding that the data damage of some pixel blocks is more serious and the data damage of a certain pixel block is less serious, thereby avoiding the uneven brightness between the pixel blocks after the brightness of the pixel blocks is corrected based on the compressed brightness correction data. While compressing the brightness correction data to reduce the amount of data, the brightness uniformity between different pixel blocks is guaranteed after the brightness of the screen is corrected based on the compressed brightness correction data.
[0057] Figure 2 A flowchart of a data compression method provided by an embodiment of the present disclosure is shown in FIG. Figure 2 As shown, the data compression method may include the following steps:
[0058] Step 201, based on a preset compression rate, pre-encodes the brightness correction data corresponding to the pixel block, and determines the initial compression parameters and initial compression data corresponding to the pixel block, wherein the brightness correction data includes sub-correction data corresponding to each pixel point at each preset grayscale.
[0059] It should be noted that if a pixel point corresponds to sub-correction data at each preset grayscale, then when correcting the brightness, based on the sub-correction data corresponding to multiple preset grayscales, correction data within the full grayscale range can be obtained through interpolation fitting, thereby improving the accuracy of brightness correction.
[0060] The preset grayscales may be grayscales of 50, 100, 150, 200, 250, etc. The present disclosure does not limit the number of preset grayscales and the grayscale values corresponding to the preset grayscales.
[0061] The initial compression parameters include first compression parameters corresponding to each preset grayscale. It should be noted that the first compression parameters corresponding to each preset grayscale may be the same or different. This disclosure does not limit this.
[0062] The initial compressed data includes sub-compressed data corresponding to each pixel at each preset grayscale.
[0063] Step 202, determining data damage information corresponding to the pixel block according to the brightness correction data and the initial compression data corresponding to the pixel block, wherein the data damage information includes at least one of the number of damaged pixels and the loss value corresponding to each preset grayscale.
[0064] In some embodiments, the sub-correction data corresponding to each pixel in the pixel block at each preset grayscale is matched with the sub-compression data, and the number of pixels with failed matching results at each preset grayscale is determined as the number of damaged pixels.
[0065] In some embodiments, the difference between the sub-corrected data corresponding to the pixel point at each preset grayscale and the decompressed data of the corresponding sub-compressed data can be calculated first, and when the difference is greater than the difference threshold, the corresponding matching result is determined as a matching failure, and when the difference is less than or equal to the difference threshold, the corresponding matching result is determined as a matching success.
[0066] For example, if a pixel block contains 1000 pixels, the sub-corrected data and sub-compressed data corresponding to each pixel in the 1000 pixels at the preset grayscale 1 are matched to determine the number of pixels that fail to match, and then the damaged pixel data corresponding to the preset grayscale 1 is obtained. Similarly, the number of damaged pixels corresponding to each preset grayscale is obtained.
[0067] In some embodiments, the loss value corresponding to each preset gray scale is determined according to the difference between the sub-corrected data corresponding to each pixel point in the pixel block at each preset gray scale and the sub-compressed data.
[0068] In some embodiments, the sum or average value or mean square error of the difference between the sub-corrected data corresponding to each pixel point at each preset grayscale and the sub-compressed data can be determined as the loss value corresponding to each preset grayscale.
[0069] For example, if a pixel block includes 1000 pixels, the difference between the sub-corrected data and the sub-compressed data corresponding to each pixel in the 1000 pixels at the preset grayscale 1 is determined, and then the sum or average value or mean square error of the difference is determined as the loss value corresponding to each preset grayscale. Similarly, the loss value corresponding to each preset grayscale is obtained.
[0070] Step 203: Determine a target compression parameter corresponding to the pixel block according to the data damage information corresponding to the pixel block and the initial compression parameter.
[0071] The target compression parameters include second compression parameters corresponding to each preset grayscale.
[0072] In some embodiments, when the data damage information includes the number of damaged pixels and the loss value, in response to the pixel block being at a first preset grayscale and the corresponding number of damaged pixels being greater than a first threshold, or the corresponding loss value being greater than a second threshold, the first compression parameter corresponding to the pixel block at the first preset grayscale is adjusted based on a preset adjustment amplitude and a preset adjustment direction to obtain a second compression parameter corresponding to the pixel block at the first preset grayscale.
[0073] It should be noted that if the number of damaged pixels corresponding to a pixel block under the first preset grayscale is greater than the first threshold, or the corresponding loss value is greater than the second threshold, it means that the brightness correction data corresponding to the pixel block is severely damaged after compression, which may result in a large difference in brightness with other pixel blocks after the screen brightness is compensated based on the compressed brightness correction data. Therefore, the initial compression parameters need to be adjusted.
[0074] In some embodiments, when the data damage information includes the number of damaged pixels and the loss value, in response to the pixel block being at a second preset grayscale and the corresponding number of damaged pixels being less than or equal to a first threshold and the corresponding loss value being greater than a second threshold, the first compression parameter corresponding to the pixel block at the second preset grayscale is determined as the second compression parameter corresponding to the pixel block at the second preset grayscale.
[0075] The preset adjustment range and the preset adjustment direction are both determined based on the compression method. Different compression methods correspond to different preset adjustment ranges and preset adjustment directions.
[0076] For example, if the compression method is quantization compression, the preset adjustment direction is a smaller initial compression parameter to reduce the number of damaged pixels and the loss value, and the preset adjustment range can be 1, 0.5, etc. The present disclosure does not specifically limit the size of the preset adjustment range.
[0077] In some embodiments, when the data damage information includes the number of damaged pixels, in response to the number of damaged pixels corresponding to the pixel block at the first preset grayscale being greater than the first threshold, the first compression parameter corresponding to the pixel block at the first preset grayscale is adjusted to obtain the second compression parameter corresponding to the pixel block at the first preset grayscale. In response to the number of damaged pixels corresponding to the pixel block at the second preset grayscale being less than or equal to the first threshold, the first compression parameter corresponding to the pixel block at the second preset grayscale is determined as the second compression parameter corresponding to the pixel block at the second preset grayscale.
[0078] In some embodiments, when the loss value includes the number of damaged pixels, in response to the number of damaged pixels corresponding to the pixel block at the first preset grayscale being greater than the first threshold, the first compression parameter corresponding to the pixel block at the first preset grayscale is adjusted to obtain the second compression parameter corresponding to the pixel block at the first preset grayscale. In response to the number of damaged pixels corresponding to the pixel block at the second preset grayscale being less than or equal to the first threshold, the first compression parameter corresponding to the pixel block at the second preset grayscale is determined as the second compression parameter corresponding to the pixel block at the second preset grayscale.
[0079] In some embodiments, the first threshold may be determined empirically in advance.
[0080] In some embodiments, the first threshold value can also be determined in the following manner: when the target area contains multiple pixel blocks, determine the adjacent pixel blocks corresponding to each pixel block; determine the first reference number corresponding to each pixel block at each preset gray scale based on the number of damaged pixels corresponding to the adjacent pixel blocks at each preset gray scale; determine the second reference number corresponding to each pixel block at each preset gray scale based on the number of damaged pixels corresponding to all pixel blocks at each preset gray scale; determine the third reference number based on the first reference number and the second reference number; and determine the first threshold value corresponding to each pixel block at each preset gray scale based on the third reference number.
[0081] The number of adjacent pixel blocks corresponding to each pixel block may be one or more, which is not limited in the present disclosure.
[0082] In some embodiments, an average value of the number of damaged pixels corresponding to a plurality of adjacent pixel blocks at each preset grayscale may be determined as the first reference number corresponding to each pixel block at each preset grayscale.
[0083] In some embodiments, the second reference number corresponding to each pixel block at each preset gray scale may be determined by taking the average number of damaged pixels corresponding to all pixel blocks at each preset gray scale.
[0084] In some embodiments, a first weight corresponding to the first reference quantity and a second weight corresponding to the second reference quantity may be determined, and then the first reference quantity and the second reference quantity are weighted based on the first weight and the second weight to obtain a third reference quantity. The sum of the first weight and the second weight is 1. The first weight and the second weight may be the same or different. This disclosure is not limited to this.
[0085] In some embodiments, the first threshold value may be the product of the third reference number and the first value, wherein the first value may be 1.1, 1, 1.2, etc. This disclosure does not limit this.
[0086] In the disclosed embodiment, the first threshold corresponding to the pixel block is determined in combination with the number of damaged pixels corresponding to the adjacent pixel blocks of the pixel block, so that when the number of damaged pixels corresponding to the pixel block is greater than the first threshold, it can be determined that after brightness correction is performed on the pixel block based on the initial compressed data corresponding to the pixel block, the brightness of the pixel block after correction may be uneven with the brightness of the adjacent pixel blocks after correction. Then, the initial compression parameters of the pixel block are adjusted so that the brightness of the pixel block after correction is even with the brightness of the adjacent pixel blocks.
[0087] In some embodiments, the second threshold may be determined empirically in advance.
[0088] In some embodiments, the second threshold can also be determined in the following manner: when the target area contains multiple pixel blocks, determine the adjacent pixel blocks corresponding to each pixel block, determine the first reference loss value corresponding to each pixel block at each preset gray scale based on the loss values corresponding to the adjacent pixel blocks at each preset gray scale, determine the second reference loss value corresponding to each pixel block at each preset gray scale based on the loss values corresponding to all pixel blocks at each preset gray scale, determine the third reference loss value based on the first reference loss value and the second reference loss value, and determine the second threshold corresponding to each pixel block at each preset gray scale based on the third reference loss value.
[0089] In some embodiments, an average value of loss values corresponding to a plurality of adjacent pixel blocks at each preset grayscale may be determined as a first reference loss value corresponding to each pixel block at each preset grayscale.
[0090] In some embodiments, the second reference loss value corresponding to each pixel block at each preset gray scale may be determined by taking the average value of the loss values corresponding to all pixel blocks at each preset gray scale.
[0091] In some embodiments, a third weight corresponding to the first reference loss value and a fourth weight corresponding to the second reference loss value may be determined, and then the first reference loss value and the second reference loss value are weighted based on the third weight and the fourth weight to obtain a third reference loss value. The sum of the third weight and the fourth weight is 1. The third weight and the fourth weight may be the same or different. This disclosure does not limit this.
[0092] In some embodiments, the second threshold value may be the product of the third reference loss value and the second value. The second value may be 1.1, 1, 1.2, etc. The first value and the second value may be the same or different. This disclosure does not limit this.
[0093] In the disclosed embodiment, the second threshold corresponding to the pixel block is determined in combination with the loss value corresponding to the adjacent pixel blocks of the pixel block, so that when the loss value corresponding to the pixel block is greater than the second threshold, it can be determined that after the brightness correction of the pixel block based on the initial compression data corresponding to the pixel block, the brightness of the pixel block after correction may be uneven with the brightness of the adjacent pixel blocks after correction. Then, the initial compression parameters of the pixel block are adjusted so that the brightness of the pixel block after correction is uniform with the brightness of the adjacent pixel blocks.
[0094] Step 204 : compressing the brightness correction data corresponding to the pixel block based on the target compression parameter corresponding to the pixel block.
[0095] In the disclosed embodiment, the brightness correction data corresponding to the pixel block includes sub-correction data corresponding to each pixel point at each preset grayscale, and the corresponding data damage information includes at least one of the number of damaged pixel points and the loss value corresponding to each preset grayscale. Therefore, based on the damaged pixel points and the loss value corresponding to the pixel block at each grayscale, the damage condition of the compressed corrected data corresponding to the pixel block at each preset grayscale can be determined, and then the target compression parameters of the pixel block at each preset grayscale can be determined in more detail, thereby reducing the damage differences of the compressed corrected data corresponding to different pixel blocks at each preset grayscale, and further improving the brightness uniformity between different pixel blocks after the brightness of the screen is corrected based on the compressed brightness correction data.
[0096] Figure 3 A flowchart of a data compression method provided by an embodiment of the present disclosure; Figure 3 As shown, the data compression method may include the following steps:
[0097] Step 301, based on a preset compression rate, pre-encode the brightness correction data corresponding to the pixel block, and determine the initial compression parameters and initial compression data corresponding to the pixel block, wherein the brightness correction data includes sub-correction data corresponding to each pixel point at each preset grayscale.
[0098] The initial compression parameters include first compression parameters corresponding to each preset grayscale.
[0099] The initial compressed data includes sub-compressed data corresponding to each pixel at each preset grayscale.
[0100] Step 302, determining data damage information corresponding to the pixel block according to the brightness correction data and the initial compression data corresponding to the pixel block, wherein the data damage information includes at least one of the number of damaged pixels and the loss value corresponding to each preset grayscale.
[0101] Step 303, in response to the number of damaged pixels corresponding to the pixel block at the first preset grayscale being greater than the first threshold, or the corresponding loss value being greater than the second threshold, the first compression parameter corresponding to the pixel block at the first preset grayscale is adjusted based on a preset adjustment amplitude and a preset adjustment direction to obtain a second compression parameter corresponding to the pixel block at the first preset grayscale.
[0102] The specific implementation forms of steps 301 to 303 can refer to the detailed descriptions in other embodiments of the present disclosure, and will not be described in detail here.
[0103] Step 304: Update the initial compression parameters corresponding to the pixel block based on the target compression parameters corresponding to the pixel block.
[0104] In the disclosed embodiment, the initial compression parameter corresponding to each pixel block may be updated to the adjusted target compression parameter.
[0105] Step 305 , compressing the brightness correction data corresponding to the pixel block based on the updated initial compression parameters corresponding to the pixel block, and determining updated data damage information corresponding to the pixel block.
[0106] In some embodiments, based on the updated initial compression parameters corresponding to the pixel block, the brightness correction data corresponding to the pixel block is compressed to determine the updated initial compressed data, and based on the updated initial compressed data and the brightness correction data, the updated data damage information corresponding to the pixel block is determined.
[0107] Among them, the specific implementation method of determining the updated data damage information can refer to the detailed description of determining the data damage information before the update, which will not be repeated here.
[0108] Step 306, when the corresponding updated number of damaged pixels in the pixel block at each preset grayscale is less than or equal to the first threshold and the updated loss value is less than or equal to the second threshold, the updated initial compression parameter corresponding to the pixel block is determined as the target compression data corresponding to the pixel block.
[0109] In some embodiments, after determining the target compression parameters corresponding to each pixel block based on the initial compression parameters and data damage information corresponding to each pixel block, the initial compression parameters corresponding to each pixel block can also be updated to the adjusted target compression parameters, and the operation of compressing the brightness correction data corresponding to each pixel block is cyclically performed until the number of damaged pixels corresponding to each pixel block under each preset gray scale is less than or equal to the first threshold and the loss value is less than or equal to the second threshold, thereby ensuring the uniformity of the screen brightness after the screen brightness is corrected based on the compressed brightness correction data corresponding to each pixel block.
[0110] For example, there are 4 pixel blocks, namely pixel block 1, pixel block 2, pixel block 3 and pixel block 4; there are 3 preset grayscales, namely grayscale 1 and grayscale 2; the initial compression parameter corresponding to pixel block 1 at grayscale 1 is A1, and the initial compression parameter corresponding to grayscale 2 is A2; the initial compression parameter corresponding to pixel block 2 at grayscale 1 is B1, and the initial compression parameter corresponding to grayscale 2 is B2; the initial compression parameter corresponding to pixel block 3 at grayscale 1 is C1, and the initial compression parameter corresponding to grayscale 2 is C2. If the number of damaged pixels corresponding to pixel block 1 at grayscale 1 is greater than the first threshold, or the loss value is greater than the second threshold, the corresponding target compression parameter is determined to be A1-1, and the other initial compression parameters are the target compression parameters.
[0111] Afterwards, the initial compression parameter of pixel block 1 at grayscale 1 is adjusted to A-1, and other initial compression parameters remain unchanged. Based on the initial compression parameters, the brightness correction data corresponding to each pixel block is compressed, and the data damage information corresponding to each pixel block is determined. If the number of damaged pixels corresponding to each pixel block at each preset grayscale is less than or equal to the first threshold, and the loss value is less than or equal to the second threshold; then it is determined that the target compression parameter corresponding to pixel block 1 at grayscale 1 is A1-1, and the target compression parameter corresponding to grayscale 2 is A2; the target compression parameter corresponding to pixel block 2 at grayscale 1 is B1, and the target compression parameter corresponding to grayscale 2 is B2; the target compression parameter corresponding to pixel block 3 at grayscale 1 is C1, and the target compression parameter corresponding to grayscale 2 is C2.
[0112] Alternatively, if the number of damaged pixels corresponding to pixel block 1 at grayscale 1 is greater than the first threshold, or the loss value is greater than the second threshold; then the target compression parameter corresponding to pixel block 1 at grayscale 1 is determined to be A1-2, and the operation of updating the initial compression parameters is returned. If the number of damaged pixels corresponding to each pixel block at each preset grayscale is less than or equal to the first threshold, and the loss value is less than or equal to the second threshold; then the target compression parameter corresponding to pixel block 1 at grayscale 1 is determined to be A1-2, and the target compression parameter corresponding to grayscale 2 is A2; the target compression parameter corresponding to pixel block 2 at grayscale 1 is B1, and the target compression parameter corresponding to grayscale 2 is B2; the target compression parameter corresponding to pixel block 3 at grayscale 1 is C1, and the target compression parameter corresponding to grayscale 2 is C2.
[0113] Step 307 : compressing the brightness correction data corresponding to each pixel block based on the target compression parameter corresponding to each pixel block.
[0114] In the disclosed embodiment, after determining the target compression parameters corresponding to the pixel block based on the data damage information and initial compression parameters corresponding to the pixel block, the initial compression parameters corresponding to the pixel block can also be updated based on the target compression parameters corresponding to the pixel block. Finally, when the number of damaged pixels corresponding to each pixel block at each preset grayscale is less than or equal to the first threshold value, and the loss value is less than or equal to the second threshold value, the updated initial compression parameters are determined as the target compression data corresponding to the pixel block. Thus, not only can the target compression parameters of the pixel block at each preset grayscale be determined in more detail, but the initial compression parameters can also be adjusted, further reducing the damage differences of the compressed correction data corresponding to each pixel block at each preset grayscale, and further improving the brightness uniformity between different pixel blocks after the brightness of the screen is corrected based on the compressed brightness correction data.
[0115] In some embodiments, based on the target compression parameter corresponding to the pixel block, the initial compression parameter corresponding to the pixel block is updated; based on the updated initial compression parameter corresponding to the pixel block, the brightness correction data corresponding to the pixel block is compressed to determine the updated initial compression data corresponding to the pixel block; when the total length of the updated initial compression data corresponding to the target area is greater than or equal to the preset length, the initial compression parameter corresponding to the target compression parameter of the pixel block is determined as the target compression parameter corresponding to the pixel block. Thus, while reducing the brightness non-uniformity between different pixel blocks, the length of the brightness correction data after compression can be limited based on the preset compression rate, thereby reducing the occupied storage area.
[0116] The preset length is the product of the total length of all brightness correction data corresponding to the target area and the preset compression rate.
[0117] In some embodiments, when the total length of the updated initial compressed data corresponding to the target area is less than a preset length, and the number of damaged pixels corresponding to the pixel block at any preset grayscale is greater than a first threshold, or the loss value is greater than a second threshold, the updated initial compression parameters can also be updated until the total length of the updated initial compressed data corresponding to the target area is greater than or equal to the preset length, or the number of updated damaged pixels corresponding to the pixel block at each preset grayscale is less than or equal to the first threshold, and the updated loss value is less than or equal to the second threshold.
[0118] For example, there are 4 pixel blocks, namely pixel block 1, pixel block 2, pixel block 3 and pixel block 4; there are 3 preset grayscales, namely grayscale 1 and grayscale 2; the initial compression parameter corresponding to pixel block 1 at grayscale 1 is A1, and the initial compression parameter corresponding to grayscale 2 is A2; the initial compression parameter corresponding to pixel block 2 at grayscale 1 is B1, and the initial compression parameter corresponding to grayscale 2 is B2; the initial compression parameter corresponding to pixel block 3 at grayscale 1 is C1, and the initial compression parameter corresponding to grayscale 2 is C2. If the number of damaged pixels corresponding to pixel block 1 at grayscale 1 is greater than the first threshold, or the loss value is greater than the second threshold, the corresponding target compression parameter is determined to be A1-1, and the other initial compression parameters are the target compression parameters.
[0119] Afterwards, the initial compression parameter of pixel block 1 at grayscale 1 is adjusted to A-1, and other initial compression parameters remain unchanged. Based on the initial compression parameters, the brightness correction data corresponding to each pixel block is compressed. If the total length of the compressed data corresponding to all pixel blocks is greater than or equal to the preset length; then it is determined that the target compression parameter corresponding to pixel block 1 at grayscale 1 is A1, and the target compression parameter corresponding to grayscale 2 is A2; the target compression parameter corresponding to pixel block 2 at grayscale 1 is B1, and the target compression parameter corresponding to grayscale 2 is B2; the target compression parameter corresponding to pixel block 3 at grayscale 1 is C1, and the target compression parameter corresponding to grayscale 2 is C2.
[0120] Alternatively, if the total length of the compressed data corresponding to all pixel blocks is less than or equal to the preset length, and the number of damaged pixels corresponding to pixel block 1 at grayscale 1 is greater than the first threshold, or the loss value is greater than the second threshold; then the target compression parameter corresponding to pixel block 1 at grayscale 1 is determined to be A1-2, and the operation of updating the initial compression parameter is returned. If the total length of the compressed data corresponding to all pixel blocks is greater than the preset length; then the target compression parameter corresponding to pixel block 1 at grayscale 1 is determined to be A1-1, and the target compression parameter corresponding to grayscale 2 is A2; the target compression parameter corresponding to pixel block 2 at grayscale 1 is B1, and the target compression parameter corresponding to grayscale 2 is B2; the target compression parameter corresponding to pixel block 3 at grayscale 1 is C1, and the target compression parameter corresponding to grayscale 2 is C2.
[0121] In some embodiments, in response to the number of damaged pixels in the target area being less than or equal to the first threshold, the loss value being less than or equal to the second threshold, and the total length of the initial compressed data corresponding to all pixel blocks being less than the preset length, the first threshold and the second threshold are adjusted down. Thus, when there is a remaining length, the threshold can be adjusted down to further determine the initial compressed data that may cause uneven brightness, and the corresponding initial compression parameters can be adjusted, thereby further improving the brightness uniformity of the screen.
[0122] In some embodiments, if the first threshold is the product of the third reference number and the first value, the first value may be reduced, thereby reducing the first threshold.
[0123] In some embodiments, if the second threshold is the product of the third reference loss value and the second value, the second value may be reduced, thereby reducing the second threshold.
[0124] In order to implement the above embodiment, the present disclosure also proposes a data compression device.
[0125] Figure 4 A schematic diagram of the structure of a data compression device provided in an embodiment of the present disclosure.
[0126] like Figure 4 As shown, the data compression device 400 may include:
[0127] The first determination module 401 is used to pre-code the brightness correction data corresponding to the pixel block in the target area, and determine the initial compression parameters and data damage information corresponding to the pixel block;
[0128] A second determination module 402 is used to determine a target compression parameter corresponding to the pixel block according to the data damage information corresponding to the pixel block and the initial compression parameter;
[0129] The compression module 403 is used to compress the brightness correction data corresponding to the pixel block based on the target compression parameter corresponding to the pixel block.
[0130] In some embodiments, the first determining module 401 is configured to:
[0131] Based on a preset compression rate, pre-encode the brightness correction data corresponding to the pixel block, and determine the initial compression parameters and initial compression data corresponding to the pixel block;
[0132] The data damage information corresponding to the pixel block is determined according to the brightness correction data and the initial compression data corresponding to the pixel block.
[0133] In some embodiments, the data damage information includes at least one of the number of damaged pixels and the loss value corresponding to each preset grayscale. The first determination module 401 is used to:
[0134] Matching the sub-corrected data corresponding to each pixel point in the pixel block at each preset grayscale with the sub-compressed data, and determining the number of pixels whose matching results at each preset grayscale fail to match as the number of damaged pixels;
[0135] Determine the loss value corresponding to each preset grayscale according to the difference between the sub-corrected data corresponding to each pixel point in the pixel block at each preset grayscale and the sub-compressed data;
[0136] The brightness correction data includes sub-correction data corresponding to each pixel at each preset grayscale, and the initial compression data includes sub-compression data corresponding to each pixel at each preset grayscale.
[0137] In some embodiments, the initial compression parameters include first compression parameters corresponding to each preset grayscale, the target compression parameters include second compression parameters corresponding to each preset grayscale, and the second determination module 402 is used to:
[0138] In response to the pixel block having a number of damaged pixels greater than a first threshold value or a corresponding loss value greater than a second threshold value at a first preset grayscale, adjusting a first compression parameter corresponding to the pixel block at the first preset grayscale based on a preset adjustment amplitude and a preset adjustment direction to obtain a second compression parameter corresponding to the pixel block at the first preset grayscale;
[0139] In response to the pixel block being at a second preset grayscale, the corresponding number of damaged pixels is less than or equal to a first threshold, and the corresponding loss value is greater than a second threshold, the first compression parameter corresponding to the pixel block at the second preset grayscale is determined as the second compression parameter corresponding to the pixel block at the second preset grayscale.
[0140] In some embodiments, a third determining module is further included, which is used to:
[0141] When the target area includes multiple pixel blocks, determining the adjacent pixel blocks corresponding to each pixel block;
[0142] Determining a first reference number corresponding to each pixel block at each preset grayscale according to the number of damaged pixels corresponding to adjacent pixel blocks at each preset grayscale;
[0143] Determining a second reference number corresponding to each pixel block at each preset grayscale according to the number of damaged pixels corresponding to all pixel blocks at each preset grayscale;
[0144] Determining a third reference quantity according to the first reference quantity and the second reference quantity;
[0145] Based on the third reference number, a first threshold corresponding to each pixel block at each preset grayscale is determined.
[0146] In some embodiments, a fourth determining module is further included, configured to:
[0147] When the target area includes multiple pixel blocks, determining the adjacent pixel blocks corresponding to each pixel block;
[0148] Determine a first reference loss value corresponding to each pixel block at each preset grayscale according to the loss values corresponding to the adjacent pixel blocks at each preset grayscale;
[0149] Determine a second reference loss value corresponding to each pixel block at each preset grayscale according to the loss values corresponding to all pixel blocks at each preset grayscale;
[0150] Determining a third reference loss value according to the first reference loss value and the second reference loss value;
[0151] Based on the third reference loss value, a second threshold corresponding to each pixel block at each preset grayscale is determined.
[0152] In some embodiments, a fifth determining module is further included, configured to:
[0153] Based on the target compression parameter corresponding to the pixel block, the initial compression parameter corresponding to the pixel block is updated;
[0154] Based on the updated initial compression parameter corresponding to the pixel block, compressing the brightness correction data corresponding to the pixel block, and determining the updated data damage information corresponding to the pixel block;
[0155] When the corresponding updated number of damaged pixels in the pixel block at each preset grayscale is less than or equal to the first threshold and the updated loss value is less than or equal to the second threshold, the updated initial compression parameters corresponding to the pixel block are determined as the target compression data corresponding to the pixel block.
[0156] In some embodiments, a sixth determining module is further included, configured to:
[0157] Based on the target compression parameter corresponding to the pixel block, the initial compression parameter corresponding to the pixel block is updated;
[0158] Based on the updated initial compression parameter corresponding to the pixel block, compressing the brightness correction data corresponding to the pixel block, and determining the updated initial compression data corresponding to the pixel block;
[0159] When the total length of the updated initial compressed data corresponding to the target area is greater than or equal to the preset length, the initial compression parameter corresponding to the target compression parameter of the pixel block is determined as the target compression parameter corresponding to the pixel block;
[0160] The preset length is the product of the total length of all brightness correction data corresponding to the target area and the preset compression rate.
[0161] In some embodiments, an adjustment module is further included, which is used to:
[0162] In response to the number of each damaged pixel point in the target area being less than or equal to the first threshold, each loss value being less than or equal to the second threshold, and the total length of the initial compressed data corresponding to all pixel blocks being less than a preset length, reducing the first threshold and the second threshold;
[0163] The preset length is the product of the total length of all brightness correction data corresponding to the target area and the preset compression rate.
[0164] In some embodiments, the first determining module 401 is configured to:
[0165] The product of the total length of the brightness correction data corresponding to the pixel block and the preset compression rate is determined as the maximum length corresponding to the pixel block;
[0166] Based on the maximum length, the brightness correction data corresponding to the pixel block is pre-encoded to determine the initial compression parameter corresponding to the pixel block.
[0167] In some embodiments, a partitioning module is further included, for:
[0168] Divide the target area into multiple pixel blocks.
[0169] The functions and specific implementation principles of the above modules in the embodiments of the present disclosure can be referred to the above method embodiments, and will not be repeated here.
[0170] The data compression device of the disclosed embodiment first pre-encodes the brightness correction data corresponding to the pixel blocks in the target area, determines the initial compression parameters and data damage information corresponding to the pixel blocks; determines the target compression parameters corresponding to the pixel blocks according to the data damage information and the initial compression parameters corresponding to the pixel blocks; and compresses the brightness correction data corresponding to the pixel blocks based on the target compression parameters corresponding to the pixel blocks. Thus, the initial compression parameters corresponding to each pixel block can be adjusted based on the data damage information between the brightness correction data before compression corresponding to the pixel blocks and the brightness correction data after compression, and the target compression parameters can be obtained, thereby reducing the difference in data damage between different pixel blocks, avoiding that the data damage of some pixel blocks is more serious and the data damage of a certain pixel block is less serious, thereby avoiding the uneven brightness between the pixel blocks after the brightness of the pixel blocks is corrected based on the compressed brightness correction data. While compressing the brightness correction data and reducing the amount of data, the brightness uniformity between different pixel blocks is guaranteed after the brightness of the screen is corrected based on the compressed brightness correction data.
[0171] In order to implement the above embodiments, the present disclosure further proposes an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the data compression method proposed in the above embodiments of the present disclosure is implemented.
[0172] Figure 5 A block diagram of an exemplary electronic device suitable for implementing embodiments of the present disclosure is shown. Figure 5The electronic device 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0173] like Figure 5 As shown, the electronic device 12 is in the form of a general purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that connects various system components (including the system memory 28 and the processing unit 16).
[0174] The bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor or a local bus using any of a variety of bus structures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnection (PCI) bus.
[0175] The electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 12, including volatile and non-volatile media, removable and non-removable media.
[0176] The memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 5 not shown, usually called a "hard drive"). Although Figure 5Not shown in the figure, a disk drive for reading and writing a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing a removable non-volatile optical disk (e.g., a compact disc read only memory (CD-ROM), a digital versatile disc read only memory (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the various embodiments of the present disclosure.
[0177] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in the memory 28, such program modules 42 including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described in the present disclosure.
[0178] The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 12, and / or may communicate with any device that enables the electronic device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the electronic device 12 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 via a bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0179] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing the methods mentioned in the above embodiments.
[0180] In order to implement the above embodiments, the present disclosure further proposes a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the data compression method proposed in the above embodiments of the present disclosure is implemented.
[0181] In order to implement the above embodiments, the present disclosure further proposes a computer program product, including a computer program, which implements the data compression method proposed in the above embodiments of the present disclosure when the computer program is executed by a processor.
[0182] Figure 6 is a schematic diagram of the structure of the chip proposed in the embodiment of the present disclosure. Figure 6 The structure of the chip 600 is shown, but is not limited to this.
[0183] The chip 600 includes a processing circuit 601 , and the processing circuit 601 is configured to execute any of the above methods.
[0184] In some embodiments, the chip 600 further includes one or more interface circuits 602. Optionally, the interface circuit 602 is connected to the memory 603, and the interface circuit 602 can be used to receive signals from the memory 603 or other devices, and the interface circuit 602 can be used to send signals to the memory 603 or other devices. For example, the interface circuit 602 can read instructions stored in the memory 603 and send the instructions to the processing circuit 601.
[0185] In some embodiments, the interface circuit 602 performs at least one of the communication steps such as sending and / or receiving in the above method, and the processing circuit 601 performs other steps.
[0186] In some embodiments, terms such as interface circuit, interface, transceiver pin, and transceiver may be used interchangeably.
[0187] In some embodiments, the chip 600 further includes one or more memories 603 for storing instructions. Optionally, all or part of the memory 603 may be outside the chip 600.
[0188] The collection, storage, use, processing, transmission, provision and disclosure of user personal information involved in this disclosure shall comply with the relevant laws and regulations and shall not violate public order and good morals.
[0189] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0190] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, "plurality" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0191] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present disclosure includes additional implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present disclosure belong.
[0192] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute the instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or otherwise processing in a suitable manner if necessary, and then stored in a computer memory.
[0193] It should be understood that the various parts of the present disclosure can be implemented in hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used to implement: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0194] A person skilled in the art may understand that all or part of the steps in the above-mentioned embodiment method may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0195] In addition, each functional unit in each embodiment of the present disclosure may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0196] The storage medium mentioned above may be a read-only memory, a disk or an optical disk, etc. Although the embodiments of the present disclosure have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations of the present disclosure. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present disclosure.
Claims
1. A data compression method, characterized in that: The method comprises: Pre-encoding brightness correction data corresponding to a pixel block in a target area, and determining initial compression parameters and data damage information corresponding to the pixel block; Determining a target compression parameter corresponding to the pixel block according to the data damage information corresponding to the pixel block and the initial compression parameter; The brightness correction data corresponding to the pixel block is compressed based on the target compression parameter corresponding to the pixel block.
2. The method according to claim 1, characterized in that The pre-coding of brightness correction data corresponding to the pixel blocks in the target area and determining initial compression parameters and data damage information corresponding to the pixel blocks include: Based on a preset compression rate, pre-encode the brightness correction data corresponding to the pixel block, and determine the initial compression parameters and initial compression data corresponding to the pixel block; The data damage information corresponding to the pixel block is determined according to the brightness correction data corresponding to the pixel block and the initial compressed data.
3. The method according to claim 2, characterized in that The data damage information includes at least one of the number of damaged pixels and the loss value corresponding to each preset grayscale, and the data damage information corresponding to the pixel block is determined according to the brightness correction data corresponding to the pixel block and the initial compressed data, including at least one of the following: Matching the sub-corrected data corresponding to each pixel point in the pixel block at each preset grayscale with the sub-compressed data, and determining the number of pixel points whose matching result at each preset grayscale is a matching failure as the number of damaged pixel points; Determine the loss value corresponding to each preset grayscale according to the difference between the sub-corrected data corresponding to each pixel point in the pixel block at each preset grayscale and the sub-compressed data; The brightness correction data includes sub-correction data corresponding to each pixel at each preset grayscale, and the initial compressed data includes sub-compressed data corresponding to each pixel at each preset grayscale.
4. The method according to claim 3, characterized in that The initial compression parameter includes a first compression parameter corresponding to each preset grayscale, the target compression parameter includes a second compression parameter corresponding to each preset grayscale, and determining the target compression parameter corresponding to the pixel block according to the data damage information corresponding to the pixel block and the initial compression parameter includes any one of the following: In response to the pixel block at a first preset grayscale, the number of damaged pixels corresponding to the pixel block is greater than a first threshold, or the corresponding loss value is greater than a second threshold, adjusting the first compression parameter corresponding to the pixel block at the first preset grayscale based on a preset adjustment amplitude and a preset adjustment direction to obtain a second compression parameter corresponding to the pixel block at the first preset grayscale; In response to the pixel block being at a second preset grayscale, the corresponding number of damaged pixels is less than or equal to the first threshold, and the corresponding loss value is greater than a second threshold, the first compression parameter corresponding to the pixel block at the second preset grayscale is determined as the second compression parameter corresponding to the pixel block at the second preset grayscale.
5. The method according to claim 4, characterized in that Before determining the target compression parameter corresponding to the pixel block according to the data damage information corresponding to the pixel block and the initial compression parameter, the method further includes: When the target area includes a plurality of pixel blocks, determining an adjacent pixel block corresponding to each pixel block; Determine a first reference number corresponding to each pixel block at each preset grayscale according to the number of damaged pixels corresponding to the adjacent pixel blocks at each preset grayscale; Determine a second reference number corresponding to each pixel block at each preset grayscale according to the number of damaged pixels corresponding to all pixel blocks at each preset grayscale; Determining a third reference quantity according to the first reference quantity and the second reference quantity; Based on the third reference number, the first threshold corresponding to each of the pixel blocks at the preset gray scales is determined.
6. The method according to claim 4, characterized in that Before determining the target compression parameter corresponding to the pixel block according to the data damage information corresponding to the pixel block and the initial compression parameter, the method further includes: When the target area includes a plurality of pixel blocks, determining an adjacent pixel block corresponding to each pixel block; Determine, according to the loss values corresponding to the adjacent pixel blocks at the preset grayscales, a first reference loss value corresponding to each of the pixel blocks at the preset grayscales; Determine, according to the loss values corresponding to all pixel blocks at the preset grayscales, a second reference loss value corresponding to each pixel block at the preset grayscales; Determining a third reference loss value according to the first reference loss value and the second reference loss value; Based on the third reference loss value, the second threshold corresponding to each of the pixel blocks at the preset grayscales is determined.
7. The method according to claim 4, characterized in that After determining the target compression parameter corresponding to the pixel block according to the data damage information corresponding to the pixel block and the initial compression parameter, the method further includes: Based on the target compression parameter corresponding to the pixel block, updating the initial compression parameter corresponding to the pixel block; Based on the updated initial compression parameter corresponding to the pixel block, compressing the brightness correction data corresponding to the pixel block, and determining the updated data damage information corresponding to the pixel block; When the corresponding updated number of damaged pixels in the pixel block at each preset grayscale is less than or equal to a first threshold and the updated loss value is less than or equal to a second threshold, the updated initial compression parameters corresponding to the pixel block are determined as the target compression data corresponding to the pixel block.
8. The method according to claim 4, characterized in that After determining the target compression parameter corresponding to the pixel block according to the data damage information corresponding to the pixel block and the initial compression parameter, the method further includes: Based on the target compression parameter corresponding to the pixel block, updating the initial compression parameter corresponding to the pixel block; Based on the updated initial compression parameter corresponding to the pixel block, compressing the brightness correction data corresponding to the pixel block to determine the updated initial compression data corresponding to the pixel block; When the total length of the updated initial compressed data corresponding to the target area is greater than or equal to the preset length, determining the initial compression parameter corresponding to the target compression parameter of the pixel block as the target compression parameter corresponding to the pixel block; The preset length is the product of the total length of all brightness correction data corresponding to the target area and a preset compression rate.
9. The method according to claim 4, characterized in that The method further comprises: In response to the number of each damaged pixel point in the target area being less than or equal to the first threshold, each loss value being less than or equal to the second threshold, and the total length of the initial compressed data corresponding to all pixel blocks being less than a preset length, reducing the first threshold and the second threshold; The preset length is the product of the total length of all brightness correction data corresponding to the target area and a preset compression rate.
10. The method according to claim 2, characterized in that The pre-coding of the brightness correction data corresponding to the pixel block based on the preset compression rate to determine the initial compression parameter corresponding to the pixel block includes: Determine the product of the total length of the brightness correction data corresponding to the pixel block and the preset compression rate as the maximum length corresponding to the pixel block; Based on the maximum length, the brightness correction data corresponding to the pixel block is pre-encoded to determine an initial compression parameter corresponding to the pixel block.
11. The method according to claim 1, characterized in that: Before pre-encoding the brightness correction data corresponding to the pixel blocks in the target area and determining the initial compression parameters and data damage information corresponding to the pixel blocks, the method further includes: The target area is divided into a plurality of pixel blocks.
12. A data compression device, characterized in that: The device comprises: A first determination module is used to pre-code brightness correction data corresponding to a pixel block in a target area, and determine initial compression parameters and data damage information corresponding to the pixel block; A second determination module, configured to determine a target compression parameter corresponding to the pixel block according to the data damage information corresponding to the pixel block and the initial compression parameter; The compression module is used to compress the brightness correction data corresponding to the pixel block based on the target compression parameter corresponding to the pixel block.
13. An electronic device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the data compression method as claimed in any one of claims 1 to 11 is implemented.
14. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the data compression method according to any one of claims 1 to 11 is implemented.
15. A chip, characterized in that: The chip includes a processing unit and an interface circuit, the processing unit obtains program instructions through the interface circuit, the program instructions are executed by the processing unit, and the processing unit is used to execute the data compression method as described in any one of claims 1-11.
Citation Information
Patent Citations
Display device and method of processing and applying compensation data thereof
CN115909961A
Data processing method and device of display panel and computer readable storage medium
CN116682350A
Data processing method and device of display panel and computer readable storage medium
CN116682351A