A fast wavelet transform method for JPEG-XS encoding and decoding
Optimizing the JPEG-XS encoding process through blocking and data-driven DWT solves the storage and read and write overhead problems caused by vertical wavelet transform in JPEG-XS encoding, improves encoding efficiency and hardware utilization, and achieves more efficient encoding and Decoding performance.
Patent Information
- Application Number
- CN202410386439.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-01
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2044-04-01
AI Technical Summary
The vertical wavelet transform of JPEG-XS encoding results in a large amount of waste of intermediate storage space and read and write overhead, which limits the encoding and decoding speed. It is also difficult to make full use of the irrelevant features of parallel processing and encoding, affecting encoding efficiency.
The frame data is divided into wavelet transform units using a block method, and DWT is performed in a data-driven manner to reduce the caching, reading and writing of intermediate transformation results, optimize the encoding process to avoid storing a large number of intermediate results, and improve hardware utilization.
Significantly improves JPEG-XS encoding efficiency, reduces hardware overhead, improves hardware utilization, fully utilizes the potential of parallel encoding, and improves encoding and decoding performance.
Smart Images

Figure CN118301370B
Abstract
Description
Technical Field
[0001] The invention relates to a wavelet fast transform method for JPEG-XS encoding and decoding, a data transmission method for a computer network, and a method for processing and transmitting network ultra-high definition video data. Background Art
[0002] JPEG-XS is the latest international standard based on the shallow compression domain of wavelet compression technology, which can generate higher quality images with low latency. JPEG-XS can record 8K (7680×4320), 4K (3840×2160) and HD (1920×1080) 422 10-bit videos at a reasonable bit rate, with a compression ratio of 10:1-6:1. It has the characteristics of visual lossless quality, good multi-generation replication characteristics, low encoding and decoding complexity and low encoding and decoding latency, which meets the dual requirements of low latency and high quality for radio and television programs, and can significantly reduce the pressure of ultra-high-definition services on data storage, streaming transmission and video processing calculations. JPEG-XS coding uses coding techniques such as wavelet transform, quantization, and entropy coding. Wavelet transform first performs vertical transformation processing on the column data of the image, then stores the intermediate results of the column processing, and then horizontally transforms the row data, which requires at least one frame of intermediate storage space for data. The storage space required for 8K 422 10bit is about 200Mb, which requires a large-capacity memory to cache the column transformation results, wasting a lot of storage resources and increasing the overhead of reading and writing data. The increase in storage overhead reduces the utilization of hardware and limits the speed of encoding and decoding. On the other hand, with the continuous development of information technology, the advantages of parallel processing of massive data in memory bandwidth are becoming more and more obvious. However, due to the vertical wavelet transform of JPEG-XS coding, this parallel processing is difficult to carry out. At the same time, the vertical transform operates on the column data, which cannot fully utilize the characteristics of the irrelevant encoding between slices, does not give full play to the potential of parallel coding, and affects the coding efficiency. Therefore, it is urgent to find an efficient implementation method for DWT / IDWT of JPEG-XS coding and decoding. Summary of the invention
[0003] In order to overcome the problems of the prior art, the present invention proposes a wavelet fast transform method for JPEG-XS encoding and decoding. The method is based on the characteristics of the JPEG-XS frame structure, adopts a block-based approach to reduce the intermediate transform result cache, and also reduces the reading and writing of intermediate data, greatly improving the encoding efficiency. The use of a data-driven DWT approach can further reduce the caching and reading and writing of intermediate data, thereby improving the encoding efficiency.
[0004] The object of the present invention is achieved by: a wavelet fast transform method for JPEG-XS encoding and decoding, the steps of the method are as follows:
[0005] Step 1: Divide the frame data into wavelet transform units: Divide the frame data into several frame_width×K×2 units according to the encoding parameters. v The pixel block of size is used as the wavelet transform unit, where frame_width is the image pixel width, v is the number of vertical wavelet decompositions, K is a positive integer, and the maximum value is frame_width / 2 v , frame_height is the image pixel height, 2 v is the pixel height of precinct;
[0006] Step 2, first or second vertical-horizontal wavelet transform: divide the wavelet transform unit in step 1 into 8×8 pixel blocks, perform vertical wavelet transform from right to left and from top to bottom, and use the transform result as input data; then check whether the input data is sufficient for horizontal wavelet transform, if not, return to repeat vertical wavelet transform, if sufficient, perform horizontal wavelet transform; after two transformations, the wavelet coefficients generated by each 8×8 pixel block can be divided into four sub-bands, namely LL, HL, LH, and HH; LL represents the low-frequency components of the image in the horizontal and vertical directions, HH represents the high-frequency components of the image in the horizontal and vertical directions, LH represents the low-frequency components of the image in the horizontal direction and the high-frequency components in the vertical direction, and HL represents the high-frequency components of the image in the horizontal direction and the low-frequency components in the vertical direction; classify and save all four sub-band coefficients, output the LL sub-band coefficient, and prepare to continue the wavelet transform;
[0007] Step 3, identify and process separately: if it is Main Profile, jump directly to step 4; if it is High Profile, repeat step 2 with the LL wavelet coefficients calculated in step 2, then skip step 4 and go directly to step 5;
[0008] Step 4, horizontal wavelet transform of half image width: check whether the LL data is sufficient for a horizontal wavelet transform. If not, return to step 2, otherwise perform a horizontal transform. The transform result can be divided into two sub-bands, LL and HL. All LL sub-band data and HL sub-bands are saved in sequence, and the LL sub-band coefficients are output, ready to continue the wavelet transform.
[0009] Step 5, three-level horizontal wavelet transform: check whether the input data is sufficient for three-level horizontal wavelet transform. If not, return to step 2, otherwise perform horizontal transform. The transform result can be divided into two sub-bands, LL and HL. All LL sub-band data and HL sub-bands are saved in sequence. The LL sub-band data is used as the input for the next transform, and the output still needs to be classified and saved in sequence. Repeat three times to finally obtain the transform data required for entropy coding.
[0010] The advantages and beneficial effects of the present invention are as follows: the present invention re-divides the data of a JPEG-XS coded image according to the characteristics of the coding process, and optimizes the original coding process from first performing vertical-horizontal wavelet transform on all image data; then performing vertical-horizontal wavelet transform (High Profile) or horizontal wavelet transform (Main Profile) on 1 / 4 image, and then performing three horizontal wavelet transforms. The optimized coding process can encode the minimum coding unit, i.e., slice, respectively, avoiding the storage of a large number of intermediate results, reducing hardware overhead, and improving hardware utilization. The wavelet transform method of the prior art caches a large amount of intermediate transformation data, and introduces the reading and writing of these data, which is the main bottleneck of the current CPU architecture encoding performance. The present invention adopts a block-by-block method to perform DWT on image pixels. The block-by-block method is used to reduce the intermediate transformation result cache, and also reduces the reading and writing of intermediate data, greatly improving the coding efficiency. The present invention also adopts a data-driven method to perform DWT, and the data output from each transformation is used as the input data of the next level DWT transformation. When the next level DWT transformation detects that there is enough input data, it starts to transform and output until all data are transformed. The data-driven DWT approach can further reduce the caching and reading and writing of intermediate data, thereby further improving coding efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0012] Figure 1 It is a flowchart of the JPEG-XS encoding process;
[0013] Figure 2 This is a schematic diagram of the wavelet transform process of JPEG-XS;
[0014] Figure 3 This is a schematic diagram of the wavelet decomposition of High Profile;
[0015] Figure 4 This is a schematic diagram of the JPEG-XS frame structure;
[0016] Figure 5 It is a flow chart of the method described in an embodiment of the present invention. DETAILED DESCRIPTION
[0017] Example:
[0018] This embodiment is a wavelet fast transform method for JPEG-XS encoding and decoding.
[0019] JPEG-XS uses coding techniques such as DWT, quantization, and entropy coding. The encoding and decoding of each frame does not require reference to other frames. The encoding process flow chart is as follows: Figure 1As shown. JPEG-XS defines different profiles to allow for different levels of latency and complexity. The maximum number of vertical wavelet decompositions for each profile is defined as follows:
[0020] Light Profile has 5 layers of decomposition horizontally and 0 layers of decomposition vertically
[0021] Main Profile is decomposed into 5 layers horizontally and 1 layer vertically
[0022] High Profile has 5 horizontal layers and 2 vertical layers
[0023] Since LightProfile does not require vertical transformation, the above problem does not exist. Therefore, the data division of this profile in step 1 is relatively simple. However, the benefits described in the present invention can still be obtained by using a data-driven approach only in the horizontal transformation process. Figure 2 As shown in the figure, taking HighProfile as an example, all column data are first transformed vertically, and all rows of the transformation results are transformed horizontally. The LL band that has undergone a vertical transformation and a horizontal transformation repeats the vertical transformation and the horizontal transformation once, and then each row in the LL band result is transformed three times horizontally. A total of 2 vertical transformations and 5 horizontal transformations are performed, and the final result of the transformation is shown in the figure. Figure 3 The waveband types obtained by transformation are shown in Table 1. For the entire image, each pixel will generate a corresponding wavelet coefficient, and the final output is a coefficient matrix of the same size as the input, which is used for subsequent encoding quantization, entropy coding, etc.
[0024] 0 <![CDATA[LL 5,2 ]]> 1 <![CDATA[HL 5,2 ]]> 2 <![CDATA[HL 4,2 ]]> 3 <![CDATA[HL 3,2 ]]> 4 <![CDATA[HL 2,2 ]]> 5 <![CDATA[LH 2,2 ]]> 6 <![CDATA[HH 2,2 ]]> 7 <![CDATA[HL 1,1 ]]> 8 <![CDATA[LH 1,1 ]]> 9 <![CDATA[HH 1,1 ]]>
[0025] Table 1 Correspondence between bands after wavelet transformation of High Profile
[0026] The smallest encoding unit of the JPEG-XS format is a slice, which consists of several precincts. The width of a precinct is generally the width of the image, and the height is 2. v (v is the number of vertical decomposition layers). Taking 8K resolution High Profile as an example, the width of the precinct is 7680 pixels and the height is 4 pixels. Within a slice, the precinct below can be predicted using the precinct above; slices are independent of each other and have no dependencies. The frame structure of JPEG-XS is as follows: Figure 4As shown in the figure, the slice height is 4 precincts, with 5-level decomposition horizontally and 2-level decomposition vertically. The medium-thick line represents the precinct boundary, and the thick line represents the image boundary. The precincts with dotted lines and thin lines belong to different slices.
[0027] From the wavelet transform process of JPEG-XS encoding, it can be found that vertical transformation and horizontal transformation need to be calculated on one column and one row of image data respectively, and the calculation results need to be saved to the cache for subsequent transformation. This affects the parallel encoding between slices and does not fully utilize the structural characteristics of JPEG-XS. On the other hand, it also consumes a lot of storage space and read and write time, affecting the encoding efficiency.
[0028] This embodiment designs and implements an efficient wavelet transform method based on the characteristics of the JPEG-XS coded image structure, which greatly improves the coding efficiency. At the same time, JPEG-XS decoding is the inverse operation of the encoding process, and the IDWT in decoding is the inverse process of DWT. The transformation method described in this embodiment can also be used for the IDWT of JPEG-XS to improve the decoding efficiency.
[0029] The existing wavelet transform first performs vertical and horizontal wavelet transform on all image data, then performs vertical and horizontal wavelet transform (High Profile) or horizontal wavelet transform (Main Profile) on 1 / 4 of the image, and then performs a third horizontal wavelet transform. Each wavelet transform must be stored, which increases hardware overhead.
[0030] This embodiment optimizes this process. The optimized encoding process can encode the smallest encoding unit, namely, slice, respectively, thereby avoiding the storage of a large number of intermediate results, reducing hardware overhead, and improving hardware utilization.
[0031] The encoding process described in this embodiment is to first re-divide the data of a JPEG-XS encoded image according to the characteristics of the encoding process in a data-driven manner, dividing it into wavelet transform units and pixel blocks, and then perform wavelet transform on each of the different profiles, thereby saving the access hardware overhead in the wavelet transform process.
[0032] The wavelet fast transform method for JPEG-XS codec described in this embodiment includes the following steps, and its process is as follows: Figure 5 As shown:
[0033] Step 1: Divide the frame data into wavelet transform units: Divide the frame data into several frame_width×K×2 units according to the encoding parameters. vThe pixel block of size is used as the wavelet transform unit, where frame_width is the image pixel width, v is the number of vertical wavelet decompositions, K is a positive integer, and the maximum value is frame_height / 2 v , which means that the entire image is a transformation unit, frame_height is the image pixel height, 2 v The pixel height of precinct.
[0034] The value of K needs to take into account the number of precincts contained in the slice in the coding structure. So, the image size of 8K is 7680×4320, High Profile v=2, and the maximum value of K is 1080. If each slice contains 4 precincts, the smallest wavelet transform unit is 7680×4×2 2 , that is, 7680×16; 8K Main Profile's v=1, and the maximum value of K is 2160. If each slice contains 4 precincts, the smallest wavelet transform unit is 7680×4×2 1 , that is, 7680 × 8. Light Profile is ignored because it does not require vertical wavelet decomposition.
[0035] In this step, a frame of image is first divided into multiple pixel blocks, and the division is mainly based on the frame structure of JPEG-XS and the characteristics of CPU. For example, an image can be divided into 10 wavelet units, each wavelet unit contains 7680×432 pixels.
[0036] Step 2, first or second vertical-horizontal wavelet transform: divide the wavelet transform unit in step 1 into 8×8 pixel blocks, perform vertical wavelet transform from right to left and from top to bottom, and use the transform result as input data; then check whether the input data is sufficient for horizontal wavelet transform, if not, return to repeat the vertical wavelet transform, if sufficient, perform horizontal transform; after two transformations, the wavelet coefficients generated by each 8×8 pixel block can be divided into four sub-bands, namely LL, HL, LH, and HH; LL represents the low-frequency components of the image in the horizontal and vertical directions, HH represents the high-frequency components of the image in the horizontal and vertical directions, LH represents the low-frequency components of the image in the horizontal direction and the high-frequency components in the vertical direction, and HL represents the high-frequency components of the image in the horizontal direction and the low-frequency components in the vertical direction; all four sub-band coefficients are classified and saved, and the LL sub-band coefficient is output, ready to continue the wavelet transform.
[0037] It should be noted that the wavelet transform unit is divided into 8×8 blocks, and the transformation needs to use the pixels of adjacent blocks.
[0038] Step 3, identify and process separately: if it is Main Profile, jump directly to step 4; if it is High Profile, repeat step 2 with the LL wavelet coefficients calculated in step 2, then skip step 4 and go directly to step 5.
[0039] Step 4, horizontal wavelet transform of half image width: check whether the LL data is sufficient for a horizontal wavelet transform. If not, return to step 2. If sufficient, perform a horizontal transform. The transform result can be divided into two sub-bands, LL and HL. All LL sub-band data and HL sub-bands are saved in sequence, and the LL sub-band coefficients are output, ready to continue the wavelet transform.
[0040] If implementing the example for the high profile description, steps 3 and 4 can be skipped.
[0041] Step 5, three-times horizontal wavelet transform: Check whether the input data is sufficient for three-times horizontal wavelet transform. If not, return to step 2, otherwise, perform horizontal transform. The transform result can be divided into two sub-bands, LL and HL; all LL sub-band data and HL sub-band are saved in sequence; LL sub-band data is used as the input for the next transform, and the output still needs to be classified and saved in sequence, repeat three times, and finally obtain the transform data required for entropy coding.
[0042] The wavelet transform process adopts a data-driven approach to DWT: during the entire transform process, except for the first vertical transform, the output data of each transform is used as the input data for the next level of DWT transform. The next level of DWT transform will not start the transform until it detects that there is enough input data, and will output it until all the data has been transformed.
[0043] Finally, it should be noted that the above is only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred arrangement scheme, a person skilled in the art should understand that the technical solution of the present invention (such as the block division method, the wavelet transformation method, the sequence of steps, etc.) can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. A fast wavelet transform method for JPEG-XS codec, It is characterized in that The steps of the method are as follows: Step 1: Divide the frame data into wavelet transform units: Divide the frame data into several frame_width×K×2 units according to the encoding parameters. v The pixel block of size is used as the wavelet transform unit, where frame_width is the image pixel width, v is the number of vertical wavelet decompositions, K is a positive integer, and the maximum value of K is frame_height / 2 v , frame_height is the image pixel height, 2 v is the pixel height of precinct; Step 2, first or second vertical-horizontal wavelet transform: divide the wavelet transform unit in step 1 into 8×8 pixel blocks, perform vertical wavelet transform from right to left and from top to bottom, and use the transform result as input data; then check whether the input data is sufficient for horizontal wavelet transform, if not, return to repeat vertical wavelet transform, if sufficient, perform horizontal wavelet transform; after two transformations, the wavelet coefficients generated by each 8×8 pixel block can be divided into four sub-bands, namely LL, HL, LH, and HH; LL represents the low-frequency components of the image in the horizontal and vertical directions, HH represents the high-frequency components of the image in the horizontal and vertical directions, LH represents the low-frequency components of the image in the horizontal direction and the high-frequency components in the vertical direction, and HL represents the high-frequency components of the image in the horizontal direction and the low-frequency components in the vertical direction; classify and save all four sub-band coefficients, output the LL sub-band coefficient, and prepare to continue the wavelet transform; Step 3, identify and process separately: if it is Main Profile, jump directly to step 4; if it is High Profile, repeat step 2 with the LL wavelet coefficients calculated in step 2, then skip step 4 and go directly to step 5; Step 4, horizontal wavelet transform of half image width: check whether the LL data is sufficient for a horizontal wavelet transform. If not, return to step 2, otherwise perform a horizontal transform. The transform result can be divided into two sub-bands, LL and HL. All LL sub-band data and HL sub-bands are saved in sequence, and the LL sub-band coefficients are output, ready to continue the wavelet transform. Step 5, three-times horizontal wavelet transform: check whether the input data is sufficient for three-times horizontal wavelet transform, if not, return to step 2, otherwise, perform horizontal transform; the transform result can be divided into two sub-bands, LL and HL; all LL sub-band data and HL sub-band are saved in sequence; LL sub-band data is used as the input for the next transform, and the output still needs to be classified and saved in sequence, repeat three times, and finally obtain the transform data required for entropy coding.
Citation Information
Patent Citations
Low storage coder based on code block in JPEG2000 standard and its coding method
CN101267558A
Satellite image lossless compression system and method based on JPEG 2000
CN116055725A
Video image wavelet transform high-frequency coefficient block coding method according to limited size
CN117354545A
Wavelet transform coding method and apparatus
JP2011029982A
Image encoding device
JP2018007214A
