Wavelet coding method for image data compression
By dividing the image data into multiple channels in parallel processing, using wavelet transformation and bit transformation technologies, the problem of high computational complexity of existing wavelet encoding algorithms is solved, and efficient image data compression is achieved.
Patent Information
- Application Number
- CN202510205960.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-25
- Publication Date
- 2025-05-30
AI Technical Summary
The existing wavelet encoding algorithm has high computational complexity, making it difficult to effectively compress image/video data, and is implemented in a complex manner.
By dividing the pixel array into multiple channel data, and performing wavelet transformation and bit transformation in parallel in multiple data processing channels, redundant data is removed and the compression ratio is improved.
The compression ratio of image data compression is significantly improved, the calculation process is simplified, and the data processing efficiency is improved.
Smart Images

Figure CN120075470A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image data processing, and more specifically, relates to a wavelet coding method for image data compression. Background Art
[0002] With the development of technology, the Graphics Processing Unit (GPU) needs to bear a huge bandwidth pressure. First, the resolution of videos is getting higher and higher. For example, from high definition (1920x1080) to 4K (3840x2160) resolution, the number of pixels has increased by 4 times. The GPU needs to read and write more pixel data, and the bandwidth requirement of the frame buffer memory has increased significantly. Second, the frame rate of videos has also become higher. A higher frame rate can provide a smoother animation and gaming experience, but it also requires more frame buffer memory bandwidth to process and present more image frames. In addition, modern games and graphics applications usually use multi-level shaders and various post-processing effects (such as dynamic shadows, global illumination, etc.). These effects need to read and write the frame buffer in multiple rendering stages, thus increasing the demand for frame buffer memory bandwidth.
[0003] Image / video compression technology can reduce the bandwidth and storage space required for storing and transmitting image / video data. The wavelet coding algorithm plays an important role in image / video compression. The computational complexity of traditional wavelet coding algorithms is relatively high. It is necessary to convolve the signal with a set of wavelet basis functions, and then extract the frequency domain information of the signal by selecting appropriate wavelet basis functions and scales. This involves analyzing the characteristics of the signal, selecting appropriate parameters such as wavelet basis functions, scales, and thresholds, and the amount of calculation is large, and it is relatively complex to implement. Summary of the Invention
[0004] Aiming at the above defects or improvement requirements of the prior art, the present invention provides a wavelet coding method for image data compression, which can effectively encode image / pixel data, significantly improve the compression ratio of subsequent data compression, and is simple and efficient in calculation.
[0005] To achieve the above object, according to one aspect of the present invention, there is provided a wavelet coding method for image data compression, including:
[0006] Determine the pixel array P to be processed;
[0007] Divide the pixel data in the pixel array P respectively to obtain m channel data of each pixel;
[0008] Send the m pixel channel data of each pixel in the pixel array P to m different data processing channels respectively, where the channel data at the same position of different pixels in the pixel array P is sent to the same data processing channel;
[0009] In the m data processing channels, arrange the extracted channel data according to the arrangement of pixels in the pixel array P to form m channel arrays P1 to Pm;
[0010] Perform wavelet transform on the channel data in the m channel arrays P1 to Pm respectively, convert the pixel value of the source pixel represented by the channel data into a pixel difference value, and obtain the wavelet-transformed channel arrays PT1 to PTm.
[0011] In some embodiments, converting the pixel value of the source pixel represented by the channel data into a pixel difference value includes:
[0012] Interpolate between two reference pixels R1 and R2, linearly predict the value of the source pixel S, and obtain a predicted value;
[0013] Calculate the difference value between the value of the source pixel and the predicted value.
[0014] In some embodiments, preferentially select two pixels that are adjacent to the source pixel and symmetric to the source pixel in space as reference pixels, and on this basis, adjust the selection of reference pixels in consideration of the processing efficiency of wavelet transform.
[0015] In some embodiments, performing wavelet transform on the channel data in any one of the m channel arrays P1 to Pm includes: for each channel data, performing wavelet transform in the row direction and in the column direction.
[0016] In some embodiments, performing wavelet transform on the channel data in any one of the m channel arrays P1 to Pm includes: for each channel data, first performing wavelet transform in the row direction, and then performing wavelet transform in the column direction.
[0017] In some embodiments, performing wavelet transform on the channel data in any one of the m channel arrays P1 to Pm includes:
[0018] In the first cycle, complete the wavelet transform in the row direction of one row of data Row-a;
[0019] In the last cycle, complete the wavelet transform in the column direction of another row of data Row-b; where the data Row-b and the data Row-a are in different rows;
[0020] After the first cycle and before the last cycle, in each cycle, perform the wavelet transform of one row of data Row-c in the row direction and the wavelet transform of another row of data Row-d in the column direction; wherein, data Row-c is a row of data other than data Row-a, data Row-d is a row of data other than data Row-b, and data Row-d and data Row-c are in different rows.
[0021] In some embodiments, performing wavelet transform on the channel data in any one of the m channel arrays P1 to Pm includes: for any row of data Row-x, perform the wavelet transform of data Row-x in the row direction in one cycle and perform the wavelet transform of data Row-x in the column direction in the next cycle.
[0022] In some embodiments, the above wavelet coding method further includes:
[0023] Group the data in the wavelet-transformed channel arrays PT1 to PTm respectively, and perform bit transformation on the data within the group as a unit, so that the data within the group after bit transformation has as many identical most significant bits as possible.
[0024] In some embodiments, perform bit transformation on the data within the group so that as many of the most significant bits of the data within the group after bit transformation are 0 as possible.
[0025] In some embodiments, performing bit transformation on the data within the group includes:
[0026] Shift the sign bit of the data to the least significant bit and shift the other bits except the sign bit of the data one bit higher;
[0027] When the sign bit located at the least significant bit is 1, invert the other bits except the sign bit located at the least significant bit;
[0028] When the sign bit located at the least significant bit is 0, keep the other bits except the sign bit located at the least significant bit unchanged.
[0029] In some embodiments, the above wavelet coding method further includes: replacing the most significant bit of the data within the group with the number value of the identical most significant bits that the data within the group after bit transformation has.
[0030] According to another aspect of the present invention, there is provided a wavelet coding method for image data compression, including:
[0031] Determine the pixel array P to be processed;
[0032] Perform wavelet transform on the pixel data in the pixel array P, convert the pixel value of the source pixel into a pixel difference value, and obtain the wavelet-transformed pixel array PT;
[0033] Among them, converting the pixel value of the source pixel into a pixel difference value includes:
[0034] Interpolate between two reference pixels R1 and R2, linearly predict the value of the source pixel S to obtain a predicted value;
[0035] Calculate the difference between the value of the source pixel and the predicted value.
[0036] Generally speaking, compared with the prior art, the above technical solution conceived by the present invention has the following beneficial effects: By comparing adjacent pixels, taking adjacent pixels as reference pixels, interpolating between two reference pixels, linearly predicting the source pixel, and converting the pixel value of the source pixel into a pixel difference value with a smaller absolute value, redundant data can be effectively removed; Group the data after wavelet transform, and utilize the characteristic that a small amount of data helps to obtain more similarities. Perform bit transformation on the data within the group separately for each group to increase the possibility of removing redundancy and facilitate data compression in the subsequent compression stage; Wavelet coding of image data can be performed in parallel through multiple compression channels, and then the wavelet-coded data is sent to a downstream module for compression processing. The entire wavelet coding process is simple and efficient in calculation, and can significantly improve the compression ratio of subsequent data compression. Description of the Drawings
[0037] Figure 1 is a schematic flowchart of a wavelet coding method for image data compression according to an embodiment of the present invention;
[0038] Figure 2 is a schematic diagram of dividing the data of a pixel array into multiple data processing channels according to an embodiment of the present invention;
[0039] Figure 3 is a schematic diagram of performing wavelet transform on pixels based on the Lift function according to an embodiment of the present invention;
[0040] Figure 4 is a schematic diagram of performing wavelet transform on data arranged in an array according to an embodiment of the present invention;
[0041] Figure 5 is a schematic diagram of grouping and bit-transforming the data after wavelet transform according to an embodiment of the present invention. Detailed Embodiments
[0042] To make the objectives, technical solutions and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention. As those skilled in the art can recognize, the described embodiments can be modified in various different ways without departing from the spirit or scope of the present application. Therefore, the accompanying drawings and descriptions are considered to be exemplary in nature rather than restrictive.
[0043] As Figure 1 shown, the wavelet coding method for image data compression according to an embodiment of the present invention includes:
[0044] Step S101: Determine the pixel array P to be processed. The size of the pixel array P is 2 n ×2 n , that is, the pixel array P contains 2 n ×2 n pixels, 2 n horizontally and 2 n vertically. Among them, n≥2 and n is a natural number.
[0045] Step S103: Divide the pixel data in the pixel array P respectively to obtain channel data for each channel.
[0046] In some embodiments, the specific processing method is as follows: In the same way, divide the pixel data of each pixel in the pixel array P to obtain m channel data for each pixel, which are respectively labeled as the first channel data to the mth channel data, where m≥2.
[0047] Step S105: Send the channel data of each pixel in the pixel array P to different data processing channels for processing. Among them, the channel data at the same position of different pixels in the pixel array P are sent to the same data processing channel for processing. A total of m data processing channels are required, which are the first data processing channel to the mth data processing channel respectively.
[0048] In some embodiments, the first channel data of each pixel in the pixel array P is sent to the first data processing channel, and so on, and the mth channel data of each pixel in the pixel array P is sent to the mth data processing channel.
[0049] Step S107: In the m data processing channels, arrange the extracted channel data according to the arrangement of the pixels in the pixel array P to form m channel arrays P1 to Pm. The size of each channel array is 2 n ×2 n , containing 2 n ×2 n channel data.
[0050] Step S109: Use m data processing channels to perform wavelet transform on the channel data in m channel arrays P1 to Pm respectively, to obtain wavelet-transformed channel arrays PT1 to PTm. Among them, the wavelet transform of the channel data in the m channel arrays is completed independently and in parallel in their corresponding data processing channels.
[0051] As Figure 2 shown, the size of the pixel array P to be processed is 2 3 ×2 3 (To facilitate the display of the formation process of the channel array, the array structure of the pixel array P is not shown in the figure), and it contains a total of 64 32-bit pixels p0 to p63. Taking the pixel p0 as an example, the pixel data of p0 is divided to obtain 4 channel data, namely the first channel data p0[7:0], the second channel data p0[15:8], the third channel data p0[23:16], and the fourth channel data p0[31:24]. The remaining pixels p1 to p63 are divided in the same way.
[0052] A total of 4 data processing channels Channel0 to Channel3 are required. Specifically, the first channel data of p0 to p63 is sent to the first data processing channel Channel0, the second channel data of p0 to p63 is sent to the second data processing channel Channel1, the third channel data of p0 to p63 is sent to the third data processing channel Channel2, and the fourth channel data of p0 to p63 is sent to the fourth data processing channel Channel3.
[0053] In some embodiments, without dividing the pixel data, directly perform the following steps: perform wavelet transform on the pixel data in the pixel array P, and only one data processing channel is required.
[0054] In some embodiments, based on the Lift function, perform wavelet transform on the data arranged in a 2 n ×2 n array. Among them, the inputs of the Lift function include: the source pixel S and two reference pixels R1 and R2 of the source pixel. By interpolating between the two reference pixels R1 and R2 through the Lift function, a linear prediction is made on the value of the source pixel S to obtain a predicted value, and the difference between the value of the source pixel and the predicted value is used as the output Lift(R1, R2, S) of the Lift function.
[0055] In some embodiments, two pixels that are adjacent to the source pixel and spatially symmetric with respect to the source pixel are preferentially selected as reference pixels, and on this basis, considering the processing efficiency of the wavelet transform, the selection of the reference pixels is adjusted.
[0056] As shown Figure 3 in FIG. 1, for a source pixel S, two reference pixels R1 and R2 that are spatially symmetric with respect to the source pixel S, interpolation is performed between the two reference pixels R1 and R2, and a linear prediction is made on the value of the source pixel S to obtain a predicted value LP. The difference WT between the value S0 of the source pixel S and the predicted value LP is used as the output of the Lift function.
[0057] In some embodiments, the data arranged in a 2 n ×2 n array is the channel data in channel arrays P1 to Pm, and the transformed channel arrays PT1 to PTm are obtained.
[0058] In other embodiments, the data arranged in a 2 n ×2 n array is the pixel data in pixel array P, and the transformed pixel array PT is obtained.
[0059] In some embodiments, performing wavelet transform on the data arranged in a 2 n ×2 n array includes: for each piece of data arranged in an array, performing wavelet transform in both the row direction and the column direction. Further, for each piece of data arranged in an array, performing wavelet transform in the row direction first and then in the column direction.
[0060] In some embodiments, performing wavelet transform on the data arranged in a 2 n ×2 n array includes: in the first period, completing the wavelet transform in the row direction for one row of data Row-a; in the last period, completing the wavelet transform in the column direction for another row of data Row-b, where data Row-b and data Row-a are in different rows; in each period after the first period and before the last period, completing the wavelet transform in the row direction for one row of data Row-c and the wavelet transform in the column direction for another row of data Row-d, where data Row-c is a row of data other than data Row-a, data Row-d is a row of data other than data Row-b, and data Row-d and data Row-c are in different rows.
[0061] In some embodiments, performing wavelet transform on the data arranged in a 2 n ×2 n array includes: for any row of data Row-x, completing the wavelet transform in the row direction for data Row-x in one period and completing the wavelet transform in the column direction for data Row-x in the next period.
[0062] As shown Figure 4 in FIG. 23 ×2 3 The array has 8 rows, namely row0 to row7, and each row has 8 data, namely A to H (it should be understood that the data in each row is likely to be different. For the convenience of explanation, they are uniformly marked as A to H here). For 2 3 ×2 3 Perform wavelet transform on the data arranged in the array. In the first cycle cycle1, complete the wavelet transform of the data in the first row row0 in the row direction; in the second cycle cycle2, complete the wavelet transform of the data in the fifth row row4 in the row direction, and complete the wavelet transform of the data in the first row row0 in the column direction; in the third cycle cycle3, complete the wavelet transform of the data in the third row row2 in the row direction, and complete the wavelet transform of the data in the fifth row row4 in the column direction; in the fourth cycle cycle4, complete the wavelet transform of the data in the second row row1 in the row direction, and complete the wavelet transform of the data in the third row row2 in the column direction; in the fifth cycle cycle5, complete the wavelet transform of the data in the fourth row row3 in the row direction, and complete the wavelet transform of the data in the second row row1 in the column direction; in the sixth cycle cycle6, complete the wavelet transform of the data in the seventh row row6 in the row direction and complete the wavelet transform of the data in the fourth row row3 in the column direction; in the seventh cycle cycle7, complete the wavelet transform of the data in the sixth row row5 in the row direction and complete the wavelet transform of the data in the seventh row row6 in the column direction; in the eighth cycle cycle8, complete the wavelet transform of the data in the eighth row row7 in the row direction and complete the wavelet transform of the data in the sixth row row5 in the column direction; in the ninth cycle cycle9, complete the wavelet transform of the data in the 8th row row7 in the column direction.
[0063] For any row of data A to H in row0 to row7, based on the Lift function, complete the wavelet transform in the row direction to obtain new data A' to H', and the formula is as follows:
[0064] A' = Lift(0, 0, A)
[0065] B' = Lift(A, C, B)
[0066] C' = Lift(A, E, C)
[0067] D' = Lift(C, E, D)
[0068] E' = Lift(A, A, E)
[0069] F' = Lift(E, G, F)
[0070] G' = Lift(E, E, G)
[0071] H’ = Lift(G, G, H)
[0072] Correspondingly, in the first cycle cycle1, the first row of data row0 completes the wavelet transform in the row direction according to the above formula; in the second cycle cycle2, the fifth row of data row4 completes the wavelet transform in the row direction according to the above formula. The first row of data row0 that has completed the wavelet transform in the row direction uses 0 as the reference pixel and continues to complete the wavelet transform in the column direction; in the third cycle cycle3, the third row of data row2 completes the wavelet transform in the row direction according to the above formula. The fifth row of data row4 that has completed the wavelet transform in the row direction uses the first row of data row0 as the reference pixel and continues to complete the wavelet transform in the column direction; in the fourth cycle cycle4, the second row of data row1 completes the wavelet transform in the row direction according to the above formula. The third row of data row2 that has completed the wavelet transform in the row direction uses the first row of data row0 and the fifth row of data row4 as the reference pixels and continues to complete the wavelet transform in the column direction; in the fifth cycle cycle5, the fourth row of data row3 completes the wavelet transform in the row direction according to the above formula. The second row of data row1 that has completed the wavelet transform in the row direction uses the first row of data row0 and the third row of data row2 as the reference pixels and continues to complete the wavelet transform in the column direction; in the sixth cycle cycle6, the seventh row of data row6 completes the wavelet transform in the row direction according to the above formula. The fourth row of data row3 that has completed the wavelet transform in the row direction uses the fifth row of data row4 and the third row of data row2 as the reference pixels and continues to complete the wavelet transform in the column direction; in the seventh cycle cycle7, the sixth row of data row5 completes the wavelet transform in the row direction according to the above formula. The seventh row of data row6 that has completed the wavelet transform in the row direction uses the fifth row of data row4 as the reference pixel and continues to complete the wavelet transform in the column direction; in the eighth cycle cycle8, the eighth row of data row7 completes the wavelet transform in the row direction according to the above formula. The sixth row of data row5 that has completed the wavelet transform in the row direction uses the fifth row of data row4 and the seventh row of data row6 as the reference pixels and continues to complete the wavelet transform in the column direction; in the ninth cycle cycle9, the eighth row of data row7 that has completed the wavelet transform in the row direction uses the seventh row of data row6 as the reference pixel and continues to complete the wavelet transform in the column direction.
[0073] In the above way, by processing row by row, first performing the wavelet transform in the row direction and then in the column direction, the data that has completed the wavelet transform in the row direction can be directly used for the wavelet transform in the column direction. In one cycle, it is possible to simultaneously complete the wavelet transform in the row direction for one row of data and the wavelet transform in the column direction for another row of data, reducing the waiting time. It only takes 9 cycles to process a tile containing 64 pixels.
[0074] In some embodiments, the wavelet transform obtains the transformed channel arrays PT1 to PTm. By transforming the pixel values of the source pixels represented by the channel data in the original channel arrays P1 to Pm into pixel difference values in the channel arrays PT1 to PTm, redundant data can be effectively removed.
[0075] In other embodiments, the wavelet transform obtains the transformed pixel array PT. By transforming the pixel values in the original pixel array P into pixel difference values in the pixel array PT, redundant data can be effectively removed.
[0076] Step S111: Group the data in the wavelet-transformed channel arrays PT1 to PTm respectively. Each group of data has a 2 k ×2 k array structure. Taking the group as a unit, perform bit transformation on the data within the group so that the data within the group after the bit transformation has as many identical most significant bits (MSBs) as possible, thereby increasing the possibility of removing redundancy, where k is a natural number.
[0077] In other embodiments, group the data in the wavelet-transformed pixel array PT. Each group of data has a 2 k ×2 k array structure. Taking the group as a unit, perform bit transformation on the data within the group so that the data within the group after the bit transformation has as many identical most significant bits (MSBs) as possible, thereby increasing the possibility of removing redundancy, where k is a natural number.
[0078] Since the reference pixel selected during the wavelet transform is a pixel as close as possible to the source pixel, the absolute value of the difference obtained by the wavelet transform is relatively small. For a negative number, the value is small and the possibility of the high bit being 1 is large, so inversion is performed. After inversion, the high bit is as likely to be zero as possible. For a positive number, its value is relatively small and does not need to be inverted, and the possibility of the high bit being zero is large. After the bit transformation process, the high bits of the obtained data are 0, and the high bits can be discarded during encoding, thereby achieving the purpose of data compression.
[0079] In some embodiments, perform bit transformation on the data within the group so that as many of the most significant bits of the data within the group after the bit transformation are 0 as possible. Utilizing this characteristic, the data within the group can be encoded using fewer bits, facilitating data compression in the subsequent compression stage.
[0080] In some embodiments, performing bit transformation on the data within a group includes: shifting the sign bit of the data to the least significant bit (LSB), shifting the other bits except the sign bit of the data one bit higher; when the sign bit located at the least significant bit is 1, inverting the other bits except the sign bit located at the least significant bit; when the sign bit located at the least significant bit is 0, keeping the other bits except the sign bit located at the least significant bit unchanged.
[0081] As Figure 5 shown, the data in the channel arrays PT1 to PTm after wavelet transformation are respectively grouped, and each group of data has a 2×2 array structure. Taking the group as a unit, bit transformation is performed on the data within the group. For the input data 11111010, shift the sign bit 1 to the least significant bit, shift the other bits except the sign bit 1 one bit higher, obtaining 11110101. Since the least significant bit is 1, invert the other bits except the least significant bit 1, obtaining the output data 00001011. For the input data 00001001, shift the sign bit 0 to the least significant bit, shift the other bits except the sign bit 0 one bit higher, obtaining 00010010. Since the least significant bit is 0, keep the other bits except the least significant bit 0 unchanged, obtaining the output data 00010010. For the input data 11111110, shift the sign bit 1 to the least significant bit, shift the other bits except the sign bit 1 one bit higher, obtaining 11111101. Since the least significant bit is 1, invert the other bits except the least significant bit 1, obtaining the output data 00000011. For the input data 11111101, shift the sign bit 1 to the least significant bit, shift the other bits except the sign bit 1 one bit higher, obtaining 11111011. Since the least significant bit is 1, invert the other bits except the least significant bit 1, obtaining the output data 00000101.
[0082] It can be seen that after performing bit transformation processing on the wavelet-transformed data 11111010, 00001001, 11111110, and 11111101, the encoded data 00001011, 00010010, 00000011, and 00000101 are obtained. That is, more high-order 0s can be obtained through bit transformation.
[0083] Further, these high-order 0s can be encoded, and the number value of the same most significant bit of the data within the group after bit transformation is used to replace the most significant bit of the data within the group. Specifically, since the highest three bits of the four byte data 00001011, 00010010, 00000011, and 00000101 are all 0s, it can be represented by 11 (corresponding to the numerical value 3), and the remaining data can be concatenated later. That is to say, only the number of the same most significant bits of the data within the group after bit transformation needs to be represented, so that the highest three bits that originally needed to be represented by 12 bits only need to be represented by 2 bits, and thus the data can be effectively compressed.
[0084] In the present invention, by comparing adjacent pixels, taking the adjacent pixels as reference pixels, interpolating between two reference pixels, linearly predicting the source pixels, and converting the pixel values of the source pixels into pixel difference values with smaller absolute values, redundant data can be effectively removed; grouping the data after wavelet transform, taking advantage of the characteristic that a smaller amount of data helps to obtain more similarities, and performing bit transformation on the data within the group unit by unit to increase the possibility of removing redundancy, which is convenient for subsequent compression of the data in the compression stage; wavelet coding of the image data can be performed in parallel through multiple compression channels, and then the data after wavelet coding is sent to a downstream module for compression processing. The entire wavelet coding process is simple and efficient in calculation, and can significantly improve the compression ratio of subsequent data compression.
[0085] In the description of this specification, the description with reference to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.
[0086] In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" can explicitly or implicitly include at least one of these features. In the description of the present application, "a plurality of" means two or more, unless otherwise specifically defined.
[0087] Any process or method description represented in a flowchart or otherwise described herein can be understood to represent a module, segment, or portion of code including one or more (two or more) executable instructions for implementing a specific logical function or process. And the scope of the preferred embodiments of the present application includes additional implementations, where the functions can be performed in a substantially simultaneous manner or in a reverse order according to the functions involved, rather than in the order shown or discussed.
[0088] The logic and / or steps represented in a flowchart or otherwise described herein, for example, can be considered a sequenced list of executable instructions for implementing a logical function, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device), or in conjunction with these instruction execution systems, apparatuses, or devices.
[0089] It should be understood that various parts of the present application can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. All or part of the steps of the above example methods can be completed by a program instructing relevant hardware. The program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiments.
[0090] In addition, in each embodiment of the present application, the functional units can be integrated into one processing module, or each unit can exist physically alone, or two or more units can be integrated into one module. The above integrated module can be implemented in the form of hardware or in the form of a software functional module. When the above integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. The storage medium can be a read-only memory, a disk, an optical disc, etc.
[0091] As described above, the above are only specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of various changes or substitutions, and these should all be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A wavelet coding method for image data compression, characterized in that: include: Determine a pixel array P to be processed; Divide the pixel data in the pixel array P respectively to obtain m channel data of each pixel; Sending m pixel channel data of each pixel in the pixel array P to m different data processing channels respectively, wherein channel data at the same position of different pixels in the pixel array P are sent to the same data processing channel; In the m data processing channels, the retrieved channel data are arranged according to the arrangement of pixels in the pixel array P to form m channel arrays P1 to Pm; Wavelet transform is performed on the channel data in the m channel arrays P1 to Pm respectively, and the pixel values of the source pixels represented by the channel data are converted into pixel difference values, so as to obtain the channel arrays PT1 to PTm after wavelet transform.
2. The wavelet coding method according to claim 1, characterized in that: Converting the pixel value of the source pixel represented by the channel data into a pixel difference value includes: Interpolate between two reference pixels R1 and R2, perform linear prediction on the value of the source pixel S, and obtain a predicted value; Calculate the difference between the source pixel's value and the predicted value.
3. The wavelet coding method according to claim 2, characterized in that: Two pixels that are adjacent to the source pixel and spatially symmetric with respect to the source pixel are preferably selected as reference pixels, and on this basis, the selection of reference pixels is adjusted in consideration of the processing efficiency of the wavelet transform.
4. The wavelet coding method according to claim 2, characterized in that: Performing wavelet transform on channel data in any channel array among the m channel arrays P1 to Pm includes: performing both row-wise wavelet transform and column-wise wavelet transform on each channel data.
5. The wavelet coding method according to claim 4, characterized in that: Performing wavelet transform on channel data in any channel array among the m channel arrays P1 to Pm includes: performing wavelet transform on each channel data in the row direction first, and then performing wavelet transform on the column direction.
6. The wavelet coding method according to claim 5, characterized in that: Performing wavelet transform on channel data in any one of the m channel arrays P1 to Pm includes: In the first cycle, the wavelet transform of one row of data Row-a in the row direction is completed; In the last cycle, the wavelet transform of another row of data Row-b in the column direction is completed; wherein the data Row-b and the data Row-a are in different rows; In each cycle after the first cycle and before the last cycle, the wavelet transform of one row of data Row-c in the row direction and the wavelet transform of another row of data Row-d in the column direction are completed; wherein, data Row-c is a row of data excluding data Row-a, data Row-d is a row of data excluding data Row-b, and data Row-d and data Row-c are in different rows.
7. The wavelet coding method according to claim 6, characterized in that: Performing wavelet transform on channel data in any channel array among the m channel arrays P1 to Pm includes: for any row data Row-x, completing wavelet transform of the data Row-x in the row direction in one cycle, and completing wavelet transform of the data Row-x in the column direction in the next cycle.
8. The wavelet coding method according to any one of claims 1 to 7, characterized in that: Also includes: The data in the channel arrays PT1 to PTm after wavelet transformation are grouped respectively, and the data in the group are bit-transformed in units of groups, so that the data in the group after bit transformation have as many identical most significant bits as possible.
9. The wavelet encoding method according to claim 8, characterized in that: The data in the group is bit-transformed so that as many of the most significant bits of the data in the group after the bit-transformation are 0 as possible.
10. The wavelet coding method according to claim 9, characterized in that: The bit transformation of the data within the group includes: Move the sign bit of the data to the least significant bit, and move the bits other than the sign bit of the data one bit higher; When the sign bit at the least significant bit is 1, the bits other than the sign bit at the least significant bit are inverted; When the sign bit at the least significant bit is 0, the bits other than the sign bit at the least significant bit are kept unchanged.
11. The wavelet encoding method according to claim 8, characterized in that: Also includes: The most significant bit of the data in the group is replaced by the same number of most significant bits of the data in the group after bit conversion.
12. A wavelet coding method for image data compression, characterized in that: include: Determine a pixel array P to be processed; Performing wavelet transformation on pixel data in the pixel array P, converting the pixel values of source pixels into pixel difference values, and obtaining a pixel array PT after wavelet transformation; The step of converting the pixel value of the source pixel into a pixel difference value includes: Interpolate between two reference pixels R1 and R2, perform linear prediction on the value of the source pixel S, and obtain a predicted value; Calculate the difference between the source pixel's value and the predicted value.