CN1236623C - Information ontropy holding decoding method and device - Google Patents
Information ontropy holding decoding method and device Download PDFInfo
- Publication number
- CN1236623C CN1236623C CN 200310109499 CN200310109499A CN1236623C CN 1236623 C CN1236623 C CN 1236623C CN 200310109499 CN200310109499 CN 200310109499 CN 200310109499 A CN200310109499 A CN 200310109499A CN 1236623 C CN1236623 C CN 1236623C
- Authority
- CN
- China
- Prior art keywords
- signal
- information
- decoding
- code word
- composite signal
- 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.)
- Expired - Lifetime
Links
Images
Landscapes
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Abstract
Description
技术领域technical field
本发明涉及电数字数据处理技术领域,特别是涉及一种信息熵保持解码方法与装置。The invention relates to the technical field of electrical digital data processing, in particular to an information entropy preserving decoding method and device.
背景技术Background technique
对变量X1、X2进行二维联合信息熵保持变长编码往往是通过查找二维码表实现的。当变量X1、X2的取值范围很大时,如果采用信息组合{X1、X2}与码字一一对应就会导致二维码表十分庞大,不利于存储和查找。通常的方法是,对于出现概率较大的信息组合{X1、X2}用查表实现编码,而对于出现概率小的{X1、X2}组合,先查表得到一个控制码字。这个控制码字仅仅用来标记对该事件的编码不能通过查表直接实现,而X1、X2的信息将由紧邻该控制码字后面的其他码字携带。The two-dimensional joint information entropy-preserving variable-length coding of the variables X 1 and X 2 is often realized by looking up the two-dimensional code table. When the value range of variables X 1 and X 2 is very large, if one-to-one correspondence between the information combination {X 1 , X 2 } and codewords is used, the two-dimensional code table will be very large, which is not conducive to storage and search. The usual method is to use a look-up table to implement encoding for the information combination {X 1 , X 2 } with a high probability of occurrence, and to obtain a control code word by looking up the table for the combination {X 1 , X 2 } with a low probability of occurrence. This control code word is only used to mark that the encoding of the event cannot be directly realized by looking up the table, and the information of X 1 and X 2 will be carried by other code words immediately behind the control code word.
对于不能通过查表直接实现编码的{X1、X2}组合,普遍被采用的编码方法是在控制码字后面,依次对X1、X2单独编码。这种方法的不足之处在于没有利用X1、X2之间的相关性,同时控制码字仅仅作为标记,没有携带一些关于X1或X2的信息,存在着冗余,不利于压缩效率的提高。For the {X 1 , X 2 } combination that cannot be coded directly by looking up the table, the commonly used coding method is to code X 1 and X 2 separately in sequence after the control codeword. The disadvantage of this method is that the correlation between X 1 and X 2 is not used, and the control codeword is only used as a mark, and does not carry some information about X 1 or X 2. There is redundancy, which is not conducive to compression efficiency improvement.
一种新的信息熵保持编码方法将X1、X2的一部分信息附加在控制码字上进行编码,剩余部分信息根据已编码信息再进行编码,这样提高信息熵保持编码的压缩效率。A new entropy-preserving coding method adds part of the information of X 1 and X 2 to the control codeword for coding, and the remaining part of information is coded according to the coded information, which improves the compression efficiency of entropy-preserving coding.
发明内容Contents of the invention
本发明提供一种信息熵保持解码方法与装置,用于对背景技术中新的信息熵保持编码方法与装置所生成的码流进行正确解码。The present invention provides an information entropy preserving decoding method and device, which are used to correctly decode the code stream generated by the new information entropy preserving encoding method and device in the background art.
为了达到上述目的,本发明采用的技术方案如下:In order to achieve the above object, the technical scheme adopted in the present invention is as follows:
1.一种信息熵保持解码方法,包括若从码流中提取的码字与码表中的信号组合{X1=xn,X2=ym}一一对应,则解码得{X1=xn,X2=ym};若从码流中提取的码字没有与码表中的信号组合{X1=xn,X2=ym}一一对应,则该码字为第一合成信号,紧随其后的下一码字为第二合成信号,其解码步骤如下:1. An information entropy-preserving decoding method, including if the code word extracted from the code stream is in one-to-one correspondence with the signal combination {X 1 =x n , X 2 =y m } in the code table, then the decoded {X 1 = x n , X 2 =y m }; if the code word extracted from the code stream does not have a one-to-one correspondence with the signal combination {X 1 =x n , X 2 =y m } in the code table, then the code word is The first composite signal, the next codeword following it is the second composite signal, and its decoding steps are as follows:
1)从第一合成信号中减去特定的控制码字,从而解码第一信号X1或者第二信号X2;1) Subtracting a specific control codeword from the first synthesized signal, thereby decoding the first signal X 1 or the second signal X 2 ;
2)根据已解码的信息,从第二合成信号中解码另一个信号。2) Decoding another signal from the second composite signal based on the decoded information.
所述的从第一合成信号中减去特定的控制码字,从而解码第一信号X1或者第二信号X2,包括:The said subtracting a specific control codeword from the first synthesized signal so as to decode the first signal X 1 or the second signal X 2 includes:
1)从第一合成信号中减去特定的控制码字;1) Subtracting a specific control codeword from the first synthesized signal;
2)将第一合成信号减去控制码字所得的信号经函数f(x)映射解码得到第一信号X1或者第二信号X2的值,同时得到未被解码的另一个信号的一个控制信息,其中f(x)的自变量为第一合成信号减去控制码字所得的信号。2) The signal obtained by subtracting the control codeword from the first synthesized signal is mapped and decoded by the function f(x) to obtain the value of the first signal X 1 or the second signal X 2 , and at the same time obtain a control of another undecoded signal information, where the argument of f(x) is the signal obtained by subtracting the control codeword from the first synthesized signal.
所述的根据已解码的信息,从第二合成信号中解码另一个信号,包括:Said decoding another signal from the second synthesized signal according to the decoded information includes:
1)将已被解码的信号经函数u(x)映射;1) Map the decoded signal through the function u(x);
2)将经函数u(x)映射所得的信号与第二合成信号相加;2) adding the signal obtained through the function u(x) mapping to the second composite signal;
3)利用相加所得的信号和和以上所述的一个控制信息解码另一个信号。3) The other signal is decoded using the added signal and one of the control information described above.
2.一种信息熵保持解码的装置,包括输入的码字查二维变长解码表的查表装置,若从码流中提取的码字与码表中的信号组合{X1=xn,X2=ym}一一对应,则解码得信号组合{X1=xn,X2=ym};若输入的码字没有与二维变长解码表中的信号组合{X1,X2}一一对应则将该输入码字和紧随其后的下一码字输入解复用装置;2. A device for keeping information entropy decoding, including a table look-up device for the input codeword to look up a two-dimensional variable-length decoding table, if the codeword extracted from the code stream is combined with the signal in the code table {X 1 = x n , X 2 =y m } one-to-one correspondence, then the decoded signal combination {X 1 =x n , X 2 =y m }; if the input code word does not match the signal combination in the two-dimensional variable-length decoding table {X 1 , X 2 } one-to-one correspondence then input the input codeword and the next codeword following it into the demultiplexing device;
1)用于分离第一合成信号和第二合成信号的解复用装置;1) demultiplexing means for separating the first composite signal and the second composite signal;
2)从第一合成信号中减去特定的控制码字,用于解码第一信号X1或者第二信号X2的信息提取装置;2) Subtracting a specific control codeword from the first synthesized signal for decoding the information extraction device of the first signal X1 or the second signal X2 ;
3)根据已解码的信息,从第二合成信号中解码另一个信号的信息还原装置;3) an information restoration device for decoding another signal from the second composite signal based on the decoded information;
解复用装置分别与信息提取装置和信息还原装置相连,控制码字接信息提取装置的输入端,信息提取装置和信息还原装置相连。The demultiplexing device is respectively connected with the information extraction device and the information restoration device, the control code word is connected with the input end of the information extraction device, and the information extraction device is connected with the information restoration device.
所述的信息提取装置包括:The information extraction device includes:
1)减法装置;1) Subtraction device;
2)用于实现函数f(x)功能,解码X1或X2,同时得到未被解码的另一个信号的一个控制信息的第一信息还原装置;2) A first information restoration device for realizing the function f(x), decoding X 1 or X 2 , and simultaneously obtaining a control information of another signal that has not been decoded;
当查表装置的输出是控制码字时,第一合成信号和控制码字分别接减法装置的输入端;减法装置的输出与第一信息还原装置相连;第一信息还原装置输出的X1或X2,以及控制信息与信息还原装置相连。When the output of the table look-up device was a control code word, the first composite signal and the control code word were connected to the input of the subtraction device respectively; the output of the subtraction device was connected with the first information restoration device; the X 1 or the output of the first information restoration device X 2 , and the control information is connected with the information restoration device.
所述的信息还原装置包括:The information restoration device includes:
1)加法装置;1) Adding device;
2)用于实现函数u(x)功能的映射装置;2) a mapping device for realizing the function u(x);
3)用于解码X2的第二信息还原装置;3) A second information restoring device for decoding X2 ;
信息提取装置解码所得的X1或X2接映射装置的输入端;映射装置的输出端与加法装置的的输入端相连;第二合成信号接加法装置的另一个输入端;加法装置与第二信息还原装置相连;信息提取装置输出的控制信号与第二信息还原装置相连,用于传输控制信息;第二信息还原装置输出X2。The X 1 or X 2 that the information extraction device decodes is connected to the input of the mapping device; the output of the mapping device is connected to the input of the adding device; the second composite signal is connected to another input of the adding device; the adding device is connected to the second The information restoration device is connected; the control signal output by the information extraction device is connected with the second information restoration device for transmitting control information; the second information restoration device outputs X 2 .
本发明具有的有益的效果是:它完全实现了对背景技术中新的信息熵保持编码方法所生成码流的解码。本发明主要应用在对数字信号进行二维联合信息熵保持变长编码码流的解码器中,还可以推广至多维联合变长编码码流的解码器。本发明尤其适用于图像或视频压缩解码。The beneficial effect of the present invention is that it fully realizes the decoding of the code stream generated by the new information entropy preserving coding method in the background technology. The invention is mainly applied in a decoder for two-dimensional joint information entropy maintaining variable-length coded streams for digital signals, and can also be extended to a decoder for multi-dimensional joint variable-length coded streams. The invention is especially suitable for image or video compression decoding.
附图说明Description of drawings
图1是本发明装置的原理框图;Fig. 1 is the functional block diagram of device of the present invention;
图2是本发明装置的部件结构框图。Fig. 2 is a structural block diagram of the components of the device of the present invention.
具体实施方式Detailed ways
图像数据和视频数据在压缩编解码过程中,经过变换量化扫描后的一维系数是n(n≥0)个0和一个非0系数交替出现组成的。一个非0系数的值为level,该非0系数前值为0的系数个数叫做游程run。对变换量化扫描后的系数的解码往往是通过查找二维码表解码{level、run}组合。本发明适用于对{level=xn,run=ym}组合进行二维联合信息熵保持编码码流的解码,以下是本发明的实施例:In the process of compression encoding and decoding of image data and video data, the one-dimensional coefficient after transformation, quantization and scanning is composed of n (n≥0) 0s and one non-zero coefficient appearing alternately. The value of a non-zero coefficient is level, and the number of coefficients whose value is 0 before the non-zero coefficient is called the run length run. The decoding of the transformed and quantized coefficients is often done by looking up the two-dimensional code table and decoding the {level, run} combination. The present invention is applicable to the combination of {level=x n , run=y m } to decode the two-dimensional joint information entropy-preserving encoded code stream. The following is an embodiment of the present invention:
实施例1Example 1
1.一种信息熵保持解码方法,包括以下步骤:1. A kind of information entropy keeps decoding method, comprises the following steps:
1)将从码流中提取的码字输入查表装置,查二维变长解码表,若该码字与码表中的{level=xn,run=ym}组合一一对应,则解码得{level=xn,run=ym}组合;若输入的码字在二维变长解码表中不存在与其一一对应的的信号组合{level=xn,run=ym},查表装置输出特定的控制码字,同时将该输入码字与紧随其后的下一个码字输入解复用装置,解复用装置将该输入码字作为第一合成信号输出并将紧随其后的下一码字作为第二合成信号输出;1) Input the code word extracted from the code stream into the table look-up device, check the two-dimensional variable-length decoding table, if the code word is in one-to-one correspondence with the {level=x n , run=y m } combination in the code table, then The decoded {level=x n , run=y m } combination; if the input code word does not have a one-to-one corresponding signal combination {level=x n , run=y m } in the two-dimensional variable-length decoding table, The table look-up device outputs a specific control code word, and simultaneously inputs the input code word and the next code word following it into the demultiplexing device, and the demultiplexing device outputs the input code word as the first composite signal and The subsequent next codeword is output as the second composite signal;
2)第一合成信号和第二合成信号的解码步骤如下:2) The decoding steps of the first composite signal and the second composite signal are as follows:
第一合成信号和特定的控制码字输入信息提取装置,在信息提取装置中第一合成信号减去特定的控制码字,从而解码得到run的值;The first composite signal and the specific control codeword are input to the information extraction device, and the first composite signal is subtracted from the specific control codeword in the information extraction device, thereby decoding to obtain the value of run;
第二合成信号和已解码的信息输入信息还原装置,根据已解码的信息,从第二合成信号中解码level的值。The second composite signal and the decoded information are input to the information restoring device, and the value of level is decoded from the second composite signal according to the decoded information.
2.第1点所说的从第一合成信号中减去特定的控制码字,从而解码run的值,方法如下:2. As mentioned in point 1, the specific control codeword is subtracted from the first composite signal to decode the value of run. The method is as follows:
1)第一合成信号和特定的控制码字输入减法装置701,在减法装置701中第一合成信号减去特定的控制码字,此例中特定的控制码字等于59;1) the first composite signal and the specific control codeword
2)将第一合成信号减去特定的控制码字所得的信号输入第一信息还原装置703,在第一信息还原装置703中输入经函数f(x)映射解码得到run的值,同时得到level的符号信息,其中f(x)的功能是将输入x二进制化后的最低位,作为level的符号信息输出,将x右移一位得到run的值。2) Input the signal obtained by subtracting the specific control codeword from the first synthesized signal into the first
3.第1点所说的根据已解码的信息,从第二合成信号中解码level的值,方法如下:3. According to the decoded information mentioned in point 1, the value of level is decoded from the second composite signal as follows:
1)run输入映射装置705经函数u(ym)映射,其中函数u(ym)实现的功能是对于run=ym,找到|xl|,其中{level=|xl|,run=ym}不能通过查表实现解码且{level=|xl|-1,run=ym,}能通过查表实现解码,则u(ym)=|xl|;1) The run
2)映射装置705的输出和第二合成信号都输入加法装置704,将经函数u(ym)映射所得的信号|xl|与第二合成信号相加,得到level的绝对值信息;2) Both the output of the
3)level的绝对值信息和第2点中解出的level的符号信息输入第二信息还原装置706,解码得到level的值。3) The absolute value information of the level and the sign information of the level obtained in the second point are input to the second
实施例2Example 2
1.一种信息熵保持解码方法,包括以下步骤:1. A kind of information entropy keeps decoding method, comprises the following steps:
1)将从码流中提取的码字输入查表装置,查二维变长解码表,若该码字与码表中的{level=xn,run=ym}组合一一对应,则解码得{level=xn,run=ym}组合;若输入的码字在二维变长解码表中不存在与其一一对应的的信号组合{level,run},查表装置输出特定的控制码字,同时将该输入码字与紧随其后的下一个码字输入解复用装置,解复用装置将该输入码字作为第一合成信号输出并将紧随其后的下一码字作为第二合成信号输出;1) Input the code word extracted from the code stream into the table look-up device, check the two-dimensional variable-length decoding table, if the code word is in one-to-one correspondence with the {level=x n , run=y m } combination in the code table, then Decode {level=x n , run=y m } combination; if the input code word does not have a one-to-one corresponding signal combination {level, run} in the two-dimensional variable-length decoding table, the table look-up device outputs a specific Control the code word, input the input code word and the next code word immediately after it into the demultiplexing device at the same time, and the demultiplexing device outputs the input code word as the first composite signal and outputs the next code word following it The code word is output as a second composite signal;
2)第一合成信号和第二合成信号的解码步骤如下:2) The decoding steps of the first composite signal and the second composite signal are as follows:
第一合成信号和特定的控制码字输入信息提取装置,在信息提取装置中第一合成信号减去特定的控制码字,从而解码得到run或level的值;The first composite signal and the specific control codeword are input to the information extraction device, and the first composite signal is subtracted from the specific control codeword in the information extraction device, thereby decoding to obtain the value of run or level;
第二合成信号和已解码的信息输入信息还原装置,根据已解码的信息,从第二合成信号中解码另一个信号。The second composite signal and the decoded information are input to the information restoring device, and another signal is decoded from the second composite signal based on the decoded information.
2.第1点所说的从第一合成信号中减去特定的控制码字,从而解码run或level的值,方法如下:2. As mentioned in point 1, subtract a specific control codeword from the first composite signal to decode the value of run or level. The method is as follows:
1)第一合成信号和特定的控制码字输入减法装置701,在减法装置701中第一合成信号减去特定的控制码字,此例中特定的控制码字等于59;1) the first composite signal and the specific control codeword
2)将第一合成信号减去特定的控制码字所得的信号x输入第一信息还原装置703,在第一信息还原装置703中经函数f(x)映射解码得到run或level的值,f(x)的功能是若x<64,则解码run的值,run等于x,否则(即x≥64)将(x-64)的值二进制化后的最低位作为level的符号信息,同时将(x-64)右移一位得到level的绝对值信息,再由level的符号信息和level的绝对值信息解码level的值,f(x)输出的控制信息为0。2) Input the signal x obtained by subtracting the specific control codeword from the first synthesized signal into the first
3.第1点所说的根据已解码的信息,从第二合成信号中解码另一个信号,方法如下:3. Based on the decoded information mentioned in point 1, another signal is decoded from the second composite signal, as follows:
1)在第2点中解码的信号run或level输入映射装置705,经函数u(x)映射为0;1) The signal run or level decoded in the second point is input to the
2)映射装置705的输出和第二合成信号都输入加法装置704,将经函数u(x)映射所得的信号0与第二合成信号相加,得到信号z;2) Both the output of the
3)将信号z输入第二信息还原装置706,若第2点中被解码的是run的值,则第二信息还原装置解码level的值,将z二进制化后的最低位作为level的符号信息,同时将z右移一位得到level的绝对值信息,再由level的符号信息和level的绝对值信息解码level的值;若第2点中被解码的是level的值,则第二信息还原装置解码解码run的值,run等于z。3) Input the signal z into the second
上述的用于提高压缩效率的信息熵保持解码方法的装置,可以用处理器系统,微控制器,可编程逻辑器件或硬件电路实现部分或全部的操作。上述的一些操作可以用软件实现,同时另一些操作可以用硬件实现。The above device for entropy preserving decoding method for improving compression efficiency can use a processor system, a microcontroller, a programmable logic device or a hardware circuit to realize part or all of the operations. Some of the operations described above can be implemented in software, while others can be implemented in hardware.
为了方便起见,这些操作被描述为不同的互连的功能单元或不同的软件模块。但是,这不是必要的。在一些应用中,这些功能单元或模块可以被集成到单一的逻辑器件、程序或操作中,而没有明显的界限。在任何情况中,功能单元和软件模块或描述的特征可以独立实现,或与其他操作一起用硬件或软件实现。For convenience, these operations are described as different interconnected functional units or as different software modules. However, this is not necessary. In some applications, these functional units or modules may be integrated into a single logic device, program or operation without sharp boundaries. In any case, the functional units and software modules or described features may be implemented independently or in hardware or software together with other operations.
Claims (4)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN 200310109499 CN1236623C (en) | 2003-12-14 | 2003-12-14 | Information ontropy holding decoding method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN 200310109499 CN1236623C (en) | 2003-12-14 | 2003-12-14 | Information ontropy holding decoding method and device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN1535022A CN1535022A (en) | 2004-10-06 |
| CN1236623C true CN1236623C (en) | 2006-01-11 |
Family
ID=34304641
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN 200310109499 Expired - Lifetime CN1236623C (en) | 2003-12-14 | 2003-12-14 | Information ontropy holding decoding method and device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN1236623C (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110602498B (en) * | 2019-09-20 | 2022-03-01 | 唐驰鹏 | Self-adaptive finite state entropy coding method |
| CN111368576B (en) * | 2020-03-12 | 2023-04-21 | 成都信息工程大学 | An Automatic Reading Method of Code128 Barcode Based on Global Optimization |
-
2003
- 2003-12-14 CN CN 200310109499 patent/CN1236623C/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| CN1535022A (en) | 2004-10-06 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN107431824B (en) | Method for context coding and decoding and binaryzation in palette mode in video coding and decoding | |
| CN101167366B (en) | A binarization method and device | |
| CN1155221C (en) | Encoding method and system and decoding method and system | |
| CN105191145B (en) | Data encoder, data decoder and decoding method | |
| EP1391123A2 (en) | Method and apparatus for coding of wavelet transformed coefficients | |
| CN1309258C (en) | A method of lossless image compression applied to real time transmission | |
| CN1166204C (en) | Method and device for encoding video signal | |
| WO1997034375A1 (en) | Method for reducing storage requirements for digital data | |
| JP4540585B2 (en) | Encoding device and decoding device | |
| Srikanth et al. | Compression efficiency for combining different embedded image compression techniques with Huffman encoding | |
| EP2697974A2 (en) | Methods and devices for coding and decoding the position of the last significant coefficient | |
| CN1262816A (en) | Arithmetic encoding and decoding of information signal | |
| CN1623279A (en) | Method and apparatus for variable length coding of bit planes | |
| CN101878651A (en) | Variable length coding of coefficient families for image and video compression | |
| TWI479456B (en) | Method and apparatus for data compression using error plane coding | |
| CN100345449C (en) | Method of entropy coding of transformation coefficient in image/video coding | |
| RU2611249C1 (en) | Entropy modifier and method to use it | |
| CN1650625A (en) | Adaptive method and system for mapping parameter values to codeword indices | |
| CN118450131A (en) | Method and device for decoding data of variable-length codes containing multiple coding parameters in fixed-length code units | |
| CN1984336A (en) | Binary method and device | |
| JP2011114525A (en) | Method and device for encoding/decoding numerical data string | |
| CN1236623C (en) | Information ontropy holding decoding method and device | |
| CN1236622C (en) | Information entropy holding coding method and device | |
| WO2024125558A1 (en) | Prediction tree-based point cloud geometry coding method and device, and prediction tree-based point cloud geometry decoding method and device | |
| CN1520186A (en) | High-speed inverse discrete cosine transform method and device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant | ||
| ASS | Succession or assignment of patent right |
Owner name: HUAWEI TECHNOLOGY CO., LTD. Free format text: FORMER OWNER: ZHEJIANG UNIVERSITY Effective date: 20080418 |
|
| C41 | Transfer of patent application or patent right or utility model | ||
| TR01 | Transfer of patent right |
Effective date of registration: 20080418 Address after: Bantian HUAWEI headquarters office building, Longgang District, Shenzhen, Guangdong Patentee after: HUAWEI TECHNOLOGIES Co.,Ltd. Address before: No. 38, Zhejiang Road, Hangzhou, Zhejiang, Xihu District Patentee before: Zhejiang University |
|
| CX01 | Expiry of patent term |
Granted publication date: 20060111 |
|
| CX01 | Expiry of patent term |