Image compression and decompression method and device, equipment and storage medium

By setting a flag signal in the image compression and decompression method to determine the repeating unit data in the picture area, reducing the number of decoding times, the power consumption waste caused by multiple encoding and decoding of the repeated unit data in the prior art is solved, and ultra-low power consumption is achieved Effect.

CN119232957APending Publication Date: 2024-12-31SHANGHAI OLEADVISION TECHONOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411301451.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-18
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

The existing image compression and decompression method does not consider the characteristics of the picture data when processing pictures, resulting in multiple encoding and decoding operations of the repeating unit data, resulting in successful consumption and waste.

Method used

When compressing the picture, the flag signal is set according to whether each area is composed of repetitive unit data. When decompression, if it is determined that the area is composed of repetitive unit data, one unit of data is selected for decoding once, and other encoded data are not decoded; if it is not all made of repetitive unit, it is determined that the repetitive unit data is determined. If the data is composed, normal decoding will be performed.

Benefits of technology

It significantly reduces the number of decoding operations, greatly reduces the power consumption waste of compression and decompression algorithms, and achieves ultra-low power consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119232957A_ABST
    Figure CN119232957A_ABST
Patent Text Reader

Abstract

The invention discloses an image compression and decompression method and device, equipment and a storage medium, and the method comprises the steps: setting a mark signal according to whether each region is composed of repeated unit data or not when a picture is compressed to generate a plurality of coded data, and enabling the picture to be composed of the regions; during decompression, according to a flag signal, if it is determined that each region is composed of repeated unit data, one unit data is selected from each region for primary decoding and other encoded data is not decoded, and if it is determined that each region is not composed of repeated unit data, a plurality of encoded data are normally decoded. According to the method, the characteristics of the picture data are considered, the mark signal is set during coding, and if it is confirmed that each region of the picture is composed of repeated unit data according to the mark signal during decoding, the decoding operation times can be reduced, and waste of power consumption of a compression and decompression algorithm can be greatly reduced, so that ultra-low power consumption can be achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image data processing, and in particular to an image compression and decompression method, device, equipment and storage medium. Background Art

[0002] Image compression (cmp) and decompression (dmp) are encoding and decoding algorithms in chips such as AMOLED driver chips in the prior art. Figure 1 FIG. 1 shows a flow chart of compression and decompression of an AMOLED driver chip in the prior art. Figure 1 As shown, the host computer (mobile phone motherboard, etc.) sends a frame of picture to the AMOLED driver chip. The AMOLED driver chip encodes the picture with a compression (cmp) algorithm inside, and sends the encoded data to the internal sram (a storage unit) for storage, and then decodes the encoded data through a decompression (dmp) algorithm. The AMOLED driver chip then sends the decoded data to the AMOLED screen for display, thereby completing the entire compression and decompression process. In this way, even if the host computer (mobile phone motherboard) does not update new data, the AMOLED screen can still display the data of the previous frame.

[0003] In the process of image compression and decompression, the prior art performs encoding and decoding operations on the entire frame of the image. For example, for an image resolution of 1080 columns * 2400 rows, the compression and decompression algorithm will perform 1080 * 2400 = 2592000 encoding operations and 1080 * 2400 = 2592000 decoding operations. However, this image compression and decompression method does not take into account the characteristics of the image data. For example, if the image is composed of multiple regions, and the region may be composed of repeated unit data, the region will perform the same multiple encoding and decoding operations, resulting in a waste of power consumption. Summary of the invention

[0004] In view of the above problems, the purpose of the present invention is to provide an image compression and decompression method, device, equipment and storage medium, which can greatly reduce the power consumption waste of compression and decompression algorithms, thereby achieving ultra-low power consumption. The present invention provides an image compression and decompression method, comprising: when compressing a picture to generate multiple coded data, setting a flag signal according to whether each area is composed of repeated unit data, wherein the picture is composed of the various areas; during decompression, according to the flag signal, if it is determined that the various areas are composed of repeated unit data, then a unit data is selected from the various areas for one decoding, and other coded data is not decoded; if it is determined that the various areas are not composed of repeated unit data, then the multiple coded data are normally decoded.

[0005] Optionally, setting a flag signal according to whether each region is composed of repeated unit data, wherein the picture is composed of the regions, includes: taking each row as a region, and setting a flag signal according to whether each region is composed of repeated unit data.

[0006] Optionally, setting a flag signal according to whether each region is composed of repeated unit data, wherein the picture is composed of the regions, includes: taking one frame as one region, and setting a flag signal according to whether each region is composed of repeated unit data.

[0007] Optionally, the flag signal is set according to whether each area is composed of repeated unit data, wherein the picture is composed of the areas, including: taking each row as an area, and setting a first flag signal according to whether each area is composed of repeated unit data; and then setting a second flag signal according to whether the rows are equal; according to the flag signal, if it is determined that the areas are composed of repeated unit data, then selecting a unit data from the areas for decoding once, and other encoded data are not decoded, including: according to the second flag signal, if it is determined that a frame is composed of repeated unit data, then selecting a unit data for decoding once, and other encoded data are not decoded; if it is determined that a frame is not composed of repeated unit data, then according to the first flag signal, if it is determined that each row is composed of repeated unit data, then selecting a unit data for decoding once, and other encoded data are not decoded.

[0008] Optionally, the image compression and decompression method further includes: storing and reading the multiple encoded data and the flag signal.

[0009] Optionally, the image compression and decompression method further includes: after decompression, restoring the picture data according to the decoded data, and then sending it to the receiving device; or, after decompression, restoring the picture data according to the decoded data and the flag signal, and then sending it to the receiving device.

[0010] Optionally, the image compression and decompression method further includes: after decompression, directly sending the decoded data to a receiving device; or, after decompression, directly sending the decoded data and the flag signal to the receiving device.

[0011] The present invention also provides an image compression and decompression device, comprising a compression module and a decompression module; when compressing an image to generate multiple encoded data, the compression module sets a flag signal according to whether each region is composed of repeated unit data, wherein the image is composed of the regions; when decompressing, the decompression module, based on the flag signal, if it is determined that each region is composed of repeated unit data, then selects a unit data from each region for decoding once, and does not decode other encoded data; if it is determined that each region is not composed of repeated unit data, then the multiple encoded data are decoded normally.

[0012] The present invention also provides a computer device, comprising a memory and a processor, wherein the memory stores executable codes, and the processor implements the steps of the above-mentioned image compression and decompression method when executing the executable codes.

[0013] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned image compression and decompression method are implemented.

[0014] The image compression and decompression method, device, equipment and storage medium provided by the present invention set a flag signal according to whether each area of ​​the image is composed of repeated unit data; during decompression, according to the flag signal, if it is determined that each area is composed of repeated unit data, a unit data is selected from the areas for decoding once, and other encoded data is not decoded. Therefore, the present invention takes into account the characteristics of the image data, sets a flag signal during encoding, and during decoding, according to the flag signal, if it is confirmed that each area of ​​the image is composed of repeated unit data, the number of decoding operations can be reduced, and the waste of power consumption of the compression and decompression algorithm can be greatly reduced, thereby achieving ultra-low power consumption. BRIEF DESCRIPTION OF THE DRAWINGS In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0015] Figure 1 The following is a flowchart showing the compression and decompression process of the AMOLED driver chip in the prior art; Figure 2 A flowchart of an image compression and decompression method according to a first embodiment of the present invention is shown; Figure 3 A flowchart of an image compression and decompression method according to a second embodiment of the present invention is shown; Figure 4A flowchart showing an implementation of an image compression and decompression method according to a third embodiment of the present invention is shown; Figure 5 A flowchart showing an implementation of an image compression and decompression method according to a fourth embodiment of the present invention is shown; Figure 6 A schematic structural diagram of an image compression and decompression device according to a fifth embodiment of the present invention is shown. DETAILED DESCRIPTION

[0016] The aforementioned and other technical contents, features and effects of the present invention will be clearly presented in the following detailed description of the preferred embodiments with reference to the drawings. Through the description of the specific implementation methods, the technical means and effects adopted by the present invention to achieve the intended purpose can be more deeply and specifically understood. However, the attached drawings are only for reference and illustration purposes, and are not used to limit the present invention. Some well-known parts may not be shown. In each of the drawings, the same elements are represented by similar reference numerals. For the sake of clarity, the various parts in the drawings are not necessarily drawn strictly in accordance with the actual proportions.

[0017] It should be understood that the terms "first", "second", "third", "fourth", etc. are only used to distinguish components or circuits with similar properties, rather than indicating or implying relative importance or a specific order. The terms "include", "comprises", or any other variation thereof, are intended to cover non-exclusive inclusion, and may include other elements not explicitly listed in addition to those listed elements.

[0018] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0019] First embodiment Figure 2 FIG. 2 shows a flow chart of an implementation of an image compression and decompression method according to a first embodiment of the present invention. Figure 2 As shown, the first embodiment provides an image compression and decompression method, the image compression and decompression method comprising: S110, when compressing a picture to generate a plurality of coded data, a flag signal is set according to whether each region is composed of repeated unit data, wherein the picture is composed of each region.

[0020] When compressing an image, a frame of the image can be divided into multiple rows and columns according to the resolution. For example, if the resolution is 1080 columns * 2400 rows, the image data has 1080 * 2400. This embodiment takes into account the characteristics of the image data, that is, the image data is often the same in a region, so the image can be set to consist of at least one region, and a region can be the size of a frame, or each row can be set as a region, or each column can be set as a region. The size and shape of each region can be the same or different, and the size of the region can be set according to the content of the image. According to whether each region is composed of repeated unit data, a flag signal is set. For example, if each region is composed of repeated unit data, the flag signal can be set to a high potential or a low potential, which is not limited in this application. The following example is a high potential, and the image data is composed of repeated unit data in each region, and the image data is actually composed of repeated unit data in each region; if each region is not composed of repeated unit data, the flag signal can be set to a corresponding potential, such as a low potential, and the image data is not composed of repeated unit data in at least one region.

[0021] S130, during decompression, according to the flag signal, if it is determined that each area is composed of repeated unit data, a unit data is selected from each area for decoding once, and other encoded data are not decoded. If it is determined that each area is not composed of repeated unit data, multiple encoded data are decoded normally.

[0022] When decompressing the image, it is determined based on the flag signal whether each area is composed of repeated unit data. For example, based on the high potential of the flag signal, it is determined that the image is composed of repeated unit data in each area, then one unit data is selected from each area for decoding once, and other encoded data are not decoded. For example, the resolution is 1080 columns * 2400 rows. If the area is set as one frame, the data on the area is composed of repeated unit data, that is, 1080*2400 data are repetitions of the same unit data, then the encoded data and decoded data of the 1080*2400 data should be the same. During decoding, only the decoded data of one unit data is required to obtain all the decoded data. For example, the first unit data can be decoded to obtain the decoded data, and the subsequent encoded data does not need to be decoded. Then, only one decoding is required to complete the decoding of one frame of the image. Compared with the prior art, 1080*2400 decoding is performed, the number of decoding operations can be reduced, and the waste of power consumption of the compression and decompression algorithm can be greatly reduced, thereby achieving ultra-low power consumption. If it is determined that each region is not composed of repeated unit data, then the picture data is not composed of repeated unit data in at least one region, and all the encoded data of one frame are decoded normally to ensure that all the decoded data of one frame are obtained.

[0023] Therefore, the image compression and decompression method of this embodiment takes into account the characteristics of the picture data, sets a flag signal during encoding, and during decoding, based on the flag signal, if it is confirmed that each area of ​​the picture is composed of repeated unit data, the number of decoding operations can be reduced, and the power consumption of the compression and decompression algorithm can be greatly reduced, thereby achieving ultra-low power consumption.

[0024] In one embodiment, if Figure 2 As shown, the image compression and decompression method further includes: S120, storing and reading a plurality of coded data and flag signals.

[0025] During the image processing process, the encoded data can be directly transmitted to the decoding module for decoding, or a storage module can be set in the middle to store and read the encoded data and flag signals. That is, after compression, the storage module can store multiple encoded data and flag signals; before decompression, multiple encoded data and flag signals can be read from the storage module for decoding. The storage module can be, but is not limited to, a static random access memory (SRAM). In electronic systems and computer hardware, SRAM is used as a storage solution for storing data and program information. It allows random access to storage units and is often used as a CPU cache (Cache), which can provide fast data access speed.

[0026] In one embodiment, the image compression and decompression method further includes: after decompression, restoring the picture data according to the decoded data, and then sending it to the receiving device; or, after decompression, restoring the picture data according to the decoded data and the flag signal, and then sending it to the receiving device. Specifically, according to the characteristics of the picture data, when each area of ​​the picture is composed of repeated unit data, only one decoding operation can be performed on the unit data of each area to obtain the decoded data. However, the receiving device may need the picture data before compression, and the decoded data needs to be restored to the picture data, that is, according to the decoded data corresponding to the unit data of each area, for example, the size of each area can be determined according to the number of decoded data, and then the number of repeated generation of the decoded data can be determined; or according to the decoded data and the flag signal corresponding to the unit data of each area, the size of each area can be determined by using the flag signal, and then the number of repeated generation of the decoded data can be determined; then, the number of repeated generation of the decoded data of each area is repeatedly generated, and all the data of each area is restored, so as to restore the picture data, and then the restored picture data is sent to the receiving device. The receiving device can be a device such as an AMOLED screen.

[0027] In one embodiment, the image compression and decompression method further includes: after decompression, directly sending the decoded data to the receiving device; or, after decompression, directly sending the decoded data and the flag signal to the receiving device. Specifically, the decoded data can be first sent to the receiving device, and then the image data is restored on the receiving device, which has the advantages of small amount of decoded data sent and fast transmission speed. According to the characteristics of the image data, when each area of ​​the image is composed of repeated unit data, only one decoding operation can be performed on the unit data of each area to obtain the decoded data. However, the receiving device may need the image data before compression, then the decoded data can be restored on the receiving device, that is, according to the decoded data corresponding to the unit data of each area, for example, the size of each area can be determined according to the number of decoded data, and then the number of repeated generation of the decoded data can be determined; or according to the decoded data and the flag signal corresponding to the unit data of each area, the size of each area can be determined by using the flag signal, and the number of repeated generation of the decoded data can be determined; then, the number of repeated generation of the decoded data of each area is repeatedly generated, and all the data of each area is restored, so as to restore the image data on the receiving device. The receiving device can be a device such as an AMOLED screen.

[0028] Second embodiment Figure 3 The implementation flow chart of the image compression and decompression method of the second embodiment of the present invention is shown. This embodiment provides an image compression and decompression method, and its principle and technical effects are the same as those of the first embodiment. For the sake of brief description, for parts not mentioned in this embodiment, reference can be made to the corresponding contents in the first embodiment. In this embodiment, a flag signal is set according to whether each area is composed of repeated unit data, wherein the picture is composed of various areas, including: taking each row as an area, and setting a flag signal according to whether each area is composed of repeated unit data. That is, the image compression and decompression method of this embodiment, such as Figure 3 As shown, the image compression and decompression method of this embodiment includes the following steps: S210, when compressing a picture to generate a plurality of coded data, each row is regarded as a region, and a flag signal is set according to whether each region is composed of repeated unit data.

[0029] When compressing an image, a frame of the image can be divided into multiple rows and columns according to the resolution. For example, if the resolution is 1080 columns*2400 rows, the image data has 1080*2400. In this embodiment, each row is regarded as an area, and a flag signal is set according to whether each area, i.e., each row, is composed of repeated unit data. For example, if each area, i.e., each row, is composed of repeated unit data, the flag signal can be set to a corresponding potential, such as a high potential, and the image data in each area, i.e., each row, is composed of repeated unit data, and the image data is essentially composed of repeated unit data in each area, i.e., each row; if each area, i.e., each row, is not composed of repeated unit data, the flag signal can be set to a corresponding potential, such as a low potential, and the image data in at least one area, i.e., at least one row, is not composed of repeated unit data.

[0030] S230, during decompression, according to the flag signal, if it is determined that each region is composed of repeated unit data, a unit data is selected from each region for decoding once, and other encoded data are not decoded. If it is determined that each region is not composed of repeated unit data, multiple encoded data are decoded normally.

[0031] When decompressing the image, according to the flag signal, it is determined whether each area, that is, each row, is composed of repeated unit data. If the flag signal is high, it is determined that the image is composed of repeated unit data in each area, that is, each row. Then, one unit data is selected from each area, that is, each row for decoding once, and other encoded data is not decoded. For example, if the resolution is 1080 columns * 2400 rows, if each row is regarded as an area, the data on the area is composed of repeated unit data, that is, 1080*2400 data is a repetition of one unit data in each row, then 1080*2400 0 data should be the same in the same row. When decoding, only the decoded data of one unit of data in each row is needed to obtain all the decoded data in each row. For example, the first encoded data in each row can be decoded to obtain the decoded data, and the subsequent encoded data does not need to be decoded. Then, only a few rows, that is, 2400 decodings are needed to complete the decoding of a frame of image. Compared with the prior art of 1080*2400 decoding, the number of decoding operations can be reduced, and the power consumption of the compression and decompression algorithm can be greatly reduced, thereby achieving ultra-low power consumption. If the flag signal is low, it is determined that each area, that is, each row, is not composed of repeated unit data. If the picture data is not composed of repeated unit data in at least one area, that is, at least one row, all the encoded data of a frame are decoded normally to ensure that all the decoded data of a frame are obtained.

[0032] Therefore, the image compression and decompression method of this embodiment takes into account the characteristics of the image data, sets a flag signal during encoding, and during decoding, based on the flag signal, if it is confirmed that each area of ​​the image, that is, each row, is composed of repeated unit data, then only a few rows need to be decoded to complete the decoding of a frame of the image, which can greatly reduce the waste of power consumption of the compression and decompression algorithm, thereby achieving ultra-low power consumption.

[0033] In one embodiment, if Figure 3 As shown, the image compression and decompression method further includes: S220, storing and reading a plurality of coded data and flag signals.

[0034] Third embodiment Figure 4 The implementation flow chart of the image compression and decompression method of the third embodiment of the present invention is shown. This embodiment provides an image compression and decompression method, and its principle and technical effects are the same as those of the first embodiment. For the sake of brief description, for parts not mentioned in this embodiment, reference can be made to the corresponding contents in the first embodiment. In this embodiment, a flag signal is set according to whether each area is composed of repeated unit data, wherein the picture is composed of various areas, including: taking a frame as a region, and setting a flag signal according to whether each area is composed of repeated unit data. That is, the image compression and decompression method of this embodiment, such as Figure 4 As shown, the image compression and decompression method of this embodiment includes the following steps: S310, when compressing a picture to generate a plurality of coded data, one frame is regarded as one region, and a flag signal is set according to whether each region is composed of repeated unit data.

[0035] When compressing an image, a frame of the image can be divided into multiple rows and columns according to the resolution. For example, if the resolution is 1080 columns*2400 rows, the image data has 1080*2400. In this embodiment, a frame is taken as an area, and a flag signal is set according to whether each area, i.e., a frame, is composed of repeated unit data. For example, if each area, i.e., a frame, is composed of repeated unit data, the flag signal can be set to a corresponding potential, such as a high potential, and the image data in each area, i.e., a frame, is composed of repeated unit data, and the image data is essentially composed of repeated unit data in each area, i.e., a frame; if each area, i.e., a frame, is not composed of repeated unit data, the flag signal can be set to a corresponding potential, such as a low potential, and the image data in at least one area, i.e., a frame, is not composed of repeated unit data.

[0036] S330, during decompression, according to the flag signal, if it is determined that each region is composed of repeated unit data, a unit data is selected from each region for decoding once, and other encoded data are not decoded. If it is determined that each region is not composed of repeated unit data, multiple encoded data are decoded normally.

[0037] When decompressing a picture, according to a flag signal, if it is determined that each region, that is, a frame, is composed of repeated unit data, for example, according to the flag signal being a high potential, it is determined that the picture is composed of repeated unit data in each region, then a unit data is selected from each region for decoding once, and other encoded data is not decoded. For example, if the resolution is 1080 columns * 2400 rows, if a frame is taken as a region, and the data on the region is composed of repeated unit data, that is, 1080*2400 data are a frame and are all repetitions of a unit data, then the encoded data and decoded data of 1080*2400 data should be the same in a frame. During decoding, only the decoded data of a unit data of a frame is required to obtain all the decoded data of each row. For example, the first unit data of a frame can be decoded to obtain the decoded data, and the subsequent encoded data does not need to be decoded. Then, only one decoding is required to complete the decoding of a frame of the image. Compared with the prior art that performs 1080*2400 decoding, the number of decoding operations can be reduced, and the waste of power consumption of the compression and decompression algorithm can be greatly reduced, thereby achieving ultra-low power consumption. If it is determined that each area, ie each row, is not composed of repeated unit data, then the picture data is not composed of repeated unit data in at least one area, and all the encoded data of a frame are decoded normally to ensure that all the decoded data of a frame are obtained.

[0038] Therefore, the image compression and decompression method of this embodiment takes into account the characteristics of the picture data, sets a flag signal during encoding, and during decoding, based on the flag signal, if it is confirmed that each area of ​​the picture, that is, a frame, is composed of repeated unit data, the number of decoding operations can be reduced, and only one decoding is required to complete the decoding of a frame of the image, which can greatly reduce the waste of power consumption of the compression and decompression algorithm, thereby achieving ultra-low power consumption.

[0039] In one embodiment, if Figure 4 As shown, the image compression and decompression method further includes: S320, storing and reading a plurality of coded data and flag signals.

[0040] Fourth embodiment Figure 5 The fourth embodiment of the present invention is a flowchart of an image compression and decompression method. This embodiment provides an image compression and decompression method, the principle and technical effects of which are the same as those of the first embodiment. For the sake of brief description, for parts not mentioned in this embodiment, reference may be made to the corresponding contents in the first embodiment. In this embodiment, the image compression and decompression method of this embodiment includes: According to whether each area is composed of repeated unit data, a flag signal is set, wherein the picture is composed of each area, including: taking each row as an area, and setting a first flag signal flag1 according to whether each area is composed of repeated unit data; and then setting a second flag signal flag2 according to whether each row is equal; According to the flag signal, if it is determined that each area is composed of repeated unit data, then one unit data is selected from each area for decoding once, and other encoded data is not decoded, including: according to the second flag signal flag2, if it is determined that a frame is composed of repeated unit data, then one unit data is selected from the frame for decoding once, and other encoded data is not decoded; if it is determined that a frame is not composed of repeated unit data, then according to the first flag signal flag1, if it is determined that each row is composed of repeated unit data, then one unit data is selected from each row for decoding once, and other encoded data is not decoded.

[0041] The image compression and decompression method of this embodiment is as follows: Figure 5 As shown, the image compression and decompression method may include the following steps: S410, send pictures through the host computer (mobile phone motherboard, etc.); S420, the compression module 100 encodes the image. When compressing the image to generate multiple encoded data, each row is regarded as a region. According to whether each region is composed of repeated unit data, a first flag signal flag1 is set; and according to whether each row is equal, a second flag signal flag2 is set.

[0042] When compressing an image, a frame of the image can be divided into multiple rows and columns according to the resolution. For example, if the resolution is 1080 columns*2400 rows, the image data has 1080*2400. In this embodiment, each row is first regarded as an area, and the first flag signal flag1 is set according to whether each area, i.e., each row, is composed of repeated unit data. For example, if each area, i.e., each row, is composed of repeated unit data, the first flag signal flag1 can be set to a corresponding potential, such as a high potential, and the image data in each area, i.e., each row, is composed of repeated unit data, and the image data is essentially composed of repeated unit data in each area, i.e., each row; on the contrary, if each area, i.e., each row, is not composed of repeated unit data, the first flag signal flag1 can be set to a corresponding potential, such as a low potential. Then, according to whether the rows are equal, the second flag signal flag2 is set. For example, if each area, that is, each row, is composed of repeated unit data, and the rows are equal, then one frame is composed of repeated unit data, and the second flag signal flag2 can be set to a corresponding potential, such as a high potential, then the picture data in one frame is composed of repeated unit data, and the picture data is actually composed of repeated unit data of one frame; if the rows are not equal, then one frame is not composed of repeated unit data, and the second flag signal flag2 can be set to a corresponding potential, such as a low potential, then the picture data in one frame is not composed of repeated unit data.

[0043] S430, storing and reading a plurality of coded data and flag signals through a storage module 200 such as SRAM.

[0044] S440, during decompression, according to the second flag signal flag2, if it is determined that a frame is composed of repeated unit data, then the frame selects a unit data for decoding once, and other encoded data are not decoded; if it is determined that a frame is not composed of repeated unit data, then according to the first flag signal flag1, if it is determined that each row is composed of repeated unit data, then each row selects a unit data for decoding once, and other encoded data are not decoded; if it is determined that each area is not composed of repeated unit data, multiple encoded data are decoded normally.

[0045] When decompressing the image, it is determined based on the second flag signal flag2 whether a frame is composed of repeated unit data. If the second flag signal flag2 is at a high level, it is determined that the image data in a frame is composed of repeated unit data. In this case, a unit data is selected from a frame for decoding once, and other encoded data are not decoded. For example, if the resolution is 1080 columns * 2400 rows, if a frame is taken as an area, and the data in the area is composed of repeated unit data, that is, 1080*2400 data are all repetitions of one unit data in a frame, then the encoded data and decoded data of the 1080*2400 data should be the same in one frame. During decoding, only the decoded data of one unit data in a frame is needed to obtain all the decoded data. For example, the first unit data of a frame can be decoded to obtain the decoded data, and the subsequent encoded data does not need to be decoded. In this way, only one decoding is required to complete the decoding of a frame of image. If the second flag signal flag2 is at a low level, it is determined that the picture data in one frame is not composed of repeated unit data. Then, according to the first flag signal flag1, it is determined whether each row of the picture is composed of repeated unit data. If the first flag signal flag1 is at a high level, it is determined that the picture is composed of repeated unit data in each area, that is, each row. Then, one unit data is selected from each area, that is, each row for decoding once, and other encoded data is not decoded. For example, if the resolution is 1080 columns * 2400 rows, if each row is regarded as an area, and the data on the area is composed of repeated unit data, that is, 1080*2400 data is a repetition of one unit data in each row, then 1080 columns * 2400 rows are selected. The encoded data and decoded data of 0*2400 data should be the same in the same row. During decoding, only the decoded data of one unit data of each row is needed to obtain all the decoded data of each row. For example, the first encoded data of each row can be decoded to obtain the decoded data, and the subsequent encoded data does not need to be decoded. Then, only several rows, i.e., 2400 decodings are needed to complete the decoding of one frame of image. If the first flag signal flag1 is at a low level, it is determined that each area, i.e., each row, is not composed of repeated unit data. Then, the picture data is not composed of repeated unit data in at least one area, i.e., at least one row. Then, all the encoded data of a frame are decoded normally to ensure that all the decoded data of a frame are obtained.

[0046] S450 pushes the decoded data to a receiving device such as an AMOLED screen.

[0047] Therefore, the image compression and decompression method of this embodiment takes into account the characteristics of the picture data, and can set the first flag signal flag1 according to whether each area of ​​the picture, that is, each row, is composed of repeated unit data. The second flag signal flag2 can also be set according to whether each area of ​​the picture, that is, a frame, is composed of repeated unit data. During decoding, if the second flag signal flag2 is at a high potential, only one decoding is required to complete the decoding of one frame of the image, or if the second flag signal flag2 is at a low potential and the first flag signal flag1 is at a high potential, only a few rows of decoding are required to complete the decoding of one frame of the image, which can reduce the number of decoding operations and greatly reduce the waste of power consumption of the compression and decompression algorithm, thereby achieving ultra-low power consumption.

[0048] Fifth embodiment Based on the same inventive concept, Figure 6 As shown, the fifth embodiment of the present invention also provides an image compression and decompression device, including: a compression module 100 and a decompression module 300; when compressing a picture to generate multiple coded data, the compression module 100 sets a flag signal according to whether each region is composed of repeated unit data, wherein the picture is composed of various regions; when decompressing, the decompression module 300, according to the flag signal, if it is determined that each region is composed of repeated unit data, then selects a unit data from each region for one decoding, and does not decode other coded data; if it is determined that each region is not composed of repeated unit data, then the multiple coded data are normally decoded. The implementation of the image compression and decompression device can refer to the above-mentioned embodiment of the image compression and decompression method, and the repeated parts will not be repeated.

[0049] In one embodiment, if Figure 6 As shown, the image compression and decompression device further includes: a storage module 200, which stores and reads a plurality of coded data and flag signals.

[0050] Based on the same inventive concept, an embodiment of the present invention further provides a computer device, including a memory and a processor, wherein the memory stores executable code, and the processor implements the steps of the image compression and decompression method of the aforementioned embodiment when executing the executable code. The implementation of the computer device can refer to the embodiment of the above-mentioned image compression and decompression method, and the repeated parts will not be repeated.

[0051] Based on the same inventive concept, an embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the image compression and decompression method of the aforementioned embodiment are implemented. The implementation of the computer-readable storage medium can refer to the embodiment of the above-mentioned image compression and decompression method, and the repeated parts will not be repeated.

[0052] The image compression and decompression method, device, equipment and storage medium provided by the embodiments of the present invention set a flag signal according to whether each area of ​​the image is composed of repeated unit data; during decompression, according to the flag signal, if it is determined that each area is composed of repeated unit data, then a unit data is selected from each area for decoding once, and other encoded data is not decoded. Therefore, the present invention takes into account the characteristics of the image data, sets a flag signal during encoding, and during decoding, according to the flag signal, if it is confirmed that each area of ​​the image is composed of repeated unit data, the number of decoding operations can be reduced, and the waste of power consumption of the compression and decompression algorithm can be greatly reduced, thereby achieving ultra-low power consumption.

[0053] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the above features are replaced with (but not limited to) technical features with similar functions disclosed in the present application.

Claims

1. An image compression and decompression method, characterized in that: include: When compressing a picture to generate a plurality of coded data, setting a flag signal according to whether each region is composed of repeated unit data, wherein the picture is composed of the regions; During decompression, based on the flag signal, if it is determined that the regions are all composed of repeated unit data, one unit data is selected from the regions for decoding once, and other encoded data are not decoded; if it is determined that the regions are not all composed of repeated unit data, the multiple encoded data are decoded normally.

2. The image compression and decompression method according to claim 1, characterized in that: The flag signal is set according to whether each area is composed of repeated unit data, wherein the picture is composed of the areas, including: taking each row as an area, and setting the flag signal according to whether each area is composed of repeated unit data.

3. The image compression and decompression method according to claim 1, characterized in that: The flag signal is set according to whether each region is composed of repeated unit data, wherein the picture is composed of the regions, including: taking one frame as one region, and setting the flag signal according to whether each region is composed of repeated unit data.

4. The image compression and decompression method according to claim 1, characterized in that: The flag signal is set according to whether each area is composed of repeated unit data, wherein the picture is composed of the areas, including: taking each row as an area, setting a first flag signal according to whether each area is composed of repeated unit data; and setting a second flag signal according to whether each row is equal; The method of selecting one unit data from each region for decoding once, and not decoding other coded data, if it is determined according to the flag signal that each region is composed of repeated unit data, and selecting one unit data from each region for decoding once, and not decoding other coded data, includes: if it is determined according to the second flag signal that a frame is composed of repeated unit data, selecting one unit data from the frame for decoding once, and not decoding other coded data; if it is determined that a frame is not composed of repeated unit data, then according to the first flag signal, if it is determined that each row is composed of repeated unit data, selecting one unit data from each row for decoding once, and not decoding other coded data.

5. The image compression and decompression method according to claim 1, characterized in that: Also includes: The plurality of encoded data and the flag signal are stored and read.

6. The image compression and decompression method according to claim 1, characterized in that: Also includes: After decompression, the image data is restored based on the decoded data and then sent to the receiving device; Alternatively, after decompression, the picture data is restored according to the decoded data and the flag signal, and then sent to the receiving device.

7. The image compression and decompression method according to claim 1, characterized in that: Also includes: After decompression, the decoded data is sent directly to the receiving device; Alternatively, after decompression, the decoded data and the flag signal are directly sent to the receiving device.

8. An image compression and decompression device, characterized in that: include: A compression module, wherein when compressing a picture to generate a plurality of coded data, the compression module sets a flag signal according to whether each region is composed of repeated unit data, wherein the picture is composed of the regions; The decompression module, when decompressing, according to the flag signal, if it is determined that the regions are all composed of repeated unit data, then one unit data is selected from the regions for decoding once, and other encoded data are not decoded; if it is determined that the regions are not all composed of repeated unit data, then the multiple encoded data are decoded normally.

9. A computer device comprising a memory and a processor, wherein the memory stores executable code, characterized in that: When the processor executes the executable code, the steps of the image compression and decompression method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the image compression and decompression method according to any one of claims 1 to 7 are implemented.