JP6885466B2 - Coding device, decoding device, coding method, decoding method, coding program, decoding program - Google Patents
Coding device, decoding device, coding method, decoding method, coding program, decoding program Download PDFInfo
- Publication number
- JP6885466B2 JP6885466B2 JP2019532376A JP2019532376A JP6885466B2 JP 6885466 B2 JP6885466 B2 JP 6885466B2 JP 2019532376 A JP2019532376 A JP 2019532376A JP 2019532376 A JP2019532376 A JP 2019532376A JP 6885466 B2 JP6885466 B2 JP 6885466B2
- Authority
- JP
- Japan
- Prior art keywords
- code
- integer
- bit
- value
- coding
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03M—CODING; DECODING; CODE CONVERSION IN GENERAL
- H03M7/00—Conversion 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/30—Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
- H03M7/40—Conversion to or from variable length codes, e.g. Shannon-Fano code, Huffman code, Morse code
- H03M7/4031—Fixed length to variable length coding
- H03M7/4037—Prefix coding
- H03M7/4043—Adaptive prefix coding
- H03M7/4068—Parameterized codes
- H03M7/4075—Golomb codes
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03M—CODING; DECODING; CODE CONVERSION IN GENERAL
- H03M7/00—Conversion 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/30—Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
- H03M7/40—Conversion to or from variable length codes, e.g. Shannon-Fano code, Huffman code, Morse code
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G10L19/00—Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03M—CODING; DECODING; CODE CONVERSION IN GENERAL
- H03M7/00—Conversion 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/30—Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
- H03M7/46—Conversion to or from run-length codes, i.e. by representing the number of consecutive digits, or groups of digits, of the same kind by a code word and a digit indicative of that kind
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03M—CODING; DECODING; CODE CONVERSION IN GENERAL
- H03M7/00—Conversion 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/30—Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
- H03M7/46—Conversion to or from run-length codes, i.e. by representing the number of consecutive digits, or groups of digits, of the same kind by a code word and a digit indicative of that kind
- H03M7/48—Conversion to or from run-length codes, i.e. by representing the number of consecutive digits, or groups of digits, of the same kind by a code word and a digit indicative of that kind alternating with other codes during the code conversion process, e.g. run-length coding being performed only as long as sufficientlylong runs of digits of the same kind are present
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G10L19/00—Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
- G10L19/02—Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using spectral analysis, e.g. transform vocoders or subband vocoders
- G10L19/032—Quantisation or dequantisation of spectral components
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computational Linguistics (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- Acoustics & Sound (AREA)
- Multimedia (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Description
本発明は、音声や音響の時系列ディジタル信号のサンプル系列などの整数値から成るサンプル系列を符号化、復号する技術に関する。 The present invention relates to a technique for encoding and decoding a sample sequence consisting of integer values such as a sample sequence of a voice or acoustic time series digital signal.
圧縮を目的としてサンプル系列を符号化する技術として、サンプル値を量子化することにより得た有限精度の値(以下、これを整数値と呼ぶ)を可逆符号化することにより、サンプル系列の記述に用いるビット長を削減する技術がある。この技術においては、どの整数値に対してどの長さの符号を割り当てるかが、圧縮の性能に直結する。この事実は、画像信号のサンプル列を符号化復号する画像符号化や音響信号のサンプル列を符号化復号する音響符号化などの、サンプル系列の符号化や復号の工学的応用先においても例外ではない。 As a technique for coding a sample series for the purpose of compression, a finite precision value (hereinafter referred to as an integer value) obtained by quantizing the sample value is reversibly coded to describe the sample series. There is a technology to reduce the bit length used. In this technique, the code of which length is assigned to which integer value is directly related to the compression performance. This fact is an exception even in engineering applications of sample series coding and decoding, such as image coding that encodes and decodes a sample sequence of an image signal and acoustic coding that encodes and decodes a sample sequence of an acoustic signal. Absent.
一般的に可変長の可逆符号化においては、復号可能性の制約により、整数値に割り当てる符号の構成に制約がある。具体的には、ある整数値に対して短い符号を割り当てるとすると、復号可能な符号にするには他の整数値に対して長い符号を割り当てなければならない、という制約である。従って、圧縮性能を高くするためには、符号の構成(各整数値への符号の割り当て)は整数値の系列中の値の分布に適したものとする必要がある。具体的には、出現確率が高い整数値に対して短い符号を割り当て、出現確率が低い整数値に対しては長い符号を割り当てることで、整数値の系列の圧縮後のビット長の期待値を小さくすることができる。 Generally, in variable-length lossless coding, there are restrictions on the configuration of codes assigned to integer values due to restrictions on decodability. Specifically, if a short code is assigned to a certain integer value, a long code must be assigned to another integer value in order to make it a decodable code. Therefore, in order to improve the compression performance, it is necessary to make the code configuration (assignment of the code to each integer value) suitable for the distribution of the values in the series of integer values. Specifically, by assigning a short code to an integer value with a high probability of occurrence and a long code to an integer value with a low probability of appearance, the expected value of the bit length after compression of the series of integer values can be obtained. It can be made smaller.
上記のような可逆符号化において最も単純な可変長符号の一つとして用いられてきたのがGolomb-Rice符号(ゴロムライス符号)である。Golomb-Rice符号は、整数値の系列がラプラス分布に属する場合、つまり整数値の出現確率が値の大きさに対して指数的に低くなっている場合において、最小な期待ビット長(最小のビット長)を達成することが知られている。 The Golomb-Rice code has been used as one of the simplest variable-length codes in the above-mentioned lossless coding. The Golomb-Rice code is the minimum expected bit length (minimum bit) when a series of integer values belongs to the Laplace distribution, that is, when the probability of occurrence of integer values is exponentially lower than the size of the value. It is known to achieve (long).
このGolomb-Rice符号は非常に単純な構成であることから広く用いられている。Golomb-Rice符号は、例えば、音響信号をAD変換してPCMにした整数値の系列やその系列をフーリエ変換して周波数スペクトルに変換した系列などに含まれる各サンプル値を量子化値で除算して得た整数値の絶対値の系列を符号化するときに用いられる。或いは、Golomb-Rice符号は、上記整数値の系列の各サンプル値xを以下の式(1)により求まるx’にそれぞれ置き換えた非負整数値からなる系列を符号化するときに用いられる。 This Golomb-Rice code is widely used because it has a very simple structure. The Golomb-Rice code is obtained by dividing each sample value included in, for example, a series of integer values obtained by AD-converting an acoustic signal into PCM or a series obtained by Fourier transforming the series into a frequency spectrum, etc. It is used when encoding a series of absolute values of integer values obtained. Alternatively, the Golomb-Rice code is used to encode a series consisting of non-negative integer values in which each sample value x of the above integer value series is replaced with x'obtained by the following equation (1).
従って、以下では非負整数値を符号化・復号する場合について説明するが、式(1)などにより整数値全体を非負整数値に一対一に変換できるという上記の事実から、符号化処理の前段で式(1)などにより整数値全体を非負整数値に変換したり、復号処理の後段で式(1)の逆変換などにより非負整数値を整数値全体に変換したりすることで、整数値全体の符号化・復号にも適応可能である。 Therefore, the case of encoding / decoding a non-negative integer value will be described below. However, due to the above fact that the entire integer value can be converted to a non-negative integer value one-to-one by Eq. (1) or the like, in the first stage of the coding process. The entire integer value can be converted to a non-negative integer value by the equation (1) or the like, or the non-negative integer value can be converted to the entire integer value by the inverse conversion of the equation (1) in the subsequent stage of the decoding process. It can also be applied to the coding / decoding of.
Golomb-Rice符号化は、Riceパラメータ(ライスパラメータ)rの値を適切に選択することにより、図1の表のように、非負整数値の入力xに対する符号のビット長B(x)を
とし、以下の片側ラプラス分布に従う非負整数値の系列に対して近似的に最適な期待ビット長を与えるように符号化できるものである。Golomb-Rice coding sets the bit length B (x) of the code for the input x of a non-negative integer value as shown in the table of FIG. 1 by appropriately selecting the value of the Rice parameter (rice parameter) r.
Then, it can be coded so as to give an approximately optimal expected bit length to a series of non-negative integer values that follow the following one-sided Laplace distribution.
ただし、Riceパラメータrは非負の整数値である。つまり、Riceパラメータrを小さな非負の整数値とすれば、値の偏りの大きい系列を少ない平均ビット数で符号化でき、rを大きな非負の整数値とすれば、値の偏りの小さい系列を少ない平均ビット数で符号化できる。 However, the Rice parameter r is a non-negative integer value. In other words, if the Rice parameter r is a small non-negative integer value, a series with a large value bias can be encoded with a small average number of bits, and if r is a large non-negative integer value, a series with a small value bias is small. It can be encoded with an average number of bits.
しかしGolomb-Rice符号化はRiceパラメータrを負値にすることができないことから、例えば分布p(x,0.1)に従う値の系列など、系列の値の偏りが分布p(x,1)よりも大きくなるにつれ、Riceパラメータrをどのように設定しても圧縮の効率は低下していく。 However, since Golomb-Rice coding cannot make the Rice parameter r a negative value, the bias of the value of the series is larger than that of the distribution p (x, 1), for example, a series of values according to the distribution p (x, 0.1). As the size increases, the efficiency of compression decreases no matter how the Rice parameter r is set.
例えば、音響信号をAD変換してPCMにするときには、大音量まで記録できるように表現可能な数値の範囲を設定しているため、多くの信号の系列に含まれる値は表現可能な数値の範囲の絶対値が小さな値のところに偏る傾向にある。特に、音声信号は発話の無い時間区間があるため、零値や背景雑音だけの非常に小さな値に偏る。また、このような信号の系列に含まれる各値を量子化値で除算して得た整数値の系列は、量子化により、元の系列よりも更に零値を含む小さな値に偏っている。 For example, when an acoustic signal is AD-converted to PCM, the range of numerical values that can be expressed is set so that it can be recorded up to a large volume, so the values included in many signal sequences are the range of numerical values that can be expressed. There is a tendency for the absolute value of to be biased toward smaller values. In particular, since the audio signal has a time interval in which there is no utterance, it is biased to a very small value of only zero value or background noise. Further, the sequence of integer values obtained by dividing each value included in the sequence of such signals by the quantization value is biased to a smaller value including a zero value than the original sequence by quantization.
零値に偏った整数値の系列を符号化する先行技術としては非特許文献1の技術がある。非特許文献1の技術は、入力された整数値の系列に含まれる零値は、零値が連続する個数を予め決めた固定ビット数で符号化して、入力された整数値の系列に含まれる零値以外の値は、その値から1を減算して得た値(値-1)をGolomb-Rice符号化するものである。
There is a technique of Non-Patent
また、零値を含む小さな値に偏った整数値の系列を符号化する先行技術としては非特許文献2の技術がある。非特許文献2の技術は、2つの整数値による組と1つの整数値を全単射なように予め紐付けておき、整数値の系列に含まれる2つの整数値による組を1つの整数値に変換し、変換後の整数値の系列をGolomb-Rice符号化するものである。
Further, as a prior art for encoding a series of integer values biased toward a small value including a zero value, there is a technique of Non-Patent
非特許文献1の技術によれば、零値については少ない平均ビット数で符号化することができる。しかし、非特許文献1の技術では零値以外についてはGolomb-Rice符号化とほぼ同じ符号化を行うので、非特許文献1の技術には、零値ではない小さな値が分布p(x,1)よりも大きく偏っている場合には、圧縮の性能が低下するという課題がある。
According to the technique of Non-Patent
また、非特許文献1の技術は数学的に表現される分布に対応した符号化方法ではない。従って、非特許文献1の技術には、整数値の系列における値の分布を知ったところで、零値の連続する個数を表現するために用いるビット数としてどれを選択して符号化すれば少ない平均ビット数で符号化できるのかがわからないという課題もある。
Further, the technique of
一方、非特許文献2の技術によれば、分布p(x,1)よりも値の偏っている整数値の系列を少ない平均ビット数で符号化することができる。しかし、非特許文献2の技術は、1つの整数値に対する平均ビット数を0.5ビットより小さくできず、理論上最適な平均ビット数が0.5ビット未満となるような偏りの大きい整数値の系列に対しては、圧縮の性能が低下するという課題がある。
On the other hand, according to the technique of Non-Patent
そこで本発明では、零値ではない小さな値も含み、その分布が小さな値に大きく偏っている整数値の系列であっても、少ない平均ビット数で符号化することができる符号化復号技術を提供することを目的とする。 Therefore, the present invention provides a coding / decoding technique capable of coding a series of integer values including a small value other than a zero value and whose distribution is largely biased to a small value with a small average number of bits. The purpose is to do.
本発明の一態様は、入力された非負の整数値x_n、n∈{1, 2, ..., N}による系列(以下、「整数系列」という)について、Kを2以上の整数として、前記整数系列に含まれる整数値0の2個から2K-1個のうちの予め定めた何れかの個数であるL個の連続に対応する符号として1ビットの符号(以下、「符号A」という)を得、前記整数系列に含まれる、0個からL-1個連続する整数値0と、1個の0以外の整数値x_nと、による組、に対応する符号としてK×x_nビットまたはK×x_n+1ビットの符号(以下、「符号B」という)を得る整数符号化部を含む。One aspect of the present invention is for a series of input non-negative integer values x_n, n ∈ {1, 2, ..., N} (hereinafter referred to as "integer series"), where K is an integer of 2 or more. A 1-bit code (hereinafter, "code A") as a code corresponding to a series of L numbers, which is any predetermined number of 2 to 2 K-1 integer values included in the integer series. ) Is obtained, and K × x_n bits or K × x_n bits or a code corresponding to a set consisting of 0 to L-1
本発明の一態様は、入力された符号列について、Kを2以上の整数として、前記入力された符号列に含まれる1ビットの符号(以下「符号A」という)から、整数値0の2個から2K-1個のうちの予め定めた何れかの個数であるL個の連続を得、前記入力された符号列に含まれるK×x_nビットまたはK×x_n+1ビットの符号(以下、「符号B」という)から、0個からL-1個連続する整数値0と、1個の0以外の整数値x_nと、による組を得ることにより整数値x_n、n∈{1, 2, ..., N}による系列を得る整数復号部を含む。In one aspect of the present invention, with respect to the input code string, K is an integer of 2 or more, and a 1-bit code (hereinafter referred to as “code A”) included in the input code string is used as an integer value of 0-2. A sequence of L pieces, which is any number of 2 K-1 pieces, is obtained from the pieces, and a code of K × x_n bits or K × x_n + 1 bits included in the input code string (hereinafter referred to as , "Sign B"), and by obtaining a set of 0 to L-1
本発明の一態様は、非負値である整数値x_n、n∈{1, 2, ..., N}の系列(以下、「整数系列」という)を表す符号列のデータ構造であって、Kを2以上の整数として、前記符号列は、前記整数系列から前記符号列を得る符号化装置、または/および、前記符号列から前記整数系列を得る復号装置、で用いられるものであり、前記整数系列に含まれる整数値0の2個から2K-1個のうちの予め定めた何れかの個数であるL個の連続に対応する符号である1ビットの符号(以下、「符号A」という)と、前記整数系列に含まれる、0個からL-1個連続する整数値0と、1個の0以外の整数値x_nと、による組、に対応する符号であるK×x_nビットまたはK×x_n+1ビットの符号(以下、「符号B」という)と、を含む。One aspect of the present invention is a data structure of a code string representing a series of non-negative integer values x_n, n ∈ {1, 2, ..., N} (hereinafter referred to as "integer series"). The code string is used in a coding device that obtains the code string from the integer sequence and / and a decoding device that obtains the integer series from the code string, where K is an integer of 2 or more. A 1-bit code (hereinafter, "code A") that is a code corresponding to a series of L numbers, which is any predetermined number of 2 to 2 K-1 integer values included in the integer series. ), And a set of 0 to L-1
本発明によれば、零値ではない小さな値も含んで小さな値に大きく偏っている整数値の系列や、非特許文献2の技術では対応しきれないくらいに値の偏った整数値の系列であっても、少ない平均ビット数で符号化することができる。また、そのような符号を復号することができる。
According to the present invention, a series of integer values that are largely biased toward small values, including small values that are not zero, or a series of integer values that are biased to the extent that the technology of Non-Patent
以下、本発明の実施の形態について、詳細に説明する。なお、同じ機能を有する構成部には同じ番号を付し、重複説明を省略する。 Hereinafter, embodiments of the present invention will be described in detail. The components having the same function are given the same number, and duplicate explanations will be omitted.
<第一実施形態>
≪符号化装置≫
図2及び図3を参照して、第一実施形態の符号化装置100が実行する符号化方法の処理手続きを説明する。第一実施形態の符号化装置100は、図2に示す通り、整数符号化部110を含む。第一実施形態の符号化装置100が図3に示す各ステップの処理を実行することにより、第一実施形態の符号化方法が実現される。<First Embodiment>
≪Coding device≫
The processing procedure of the coding method executed by the
第一実施形態の符号化装置100には、非負の整数値の系列が入力される。この非負の整数値の系列としては、例えば、マイクロホンで収音した音声や音楽などをディジタル信号に変換して得た信号やカメラで撮像した画像や映像をディジタル信号に変換して得た信号などの信号の一部あるいは全部を既存の技術により量子化して有限精度の値にして得た整数値の絶対値による系列、または、整数値をxとして式(1)により得たx’による系列を入力してもよい。
A sequence of non-negative integer values is input to the
第一実施形態の符号化装置100は、予め定めた複数の符号木を予め定めた規則に則って用い、非負の整数値の系列を可変長符号化することで、ラプラス分布よりも偏りの大きな分布の非負の整数値の系列に対してGolomb-Rice符号化よりも短いビット長となる符号化処理を実現するものである。ここで符号木とは、入力された非負の整数値に対してどの符号を割り当てるかの予め定めた規則を表すグラフのことを指す。以下では、符号化装置100に入力された非負の整数値を単に「整数値」と呼んで説明する。
The
[整数符号化部110]
整数符号化部110には、符号化装置100に入力された整数値の系列のうちの、Nサンプル(Nは自然数)ずつの整数値による系列が入力される。入力された整数値による系列を整数系列x_1, x_2, …, x_Nとする。整数符号化部110は、予め定めたまたは図示しない手段により入力された2以上の自然数である符号化パラメータKに基づき、整数系列x_1, x_2, …, x_Nを以下の符号木を用いた符号化処理で符号化して符号を得、得た符号を整数符号として出力する(S110)。以下では、整数系列x_1, x_2, …, x_Nの各整数がx_n(nは系列中のサンプル番号であり、n∈{1, 2, ..., N})であるとして説明を行う。[Integer encoding unit 110]
The
[[符号化処理に用いる符号木]]
まず、整数符号化部110における符号化処理に用いる符号木を例示する。[[Code tree used for coding process]]
First, a code tree used for the coding process in the
整数符号化部110には、図4から図6に例示するような2K-1個(2のK-1乗個)の符号木が予め記憶されている。図4はK=2のときの符号木の例であり、T(0)とT(1)のそれぞれが符号木である。図5はK=3のときの符号木の例であり、T(0)からT(3)のそれぞれが符号木である。図6はKを一般化したときの符号木の例であり、T(0)からT(2K-1-1)のそれぞれが符号木である。以下では、Tに付された括弧内の番号を符号木番号と呼ぶ。 The integer coding unit 110 stores in advance 2 K-1 (2 to the K-1 power) code trees as illustrated in FIGS. 4 to 6. FIG. 4 is an example of a code tree when K = 2, and T (0) and T (1) are code trees, respectively. FIG. 5 shows an example of a code tree when K = 3, and each of T (0) to T (3) is a code tree. FIG. 6 is an example of a code tree when K is generalized, and each of T (0) to T (2 K-1 -1) is a code tree. In the following, the number in parentheses attached to T is referred to as a code tree number.
[[符号木における入力された整数値と当該整数値に対応する符号との関係]]
次に、各符号木における入力された整数値と当該整数値に対応する符号との関係を説明する。[[Relationship between the input integer value in the code tree and the code corresponding to the integer value]]
Next, the relationship between the input integer value in each code tree and the code corresponding to the integer value will be described.
各符号木のノードの右側にある三角で囲まれている整数値は入力された整数値に対応している。また、各符号木のエッジの左側にあるビット値’0’及び’1’は入力された整数値に割り当てる符号の規則に対応している。この規則は、符号木の上端のノードから入力された整数値に対応するノードまでのエッジの左側にあるビット値を並べたものを入力された整数値に割り当てる符号として得る規則である。 The integer values enclosed in triangles to the right of each code tree node correspond to the entered integer values. Also, the bit values '0' and '1' on the left side of the edge of each code tree correspond to the code rules assigned to the input integer values. This rule is a rule obtained by allocating a sequence of bit values on the left side of the edge from the node at the upper end of the code tree to the node corresponding to the input integer value as a code assigned to the input integer value.
2K-1個の符号木のうちの1つの符号木は、図4から図6のT(0)に対応するものであり、入力された整数値x_nに対応する符号として、ビット数がK×x_n+1ビットであり、最初の1ビット目のビット値が’1’であり、2ビット目からK×x_n+1ビット目までのビット値が’0’である符号を得る規則に対応する符号木である。なお、この符号木によれば、入力された整数値x_nが0である場合には、符号のビット数K×x_n+1は1ビットであるため、ビット値が’1’である1ビットの符号を得ることになる。2 One of the K-1 code trees corresponds to T (0) in FIGS. 4 to 6, and the number of bits is K as the code corresponding to the input integer value x_n. Corresponds to the rule of obtaining a code that is × x_n + 1 bits, the bit value of the first bit is '1', and the bit value from the second bit to the K × x_n + 1 bits is '0'. It is a code tree to be used. According to this code tree, when the input integer value x_n is 0, the number of bits of the code K × x_n + 1 is 1 bit, so 1 bit whose bit value is '1' You will get the sign.
2K-1個の符号木のうちの上記以外の2K-1-1個の符号木は、図4から図6のT(1)からT(2K-1-1)までに対応するものであり、入力された整数値x_nに対応する符号として、ビット数がK×x_nビットであり、最初の1ビット目のビット値が’0’であり、2ビット目からKビット目までのK-1ビット中の少なくとも1ビットのビット値が’1’であり、K+1ビット目からK×x_nビット目までのK×(x_n-1)ビットのビット値が’0’である、すなわち、最後からK×(x_n-1)ビットのビット値が’0’である符号を得る規則に対応する符号木である。ここで、2ビット目からKビット目までのK-1ビットは2K-1-1個の符号木のそれぞれに一対一に対応するビット群である。なお、これら符号木によれば、入力された整数値x_nが0である場合には、符号のビット数K×x_nは0ビットであるため、符号を得ないことになる。Of the 2 K-1 code trees, the other 2 K-1 -1 code trees correspond to T (1) to T (2 K-1 -1) in FIGS. 4 to 6. The number of bits is K × x_n bits, the bit value of the first bit is '0', and the bits from the second bit to the K bit are the codes corresponding to the input integer value x_n. The bit value of at least one of the K-1 bits is '1', and the bit value of the K × (x_n-1) bits from the K + 1th bit to the K × x_nth bit is '0'. That is, it is a code tree corresponding to the rule of obtaining a code in which the bit value of K × (x_n-1) bits is '0' from the end. Here, the K-1 bits from the 2nd bit to the Kth bit are a bit group having a one-to-one correspondence with each of 2 K-1 -1 code trees. According to these code trees, when the input integer value x_n is 0, the number of bits of the code K × x_n is 0 bits, so that no code is obtained.
例えば、図4のK=2の場合における入力された整数値と当該整数値に対応する符号の規則は、入力された整数値0を符号木T(0)で符号化する場合には、入力された整数値0に対応する符号として’1’を得、入力された整数値1を符号木T(0)で符号化する場合には、入力された整数値1に対応する符号として’100’を得、入力された整数値2を符号木T(0)で符号化する場合には、入力された整数値2に対応する符号として’10000’を得、入力された整数値0を符号木T(1)で符号化する場合には、入力された整数値0に対応する符号を得ず、入力された整数値1を符号木T(1)で符号化する場合には、入力された整数値1に対応する符号として’01’を得、入力された整数値2を符号木T(1)で符号化する場合には、入力された整数値2に対応する符号として’0100’を得る、という規則である。
For example, the input integer value in the case of K = 2 in FIG. 4 and the sign rule corresponding to the integer value are input when the
[[複数の符号木を用いる規則]]
次に、複数の符号木を用いる規則について説明する。整数符号化部110には、複数の符号木を用いる規則も予め記憶されている。[[Rules using multiple code trees]]
Next, a rule using a plurality of code trees will be described. The
図4から図6の各符号木のノードの右側にある整数値を囲む三角の向きは、複数の符号木を用いる規則に対応している。 The orientation of the triangle surrounding the integer value on the right side of the node of each code tree in FIGS. 4 to 6 corresponds to the rule of using a plurality of code trees.
右向きの三角は、入力された整数値の次の整数値を符号化する際には、右隣の符号木(符号木番号が1つ大きい符号木)を用いる規則を表す。なお、その際、最も右にある符号木(符号木番号が最も大きい符号木)の右隣は最も左にある符号木(符号木番号が最も小さい符号木)であるとする。なお、この規則はあくまでも一例であって、複数個の符号木を巡回的に用いる規則であればどのような規則であってもよい。すなわち、各符号木について、右向きの三角のときに次の整数値の符号化には異なる符号木を用いる規則であって、全ての符号木について、右向きの三角のときに次の整数値の符号化に用いる符号木が重複しない規則であれば、どのような規則であってもよい。なお、複数個の符号木を巡回的に用いる規則においては、用いる符号木の最大個数は2K-1個である。The right-pointing triangle represents a rule that uses a code tree next to the right (a code tree whose code tree number is one higher) when encoding the integer value next to the input integer value. At that time, it is assumed that the right neighbor of the rightmost code tree (the code tree with the largest code tree number) is the leftmost code tree (the code tree with the smallest code tree number). It should be noted that this rule is merely an example, and any rule may be used as long as it is a rule that cyclically uses a plurality of code trees. That is, for each code tree, it is a rule to use a different code tree for encoding the next integer value when it is a right-pointing triangle, and for all code trees, the code of the next integer value when it is a right-pointing triangle. Any rule may be used as long as the code trees used for conversion do not overlap. In the rule of using a plurality of code trees cyclically, the maximum number of code trees used is 2 K-1 .
下向き三角は、入力された整数値の次の整数値を符号化する際には、符号木T(1)を用いる規則を表す。なお、この規則もあくまでも一例であって、下向き三角のときには、各下向き三角について予め定めた何れか1つの符号木を次の整数値の符号化に用いる符号木とする規則であれば、どのような規則であってもよい。例えば、下向き三角のときに、全て下向き三角について予め定めた何れか1つの同じ符号木を次の整数値の符号化に用いる符号木とする規則としてもよい。また、平均ビット数を短くするためには、下向き三角のときに、図4から図6のT(0)に対応する符号木以外の符号木を、次の整数値の符号化に用いる符号木とする規則とするのがよい。 The downward triangle represents a rule that uses the code tree T (1) when coding the next integer value after the input integer value. Note that this rule is just an example, and in the case of a downward triangle, what if the rule is that any one of the predetermined code trees for each downward triangle is used as the code tree used for encoding the next integer value? Rule may be. For example, in the case of a downward triangle, the rule may be that any one of the same code trees predetermined for all downward triangles is used as the code tree used for coding the next integer value. Further, in order to shorten the average number of bits, a code tree other than the code tree corresponding to T (0) in FIGS. 4 to 6 is used for encoding the next integer value in the case of a downward triangle. It is better to use the rule.
なお、平均ビット数を最も短くするためには、右向き三角のときに、2K-1個の全ての符号木を巡回的に用い、かつ、全ての符号木について、下向き三角のときに、図4から図6のT(0)に対応する符号木において右向き三角のときに次の整数値の符号化に用いる符号木を、次の整数値の符号化に用いる符号木とする規則とするのがよい。In order to make the average number of bits the shortest, in the case of a right-pointing triangle , all 2 K-1 code trees are used cyclically, and for all code trees, in the case of a downward triangle, the figure is shown. In the code tree corresponding to T (0) in FIGS. 4 to 6, the code tree used for encoding the next integer value when it is a right-pointing triangle is used as the code tree used for encoding the next integer value. Is good.
例えば、図4のK=2の場合の符号木を用いた符号化の規則は、入力された整数値0を符号木T(1)で符号化する場合には、入力された整数値0に対応する符号は得ずに次の整数値を符号化する際に用いる符号木をT(0)とする規則であり、入力された整数値2を符号木T(0)で符号化する場合には、入力された整数値2に対応する符号として’10000’を得て、次の整数値を符号化する際に用いる符号木をT(1)とする規則である。
For example, the coding rule using the code tree when K = 2 in FIG. 4 is that when the
複数の符号木のうちの何れの符号木を符号化処理の最初に用いてもよいが、何れの符号木を符号化処理の最初に用いるかの規則も、複数の符号木を用いる規則として予め定めて記憶しておく。例えば、図4のK=2の場合において、整数系列x_1, x_2, …, x_Nを整数値x_1から順に符号化する場合には、整数値x_1をT(0)で符号化する規則としてもよいし、整数値x_1をT(1)で符号化する規則としてもよいが、T(0)とT(1)の何れを整数値x_1の符号化に用いるかは予め定めて記憶しておく。 Any of the plurality of code trees may be used at the beginning of the coding process, but the rule of which code tree is used at the beginning of the coding process is also a rule for using a plurality of code trees in advance. Set and remember. For example, in the case of K = 2 in FIG. 4, when the integer series x_1, x_2, ..., X_N are encoded in order from the integer value x_1, the rule may be a rule for encoding the integer value x_1 with T (0). However, the rule for encoding the integer value x_1 with T (1) may be used, but which of T (0) and T (1) is used for encoding the integer value x_1 is determined and stored in advance.
[[符号木を用いた符号化処理]]
整数符号化部110は、上述した複数の符号木を用いて、複数の符号木を用いる上述した規則に従って、入力された整数系列x_1, x_2, …, x_Nに含まれる各整数値を予め定めた順に符号化して符号を得、得た符号を整数符号として出力する。例えば、予め定めた順が系列中のサンプル番号順であり、最初に用いる符号木がT(0)である場合に整数符号化部110が行う符号化手順は下記の通りである。
(符号化手順)
1. サンプル番号n,符号木番号の初期値をそれぞれ1,0とする。
2. n=Nとなるまで以下の(i)〜(iv)を繰り返す。
(i) 符号木番号が0なら符号’1’を得る。
(ii) 整数値x_n=0なら、符号木番号に1を加算したものを新たな符号木番号とする。この際、1を加算して符号木番号が2K-1となった場合には0を新たな符号木番号とする。
(iii) 整数値x_n≠0なら、1ビットの’0’と符号木に一対一に対応する対応するK-1ビットとによるKビットの符号を得、さらに、K×(x_n-1)ビットの符号’0’を得て、1を新たな符号木番号とする。
(iv) nに1を加算したものを新たなnとする。
3. 1〜2により得た符号のうちの最初に得た符号’1’を取り除く。
(あるいは始めの1回の2.(i)操作を行わない。)
4. 1〜3により得た符号の最後に符号’1’(終端符号)を加える。
5. 1〜4により得た符号を整数符号として出力する。[[Coding process using code tree]]
The
(Coding procedure)
1. Set the initial values of sample number n and code tree number to 1,0, respectively.
2. Repeat steps (i) to (iv) below until n = N.
(i) If the code tree number is 0, the code '1' is obtained.
(ii) If the integer value x_n = 0, the code tree number plus 1 is used as the new code tree number. At this time, if 1 is added and the code tree number becomes 2 K-1 , 0 is set as a new code tree number.
(iii) If the integer
(iv) Let n plus 1 be the new n.
3. Remove the first code '1' from the codes obtained in
(Or do not perform the first 2. (i) operation.)
4. Add the code '1' (termination code) to the end of the code obtained in
5. Output the code obtained in
なお、符号化手順のうちの3を行うのは必須ではない。最初に用いる符号木がT(0)である場合には、x_1の値がどのような値であっても、1〜2により得た符号のうちの最初に得た符号は’1’である。従って、最初に得た符号’1’を取り除いたものを整数符号として符号化装置100が出力しても、復号装置150が入力された整数符号の最初に符号’1’を加えれば、符号化装置100の整数符号化部110が行った符号化処理に対応する復号処理を復号装置150が行うことが可能である。このことから、符号化手順の3では最初に得た符号’1’を取り除いている。しかし、必ずしも符号化手順の3を行う必要はなく、1〜2により得た符号のうちの最初に得た符号’1’を取り除かないでもよい。この場合には、対応する復号装置150が、入力された整数符号の最初に符号’1’を加える処理を行わないようにすればよく、符号化手順のうちの3は行わないでもよい。
It is not essential to perform 3 of the coding procedures. If the first code tree used is T (0), then whatever the value of x_1 is, the first code obtained from 1-2 is '1'. .. Therefore, even if the
また、符号化装置100から復号装置150への整数符号の伝え方によっては、符号化手順のうちの4は行わないでもよい。復号装置150における復号の手順は後述するが、整数符号化部110が行った符号化処理に対応する復号処理を復号装置150が行うためには、復号装置150が整数符号の終端を特定できる必要がある。符号化装置100から復号装置150への整数符号の伝える構成として、例えば、符号化装置100内または符号化装置100の後段において整数系列x_1, x_2, …, x_Nについて得た整数符号を周知のパケット化の手法を用いてパケットに格納して復号装置150に伝える構成を採用することができる。この場合には、復号側では、復号装置150内または復号装置150の前段においてパケットから整数符号を取り出す構成を採用することになるので、復号装置150が整数符号の終端を特定できる。従って、このような場合には、符号化手順のうちの4は行わないでもよい。符号化装置100から復号装置150への整数符号の伝える構成としては、整数系列x_1, x_2, …, x_Nについて得た整数符号の後ろに別の符号を連結させたものを上述したパケットに格納して復号装置150に伝える構成や、上述したパケット化を行わずに整数系列x_1, x_2, …, x_Nについて得た整数符号の後ろに別の符号を連結させて復号装置150に伝える構成などを採用することもある。これらの構成において、符号化手順のうちの4を行わなかったとすると、後ろに連結させた符号が’0000’であるときなどには、N番目の整数値に対応する符号がどこまでであり、後ろに連結させた符号がどこからであるか、を復号装置150が判別できなくなってしまう。そこで、これらの構成においては、予め定めた同じNの値を符号化装置100と復号装置150に記憶しておくことなどによって、整数符号がN個の整数値に対応するものであることを復号装置150が把握可能なようにするとともに、符号化手順のうちの4も行って、整数符号の終端を復号装置150が特定できるようする必要がある。
Further, depending on how the integer code is transmitted from the
なお、上述した説明の符号’0’は2値のビット値のうちの何れか一方のビット値、上述した説明の符号’1’は2値のビット値のうちの他方のビット値、の例である。すなわち、当然のことながら、上述した説明の符号’0’に代えて符号’1’を用い、符号’1’に代えて符号’0’を用いてもよい。 The reference numeral '0' in the above description is an example of one of the binary bit values, and the reference numeral '1' in the above description is an example of the other bit value of the binary bit values. Is. That is, as a matter of course, the code "1" may be used instead of the code "0" described above, and the code "0" may be used instead of the code "1".
[[符号化処理の例]]
符号化処理の例として、K=2で最初に用いる符号木がT(0)である場合の、入力された整数系列x_1, x_2, x_3, x_4, x_5が0, 0, 2, 0, 0である場合の符号化処理を説明する。まず、始めの整数値x_1=0はT(0)で符号化するので符号’1’を得、符号木番号0に1を加算したものを新たな符号木番号とするので、次の整数値x_2=0の符号化に用いる符号木をT(1)とする。次の整数値x_2=0はT(1)で符号化するので符号は得ず、符号木番号1に1を加算したものを符号木番号とするが、1を加算した符号木番号が2K-1となったので0を新たな符号木番号とし、次の整数値x_3=2の符号化に用いる符号木をT(0)とする。3番目の整数値x_3=2はT(0)で符号化するので符号’10000’を得、新たな符号木番号を1とする規則であるので、次の整数値x_4=0の符号化に用いる符号木をT(1)とする。4番目の整数値x_4=0はT(1)で符号化するので何も符号を追加せず、符号木をT(1)からT(0)へ遷移させる。最後の整数値0はT(0)で符号化するので符号’1’を得る。ここまでで得られた符号は’1100001’であるが、上述した符号化手順の3を行い上述した符号化手順の4を行わない場合には、最初に得た符号’1’を省略し、最終的な整数符号’100001’を得る。[[Example of coding process]]
As an example of coding processing, when the code tree used first at K = 2 is T (0), the input integer series x_1, x_2, x_3, x_4, x_5 is 0, 0, 2, 0, 0. The coding process in the case of is described. First, since the first integer value x_1 = 0 is encoded by T (0), the sign '1' is obtained, and the
≪復号装置≫
図7及び図8を参照して、第一実施形態の復号装置150が実行する復号方法の処理手続きを説明する。第一実施形態の復号装置150は、図7に示す通り、整数復号部160を含む。第一実施形態の復号装置150が図8に示す各ステップの処理を実行することにより、第一実施形態の復号方法が実現される。≪Decoding device≫
The processing procedure of the decoding method executed by the decoding device 150 of the first embodiment will be described with reference to FIGS. 7 and 8. As shown in FIG. 7, the decoding device 150 of the first embodiment includes an
第一実施形態の復号装置150には、第一実施形態の符号化装置100が出力した整数符号が入力される。第一実施形態の復号装置150は、入力された整数符号を、第一実施形態の符号化装置100に対応する予め定めた複数の符号木を第一実施形態の符号化装置100に対応する予め定めた規則に則って用いた復号処理で復号して非負の整数値の系列を得ることで、第一実施形態の符号化装置100に入力された非負の整数値の系列そのものを復元するものである。以下では、上述した符号化装置100の説明と同様に、非負の整数値を単に「整数値」と呼んで説明する。
An integer code output by the
[整数復号部160]
整数復号部160には、復号装置150に入力された整数符号が入力される。整数復号部160は、符号化装置100の整数符号化部110が用いた符号化パラメータKと同じ値であり、予め定めたまたは図示しない手段により入力された2以上の自然数である符号化パラメータKに基づき、入力された整数符号を以下の符号木を用いた復号処理で復号して整数値の系列を得、得た整数系列x_1, x_2, …, x_Nを出力する(S160)。以下では、整数系列x_1, x_2, …, x_Nの各整数がx_n(nは系列中のサンプル番号であり、n∈{1,2, ..., N})であるとして説明を行う。[Integer decoding unit 160]
The integer code input to the decoding device 150 is input to the
復号処理に用いる符号木は、第一実施形態の符号化装置100の整数符号化部110が用いる符号木と同じであり、整数復号部160には、図4から図6に例示するような2K-1個(2のK-1乗個)の符号木が予め記憶されている。復号処理における符号木における入力された符号と当該符号に対応する整数値との関係及び複数の符号木を用いる規則は、第一実施形態の符号化装置100の整数符号化部110の符号化処理における規則に対応するものであり、第一実施形態の符号化装置100の整数符号化部110の符号化処理における規則の「入力された整数値に割り当てる符号」を「入力された符号」と読み替え、「入力された整数値」を「入力された符号に割り当てる整数値」と読み替えた規則であり、整数復号部160に予め記憶されている。なお、復号処理に用いるパラメータKの値は、第一実施形態の符号化装置100の整数符号化部110が用いたパラメータKと同じ値であり、整数復号部160に予め記憶しておく。また、復号処理において何れの符号木を最初に用いるかの規則も、第一実施形態の符号化装置100の整数符号化部110が用いた規則と同じ規則であり、整数復号部160に予め記憶しておく。The code tree used for the decoding process is the same as the code tree used by the
整数復号部160は、上述した複数の符号木を用いて、複数の符号木を用いる上述した規則に従って、入力された整数符号に対応する整数値による列を得て、得られた整数値による列の各整数を予め定めた順としたものを、整数系列x_1, x_2, …, x_Nとして得て出力する。例えば、予め定めた順が系列中のサンプル番号順であり、最初に用いる符号木がT(0)である場合に整数復号部160が行う復号手順は、例えば、下記の復号手順1や復号手順2の通りである。
The
(復号手順1−1)符号化手順4による終端符号の追加を行っていない場合、すなわち、整数符号の終端を復号装置150が特定可能な場合
1. 符号化手順3で符号’1’を取り除いた場合は、整数符号の最初に符号’1’を追加する。
2. 符号木番号の初期値を0とする。
3. 読み込んでない整数符号がなくなるまで以下(i)〜(ii)を繰り返し、読み込んでない整数符号がなくなったら4に進む。
(i) 入力された整数符号を順に、符号木番号に対応する符号木に読み込んだ符号に対応する符号がある間(すなわち、符号木番号に対応する符号木に読み込んだ符号に対応する符号がなくなる1つ前のビットまで)、読み込む。
(ii) 符号木番号に対応する符号木から、読み込んだ符号に対応する符号に対応する整数値を得て、当該符号木の整数値についての符号木の遷移の規則に従って新たな符号木番号を得る。
4. 3の(ii)で得た整数値による系列を整数系列x_1, x_2, …, x_Nとして出力する。(Decoding procedure 1-1) When the terminal code is not added according to the
1. If the code '1' was removed in
2. Set the initial value of the code tree number to 0.
3. Repeat steps (i) to (ii) below until there are no unread integer signs, and proceed to 4 when there are no unread integer signs.
(i) While there is a code corresponding to the code read in the code tree corresponding to the code tree number (that is, the code corresponding to the code read in the code tree corresponding to the code tree number) Read up to the previous bit).
(ii) Obtain an integer value corresponding to the code corresponding to the read code from the code tree corresponding to the code tree number, and obtain a new code tree number according to the code tree transition rule for the integer value of the code tree. obtain.
4.3 Output the series of integer values obtained in (ii) as integer series x_1, x_2,…, x_N.
(復号手順1−2)符号化手順4による終端符号の追加を行った場合、すなわち、整数符号の終端を復号装置150が特定できない場合
1. 符号化手順3で符号’1’を取り除いた場合は、入力された符号列(整数符号と後続する別符号による符号列)の最初に符号’1’を追加する。
2. サンプル番号n, 符号木番号の初期値をそれぞれ1, 0とする。
3. n=Nとなるまで以下(i)〜(ii)を繰り返す。
(i) 入力された符号列を順に、符号木番号に対応する符号木に読み込んだ符号に対応する符号がある間(すなわち、符号木番号に対応する符号木に読み込んだ符号に対応する符号がなくなる1つ前のビットまで)、読み込む。
(ii) 符号木番号に対応する符号木から、読み込んだ符号に対応する符号に対応する整数値を得て、当該符号木の整数値についての符号木の遷移の規則に従って新たな符号木番号を得て、nに1を加算したものを新たなnとする。
4. 3の(ii)で得た整数値による系列を整数系列x_1, x_2, …, x_Nとして出力する。(Decoding procedure 1-2) When the terminal code is added according to the
1. If the code '1' is removed in
2. Set the initial values of sample number n and code tree number to 1 and 0, respectively.
3. Repeat steps (i) to (ii) below until n = N.
(i) While there is a code corresponding to the code read in the code tree corresponding to the code tree number in order of the input code string (that is, the code corresponding to the code read in the code tree corresponding to the code tree number is Read up to the previous bit).
(ii) Obtain an integer value corresponding to the code corresponding to the read code from the code tree corresponding to the code tree number, and obtain a new code tree number according to the code tree transition rule for the integer value of the code tree. The new n is obtained by adding 1 to n.
4.3 Output the series of integer values obtained in (ii) as integer series x_1, x_2,…, x_N.
(復号手順2)
1. 符号化手順4で終端符号の追加を行っていない場合は、入力された符号列の最後に終端符号’1’を追加する。また、符号化手順3で符号’1’を取り除かなかった場合は、入力された符号列の最初に符号’1’を取り除く。
2. サンプル番号n, 符号木番号の初期値をそれぞれ1, 0とする。
3. n≧Nとなるまで以下(i)〜(v)を繰り返す。
(i) Kビット全てが符号’0’である間、入力された符号列を順にKビットずつ読み、その間読んだ符号’0’の個数をKで割った数をLとする。
(ii) 符号木番号が0なら、整数値Lを得る。
(iii) 符号木番号が0でないなら、整数値(L+1)を得る。
(iv) 入力された符号列の次の1ビットが符号’1’なら、その1ビットを読み、(2K-1-1)個の整数値0を得、0を新たな符号木番号にして、nに2K-1を加算したものを新たなnとする。
(v) 入力された符号列の次の1ビットが符号’0’なら、その1ビットを含むKビットを読み、そのKビットの符号に対応する数を新たな符号木番号とし、(新しい符号木番号-1)個の整数値0を得、nに新しい符号木番号を加算したものを新たなnとする。
4. 得られた整数値がN個よりも多い場合、N+1個目の整数値以降は取り除く。(Decryption procedure 2)
1. If the terminal code was not added in
2. Set the initial values of sample number n and code tree number to 1 and 0, respectively.
3. Repeat steps (i) to (v) below until n ≧ N.
(i) While all K bits have the code '0', the input code string is read in order by K bits, and the number of the code '0' read during that period divided by K is defined as L.
(ii) If the code tree number is 0, the integer value L is obtained.
(iii) If the code tree number is non-zero, get an integer value (L + 1).
(iv) If the next 1 bit of the input code string is code '1', read that 1 bit, get (2 K-1 -1)
(v) If the next 1 bit of the input code string is sign '0', the K bit containing that 1 bit is read, and the number corresponding to the sign of that K bit is used as the new code tree number (new code). Tree number-1) Obtain 0 integer values and add a new code tree number to n to make a new n.
4. If the number of obtained integer values is more than N, remove the N + 1th and subsequent integer values.
[[復号処理の例]]
復号処理の例として、K=2で最初に用いる符号木がT(0)である場合の、上述した符号化処理の例で得た整数符号’100001’を上述した復号手順1−1で復号する場合の復号処理を説明する。まず、整数符号’100001’の先頭に符号’1’を追加して整数符号を’1100001’とする。次に、整数符号’1100001’の最初の1ビットである’1’は符号木T(0)に対応する符号があるものの、最初の2ビットである’11’は符号木T(0)に対応する符号がないことから、整数符号の最初の1ビットである’1’を読み込み、’1’に対応する整数値0を得て、次に用いる符号木をT(1)とする。次に、整数符号の残りの’100001’の最初の1ビットである’1’は符号木T(1)に対応する符号がないことから、最初の1ビットも読み込まず、0ビットに対応する整数値0を得て、次に用いる符号木をT(0)とする。次に、整数符号の残りの’100001’の最初の1ビットである’1’から最初の5ビットである’10000’までは対応する符号が符号木T(0)にあるものの、整数符号の残りの’100001’の最初の6ビットである’100001’は対応する符号が符号木T(0)にないことから、整数符号の残りの’100001’の最初の5ビットである’10000’を読み込み、’10000’に対応する整数値2を得て、次に用いる符号木をT(1)とする。次に、整数符号の残りの’1’は対応する符号が符号木T(1)にないことから、最初の1ビットも読み込まず、0ビットに対応する整数値0を得て、次に用いる符号木をT(0)とする。次に、整数符号の残りの’1’は対応する符号が符号木T(0)にあり、この’1’以降には読み込んでない整数符号がないことから、’1’に対応する整数値0を得て、これらの処理により得た整数値0, 0, 2, 0, 0による系列を整数系列x_1, x_2, x_3, x_4, x_5として出力する。[[Example of decryption process]]
As an example of the decoding process, when the code tree used first at K = 2 is T (0), the integer code '100001' obtained in the above-mentioned coding process example is decoded by the above-mentioned decoding procedure 1-1. The decoding process in the case of performing is described. First, the sign '1' is added to the beginning of the integer sign '100001' to make the integer sign '1100001'. Next, the first 1 bit of the integer sign '1100001', '1', has a sign corresponding to the sign tree T (0), but the first 2 bits, '11', are in the sign tree T (0). Since there is no corresponding sign, the first bit of the integer sign, '1', is read, the
<発明の原理の説明>
ここで本発明の原理を説明する。<Explanation of the principle of the invention>
Here, the principle of the present invention will be described.
第一実施形態の符号化装置100によれば、全ての非負整数値に対して符号を割り当てることが可能であり、当該符号を第一実施形態の復号装置150が復号することにより非負整数値そのものを復元可能とするものである。図4から図6に示した通り、非負整数値x_nに対応する符号はK×x_nビットまたはK×x_n+1ビットである。このことから、第一実施形態で用いた本発明の符号は、以下の偏りの大きな片側ラプラス分布に従う非負整数値の系列に対して近似的に最適な期待ビット長を与える符号であり、小さな値に大きく偏った非負整数値の系列に対する平均ビット数をGolomb-Rice符号よりも少なくすることができる符号である。
According to the
式(3)で示したGolomb-Rice符号が最適な分布p(x,2r)と、式(4)で示した本発明の符号が最適な分布p(x,1/K)と、の対応関係から、本発明の符号化パラメータKの逆数の対数はRiceパラメータrに対応していることがわかる。また、本発明の符号化パラメータKが正の整数値であることから、符号化パラメータKの逆数の対数は負値となるので、符号化パラメータKは負値に拡張したRiceパラメータに対応するパラメータとして解釈することができる。つまり、非負整数値の系列に最適なRiceパラメータの推定を行うことにより、非負整数値の系列に割り当てる本発明の符号における最適なパラメータKを推定することができるということである。The Golomb-Rice code shown in Eq. (3) has the optimum distribution p (x, 2 r ), and the code of the present invention shown in Eq. (4) has the optimum distribution p (x, 1 / K). From the correspondence, it can be seen that the logarithm of the reciprocal of the coding parameter K of the present invention corresponds to the Rice parameter r. Further, since the coding parameter K of the present invention is a positive integer value, the logarithm of the reciprocal of the coding parameter K is a negative value, so that the coding parameter K is a parameter corresponding to the Rice parameter extended to a negative value. Can be interpreted as. That is, by estimating the optimum Rice parameter for the series of non-negative integer values, the optimum parameter K in the code of the present invention assigned to the series of non-negative integer values can be estimated.
第一実施形態の符号化装置100と復号装置150で用いた本発明の符号木における整数値と当該整数値に対応する符号との関係、及び、複数の符号木を用いる規則、は、非負整数値x_nに対応する符号をK×x_nビットまたはK×x_n+1ビットとすることだけではなく、復号可能な符号とすることも考慮して設計したものである。具体的には、整数値0の2個から2K-1個のうちの予め定めた何れかの個数の連続に対しては1ビットの符号である’1’を割り当て、整数値0の0個から予め定めた最大で2K-1-1個の連続とそれに後続する1つの非負整数値x_n≠0に対しては、最初のKビットの中に少なくとも1ビットのビット値’1’が含まれ、かつ、以降のビット値が’0’である符号を割り当てるという制約を設けている。この制約を設けていることにより、複数個の整数値からなる整数系列に対応する整数符号を復号装置150で読み込む際に、Kビット中にビット値’1’が含まれる部分に、整数符号中のある符号と1つ後の符号との境界が含まれることが分かるようにしている。なお、上述した制約を満たすため、整数値0の0個から予め定めた最大で2K-1-1個の連続とそれに後続する1つの非負整数値x_nに対する符号のビット数はK×x_nビットだけではなく、K×x_nビットまたはK×x_n+1ビットとしている。The relationship between the integer value in the code tree of the present invention used in the
<第二実施形態>
第一実施形態では、予め定めた符号木を用いて本発明の符号化と復号を実現する形態を説明したが、予め定めた符号木に代えて、予め定めた対応表を用いることでも、第一実施形態と等価な符号化処理と復号処理を実現することが可能である。この予め定めた対応表を用いる形態を第二実施形態として説明する。<Second embodiment>
In the first embodiment, the embodiment of realizing the coding and decoding of the present invention by using a predetermined code tree has been described, but it is also possible to use a predetermined correspondence table instead of the predetermined code tree. It is possible to realize the coding process and the decoding process equivalent to one embodiment. A mode using this predetermined correspondence table will be described as a second embodiment.
≪符号化装置≫
図2及び図3を参照して、第二実施形態の符号化装置200が実行する符号化方法の処理手続きを説明する。第二実施形態の符号化装置200は、図2に示す通り、第一実施形態の符号化装置100と同様、整数符号化部210を含む。第二実施形態の符号化装置200が、第一実施形態の符号化装置100と同様、図3に示す各ステップの処理を実行することにより、第二実施形態の符号化方法が実現される。≪Coding device≫
The processing procedure of the coding method executed by the coding apparatus 200 of the second embodiment will be described with reference to FIGS. 2 and 3. As shown in FIG. 2, the coding device 200 of the second embodiment includes an integer coding unit 210 like the
第二実施形態の符号化装置200には、第一実施形態と同様に、非負の整数値の系列が入力される。第二実施形態の符号化装置200は、予め定めた対応表に従って、非負の整数値の系列を可変長符号化することで、ラプラス分布よりも偏りの大きな分布の非負の整数値の系列に対してGolomb-Rice符号化よりも短いビット長となる符号化処理を実現するものである。以下では、符号化装置200に入力された非負の整数値を単に「整数値」と呼んで説明する。 As in the first embodiment, a sequence of non-negative integer values is input to the coding device 200 of the second embodiment. The coding apparatus 200 of the second embodiment performs variable-length coding of a series of non-negative integer values according to a predetermined correspondence table, so that the series of non-negative integer values having a distribution larger than the Laplace distribution is subjected to variable length coding. It realizes a coding process with a bit length shorter than that of Golomb-Rice coding. Hereinafter, the non-negative integer value input to the encoding device 200 will be referred to simply as an “integer value” for description.
[整数符号化部210]
整数符号化部210には、符号化装置200に入力された整数値の系列のうちの、Nサンプルずつの整数系列x_1, x_2, …, x_Nが入力される。第二実施形態の整数符号化部210は、2以上の自然数である符号化パラメータKに対応して予め作成して整数符号化部210内に記憶された対応表に基づいて、入力された整数系列x_1, x_2, …, x_Nを符号化して符号を得、得た符号を整数符号として出力する(S210)。[Integer encoding unit 210]
In the integer coding unit 210, an integer series x_1, x_2, ..., X_N for each N samples of the series of integer values input to the coding device 200 is input. The integer coding unit 210 of the second embodiment is an integer input based on a correspondence table created in advance corresponding to the coding parameter K which is a natural number of 2 or more and stored in the integer coding unit 210. The series x_1, x_2, ..., X_N are encoded to obtain a code, and the obtained code is output as an integer code (S210).
[[符号化処理に用いる対応表]]
予め記憶された対応表は、零値の連続(0個以上の連続)と1つの非零値との組合せによる整数値の部分系列と、当該部分系列に対応する符号と、の対応関係の規則を格納したものである。K=2とK=3における対応表の例を、それぞれ図9(A,B)と図10(A,B,C,D)に挙げる。対応表に格納された規則は、2K-1個連続した零値による部分系列にはビット値が’1’である1ビットの符号が割り当てられ、それ以外の部分系列、すなわち、0個から2K-1-1個連続した零値とそれに後続する1つの非零値x_nによる部分系列には、それぞれの零値の連続と非零値xの組合せに対してK×x_nビットまたはK×x_n+1ビットの符号が割り当てられる規則である。[[Correspondence table used for coding processing]]
The correspondence table stored in advance is a rule of correspondence between a sub-series of integer values by a combination of a series of zero values (sequential of 0 or more) and one non-zero value, and a code corresponding to the sub-series. Is stored. Examples of correspondence tables for K = 2 and K = 3 are shown in FIGS. 9 (A, B) and 10 (A, B, C, D), respectively. According to the rules stored in the correspondence table, a 1-bit sign with a bit value of '1' is assigned to a subseries with 2 K-1 consecutive zero values, and the other subseries, that is, from 0 2 K-1 -1 consecutive zeros followed by one non-zero value x_n in a subseries with K × x_n bits or K × for each combination of consecutive zero values and non-zero values x A rule that assigns a sign of x_n + 1 bits.
例示した対応表では、0個から2K-1-1個連続した零値とそれに後続する1つの非零値x_nによる部分系列のそれぞれには、始めのKビット内に少なくとも1ビットの’1’が存在し、残りのK×(x_n-1)ビットまたはK×(x_n-1)+1ビットは全て’0’である符号が割り当てられる規則である。より詳しくは、この規則では、0個から2K-1-1個連続した零値と1つの非零値による部分系列には、1ビット目のビット値が’1’であり、2ビット目からKビット目までのビット値が全て’0’であり、K+1ビット目からK×x_n+1ビット目までのビット値が全て’0’であるK×x_n+1ビットの符号、または、1ビット目のビット値が’0’であり、2ビット目からKビット目までのK-1ビット中の少なくとも1ビットのビット値が’1’であり、K+1ビット目からK×x_nビット目までのビット値が全て’0’であるK×x_nビットの符号、が割り当てられる。更に詳しくは、この規則では、K×x_n+1ビットの符号のうちの1ビット目のビット値が’1’であり2ビット目からK+1ビット目までが’0’である1ビット目からK+1ビット目までの部分符号1通りと、K×x_nビットの符号のうちの1ビット目のビット値が’0’であり2ビット目からKビット目までのK-1ビット中の少なくとも1ビットのビット値が’1’である1ビット目からKビット目までの部分符号2K-1-1通りと、による2K-1通りの部分符号と、0個から2K-1-1個の零値の連続数2K-1通りと、が一対一に対応している。In the illustrated correspondence table, each subseries with 0 to 2 K-1 -1 consecutive zeros followed by one nonzero value x_n has at least one bit of '1 in the first K bits. It is a rule that'exists and the remaining K × (x_n-1) bits or K × (x_n-1) + 1 bits are all assigned a code of '0'. More specifically, in this rule, the bit value of the first bit is '1' and the bit value of the second bit is '1' in the subseries with 0 to 2 K-1 -1 consecutive zero values and one non-zero value. The code of the K × x_n + 1 bits, or the code of the K × x_n + 1 bits, in which the bit values from the K + 1 bit to the K bit are all '0' and the bit values from the K + 1 bit to the K × x_n + 1 bit are all '0'. , The bit value of the 1st bit is '0', the bit value of at least 1 bit in the K-1 bits from the 2nd bit to the K bit is '1', and the bit value from the K + 1th bit to K × The code of the K × x_n bit, in which all the bit values up to the x_nth bit are '0', is assigned. More specifically, in this rule, the bit value of the first bit of the code of K × x_n + 1 bits is '1', and the first bit from the second bit to the K + 1 bit is '0'. The bit value of the first bit of the K × x_n bits and one partial code from the K + 1 bit to the K + 1 bit is '0', and the K-1 bits from the second bit to the
[[対応表を用いた符号化処理]]
整数符号化部210は、上述した対応表を用いて、入力された整数系列x_1, x_2, …, x_Nに含まれる各整数値を予め定めた順に符号化して符号を得、得た符号を整数符号として出力する。例えば、予め定めた順が系列中のサンプル番号順である場合に整数符号化部210が行う符号化手順は下記の通りである。
(符号化手順)
1. サンプル番号nを1とする。
2. n=Nとなるまで、以下の(i)〜(ii)を繰り返す。
(i) x_n以降の2K-1個の整数値の中に非零値がある場合には、x_n以降の最初の非零値までの部分系列に対応する符号を符号表から得て、x_n以降の最初の非零値までのサンプル数をnに加算したものを新たなnとする。
(ii) x_n以降の2K-1個の整数値が全て零値である場合には、 x_n以降の2K-1個の整数値の部分系列に対応する符号を符号表から得て、2K-1をnに加算したものを新たなnとする。
3. 2により得た符号の最後に符号’1’(終端符号)を加える。
4. 3により得た符号を整数符号として出力する。[[Coding process using correspondence table]]
The integer coding unit 210 encodes each integer value included in the input integer series x_1, x_2, ..., X_N in a predetermined order using the above-mentioned correspondence table to obtain a code, and obtains a code, and obtains a code as an integer. Output as a code. For example, the coding procedure performed by the integer coding unit 210 when the predetermined order is the sample number order in the series is as follows.
(Coding procedure)
1. Let sample number n be 1.
2. Repeat steps (i) to (ii) below until n = N.
(i) If there is a non-zero value in 2 K-1 integer values after x_n, obtain the sign corresponding to the sub-series from x_n to the first non-zero value from the code table, and x_n The new n is obtained by adding the number of samples up to the first non-zero value thereafter to n.
(ii) If all 2 K-1 integer values after x_n are zero values, obtain the code corresponding to the subseries of 2 K-1 integer values after x_n from the code table, and 2 Let K-1 be added to n and be the new n.
Add the code '1' (termination code) to the end of the code obtained in 3.2.
The code obtained in 4.3 is output as an integer code.
なお、第一実施形態と同様に、符号化装置200から復号装置250への整数符号の伝え方によっては、終端符号を加える処理(符号化手順のうちの3)は行わないでもよい。 As in the first embodiment, the process of adding the terminal code (3 of the coding procedure) may not be performed depending on how the integer code is transmitted from the coding device 200 to the decoding device 250.
なお、第二実施形態の符号化装置200の整数符号化部210における図9(A,B)と図10(A,B,C,D)を用いた符号化処理により得られる符号は、それぞれ、第一実施形態の符号化装置100の整数符号化部110における図4と図5の符号木を用いる符号化処理において、最初に用いる符号木をT(1)にした場合に得られる符号に一致する。また、第二実施形態の符号化装置200の整数符号化部210にて、図9(A,B)と図10(A,B,C,D)のそれぞれを用いて符号化する際に、入力された整数系列x_1, x_2, …, x_Nの先頭に(2K-1-1)個の零値を追加してから符号化を行い、得られた整数符号の最初にある符号’1’を取り除くようにすれば、第一実施形態の符号化装置100の整数符号化部110における図4と図5のそれぞれの符号木を用いる符号化処理において、最初に用いる符号木をT(0)にした場合に得られる符号に一致する。このように、第二実施形態の符号化装置200の整数符号化部210における対応表を用いた符号化処理は、第一実施形態の符号化装置100の整数符号化部110における符号木を用いた符号化処理と等価なものである。The codes obtained by the coding process using FIGS. 9 (A, B) and 10 (A, B, C, D) in the integer coding unit 210 of the coding device 200 of the second embodiment are respectively. , In the coding process using the code tree of FIGS. 4 and 5 in the
≪復号装置≫
図7及び図8を参照して、第二実施形態の復号装置250が実行する復号方法の処理手続きを説明する。第二実施形態の復号装置250は、図7に示す通り、第一実施形態の復号装置150と同様、整数復号部260を含む。第二実施形態の復号装置250が、第一実施形態の復号装置150と同様、図8に示す各ステップの処理を実行することにより、第二実施形態の復号方法が実現される。≪Decoding device≫
The processing procedure of the decoding method executed by the decoding device 250 of the second embodiment will be described with reference to FIGS. 7 and 8. As shown in FIG. 7, the decoding device 250 of the second embodiment includes an integer decoding unit 260 like the decoding device 150 of the first embodiment. The decoding method of the second embodiment is realized by the decoding device 250 of the second embodiment executing the processing of each step shown in FIG. 8 in the same manner as the decoding device 150 of the first embodiment.
第二実施形態の復号装置250には、第一実施形態の復号装置150と同様、第二実施形態の符号化装置200が出力した整数符号が入力される。第二実施形態の復号装置250は、入力された整数符号を、第二実施形態の符号化装置200の整数符号化部210に記憶された対応表と対応表を用いた復号処理で復号して非負の整数値の系列を得ることで、第二実施形態の符号化装置200に入力された非負の整数値の系列そのものを復元するものである。以下では、上述した符号化装置の説明と同様に、非負の整数値を単に「整数値」と呼んで説明する。 Like the decoding device 150 of the first embodiment, the decoding device 250 of the second embodiment is input with an integer code output by the coding device 200 of the second embodiment. The decoding device 250 of the second embodiment decodes the input integer code by a decoding process using the correspondence table and the correspondence table stored in the integer coding unit 210 of the coding device 200 of the second embodiment. By obtaining a sequence of non-negative integer values, the sequence of non-negative integer values itself input to the coding apparatus 200 of the second embodiment is restored. Hereinafter, as in the above description of the coding device, a non-negative integer value will be simply referred to as an “integer value”.
[整数復号部260]
整数復号部260には、復号装置250に入力された整数符号が入力される。整数復号部260は、予め作成して整数復号部260内に記憶された対応表であり、符号化パラメータKに対応する予め作成された対応表であり、符号化装置200の整数符号化部210内に予め記憶され整数符号化部210で用いられたのと同じ対応表に基づいて、入力された整数符号を復号して整数系列x_1, x_2, …, x_Nを得て出力する(S260)。[Integer decoding unit 260]
The integer code input to the decoding device 250 is input to the integer decoding unit 260. The integer decoding unit 260 is a correspondence table created in advance and stored in the integer decoding unit 260, is a correspondence table prepared in advance corresponding to the coding parameter K, and is an integer coding unit 210 of the encoding device 200. Based on the same correspondence table stored in advance and used in the integer coding unit 210, the input integer code is decoded to obtain the integer series x_1, x_2, ..., X_N and output (S260).
より具体的には、整数復号部260は、入力された整数符号のうちのまだ読み込んでいない符号部分を最初から対応表に対応する符号がある部分まで読み込み、読み込んだ符号に対応する整数の部分系列を対応表から得る処理を、入力された整数符号の最初から最後まで繰り返し行うことで得た整数の部分系列を纏めた系列を整数系列x_1, x_2, …, x_Nとして出力する。この復号処理により、第一実施形態の復号装置150の整数復号部160における図4と図5のそれぞれの符号木を用いる復号処理において、最初に用いる符号木をT(1)にした場合と同じ整数系列x_1, x_2, …, x_Nを得ることができる。
More specifically, the integer decoding unit 260 reads the unread code portion of the input integer code from the beginning to the part having the code corresponding to the correspondence table, and the integer part corresponding to the read code. The process of obtaining a series from the correspondence table is repeated from the beginning to the end of the input integer code, and the series that summarizes the sub-series of integers obtained is output as the integer series x_1, x_2,…, x_N. By this decoding process, in the decoding process using the respective code trees of FIGS. 4 and 5 in the
なお、符号化装置200の整数符号化部210にて、入力された整数系列x_1, x_2, …, x_Nの先頭に(2K-1-1)個の零値を追加してから符号化を行い、得られた整数符号の最初にある符号’1’を取り除く処理を行った場合は、整数復号部260は、入力された整数符号の先頭に符号’1’を追加してから上記対応表に基づいて上述した復号処理で各部分系列を得、はじめに得られた(2K-1-1)個の零値を省略した後、部分系列を纏めた整数系列x_1, x_2, …, x_Nを出力すればよい。この復号処理により、第一実施形態の復号装置150の整数復号部160における図4と図5のそれぞれの符号木を用いる復号処理において、最初に用いる符号木をT(0)にした場合と同じ整数系列x_1, x_2, …, x_Nを得ることができる。このように、第二実施形態の復号装置250の整数復号部260における対応表を用いた復号処理は、第一実施形態の復号装置150の整数復号部160における符号木を用いた復号処理と等価なものである。 In the integer coding unit 210 of the encoding device 200, (2 K-1 -1) zero values are added to the beginning of the input integer series x_1, x_2, ..., X_N before encoding. When the process of removing the code '1' at the beginning of the obtained integer code is performed, the integer decoding unit 260 adds the code '1' to the beginning of the input integer code and then performs the above correspondence table. Each sub-series is obtained by the above-mentioned decoding process based on the above, and after omitting the (2 K-1 -1) zero values obtained at the beginning, the integer series x_1, x_2,…, x_N that summarizes the sub-series is obtained. You can output it. By this decoding process, it is the same as the case where the code tree used first in the decoding process using the respective code trees of FIGS. 4 and 5 in the
以上から分かるように、第一実施形態の符号化装置100によって符号木を用いた符号化処理で得た整数符号を、第二実施形態の復号装置250によって当該符号化処理と対応する対応表を用いた復号処理で復号して整数系列x_1, x_2, …, x_Nを得たり、第二実施形態の符号化装置200によって対応表を用いた符号化処理で得た整数符号を、第一実施形態の復号装置150によって当該符号化処理と対応する符号木を用いた復号処理で復号して整数系列x_1, x_2, …, x_Nを得たりしてもよい。
As can be seen from the above, the integer code obtained by the coding process using the code tree by the
<第三実施形態>
第一実施形態及び第二実施形態では、予め定めた符号木または予め定めた対応表を用いて符号化復号する手続き的側面から本発明の符号化と復号を実現する形態について説明した。第三実施形態では、これらの手続きにより得られる符号や整数値の系列というデータ的側面から本発明の符号化と復号を実現する形態について説明する。<Third Embodiment>
In the first embodiment and the second embodiment, a mode for realizing the coding and decoding of the present invention has been described from the procedural aspect of coding and decoding using a predetermined code tree or a predetermined correspondence table. In the third embodiment, a mode for realizing the coding and decoding of the present invention from the data aspect of a sequence of codes and integer values obtained by these procedures will be described.
≪符号化装置≫
図2及び図3を参照して、第三実施形態の符号化装置300が実行する符号化方法の処理手続きを説明する。第三実施形態の符号化装置300は、図2に示す通り、符号化装置100や符号化装置200と同様、整数符号化部310を含む。第三実施形態の符号化装置300が、符号化装置100や符号化装置200と同様、図3に示す各ステップの処理を実行することにより、第三実施形態の符号化方法が実現される。≪Coding device≫
The processing procedure of the coding method executed by the coding apparatus 300 of the third embodiment will be described with reference to FIGS. 2 and 3. As shown in FIG. 2, the coding device 300 of the third embodiment includes an integer coding unit 310, like the
第三実施形態の符号化装置300には、符号化装置100や符号化装置200と同様に、非負の整数値の系列(以下、「整数系列」という)が入力される。以下では、符号化装置300に入力された非負の整数値を単に「整数値」と呼んで説明する。
Similar to the
[整数符号化部310]
整数符号化部310は、整数系列に含まれる整数値0の2個から2K-1個のうちの予め定めた何れかの個数の連続に対応する符号として1ビットの符号(以下、「符号A」という)を得、整数系列に含まれる、0個から2K-1-1個連続する整数値0と、1個の0以外の整数値x_nと、による組、に対応する符号としてK×x_nビットまたはK×x_n+1ビットの符号(以下、「符号B」という)を得る(S310)。ただし、Kは2以上の自然数である符号化パラメータを表す。具体的には、Nサンプルずつの整数系列x_1, x_2, …, x_Nを、第一実施形態で説明した符号木や第二実施形態で説明した対応表を用いて符号化して、符号Aや符号Bを得る。ここで、符号Aに対応する整数値0の連続に含まれる0の個数をL(2≦L≦2K-1)とすると、S310で得られる符号Bは、整数値0の0個からL-1個、つまり、予め定めた最大で2K-1-1個の連続とそれに後続する1つの0以外の整数値x_nに対応するK×x_nビットまたはK×x_n+1ビットの符号である。[Integer encoding unit 310]
The integer coding unit 310 is a 1-bit code (hereinafter, "code") as a code corresponding to a series of any predetermined number of 2 to 2 K-1 integer values included in the integer series. A ”) is obtained, and K is used as the sign corresponding to the set of 0 to 2 K-1 -1
また、ここで、ビット値“x”はビット値“1”でありビット値“y”はビット値“0”であるとして、符号Aは、ビット値が“x”である1ビットの符号であり(図9B、図10D参照)、符号Bは、1ビット目からKビット目までに少なくとも1つのビット値“x”と少なくとも1つのビット値“y”を含み、かつ、最後からK×(x_n-1)ビットはビット値が“y”である(図9A及び図9B、図10A〜図10D参照)。なお、先述の通り、ビット値“x”はビット値“0”でありビット値“y”はビット値“1”であるとしてもよい。 Further, here, assuming that the bit value “x” is the bit value “1” and the bit value “y” is the bit value “0”, the code A is a 1-bit code in which the bit value is “x”. Yes (see FIGS. 9B and 10D), reference numeral B contains at least one bit value “x” and at least one bit value “y” from the first bit to the Kth bit, and K × (from the end). The x_n-1) bit has a bit value of "y" (see FIGS. 9A and 9B, FIGS. 10A to 10D). As described above, the bit value “x” may be the bit value “0” and the bit value “y” may be the bit value “1”.
さらに、符号Bについては、より詳しくは、整数系列における整数値0の0個から2K-1-1個の2K-1通りの連続個数と、以下の2K-1通りの部分符号の間に一対一の対応関係が存在する。
(符号Bの部分符号)
(1) 符号BがK×x_n+1ビットであるときの、該符号Bの1ビット目からK+1ビット目までのK+1ビットで構成され、1ビット目のビット値が“x”であり、2ビット目からK+1ビット目までのビット値が“y”である、1通りの部分符号
(2) 符号BがK×x_nビットであるときの、該符号Bの1ビット目からKビット目までのKビットで構成され、1ビット目のビット値が“y”であり、2ビット目からKビット目までのK-1ビット中の少なくとも1ビットのビット値が“x”である、2K-1-1通りの部分符号Further, regarding the code B, more specifically, the continuous number of 2 K-1 patterns from 0 to 2 K-1 of the
(Partial code of code B)
(1) When the code B is K × x_n + 1 bits, it is composed of K + 1 bits from the 1st bit to the K + 1 bit of the code B, and the bit value of the 1st bit is “x”. And the bit value from the 2nd bit to the K + 1th bit is "y".
(2) When the code B is K × x_n bits, it is composed of K bits from the first bit to the K bit of the code B, the bit value of the first bit is “y”, and the second bit. 2 K-1 -1 partial code in which the bit value of at least 1 bit in the K-1 bits from to the Kth bit is “x”
≪復号装置≫
図7及び図8を参照して、第三実施形態の復号装置350が実行する復号方法の処理手続きを説明する。第三実施形態の復号装置350は、図7に示す通り、復号装置150や復号装置250と同様、整数復号部360を含む。第三実施形態の復号装置350が、復号装置150や復号装置250と同様、図8に示す各ステップの処理を実行することにより、第三実施形態の復号方法が実現される。≪Decoding device≫
The processing procedure of the decoding method executed by the decoding device 350 of the third embodiment will be described with reference to FIGS. 7 and 8. As shown in FIG. 7, the decoding device 350 of the third embodiment includes an integer decoding unit 360, like the decoding device 150 and the decoding device 250. The decoding method of the third embodiment is realized by the decoding device 350 of the third embodiment executing the processing of each step shown in FIG. 8 in the same manner as the decoding device 150 and the decoding device 250.
第三実施形態の復号装置350には、復号装置150や復号装置250と同様、第三実施形態の符号化装置300が出力した符号列が入力される。以下では、先述した符号化装置の説明と同様に、非負の整数値を単に「整数値」と呼んで説明する。 Similar to the decoding device 150 and the decoding device 250, the decoding device 350 of the third embodiment is input with the code string output by the coding device 300 of the third embodiment. In the following, the non-negative integer value will be simply referred to as an “integer value” and will be described in the same manner as in the description of the coding device described above.
[整数復号部360]
整数復号部360は、入力された符号列に含まれる1ビットの符号(以下「符号A」という)から、整数値0の2個から2K-1個のうちの予め定めた何れかの個数の連続を得、入力された符号列に含まれるK×x_nビットまたはK×x_n+1ビットの符号(以下、「符号B」という)から、0個から2K-1-1個連続する整数値0と、1個の0以外の整数値x_nと、による組を得る(S360)。ただし、Kは2以上の自然数である符号化パラメータを表す。具体的には、入力された符号列に含まれる符号を、第一実施形態で説明した符号木や第二実施形態で説明した対応表を用いて復号して、符号Aや符号Bに対応する上記整数値の系列を得る。ここで、符号Aから得られる整数値0の連続に含まれる0の個数をL(2≦L≦2K-1)とすると、S360で符号Bから得られる整数値0の連続に含まれる0の個数は0個からL-1個となる。[Integer decoding unit 360]
The integer decoding unit 360 is a predetermined number of 2 to 2 K-1
また、ここで、ビット値“x”はビット値“1”でありビット値“y”はビット値“0”であるとして、符号Aは、ビット値が“x”である1ビットの符号であり(図9B、図10D参照)、符号Bは、1ビット目からKビット目までに少なくとも1つのビット値“x”と少なくとも1つのビット値“y”を含み、かつ、最後からK×(x_n-1)ビットはビット値が“y”である(図9A及び図9B、図10A〜図10D参照)。なお、符号化装置300と同様、ビット値“x”はビット値“0”でありビット値“y”はビット値“1”であるとしてもよい。 Further, here, assuming that the bit value “x” is the bit value “1” and the bit value “y” is the bit value “0”, the code A is a 1-bit code in which the bit value is “x”. Yes (see FIGS. 9B and 10D), reference numeral B contains at least one bit value “x” and at least one bit value “y” from the first bit to the Kth bit, and K × (from the end). The x_n-1) bit has a bit value of "y" (see FIGS. 9A and 9B, FIGS. 10A to 10D). As with the encoding device 300, the bit value “x” may be the bit value “0” and the bit value “y” may be the bit value “1”.
整数復号部360は、以下の2つの処理を行うことにより、入力された符号列に含まれる符号Aと符号Bを特定することができる。具体的には、整数復号部360は、入力された符号列の最初から順に、入力された符号列を、連続するKビット(以下、「Kビット列」という)ずつ読みこむことと、読み込まれたKビット列が“y”を含むものであるとき、該“y”を含むKビット列の直前のビットが、前記符号Aまたは前記符号Bの終端のビットであると識別することと、を行う。 The integer decoding unit 360 can specify the code A and the code B included in the input code string by performing the following two processes. Specifically, the integer decoding unit 360 reads the input code string in order from the beginning of the input code string by consecutive K bits (hereinafter referred to as "K bit string"), and reads the input code string. When the K bit string contains "y", the bit immediately preceding the K bit string containing "y" is identified as the terminal bit of the code A or the code B.
さらに、符号Bについては、より詳しくは、以下の2K-1通りの部分符号と、整数復号部360により得られた整数値による系列における整数値0の0個から2K-1-1個の2K-1通りの連続個数との間に一対一の対応関係が存在する。
(符号Bの部分符号)
(1) 符号BがK×x_n+1ビットであるときの、該符号Bの1ビット目からK+1ビット目までのK+1ビットで構成され、1ビット目のビット値が“x”であり、2ビット目からK+1ビット目までのビット値が“y”である、1通りの部分符号
(2) 符号BがK×x_nビットであるときの、該符号Bの1ビット目からKビット目までのKビットで構成され、1ビット目のビット値が“y”であり、2ビット目からKビット目までのK-1ビット中の少なくとも1ビットのビット値が“x”である、2K-1-1通りの部分符号Further, regarding the symbol B, more specifically, the following 2 K-1 partial codes and 0 to 2 K-1 of
(Partial code of code B)
(1) When the code B is K × x_n + 1 bits, it is composed of K + 1 bits from the 1st bit to the K + 1 bit of the code B, and the bit value of the 1st bit is “x”. And the bit value from the 2nd bit to the K + 1th bit is "y".
(2) When the code B is K × x_n bits, it is composed of K bits from the first bit to the K bit of the code B, the bit value of the first bit is “y”, and the second bit. 2 K-1 -1 partial code in which the bit value of at least 1 bit in the K-1 bits from to the Kth bit is “x”
≪符号列のデータ構造≫
第三実施形態の符号化装置及び復号装置が扱う符号列のデータ構造、つまり、第一実施形態及び第二実施形態の符号化装置が整数値の系列から得た符号列であり、第一実施形態及び第二実施形態の復号装置が整数値の系列を得るために用いる符号列のデータ構造について説明する。≪Data structure of code string≫
The data structure of the code string handled by the coding device and the decoding device of the third embodiment, that is, the code string obtained from the sequence of integer values by the coding devices of the first embodiment and the second embodiment, and the first embodiment. The data structure of the code string used by the decoding apparatus of the embodiment and the second embodiment to obtain a sequence of integer values will be described.
[符号列のデータ構造]
非負値である整数値の系列(以下、「整数系列」という)を表す符号列は、整数系列から符号列を得る符号化装置や符号列から整数系列を得る復号装置で用いられるものである。[Data structure of code string]
A code string representing a sequence of integer values that is a non-negative value (hereinafter referred to as "integer sequence") is used in a coding device that obtains a code string from an integer series and a decoding device that obtains an integer series from a code string.
符号列のデータ構造は、整数系列に含まれる整数値0の2個から2K-1個のうちの予め定めた何れかの個数の連続に対応する符号である1ビットの符号(以下、「符号A」という)と、整数系列に含まれる、0個から2K-1-1個連続する整数値0と、1個の0以外の整数値x_nと、による組、に対応する符号であるK×x_nビットまたはK×x_n+1ビットの符号(以下、「符号B」という)と、を含む。ただし、Kは2以上の自然数である符号化パラメータを表す。ここで、符号Aに対応する整数値0の連続に含まれる0の個数をL(2≦L≦2K-1)とすると、符号Bは、整数値0の0個からL-1個、つまり、予め定めた最大で2K-1-1個の連続とそれに後続する1つの0以外の整数値x_nに対応するK×x_nビットまたはK×x_n+1ビットの符号である。The data structure of the code string is a 1-bit code (hereinafter, "1 bit code", which is a code corresponding to any number of consecutive numbers from 2 to 2 K-1 of integer values included in the integer series. It is a sign corresponding to (referred to as "sign A"), a set of 0 to 2 K-1 -1
また、ここで、ビット値“x”はビット値“1”でありビット値“y”はビット値“0”であるとして、符号Aは、ビット値が“x”である1ビットの符号であり(図9B、図10D参照)、符号Bは、1ビット目からKビット目までに少なくとも1つのビット値“x”と少なくとも1つのビット値“y”を含み、かつ、最後からK×(x_n-1)ビットはビット値が“y”である(図9A及び図9B、図10A〜図10D参照)。なお、先述の通り、ビット値“x”はビット値“0”でありビット値“y”はビット値“1”であるとしてもよい。 Further, here, assuming that the bit value “x” is the bit value “1” and the bit value “y” is the bit value “0”, the code A is a 1-bit code in which the bit value is “x”. Yes (see FIGS. 9B and 10D), reference numeral B contains at least one bit value “x” and at least one bit value “y” from the first bit to the Kth bit, and K × (from the end). The x_n-1) bit has a bit value of "y" (see FIGS. 9A and 9B, FIGS. 10A to 10D). As described above, the bit value “x” may be the bit value “0” and the bit value “y” may be the bit value “1”.
さらに、符号Bについては、より詳しくは、整数系列における整数値0の0個から2K-1-1個の2K-1通りの連続個数と、以下の2K-1通りの部分符号の間に一対一の対応関係が存在する。
(符号Bの部分符号)
(1) 符号BがK×x_n+1ビットであるときの、該符号Bの1ビット目からK+1ビット目までのK+1ビットで構成され、1ビット目のビット値が“x”であり、2ビット目からK+1ビット目までのビット値が“y”である、1通りの部分符号
(2) 符号BがK×x_nビットであるときの、該符号Bの1ビット目からKビット目までのKビットで構成され、1ビット目のビット値が“y”であり、2ビット目からKビット目までのK-1ビット中の少なくとも1ビットのビット値が“x”である、2K-1-1通りの部分符号Further, regarding the code B, more specifically, the continuous number of 2 K-1 patterns from 0 to 2 K-1 of the
(Partial code of code B)
(1) When the code B is K × x_n + 1 bits, it is composed of K + 1 bits from the 1st bit to the K + 1 bit of the code B, and the bit value of the 1st bit is “x”. And the bit value from the 2nd bit to the K + 1th bit is "y".
(2) When the code B is K × x_n bits, it is composed of K bits from the first bit to the K bit of the code B, the bit value of the first bit is “y”, and the second bit. 2 K-1 -1 partial code in which the bit value of at least 1 bit in the K-1 bits from to the Kth bit is “x”
本実施形態の発明によれば、零値ではない小さな値も含んで小さな値に大きく偏っている整数値の系列や、非特許文献2の技術では対応しきれないくらいに値の偏った整数値の系列であっても、少ない平均ビット数で符号化することができる。また、そのような符号を復号することができる。
According to the invention of the present embodiment, a series of integer values that are largely biased toward small values, including small values that are not zero values, and integer values that are biased to the extent that the technology of
<第四実施形態>
上述の通り、本発明の符号に用いる符号化パラメータKは、その逆数の対数がGolomb-Rice符号におけるRiceパラメータに対応し、本発明の符号は負値のRiceパラメータに対するGolomb-Rice符号としても解釈できる。従って、従来の最適なRiceパラメータの推定法を基に最適な符号化パラメータKを入力された整数値による系列の部分系列に対して求め、求めた符号化パラメータKを用いた第一実施形態から第三実施形態の整数符号化部の処理をGolomb-Rice符号化と組合せて入力された整数値の系列を符号化してもよく、この符号化に対応する復号を行ってもよい。この形態を第四実施形態として説明する。<Fourth Embodiment>
As described above, the coding parameter K used for the code of the present invention has its reciprocal logarithm corresponding to the Rice parameter in the Golomb-Rice code, and the code of the present invention is also interpreted as a Golomb-Rice code for a negative Rice parameter. it can. Therefore, the optimum coding parameter K is obtained for the sub-series of the series by the input integer value based on the conventional method of estimating the optimum Rice parameter, and from the first embodiment using the obtained coding parameter K. The processing of the integer coding unit of the third embodiment may be combined with Golomb-Rice coding to encode a series of input integer values, or decoding corresponding to this coding may be performed. This embodiment will be described as a fourth embodiment.
≪符号化装置≫
図11及び図12を参照して、第四実施形態の符号化装置400が実行する符号化方法の処理手続きを説明する。第四実施形態の符号化装置400は、図11に示す通り、パラメータ決定部420と整数符号化部410を含む。第四実施形態の符号化装置400が図12に示す各ステップの処理を実行することにより、第四実施形態の符号化方法が実現される。≪Coding device≫
The processing procedure of the coding method executed by the coding apparatus 400 of the fourth embodiment will be described with reference to FIGS. 11 and 12. As shown in FIG. 11, the coding device 400 of the fourth embodiment includes a parameter determining unit 420 and an integer coding unit 410. When the coding apparatus 400 of the fourth embodiment executes the processing of each step shown in FIG. 12, the coding method of the fourth embodiment is realized.
第四実施形態の符号化装置400には、第一から第三実施形態と同様に、非負の整数値の系列が入力される。第四実施形態の符号化装置400に入力された非負の整数値の系列はNサンプルずつパラメータ決定部420と整数符号化部410に入力される。すなわち、第四実施形態の符号化装置400は、例えばマイクロホンで収音した音声や音楽などをディジタル信号に変換して量子化して得た整数値の絶対値による系列などの整数値の系列を、Nサンプルによるフレームごとに符号化する。 A series of non-negative integer values is input to the coding device 400 of the fourth embodiment as in the first to third embodiments. The sequence of non-negative integer values input to the coding apparatus 400 of the fourth embodiment is input to the parameter determination unit 420 and the integer coding unit 410 by N samples at a time. That is, the coding device 400 of the fourth embodiment converts a sequence of integer values such as a sequence of absolute values of integer values obtained by converting voice or music picked up by a microphone into a digital signal and quantizing the sequence. Encode frame by frame with N samples.
以下では、本実施形態の符号化装置に入力された非負の整数値を単に「整数値」と呼んで説明する。 Hereinafter, the non-negative integer value input to the coding apparatus of the present embodiment will be referred to simply as an “integer value” and will be described.
[パラメータ決定部420]
パラメータ決定部420には、符号化装置400に入力された整数値の系列のうちの、Nサンプルずつの整数系列x_1, x_2, …, x_Nが入力される。パラメータ決定部420は、入力された整数系列x_1, x_2, …, x_Nに基づき、その整数系列に対応するRiceパラメータrとそのパラメータを表す符号であるパラメータ符号と、を得て出力する(S420)。パラメータ符号は、復号装置450が当該パラメータ符号を復号することによりパラメータ決定部420が決定したRiceパラメータrを得られるように、Riceパラメータを符号化して得ればよい。[Parameter determination unit 420]
The parameter determination unit 420 is input with an integer sequence x_1, x_2, ..., X_N for each N samples from the sequence of integer values input to the encoding device 400. Based on the input integer sequence x_1, x_2, ..., X_N, the parameter determination unit 420 obtains and outputs the Rice parameter r corresponding to the integer sequence and the parameter code representing the parameter (S420). .. The parameter code may be obtained by encoding the Rice parameter so that the decoding device 450 can obtain the Rice parameter r determined by the parameter determination unit 420 by decoding the parameter code.
パラメータ決定部420は、例えば、入力された整数系列x_1, x_2, …, x_Nに含まれる各整数値を用いて式(5)によりRiceパラメータrを得る。 The parameter determination unit 420 obtains the Rice parameter r by Eq. (5) using each integer value included in the input integer series x_1, x_2, ..., X_N, for example.
式(5)で求まるRiceパラメータrは、整数系列x_1, x_2, …, x_Nについて式(2)により推定されるGolomb-Rice符号化時の総ビット長の推定値を最小化するものである。 The Rice parameter r obtained by Eq. (5) minimizes the estimated value of the total bit length at the time of Golomb-Rice coding estimated by Eq. (2) for the integer series x_1, x_2,…, x_N.
そして、パラメータ決定部420は、例えば、式(5)により得たRiceパラメータrをスカラ量子化して符号を得て、得た符号をパラメータ符号として出力し、当該パラメータ符号に対応するRiceパラメータrの量子化値をRiceパラメータrとして出力する。 Then, the parameter determination unit 420 obtains a code by scalar-quantizing the Rice parameter r obtained by, for example, Eq. (5), outputs the obtained code as a parameter code, and of the Rice parameter r corresponding to the parameter code. Output the quantized value as Rice parameter r.
[整数符号化部410]
整数符号化部410には、符号化装置400に入力された整数値の系列のうちの、Nサンプルずつの整数系列x_1, x_2, …, x_Nと、パラメータ決定部420が出力したRiceパラメータrが入力される。整数符号化部410は、Riceパラメータrが非負値である場合には、Riceパラメータrの小数第一位を四捨五入するなどによりRiceパラメータrを丸めて整数値にした後に、整数系列x_1, x_2, …, x_Nに対して整数値のRiceパラメータrによるGolomb-Rice符号化を行って、Golomb-Rice符号化により得た符号を整数符号として出力し、Riceパラメータrが負値である場合には、RiceパラメータrからK=2-rによりKの値を得て、得たKの値の小数第一位を四捨五入するなどによりKの値を丸めて整数値にすることで符号化パラメータKを得て、得た符号化パラメータKを用いて第一から第三実施形態の整数符号化部の何れかの処理と同じ処理により整数符号を得て出力する(S410)。なお、符号化パラメータKが1と2の間の値である場合には、例えば、丸め後の整数値を2とすればよい。[Integer encoding unit 410]
The integer coding unit 410 contains an integer series x_1, x_2, ..., x_N for each N sample of the integer value series input to the coding device 400, and a Rice parameter r output by the parameter determination unit 420. Entered. When the Rice parameter r is a non-negative value, the integer coding unit 410 rounds the Rice parameter r to an integer value by rounding off the first decimal place of the Rice parameter r, and then rounds the Rice parameter r to an integer value, and then the integer series x_1, x_2, …, Golomb-Rice coding is performed on x_N with the integer value Rice parameter r, and the code obtained by Golomb-Rice coding is output as an integer code. If the Rice parameter r is a negative value, Obtain the value of K from the Rice parameter r by K = 2 -r, and round the value of K to an integer value by rounding off the first decimal place of the obtained value of K to obtain the coded parameter K. Then, using the obtained coding parameter K, an integer code is obtained and output by the same processing as any of the processing of the integer coding unit of the first to third embodiments (S410). When the coding parameter K is a value between 1 and 2, for example, the rounded integer value may be 2.
≪復号装置≫
図13及び図14を参照して、第四実施形態の復号装置450が実行する復号方法の処理手続きを説明する。第四実施形態の復号装置450は、図13に示す通り、パラメータ復号部470と整数復号部460を含む。第四実施形態の復号装置450が図14に示す各ステップの処理を実行することにより、第四実施形態の復号方法が実現される。≪Decoding device≫
The processing procedure of the decoding method executed by the decoding apparatus 450 of the fourth embodiment will be described with reference to FIGS. 13 and 14. As shown in FIG. 13, the decoding device 450 of the fourth embodiment includes a parameter decoding unit 470 and an integer decoding unit 460. The decoding method of the fourth embodiment is realized by the decoding device 450 of the fourth embodiment executing the processing of each step shown in FIG.
第四実施形態の復号装置450には、第四実施形態の符号化装置400が出力した整数符号、及びパラメータ符号が入力される。復号装置450に入力された整数符号及びパラメータ符号は、整数値の系列のNサンプルに対応する符号ごとにパラメータ復号部470と整数復号部460に入力される。すなわち、復号装置450は、符号化装置400と同じフレームごとに復号処理を行う。 The integer code and the parameter code output by the coding device 400 of the fourth embodiment are input to the decoding device 450 of the fourth embodiment. The integer code and the parameter code input to the decoding device 450 are input to the parameter decoding unit 470 and the integer decoding unit 460 for each code corresponding to the N sample of the integer value series. That is, the decoding device 450 performs the decoding process for each same frame as the coding device 400.
[パラメータ復号部470]
パラメータ復号部470には、復号装置450に入力されたパラメータ符号が入力される。パラメータ復号部470は、パラメータ決定部420がパラメータ符号を得たのと対応する復号処理により、パラメータ符号を復号してRiceパラメータrを得て出力する(S470)。パラメータ復号部470は、例えば、符号化装置400のパラメータ決定部420が行ったスカラ量子化に対応する復号処理により、パラメータ符号に対応するRiceパラメータrの量子化値をRiceパラメータrとして得て出力する。[Parameter decoding unit 470]
The parameter code input to the decoding device 450 is input to the parameter decoding unit 470. The parameter decoding unit 470 decodes the parameter code by the decoding process corresponding to the parameter code obtained by the parameter determination unit 420 to obtain the Rice parameter r and output it (S470). The parameter decoding unit 470 obtains and outputs the quantization value of the Rice parameter r corresponding to the parameter code as the Rice parameter r by, for example, the decoding process corresponding to the scalar quantization performed by the parameter determination unit 420 of the coding device 400. To do.
[整数復号部460]
整数復号部460には、復号装置450に入力された整数符号と、パラメータ復号部470が出力したRiceパラメータrが入力される。整数復号部460は、Riceパラメータrが非負値である場合には、Riceパラメータrを符号化装置400の整数符号化部410が行ったのと同じ方法により丸めて整数値にした後に整数符号に対してRiceパラメータrによるGolomb-Rice復号を行って整数系列x_1, x_2, …, x_Nを得て出力し、Riceパラメータrが負値である場合には、第四実施形態の整数符号化部410と同じ処理でRiceパラメータrを符号化パラメータKに変換して得て、すなわち、RiceパラメータrからK=2-rによりKの値を得て、符号化装置400の整数符号化部410が行ったのと同じ方法によりKの値を丸めて整数値にすることで符号化パラメータKを得て、得た符号化パラメータKを用いて第一から第三実施形態の整数復号部の何れかの処理と同じの処理により整数系列x_1, x_2, …, x_Nを得て出力する(S460)。[Integer decoding unit 460]
The integer code input to the decoding device 450 and the Rice parameter r output by the parameter decoding unit 470 are input to the integer decoding unit 460. When the Rice parameter r is a non-negative value, the integer decoding unit 460 rounds the Rice parameter r into an integer value by the same method as that performed by the integer coding unit 410 of the encoding device 400, and then converts the Rice parameter r into an integer code. On the other hand, Golomb-Rice decoding by the Rice parameter r is performed to obtain an integer sequence x_1, x_2,…, x_N and output. If the Rice parameter r is a negative value, the integer coding unit 410 of the fourth embodiment is obtained. The Rice parameter r is converted to the coding parameter K by the same processing as in the above, that is, the value of K is obtained from the Rice parameter r by K = 2-r , and the integer coding unit 410 of the coding device 400 performs the process. A coding parameter K is obtained by rounding the value of K to an integer value by the same method as in the above, and using the obtained coding parameter K, any one of the integer decoding units of the first to third embodiments. Integer series x_1, x_2, ..., x_N are obtained and output by the same processing as the processing (S460).
<第四実施形態の変形例1>
第四実施形態では、Golomb-Rice符号化・復号と組み合わせた符号化・復号処理を行ったが、Golomb-Rice符号化・復号と組み合わせないでもよい。Golomb-Rice符号化・復号と組み合わせない形態を第四実施形態の変形例1として説明する。符号化装置401のパラメータ決定部421と復号装置451のパラメータ復号部471の動作は第四実施形態と同じであり、符号化装置401の整数符号化部411と復号装置451の整数復号部461の動作が第四実施形態とは異なる。<
In the fourth embodiment, the coding / decoding process combined with the Golomb-Rice coding / decoding is performed, but it may not be combined with the Golomb-Rice coding / decoding. A form that is not combined with Golomb-Rice coding / decoding will be described as a
[整数符号化部411]
整数符号化部411には、符号化装置401に入力された整数値の系列のうちの、Nサンプルずつの整数系列x_1, x_2, …, x_Nと、パラメータ決定部421が出力したRiceパラメータrが入力される。整数符号化部411は、Riceパラメータrが非負値である場合には、2を符号化パラメータKとして用いて、第一から第三実施形態の整数符号化部の何れかの処理と同じ処理により整数符号を得て出力し、Riceパラメータrが負値である場合には、RiceパラメータrからK=2-rによりKの値を得て、得たKの値の小数第一位を四捨五入するなどによりKの値を丸めて整数値にすることで符号化パラメータKを得、得た符号化パラメータKを用いて第一から第三実施形態の整数符号化部の何れかの処理と同じ処理により整数符号を得て出力する(S411)。なお、符号化パラメータKが1と2の間の値である場合には、例えば、丸め後の整数値を2とすればよい。[Integer encoding unit 411]
The integer coding unit 411 contains the integer series x_1, x_2, ..., x_N for each N sample of the integer value series input to the coding device 401, and the Rice parameter r output by the parameter determination unit 421. Entered. When the Rice parameter r is a non-negative value, the integer coding unit 411 uses 2 as the coding parameter K and performs the same processing as any of the processing of the integer coding unit of the first to third embodiments. When the integer code is obtained and output, and the Rice parameter r is a negative value, the value of K is obtained from the Rice parameter r by K = 2 -r, and the first decimal place of the obtained K value is rounded off. The coded parameter K is obtained by rounding the value of K to an integer value, and the obtained coded parameter K is used to perform the same process as any of the integer coding parts of the first to third embodiments. To obtain an integer code and output it (S411). When the coding parameter K is a value between 1 and 2, for example, the rounded integer value may be 2.
[整数復号部461]
整数復号部461には、復号装置451に入力された整数符号と、パラメータ復号部471が出力したRiceパラメータrが入力される。整数復号部461は、Riceパラメータrが非負値である場合には、2を符号化パラメータKとして用いて、第一から第三実施形態の整数復号部の何れかの処理と同じの処理により整数系列x_1, x_2, …, x_Nを得て出力し、Riceパラメータrが負値である場合には、第四実施形態の整数符号化部410と同じ処理でRiceパラメータrを符号化パラメータKに変換して得て、すなわち、RiceパラメータrからK=2-rによりKの値を得て、符号化装置401の整数符号化部411が行ったのと同じ方法によりKの値を丸めて整数値にすることで符号化パラメータKを得て、得た符号化パラメータKを用いて第一から第三実施形態の整数復号部の何れかの処理と同じの処理により整数系列x_1, x_2, …, x_Nを得て出力する(S461)。[Integer decoding unit 461]
The integer code input to the decoding device 451 and the Rice parameter r output by the parameter decoding unit 471 are input to the integer decoding unit 461. When the Rice parameter r is a non-negative value, the integer decoding unit 461 uses 2 as the coding parameter K and performs the same processing as any of the processing of the integer decoding unit of the first to third embodiments to perform an integer. When the series x_1, x_2, ..., x_N are obtained and output, and the Rice parameter r is a negative value, the Rice parameter r is converted to the coding parameter K by the same processing as the integer coding unit 410 of the fourth embodiment. That is, the value of K is obtained from the Rice parameter r by K = 2- r , and the value of K is rounded to an integer value by the same method as that performed by the integer coding unit 411 of the encoder 401. Then, the coding parameter K is obtained, and the obtained coding parameter K is used to perform the same processing as any of the processing of the integer decoding unit of the first to third embodiments to perform the integer series x_1, x_2, ..., Obtain x_N and output it (S461).
<第四実施形態の変形例2>
第四実施形態では、整数符号化部410においてRiceパラメータrが負値である場合にRiceパラメータrから符号化パラメータKを得る構成としていたが、パラメータ決定部420においてRiceパラメータrが負値である場合に整数系列から符号化パラメータKを直接得る構成としてもよい。この形態を第四実施形態の変形例2として、第四実施形態と異なる部分について説明する。<
In the fourth embodiment, the integer coding unit 410 has a configuration in which the coding parameter K is obtained from the Rice parameter r when the Rice parameter r has a negative value, but the parameter determining unit 420 has a negative value for the Rice parameter r. In some cases, the coding parameter K may be obtained directly from the integer sequence. This embodiment will be described as a
[パラメータ決定部422]
第四実施形態のパラメータ決定部420は、Riceパラメータの値に関わらず、Riceパラメータと当該Riceパラメータに対応するパラメータ符号とを必ず出力する構成であったが、第四実施形態の変形例2のパラメータ決定部422は、Riceパラメータrが非負値である場合には、Riceパラメータrと当該Riceパラメータrに対応するパラメータ符号とを出力し、Riceパラメータrが負値である場合には、後述する式(6)により整数系列から符号化パラメータKを得て、符号化パラメータKと当該符号化パラメータKに対応するパラメータ符号とを出力する(S422)。その際、パラメータ符号は、対応する復号装置452がRiceパラメータrの値と符号化パラメータKの値を一意に特定可能な符号とすればよい。例えば、Riceパラメータrを符号化して得た符号の前に1ビットの符号’1’を付したものをパラメータ符号とし、符号化パラメータKを符号化して得た符号の前に1ビットの符号’0’を付したものをパラメータ符号とするなどにより、Riceパラメータrに割り当てるパラメータ符号の符号群と、符号化パラメータKに割り当てる符号群とに同じ符号が含まれないようにすればよい。[Parameter determination unit 422]
The parameter determination unit 420 of the fourth embodiment is configured to always output the Rice parameter and the parameter code corresponding to the Rice parameter regardless of the value of the Rice parameter. The parameter determination unit 422 outputs the Rice parameter r and the parameter code corresponding to the Rice parameter r when the Rice parameter r has a non-negative value, and will be described later when the Rice parameter r has a negative value. The coding parameter K is obtained from the integer sequence according to the equation (6), and the coding parameter K and the parameter code corresponding to the coding parameter K are output (S422). At that time, the parameter code may be a code that allows the corresponding decoding device 452 to uniquely identify the value of the Rice parameter r and the value of the coding parameter K. For example, a code obtained by encoding the Rice parameter r with a 1-bit code '1' added to the parameter code is used as a parameter code, and a code obtained by encoding the coding parameter K is preceded by a 1-bit code'. The code group of the parameter code assigned to the Rice parameter r and the code group assigned to the coding parameter K may not include the same code by using the one with 0'as the parameter code.
[整数符号化部412]
整数符号化部412には、符号化装置402に入力された整数値の系列のうちの、Nサンプルずつの整数系列x_1, x_2, …, x_Nと、パラメータ決定部422が出力したRiceパラメータrまたは符号化パラメータKが入力される。整数符号化部412は、Riceパラメータrが入力された場合には、Riceパラメータrを丸めて整数値にし、整数系列x_1, x_2, …, x_Nに対して整数値のRiceパラメータrによるGolomb-Rice符号化を行って、Golomb-Rice符号化により得た符号を整数符号として出力し、符号化パラメータKが入力された場合には、符号化パラメータKを丸めて整数値にし、整数値の符号化パラメータKを用いて第一から第三実施形態の整数符号化部の何れかの処理と同じ処理により整数符号を得て出力する(S412)。なお、符号化パラメータKが1と2の間の値である場合には、例えば、丸め後の整数値を2とすればよい。[Integer encoding unit 412]
The integer coding unit 412 includes an integer series x_1, x_2, ..., x_N for each N sample of the integer value series input to the coding device 402, and the Rice parameter r or the Rice parameter r output by the parameter determination unit 422. The coding parameter K is entered. When the Rice parameter r is input, the integer coding unit 412 rounds the Rice parameter r to an integer value, and Golomb-Rice by the integer value Rice parameter r for the integer series x_1, x_2,…, x_N. Encoding is performed, and the code obtained by Golomb-Rice coding is output as an integer code. When the coding parameter K is input, the coding parameter K is rounded to an integer value and the integer value is encoded. Using the parameter K, an integer code is obtained and output by the same process as any of the processes of the integer coding unit of the first to third embodiments (S412). When the coding parameter K is a value between 1 and 2, for example, the rounded integer value may be 2.
[パラメータ復号部472]
第四実施形態のパラメータ復号部470はパラメータ符号を復号してRiceパラメータを得るものであったが、第四実施形態の変形例2のパラメータ復号部472は、パラメータ符号を復号してRiceパラメータrまたは符号化パラメータKを得て出力する(S472)。[Parameter decoding unit 472]
The parameter decoding unit 470 of the fourth embodiment decodes the parameter code to obtain the Rice parameter, whereas the
[整数復号部462]
整数復号部462には、復号装置452に入力された整数符号と、パラメータ復号部472が出力したRiceパラメータrまたは符号化パラメータKが入力される。整数復号部462は、Riceパラメータrが入力された場合には、Riceパラメータrを符号化装置402の整数符号化部412が行ったのと同じ方法により丸めて整数値にした後に、整数符号に対して整数値のRiceパラメータrによるGolomb-Rice復号を行って整数系列x_1, x_2, …, x_Nを得て出力し、符号化パラメータKが入力された場合には、符号化パラメータKを符号化装置402の整数符号化部412が行ったのと同じ方法により丸めて整数値にした後に、整数値の符号化パラメータKを用いて第一から第三実施形態の整数復号部の何れかの処理と同じの処理により整数系列x_1, x_2, …, x_Nを得て出力する(S462)。[Integer decoding unit 462]
The integer code input to the decoding device 452 and the Rice parameter r or the coding parameter K output by the
<第五実施形態>
第四実施形態の符号化装置では、まずRiceパラメータrを求めて、求めたRiceパラメータrから符号化パラメータKを求めていたが、符号化パラメータKを、本発明の符号が最適な分布p(x,1/K)に対して尤もらしいKを推定することにより、入力された整数値の系列から直接推定してもよい。この場合、Golomb-Rice符号は1以下の値をとるKによる本発明の符号と解釈することができる。従って、最適な符号化パラメータKを入力された整数値による系列の部分系列から直接求め、求めた符号化パラメータKを用いた第一実施形態から第三実施形態の整数符号化部の処理をGolomb-Rice符号化と組合せて入力された整数値の系列を符号化してもよく、この符号化に対応する復号を行ってもよい。この形態を第五実施形態として説明する。<Fifth Embodiment>
In the coding apparatus of the fourth embodiment, the Rice parameter r was first obtained, and the coding parameter K was obtained from the obtained Rice parameter r. However, the coding parameter K is the distribution p in which the code of the present invention is optimal. By estimating a plausible K for x, 1 / K), it may be estimated directly from the sequence of input integer values. In this case, the Golomb-Rice code can be interpreted as the code of the present invention by K having a value of 1 or less. Therefore, the optimum coding parameter K is directly obtained from the sub-series of the series of input integer values, and the processing of the integer coding unit of the first to third embodiments using the obtained coding parameter K is Golomb. A series of input integer values may be encoded in combination with -Rice coding, or decoding corresponding to this coding may be performed. This embodiment will be described as the fifth embodiment.
≪符号化装置≫
図11及び図12を参照して、第五実施形態の符号化装置500が実行する符号化方法の処理手続きを説明する。第五実施形態の符号化装置500は、図11に示す通り、パラメータ決定部520と整数符号化部510を含む。第五実施形態の符号化装置500が図12に示す各ステップの処理を実行することにより、第五実施形態の符号化方法が実現される。≪Coding device≫
The processing procedure of the coding method executed by the coding apparatus 500 of the fifth embodiment will be described with reference to FIGS. 11 and 12. As shown in FIG. 11, the coding device 500 of the fifth embodiment includes a parameter determining unit 520 and an integer coding unit 510. The coding method of the fifth embodiment is realized by the coding device 500 of the fifth embodiment executing the processing of each step shown in FIG.
第五実施形態の符号化装置500には、第一から第四実施形態と同様に、非負の整数値の系列が入力される。第五実施形態の符号化装置500に入力された非負の整数値の系列はNサンプルずつパラメータ決定部520と整数符号化部510に入力される。すなわち、第五実施形態の符号化装置500は、例えばマイクロホンで収音した音声や音楽などをディジタル信号に変換して量子化して得た整数値の絶対値による系列などの整数値の系列を、Nサンプルによるフレームごとに符号化する。 A series of non-negative integer values is input to the coding device 500 of the fifth embodiment as in the first to fourth embodiments. The sequence of non-negative integer values input to the coding apparatus 500 of the fifth embodiment is input to the parameter determination unit 520 and the integer coding unit 510 for each N samples. That is, the coding device 500 of the fifth embodiment converts a sequence of integer values such as a sequence of absolute values of integer values obtained by converting voice or music picked up by a microphone into a digital signal and quantizing the sequence. Encode frame by frame with N samples.
以下では、本実施形態の符号化装置に入力された非負の整数値を単に「整数値」と呼んで説明する。 Hereinafter, the non-negative integer value input to the coding apparatus of the present embodiment will be referred to simply as an “integer value” and will be described.
[パラメータ決定部520]
パラメータ決定部520には、符号化装置500に入力された整数値の系列のうちの、Nサンプルずつの整数系列x_1, x_2, …, x_Nが入力される。パラメータ決定部520は、入力された整数系列x_1, x_2, …, x_Nに基づき、その整数系列に対応する符号化パラメータKとそのパラメータを表す符号であるパラメータ符号と、を得て出力する(S520)。パラメータ符号は、復号装置550が当該パラメータ符号を復号することによりパラメータ決定部520が決定した符号化パラメータKを得られるように、符号化パラメータKを符号化して得ればよい。[Parameter determination unit 520]
The parameter determination unit 520 is input with an integer sequence x_1, x_2, ..., X_N for each N sample of the integer sequence input to the coding apparatus 500. Based on the input integer sequence x_1, x_2, ..., X_N, the parameter determination unit 520 obtains and outputs the coding parameter K corresponding to the integer sequence and the parameter code representing the parameter (S520). ). The parameter code may be obtained by encoding the coding parameter K so that the decoding device 550 can obtain the coding parameter K determined by the parameter determination unit 520 by decoding the parameter code.
パラメータ決定部520は、例えば、入力された整数系列x_1, x_2, …, x_Nに含まれる各整数値を用いて式(6)により符号化パラメータKを得る。式(4)を基に分布p(x,1/K)に対する整数系列x_1, x_2, …, x_Nの対数尤度を求め、次式のように対数尤度を最大化する符号化パラメータKを得て出力する。 The parameter determination unit 520 obtains the coded parameter K by the equation (6) using, for example, each integer value included in the input integer series x_1, x_2, ..., X_N. Find the log-likelihood of the integer series x_1, x_2,…, x_N for the distribution p (x, 1 / K) based on equation (4), and set the coding parameter K that maximizes the log-likelihood as shown in the following equation. Get and output.
式(6)で求まる符号化パラメータKは、整数系列x_1, x_2, …, x_Nについての式(4)に基づく分布p(x,1/K)に対する対数尤度を最大化するものである。 The coding parameter K obtained by Eq. (6) maximizes the log-likelihood for the distribution p (x, 1 / K) based on Eq. (4) for the integer series x_1, x_2,…, x_N.
そして、パラメータ決定部520は、例えば、式(6)により得た符号化パラメータKをスカラ量子化して符号を得て、得た符号をパラメータ符号として出力し、当該パラメータ符号に対応する符号化パラメータKの量子化値を符号化パラメータKとして出力する。 Then, the parameter determination unit 520, for example, scalar-quantizes the coding parameter K obtained by the equation (6) to obtain a code, outputs the obtained code as a parameter code, and outputs a coding parameter corresponding to the parameter code. The quantization value of K is output as the coding parameter K.
[整数符号化部510]
整数符号化部510には、符号化装置500に入力された整数値の系列のうちの、Nサンプルずつの整数系列x_1, x_2, …, x_Nと、パラメータ決定部520が出力した符号化パラメータKが入力される。整数符号化部510は、符号化パラメータKが1以下である場合には、符号化パラメータKからr=-log2Kによりrの値を得て、得たrの値の小数第一位を四捨五入するなどによりrの値を丸めて整数値にすることでRiceパラメータrを得て、得たRiceパラメータrを用いて整数系列x_1, x_2, …, x_Nに対してRiceパラメータrによるGolomb-Rice符号化を行って、Golomb-Rice符号化により得た符号を整数符号として出力し、符号化パラメータKが1よりも大きい場合には、符号化パラメータKの小数第一位を四捨五入するなどによりKの値を丸めて整数値にした後に、整数値の符号化パラメータKを用いて第一から第三実施形態の整数符号化部の何れかの処理と同じ処理により整数符号を得て出力する(S510)。なお、符号化パラメータKが1と2の間の値である場合には、例えば、丸め後の整数値を2とすればよい。[Integer encoding unit 510]
The integer coding unit 510 includes integer series x_1, x_2, ..., x_N for each N sample of the integer value series input to the coding device 500, and the coding parameter K output by the parameter determination unit 520. Is entered. When the coding parameter K is 1 or less, the integer coding unit 510 obtains the value of r from the coding parameter K by r = -log 2 K, and obtains the first decimal place of the obtained value of r. The Rice parameter r is obtained by rounding the value of r to an integer value by rounding, etc., and the obtained Rice parameter r is used for the integer series x_1, x_2,…, x_N with respect to the Golomb-Rice by the Rice parameter r. Encoding is performed, and the code obtained by Golomb-Rice coding is output as an integer code. If the coding parameter K is larger than 1, the first decimal place of the coding parameter K is rounded off to K. After rounding the value of to an integer value, an integer code is obtained and output by the same process as any of the processes of the integer coding unit of the first to third embodiments using the integer value coding parameter K (. S510). When the coding parameter K is a value between 1 and 2, for example, the rounded integer value may be 2.
≪復号装置≫
図13及び図14を参照して、第五実施形態の復号装置550が実行する復号方法の処理手続きを説明する。第五実施形態の復号装置550は、図13に示す通り、パラメータ復号部570と整数復号部560を含む。第五実施形態の復号装置550が図14に示す各ステップの処理を実行することにより、第五実施形態の復号方法が実現される。≪Decoding device≫
The processing procedure of the decoding method executed by the decoding apparatus 550 of the fifth embodiment will be described with reference to FIGS. 13 and 14. As shown in FIG. 13, the decoding device 550 of the fifth embodiment includes a parameter decoding unit 570 and an integer decoding unit 560. The decoding method of the fifth embodiment is realized by the decoding device 550 of the fifth embodiment executing the processing of each step shown in FIG.
第五実施形態の復号装置550には、第五実施形態の符号化装置500が出力した整数符号、及びパラメータ符号が入力される。復号装置550に入力された整数符号及びパラメータ符号は、整数値の系列のNサンプルに対応する符号ごとにパラメータ復号部570と整数復号部560に入力される。すなわち、復号装置550は、符号化装置500と同じフレームごとに復号処理を行う。 The integer code and the parameter code output by the coding device 500 of the fifth embodiment are input to the decoding device 550 of the fifth embodiment. The integer code and the parameter code input to the decoding device 550 are input to the parameter decoding unit 570 and the integer decoding unit 560 for each code corresponding to the N sample of the integer value series. That is, the decoding device 550 performs the decoding process for each same frame as the coding device 500.
[パラメータ復号部570]
パラメータ復号部570には、復号装置550に入力されたパラメータ符号が入力される。パラメータ復号部570は、パラメータ決定部520がパラメータ符号を得たのと対応する復号処理により、パラメータ符号を復号して符号化パラメータKを得て出力する(S570)。パラメータ復号部570は、例えば、符号化装置500のパラメータ決定部520が行ったスカラ量子化に対応する復号処理により、パラメータ符号に対応する符号化パラメータKの量子化値を符号化パラメータKとして得て出力する。[Parameter decoding unit 570]
The parameter code input to the decoding device 550 is input to the parameter decoding unit 570. The parameter decoding unit 570 decodes the parameter code by the decoding process corresponding to the parameter determination unit 520 obtaining the parameter code, obtains the coded parameter K, and outputs the code (S570). The parameter decoding unit 570 obtains the quantization value of the coding parameter K corresponding to the parameter code as the coding parameter K by, for example, the decoding process corresponding to the scalar quantization performed by the parameter determining unit 520 of the coding device 500. And output.
[整数復号部560]
整数復号部560には、復号装置550に入力された整数符号と、パラメータ復号部570が出力した符号化パラメータKが入力される。整数復号部560は、符号化パラメータKが1以下である場合には、第五実施形態の整数符号化部510と同じ処理で符号化パラメータKをRiceパラメータrに変換して得て、すなわち、符号化パラメータKからr=-log2Kによりrの値を得て、符号化装置500の整数符号化部510が行ったのと同じ方法によりrの値を丸めて整数値にすることでRiceパラメータrを得て、得たRiceパラメータrを用いて整数符号に対してRiceパラメータrによるGolomb-Rice復号を行って整数系列x_1, x_2, …, x_Nを得て出力し、符号化パラメータKが1よりも大きい場合には、符号化パラメータKを符号化装置500の整数符号化部510が行ったのと同じ方法により丸めて整数値にした後に、整数値の符号化パラメータKを用いて第一から第三実施形態の整数復号部の何れかの処理と同じ処理により整数系列x_1, x_2, …, x_Nを得て出力する(S560)。[Integer decoding unit 560]
The integer code input to the decoding device 550 and the coding parameter K output by the parameter decoding unit 570 are input to the integer decoding unit 560. When the coding parameter K is 1 or less, the integer decoding unit 560 is obtained by converting the coding parameter K into the Rice parameter r by the same processing as the integer coding unit 510 of the fifth embodiment, that is, The value of r is obtained from the coding parameter K by r = -log 2 K, and the value of r is rounded to an integer value by the same method as that performed by the integer coding unit 510 of the encoding device 500. Obtain the parameter r, use the obtained Rice parameter r to perform Golomb-Rice decoding with the Rice parameter r for the integer code, obtain the integer series x_1, x_2,…, x_N and output it, and the encoding parameter K is If it is larger than 1, the coding parameter K is rounded to an integer value by the same method used by the integer coding unit 510 of the coding device 500, and then the integer value coding parameter K is used. The integer series x_1, x_2, ..., X_N are obtained and output by the same processing as any of the processing of the integer decoding unit of the first to third embodiments (S560).
<第五実施形態の変形例1>
第五実施形態では、Golomb-Rice符号化・復号と組み合わせた符号化・復号処理を行ったが、Golomb-Rice符号化・復号と組み合わせないでもよい。Golomb-Rice符号化・復号と組み合わせない形態を第五実施形態の変形例1として説明する。符号化装置501のパラメータ決定部521と復号装置551のパラメータ復号部571の動作は第五実施形態と同じであり、符号化装置501の整数符号化部511と復号装置551の整数復号部561の動作が第五実施形態とは異なる。<
In the fifth embodiment, the coding / decoding process combined with the Golomb-Rice coding / decoding is performed, but it may not be combined with the Golomb-Rice coding / decoding. A form that is not combined with Golomb-Rice coding / decoding will be described as a
[整数符号化部511]
整数符号化部511には、符号化装置501に入力された整数値の系列のうちの、Nサンプルずつの整数系列x_1, x_2, …, x_Nと、パラメータ決定部521が出力した符号化パラメータKが入力される。整数符号化部511は、入力された符号化パラメータKの小数第一位を四捨五入するなどによりKの値を丸めて整数値にした後に、整数値の符号化パラメータKが1以下である場合には、2を符号化パラメータKとして用いて、第一から第三実施形態の整数符号化部の何れかの処理と同じ処理により整数符号を得て出力し、整数値の符号化パラメータKが1よりも大きい場合には、整数値の符号化パラメータKを用いて第一から第三実施形態の整数符号化部の何れかの処理と同じ処理により整数符号を得て出力する(S511)。[Integer encoding unit 511]
The integer coding unit 511 includes an integer series x_1, x_2, ..., X_N for each N sample of the integer value series input to the coding device 501, and a coding parameter K output by the parameter determination unit 521. Is entered. The integer coding unit 511 rounds the value of K to an integer value by rounding off the first decimal place of the input coding parameter K, and then rounds the value to an integer value, and then the integer value coding parameter K is 1 or less.
[整数復号部561]
整数復号部561には、復号装置551に入力された整数符号と、パラメータ復号部571が出力した符号化パラメータKが入力される。整数復号部561は、入力された符号化パラメータKを符号化装置501の整数符号化部511が行ったのと同じ方法により丸めて整数値にした後に、整数値の符号化パラメータKが1以下である場合には、2を符号化パラメータKとして用いて、第一から第三実施形態の整数復号部の何れかの処理と同じ処理により整数系列x_1, x_2, …, x_Nを得て出力し、整数値の符号化パラメータKが1よりも大きい場合には、整数値の符号化パラメータKを用いて第一から第三実施形態の整数復号部の何れかの処理と同じ処理により整数系列x_1, x_2, …, x_Nを得て出力する(S561)。[Integer decoding unit 561]
The integer code input to the decoding device 551 and the coding parameter K output by the parameter decoding unit 571 are input to the integer decoding unit 561. The integer decoding unit 561 rounds the input coding parameter K into an integer value by the same method as that performed by the integer coding unit 511 of the encoding device 501, and then the integer value coding parameter K is 1 or less. If, 2 is used as the coding parameter K, and the integer series x_1, x_2, ..., x_N are obtained and output by the same processing as any of the processing of the integer decoding unit of the first to third embodiments. , When the integer value coding parameter K is larger than 1, the integer series x_1 is performed by the same processing as any of the processing of the integer decoding unit of the first to third embodiments using the integer value coding parameter K. , X_2,…, x_N are obtained and output (S561).
<第五実施形態の変形例2>
第五実施形態では、整数符号化部510において符号化パラメータKが1以下である場合に符号化パラメータKからRiceパラメータrを得る構成としていたが、パラメータ決定部520において符号化パラメータKが1以下である場合に整数系列からRiceパラメータrを直接得る構成としてもよい。この形態を第五実施形態の変形例2として、第五実施形態と異なる部分について説明する。<
In the fifth embodiment, the integer coding unit 510 has a configuration in which the Rice parameter r is obtained from the coding parameter K when the coding parameter K is 1 or less, but the parameter determination unit 520 has a coding parameter K of 1 or less. In the case of, the Rice parameter r may be obtained directly from the integer sequence. This form will be described as a
[パラメータ決定部522]
第五実施形態のパラメータ決定部520は、符号化パラメータKの値に関わらず、符号化パラメータKと当該符号化パラメータKに対応するパラメータ符号とを必ず出力する構成であったが、第五実施形態の変形例2のパラメータ決定部522は、符号化パラメータKが1よりも大きい場合には、符号化パラメータKと当該符号化パラメータKに対応するパラメータ符号とを出力し、符号化パラメータKが1以下である場合には、式(5)により整数系列からRiceパラメータrを得て、Riceパラメータrと当該Riceパラメータrに対応するパラメータ符号とを出力する(S522)。その際、第四実施形態の変形例2と同様に、パラメータ符号は、対応する復号装置552がRiceパラメータrの値と符号化パラメータKの値を一意に特定可能な符号とすればよい。[Parameter determination unit 522]
The parameter determination unit 520 of the fifth embodiment is configured to always output the coding parameter K and the parameter code corresponding to the coding parameter K regardless of the value of the coding parameter K. When the coding parameter K is larger than 1, the parameter determination unit 522 of the modified example 2 of the form outputs the coding parameter K and the parameter code corresponding to the coding parameter K, and the coding parameter K becomes If it is 1 or less, the Rice parameter r is obtained from the integer sequence by the equation (5), and the Rice parameter r and the parameter code corresponding to the Rice parameter r are output (S522). At that time, as in the modified example 2 of the fourth embodiment, the parameter code may be a code that allows the corresponding decoding device 552 to uniquely identify the value of the Rice parameter r and the value of the coding parameter K.
[整数符号化部512]
整数符号化部512には、符号化装置502に入力された整数値の系列のうちの、Nサンプルずつの整数系列x_1, x_2, …, x_Nと、パラメータ決定部522が出力した符号化パラメータKまたはRiceパラメータrが入力される。整数符号化部512は、Riceパラメータrが入力された場合には、Riceパラメータrの値を丸めて整数値にした後に、整数系列x_1, x_2, …, x_Nに対して整数値のRiceパラメータrによるGolomb-Rice符号化を行って、Golomb-Rice符号化により得た符号を整数符号として出力し、符号化パラメータKが入力された場合には、符号化パラメータKを丸めて整数値にした後に、整数値の符号化パラメータKを用いて第一から第三実施形態の整数符号化部の何れかの処理と同じ処理により整数符号を得て出力する(S512)。なお、符号化パラメータKが1と2の間の値である場合には、例えば、丸め後の整数値を2とすればよい。[Integer encoding unit 512]
The integer coding unit 512 includes integer series x_1, x_2, ..., x_N for each N sample of the series of integer values input to the coding device 502, and the coding parameter K output by the parameter determination unit 522. Alternatively, the Rice parameter r is entered. When the Rice parameter r is input, the integer coding unit 512 rounds the value of the Rice parameter r to an integer value, and then sets the Rice parameter r as an integer value for the integer series x_1, x_2,…, x_N. Golomb-Rice coding by Golomb-Rice is performed, the code obtained by Golomb-Rice coding is output as an integer code, and when the coding parameter K is input, the coding parameter K is rounded to an integer value. , An integer code is obtained and output by the same process as any of the processes of the integer coding unit of the first to third embodiments using the integer value coding parameter K (S512). When the coding parameter K is a value between 1 and 2, for example, the rounded integer value may be 2.
[パラメータ復号部572]
第五実施形態のパラメータ復号部570はパラメータ符号を復号して符号化パラメータKを得るものであったが、第五実施形態の変形例2のパラメータ復号部572は、パラメータ符号を復号して符号化パラメータKまたはRiceパラメータrを得て出力する(S572)。[Parameter decoding unit 572]
The parameter decoding unit 570 of the fifth embodiment decodes the parameter code to obtain the coded parameter K, whereas the parameter decoding unit 572 of the second modification of the fifth embodiment decodes the parameter code and encodes the code. The conversion parameter K or the Rice parameter r is obtained and output (S572).
[整数復号部562]
整数復号部562には、復号装置552に入力された整数符号と、パラメータ復号部572が出力した符号化パラメータKまたはRiceパラメータrが入力される。整数復号部562は、Riceパラメータrが入力された場合には、符号化装置502の整数符号化部512が行ったのと同じ方法によりRiceパラメータrの値を丸めて整数値とし、整数符号に対して整数値のRiceパラメータrによるGolomb-Rice復号を行って整数系列x_1, x_2, …, x_Nを得て出力し、符号化パラメータKが入力された場合には、符号化パラメータKを符号化装置502の整数符号化部512が行ったのと同じ方法により丸めて整数値にした後に、整数値の符号化パラメータKを用いて第一から第三実施形態の整数復号部の何れかの処理と同じ処理により整数系列x_1, x_2, …, x_Nを得て出力する(S562)。[Integer decoding unit 562]
The integer code input to the decoding device 552 and the coding parameter K or Rice parameter r output by the parameter decoding unit 572 are input to the integer decoding unit 562. When the Rice parameter r is input, the integer decoding unit 562 rounds the value of the Rice parameter r into an integer value by the same method as that performed by the integer coding unit 512 of the encoding device 502, and converts it into an integer code. On the other hand, Golomb-Rice decoding with the integer value Rice parameter r is performed to obtain the integer series x_1, x_2,…, x_N and output, and when the coding parameter K is input, the coding parameter K is encoded. After rounding to an integer value by the same method performed by the integer coding unit 512 of the apparatus 502, the processing of any of the integer decoding units of the first to third embodiments is performed using the integer value coding parameter K. The integer series x_1, x_2, ..., x_N are obtained and output by the same processing as in (S562).
<第四実施形態及び第五実施形態のその他の変形>
なお、Riceパラメータrと符号化パラメータKとは、K=2-rおよびr=-log2Kにより相互に変換可能なものであるので、符号化装置の整数符号化部と復号装置の整数復号部で同じパラメータの同じ値を用いるようにできるのであれば、何れのパラメータを符号化・復号の対象とするかと上記の変換とをどのように組み合わせて用いてもよい。また、符号化装置の整数符号化部と復号装置の整数復号部で同じパラメータの同じ値を用いるようにできるのであれば、Riceパラメータrと符号化パラメータKのどちらの値を丸め処理の対象としてもよいし、パラメータの符号化前後(すなわち量子化前後)のどちらの値を丸めの処理の対象としてもよいし、符号化における値の量子化と丸めの処理を同時に行うようにしてもよい。要するに、第四実施形態及び第五実施形態及びこれらの変形例1と変形例2で説明したのはあくまでも例であって、Nサンプルによるフレームごとに、符号化装置の整数符号化部と復号装置の整数復号部で同じパラメータの同じ値を用いた符号化処理と復号処理を行えるようにすればよい。<Other variants of the fourth embodiment and the fifth embodiment>
Since the Rice parameter r and the coding parameter K can be converted to each other by K = 2 -r and r = -log 2 K, the integer coding unit of the coding device and the integer decoding of the decoding device If it is possible to use the same value of the same parameter in the unit, which parameter is to be encoded / decoded may be used in any combination of the above conversions. Also, if the integer coding unit of the coding device and the integer decoding unit of the decoding device can use the same value of the same parameter, either the value of the Rice parameter r or the value of the coding parameter K should be the target of the rounding process. Either the value before or after the coding of the parameter (that is, before and after the quantization) may be the target of the rounding process, or the value quantization and the rounding process in the coding may be performed at the same time. In short, the fourth and fifth embodiments and their modified examples 1 and 2 are merely examples, and the integer coding unit and the decoding apparatus of the encoding device are described for each frame by N samples. It suffices to enable the integer decoding unit of the above to perform the coding process and the decoding process using the same values of the same parameters.
<第六実施形態>
第四実施形態及び第五実施形態では、入力された整数値による系列の部分系列に対して求めたRiceパラメータrまたは符号化パラメータKを用いて第一実施形態から第三実施形態の符号化・復号をすることにより、本発明の符号化と復号を実現する形態について説明した。第六実施形態では、Riceパラメータrと符号化パラメータKの少なくとも何れかを用いて、本発明の符号化と復号を実現する形態について説明する。<Sixth Embodiment>
In the fourth embodiment and the fifth embodiment, the Rice parameter r or the coding parameter K obtained for the sub-series of the series by the input integer value is used to code the first to third embodiments. A mode for realizing the coding and decoding of the present invention by decoding has been described. In the sixth embodiment, a mode for realizing the coding and decoding of the present invention will be described using at least one of the Rice parameter r and the coding parameter K.
≪符号化装置≫
図11及び図12を参照して、第六実施形態の符号化装置600が実行する符号化方法の処理手続きを説明する。第六実施形態の符号化装置600は、図11に示す通り、符号化装置400や符号化装置500と同様、パラメータ決定部620と整数符号化部610を含む。第六実施形態の符号化装置600が、符号化装置400や符号化装置500と同様、図12に示す各ステップの処理を実行することにより、第六実施形態の符号化方法が実現される。≪Coding device≫
The processing procedure of the coding method executed by the coding apparatus 600 of the sixth embodiment will be described with reference to FIGS. 11 and 12. As shown in FIG. 11, the coding device 600 of the sixth embodiment includes a parameter determining unit 620 and an integer coding unit 610, similar to the coding device 400 and the coding device 500. Similar to the coding device 400 and the coding device 500, the coding device 600 of the sixth embodiment executes the processing of each step shown in FIG. 12, so that the coding method of the sixth embodiment is realized.
第六実施形態の符号化装置600には、符号化装置400や符号化装置500と同様に、非負の整数値の系列が入力される。第六実施形態の符号化装置600に入力された非負の整数値の系列はNサンプルずつパラメータ決定部620と整数符号化部610に入力される。 Similar to the coding device 400 and the coding device 500, a sequence of non-negative integer values is input to the coding device 600 of the sixth embodiment. The sequence of non-negative integer values input to the coding apparatus 600 of the sixth embodiment is input to the parameter determination unit 620 and the integer coding unit 610 for each N samples.
以下では、本実施形態の符号化装置に入力された非負の整数値を単に「整数値」と呼んで説明する。 Hereinafter, the non-negative integer value input to the coding apparatus of the present embodiment will be referred to simply as an “integer value” and will be described.
[パラメータ決定部620]
パラメータ決定部620には、符号化装置600に入力された整数値の系列のうちの、Nサンプルずつの整数系列x_1, x_2, …, x_Nが入力される。パラメータ決定部620は、入力された整数系列x_1, x_2, …, x_Nに基づき、その整数系列に対応するRiceパラメータrと符号化パラメータKの少なくとも何れかと、そのRiceパラメータrと符号化パラメータKの少なくとも何れかを表すパラメータ符号と、を得て出力する(S620)。つまり、パラメータ決定部620は、入力された非負の整数値による系列に含まれる所定サンプル毎の整数値による系列である整数系列ごとに、整数系列に含まれる整数値に基づいて式(5)によりライスパラメータrを求める処理と、整数系列に含まれる整数値に基づいて式(6)により符号化パラメータKを求める処理と、の少なくとも何れかと、ライスパラメータrと符号化パラメータKの少なくとも何れかを符号化してパラメータ符号を得る処理と、を行う。[Parameter determination unit 620]
The parameter determination unit 620 is input with an integer sequence x_1, x_2, ..., X_N for each N sample of the integer value sequence input to the encoding device 600. Based on the input integer sequence x_1, x_2, ..., X_N, the parameter determination unit 620 includes at least one of the Rice parameter r and the coding parameter K corresponding to the integer sequence, and the Rice parameter r and the coding parameter K. A parameter code representing at least one of them is obtained and output (S620). That is, the parameter determination unit 620 uses the equation (5) for each integer series, which is a series of integer values for each predetermined sample included in the series of input non-negative integer values, based on the integer values included in the integer series. At least one of the process of obtaining the rice parameter r and the process of obtaining the coded parameter K by the equation (6) based on the integer value included in the integer series, and at least one of the rice parameter r and the coded parameter K. The process of encoding and obtaining the parameter code is performed.
[整数符号化部610]
整数符号化部610には、符号化装置600に入力された整数値の系列のうちの、Nサンプルずつの整数系列x_1, x_2, …, x_Nと、パラメータ決定部620が出力したRiceパラメータrと符号化パラメータKの少なくとも何れかが入力される。整数符号化部610は、符号化パラメータKが入力された場合には、符号化パラメータKが1以下であれば、第五実施形態と同様、Golomb-Rice符号化を行って、Golomb-Rice符号化により得た符号を整数符号として出力し、符号化パラメータKが1よりも大きければ、第五実施形態と同様、第一から第三実施形態の整数符号化部の何れかの処理と同じ処理により整数符号を得て出力し、Riceパラメータrが入力された場合には、Riceパラメータrが非負値であれば、第四実施形態と同様、Golomb-Rice符号化を行って、Golomb-Rice符号化により得た符号を整数符号として出力し、Riceパラメータrが負値であれば、第四実施形態と同様、第一から第三実施形態の整数符号化部の何れかの処理と同じ処理により整数符号を得て出力する(S610)。つまり、整数符号化部610は、所定サンプル毎の整数値による系列である整数系列ごとに、パラメータ決定部620が得た符号化パラメータK、または、パラメータ決定部620が得たRiceパラメータrからK=2-rにより得た符号化パラメータK、を符号化パラメータKとして用いて符号Aや符号Bの符号を得る。特に、整数系列に対応する符号化パラメータKが1以下である場合、または、整数系列に対応するRiceパラメータrが非負である場合、には、整数系列をGolomb-Rice符号化して符号列を得るようにしてもよい。[Integer encoding unit 610]
The integer coding unit 610 includes integer series x_1, x_2, ..., x_N for each N sample of the series of integer values input to the coding device 600, and Rice parameter r output by the parameter determination unit 620. At least one of the coding parameters K is entered. When the coding parameter K is input, the integer coding unit 610 performs Golomb-Rice coding as in the fifth embodiment if the coding parameter K is 1 or less, and performs Golomb-Rice coding. If the code obtained by the conversion is output as an integer code and the coding parameter K is larger than 1, the same processing as any processing of the integer coding unit of the first to third embodiments is performed as in the fifth embodiment. When an integer code is obtained and output, and the Rice parameter r is input, if the Rice parameter r is a non-negative value, Golomb-Rice coding is performed and the Golomb-Rice code is performed as in the fourth embodiment. If the code obtained by the conversion is output as an integer code and the Rice parameter r is a negative value, the same processing as in any of the integer coding parts of the first to third embodiments is performed as in the fourth embodiment. An integer code is obtained and output (S610). That is, the integer coding unit 610 receives the coding parameter K obtained by the parameter determination unit 620 or the Rice parameter r obtained by the parameter determination unit 620 for each integer series which is a series of integer values for each predetermined sample. The code of the code A or the code B is obtained by using the coded parameter K obtained by = 2 -r as the coded parameter K. In particular, when the coding parameter K corresponding to the integer series is 1 or less, or when the Rice parameter r corresponding to the integer series is non-negative, the integer series is Golomb-Rice encoded to obtain a code string. You may do so.
≪復号装置≫
図13及び図14を参照して、第六実施形態の復号装置650が実行する復号方法の処理手続きを説明する。第六実施形態の復号装置650は、図13に示す通り、復号装置450や復号装置550と同様、パラメータ復号部670と整数復号部660を含む。第六実施形態の復号装置650が、復号装置450や復号装置550と同様、図14に示す各ステップの処理を実行することにより、第六実施形態の復号方法が実現される。≪Decoding device≫
The processing procedure of the decoding method executed by the decoding apparatus 650 of the sixth embodiment will be described with reference to FIGS. 13 and 14. As shown in FIG. 13, the decoding device 650 of the sixth embodiment includes a parameter decoding unit 670 and an integer decoding unit 660, similar to the decoding device 450 and the decoding device 550. The decoding method of the sixth embodiment is realized by the decoding device 650 of the sixth embodiment executing the processing of each step shown in FIG. 14, similarly to the decoding device 450 and the decoding device 550.
第六実施形態の復号装置650には、第六実施形態の符号化装置600が出力した整数符号、及びパラメータ符号が入力される。復号装置650に入力された整数符号及びパラメータ符号は、整数値の系列のNサンプルに対応する符号ごとにパラメータ復号部670と整数復号部660に入力される。つまり、パラメータ復号部670と整数復号部660には、所定単位ごとのパラメータ符号と符号列とが入力される。 The integer code and the parameter code output by the coding device 600 of the sixth embodiment are input to the decoding device 650 of the sixth embodiment. The integer code and the parameter code input to the decoding device 650 are input to the parameter decoding unit 670 and the integer decoding unit 660 for each code corresponding to the N sample of the integer value series. That is, the parameter code and the code string for each predetermined unit are input to the parameter decoding unit 670 and the integer decoding unit 660.
[パラメータ復号部670]
パラメータ復号部670は、パラメータ決定部620がパラメータ符号を得たのと対応する復号処理により、パラメータ符号を復号してRiceパラメータrと符号化パラメータKの少なくとも何れかを得て出力する(S670)。つまり、パラメータ復号部670は、所定単位ごとに、パラメータ符号を復号してRiceパラメータrと符号化パラメータKの少なくとも何れかを得る。[Parameter decoding unit 670]
The parameter decoding unit 670 decodes the parameter code by the decoding process corresponding to the parameter code obtained by the parameter determination unit 620, obtains at least one of the Rice parameter r and the coding parameter K, and outputs the result (S670). .. That is, the parameter decoding unit 670 decodes the parameter code for each predetermined unit to obtain at least one of the Rice parameter r and the coding parameter K.
[整数復号部660]
整数復号部660には、復号装置650に入力された整数符号と、パラメータ復号部670が出力したRiceパラメータrと符号化パラメータKの少なくとも何れかが入力される。整数復号部660は、符号化パラメータKが入力された場合には、符号化パラメータKが1以下であれば、第五実施形態と同様、Golomb-Rice復号を行って整数系列x_1, x_2, …, x_Nを得て出力し、符号化パラメータKが1よりも大きければ、第五実施形態と同様、第一から第三実施形態の整数復号部の何れかの処理と同じ処理により整数系列x_1, x_2, …, x_Nを得て出力し、Riceパラメータrが入力された場合には、Riceパラメータrが非負値であれば、第四実施形態と同様、Golomb-Rice復号を行って整数系列x_1, x_2, …, x_Nを得て出力し、Riceパラメータrが負値であれば、第四実施形態と同様、第一から第三実施形態の整数復号部の何れかの処理と同じの処理により整数系列x_1, x_2, …, x_Nを得て出力する(S660)。つまり、整数復号部660は、所定単位ごとに、パラメータ復号部670が得た符号化パラメータK、または、パラメータ復号部670が得たRiceパラメータrからK=2-rにより得た符号化パラメータK、を符号化パラメータKとして用いて整数値0の2個から2K-1個の連続や、0個から2K-1-1個連続する整数値0と1個の0以外の整数値x_nとによる組からなる、整数値による系列を得る。特に、符号化パラメータKが1以下である場合、または、Riceパラメータrが非負である場合、には、符号列をGolomb-Rice復号して整数値による系列を得るようにしてもよい。[Integer decoding unit 660]
At least one of the integer code input to the decoding device 650, the Rice parameter r output by the parameter decoding unit 670, and the coding parameter K is input to the integer decoding unit 660. When the coding parameter K is input, the integer decoding unit 660 performs Golomb-Rice decoding as in the fifth embodiment if the coding parameter K is 1 or less, and performs integer series x_1, x_2, ... , X_N is obtained and output, and if the coding parameter K is larger than 1, the integer sequence x_1, is processed in the same manner as in any of the integer decoding units of the first to third embodiments as in the fifth embodiment. When x_2,…, x_N is obtained and output, and the Rice parameter r is input, if the Rice parameter r is a non-negative value, Golomb-Rice decoding is performed and the integer series x_1, If x_2,…, x_N are obtained and output, and the Rice parameter r is a negative value, an integer is processed by the same processing as any of the integer decoding units of the first to third embodiments as in the fourth embodiment. The series x_1, x_2, ..., x_N are obtained and output (S660). In other words, the integer decoding part 660, for each predetermined unit, the coding parameter K parameter decoding section 670 to obtain or a coding parameter K from Rice parameter r to parameter decoding section 670 was obtained was obtained by K = 2 -r , Is used as the coding parameter K, and 2 to 2 K-1 consecutive integer values of 0, or 0 to 2 K-1 to 1
本実施形態の発明によれば、整数値の系列や部分系列に対応するRiceパラメータrに相当する値が分かれば、その系列に最適な符号化パラメータKを用いることで、少ない平均ビット数で符号化することができる。また、そのような符号を復号することができる。 According to the invention of the present embodiment, if the value corresponding to the Rice parameter r corresponding to the sequence or subseries of integer values is known, the code can be coded with a small average number of bits by using the coding parameter K optimal for the sequence. Can be transformed into. Moreover, such a code can be decoded.
<補記>
本発明の装置は、例えば単一のハードウェアエンティティとして、キーボードなどが接続可能な入力部、液晶ディスプレイなどが接続可能な出力部、ハードウェアエンティティの外部に通信可能な通信装置(例えば通信ケーブル)が接続可能な通信部、CPU(Central Processing Unit、キャッシュメモリやレジスタなどを備えていてもよい)、メモリであるRAMやROM、ハードディスクである外部記憶装置並びにこれらの入力部、出力部、通信部、CPU、RAM、ROM、外部記憶装置の間のデータのやり取りが可能なように接続するバスを有している。また必要に応じて、ハードウェアエンティティに、CD−ROMなどの記録媒体を読み書きできる装置(ドライブ)などを設けることとしてもよい。このようなハードウェア資源を備えた物理的実体としては、汎用コンピュータなどがある。<Supplement>
The device of the present invention is, for example, as a single hardware entity, an input unit to which a keyboard or the like can be connected, an output unit to which a liquid crystal display or the like can be connected, and a communication device (for example, a communication cable) capable of communicating outside the hardware entity. Communication unit to which can be connected, CPU (Central Processing Unit, cache memory, registers, etc.), RAM and ROM as memory, external storage device as hard hardware, and input, output, and communication units of these , CPU, RAM, ROM, and has a connecting bus so that data can be exchanged between external storage devices. Further, if necessary, a device (drive) or the like capable of reading and writing a recording medium such as a CD-ROM may be provided in the hardware entity. A physical entity equipped with such hardware resources includes a general-purpose computer and the like.
ハードウェアエンティティの外部記憶装置には、上述の機能を実現するために必要となるプログラムおよびこのプログラムの処理において必要となるデータなどが記憶されている(外部記憶装置に限らず、例えばプログラムを読み出し専用記憶装置であるROMに記憶させておくこととしてもよい)。また、これらのプログラムの処理によって得られるデータなどは、RAMや外部記憶装置などに適宜に記憶される。 The external storage device of the hardware entity stores the program required to realize the above-mentioned functions and the data required for processing this program (not limited to the external storage device, for example, reading a program). It may be stored in a ROM, which is a dedicated storage device). Further, the data obtained by the processing of these programs is appropriately stored in a RAM, an external storage device, or the like.
ハードウェアエンティティでは、外部記憶装置(あるいはROMなど)に記憶された各プログラムとこの各プログラムの処理に必要なデータが必要に応じてメモリに読み込まれて、適宜にCPUで解釈実行・処理される。その結果、CPUが所定の機能(上記、…部、…手段などと表した各構成要件)を実現する。 In the hardware entity, each program stored in the external storage device (or ROM, etc.) and the data necessary for processing each program are read into the memory as needed, and are appropriately interpreted, executed, and processed by the CPU. .. As a result, the CPU realizes a predetermined function (each configuration requirement represented by the above, ... Department, ... means, etc.).
本発明は上述の実施形態に限定されるものではなく、本発明の趣旨を逸脱しない範囲で適宜変更が可能である。また、上記実施形態において説明した処理は、記載の順に従って時系列に実行されるのみならず、処理を実行する装置の処理能力あるいは必要に応じて並列的にあるいは個別に実行されるとしてもよい。 The present invention is not limited to the above-described embodiment, and can be appropriately modified without departing from the spirit of the present invention. Further, the processes described in the above-described embodiment are not only executed in chronological order according to the order described, but may also be executed in parallel or individually depending on the processing capacity of the device that executes the processes or if necessary. ..
既述のように、上記実施形態において説明したハードウェアエンティティ(本発明の装置)における処理機能をコンピュータによって実現する場合、ハードウェアエンティティが有すべき機能の処理内容はプログラムによって記述される。そして、このプログラムをコンピュータで実行することにより、上記ハードウェアエンティティにおける処理機能がコンピュータ上で実現される。 As described above, when the processing function in the hardware entity (device of the present invention) described in the above embodiment is realized by a computer, the processing content of the function that the hardware entity should have is described by a program. Then, by executing this program on the computer, the processing function in the above hardware entity is realized on the computer.
この処理内容を記述したプログラムは、コンピュータで読み取り可能な記録媒体に記録しておくことができる。コンピュータで読み取り可能な記録媒体としては、例えば、磁気記録装置、光ディスク、光磁気記録媒体、半導体メモリ等どのようなものでもよい。具体的には、例えば、磁気記録装置として、ハードディスク装置、フレキシブルディスク、磁気テープ等を、光ディスクとして、DVD(Digital Versatile Disc)、DVD−RAM(Random Access Memory)、CD−ROM(Compact Disc Read Only Memory)、CD−R(Recordable)/RW(ReWritable)等を、光磁気記録媒体として、MO(Magneto-Optical disc)等を、半導体メモリとしてEEP−ROM(Electronically Erasable and Programmable-Read Only Memory)等を用いることができる。 The program describing the processing content can be recorded on a computer-readable recording medium. The computer-readable recording medium may be, for example, a magnetic recording device, an optical disk, a photomagnetic recording medium, a semiconductor memory, or the like. Specifically, for example, a hard disk device, a flexible disk, a magnetic tape, or the like as a magnetic recording device is used as an optical disk, and a DVD (Digital Versatile Disc), a DVD-RAM (Random Access Memory), or a CD-ROM (Compact Disc Read Only) is used as an optical disk. Memory), CD-R (Recordable) / RW (ReWritable), etc., MO (Magneto-Optical disc), etc. as a magneto-optical recording medium, EEP-ROM (Electronically Erasable and Programmable-Read Only Memory), etc. as a semiconductor memory Can be used.
また、このプログラムの流通は、例えば、そのプログラムを記録したDVD、CD−ROM等の可搬型記録媒体を販売、譲渡、貸与等することによって行う。さらに、このプログラムをサーバコンピュータの記憶装置に格納しておき、ネットワークを介して、サーバコンピュータから他のコンピュータにそのプログラムを転送することにより、このプログラムを流通させる構成としてもよい。 Further, the distribution of this program is performed, for example, by selling, transferring, renting, or the like a portable recording medium such as a DVD or a CD-ROM in which the program is recorded. Further, the program may be stored in the storage device of the server computer, and the program may be distributed by transferring the program from the server computer to another computer via a network.
このようなプログラムを実行するコンピュータは、例えば、まず、可搬型記録媒体に記録されたプログラムもしくはサーバコンピュータから転送されたプログラムを、一旦、自己の記憶装置に格納する。そして、処理の実行時、このコンピュータは、自己の記録媒体に格納されたプログラムを読み取り、読み取ったプログラムに従った処理を実行する。また、このプログラムの別の実行形態として、コンピュータが可搬型記録媒体から直接プログラムを読み取り、そのプログラムに従った処理を実行することとしてもよく、さらに、このコンピュータにサーバコンピュータからプログラムが転送されるたびに、逐次、受け取ったプログラムに従った処理を実行することとしてもよい。また、サーバコンピュータから、このコンピュータへのプログラムの転送は行わず、その実行指示と結果取得のみによって処理機能を実現する、いわゆるASP(Application Service Provider)型のサービスによって、上述の処理を実行する構成としてもよい。なお、本形態におけるプログラムには、電子計算機による処理の用に供する情報であってプログラムに準ずるもの(コンピュータに対する直接の指令ではないがコンピュータの処理を規定する性質を有するデータ等)を含むものとする。 A computer that executes such a program first stores, for example, a program recorded on a portable recording medium or a program transferred from a server computer in its own storage device. Then, when the process is executed, the computer reads the program stored in its own recording medium and executes the process according to the read program. Further, as another execution form of this program, a computer may read the program directly from a portable recording medium and execute processing according to the program, and further, the program is transferred from the server computer to this computer. Each time, the processing according to the received program may be executed sequentially. In addition, the above processing is executed by a so-called ASP (Application Service Provider) type service that realizes the processing function only by the execution instruction and result acquisition without transferring the program from the server computer to this computer. May be. The program in this embodiment includes information to be used for processing by a computer and equivalent to the program (data that is not a direct command to the computer but has a property of defining the processing of the computer, etc.).
また、この形態では、コンピュータ上で所定のプログラムを実行させることにより、ハードウェアエンティティを構成することとしたが、これらの処理内容の少なくとも一部をハードウェア的に実現することとしてもよい。 Further, in this form, the hardware entity is configured by executing a predetermined program on the computer, but at least a part of these processing contents may be realized in terms of hardware.
上述の本発明の実施形態の記載は、例証と記載の目的で提示されたものである。網羅的であるという意思はなく、開示された厳密な形式に発明を限定する意思もない。変形やバリエーションは上述の教示から可能である。実施形態は、本発明の原理の最も良い例証を提供するために、そして、この分野の当業者が、熟考された実際の使用に適するように本発明を色々な実施形態で、また、色々な変形を付加して利用できるようにするために、選ばれて表現されたものである。すべてのそのような変形やバリエーションは、公正に合法的に公平に与えられる幅にしたがって解釈された添付の請求項によって定められた本発明のスコープ内である。 The description of the embodiment of the present invention described above is presented for purposes of illustration and description. There is no intention to be exhaustive and no intention to limit the invention to the exact form disclosed. Deformations and variations are possible from the above teachings. The embodiments are in various embodiments and in various ways to provide the best illustration of the principles of the invention and to be suitable for practical use by those skilled in the art. It is selected and expressed so that it can be used by adding transformations. All such variations and variations are within the scope of the invention as defined by the appended claims, interpreted according to the width given fairly, legally and impartially.
Claims (15)
Kを2以上の整数として、
前記予め定めた順の整数値による部分系列が、整数値0の2個から2K-1個のうちの予め定めた何れかの個数であるL個の連続である場合には、該L個の連続に対応する符号として1ビットの符号(以下、「符号A」という)を得、
前記予め定めた順の整数値による部分系列が、0個からL-1個連続する整数値0と、1個の0以外の整数値x_nと、による組、である場合には、該組に対応する符号としてK×x_nビットまたはK×x_n+1ビットの符号(以下、「符号B」という)を得る処理を、
前記予め定めた順のN個目の整数値が処理されるまで行い、得た符号を連結したものを前記符号列として出力する整数符号化部
を含む符号化装置。 Non negative integer value x_n, n∈ {1, 2, ..., N} sequence by (hereinafter referred to as "integral sequence") as input, codes in a predetermined order to each integer value included in the integer sequence It is a coding device that obtains a code string and outputs it .
Let K be an integer greater than or equal to 2
When the partial series of integer values in the predetermined order is a series of L pieces, which is any number of predetermined numbers from 2 to 2 K-1 pieces of integer value 0, the L pieces. A 1-bit code (hereinafter referred to as "code A") is obtained as a code corresponding to the continuation of.
If the partial series of integer values in the predetermined order is a set consisting of 0 to L-1 consecutive integer values 0 and one non-zero integer value x_n, the set is included. The process of obtaining a code of K × x_n bits or K × x_n + 1 bits (hereinafter referred to as “code B”) as the corresponding code,
A coding device including an integer coding unit that performs until the Nth integer value in the predetermined order is processed, and outputs a concatenated code obtained as the code string.
ビット値“x”はビット値“1”でありビット値“y”はビット値“0”である、または、ビット値“x”はビット値“0”でありビット値“y”はビット値“1”である、として、
前記符号Aは、ビット値が“x”である1ビットの符号であり、
前記符号Bは、1ビット目からKビット目までに少なくとも1つのビット値“x”と少なくとも1つのビット値“y”を含み、かつ、最後からK×(x_n-1)ビットはビット値が“y”である
符号化装置。 The coding device according to claim 1.
The bit value “x” is the bit value “1” and the bit value “y” is the bit value “0”, or the bit value “x” is the bit value “0” and the bit value “y” is the bit value. As "1",
The reference numeral A is a 1-bit code having a bit value of “x”.
The reference numeral B includes at least one bit value “x” and at least one bit value “y” from the first bit to the Kth bit, and the K × (x_n-1) bit from the end has a bit value. Encoding device that is “y”.
Lは2K-1であり、
整数系列における整数値0の0個から2K-1-1個の2K-1通りの連続個数のそれぞれは、
符号BがK×x_n+1ビットであるときの、
該符号Bの1ビット目からK+1ビット目までのK+1ビットで構成され、1ビット目のビット値が“x”であり、2ビット目からK+1ビット目までのビット値が“y”である、1通りの部分符号と、
符号BがK×x_nビットであるときの、
該符号Bの1ビット目からKビット目までのKビットで構成され、1ビット目のビット値が“y”であり、2ビット目からKビット目までのK-1ビット中の少なくとも1ビットのビット値が“x”である、2K-1-1通りの部分符号と、
の2K-1通りの部分符号のうちの何れかと一対一に対応する
符号化装置。 The coding device according to claim 2.
L is 2 K-1
Each zero or an integer value 0 for 2 K-1 -1 single 2 K-1 kinds of continuous number in the integer sequence,
When the code B is K × x_n + 1 bits,
It is composed of K + 1 bits from the 1st bit to the K + 1th bit of the code B, the bit value of the 1st bit is "x", and the bit value from the 2nd bit to the K + 1th bit is. One subcode that is "y" and
When the code B is K × x_n bits,
It is composed of K bits from the 1st bit to the K bit of the code B, the bit value of the 1st bit is "y", and at least 1 bit in the K-1 bits from the 2nd bit to the K bit. 2 K-1 -1 subcodes with a bit value of “x” and
A coding device that has a one-to-one correspondence with any of the 2 K-1 partial codes in.
前記符号化装置は、前記整数系列に含まれる各整数値を予め定めた順に符号化して符号列を得て出力するものであり、
前記整数系列ごとに、
前記予め定めた順の整数値による部分系列が、整数値0の2個から2 K-1 個のうちの予め定めた何れかの個数であるL個の連続である場合には、該L個の連続に対応する符号として1ビットの符号(以下、「符号A」という)を得、
前記予め定めた順の整数値による部分系列が、0個からL-1個連続する整数値0と、1個の0以外の整数値x_nと、による組、である場合には、該組に対応する符号としてK×x_nビットまたはK×x_n+1ビットの符号(以下、「符号B」という)を得る処理を、
前記予め定めた順のN個目の整数値が処理されるまで行い、得た符号を連結したものを前記符号列として出力する整数符号化部を含み、
前記整数系列ごとに、
前記整数系列に含まれる整数値に基づいて次式によりライスパラメータrを求める処理と、
前記整数系列に含まれる整数値に基づいて次式により符号化パラメータK’を求める処理と、の少なくとも何れかと、
ライスパラメータrと符号化パラメータK’の少なくとも何れかを符号化してパラメータ符号を得る処理と、
を行うパラメータ決定部を更に含み、
前記整数符号化部は、前記整数系列ごとに、前記パラメータ決定部が得た符号化パラメータK’、または、前記パラメータ決定部が得た前記ライスパラメータrからK’=2-rにより得た符号化パラメータK’、を丸めて整数値にした値を上記Kとして用いる
符号化装置。 A sequence of non-negative integer values is input, and each sequence of non-negative integer values x_n, n ∈ {1, 2, ..., N} (hereinafter referred to as "integer series"), which is a predetermined unit by N samples, is coded. It is a coding device to be converted
The coding device encodes each integer value included in the integer series in a predetermined order to obtain a code string and outputs the code string.
For each of the integer series
When the partial series of integer values in the predetermined order is a series of L pieces, which is any number of predetermined numbers from 2 to 2 K-1 pieces of integer value 0, the L pieces. A 1-bit code (hereinafter referred to as "code A") is obtained as a code corresponding to the continuation of.
If the partial series of integer values in the predetermined order is a set consisting of 0 to L-1 consecutive integer values 0 and one non-zero integer value x_n, the set is included. The process of obtaining a code of K × x_n bits or K × x_n + 1 bits (hereinafter referred to as “code B”) as the corresponding code,
It includes an integer coding unit that performs until the Nth integer value in the predetermined order is processed and outputs a concatenated code obtained as the code string.
For each of the integer series
The process of obtaining the rice parameter r by the following equation based on the integer value included in the integer series, and
At least one of the processing of obtaining the coding parameter K'by the following equation based on the integer value included in the integer series, and
A process of obtaining the parameter code by encoding at least one of Rice parameter r and the coding parameter K ',
Including a parameter determination unit that performs
Code the integer encoding unit, for each of the integer sequence, the parameter determination unit is obtained coding parameters K ', or, wherein the parameter determining unit K from the Rice parameter r obtained' was obtained by = 2 -r parameter K ', the coding device using a value to an integer value as the K crumpled.
前記整数符号化部は、前記整数系列に対応する前記符号化パラメータK’が1以下である場合、または、前記整数系列に対応する前記ライスパラメータrが非負である場合、には、前記整数系列をゴロムライス符号化して符号列を得る
符号化装置。 The coding device according to claim 4.
The integer coding unit is the integer sequence when the coding parameter K'corresponding to the integer sequence is 1 or less, or when the rice parameter r corresponding to the integer sequence is non-negative. A coding device that obtains a code string by coding Goromulais.
Kを2以上の整数として、
前記符号列に含まれる符号が1ビットの符号(以下「符号A」という)である場合には、該符号Aに対応する整数値0の2個から2K-1個のうちの予め定めた何れかの個数であるL個の連続を得、
前記符号列に含まれる符号がK×x_nビットまたはK×x_n+1ビットの符号(以下、「符号B」という)である場合には、該符号Bに対応する、0個からL-1個連続する整数値0と、1個の0以外の整数値x_nと、による組を得る処理を、
前記符号列に含まれる符号がなくなるまで行い、得た整数値による系列を前記整数値x_nによる系列として出力する整数復号部
を含む復号装置。 A decoding device that takes a code string as an input, decodes the codes contained in the code string in order, obtains a sequence with integer values x_n, n ∈ {1, 2, ..., N} and outputs it .
Let K be an integer greater than or equal to 2
When the code included in the code string is a 1-bit code (hereinafter referred to as "code A"), it is predetermined from 2 to 2 K-1 integer values 0 corresponding to the code A. Obtain any number of L consecutive pieces,
When the code contained in the code string is a code of K × x_n bits or K × x_n + 1 bits (hereinafter referred to as “code B”), 0 to L-1 corresponding to the code B. The process of obtaining a pair of consecutive integer values 0 and one non-zero integer value x_n,
A decoding device including an integer decoding unit that performs until there are no more codes included in the code string and outputs a series of obtained integer values as a series of the integer values x_n.
ビット値“x”はビット値“1”でありビット値“y”はビット値“0”である、または、ビット値“x”はビット値“0”でありビット値“y”はビット値“1”である、として、
前記符号Aは、ビット値が“x”である1ビットの符号であり、
前記符号Bは、1ビット目からKビット目までに少なくとも1つのビット値“x”と少なくとも1つのビット値“y”を含み、かつ、最後からK×(x_n-1)ビットはビット値が“y”である
復号装置。 The decoding device according to claim 6.
The bit value “x” is the bit value “1” and the bit value “y” is the bit value “0”, or the bit value “x” is the bit value “0” and the bit value “y” is the bit value. As "1",
The reference numeral A is a 1-bit code having a bit value of “x”.
The reference numeral B includes at least one bit value “x” and at least one bit value “y” from the first bit to the Kth bit, and the K × (x_n-1) bit from the end has a bit value. Decryptor that is “y”.
前記整数復号部は、前記入力された符号列の最初から順に、
前記入力された符号列を、連続するKビット(以下、「Kビット列」という)ずつ読みこむことと、
前記読み込まれたKビット列が“y”を含むものであるとき、該“y”を含むKビット列の直前のビットが、前記符号Aまたは前記符号Bの終端のビットであると識別することと、
を行うことで、
前記入力された符号列に含まれる前記符号Aと前記符号Bを特定する
復号装置。 The decoding device according to claim 6 or 7.
The integer decoding unit is in order from the beginning of the input code string.
Reading the input code string one by one consecutive K bits (hereinafter referred to as "K bit string")
When the read K bit string contains "y", it is identified that the bit immediately preceding the K bit string containing "y" is the terminal bit of the code A or the code B.
By doing
A decoding device that identifies the code A and the code B included in the input code string.
Lは2K-1であり、
符号BがK×x_n+1ビットであるときの、
該符号Bの1ビット目からK+1ビット目までのK+1ビットで構成され、1ビット目のビット値が“x”であり、2ビット目からK+1ビット目までのビット値が“y”である、1通りの部分符号と、
符号BがK×x_nビットであるときの、
該符号Bの1ビット目からKビット目までのKビットで構成され、1ビット目のビット値が“y”であり、2ビット目からKビット目までのK-1ビット中の少なくとも1ビットのビット値が“x”である、2K-1-1通りの部分符号と、
の2K-1通りの部分符号のそれぞれは、
前記整数復号部により得られた整数値による系列における整数値0の0個から2K-1-1個の2K-1通りの連続個数のうちの何れかと一対一に対応する
復号装置。 The decoding device according to claim 7 or 8.
L is 2 K-1
When the code B is K × x_n + 1 bits,
It is composed of K + 1 bits from the 1st bit to the K + 1th bit of the code B, the bit value of the 1st bit is "x", and the bit value from the 2nd bit to the K + 1th bit is. One subcode that is "y" and
When the code B is K × x_n bits,
It is composed of K bits from the 1st bit to the K bit of the code B, the bit value of the 1st bit is "y", and at least 1 bit in the K-1 bits from the 2nd bit to the K bit. 2 K-1 -1 subcodes with a bit value of “x” and
Each of the 2 K-1 subcodes in
Decoding apparatus corresponding to the one-to-one with any of the number of consecutive 2 K-1 kinds from 0 2 K-1 -1 single integer value 0 in the sequence by an integer value obtained by the integral decoder.
所定単位ごとに、
前記符号列に含まれる符号が1ビットの符号(以下「符号A」という)である場合には、該符号Aに対応する整数値0の2個から2 K-1 個のうちの予め定めた何れかの個数であるL個の連続を得、
前記符号列に含まれる符号がK×x_nビットまたはK×x_n+1ビットの符号(以下、「符号B」という)である場合には、該符号Bに対応する、0個からL-1個連続する整数値0と、1個の0以外の整数値x_nと、による組を得る処理を、
前記符号列に含まれる符号がなくなるまで行い、得た整数値による系列を前記整数値x_nによる系列として出力する整数復号部を含み、
所定単位ごとに、前記パラメータ符号を復号してライスパラメータrと符号化パラメータK’の少なくとも何れかを得るパラメータ復号部を更に含み、
前記整数復号部は、所定単位ごとに、前記パラメータ復号部が得た符号化パラメータK’、または、前記パラメータ復号部が得た前記ライスパラメータrからK’=2-rにより得た符号化パラメータK’、を丸めて整数値にした値を上記Kとして用いる
復号装置。 Decoding that takes the parameter code and code string for each predetermined unit as input, decodes the codes included in the code string in order, obtains a series with integer values x_n, n ∈ {1, 2, ..., N} and outputs it. It ’s a device,
For each predetermined unit,
When the code included in the code string is a 1-bit code (hereinafter referred to as "code A"), it is predetermined from 2 to 2 K-1 integer values 0 corresponding to the code A. Obtain any number of L consecutive pieces,
When the code contained in the code string is a code of K × x_n bits or K × x_n + 1 bits (hereinafter referred to as “code B”), 0 to L-1 corresponding to the code B. The process of obtaining a pair of consecutive integer values 0 and one non-zero integer value x_n,
It includes an integer decoding unit that performs until there are no more codes included in the code string and outputs the obtained sequence of integer values as a series of the integer values x_n.
Each predetermined unit further includes a parameter decoding unit that decodes the parameter code to obtain at least one of the rice parameter r and the coding parameter K'.
The integer decoding part, for each predetermined unit, the parameter decoding section obtained coding parameters K ', or, wherein the parameter decoding section K from the Rice parameter r obtained' coding parameters obtained by = 2 -r A decoding device that uses the value obtained by rounding K' , as an integer value, as the above K.
前記整数復号部は、前記符号化パラメータK’が1以下である場合、または、前記ライスパラメータrが非負である場合、には、前記符号列をゴロムライス復号して整数値による系列を得る
復号装置。 The decoding device according to claim 10.
When the coding parameter K'is 1 or less, or when the rice parameter r is non-negative, the integer decoding unit decodes the code string by Golomulais to obtain a sequence of integer values. ..
Kを2以上の整数として、
前記予め定めた順の整数値による部分系列が、整数値0の2個から2K-1個のうちの予め定めた何れかの個数であるL個の連続である場合には、該L個の連続に対応する符号として1ビットの符号(以下、「符号A」という)を得、
前記予め定めた順の整数値による部分系列が、0個からL-1個連続する整数値0と、1個の0以外の整数値x_nと、による組、である場合には、該組に対応する符号としてK×x_nビットまたはK×x_n+1ビットの符号(以下、「符号B」という)を得る処理を、
前記予め定めた順のN個目の整数値が処理されるまで行い、得た符号を連結したものを前記符号列として出力する整数符号化ステップ
を実行する符号化方法。 Encoding apparatus, non-negative integer value x_n, n∈ {1, 2, ..., N} by sequence (hereinafter, referred to as "integral sequence") as inputs, each integer value included in the integer sequence It is a coding method that encodes in a predetermined order to obtain a code string and outputs it .
Let K be an integer greater than or equal to 2
When the partial series of integer values in the predetermined order is a series of L pieces, which is any number of predetermined numbers from 2 to 2 K-1 pieces of integer value 0, the L pieces. A 1-bit code (hereinafter referred to as "code A") is obtained as a code corresponding to the continuation of.
If the partial series of integer values in the predetermined order is a set consisting of 0 to L-1 consecutive integer values 0 and one non-zero integer value x_n, the set is included. The process of obtaining a code of K × x_n bits or K × x_n + 1 bits (hereinafter referred to as “code B”) as the corresponding code,
A coding method that executes an integer coding step in which the Nth integer value in the predetermined order is processed, and the obtained codes are concatenated and output as the code string.
Kを2以上の整数として、
前記符号列に含まれる符号が1ビットの符号(以下「符号A」という)である場合には、該符号Aに対応する整数値0の2個から2K-1個のうちの予め定めた何れかの個数であるL個の連続を得、
前記符号列に含まれる符号がK×x_nビットまたはK×x_n+1ビットの符号(以下、「符号B」という)である場合には、該符号Bに対応する、0個からL-1個連続する整数値0と、1個の0以外の整数値x_nと、による組を得る処理を、
前記符号列に含まれる符号がなくなるまで行い、得た整数値による系列を前記整数値x_nによる系列として出力する整数復号ステップ
を実行する復号方法。 A decoding method in which a decoding device takes a code string as an input, decodes the codes contained in the code string in order, obtains a sequence of integer values x_n, n ∈ {1, 2, ..., N} and outputs the sequence. And
Let K be an integer greater than or equal to 2
When the code included in the code string is a 1-bit code (hereinafter referred to as "code A"), it is predetermined from 2 to 2 K-1 integer values 0 corresponding to the code A. Obtain any number of L consecutive pieces,
When the code contained in the code string is a code of K × x_n bits or K × x_n + 1 bits (hereinafter referred to as “code B”), 0 to L-1 corresponding to the code B. The process of obtaining a pair of consecutive integer values 0 and one non-zero integer value x_n,
Decoding method for performing integer decoding step of outputting is performed until the code is no longer included in the code sequence, a sequence according to obtain integer value as a sequence by the integer value x_n.
Applications Claiming Priority (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2017143403 | 2017-07-25 | ||
| JP2017143403 | 2017-07-25 | ||
| PCT/JP2018/016227 WO2019021552A1 (en) | 2017-07-25 | 2018-04-20 | Coding device, decoding device, data structure of code string, coding method, decoding method, coding program, decoding program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPWO2019021552A1 JPWO2019021552A1 (en) | 2020-04-09 |
| JP6885466B2 true JP6885466B2 (en) | 2021-06-16 |
Family
ID=65041150
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2019532376A Active JP6885466B2 (en) | 2017-07-25 | 2018-04-20 | Coding device, decoding device, coding method, decoding method, coding program, decoding program |
Country Status (5)
| Country | Link |
|---|---|
| US (1) | US10840944B2 (en) |
| EP (1) | EP3661062B1 (en) |
| JP (1) | JP6885466B2 (en) |
| CN (1) | CN110999088B (en) |
| WO (1) | WO2019021552A1 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP7139897B2 (en) * | 2018-11-07 | 2022-09-21 | 日本電信電話株式会社 | Encoding device, decoding device, encoding method, decoding method, encoding program, decoding program |
| CN112885364B (en) * | 2021-01-21 | 2023-10-13 | 维沃移动通信有限公司 | Audio encoding method and decoding method, audio encoding device and decoding device |
Family Cites Families (16)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| AU2075199A (en) * | 1998-01-27 | 1999-08-09 | Matsushita Electric Industrial Co., Ltd. | Method and device for coding lag parameter and code book preparing method |
| US6005503A (en) * | 1998-02-27 | 1999-12-21 | Digital Equipment Corporation | Method for encoding and decoding a list of variable size integers to reduce branch mispredicts |
| US6633242B2 (en) * | 2001-02-08 | 2003-10-14 | Sun Microsystems, Inc. | Entropy coding using adaptable prefix codes |
| US7193541B2 (en) * | 2001-12-04 | 2007-03-20 | Sun Microsystems, Inc. | Representation of sign in encoding scheme |
| US7424467B2 (en) * | 2004-01-26 | 2008-09-09 | International Business Machines Corporation | Architecture for an indexer with fixed width sort and variable width sort |
| US7015837B1 (en) * | 2004-10-29 | 2006-03-21 | Microsoft Corporation | Lossless adaptive encoding and decoding of integer data |
| KR20060051157A (en) * | 2004-10-29 | 2006-05-19 | 마이크로소프트 코포레이션 | System and method for lossless adaptive encoding and decoding of integer data |
| EP2083560B1 (en) * | 2006-11-14 | 2013-12-04 | Nippon Telegraph & Telephone Corporation | Image signal coding method and decoding mehod, information source coding method and decoding mehod, devices for them, their programs, and memory medium with recorded program |
| US7548176B2 (en) * | 2007-07-12 | 2009-06-16 | Donald Martin Monro | Data coding buffer for electrical computers and digital data processing systems |
| JP4825916B2 (en) * | 2007-12-11 | 2011-11-30 | 日本電信電話株式会社 | Encoding method, decoding method, apparatus using these methods, program, and recording medium |
| EP2112764A1 (en) * | 2008-04-25 | 2009-10-28 | Thomson Licensing | Method for encoding a sequence of integers, storage device and signal carrying an encoded integer sequence and method for decoding a sequence of integers |
| US8180774B2 (en) * | 2008-10-03 | 2012-05-15 | Seomoz, Inc. | Web-scale data processing system and method |
| US8558724B2 (en) * | 2009-05-20 | 2013-10-15 | Nippon Telegraph And Telephone Corporation | Coding method, coding appartaus, decoding method, decoding apparatus, program, and recording medium |
| EP2372705A1 (en) * | 2010-03-24 | 2011-10-05 | Thomson Licensing | Method and apparatus for encoding and decoding excitation patterns from which the masking levels for an audio signal encoding and decoding are determined |
| ES2768090T3 (en) * | 2014-03-24 | 2020-06-19 | Nippon Telegraph & Telephone | Encoding method, encoder, program and registration medium |
| US10404276B1 (en) * | 2018-04-27 | 2019-09-03 | Nicira, Inc. | Stable variable-length order-preserving encoding scheme |
-
2018
- 2018-04-20 EP EP18838945.6A patent/EP3661062B1/en active Active
- 2018-04-20 CN CN201880048686.8A patent/CN110999088B/en active Active
- 2018-04-20 WO PCT/JP2018/016227 patent/WO2019021552A1/en not_active Ceased
- 2018-04-20 JP JP2019532376A patent/JP6885466B2/en active Active
- 2018-04-20 US US16/618,567 patent/US10840944B2/en active Active
Also Published As
| Publication number | Publication date |
|---|---|
| EP3661062A1 (en) | 2020-06-03 |
| US10840944B2 (en) | 2020-11-17 |
| WO2019021552A1 (en) | 2019-01-31 |
| CN110999088B (en) | 2024-07-19 |
| CN110999088A (en) | 2020-04-10 |
| EP3661062A4 (en) | 2021-04-28 |
| US20200162102A1 (en) | 2020-05-21 |
| JPWO2019021552A1 (en) | 2020-04-09 |
| EP3661062B1 (en) | 2022-11-09 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN101919164A (en) | Encoding method, decoding method, device using these methods, program, recording medium | |
| Saravanan et al. | Enhancing efficiency of huffman coding using Lempel Ziv coding for image compression | |
| JP6885466B2 (en) | Coding device, decoding device, coding method, decoding method, coding program, decoding program | |
| WO2020095706A1 (en) | Coding device, decoding device, code string data structure, coding method, decoding method, coding program, and decoding program | |
| JP5236005B2 (en) | Encoding method, encoding apparatus, decoding method, decoding apparatus, program, and recording medium | |
| KR102296153B1 (en) | Dedicated arithmetic encoding instruction | |
| JP6766264B2 (en) | Encoding device, decoding device, coding method, decoding method, and program | |
| CN113243085B (en) | Transformation device, encoding device, decoding device, methods thereof, and recording medium | |
| JP4848049B2 (en) | Encoding method, decoding method, apparatus thereof, program, and recording medium | |
| JP7173134B2 (en) | Encoding device, decoding device, encoding method, decoding method, program, and recording medium | |
| JP4871420B2 (en) | Encoding method, encoding apparatus, decoding method, decoding apparatus, and program | |
| JP2025024868A (en) | Decoder, Encoder, Decoding Method, and Encoding Method | |
| JP4787889B2 (en) | Encoding method, encoding apparatus, decoding method, decoding apparatus, program, and recording medium | |
| Xiao et al. | A lossless audio compression software for Windows application | |
| JP2010191154A (en) | Coding method, coding device, decoding method, decoding device, program and recording medium | |
| JP2021064900A (en) | Information processing device, information processing method, and program | |
| JPH0828668B2 (en) | Audio signal encoding method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20191118 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20210202 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20210323 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20210413 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20210426 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 6885466 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| S533 | Written request for registration of change of name |
Free format text: JAPANESE INTERMEDIATE CODE: R313533 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |