WO2006034647A1 - Variable length encoding and decoding method - Google Patents

Variable length encoding and decoding method Download PDF

Info

Publication number
WO2006034647A1
WO2006034647A1 PCT/CN2005/001587 CN2005001587W WO2006034647A1 WO 2006034647 A1 WO2006034647 A1 WO 2006034647A1 CN 2005001587 W CN2005001587 W CN 2005001587W WO 2006034647 A1 WO2006034647 A1 WO 2006034647A1
Authority
WO
WIPO (PCT)
Prior art keywords
variable length
class
length code
code
bit
Prior art date
Application number
PCT/CN2005/001587
Other languages
French (fr)
Chinese (zh)
Inventor
Zhong Luo
Jing Wang
Linhua Ma
Yilin Chang
Original Assignee
Huawei Technologies Co., Ltd.
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 Huawei Technologies Co., Ltd. filed Critical Huawei Technologies Co., Ltd.
Publication of WO2006034647A1 publication Critical patent/WO2006034647A1/en

Links

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/30Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
    • H03M7/40Conversion to or from variable length codes, e.g. Shannon-Fano code, Huffman code, Morse code
    • 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/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/91Entropy coding, e.g. variable length coding [VLC] or arithmetic coding

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The invention discloses a new variable length encoding and decoding method that is directed to resolve the VLC sequence number errors that tend to happen in prior arts. In the invention, at least two types of VLCs are used alternatively for variable length encoding when performing the signal source encoding, and the bitstreams are decoded by different VLCs alternatively according to the encoding arrangement rules when performing the signal source decoding. When the sync bit of one of the VLCs is wrong, if decoding is directly performed without correcting errors, the rule of alternative VLCs will be destroyed. At this time, posterior probability can be used to judge the maximum error probability, and the maximum posterior probability can be outputted as the decoding result, so the rule of alternative VLCs will be kept. In the invention, the inserting or deleting errors will not happen, and every VLC sequence number will not change.

Description

一种变长码编解码方法  Variable length code encoding and decoding method
技术领域 本发明涉及视频编解码技术, 更具体地说, 涉及一种变长码编解码方 法。 TECHNICAL FIELD The present invention relates to video codec techniques, and more particularly to a variable length codec method.
背景技术 信源熵压缩中, 利用变长码 (Variable Length Code :VLC)对数据进行压 缩是最常用的方法之一。对于给定的信源和信源符号的概率分布, Huffinan 变长编码 [Huffman D.A., "A method for construction of minimum redundancy codes" , Proc. IRE, Vol 40, pp. 1098-1101, Sep. 1952.]可以得到最短平均码长, 对信源进行 有效压缩。 但是 Huffman码等对误码非常敏感, 通常一个比特的错误会引 起后续若干变长码不能正确解码, 即不能正确定位变长码的起始和结束位 置, 因此在有噪声干扰时变长码的误码扩散相当严重, 当比特误码率在 10 — 4时, 变长码符号错误率却高达 10—2以上。 BACKGROUND In source entropy compression, compressing data using variable length code (VLC) is one of the most commonly used methods. Huffinan variable length coding for a given source and source symbol [Huffman DA, "A method for construction of minimum redundancy codes", Proc. IRE, Vol 40, pp. 1098-1101, Sep. 1952. ] You can get the shortest average code length and effectively compress the source. However, the Huffman code is very sensitive to the error code. Usually, a bit error will cause the subsequent variable length codes to be decoded correctly, that is, the start and end positions of the variable length code cannot be correctly located, so the variable length code is used when there is noise interference. error diffusion is very serious, when the bit error rate 10--4, the variable length code symbol error rate as high as 10-2 or more.
在本技术领域中, 信源中要编码的对象通常被称为信源符号, 如运动 矢量、 宏块模式等, 在表 1中用 Sl、 S2、 S3、 S4、 S5表示。 而变长码符 号指的是代表 "信源符号"的 2进制比特串,例如在表 1中,对于 Huffinan 码, 代表信源符号 S1的变长码符号为 "00"; 代表信源符号 S2的变长码 符号为 "01"。 变长码符号错误指的是变长码符号中任何一个比特错误, 该符号即发生错误, 由此而统计的是变长码符号错误概率, 不是统计比特 错误概率。 针对 Huffman码的缺点, 现在已有许多变长码构造方案, 但是 对于某些应用, 仍然不能满足要求。  In the art, objects to be encoded in a source are often referred to as source symbols, such as motion vectors, macroblock patterns, etc., and are represented in Table 1 by Sl, S2, S3, S4, S5. The variable length code symbol refers to a binary bit string representing a "source symbol", for example, in Table 1, for a Huffinan code, the variable length code symbol representing the source symbol S1 is "00"; representing a source symbol The variable length code symbol of S2 is "01". The variable length code symbol error refers to any bit error in the variable length code symbol, and the symbol is an error, thereby counting the variable length code symbol error probability, not the statistical bit error probability. In view of the shortcomings of Huffman codes, there are many variable length code construction schemes, but for some applications, they still cannot meet the requirements.
变长码符号错误包括以下几种:  Variable length code symbol errors include the following:
1)替代错误, 当有比特错误时, 变长码会发生符号替代错误, 即一个 变长码符号被错误地解码为另一个变长码符号;  1) Substitute error, when there is a bit error, a symbol substitution error occurs in the variable length code, that is, one variable length code symbol is erroneously decoded into another variable length code symbol;
2)删除错误, 即两个或多个变长码被解码为一个变长码;  2) deleting the error, that is, two or more variable length codes are decoded into one variable length code;
3)插入错误, 即一个变长码被解码为两个或多个变长码符号。  3) Insertion error, that is, a variable length code is decoded into two or more variable length code symbols.
这三种错误又可分为两类:  These three errors can be divided into two categories:
(一) 变长码的符号错误, 它是指变长码中仅发生符号替代错误, 变长 码的序号 (即任一变长码在数据流中的序号)并没有发生变化,以下称之为第 一类错误。 (1) The symbol of the variable length code is incorrect. It means that only the symbol substitution error occurs in the variable length code, and the variable length The sequence number of the code (that is, the sequence number of any variable length code in the data stream) has not changed, and is hereinafter referred to as the first type of error.
(二) 变长码的序号错误, 它是由变长码的插入和删除错误引起的, 也 就是说, 因为插入或删除了一个或多个变长码, 会导致后续的变长码序号 相应地增大或减小, 以下称之为第二类错误。  (2) The serial number of the variable length code is incorrect. It is caused by the insertion and deletion of the variable length code. That is, because one or more variable length codes are inserted or deleted, the subsequent variable length code number will be corresponding. The ground is increased or decreased, which is hereinafter referred to as the second type of error.
发生错误时, 某些变长码会同时具有第一类和第二类错误; 某些变长 码虽然解码正确,没有第一类错误,但由于其前面发生了插入和删除错误, 所以其序号会相应增大或減小, 也就是会相应地发生第二类错误。  When an error occurs, some variable length codes will have both the first type and the second type of error; some variable length codes are decoded correctly, there is no first type of error, but because of the insertion and deletion errors in front of them, the serial number It will increase or decrease accordingly, that is, a second type of error will occur accordingly.
目前, 针对 Huffman 变长码的误码扩散效应所提出的其它变长码方 案, 都只是降低变长码的第一类错误, 例如可快速同步逗点码、 反向可解 变长码 (Reversible VLC , 经下简称 RVLC) [ Takishima, M. Wada, and H. Murakami, "Reversible variable length codes," IEEE Trans. Commun" vol. 43, pp. 158-162, Feb. Mar./Apr. 1995. ]等, 都只 是针对性地解决变长码的第一类错误。  At present, other variable length code schemes proposed for the error diffusion effect of Huffman variable length codes are only the first type of errors that reduce variable length codes, such as fast sync comma code and reverse solvable long code (Reversible). VLC, hereinafter referred to as RVLC) [Takishima, M. Wada, and H. Murakami, "Reversible variable length codes," IEEE Trans. Commun" vol. 43, pp. 158-162, Feb. Mar./Apr. 1995. ], etc., are only the first type of error to solve the variable length code in a targeted manner.
表 1中列出了 Huffman码、 逗点码和 RVLC的 5信源符号编码示例。  Table 5 lists the Huffman code, comma code, and RVLC's 5 source symbol encoding examples.
表 1 Huffman码、 逗点码和 RVLC的 5信源符号编码示例  Table 1 Example of 5 source symbol encoding for Huffman code, comma code and RVLC
Figure imgf000004_0001
从表 1中可以看出, Huffman码具有最短平均码长, 但是它容易产生 误码扩散, 产生变长码的第一类和第二类错误。 从图 1可看出, 一个比特 的错误, 会使后续很多信源符号解码错误, 并且会产生插入和删除错误; 图中的问号表示超出了对应码表, 不能正确译码。
Figure imgf000004_0001
As can be seen from Table 1, the Huffman code has the shortest average code length, but it is prone to error spread, resulting in the first and second types of errors of the variable length code. As can be seen from Figure 1, a bit error will cause many subsequent source symbols to be decoded incorrectly, and insert and delete errors will occur; the question mark in the figure indicates that the corresponding code table is exceeded and cannot be decoded correctly.
RVLC的特点是可以从正向和反向两个方向解码, 当发现变长码解码 错误的时候, 可从反方向解码, 从而尽可能多地恢复变长码。 RVLC虽然 可以反方向解码, 但在两个方向的解码中, 从码字本身很难确定错误究竟 出在哪, 如图 3所示, 很难确定正向和反向解码中哪个问号处的错误是真 正的错误, 因此很难确定哪些码字是真正正确解码的码字。 实际应用中, 通常只能靠编解码的实际内容来判断所解出的码字的合理性。 RVLC is characterized by being able to decode from both the forward and reverse directions. When a variable length code decoding error is found, it can be decoded from the reverse direction to recover the variable length code as much as possible. Although RVLC can decode in the reverse direction, in the decoding of the two directions, it is difficult to determine the error from the codeword itself. Where is it, as shown in Figure 3, it is difficult to determine which of the forward and reverse decoding errors in the question mark is a true error, so it is difficult to determine which codewords are truly correctly decoded codewords. In practical applications, the rationality of the codewords solved can usually be judged by the actual content of the codec.
相比之下, 逗点码具有快速同步的功能, 表 1中所示的只是其中的一 种类型, 还有其它类型的逗点码, 但功能都类似。 逗点码虽然克服了 Huffman码的误码扩散效应, 但常有插入和删除错误, 容易产生变长码的 第二类错误。 如图 2所示, 信源 S5 中的一个比特错误, 使 S5被解码为 S2、 S3 , 相当于发生了插入错误, 此时, 虽然其右面的 Sl、 S2、 S3仍继 续可正常解码, 但它们的序号都会相应加 1, 也就是发生了第二类错误。  In contrast, comma code has the function of fast synchronization. Only one of them is shown in Table 1. There are other types of comma codes, but the functions are similar. Although comma code overcomes the error diffusion effect of Huffman code, it often has insertion and deletion errors, and it is easy to produce the second type of error of variable length code. As shown in Figure 2, one bit in the source S5 is incorrect, so that S5 is decoded into S2 and S3, which is equivalent to an insertion error. At this time, although the right side of S1, S2, and S3 continue to decode normally, Their serial numbers will be incremented by 1, which is the second type of error.
从上述内容可知, 具有同步功能的变长码, 如逗点码, 可以有效地降 低第一类错误, 即变长码的符号替代错误; 但是, 如果产生了插入和删除 错误, 则后续所有变长码将发生序号错误, 即第二类错误, 它是影响视频 解码正确性的一个主要因素。  As can be seen from the above, variable length codes with synchronization function, such as comma code, can effectively reduce the first type of error, that is, the symbol substitution error of the variable length code; however, if an insertion and deletion error occurs, all subsequent changes are made. The long code will have a serial number error, which is the second type of error, which is a major factor affecting the correctness of video decoding.
发明内容 Summary of the invention
针对现有技术的上述缺陷,本发明要提供一种新的变长码编解码方法, 以解决现有变长码编解码方法中容易发生第二类错误的问题, 从而消除由 变长码的插入和删除错误所引起的变长码的序号错误。  In view of the above drawbacks of the prior art, the present invention provides a new variable length code encoding and decoding method to solve the problem that the second type of error is easy to occur in the existing variable length code encoding and decoding method, thereby eliminating the variable length code. The serial number of the variable length code caused by the insertion and deletion error is incorrect.
本发明的技术方案是, 提供一种变长码编解码方法, 用于对信源进行 编解码处理, 其特征在于, 所述方法包括如下步骤:  The technical solution of the present invention is to provide a variable length code encoding and decoding method, which is used for encoding and decoding a source, and the method includes the following steps:
(1)在对信源进行编码时, 采用至少两类变长码交替进行编码; (1) When encoding a source, alternately encode at least two types of variable length codes;
(2)在对信源进行解码时,依据编码时的规则,对编码码流进行变长码 交替 码。 (2) When decoding the source, the coded stream is subjected to a variable length code alternate code according to the rules at the time of encoding.
在上述方法具体实施时, 采用 L类变长码, L为大于等于 2的自然数, 标识为 LI、 L2 LL,可按以下任一种交替方式对信源进行 LI、 L2  In the specific implementation of the above method, a L-type variable length code is used, L is a natural number greater than or equal to 2, and is identified as LI, L2 LL, and the source may be LI, L2 in any of the following alternate manners.
LL共 L类变长码交替编码: LL total L class variable length code alternate coding:
(3-1) 每一个 L1类变长码后面的变长码为 L2类变长码,每一个 L2类 变长码后面的变长码为 L3类变长码, 以此类推, 直到 LL类变长码, 每一 今 LL类变长码后面的变长码为 L1类变长码;  (3-1) The variable length code after each L1 type variable length code is L2 type variable length code, the variable length code after each L2 type variable length code is L3 type variable length code, and so on, until LL class Variable length code, the variable length code after each LL class variable length code is an L1 type variable length code;
(3-2) 每两个 L1类变长码后面的变长码为两个 L2类变长码, 每两个 L2类变长瑪后面的变长码为两个 L3类变长码, 以此类推, 直到 LL类变长 码, 每两个 LL类变长码后面的变长码为两个 L1类变长码; (3-2) The variable length code after every two L1 class variable length codes is two L2 class variable length codes, each two The variable length code behind the L2 class variable length Ma is two L3 class variable length codes, and so on, until the LL class variable length code, the variable length code after each two LL class variable length codes is two L1 type variable length code;
(3-3) 每 Ml个 L1类变长码后面跟 M2个 L2类变长码, 每 M2个 L2类 变长码后面 3艮 M3个 L3类变长码, 以此类推, 直到 ML个 LL类变长码, 每 ML个 LL类变长码后面 3艮 Ml个 L1类变长码, 其中, Ml、 M2 、 ML为 自然数。  (3-3) Each Ml L1 class variable length code is followed by M2 L2 class variable length codes, 3 M3 L3 class variable length codes after every M2 L2 class variable length codes, and so on, until ML LLs The class variable length code, 3 艮 Ml L1 class variable length codes after each ML LL class variable length code, wherein Ml, M2, and ML are natural numbers.
在采用 A、 B两种变长码时,可按以下任一种交替方式对信源进行八、 B两类变长^交替编码:  When using A and B variable length codes, the source can be alternately coded according to any of the following alternate modes:
(1-1)每一个 A类变长码后面的变长码只能是 B类变长码, 每一个 B 类变长码后面的变长码只能是 A类变长码;  (1-1) The variable length code after each class A variable length code can only be a class B variable length code, and the variable length code after each class B variable length code can only be a class A variable length code;
(1-2)每两个 A类变长码后面跟两个 B类变长码,每两个 B类变长码 后面跟两个 A类变长码;  (1-2) Each of the two Class A variable length codes is followed by two Class B variable length codes, and each of the two Class B variable length codes is followed by two Class A variable length codes;
(1-3)每 M个 A类变长码后面跟 N个 B类变长码, 每 N个 B类变长 码后面跟 M [个 A类变长码, 其中, M和 N为自然数。  (1-3) Each M class A variable length code is followed by N class B variable length codes, and each N class B variable length code is followed by M [A class A variable length code, where M and N are natural numbers.
居本发明的一个优选方案, 在所述 A类变长码中, 以 "0"作为同步 位, 以 "1" 作为截止位, 在任两个相邻同步位之间至少有一个信息位 X, 在截止位与其前面的那一个同步位之间至少有一个信息位 X,所述信息位 X 的值可为 "0"或 "Γ ; 在所述 B类变长码中, 以 "1"作为同步位, 以 "01" 作为截止位, 在截止位之前及任一同步位之前至少有一个信息位 X, 在相 邻两个同步位之间至少有一个信息位 X, 在截止位与其前面的那一个同步 位之间至少有一个信息位 X, 所述信息位 X的值可为 "0" 或 "1"。 当然, 所述 A、 B类变长码的定义形式也可以相互调换。  According to a preferred embodiment of the present invention, in the class A variable length code, "0" is used as the synchronization bit, "1" is used as the cutoff bit, and at least one information bit X is between any two adjacent sync bits. There is at least one information bit X between the cut-off bit and the previous sync bit, and the value of the information bit X can be "0" or "Γ; in the B-type variable length code, "1" is used as The sync bit, with "01" as the cutoff bit, has at least one information bit X before the cutoff bit and before any sync bit, and at least one information bit X between the adjacent two sync bits, in front of the cutoff bit There is at least one information bit X between the synchronization bits, and the value of the information bit X can be "0" or "1". Of course, the definition forms of the A and B variable length codes can also be interchanged.
本发明所述方法的步骤 (1)中, 在对信源进行编码时, 还要对信源符号 的概率进 统计, 对于出现概率最大的信源符号, 用最短的编码来表示; 对于出现积无率次大的信源符号, 用相同或次最短长度的编码来表示, 对于 出现概率:^小的信源符号, 则用最长的编码来表示。  In the step (1) of the method of the present invention, when encoding the source, the probability of the source symbol is further counted, and the source symbol with the highest probability of occurrence is represented by the shortest code; The source symbol with the second highest rate is represented by the same or the shortest length of the code. For the probability of occurrence: the source symbol is small, it is represented by the longest code.
本发 3月所述方法的步驟 (2)中, 在对信源进行解码时, 如果某一变长码 的同步位出错, 则判断变长码的最大错误可能, 并用概率最大的那一种纠 错方案的乡 果作为解码输出。 本发明所述方法的步骤 (2)中, 在对信源进行解码时, 如果某一变长码 的同步位出错, 则可采用后验概率来判断变长码的最大错误可能, 并用后 验概率最大的那一种釗错方案的结果作为解码输出。 In the step (2) of the method described in the third of the present invention, when the source is decoded, if the synchronization bit of a variable length code is in error, the maximum error of the variable length code is determined, and the one with the highest probability is used. The hometown of the error correction scheme is used as the decoding output. In the step (2) of the method of the present invention, when decoding the source, if the synchronization bit of a variable length code is in error, the posterior probability can be used to determine the maximum error probability of the variable length code, and the posterior error is used. The result of the most probable one is the decoded output.
在本发明的编解码方案中, 由误码引起的变长码错误有两种可能, 一 种是信息位出错, 它不会影响变长码符号的同步; 另一种情况是同步位出 错, 当同步位出错后, 如果不采取纠正而直接进行解码, 就会违反 A、 B 类变长码应交替输出这一规则;此时可采用后验概率判断其最大错误可能, 并用后验概率最大者 为解码输出, 以维持 A、 B类变长码应交替输出这 一规则 , 从而不会发生插入或删除错误 , 每一个变长码的序号可保持不变, 也就是不会发生第二类错误。  In the codec scheme of the present invention, there are two possibilities for variable length code errors caused by bit errors, one is information bit error, which does not affect the synchronization of variable length code symbols; the other case is synchronization bit error, When the synchronization bit error occurs, if the decoding is directly performed without correcting, it will violate the rule that the A and B variable length codes should be alternately output; at this time, the posterior probability can be used to judge the maximum error probability, and the posterior probability is the largest. The output is decoded to maintain the rule that the A and B variable length codes should be alternately output, so that no insertion or deletion errors occur, and the serial number of each variable length code can remain unchanged, that is, the second type does not occur. error.
附图说明 下面将结合附图及实施例对本发明作进一步说明, 附图中: BRIEF DESCRIPTION OF THE DRAWINGS The invention will be further described with reference to the accompanying drawings and embodiments in which:
图 1是 Huffman 马的误码扩散示意图;  Figure 1 is a schematic diagram of error propagation of Huffman horses;
图 2是逗点码的误码扩散示意图;  2 is a schematic diagram of error diffusion of a comma code;
图 3是 RVLC码的误码扩散示意图。  Figure 3 is a schematic diagram of error propagation of the RVLC code.
具体实施方式 detailed description
在视频编解码方案中, 如 MPEG2、 MPEG4、 H.264等, 其编码的语 法单元如 DCT 系数、 运动矢量符号等都与图像的块和宏块有严格的对应 关系。 所解码的变长码不但要求信源符号本身解码正确, 而且要求信源符 号的序号也要解码正确, 这样视频解码器才能正确重建图像。  In the video codec scheme, such as MPEG2, MPEG4, H.264, etc., the syntax units of the coding, such as DCT coefficients, motion vector symbols, etc., have strict correspondence with the blocks and macroblocks of the image. The decoded variable length code not only requires the source symbol itself to be decoded correctly, but also requires that the sequence number of the source symbol be decoded correctly so that the video decoder can reconstruct the image correctly.
本发明提出了一种新的变长码编解码方法, 此处称之为交替变长码 (Alternate VLC, 简称 AVLC), 它通过至少两类变长码交替对信源进行编 码。 这种交替变长码不但能够快速同步以降低变长码的第一类错误, 而且 可以有效的克服变长码的第二类错误。 例如, 具体实施时, 可按以下任 一种交替方式对信源进行 A、 B两类变长码交替编码:  The present invention proposes a new variable length code encoding and decoding method, referred to herein as an alternate variable length code (Alternate VLC, referred to as AVLC), which alternates the source by at least two types of variable length codes. This alternate variable length code can not only quickly synchronize to reduce the first type of error of the variable length code, but also effectively overcome the second type of error of the variable length code. For example, in the specific implementation, the source and the two types of variable length codes can be alternately coded in the following alternate manner:
(1-1)每一个 A类变长码后面的变长码只能是 B类变长码, 每一个 B 类变长码后面的吏长码只能是 A 类变长码, 即 ABABAB...、 或 BABABA...;  (1-1) The variable length code after each class A variable length code can only be a class B variable length code. The length code after each class B variable length code can only be a class A variable length code, that is, ABABAB. .., or BABABA...;
(1-2)每两个 A类变长码后面跟两个 B类变长码,每两个 B类变长码 后面跟两个 A类变长码, 即 AABBAABB...、 或 BBAABBAA...; (1-2) Every two class A variable length codes are followed by two class B variable length codes, and each two class B variable length codes Followed by two class A variable length codes, namely AABBAABB..., or BBAABBAA...;
(1-3)每 M个 A类变长码后面 ^艮 N个 B类变长码, 每 N个 B类变长 码后面跟 M个 A类变长码, 其中, M和 N为自然数, 例如 ABBABB...、 或 BAABAABAA... , 等等;  (1-3) After each M class A variable length code, ^ 个 N class B variable length codes, each N class B variable length code is followed by M class A variable length codes, where M and N are natural numbers, For example ABBABB..., or BAABAABAA..., etc.;
在解码时, 则按与编码相同^交替方式进行交替解码。  At the time of decoding, alternate decoding is performed in the same manner as the encoding.
在采用 A、 B、 C三类变长码日于, 可按以下任一种交替方式对信源进 行八、 B、 C三类变长码交替编码:  In the three types of variable length codes A, B, and C, the source code can be alternately coded with the variable length codes of eight, B, and C in any of the following alternate ways:
(2-1)每一个 A类变长码后面白 变长码为 B类变长码,每一个 B类变 长码后面的变长码为 C类变长码, 每一个 C类变长码后面的变长码为 A 类变长码;  (2-1) The white variable length code of each class A variable length code is a class B variable length code, and the variable length code after each class B variable length code is a class C variable length code, and each class C variable length code The latter variable length code is a class A variable length code;
(2-2)每两个 A类变长码后面 3艮两个 B类变长码,每两个 B类变长码 后面跟两个 C类变长码, 每两个 C类变长码后面 艮两个 Α类变长码; (2-2) 3 艮 two class B variable length codes after every two class A variable length codes, each of the two class B variable length codes is followed by two class C variable length codes, and each two class C variable length codes Behind the two 变 class variable length code;
(2-3) 每 M个 A类变长码后面跟 N个 B类变长码,每 N个 B类变长码 后面跟 P个 C类变长码,每 P个 C类变长码后面跟 M个 A类变长码,其中, !^和 P为自然数。 (2-3) Each M class A variable length code is followed by N class B variable length codes, and each N class B variable length code is followed by P class C variable length codes, after each P class C variable length code With M class A variable length code, which, ! ^ and P are natural numbers.
事实上, 上述方案的关键点在于采用两类及两类以上的变长码交替对 信源进行编码, 因此实际中的方案并不限于上述举例, 还有很多种, 即可 以采用上述举例的多类变长码的见则交替, 也可以采用多类变长碼的非规 则交替。 例如, 在采用 A、 B、 C三类变长码时, 还可以采用的交替方式为: AABCAABC, ABBCABBC, ABCCABCC, ABBCCCABBCCC等。 采用 2类、 3类或任 意多类变长码, 以及无论采用变长码的规则交替还是非规则交替都能实现 本发明, 区别仅在于解码的复杂复,和效果的差异, 原理没有发生变化。  In fact, the key point of the above solution is to alternate the source code by using two types and two or more types of variable length codes. Therefore, the actual solution is not limited to the above examples, and there are many types, that is, many of the above examples can be used. The term of the variable length code is alternated, and the irregular alternating of multiple types of variable length codes can also be used. For example, when using variable length codes A, B, and C, the alternate modes that can be used are: AABCAABC, ABBCABBC, ABCCABCC, ABBCCCABBCCC, and the like. The invention can be implemented by using two types, three types or any plurality of types of variable length codes, and whether the rules of variable length codes are alternated or irregularly alternated, and the difference lies only in the complex complex of decoding, and the difference in effects, and the principle does not change. .
具体地说, 可采用 L类变长 , L为大于等于 1的自然数, 标识为 Ll、 Specifically, the L-type variable length can be used, and L is a natural number greater than or equal to 1, and is identified as L1.
L2、 LL, 可按以下任一种史替方式对信源进行 LI、 L2 LL共 L类变长码交替编码: L2, LL, the LI, L2 LL, and L-type variable length codes can be alternately coded according to any of the following alternatives:
(3-1) 每一个 L1类变长码后面的变长码为 L2类变长码,每一个 L2类 变长码后面的变长码为 L3类变长 ^马, 以此类推, 直到 LL类变长码, 每一 个 LL类变长码后面的变长码为 LL类变长码;  (3-1) The variable length code after each L1 type variable length code is L2 type variable length code, and the variable length code after each L2 type variable length code is L3 type variable length ^ horse, and so on, until LL The variable length code after each LL class variable length code is a LL class variable length code;
(3-2) 每两个 L1类变长码后面的变长码为两个 L2类变长码, 每两个 L2类变长码后面的变长码为两个 L3类变长码, 以此类推, 直到 LL类变长 码, 每两个 LL类变长码后面的变长码为两个 L1类变长码;(3-2) The variable length code after each two L1 type variable length codes is two L2 type variable length codes, and the variable length codes after each two L2 type variable length codes are two L3 type variable length codes, Such a push, until the LL class becomes longer Code, the variable length code after every two LL class variable length codes is two L1 class variable length codes;
(3-3) 每 Ml个 L1类变长码后面跟 M2个 L2类变长码, 每 M2个 L2类 变长码后面跟 M3个 L3类变长码, 以此类推, J!到 ML个 LL类变长码, 每(3-3) Each Ml L1 class variable length code is followed by M2 L2 class variable length codes, each M2 L2 class variable length code is followed by M3 L3 class variable length codes, and so on, J! to ML LL type variable length code, each
ML个 LL类变长码后面跟 Ml个 L1类变长码, 其中, Ml、 M2 ML为 自然数。 ML LL class variable length codes are followed by Ml L1 class variable length codes, where Ml and M2 ML are natural numbers.
以下描述中以第一种方式, 即采用 A、 B两类变长码的规则交替为例 进行说明, 无论 A类变长码, 还是 B类变长码, 都是由同步位和信息位 组成, 其结构如表 2和表 3所示:  In the following description, the first method, that is, the rule of using two types of variable length codes A and B is used as an example, and the type A variable length code or the B type variable length code is composed of a synchronization bit and an information bit. Its structure is shown in Table 2 and Table 3:
表 2 A类变长码的结构 表 3 B 类变长码的结构  Table 2 Structure of Class A Variable Length Code Table 3 Structure of Class B Variable Length Code
Figure imgf000009_0001
Figure imgf000009_0002
从表 2和表 3中可以看出, A类、 B类变长码中的 "X" 是信息位, 即使码字长度相同, 但其中信息位取不同的值^ 1成为不同的码字。 例如对 于 A类中的 0x1 , 当 X为 0时, 其为 001 , 对 于码表序号 A1; 当 X为 1 时, 其为 011 , 对应码表序号 A2。
Figure imgf000009_0001
Figure imgf000009_0002
It can be seen from Table 2 and Table 3 that the "X" in the class A and class B variable length codes is an information bit, and even if the codewords have the same length, the information bits take different values ^1 to become different codewords. For example, for 0x1 in class A, when X is 0, it is 001, for code table number A1; when X is 1, it is 011, corresponding to code table number A2.
A类和 B类变长码构造不同的是, 八类¾长码中的 "0" 是同步位, "1" 为截止位; B类变长码中的 " 是同步位, "01" 为截止位; 其中 B 类变长码的序号 0不存在。 从其本盾来讲, A类变长码和 B类变长码实际 上都是逗点码, 所以其本身可以有效地防止变长码的第一类错误。 当然, 也可将 A、 B类变长码的定义形式为相互调 。  The difference between the class A and class B variable length codes is that "0" in the eight types of 3⁄4 long codes is the synchronization bit, "1" is the cutoff bit; "in the class B variable length code is the synchronization bit, and "01" is The cut-off bit; the serial number 0 of the B-type variable length code does not exist. From its shield, the A-type variable length code and the B-type variable length code are actually comma code, so it can effectively prevent the lengthening itself. The first type of error of the code. Of course, the definition of the A and B variable length codes can also be adjusted to each other.
两类变长码都可通过算法生成, 而不需要存贮码表, 其算法如下: Both types of variable length codes can be generated by an algorithm without storing a code table. The algorithm is as follows:
(1) 编码算法 (1) Encoding algorithm
已知码表序号 Code—number求其信息位 § 值 Info  Know the code table number Code_number to find its information bit § Value Info
N =Int[log2(Code_number+ 1 )] + 1; N = Int[log 2 (Code_number+ 1 )] + 1;
Info = Code_number+l- 2N_1Info = Code_number+l- 2 N_1 ;
Codeward = ® [Info]2N-i ; 其中, N为信息位比特长度, Int[ ]表示去除尾数取整, Info表示信息 位的值, Codeward为码字, 即所得到的 2进制变长码符号, [Info]^ 表 示把 "Info" 以二进制表示的信息位, 按表 2或表 3的变长码结构组成 A 类或 B类变长码。 Codeward = ® [Info] 2 Ni ; Where N is the information bit length, Int[ ] indicates that the mantissa is rounded off, Info indicates the value of the information bit, Codeward is the code word, that is, the obtained binary variable length code symbol, [Info]^ indicates "Info""Information bits expressed in binary form a Class A or Class B variable length code according to the variable length code structure of Table 2 or Table 3.
(2)解码算法  (2) Decoding algorithm
已知信息位的值 Info及信息位比特长度 N, 求码表序号 Code— number The value of the known information bit Info and the information bit length N, the code table number Code_ number
Code— number = 2N + Info― 1; Code_ number = 2 N + Info― 1;
信源编码中, 根据信源符号的统计概率, 出现最大概率的信源符号用 最短码来表示, 并用这一原则来分配码表; 如果前一个信源^号用了 A类 码表编码, 则紧接着的一个信源符号就应该用 B类码表编码, 然后再使用 A类码表, 再使用 B类码表, 依此类推, A、 B两类变长码交替出现。  In source coding, according to the statistical probability of the source symbol, the source symbol with the greatest probability is represented by the shortest code, and the code table is allocated by this principle; if the previous source is encoded with the class A code table, Then a source symbol should be encoded with a Class B code table, then a Class A code table, then a Class B code table, and so on. A and B variable length codes alternate.
如出现以下的编码结果, ...AoBiAsBzAsB^.. 对应 的码字序列 为 ...1 001 00001 101 01001 01101 ... , (其中, A、 B的每一个下标对 应表 2和表 3中的一个相应的码表序号)。  If the following encoding result occurs, ...AoBiAsBzAsB^.. The corresponding codeword sequence is...1 001 00001 101 01001 01101 ... , (wherein, each subscript of A and B corresponds to Table 2 and Table 3 A corresponding code table number in the middle).
信源解码中, 依据编码时的规则, 对编码码流进行八、 IB两类变长码 交替解码。 信源解码按照 A类和 B类变长码交替解码输出。 为了有效发现 同步错误, 可以限定禁止使用 A、 B类码表中的最短长度, 这样其发现同 步错误的能力就显著提高。 例如对于 A类变长码, AQ不参与編码, 最短码 长从 开始编码; 对于 B类变长码, 81和 不参与编码, 最短码长从 B3开 始编码。 这种做法是牺牲编码效率换取抗误码能力。 In the source decoding, according to the rules at the time of encoding, the encoded code stream is subjected to alternate decoding of eight types and IB variable length codes. The source decoding alternately decodes the output according to the class A and class B variable length codes. In order to effectively detect synchronization errors, it is possible to limit the use of the shortest length in the A and B class code tables, so that the ability to find synchronization errors is significantly improved. For example, for class A variable length codes, AQ does not participate in coding, and the shortest code length is encoded from the beginning; for class B variable length codes, 8 1 and does not participate in coding, and the shortest code length is encoded from B 3 . This approach sacrifices coding efficiency in exchange for error resistance.
本发明的编解码方案中, 由误码引起的变长码错误有两种可能, 一种 是信息位出错,它不会影响变长码符号的同步;另一种情况 同步位出错, 同步位出错后,在解码中会发现有违反 AVLC交替输出两类突长码的规则 的情况, 或有小于最短变长码码长的变长码的情况。 在同步位出错的情况 下, 可采用最大后验概率判断其最大错误可能, 并纠正其 误。  In the codec scheme of the present invention, there are two possibilities for variable length code errors caused by bit errors, one is information bit error, which does not affect the synchronization of variable length code symbols; the other case is synchronization bit error, synchronization bit After the error, there are cases where the rules for violating the two types of burst codes alternately output by the AVLC are found in the decoding, or there are cases where the variable length code is shorter than the shortest variable length code length. In the case of an error in the sync bit, the maximum posterior probability can be used to determine its maximum error probability and correct its error.
编码数据: ...
Figure imgf000010_0001
T N2005/001587 一 9一
Coded data: ...
Figure imgf000010_0001
T N2005/001587 one 9 one
信道误码: 0x0x0x0x1x0x0x1 xlxlxlxlxlxOl  Channel error: 0x0x0x0x1x0x0x1 xlxlxlxlxlxOl
SA2 X SB1  SA2 X SB1
信源解码: 0x0x0x0x1 χθχθχΐ xlxlxlxlxlxOl  Source decoding: 0x0x0x0x1 χθχθχΐ xlxlxlxlxlxOl
SA2 SB2  SA2 SB2
解码纠错方法一: 0x0x0x0x1 xOxOxlxlxlxlxlxlxOl  Decoding error correction method one: 0x0x0x0x1 xOxOxlxlxlxlxlxlxOl
SA3 SB1  SA3 SB1
解码纠错方法二: 0x0x0x0x1x0x0x1 xlxlxlxlxlxOl 发生信道误码后, 原来发送的码字(...,8八1,881,...), 在信源解码后 为(...,8八2, ,881...), X无论判断为 A类码或 B类码, 都违反了 A、 B两 类码字交替输出的要求, 因此可以判定它是前一个 A类码的一部分或后一 个 B类码的一部分。 如果将 X与 SB1码字合并, 并判为 SB2码字, 则 i人 为 SB2码字在传输过程中连续发生了 2个同步码字错误。 而如果判定 X 前一个 A类码的一部分, 则认为在传输过程中, 只发生了一个同步码字^; 错误。显然将 X判断为前一个 A类码的一部分的概率较判断为后一个 B姜 码的一部分的概率正确性高。  Decoding error correction method 2: 0x0x0x0x1x0x0x1 xlxlxlxlxlxOl After the channel error occurs, the original transmitted codeword (..., 8 八 1, 881, ...), after the source decoding is (..., 8 八 2, , 881 ...), X is judged to be a class A code or a class B code, which violates the requirement of alternate output of A and B code words, so it can be determined that it is part of the previous class A code or the latter class B code. a part of. If X and SB1 codewords are combined and judged as SB2 codewords, then i people are consecutively having 2 sync codeword errors in the transmission process of SB2 codewords. However, if a part of the previous Class A code of X is determined, it is considered that only one synchronization code word ^; error occurred during the transmission. Obviously, the probability of judging X as part of the previous class A code is higher than the probability of determining that part of the latter B code is correct.
例如, 当信道误码率为 10-3 时, 解码纠错方法一情况发生的概率是 Pi = (1-10-3) X CIO'3)2 ; 解码纠错方法二情况发生的概率是 P2 = (1-10-3)2 X (10-3)。 可见, P^b Pt 约大 1000倍 (由于两种解码算法中, 只有 3个比特在 变化, 所以上面的概率只考虑 3个比特)。 按最大后验概率解码这一原则 , 应选择 SA3、 SB1输出, 也就是说, 原来发送的码字 (...,SA1,SB1,...)变为 (...,SA3,SB1,...)。 从中可以看出, 交替变长码的交替编码方式及其码字的 结构, 可以有效的发现和纠正错误, 不但使变长码符号同步, 而且可以纠 正同步位的比特错误。 For example, when the channel error rate is 10 - 3 , the probability of occurrence of the decoding error correction method is Pi = (1-10 - 3 ) X CIO' 3 ) 2 ; the probability of occurrence of the decoding error correction method 2 is P 2 = (1-10- 3 ) 2 X (10- 3 ). It can be seen that P^b Pt is about 1000 times larger (since the two decoding algorithms, only 3 bits are changing, so the above probability only considers 3 bits). According to the principle of decoding the maximum a posteriori probability, the SA3 and SB1 outputs should be selected, that is, the originally transmitted codewords (..., SA1, SB1, ...) become (..., SA3, SB1, ...). It can be seen that the alternate coding mode of the alternate variable length code and the structure of the codeword can effectively find and correct the error, not only synchronize the variable length code symbols, but also correct the bit errors of the synchronization bits.
如果从解调器可以得到信号输出值的软信息, 则可以得到更精确的后 验概率信息, 设信号为 BPSK调制, 调制器输出的软信息1 = [11 1 1¾ 1¾ . .. ]^] , I- G (-oo5 +oo) , 判断输出信息序列 Si = [su si2 si3… sin], Sij E [-l , +l]。 'J :
Figure imgf000011_0001
P(S」R) =ΠΡ )
If the soft information of the signal output value can be obtained from the demodulator, a more accurate posterior probability information can be obtained. Let the signal be BPSK modulation, and the soft information of the modulator output 1 = [1 1 1 13⁄4 13⁄4 . . . ]^ ], I- G (-oo 5 +oo), judges the output information sequence Si = [s u s i2 s i3 ... s in ], Sij E [-l , +l]. 'J :
Figure imgf000011_0001
P(S"R) =Π Ρ )
j=i  j=i
P(Sj| ) 一 p — ¾ P(Sj| ) a p — 3⁄4
P(Sk|R) ― e P(S k |R) ― e
通过软信息的概率比较, 可以更准确的判断哪种组合正确。  By comparing the probability of soft information, it is possible to more accurately determine which combination is correct.
在 BPSK ( Binary phase shift keying, 二进制相移键控 )调制方式下, "1" 表示 "0"; "一 1"表示 "1"。设发送的信息序列是 Si = [Sil si2 si3... sin], Sij e[-l,+l] (由于对发送的信息序列可能有几种估计, 所以用下标 i来表 示), 通过加性高斯白噪声 (σ表示噪声的方差)信道, 接收到的信号为 R = [Γ! Γ2 Γ3...rn], η e(-,+oo)。 P(Sij |η)表示对于收到信号为 时, 判断为 sy 的概率 In the BPSK (Binary Phase Shift Keying) modulation mode, "1" indicates "0";"1" indicates "1". Let the transmitted information sequence be Si = [ Sil s i2 s i3 ... s in ], Sij e[-l, +l] (due to the possible estimation of the transmitted information sequence, the subscript i is used to indicate ), through the additive Gaussian white noise (σ represents the variance of the noise) channel, the received signal is R = [Γ! Γ 2 Γ 3 ... r n ], η e (- , + oo). P( Sij | η) indicates the probability of judging s y when the received signal is
成独立
Figure imgf000012_0001
Independence
Figure imgf000012_0001
判断为 Si序列得概率。 J=1 It is judged that the Si sequence has a probability. J =1

Claims

权 利 要 求 Rights request
1、一种变长码编解码方法,用于对信源进行编解码处理,其特征在于, 所述方法包括如下步骤:  A variable length code encoding and decoding method for encoding and decoding a source, wherein the method comprises the following steps:
(1)在对信源进行编码时, 采用至少两类变长码交替进行编码; (2)在对信源进行解码时,依据编码时的规则,对编码码流进行变长码 交替解码。  (1) When encoding a source, at least two types of variable length codes are alternately coded; (2) when decoding a source, variable length codes are alternately decoded according to rules at the time of encoding.
2、 根据权利要求 1所述的变长码编解码方法, 其特征在于, 采用 L类 变长码, L为大于等于 2的自然数, 标识为 Ll、 L2 LL, 可按以下 任一种交替方式对信源进行 Ll、 L2 LL共 L类变长码交替编码: (1) 每一个 L1类变长码后面的变长码为 L2类变长码,每一个 L2类变 长码后面的变长码为 L3类变长码, 以此类推, 直到 LL类变长码, 每一个 LL类变长码后面的变长码为 L1类变长码;  2. The variable length code encoding and decoding method according to claim 1, wherein a L-type variable length code is used, L is a natural number greater than or equal to 2, and the identifier is L1, L2 LL, and may be in any of the following alternate manners. Perform L1 and L2 LL common L-type variable length code alternate coding for the source: (1) The variable length code after each L1 variable length code is L2 variable length code, and the variable length after each L2 type variable length code The code is a L3 type variable length code, and so on, until the LL type variable length code, and the variable length code after each LL type variable length code is an L1 type variable length code;
(2) 每两个 L1类变长码后面的变长码为两个 L2类变长码, 每两个 L2 类变长码后面的变长码为两个 L3类变长码, 以此类推, 直到 LL类变长码, 每两个 LL类变长码后面的变长码为两个 L1类变长码;  (2) The variable length code after each two L1 class variable length codes is two L2 class variable length codes, the variable length codes after each two L2 class variable length codes are two L3 class variable length codes, and so on. Until the LL class variable length code, the variable length code after each two LL class variable length codes is two L1 class variable length codes;
(3) 每 Ml个 L1类变长码后面跟 M2个 L2类变长码, 每 M2个 U类变 长码后面跟 M3个 L3类变长码, 以此类推, 直到 ML个 LL类变长码, 每 ML 个 LL类变长码后面跟 Ml个 L1类变长码, 其中, Ml、 M2 ML为自 然数。 (3) Each Ml L1 class variable length code is followed by M2 L2 class variable length codes, each M 2 U class variable length codes followed by M3 L3 class variable length codes, and so on, until ML LL class changes Long code, each ML LL variable length code is followed by Ml L1 type variable length code, where Ml and M2 ML are natural numbers.
3、根据权利要求 2所述的变长码编解码方法,其特征在于,在采用 A、 3. The variable length code encoding and decoding method according to claim 2, wherein A,
B两类变长码时, 按以下任一种交替方式对信源进行 A、 B 两类变长码交 替编码: In the case of two types of variable length codes, the A and B types of variable length code alternate codes are used for the source in any of the following alternate ways:
(1)每一个 A类变长码后面的变长码只能是 B类变长码, 每一个 B类 变长码后面的变长码只能是 A类变长码;  (1) The variable length code after each class A variable length code can only be a class B variable length code, and the variable length code after each class B variable length code can only be a class A variable length code;
(2)每两个 A类变长码后面跟两个 B类变长码, 每两个 B类变长码后 面跟两个 A类变长码;  (2) Each of the two Class A variable length codes is followed by two Class B variable length codes, and each of the two Class B variable length codes is followed by two Class A variable length codes;
(3)每 M个 A类变长码后面跟 N个 B类变长码, 每 N个 B类变长码 后面跟 M个 A类变长码, 其中, M和 N为自然数。  (3) Each M class A variable length code is followed by N class B variable length codes, and each N class B variable length code is followed by M class A variable length codes, where M and N are natural numbers.
4、 根据权利要求 3所述的变长码编解码方法, 其特征在于, 所述步 骤 ( 1 )中在对信源进行编码时, 在所述 A类变长码中, 以 "0" 作为同步位, 以 "1" 作为截止位, 在 任两个相邻同步位之间至少有一个信息位 x, 在截止位与其前面的那一个 同步位之间至少有一个信息位 X, 所述信息位 X的值可为 "0" 或 "Γ; 在所述 B类变长码中, 以 "1" 作为同步位, 以 "01" 作为截止位, 在截止位之前及任一同步位之前至少有一个信息位 X, 在相邻两个同步位 之间至少有一个信息位 x, 在截止位与其前面的那一个同步位之间至少有 一个信息位 x, 所述信息位 X的值可为 "0" 或 T。 The variable length code encoding and decoding method according to claim 3, wherein in the step (1), when encoding the source, In the class A variable length code, "0" is used as the synchronization bit, "1" is used as the cutoff bit, and at least one information bit x is between any two adjacent sync bits, and the one in front of the cutoff bit There is at least one information bit X between the synchronization bits, and the value of the information bit X may be "0" or "Γ; in the B-type variable length code, "1" is used as the synchronization bit, and "01" is used as the synchronization bit. The cutoff bit has at least one information bit X before the cutoff bit and before any sync bit, and at least one information bit x between the adjacent two sync bits, at least between the cutoff bit and the previous sync bit An information bit x, the value of the information bit X can be "0" or T.
5、 根据权利要求 3所述的变长码编解码方法, 其特征在于, 所述步 骤 ( 1 )中在对信源进行编码时,  The variable length code encoding and decoding method according to claim 3, wherein in the step (1), when encoding the source,
在所述 Α类变长码中, 以 "1" 作为同步位, 以 "01" 作为截止位, 在截止位之前及任一同步位之前至少有一个信息位 x, 在相邻两个同步位 之间至少有一个信息位 X, 在截止位与其前面的那一个同步位之间至少有 一个信息位 X, 所述信息位 X的值可为 "0" 或 " ;  In the 变 variable length code, "1" is used as the synchronization bit, "01" is used as the cutoff bit, before the cutoff bit and before any sync bit, there is at least one information bit x, and the adjacent two sync bits There is at least one information bit X between there, and at least one information bit X between the cut-off bit and the previous sync bit, the information bit X may have a value of "0" or ";
在所述 B类变长码中, 以 "0"作为同步位, 以 " 作为截止位, 在 任两个相邻同步位之间至少有一个信息位 X, 在截止位与其前面的那一个 同步位之间至少有一个信息位 x, 所述信息位 X的值可为 "0" 或 "1"。  In the class B variable length code, "0" is used as the synchronization bit, with "as the cutoff bit, at least one information bit X between any two adjacent sync bits, and the synchronization bit before the cutoff bit There is at least one information bit x between, and the value of the information bit X can be "0" or "1".
6、 根据权利要求 1-5 中任一项所述的变长码编解码方法, 其特征在 于, 所述步骤 (1)中在对信源进行编码时, 对于出现概率最大的信源符号, 用最短的编码来表示; 对于出现概率次大的信源符号, 用相同或次最短长 度的编码来表示,对于出现概率最小的信源符号,则用最长的编码来表示。  The variable length code encoding and decoding method according to any one of claims 1 to 5, wherein, when encoding the source in the step (1), for the source symbol having the highest probability of occurrence, It is represented by the shortest code; for the source symbol with the second highest probability of occurrence, it is represented by the same or the shortest length of the code, and for the source symbol with the least probability of occurrence, it is represented by the longest code.
7、 根据权利要求 6所述的变长码编解码方法, 其特征在于, 所述步 骤 (2)中在对信源进行解码时, 如果某一变长码的同步位出错, 则判断变长 码的最大错误可能, 并用概率最大的那一种纠错方案的结果作为解码输 出。  The variable length code encoding and decoding method according to claim 6, wherein in the step (2), when the source is decoded, if the synchronization bit of a variable length code is in error, the length is determined to be longer. The maximum error of the code is possible, and the result of the one of the most probable error correction schemes is used as the decoded output.
8、 居权利要求 6所述的变长码编解码方法, 其特征在于, 所述步 骤 (2)中在对信源进行解码时, 如果某一变长码的同步位出错, 则采用后验 概率来判断变长码^最大错误可能, 并用后验概率最大的那一种纠错方案 的结果作为解码输出。  The variable length code encoding and decoding method according to claim 6, wherein in the step (2), when the source is decoded, if the synchronization bit of a variable length code is in error, the posterior is used. The probability is used to judge the variable length code ^ maximum error possibility, and the result of the error correction scheme with the largest posterior probability is used as the decoding output.
9、 根据权利要求 8所述的变长码编解码方法, 其特征在于, 所述步 骤 (2)中在对信源进行解码时, 可通过以下方法得到后瞼概率信息,设信号 为 BPSK调制, 调制器输出的软信息 R = [ri r2 r3 ... rn], η (-∞, +∞) , 判 断输出信息序列 Si = [Sil si2 si3… sin], sy≡[-l, +l] , 则: ^ e - .δ
Figure imgf000015_0001
The variable length code encoding and decoding method according to claim 8, wherein in the step (2), when decoding the source, the posterior probability information can be obtained by the following method, and the signal is BPSK modulation. , the soft information of the modulator output R = [r i r2 r 3 ... r n ], η (-∞, +∞), The output information sequence Si = [ Sil s i2 s i3 ... s in ], sy≡[-l, +l] , then: ^ e - .δ
Figure imgf000015_0001
-^(∑(¾- )2)-(∑(¾- )2)] -^(∑( 3⁄4 - ) 2 )-(∑( 3⁄4 - ) 2 )]
P(Sk | ) ― e P(S k | ) ― e
10、 根据权利要求 2所述的变长码编解码方法, 其特征在于, 在采用 10. The variable length code encoding and decoding method according to claim 2, wherein
A、 B、 C三类变长码时, 可按以下任一种交替方式对信源进行八、 B、 C 三类变长码交替编码: When the A, B, and C variable length codes are used, the source code may be alternately coded with the variable length codes of the eight, B, and C types according to any of the following alternate modes:
(1)每一个 A类变长码后面的变长码为 B类变长码,每一个 B类变长 码后面的变长码为 C类变长码, 每一个 C类变长码后面的变长码为 A类 变长码;  (1) The variable length code after each class A variable length code is a class B variable length code, and the variable length code after each class B variable length code is a class C variable length code, after each class C variable length code The variable length code is a class A variable length code;
(2)每两个 A类变长码后面跟两个 B类变长码,每两个 B类变长码后 面跟两个 C类变长码, 每两个 C类变长码后面跟两个 A类变长码;  (2) Every two class A variable length codes are followed by two class B variable length codes, and each two class B variable length codes are followed by two class C variable length codes, and each two class C variable length codes are followed by two A class variable length code;
(3) 每 M个 A类变长码后面跟 N个 B类变长码,每 N个 B类变长码后 面跟 P个 C类变长码, 每 P个 C类变长码后面跟 M个 A类变长码, 其中, ¾1和 P为自然数。  (3) Each M class A variable length code is followed by N class B variable length codes, and each N class B variable length code is followed by P class C variable length codes, and each P class C variable length code is followed by M A class A variable length code, where 3⁄41 and P are natural numbers.
PCT/CN2005/001587 2004-09-29 2005-09-28 Variable length encoding and decoding method WO2006034647A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200410079076.4 2004-09-29
CN 200410079076 CN100484245C (en) 2004-09-29 2004-09-29 Length variable code coding and decoding method

Publications (1)

Publication Number Publication Date
WO2006034647A1 true WO2006034647A1 (en) 2006-04-06

Family

ID=36118587

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2005/001587 WO2006034647A1 (en) 2004-09-29 2005-09-28 Variable length encoding and decoding method

Country Status (2)

Country Link
CN (1) CN100484245C (en)
WO (1) WO2006034647A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101719814B (en) 2009-12-08 2013-03-27 华为终端有限公司 Method and device for determining inband signalling decoding mode
CN102231832B (en) * 2011-06-24 2013-04-24 北京瀚景锦河科技有限公司 Variable length code encoding and decoding method and system
CN109670353B (en) * 2017-10-13 2021-10-22 重庆微标科技股份有限公司 Electronic equipment and decoding error correction method of radio frequency tag

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5686916A (en) * 1995-12-28 1997-11-11 Philips Electronics North America Corp. Multi-code-book variable length decoder
US5801841A (en) * 1994-10-18 1998-09-01 Fuji Xerox Co., Ltd. Image signal coding apparatus with switching between variable-length coding and fixed-length coding
JP2002374174A (en) * 2001-06-12 2002-12-26 Lsi Systems:Kk Variable length code decoder, variable length code decoding method and program for making computer execute the, method
JP2003230095A (en) * 2001-11-28 2003-08-15 Victor Co Of Japan Ltd Variable length data encoding method and variable length data encoding apparatus
US6696992B1 (en) * 2001-10-02 2004-02-24 Allan Chu Efficient data encoding and decoding processes

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5801841A (en) * 1994-10-18 1998-09-01 Fuji Xerox Co., Ltd. Image signal coding apparatus with switching between variable-length coding and fixed-length coding
US5686916A (en) * 1995-12-28 1997-11-11 Philips Electronics North America Corp. Multi-code-book variable length decoder
JP2002374174A (en) * 2001-06-12 2002-12-26 Lsi Systems:Kk Variable length code decoder, variable length code decoding method and program for making computer execute the, method
US6696992B1 (en) * 2001-10-02 2004-02-24 Allan Chu Efficient data encoding and decoding processes
JP2003230095A (en) * 2001-11-28 2003-08-15 Victor Co Of Japan Ltd Variable length data encoding method and variable length data encoding apparatus

Also Published As

Publication number Publication date
CN100484245C (en) 2009-04-29
CN1756352A (en) 2006-04-05

Similar Documents

Publication Publication Date Title
JP3179060B2 (en) Information data multiplexing transmission system and its multiplexing device and demultiplexing device
JP5374768B2 (en) Multimedia data protection method using an additional network abstraction layer (NAL)
KR101050830B1 (en) Video error detection technology using the RC parity code
WO2018045459A1 (en) Checksum-filtered decoding, checksum-aided forward error correction of data packets, forward error correction of data using bit erasure channels and sub-symbol level decoding for erroneous fountain codes
WO2009079934A1 (en) A coding method and means for low density generator matrix
WO2009043261A1 (en) Encodeing, decoding method and encoder, decoder
WO2006034647A1 (en) Variable length encoding and decoding method
TWI224430B (en) Packing variable-length code bits at fixed positions
KR101259659B1 (en) A priority-differential non-uniform raptor coding method
JP3431368B2 (en) Variable length encoding / decoding method and variable length encoding / decoding device
Buttigieg et al. Using variable-length error-correcting codes in MPEG-4 video
KR20080093923A (en) A sub-block based cyclic updating method for low-delay fountain coding
WO2011137820A1 (en) Line encoding and decoding method, apparatus and system
JP5209467B2 (en) Method and apparatus for improved multimedia decoder
Assanovich et al. Use of linear error-correcting subcodes in flow watermarking for channels with substitution and deletion errors
Xu et al. Distributed joint source-channel coding of video
Xu et al. Error resiliency measure for RVLC codes
Lee et al. HVLC: error correctable hybrid variable length code for image coding in wireless transmission
Gao et al. A Low-Latency Video Transmission Scheme Based on Sliding-Window FEC
Kashyap et al. Data synchronization with timing: The variable-rate case
Petrovic et al. List Viterbi decoding with continuous error detection for magnetic recording
Fang et al. Block-interleaved error-resilient entropy coding
JP3233360B2 (en) Variable length decoding method and apparatus
Fang et al. State-information-assisting EREC
Robie et al. The use of steganography to enhance error detection and correction in MPEG-2 video

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): AE AG AL AM AT AU AZ BA BB BG BR BW BY BZ CA CH CN CO CR CU CZ DE DK DM DZ EC EE EG ES FI GB GD GE GH GM HR HU ID IL IN IS JP KE KG KM KP KR KZ LC LK LR LS LT LU LV LY MA MD MG MK MN MW MX MZ NA NG NI NO NZ OM PG PH PL PT RO RU SC SD SE SG SK SL SM SY TJ TM TN TR TT TZ UA UG US UZ VC VN YU ZA ZM ZW

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): BW GH GM KE LS MW MZ NA SD SL SZ TZ UG ZM ZW AM AZ BY KG KZ MD RU TJ TM AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HU IE IS IT LT LU LV MC NL PL PT RO SE SI SK TR BF BJ CF CG CI CM GA GN GQ GW ML MR NE SN TD TG

121 Ep: the epo has been informed by wipo that ep was designated in this application
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase