[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN118301370B - Wavelet fast transformation method for JPEG-XS encoding and decoding - Google Patents

Wavelet fast transformation method for JPEG-XS encoding and decoding Download PDF

Info

Publication number
CN118301370B
CN118301370B CN202410386439.6A CN202410386439A CN118301370B CN 118301370 B CN118301370 B CN 118301370B CN 202410386439 A CN202410386439 A CN 202410386439A CN 118301370 B CN118301370 B CN 118301370B
Authority
CN
China
Prior art keywords
horizontal
wavelet
transformation
data
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202410386439.6A
Other languages
Chinese (zh)
Other versions
CN118301370A (en
Inventor
张�浩
褚震宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dayang Technology Development Inc
Original Assignee
Beijing Dayang Technology Development Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dayang Technology Development Inc filed Critical Beijing Dayang Technology Development Inc
Priority to CN202410386439.6A priority Critical patent/CN118301370B/en
Publication of CN118301370A publication Critical patent/CN118301370A/en
Application granted granted Critical
Publication of CN118301370B publication Critical patent/CN118301370B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/63Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using sub-band based transform, e.g. wavelets
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/182Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a pixel
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention relates to a wavelet rapid transformation method for JPEG-XS encoding and decoding, which comprises the following steps: dividing frame data to generate a wavelet unit; vertical horizontal wavelet transform; distinguishing and respectively processing; a half-image width horizontal wavelet transform; three wavelet transforms. The invention reclassifies the data of a JPEG-XS coding image according to the characteristics of the coding flow, and carries out vertical-horizontal wavelet transformation on all image data in the original coding process; and then carrying out vertical-horizontal wavelet transformation or horizontal wavelet transformation on the 1/4 image, and optimizing the flow of carrying out three times of horizontal wavelet transformation. The buffer memory of the intermediate transformation result is reduced by adopting a blocking mode, the reading and writing of intermediate data are also reduced, and the coding efficiency is greatly improved. The data driving DWT mode can further reduce the buffer memory and the read-write of intermediate data, thereby improving the coding efficiency.

Description

一种用于JPEG-XS编解码的小波快速变换方法A fast wavelet transform method for JPEG-XS encoding and decoding

技术领域Technical Field

本发明涉及一种用于JPEG-XS编解码的小波快速变换方法,是一种计算机网络的数据传输方法,是一种用于网络超高清晰度视频数据处理和传输的方法。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

JPEG-XS是基于小波压缩技术的浅压缩域的最新的国际标准,能够以低延迟生成更高质量的图像。JPEG-XS能够用合理的码率记录8K(7680×4320)、4K(3840×2160)和HD(1920×1080)422 10bit视频,压缩比10:1-6:1,具有视觉无损的质量、良好的多代复制特性、低编解码复杂度和编解码低延迟等特点,符合广电节目对低延迟与高质量的双重需求,可以显著降低超高清业务对数据存储、流化传输以及视频处理计算的压力。JPEG-XS编码使用了小波变换、量化、熵编码等编码技术,小波变换先对图像的列数据进垂直变换处理,再存储列处理的中间结果,然后对行数据进行水平变换,这至少需要一帧数据的中间存储空间,8K 422 10bit下所需存储空间约为200Mb,这需要大容量的存储器来缓存列变换结果,浪费了大量的存储资源,增加了读写数据的开销,存储开销的增大降低了硬件的利用率,限制了编解码的速度。另一方面随着信息技术的不断发展,海量数据的并行处理在内存带宽上的优势越来越明显。然而,由于JPEG-XS编码的垂直小波变换使这种并行处理难以进行,同时垂直变换对列数据进行运算,不能充分利用slice间编码不相关的特性,没有发挥并行编码的潜力,影响了编码效率。所以亟需为JPEG-XS编解码的DWT/IDWT寻找一种高效的实现方法。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 wavelet transform, quantization, entropy coding and other coding techniques. Wavelet transform first performs vertical transformation on the column data of the image, then stores the intermediate results of column processing, and then performs horizontal transformation on the row data, which requires at least one frame of intermediate storage space for data. The required storage space is about 200Mb under 8K 422 10bit. This requires a large-capacity memory to cache the column transformation results, which wastes a lot of storage resources and increases 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 unrelated 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

为了克服现有技术的问题,本发明提出了一种用于JPEG-XS编解码的小波快速变换方法。所述的方法基于JPEG-XS帧结构特点,采用分块的方式减少中间变换结果缓存,也减少了中间数据的读写,极大的提高了编码效率。采用数据驱动DWT的方式能够进一步减少中间数据的缓存和读写,从而提高编码效率。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.

本发明的目的是这样实现的:一种用于JPEG-XS编解码的小波快速变换方法,所述方法的步骤如下: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:

步骤1,帧数据划分小波变换单元:依据编码参数,对帧数据进行划分,将帧数据分成若干个frame_width×K×2v大小的像素块,作为小波变换单元,其中,frame_width为图像像素宽度,v为垂直小波分解次数,K为正整数,最大值为frame_width/2v,frame_height为图像像素高度,2v为precinct的像素高度;Step 1, frame data is divided into wavelet transform units: according to the encoding parameters, the frame data is divided into a number of pixel blocks of frame_width×K×2 v as wavelet transform units, where frame_width is the image pixel width, v is the number of vertical wavelet decompositions, K is a positive integer with a maximum value of frame_width/2 v , frame_height is the image pixel height, and 2 v is the pixel height of precinct;

步骤2,首次或第二次垂直-水平小波变换:将步骤1中的小波变换单元划分为8×8的像素块,由右至左、由上至下先进行垂直小波变换,其变换结果作为输入数据;之后检查输入数据是否足够进行水平小波变换,如果不足则返回重复垂直小波变换,如果足够则进行水平小波变换;两次变换后每个8×8的像素块生成的小波系数可以分为四个子带,分别是LL、HL、LH、HH;其中LL代表图像水平和垂直方向上的低频分量,HH代表了图像水平和垂直方向上的高频分量,LH代表了图像水平方向上的低频分量和垂直方向的高频分量,HL代表了图像水平方向上的高频和垂直方向上的低频分量;将所有四个子带系数分类保存,将LL子带系数输出,准备继续小波变换;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;

步骤3,辨别并分别处理:如果是Main Profile则直接跳至步骤4;如果是HighProfile,将步骤2中计算得到的LL小波系数重复步骤2,然后跳过步骤4,直接进行步骤5;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;

步骤4,半图像宽度的水平小波变换:检查LL数据是否足够进行一次水平小波变换,如果不足则返回步骤2,否则进行水平变换;变换结果可以分为两个子带,LL和HL;所有的LL子带数据和HL子带按顺序分别保存,LL子带系数输出,准备继续小波变换;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.

步骤5,三次水平小波变换:检查输入数据是否足够进行三次次水平小波变换,如果不足则返回步骤2,否则进行水平变换;变换结果可以分为两个子带,LL和HL;所有的LL子带数据和HL子带按顺序分别保存;LL子带数据作为下一次变换的输入,输出仍然需要按顺序分类保存,重复三次,最终得到熵编码所需要的变换数据。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.

本发明的优点和有益效果是:本发明将一幅JPEG-XS编码图像的数据按照编码流程的特点重新划分,将原来的编码过程从首先对所有图像数据进行垂直-水平小波变换;再对1/4图像进行垂直-水平小波变换(High Profile)或者水平小波变换(Main Profile),再进行三次水平小波变换的流程进行了优化。优化后的编码过程可以分别对最小编码单位即slice分别进行编码,避免了存储大量的中间结果,降低了硬件的开销,提高了硬件的利用率。现有技术的小波变换方式缓存了大量的中间变换数据,同时引入了这些数据的读写,是目前CPU架构编码性能的主要瓶颈。本发明采用分块的方式对图像像素进行DWT采用分块的方式减少中间变换结果缓存,也减少了中间数据的读写,极大的提高了编码效率。本发明还采取了数据驱动的方式进行DWT,每次变换输出的数据作为下一级DWT变换的输入数据,下一级DWT变换检测到有足够的输入数据则开始变换并输出,直到所有数据完成变换。数据驱动DWT的方式能够进一步减少中间数据的缓存和读写,从而进一步提高编码效率。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

下面结合附图和实施例对本发明作进一步说明。The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

图1是JPEG-XS编码过程流程图;FIG1 is a flow chart of the JPEG-XS encoding process;

图2是JPEG-XS的小波变换过程示意图;FIG2 is a schematic diagram of the wavelet transform process of JPEG-XS;

图3是High Profile的小波分解示意图;Figure 3 is a schematic diagram of wavelet decomposition of High Profile;

图4是JPEG-XS帧结构示意图;FIG4 is a schematic diagram of a JPEG-XS frame structure;

图5是本发明实施例所述方法流程图。FIG5 is a flow chart of the method according to an embodiment of the present invention.

具体实施方式DETAILED DESCRIPTION

实施例:Example:

本实施例是一种用于JPEG-XS编解码的小波快速变换方法。This embodiment is a wavelet fast transform method for JPEG-XS encoding and decoding.

JPEG-XS使用了DWT、量化、熵编码等编码技术,每个帧的编解码不需要参考其他帧。编码过程流程图如图1所示。JPEG-XS为了允许不同级别的延迟和复杂性,定义了不同Profile,每个Profile具有的最大的垂直小波分解次数定义如下:JPEG-XS uses coding techniques such as DWT, quantization, and entropy coding. The encoding and decoding of each frame does not need to refer to other frames. The encoding process flow chart is shown in Figure 1. In order to allow different levels of delay and complexity, JPEG-XS defines different profiles. The maximum number of vertical wavelet decompositions for each profile is defined as follows:

Light Profile水平5层分解,垂直0层分解Light Profile has 5 layers of decomposition horizontally and 0 layers of decomposition vertically

Main Profile水平5层分解,垂直1层分解Main Profile is decomposed into 5 layers horizontally and 1 layer vertically

High Profile水平5层分解,垂直2层分解High Profile has 5 horizontal layers and 2 vertical layers

由于LightProfile无需垂直变换,不存在上述问题,因此这个profile在步骤1的数据划分相对简单,但仅在水平变换过程中使用数据驱动的方式仍然可以获得本发明所述的益处。JPEG-XS编码过程中的小波变换如图2所示,以HighProfile为例,先对所有列数据依次进行一次垂直变换,变换结果的所有行再进行一次水平变换。分别经过一次垂直变换和水平变换的LL波带再重复一次垂直变换和水平变换,然后对LL波带结果中的每行再循环3次水平变换。共进行了2次垂直变换和5次水平变换,变换的最终结果如图3所示。变换得到的波带类型见表1。对于整幅图像,每个像素会产生对应的小波系数,最终输出和输入相同尺寸的系数矩阵,用于后续编码的量化、熵编码等。Since LightProfile does not require vertical transformation and does not have the above problem, the data division of this profile in step 1 is relatively simple, but the benefits described in the present invention can still be obtained by using a data-driven approach only in the horizontal transformation process. The wavelet transform in the JPEG-XS encoding process is shown in Figure 2. Taking HighProfile as an example, all column data are first vertically transformed in sequence, and all rows of the transformation results are horizontally transformed again. The LL band that has undergone a vertical transformation and a horizontal transformation respectively repeats the vertical transformation and the horizontal transformation once, and then each row in the LL band result is horizontally transformed three times. A total of 2 vertical transformations and 5 horizontal transformations were performed, and the final result of the transformation is shown in Figure 3. The types of bands obtained by the transformation are shown in Table 1. For the entire image, each pixel will generate a corresponding wavelet coefficient, and the final output and input coefficient matrix of the same size will be used for subsequent encoding quantization, entropy coding, etc.

00 LL5,2 LL 5,2 11 HL5,2 HL 5,2 22 HL4,2 HL 4,2 33 HL3,2 HL 3,2 44 HL2,2 HL 2,2 55 LH2,2 LH 2,2 66 HH2,2 HH 2,2 77 HL1,1 HL 1,1 88 LH1,1 LH 1,1 99 HH1,1 HH 1,1

表1 High Profile的小波变换后各波带对应关系Table 1 Correspondence between bands after wavelet transformation of High Profile

JPEG-XS格式的最小编码单位是slice,由若干个precinct组成,precinct宽度一般为图像的宽度,高度为2v(v为垂直分解层数)。以8K分辨率High Profile为例,precinct的宽为7680像素,高度为4像素。在一个slice内部,下方的precinct可以用上方的precinct做预测;slice之间互相独立没有依赖。JPEG-XS的帧结构如图4所示,该示意图中,slice高度为4个precinct,水平5级分解、垂直2级分解。中粗线表示precinct边界,粗线表示图像边界。含虚线和细线的precinct分别属于不同的slice。The smallest coding unit of the JPEG-XS format is a slice, which consists of several precincts. The width of the 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 shown in Figure 4. In this diagram, the slice height is 4 precincts, with 5 levels of horizontal decomposition and 2 levels of vertical decomposition. 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.

从JPEG-XS编码的小波变换过程可以发现,垂直变换、水平变换分别需要对一列、一行图像数据计算,计算结果需要保存至缓存用于后面的变换。这一方面影响了slice间的并行编码,没有充分利用JPEG-XS的结构特性,另一方面也消耗了大量的存储空间和读写时间,影响了编码效率。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.

本实施例根据JPEG-XS编码图像结构的特性,设计并实现了一种高效的小波变换方法,极大地提高了编码效率。同时,JPEG-XS解码是编码过程的逆运算,解码中的IDWT是DWT的逆过程,本实施例所述的变换方法也可以用于JPEG-XS的IDWT,以提高解码效率。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.

现有的小波变换首先对所有图像数据进行垂直、水平小波变换,再对1/4图像进行垂直、水平小波变换(High Profile)或者水平小波变换(Main Profile),再进行第三次水平小波变换,每次小波变换都要进行存储,增加了硬件开销。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.

本实施例则将这一流程进行了优化。优化后的编码过程可以分别对最小编码单位即slice分别进行编码,避免了存储大量的中间结果,降低了硬件的开销,提高了硬件的利用率。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.

本实施例所述的编码过程是,采用数据驱动的方式首先将一幅JPEG-XS编码图像的数据按照编码流程的特点进行重新划分,将其划分为小波变换单元和像素块,再依据不同的Profile分别进行小波变换,从而节约小波变换过程中的存取硬件开销。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.

本实施例所述的JPEG-XS编解码的小波快速变换方法包括如下步骤,其流程如图5所示:The wavelet fast transform method for JPEG-XS codec described in this embodiment includes the following steps, and its flow is shown in FIG5 :

步骤1,帧数据划分小波变换单元:依据编码参数,对帧数据进行划分,将帧数据分成若干个frame_width×K×2v大小的像素块,作为小波变换单元,其中,frame_width为图像像素宽度,v为垂直小波分解次数,K为正整数,最大值为frame_height/2v,此时表示整幅图像就是一个变换单元,frame_height为图像像素高度,2v为precinct的像素高度。Step 1, frame data is divided into wavelet transform units: according to the encoding parameters, the frame data is divided into several pixel blocks of frame_width×K× 2v as wavelet transform units, where frame_width is the image pixel width, v is the number of vertical wavelet decompositions, K is a positive integer with a maximum value of frame_height/ 2v , which means that the entire image is a transform unit, frame_height is the image pixel height, and 2v is the pixel height of precinct.

K的取值需考虑到编码结构里slice包含的precinct的个数。那么,8K的图像大小为7680×4320,High Profile v=2,此时K的最大值为1080。如果每个slice包含4个precinct,最小的小波变换单元为7680×4×22,即7680×16;8K Main Profile的v=1,此时K的最大值为2160。如果每个slice包含4个precinct,最小的小波变换单元为7680×4×21,即7680×8。Light Profile因为无需垂直小波分解,忽略。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 does not require vertical wavelet decomposition, so it is ignored.

本步骤首先将一帧图像划分为多个像素块,划分主要依据JPEG-XS的帧结构和CPU的特性。例如,可以将一幅图像划分为10个小波单元,每个小波单元含7680×432个像素。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.

步骤2,首次或第二次垂直-水平小波变换:将步骤1中的小波变换单元划分为8×8的像素块,由右至左、由上至下先进行垂直小波变换,其变换结果作为输入数据;之后检查输入数据是否足够进行水平小波变换,如果不足则返回重复垂直小波变换,如果足够则进行水平变换;两次变换后每个8×8的像素块生成的小波系数可以分为四个子带,分别是LL、HL、LH、HH;其中LL代表图像水平和垂直方向上的低频分量,HH代表了图像水平和垂直方向上的高频分量,LH代表了图像水平方向上的低频分量和垂直方向的高频分量,HL代表了图像水平方向上的高频和垂直方向上的低频分量;将所有四个子带系数分类保存,将LL子带系数输出,准备继续小波变换。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 transforms, 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.

需要注意的是,按照8×8划分小波变换单元,变换需使用相邻块的像素。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.

步骤3,辨别并分别处理:如果是Main Profile则直接跳至步骤4;如果是HighProfile,将步骤2中计算得到的LL小波系数重复步骤2,然后跳过步骤4,直接进行步骤5。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.

步骤4,半图像宽度的水平小波变换:检查LL数据是否足够进行一次水平小波变换,如果不足则回到步骤2,如果足够则进行水平变换;变换结果可以分为两个子带,LL和HL;所有的LL子带数据和HL子带按顺序分别保存,LL子带系数输出,准备继续小波变换。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.

如果针对high profile描述实施样例,步骤3和4可以越过。If implementing the example for the high profile description, steps 3 and 4 can be skipped.

步骤5,三次水平小波变换:检查输入数据是否足够进行三次水平小波变换,如果不足则返回步骤2,否则进行水平变换。变换结果可以分为两个子带,LL和HL;所有的LL子带数据和HL子带按顺序分别保存;LL子带数据作为下一次变换的输入,输出仍然需要按顺序分类保存,重复三次,最终得到熵编码所需要的变换数据。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.

小波变换过程采取数据驱动的方式进行DWT:整个变换过程中除第一次垂直变换外,每次变换输出的数据作为下一级DWT变换的输入数据,下一级DWT变换检测到有足够的输入数据才开始变换,并输出,直到所有数据完成变换。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.

最后应说明的是,以上仅用以说明本发明的技术方案而非限制,尽管参照较佳布置方案对本发明进行了详细说明,本领域的普通技术人员应当理解,可以对本发明的技术方案(比如分块的方式、小波变换的方式、步骤的先后顺序等)进行修改或者等同替换,而不脱离本发明技术方案的精神和范围。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)

1. A wavelet fast transformation method for JPEG-XS codec, characterized by the steps of:
Step 1, a frame data division wavelet transformation unit: dividing frame data according to coding parameters, dividing the frame data into a plurality of pixel blocks with the size of frame_width multiplied by K multiplied by 2 v, and taking the frame_width as a wavelet transformation unit, wherein the frame_width is the image pixel width, v is the number of vertical wavelet decomposition times, K is a positive integer, the maximum value of K is frame_height/2 v, the frame_height is the image pixel height, and 2 v is the pixel height of precinct;
Step 2, first or second vertical-horizontal wavelet transform: dividing the wavelet transformation unit in the step 1 into 8×8 pixel blocks, performing vertical wavelet transformation from right to left and from top to bottom, and taking the transformation result as input data; then checking whether the input data is enough to perform horizontal wavelet transformation, returning to repeat the vertical wavelet transformation if the input data is insufficient, and performing the horizontal wavelet transformation if the input data is enough; the wavelet coefficient generated by each 8×8 pixel block after twice transformation can be divided into four sub-bands, which are LL, HL, LH, HH respectively; wherein LL represents low-frequency components in the horizontal and vertical directions of the image, HH represents high-frequency components in the horizontal and vertical directions of the image, LH represents low-frequency components in the horizontal and vertical directions of the image, and HL represents high-frequency and low-frequency components in the horizontal and vertical directions of the image; classifying and storing all four sub-band coefficients, outputting LL sub-band coefficients, and preparing to continue wavelet transformation;
Step 3, distinguishing and respectively processing: if the map Profile is the Main Profile, directly jumping to the step 4; if the High Profile is High, repeating the step 2 with the LL wavelet coefficient calculated in the step 2, and then skipping the step 4 to directly carry out the step 5;
Step 4, horizontal wavelet transformation of half image width: checking whether the LL data is enough to perform the horizontal wavelet transformation once, if not, returning to the step 2, otherwise, performing the horizontal transformation; the transform result may be divided into two subbands, LL and HL; all LL sub-band data and HL sub-bands are respectively stored in sequence, LL sub-band coefficients are output, and wavelet transformation is prepared to be continued;
Step 5, three times of horizontal wavelet transformation: checking whether the input data is enough to perform three times of horizontal wavelet transformation, returning to the step 2 if the input data is insufficient, otherwise performing the horizontal transformation; the transform result may be divided into two subbands, LL and HL; all LL sub-band data and HL sub-bands are respectively stored in sequence; the LL sub-band data is used as the input of the next transformation, the output still needs to be classified and stored according to the sequence, and the transformation data needed by the entropy coding is finally obtained after repeating for three times.
CN202410386439.6A 2024-04-01 2024-04-01 Wavelet fast transformation method for JPEG-XS encoding and decoding Active CN118301370B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410386439.6A CN118301370B (en) 2024-04-01 2024-04-01 Wavelet fast transformation method for JPEG-XS encoding and decoding

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410386439.6A CN118301370B (en) 2024-04-01 2024-04-01 Wavelet fast transformation method for JPEG-XS encoding and decoding

Publications (2)

Publication Number Publication Date
CN118301370A CN118301370A (en) 2024-07-05
CN118301370B true CN118301370B (en) 2024-09-13

Family

ID=91673510

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410386439.6A Active CN118301370B (en) 2024-04-01 2024-04-01 Wavelet fast transformation method for JPEG-XS encoding and decoding

Country Status (1)

Country Link
CN (1) CN118301370B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101267558A (en) * 2008-05-04 2008-09-17 西安电子科技大学 Block-Based Low-Memory Encoder and Its Encoding Method in JPEG2000 Standard
CN116055725A (en) * 2022-12-28 2023-05-02 杭电(丽水)研究院有限公司 Satellite image lossless compression system and method based on JPEG2000

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1986440A4 (en) * 2006-02-13 2010-11-17 Toshiba Kk Moving image encoding/decoding method and device and program
US8218645B2 (en) * 2009-07-17 2012-07-10 Nec Corporation Method and apparatus for encoding and decoding by wavelet transform
JP5218318B2 (en) * 2009-07-27 2013-06-26 日本電気株式会社 Wavelet transform coding method and apparatus
JP6792359B2 (en) * 2016-07-08 2020-11-25 キヤノン株式会社 Image coding device
CN118044202B (en) * 2021-08-26 2024-12-27 影图辟开思公司 Method and apparatus for performing compression on color image
WO2024044814A1 (en) * 2022-09-02 2024-03-07 Newsouth Innovations Pty Limited Method, apparatus and computer readable medium for encoding an image
CN117354545B (en) * 2023-12-06 2024-02-23 成都索贝数码科技股份有限公司 Video image wavelet transformation high-frequency coefficient block coding method according to limited size

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101267558A (en) * 2008-05-04 2008-09-17 西安电子科技大学 Block-Based Low-Memory Encoder and Its Encoding Method in JPEG2000 Standard
CN116055725A (en) * 2022-12-28 2023-05-02 杭电(丽水)研究院有限公司 Satellite image lossless compression system and method based on JPEG2000

Also Published As

Publication number Publication date
CN118301370A (en) 2024-07-05

Similar Documents

Publication Publication Date Title
CN102263950B (en) Encoding device, encoding method, decoding device, and decoding method
US6546143B1 (en) Efficient wavelet-based compression of large images
US8395634B2 (en) Method and apparatus for processing information
US7120306B2 (en) Image processing method and image coding apparatus utilizing the image processing method
JP3964139B2 (en) Motion compensated adaptive image processing method and apparatus
CN111669588B (en) Ultra-high definition video compression coding and decoding method with ultra-low time delay
CN101267558A (en) Block-Based Low-Memory Encoder and Its Encoding Method in JPEG2000 Standard
DE102011100936B4 (en) Techniques for storing and retrieving pixel data
US20110249723A1 (en) Frame Buffer Compression and Memory Allocation in a Video Decoder
US20110249959A1 (en) Video storing method and device based on variable bit allocation and related video encoding and decoding apparatuses
CN105392014B (en) A kind of wavelet-transform image compression method of optimization
CN118301370B (en) Wavelet fast transformation method for JPEG-XS encoding and decoding
CN112866695B (en) Video encoder
CN116600129B (en) Method, system and device for optimizing video decoding bandwidth
US12137223B2 (en) Video decoding method, video coding method, and related apparatus
US20230082386A1 (en) Video encoding method and apparatus, video decoding method and apparatus, computer-readable medium, and electronic device
US8249375B2 (en) Information processing apparatus and method
CN115190305A (en) Method, apparatus, medium, and system for image processing in video encoding apparatus
CN1666530A (en) Subband video decoding method and device
Rao et al. Video Codec IP using Discrete Wavelet Transform
JP7483029B2 (en) VIDEO DECODING METHOD, VIDEO ENCODING METHOD, DEVICE, MEDIUM, AND ELECTRONIC APPARATUS
JP4669645B2 (en) Image encoding apparatus, image encoding method, program, and recording medium
US12231640B2 (en) Video decoding method, video encoding method, and related apparatuses
CN113365065B (en) Lossless video coding method and decoding method for RPA robot screen recording
WO2020168520A1 (en) Encoder, encoding system, and encoding method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant