JP5409196B2 - Encoding method and decoding method - Google Patents
Encoding method and decoding method Download PDFInfo
- Publication number
- JP5409196B2 JP5409196B2 JP2009196037A JP2009196037A JP5409196B2 JP 5409196 B2 JP5409196 B2 JP 5409196B2 JP 2009196037 A JP2009196037 A JP 2009196037A JP 2009196037 A JP2009196037 A JP 2009196037A JP 5409196 B2 JP5409196 B2 JP 5409196B2
- Authority
- JP
- Japan
- Prior art keywords
- state
- value
- weight
- index
- code
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Error Detection And Correction (AREA)
Description
本発明は、デジタルデータの符号化方法および復号方法に関し、詳細には、nビットの入力データを、所定の拘束条件のもとで冗長ビットを含むコード長Nの符号に変換する符号化方法と、前記拘束条件のもとで変換された符号を、元のnビットのデータに復号する復号方法、さらには、それらの方法を実施する符号化装置と復号装置に関する。 The present invention relates to a digital data encoding method and decoding method, and more specifically, an encoding method for converting n-bit input data into a code having a code length N including redundant bits under a predetermined constraint condition, and Further, the present invention relates to a decoding method for decoding a code converted under the constraint condition into original n-bit data, and further relates to an encoding device and a decoding device that implement these methods.
デジタル方式の伝送又は記録システムでは、入力データを伝送又は記録に適した符号に変換する際に、種々の目的で冗長ビットを付加する 。符号に冗長ビットを持たせる方法として、与えられたnビットの入力データに対して符号長Nの符号が満たすべき一定の規則(constraint)を定め、この規則(以下「拘束条件」という。)のもとで入力データから符号への変換を行う方法が存在する(特許文献1、非特許文献1)。ここで、入力データのビット数nと符号の符号長Nとの比(=n/N)は、符号化率と呼ばれ、N−n=Kが冗長ビット数となる。拘束条件の下では、この符号化率を理論上可能な最大値(シャノン・キャパシティと呼ばれる。)に近付けるほど、符号化及び復号の手順が複雑となる。
In a digital transmission or recording system, redundant bits are added for various purposes when converting input data into a code suitable for transmission or recording. As a method of giving a redundant bit to a code, a certain rule (constraint) to be satisfied by a code having a code length N is determined for given n-bit input data, and this rule (hereinafter referred to as “constraint condition”) is determined. There is a method for converting input data into code (
上記拘束条件付きの符号化については種々の技術が存在するが、そのうちキャパシティに近い符号化率を達成するための方法の1つとして、数え上げ符号化(enumerative coding)がある。この方法では、nビットの入力データの取りうる数値全てについて、それぞれの順位を算出し、これをインデクスと定義する。そして、コード長Nの符号の集合のうち拘束条件を満たす全ての符号を抽出し、インデクスの集合と、抽出した符号の集合との間に1対1の対応関係を付与しておくことで、実際の信号処理に際し、この対応関係に基づいて符号への変換及び入力データへの復号を実行する。ここで、インデクスと符号との対応関係は、ルックアップテーブルによって規定することができる。しかしながら、このルックアップテーブルによる対応付けの方法は、入力データのビット数が大きくなると困難になる。例えば、入力データが200ビット(n=200)である場合は、上記ルックアップテーブルにおいて、2の200乗の数の対応関係を設定しておく必要が生じることから、その実現は、技術的に困難である。 Various techniques exist for the above-mentioned coding with constraints, and one of the methods for achieving a coding rate close to capacity is enumerated coding. In this method, ranks are calculated for all possible numerical values of n-bit input data, and this is defined as an index. Then, by extracting all codes satisfying the constraint condition from the set of codes with the code length N, and assigning a one-to-one correspondence between the index set and the extracted code set, In actual signal processing, conversion to code and decoding to input data are executed based on this correspondence. Here, the correspondence between the index and the code can be defined by a lookup table. However, this association method using the lookup table becomes difficult when the number of bits of input data increases. For example, when the input data is 200 bits (n = 200), it is necessary to set the correspondence of 2 to the 200th power in the lookup table. Have difficulty.
また、数え上げ符号化においては、ある拘束条件の下で、トレリス線図を用いて符号化と復号を行うことが行われる。このときには、ルックアップテーブルの他にも、トレリス線図上のパスの総計と、トレリス線図上の各状態から最終状態までのパス数に基づく重みが計算上必要になる。例えば、N=4000ともなると、拘束条件として17個の状態を取りうるトレリス線図を考えると、その重みを保存するために必要なメモリーは、4000*(2*8+1)*4000=30MBにも達するため、ハードウエアの制約上実現することは不可能であるといえる。 In counting encoding, encoding and decoding are performed using a trellis diagram under a certain constraint condition. In this case, in addition to the look-up table, the total number of paths on the trellis diagram and the weight based on the number of paths from each state to the final state on the trellis diagram are necessary for calculation. For example, when N = 4000, considering a trellis diagram that can take 17 states as a constraint, the memory required to store the weight is 4000 * (2 * 8 + 1) * 4000 = 30 MB. Therefore, it cannot be realized due to hardware limitations.
本発明は、数え上げ符号化において、入力データのインデクスと符号との対応関係を計算できるようにし、対応付けのためのルックアップテーブルを不要とし、重みを予め算出して保存しておくことを不要とすることを目的とする。 The present invention makes it possible to calculate the correspondence between the index of the input data and the code in counting encoding, eliminates the need for a lookup table for association, and eliminates the need to calculate and store weights in advance. It aims to be.
本発明に係る符号化方法は、nビットの入力データを、所定の拘束条件のもとで冗長ビットを含むNビットの符号に変換する符号化方法であって、nビットのデータを受け付けて、初期化を行うステップと、受け付けたnビットのデータに対するインデクスを決定するインデクス決定ステップと、前記拘束条件のもとで定められるトレリス線図において、次時点のある状態を始点とした場合に前記トレリス線図において終点に至るまでにとり得るパスの総数を次時点の当該状態の重みと定義し、その重みあるいはそれに近似する値を算出する重み算出ステップと、現時点から次の時点への状態の遷移をインデクスと次時点の状態の重みあるいはそれに近似する値とに基づいて、現時点の状態から続く複数のパスのうちいずれか1つを選択することにより決定するパス決定ステップと、決定されたパスに対して予め割り当てられた値を符号のシンボル値として決定するシンボル値決定ステップと、決定されたパスに基づいてそのパスが所定の条件に当てはまる場合にインデクスを正規化する正規化ステップと、パス決定ステップにおいて決定したパスに従って状態を次の時点に遷移させて状態を更新する状態更新ステップと、重み算出ステップから状態更新ステップまでをN回繰り返す繰り返しステップと、決定ステップで決定された数値の列を符号として出力する符号出力ステップとを含んでなる方法である。 An encoding method according to the present invention is an encoding method for converting n-bit input data into an N-bit code including redundant bits under a predetermined constraint condition, and accepting n-bit data, In the initialization step, an index determination step for determining an index for the received n-bit data, and a trellis diagram determined under the constraint condition, the trellis when the state at the next time point is set as a start point The total number of paths that can be taken to reach the end point in the diagram is defined as the weight of the state at the next time point, the weight calculation step for calculating the weight or a value approximate thereto, and the state transition from the current time point to the next time point Select one of a plurality of paths from the current state based on the index and the weight of the state at the next time point or a value approximate thereto A path determination step determined by the above, a symbol value determination step for determining a value assigned in advance to the determined path as a symbol value of the code, and the path satisfies a predetermined condition based on the determined path In this case, the normalization step for normalizing the index, the state update step for updating the state by changing the state to the next time point according to the path determined in the path determination step, and the weight calculation step to the state update step are repeated N times. This is a method including a repetition step and a code output step for outputting the sequence of numerical values determined in the determination step as a code.
また、本発明にかかる第1の復号方法は、所定の拘束条件のもとで冗長ビットを含んで符号化した符号を、もとのnビットのデータに復号する復号方法であって、符号を受け付けて、初期化を行うステップと、前記拘束条件のもとで定められるトレリス線図において前記符号に含まれる個々の時点に対応するビットのシンボル値に応じて該トレリス線図上で状態が右へと1時点進むパスを特定するパス特定ステップと、トレリス線図において時点kのある状態を始点とした場合にとり得る全ての終点に至るまでのパスの総数をその時点kにおける当該状態の重みとして定義し、前記特定したパスについて、現時点に対応する符号内の数値が所定の値であることによって切り捨てられるパスに続く状態の重みあるいはそれに近似する値を算出する重み算出ステップと、切り捨てられた重みあるいはそれに近似する値がある場合にのみその切り捨てられた重みあるいはそれに近似する値の値をインデクスに加算するインデクス加算ステップと、パス特定ステップにおいて特定したパスに従って状態を次の時点に遷移させて状態を更新する状態更新ステップと、前記パス特定ステップから状態更新ステップまでを符号に含まれている全てのシンボル値について繰り返すインデクス積算値算出ステップと、算出したインデクスの値をもとのデータのインデクスとして決定するとともに、もとのデータとそのインデクスとの間の予め定められた関係に基づいて、もとのデータを出力するステップとを含んでなる方法である。 A first decoding method according to the present invention is a decoding method for decoding a code encoded with redundant bits under a predetermined constraint condition into original n-bit data, wherein the code is Accepting and initializing, and in the trellis diagram determined under the constraint conditions, the state on the trellis diagram is right according to the symbol value of the bit corresponding to each time point included in the code A path specifying step for specifying a path that advances to one point in time, and the total number of paths up to all possible end points when a state with point k in the trellis diagram is set as the starting point is used as a weight of the state at that point k. For the identified path, the weight of the state following the path that is truncated when the numerical value in the code corresponding to the current time is a predetermined value or a value approximate thereto is calculated. State according to the path specified in the weight calculation step, the index addition step for adding the value of the truncated weight or its approximate value to the index only when there is a truncated weight or its approximate value, and the path specifying step A state update step that updates the state by transitioning to the next time point, an index integrated value calculation step that repeats the process from the path identification step to the state update step for all symbol values included in the code, and the calculated index And determining a value as an index of the original data, and outputting the original data based on a predetermined relationship between the original data and the index.
さらに、本発明にかかる第2の復号方法は、所定の拘束条件のもとで冗長ビットを含んで符号化した符号を、もとのnビットのデータに復号する復号方法であって、符号を受け付けるステップと、前記拘束条件のもとで定められるトレリス線図において、符号に基づいて、その符号に対応する最終状態を決定するステップと、前記最終状態を出発点として、インデクスをゼロに設定する初期化ステップと、符号に含まれる個々の時点に対応するビットのシンボル値に応じて該トレリス線図上で状態が左へ1時点戻るパスを特定するパス特定ステップと、トレリス線図において時点kのある状態を始点とした場合にとり得る全ての終点に至るまでのパスの総数をその時点kにおける当該状態の重みとして定義し、前記特定したパスについて、現時点に対応する符号内の数値が所定の値であることによって、時点が一つ戻る際に切り捨てられるパスに続く状態の重みあるいはそれに近似する値を算出する重み算出ステップと、切り捨てられた重みあるいはそれに近似する値がある場合にのみその切り捨てられた重みあるいはそれに近似する値をインデクスに加算するインデクス加算ステップと、パス決定ステップにおいて選択したパスに従って状態を前の時点に遷移させて状態を更新する状態更新ステップと、前記パス特定ステップから状態更新ステップまでを符号に含まれている全てのシンボル値について繰り返すインデクス積算値算出ステップと、算出したインデクスの値をもとのデータのインデクスとして決定するとともに、もとのデータとそのインデクスとの間の予め定められた関係に基づいて、もとのデータを出力するステップとを含んでなる方法である。 Furthermore, a second decoding method according to the present invention is a decoding method for decoding a code encoded with redundant bits under a predetermined constraint condition into original n-bit data, wherein the code is In the accepting step, in the trellis diagram determined under the constraint condition, on the basis of the code, determining the final state corresponding to the code, and setting the index to zero starting from the final state An initialization step, a path specifying step for specifying a path whose state returns one time point to the left on the trellis diagram according to a symbol value of a bit corresponding to each time point included in the code, and a time point k in the trellis diagram The total number of paths up to all possible end points when a certain state is a starting point is defined as the weight of the state at that time k. When the numerical value in the code corresponding to the point is a predetermined value, a weight calculation step for calculating the weight of the state following the path that is truncated when the time is returned or a value approximate thereto, and the truncated weight or An index addition step that adds the truncated weight or an approximate value to the index only when there is an approximate value, and updates the state by transitioning the state to the previous time according to the path selected in the path determination step. A state update step, an index integrated value calculation step that repeats from the path identification step to the state update step for all symbol values included in the code, and the calculated index value is determined as an index of the original data Pre-determined between the original data and its index Based on the relationship, a method comprising the step of outputting the original data.
これらの本発明の符号化または復号方法においては、重み算出ステップにおいて、ビットシフトによる2の累乗の計算と、前記トレリス線図に対応する遷移行列の最大固有値に関連する既に計算され、記憶手段に保存された値を含むルックアップテーブルと、前記遷移行列の固有ベクトルとを用いて重みを算出することができる。 In these encoding or decoding methods of the present invention, in the weight calculation step, calculation of the power of 2 by bit shift and the maximum eigenvalue of the transition matrix corresponding to the trellis diagram are already calculated and stored in the storage means. A weight can be calculated using a lookup table including stored values and the eigenvector of the transition matrix.
更に本発明は符号化装置および復号装置にも関する。本発明の符号化装置は、nビットの入力データを、所定の拘束条件のもとで冗長ビットを含むNビットの符号に変換する符号化装置であって、nビットのデータを受け付けて、初期化を行い、そのデータに対するデータ系列内の順位を示すインデクスを算出するインデクス計算部と、前記拘束条件のもとで定められるトレリス線図において、次時点のある状態を始点とした場合に前記トレリス線図において終点に至るまでにとり得るパスの総数を次時点の状態の重みと定義して、その重みあるいはそれに近似する値を算出する重み算出部と、現時点から次時点への状態の遷移をインデクスと次時点の状態の重みあるいはそれに近似する値とに基づいて、現時点の状態から続く複数のパスのうちいずれか1つを選択することにより決定し、決定されたパスに対して予め割り当てられた値を符号のシンボル値として決定し、決定されたパスに基づいてそのパスが所定の条件に当てはまる場合にインデクスを正規化する比較・出力部と、決定したパスに従って状態を次の時点に遷移させて状態を更新する状態更新部とを備えており、重み算出から状態更新までをN回繰り返すものである符号化装置である。 The invention further relates to an encoding device and a decoding device. An encoding apparatus according to the present invention is an encoding apparatus that converts n-bit input data into an N-bit code including redundant bits under a predetermined constraint condition. And an index calculation unit that calculates an index indicating the rank in the data series for the data, and a trellis diagram defined under the constraint condition, the trellis In the diagram, the total number of paths that can be taken to reach the end point is defined as the weight of the state at the next time point, a weight calculation unit that calculates the weight or a value approximate thereto, and the state transition from the current time point to the next time point And selecting one of a plurality of paths continuing from the current state based on the weight of the state at the next time point or a value approximate thereto, and A pre-assigned value for a given path is determined as a symbol value of the code, and based on the determined path, a comparison / output unit that normalizes an index when the path meets a predetermined condition is determined And a state updating unit that updates the state by changing the state to the next time point according to the path, and repeats N times from the weight calculation to the state update.
また、本発明の第1の復号装置は、所定の拘束条件のもとで冗長ビットを含んで符号化した符号を、もとのnビットのデータに復号する復号装置であって、符号を受け付けて、初期化を行い、前記拘束条件のもとで定められるトレリス線図において前記符号に含まれる個々の時点に対応するビットのシンボル値に応じて該トレリス線図上で状態が右へと1時点進むパスを特定して、状態更新を行う状態更新部と、トレリス線図において時点kの状態を始点とした場合にとり得る全ての終点に至るまでのパスの数をその時点kにおける状態の重みとして定義し、前記特定したパスについて、現時点に対応する符号内の数値が所定の値であることによって切り捨てられるパスに続く状態の重みあるいはそれに近似する値を算出する重み算出部と、切り捨てられた重みあるいはそれに近似する値がある場合にその切り捨てられた重みあるいはそれに近似する値をインデクスに加算するインデクス計算部とを備えており、状態更新からインデクス計算を符号に含まれている全てのシンボル値について繰り返して、最終的なインデクスの積算値に基づいてもとのデータを出力する復号装置である。 The first decoding device of the present invention is a decoding device that decodes a code encoded with redundant bits under a predetermined constraint condition into original n-bit data, and accepts the code. In the trellis diagram determined under the constraint conditions, the state is set to 1 on the trellis diagram according to the symbol value of the bit corresponding to each time point included in the code. A state update unit that performs state update by specifying a path to be progressed at a time point, and the number of paths up to all possible end points when the state at the time point k is a start point in the trellis diagram, the weight of the state at the time point k A weight calculation unit that calculates a weight of a state following a path that is rounded down by a numerical value in a code corresponding to the current time being a predetermined value or a value approximate thereto for the identified path; It includes an index calculation unit that adds the discarded weight or its approximate value to the index when there is a discarded weight or its approximate value, and includes the index calculation from the state update in the code This is a decoding device that repeats all symbol values and outputs original data based on the integrated value of the final index.
更に、本発明の第2の復号装置は、所定の拘束条件のもとで冗長ビットを含んで符号化した符号を、もとのnビットのデータに復号する復号装置であって、符号を受け付けて、前記拘束条件のもとで定められるトレリス線図において、該符号に基づいて最終時点の状態を特定し、初期化を行う最終状態特定部と、前記トレリス線図において前記符号に含まれる個々の時点に対応するビットのシンボル値に応じて該トレリス線図上で状態が左へと1時点戻るパスを特定して、状態更新を行う状態更新部と、トレリス線図において時点kの状態を始点とした場合にとり得る全ての終点に至るまでのパスの数をその時点kにおける状態の重みとして定義し、前記特定したパスについて、現時点に対応する符号内の数値が所定の値であることによって切り捨てられるパスに続く状態の重みあるいはそれに近似する値を算出する重み算出部と、切り捨てられた重みあるいはそれに近似する値がある場合にその切り捨てられた重みあるいはそれに近似する値をインデクスに加算するインデクス計算部とを備えており、状態更新からインデクス計算を符号に含まれている全てのシンボル値について繰り返して、最終的なインデクスの積算値に基づいてもとのデータを出力する復号装置である。 Furthermore, the second decoding device of the present invention is a decoding device that decodes a code encoded with redundant bits under a predetermined constraint condition into original n-bit data, and accepts the code. In the trellis diagram determined under the constraint conditions, the final state specifying unit for specifying and initializing the state at the final time point based on the code, and the individual included in the code in the trellis diagram A state update unit that updates the state by identifying a path whose state returns to the left by one point on the trellis diagram according to the symbol value of the bit corresponding to the point in time, and a state at the point k in the trellis diagram. By defining the number of paths up to all possible end points as the start point as the weight of the state at that time k, the numerical value in the code corresponding to the current time for the specified path is a predetermined value A weight calculation unit that calculates a weight of a state following a path to be discarded or a value approximate thereto, and if there is a weight that has been truncated or a value that approximates it, the weight that is truncated or a value approximate to it is added to the index And an index calculation unit, which repeats index calculation from state update for all symbol values included in the code, and outputs original data based on the integrated value of the final index .
これらの符号化装置または復号装置においては、重み算出部が、ビットシフトによる2の累乗の計算と、前記トレリス線図に対応する遷移行列の最大固有値に関連する既に計算され、記憶手段に保存された値を含むルックアップテーブルと、前記遷移行列の固有ベクトルとを用いて重みあるいはそれに近似する値を算出するものとすることができる。 In these encoding devices or decoding devices, the weight calculation unit has already calculated the power of 2 by bit shift and the maximum eigenvalue of the transition matrix corresponding to the trellis diagram, and stored in the storage means. It is possible to calculate a weight or a value approximating it using a look-up table including the measured value and the eigenvector of the transition matrix.
本発明によれば、入力データから符号への変換において、トレリス線図上で状態が遷移していくパスを指標として、各状態から次の状態への重みを当該状態から最終の状態のいずれかまでのパスの総数に対応する重みの値を数値計算し、この計算された重みの値に基づいて、ある入力データのインデクスから符号を求める。符号化の過程で実行されるこの重みの計算が本発明においては重要となる。本発明においては、トレリス線図上の各状態からのパスの総数をカウントしたり、記憶して用いることはない。また、もとのデータと符号の直接的な対応付与のためのルックアップテーブルを用いることもない。これにより、状態が遷移するパスに基づいて入力データのインデクスと符号との対応関係を決定することが可能となるので、もとのデータと符号の直接的な対応付与のための、非常に大きなものとなるルックアップテーブルが不要となり、拘束条件下にあって、入力データの桁数が相当大きな場合でも、パスの選択という比較的簡単な手法によって高い符号化率を達成することができる。 According to the present invention, in the conversion from the input data to the code, the path from the state to the next state is set to any one of the final state from the state using the path of the state transition on the trellis diagram as an index. The numerical value of the weight corresponding to the total number of paths up to is calculated, and the code is obtained from the index of certain input data based on the calculated weight value. This weight calculation performed in the process of encoding is important in the present invention. In the present invention, the total number of paths from each state on the trellis diagram is not counted or stored. In addition, a lookup table for directly assigning the correspondence between the original data and the code is not used. As a result, it is possible to determine the correspondence between the index of the input data and the code based on the path where the state transitions. Therefore, it is very large for providing a direct correspondence between the original data and the code. Thus, even if the number of digits of input data is considerably large under constraint conditions, a high coding rate can be achieved by a relatively simple method of path selection.
同様に、符号からもとのデータへの復号では、トレリス線図上で状態が遷移するパスを、入力した符号内の数値に基づいて特定することが可能である。従って、符号への変換に際して切り捨てられるパスの数(重み)に基づいて符号ともとのデータのインデクスとの対応関係を判断し、符号ともとのデータの直接的な対応付与のための非常に大きなルックアップテーブルによらずに、もとのデータのインデクスを算出して、復号を達成することができる。本発明によれば、重みは数値計算する。重みを得るために、各状態についてパスをカウントしたり、パスの総数を記憶して用いる必要はない。 Similarly, in decoding from a code to the original data, it is possible to specify a path whose state transitions on the trellis diagram based on a numerical value in the input code. Therefore, the correspondence relationship between the code and the original data index is determined based on the number of paths (weights) to be cut off when converting to the code, and it is very large for providing a direct correspondence between the code and the original data. The decoding of the original data can be achieved by calculating the index of the original data without using the lookup table. According to the present invention, the weight is calculated numerically. There is no need to count the paths for each state or store and use the total number of paths to obtain the weight.
以下に図面を参照して、本発明の実施の形態について説明する。 Embodiments of the present invention will be described below with reference to the drawings.
図1は、本発明の第1の実施形態に係る符号化装置の構成を示すブロック図である。本実施形態では、図2にその概要を示すnビットの入力データiを、所定の拘束条件(constraint)のもとでKビットの冗長ビットを含むコード長Nの符号cに変換する(N=n+K)。 FIG. 1 is a block diagram showing a configuration of an encoding apparatus according to the first embodiment of the present invention. In this embodiment, the n-bit input data i, whose outline is shown in FIG. 2, is converted into a code c having a code length N including K redundant bits under a predetermined constraint (N = n + K).
図1に示すインデクス算出部111は、入力データiを受け付けて、この入力データiのインデクスIを算出する。インデクスIは、nビットの入力データiの並びにおける順番を示す。本実施形態では、例えば、インデクスIとして、入力データiの十進数換算値(=0〜2n−1)を採用する。 ここで、入力データiの十進数換算値を採用しているのは、十進数の方が説明のためにわかりやすいからであり、実際の演算においては順位付けのためのインデクスとして入力データiをそのまま使用することができる。
An
図3は、入力データ(長さnビット)と、入力データの十進数換算値と、符号(長さN)との関係を、本実施形態について示している。ここで、nビットの入力データとNビットの符号は、一般的には、それぞれn個とN個のシンボル値の列として表現されるものである。シンボル値の代表的な例として2進値があることはいうまでもなかろうが、2進値に限定されるものでもない。本明細書ではシンボル値が2進値の場合を例に説明する。U(i)は、nビットの入力される可能性のある2進数データを並べた列を示す。I(i)は、このnビットの入力データの十進数換算値の列を示している。列I(i)に対して各換算値の脇に示す1〜2nの表示は、十進数換算値=0を先頭とした増方向の順位であり、これをインデクスIと呼ぶ。入力データiの十進数換算値が0の場合にインデクスIも0となり、十進数が増大するに従ってインデクスIは増大していく。 FIG. 3 shows the relationship between the input data (length n bits), the decimal conversion value of the input data, and the code (length N) in this embodiment. Here, the n-bit input data and the N-bit code are generally expressed as strings of n and N symbol values, respectively. Needless to say, there is a binary value as a representative example of the symbol value, but it is not limited to the binary value. In this specification, a case where the symbol value is a binary value will be described as an example. U (i) represents a column in which binary data that may be inputted with n bits is arranged. I (i) indicates a column of decimal conversion values of the n-bit input data. The display of 1 to 2n shown beside each conversion value for the column I (i) is an increasing order starting from decimal conversion value = 0, and this is referred to as index I. When the decimal conversion value of the input data i is 0, the index I is also 0, and the index I increases as the decimal number increases.
図3に例示するように、例えば、全てゼロの値からなるnビットの入力データがあったとき、それに対応するNビットの符号は、冗長性を付与するために、何らかの規則に基づいて0または1が付加されている。 同様に、U(i)の最後にある全てが1の入力データに対する符号には付加的な0または1が含まれている 。そして、Nビットの符号には入力データとの対応関係がないm個の符号が含まれている。拘束条件を満たすNビットの符号列(図3)をC(M,N)と呼ぶ。Mは拘束条件に関連した定数を表すものであり、Nは上と同じように冗長性が加わった符号のビット数である。そして、符号化と復号は、インデクスを介した、入力データ列とC(M,N)の要素との対応付けによって行うことができる。集合C(M,N)にある要素の個数をPとすると、理論上、Pが2のn乗の値以上であれば、符号化と復号ができることとなる。そのような条件を満たす最小のNの値をNminとすれば、数え上げ符号化の理論限界あるいはシャノン・キャパシティに近い符号化率は、n/Nminということになる。 As illustrated in FIG. 3, for example, when there is n-bit input data consisting of all zero values, the corresponding N-bit code is 0 or 0 based on some rule to provide redundancy. 1 is added. Similarly, the code for the input data of all 1s at the end of U (i) includes an additional 0 or 1. The N-bit code includes m codes that have no correspondence with input data. An N-bit code string (FIG. 3) that satisfies the constraint condition is called C (M, N). M represents a constant related to the constraint condition, and N is the number of bits of the code to which redundancy is added in the same manner as above. Encoding and decoding can be performed by associating an input data string with an element of C (M, N) via an index. Assuming that the number of elements in the set C (M, N) is P, theoretically, if P is equal to or greater than 2 to the power of n, encoding and decoding can be performed. If the minimum value of N that satisfies such conditions is N min , the coding rate close to the theoretical limit of counting encoding or Shannon capacity is n / N min .
図4に、本実施形態にかかる拘束条件を表現したトレリス線図を示す。図4のトレリス線図における線の交点は、その時点kにおいて取りうる状態Skを示す。そして、入力データから符号への変換において、ランニングデジタルサム(RDS、Running Digital Sum)によって拘束条件を付与する。RDSは、符号の「1」と「0」にそれぞれ値「+1」(トレリス線図においては斜め上への遷移を意味する)と値「−1」(同じく斜め右下への遷移を意味する)を対応させて計算できる、符号列の開始点からのこれらの値の総和を表す。具体的には、RDSの計算は、時点kから時点k+1の遷移に対応する、下記の手順で決定された符号の値が「0」であれば−1を、「1」であれば1を、時点毎に逐次加算していくことによる。換言すれば、RDSの値を縦軸とするトレリス線図において、ある時点kから時点k+1の遷移に対応する符号の値が「0」である場合は、次時点k+1に向けて状態SkからRDSを一つ減らす方向(斜め下)にある状態Sk+1へと遷移させる一方、「1」である場合は、RDSを一つ増やす方向(斜め上)に状態Skを遷移させる。そして、所与の拘束条件により、このRDSの取りうる値を制限している。 FIG. 4 shows a trellis diagram expressing the constraint conditions according to the present embodiment. The intersection of the lines in the trellis diagram of FIG. 4 indicates a state S k that can be taken at that time k. And in the conversion from input data to a code | symbol, a constraint condition is provided by a running digital sum (RDS, Running Digital Sum). The RDS sign “1” and “0” have a value “+1” (meaning a transition upward in the trellis diagram) and a value “−1” (also meaning a transition downward in the right direction). ) Represents the sum of these values from the start point of the code string. Specifically, the RDS calculation is -1 if the value of the sign determined in the following procedure corresponding to the transition from the time point k to the time point k + 1 is “0”, and 1 if it is “1”. By sequentially adding each time point. In other words, in the trellis diagram having the RDS value as the vertical axis, if the value of the code corresponding to the transition from a certain time point k to the time point k + 1 is “0”, the state S k is moved toward the next time point k + 1. While the transition is made to the state S k + 1 in the direction in which RDS is decreased by one (diagonally below), in the case of “1”, the state S k is transited in the direction in which RDS is increased by one (obliquely). The value that can be taken by the RDS is limited by a given constraint condition.
図4のトレリス線図が表す拘束条件は、RDSを+2から−2の間に制限するものである。RDS=0から出発するとして、入力データに1または0が2回続いたら、その次には、それぞれ0または1を入れるというものである。つまり、ランニングデジタルサム(RDS)をM=2とすることで±2の範囲に限定する。 The constraint condition represented by the trellis diagram of FIG. 4 limits RDS between +2 and −2. Starting from RDS = 0, if 1 or 0 continues in the input data twice, then 0 or 1 is inserted next. That is, the running digital sum (RDS) is limited to a range of ± 2 by setting M = 2.
ここでは、例として、N=10として、M=2としているが、N=10は説明のために意図的に小さな数をあえて選んだものである。本発明は、N=20以上、数千といった大きなビット数の符号に適用することができるものである。同様にM=2も本発明の範囲を限定するような数値ではまったくない。この例において、C(2,10)の要素の合計は、324個である。したがって、このC(2,10)を使って、n=8、2の8乗が258であるので、8ビットの入力データを符号化することができることが分かる。 Here, as an example, N = 10 and M = 2, but N = 10 is intentionally selected to be a small number for the purpose of explanation. The present invention can be applied to codes having a large number of bits such as N = 20 or more and thousands. Similarly, M = 2 is not a numerical value that limits the scope of the present invention. In this example, the total number of C (2,10) elements is 324. Therefore, it can be understood that 8-bit input data can be encoded using C (2,10) because n = 8 and the eighth power of 2 are 258.
そして、図4中の各交点の近くに記載した数字は、その交点が表す状態Skを始点とした場合にこの線図においてとり得る終点S10のいずれかに至るまでのパスの数を示している。言い換えれば、状態Skから終点S10に至るまでの、時点間のパスセグメントの組み合わせの数である。状態Sk+1についてのこのパス数を、状態Skから状態Sk+1への遷移を考える際に重みWkとして用いる。例えば、時点0において、状態S0は、RDSの定義上、RDS=0の1点にのみ存在し、全ての終点S10(RDS=−2,0,2の3つの状態)に至るまでの可能なパスの数(重みW0)は324である。すなわち、時点k=0から時点k=1への遷移を考えるためには、遷移先として状態S1(−1)と状態S1(1)があって、それぞれに向けた遷移の重みW1(−1)=162とW1(1)=162があることになる(W1のかっこ内はRDSの値sを表す)。時点k=2では、全部で3点の状態S2(−2)、S2(0)、S2(2)(それぞれRDS=−2,0,2に対応する)が存在し、時点k=1から時点k=2に向けた各状態の重みW2は、図面に向かって下からW2(−2)=54(RDS=−2),W2(0)=108(RDS=0),W2(2)=54(RDS=2)である。
Then, the numbers described near each intersection in Figure 4 shows the number of paths leading up to one of the end points S 10 which can be taken in this diagram when starting from the state S k represented by the intersection ing. In other words, from state S k until reaching the end point S 10, the number of combinations of path segments between the time points. The number of passes about the state S k + 1, is used as a weight W k when considering a transition from state S k to state S k + 1. For example, at the
図4のスタートを見ると、RDS=0から始まるものとして、図4に例示したC(M,N)の要素であるパスP1が0011101100111であるとすると、まず、最初の符号が0なのでRDS=−1に遷移し、次の符号がまた0であるので、RDS=−2に遷移する。その後、1が3回続くのでRDS=+1に遷移し、次に0が2回続くので一旦RDS=−1になるが、その後1が3回続くのでRDS=2で終わる。このように、P1は拘束条件を満たすことが改めてわかる。例示したP2=0110110001およびP3=1000110111についても同様である。そして、このようなP1からPnを入力データに対応づける。 Looking at the start of FIG. 4, assuming that the path P1 that is the element of C (M, N) illustrated in FIG. 4 is 0011101100111, assuming that RDS = 0, first, since the first code is 0, RDS = Transition to −1 and the next code is also 0, so transition to RDS = −2. After that, since 1 continues three times, the transition is made to RDS = + 1. Next, 0 continues twice, so RDS = −1. However, since 1 continues three times, RDS = 2 ends. Thus, it can be seen again that P1 satisfies the constraint condition. The same applies to the exemplified P2 = 0101101001 and P3 = 1000110111. Such P1 to Pn are associated with input data.
なお、別の拘束条件としては、非特許文献2において、NRZ(Non Return to Zero)方式で符号を表した場合に、符号「1」及び符号「0」にそれぞれ値「+1」及び値「−1」を対応させると共に1ビットおきに値「−1」を乗じた場合の、連続する符号列の開始時点からの総和を表すADS(Alternate Digital Sum)とRDSとの双方を考慮したFSTDも提案されている。このようなFSTDも本発明の対象となる。また、RLL(runlength-limited constraint)や、MTR(mazimum transition run constraint)といった拘束条件も同様に利用することができ、より複雑な符号の作成と復号を行うことができる。RLL(d,k)という拘束条件は、1と1の間に0の個数が最小d個、最大k個あるように拘束するものである。また、MTRは、連続変化の101010あるいは010101の個数を制限するものであり、NRZI方式におけるMTR(j; k)は、連続1の個数をj個に、連続0の個数をkに拘束するものである。
As another constraint condition, in
比較・出力部112は、インデクス算出部111によって算出したインデクスIと、次に述べる重み算出部113によって算出した重みW(=Wk+1)とを比較し、符号のトレリス線図上で状態を遷移させる際のパスを選択するとともに、選択したパスに対して予め割り当てられた「0」又は「1」の数値を、時点毎に符号の値として出力する。
The comparison /
重み算出部113は、上記のトレリス線図について、時点kにおいてRDSの値がsの状態Sk (s)を始点とした場合にこの線図においてとり得る全ての終点SNに至るまでのパスの総数である重みWkを算出する。具体的には、本実施形態に係る符号化装置は、トレリス線図上の状態Sk(s)についての重みWk(s)を算出する重み算出部113を有する。この重み算出部113では、トレリス線図に対応して得られる遷移行列T(遷移行列生成部125)と、その遷移行列Tについて計算された右固有値の最大のものλmax(最大固有値算出部127)と、同じく遷移行列Tの固有ベクトルの成分の値R(s)(本実施形態の拘束条件下ではs =−2〜2の整数)(固有ベクトル算出部126)を用いて、下に説明する計算式により重みWk(s)を計算することができる。パラメータ算出部121は、これらの遷移行列生成部125と、固有ベクトル算出部126、最大固有値算出部127からなるものであるが、これは、本発明の装置の一部とする必要は必ずしもない。設定した拘束条件に対応して、遷移行列が決定し、その遷移行列の固有ベクトルと最大固有値を予め求めておいて、重みの数値計算に用いることができる。ここで、上記比較出力部112は、重み算出部113から次時点k+1における状態の重みWk+1を受け付けて、インデクスIと入力した重みWk+1とを比較して、次時点k+1に向けて状態を遷移させるパスを選択する。
For the trellis diagram described above, the
状態更新部115は、比較出力部112によって選択したパスに従って状態を遷移させ、状態を更新する(状態をSkからSk+1に進める)。
図4は、本実施形態に係る符号のトレリス線図と、3つの異なる符号を出力する際に選択されるパスP1〜P3とを示している。実線によって示すパスP1は、符号c1=(0011100111)を出力する際のパスであり、点線及び一点鎖線は、符号c2=(0110110001)及び符号c3=(1000110111)を出力する際のパスP2,P3を夫々示している。 FIG. 4 shows a trellis diagram of codes according to the present embodiment and paths P1 to P3 that are selected when three different codes are output. A path P1 indicated by a solid line is a path when outputting the code c 1 = (0011100111), and a dotted line and a one-dot chain line are paths when outputting the code c 2 = (0110110001) and the code c 3 = (1000110111). P2 and P3 are shown respectively.
上述のように、パスP1〜P3が表す符号 c1〜c3は、いずれもM=2の拘束条件を満たす。例えば、パスP1では、時点0においてRDS=0であり、符号c1の1ビット目及び2ビット目の数値がいずれも「0」であるから、時点0及び1の状態S0,S1のそれぞれについてRDSを一つ減ずる方向のパスが選択される。従って、時点2において、RDSは−2となる。続く3〜5ビット目では数値が「1」であるから、状態S2〜S4について選択されるパスはRDSを一つ増やす方向に切り換わり、時点5までにRDSは1に増加する。そして、6及び7ビット目では再度「0」となり、8ビット目以降では「1」となるから、最終的なRDSの値は2であり、このパスP1が表す符号c1は、上記拘束条件を満たす。他の符号P2,P3についても同様である。ここで、パスP2については時点1でパスP1から分離し、パスP3については時点0でパスP1から分離する。従って、C(M,N)に含まれる拘束条件を満たす全ての符号について、トレリス線図上で異なるパスがあることになる。
As described above, the symbols c1 to c3 represented by the paths P1 to P3 all satisfy the constraint condition of M = 2. For example, in the path P1, since RDS = 0 at the
ここで、本実施形態に係る符号化装置の動作について、8ビットの入力データ00101001が入力された場合を例に説明する。結論からいえば、符号化装置は、図4のトレリス線図においてパスP1に沿って状態を遷移させ、この入力データを符号c1=(0011100111)に変換する。 Here, the operation of the encoding apparatus according to the present embodiment will be described by taking as an example the case where 8-bit input data 00100001 is input. In conclusion, the encoding device changes the state along the path P1 in the trellis diagram of FIG. 4 and converts this input data into code c 1 = (0011100111).
図5a〜5cは、入力データi=(00101001)を入力した場合における符号化装置(具体的には、比較出力部112及び状態更新部115)の動作を示している。まず、符合化装置は、入力した入力データiのインデクスIを算出する。既に述べたように、インデクスIは、入力データiの、0を先頭として数値が増えていく8ビット系列における順位であり、入力データiの十進数換算値41である 。
5a to 5c show the operation of the encoding device (specifically, the
図5aに示すように、時点0では、RDS=0のところに状態があるが、インデクスI=41が次の時点1における状態S1への遷移の可能性は、RDS=1の状態への遷移の可能性を表す重みW1(1)が162であり,RDS=−1の状態への遷移を表す重みW1(−1)も162となる。そして、全部で324の可能なパスのうちI=41がどのパスに属するかを判定するために、まずこの324のパスを数え上げて、下から1で始めて最上部において324で終わるパスを縦に並べた縦の列201を作成する。 インデクスI=41に対応する列の要素にはハッチを付して図示する。I=41の要素は、列201の下部のWi(−1)に対応する162個の要素に属するからRDSが一つ減る方向のパスに対応するものと判断する。つまり、時点k=1への遷移に対応する符号の値であるc1(1)はゼロになり、RDS=−1となる。
As shown in Figure 5a, the
この列201の上半分はもうパスとして通る可能性のないものになっているので、切り捨てて、次の列202を作る。すると、この列の要素は、最初の1から162までの要素を含むものとなる。状態S2への遷移を考えると重みはRDSが減る方向へはW2(−1)=54となり、W2(0)=108となる。そして、それを要素数162の列203で表現する。I=41がこの列203の下の54要素と上の108要素のどちらに対応するかを列202と対応付けてみると、下の54要素に含まれていることが分かる。このことはRDSが一つ減る方向を取ることを意味するので、時点k=2への遷移に対応する符号の値c1(2)についてc1(2)=0とする。すると、S2においては、RDS=−2の状態S2(−2)にあることになる。列203の上部にあるRDSが一つ増える方向への遷移(重みW2(0)の側)の可能性はないので、それを切り捨てて、列204ができる。
Since the upper half of this
ここで、拘束条件がM=2であるから、これ以上RDSが減ることはないので、状態S3(−1)へと遷移する以外になく、RDSが一つ増える方向へ遷移する。すなわち、c1(3)=1、RDS=−1となる。 Here, since the constraint condition is M = 2, the RDS does not decrease any more, so the transition is made in the direction in which the RDS is increased by one in addition to the transition to the state S 3 (−1). That is, c 1 (3) = 1 and RDS = −1.
次に、図5bを参照して、時点4への遷移を考える。先の遷移は選択の余地がなく行われたので列204には変更がない。そして、時点4への遷移の重みは、W4(−2)=18、W4(0)=36となる。これを列で表現すると列205になる。列205を見るとI=41は、列205の重みW4(0)=36の側にあることが分かる。RDSが一だけ増える方向への遷移であるので、c1(4)=1、RDS=0となる。すると、列205の下部は切り捨てることができるので、列206ができる。このとき、列206の最下端の要素の番号は19であるので、番号付けを正規化して、最下端が1から始まるように全体の要素の番号を18だけずらす。すると、列207となり、I=41の要素は、0から数えて24番目(41−18=23)になる。
Next, with reference to FIG. Since the previous transition was made with no room for selection, there is no change in
図5cを見ると、次の遷移の重みは、W5(−1)=18(下部)とW5(1)=18(上部)となるので、列207は列208として展開できる。下から24番目の要素は、W5(1)の側にあることが分かるので、c1(5)=1,RDS=1となる。そして、列208の下部を切り捨てると、列209になる。これを前回と同様、切り捨てた18要素の分だけ番号付けを正規化すると、列210になる。もともとのI=41に対応する要素は、下から6番目に来る。
Looking at FIG. 5 c, the weights of the next transition are W 5 (−1) = 18 (lower part) and W 5 (1) = 18 (upper part), so that the
そして、次の時点6への遷移を考えると、重みW6(0)=12(下部)とW6(2)=6(上部)であるので、列211となる。I=41に対応する要素は、下部にある。したがって、次の遷移はRDSを減らす方向にあることが分かり、c1(6)=0,RDS=0となる。
Then, considering the transition to the
以降は図示しないが、これを繰り返していくと、c1(7)=0、c1(8)=1、c1(9)=1、c1(10)=1となって、時点10ではRDS=2となることが分かる。このようにして、I=41の入力データを符号0011100111に符号化することができる。
Although not shown in the drawings, when this is repeated, c 1 (7) = 0, c 1 (8) = 1, c 1 (9) = 1, c 1 (10) = 1, and
図6は、上に説明した本実施形態に係る符号化方法を示すフローチャートである。 FIG. 6 is a flowchart showing the encoding method according to the present embodiment described above.
S11では、初期化として、インデクスIを算出するとともに、時点kを0に、状態をS0(0)(かっこ内はRDSの値sをゼロに設定したものである。)に設定する。 In S11, as an initialization, the index I is calculated, the time point k is set to 0, and the state is set to S 0 (0) (the value s of RDS is set to zero in parentheses).
S12では、重み算出部113から次時点k+1における各状態の重みWk+1を読み込み、インデクスIの値がRDSが減る方向に続くパスの数である重みWk+1(s−1)よりも大きいか否かを判定する。Wk+1(s−1)よりも大きい場合は、S13へ進み、Wk+1(s−1)以下である場合は、S14へ進む。現時点kにおいて状態がRDS=−2にあるとき(s=−2)には、M=2の拘束条件があるので、RDS=−3の状態に遷移することはできないので、次の時点k+1への遷移の重みWk+1(−3)の値はゼロとなる。Wk(−2)=Wk+1(−1)である。
In S12, reads the weight W k + 1 of each state from the
S13では、RDSが増える方向に状態が遷移することが分かっているので、符号の対応するビットc(k+1)を「1」に設定し、状態SkをRDSが増える方向のパスに沿って状態Sk+1に遷移させる。さらに、RDSが減る方向のパスを切り捨てたので、インデクスIの正規化を実行し、インデクスIのならびから切り捨て分のパスの数に相当する重みWk+1(s−1)を減算する。RDSの値sはs+1となる。 In S13, since the state in the direction of RDS increases it has been found that transition, the code of the corresponding bit c a (k + 1) is set to "1", a state S k along the direction of the path of RDS increases state Transition to S k + 1 . Further, since the path in the direction in which the RDS decreases is truncated, the index I is normalized, and the weight W k + 1 (s−1) corresponding to the number of paths to be discarded is subtracted from the index I sequence. The value s of RDS is s + 1.
S14では、RDSが減る方向へ状態が遷移することが分かっているので、符号の対応するビットc(k+1)を「0」に設定し、状態SkをRDSが減る方向のパスに沿って状態Sk+1に遷移させる。RDSの値sはs−1となる。 In S14, since it is known that the state transitions in the direction in which RDS decreases, the corresponding bit c (k + 1) of the code is set to “0”, and state S k is in a state along the path in the direction in which RDS decreases. Transition to S k + 1 . The value s of RDS is s-1.
S15では、時点kを1だけ進めるとともに、1を加算したkが(N−1)以下であるか否かを判定する。(N−1)以下である場合は、S12へ戻り、(N−1)よりも大きい場合は、入力データiに対する符号化処理を終了する。 In S15, the time point k is advanced by 1, and it is determined whether k obtained by adding 1 is equal to or less than (N−1). If it is (N-1) or less, the process returns to S12. If it is greater than (N-1), the encoding process for the input data i is terminated.
このように、本実施形態によれば、数え上げ符号化法(enumerative coding method)を採用したことで、拘束条件下にあって、高い符号化率を達成することが可能である。さらに、本実施形態では、入力データのインデクスIと符号cとの対応関係を状態Sが遷移するパスに基づいて計算によって判断することとしたので、比較的簡単な手順で符号化処理を行うことができる。本実施形態によれば、インデクスIと符号cの対応関係を決めるためのルックアップテーブルが不要である。 As described above, according to the present embodiment, by employing the enumerative coding method, it is possible to achieve a high coding rate under constraint conditions. Furthermore, in this embodiment, since the correspondence between the index I of the input data and the code c is determined by calculation based on the path where the state S transitions, the encoding process is performed with a relatively simple procedure. Can do. According to this embodiment, a lookup table for determining the correspondence between the index I and the code c is not necessary.
以上で述べた第1の実施形態では、トレリス線図上の重みWk(s)を各時点k(k=1,2,…,N)の状態Sk(s)毎(s=−2〜2)に分かっているものとして説明した。入力データのビット数が小さい場合には、この重みは予め計算しておいて記憶装置に記憶しておくこともできる。しかしながら、パスの数を数えて得られる重みWk+1は、本発明者らによって、下に述べるように必要な際に計算によって求めることが可能な「重み系」(Weight System)と呼ぶ数値演算の結果によって置き換えることができることが証明されている。この重み系は、パスカウントに基づく重みであるかそれを近似する値になっている。計算により重み系の数値をその都度求めることにより、記憶しておくべきデータの量を劇的に減らすことができるとともに、必要な数値計算の量も大きく増えることがない。 In the first embodiment described above, the weight W k (s) on the trellis diagram is set for each state S k (s) at each time point k (k = 1, 2,..., N) (s = −2). It was described as known in ~ 2). When the number of bits of input data is small, this weight can be calculated in advance and stored in the storage device. However, the weight W k + 1 obtained by counting the number of paths is a numerical calculation called a “weight system” (Weight System) that can be obtained by calculation when necessary by the inventors as described below. It has been proven that the results can be replaced. This weight system is a weight based on the pass count or a value approximating it. By calculating the numerical value of the weight system each time by calculation, the amount of data to be stored can be dramatically reduced, and the amount of necessary numerical calculation does not increase greatly.
図1の重み計算部121によってそのような計算を行う。まず、図4に示したトレリス線図の基本構造として、図8の左側に示すような状態遷移のパターンを有している。この状態遷移のパターンに対応する遷移行列Tが図8の右側に示されている。1は遷移が可能であることを示し、0は遷移が許されていないことを示している。すなわち、この遷移行列Tの対角要素は、すべてゼロであり、ある状態から同じ状態への遷移はないことを示している。例えば、行1列2の要素は1であるが、RDS=2の状態(Sk(2))からRDS=1の状態(Sk+1(1))への遷移が可能であることを示している。同様に、行2列1の要素も1であるが、これはRDS=1の状態(Sk(1))からRDS=2の状態(Sk+1(2))への遷移が可能であることを示している。この遷移行列Tからは、隣接する状態にしか遷移できず、例えば、RDS=2からRDS=0の直接的な遷移は許されていないことが分かる。本発明の重み系によれば、ペロン・フロベニウスの定理(Perron-Frobenius Theorem)に基づいて数1の式が成り立つことが立証されている。つまり、パスの数を数えて得られる重みの代わりに、次式を解いてて得られるWk(s)を用いて、数え上げ方式の符号化と復号を行うことができることが証明されている。
(数1)
Wk(s) = Ceil{(λmax)N-k・R(s)}
ここで、sはRDSの値であり、Wk(s)は時点kにおけるsの関数としての重みを表す。λmaxは、遷移行列Tの最大の右固有値であり、定数である。R(s)は、遷移行列Tの右固有ベクトルの成分である。Ceilは切り上げ整数化を意味する。
Such calculation is performed by the
(Equation 1)
W k (s) = Ceil {(λ max ) Nk · R (s)}
Here, s is the value of RDS, and W k (s) represents the weight as a function of s at time k. λ max is the maximum right eigenvalue of the transition matrix T and is a constant. R (s) is a component of the right eigenvector of the transition matrix T. Ceil means rounding up to integer.
本発明に係る符号化装置は、インデクス算出部111、比較出力部112、重み算出部113と、状態更新部115に加え、パラメータ設定部121を備え、このパラメータ設定部121は、遷移行列生成部125、固有ベクトル算出部126及び最大固有値算出部127を備える。
The encoding apparatus according to the present invention includes a
遷移行列設定部125は、トレリス線図におけるそれぞれの状態からの遷移の特性を表す遷移行列Tを設定する。図8は、上記第1の実施形態に関する説明で述べたように、M=2のRDS制限コードによって制約条件を付与する場合の遷移行列Tを示している。遷移行列Tは、その列方向において時点kの状態Skを表し、行方向においてその次の時点k+1に遷移させる状態Sk+1を表している。具体的には、遷移行列Tは、状態Skからの遷移の可否を0又は1の数値によって表している。1は遷移が可能であることを、0は遷移が不可であることを示す。上から第1行目は、RDS=2の状態Sk(2)から次時点の状態Sk+1(s)への遷移の可否を表し、Sk(2)からSk+1(1)への遷移のみが可能であり、それ以外のSk+1(2),Sk+1(0),Sk+1(−1)及びSk+1(−2)への遷移は不可であることを示している。同様に、上から第2行目は、RDS=1の状態Sk(1)から次時点の状態Sk+1(RDS)への遷移の可否を表し、Sk(1)からSk+1(2)及びSk+1(0)への遷移が可能であり、それ以外のSk+1(1),Sk+1(−1)及びSk+1(−2)への遷移は不可であることを示している。
The transition
固有ベクトル算出部126は、遷移行列生成部125によって設定した遷移行列Tの右固有ベクトルRを算出する。
The
最大固有値算出部127は、上記設定した遷移行列Tの最大の右固有値λを算出する。
The maximum
重み算出部113は、パラメータ設定部121によって設定した遷移行列Tの固有ベクトルR及び最大固有値λを入力し、次式によって状態Skの重みWk(s)を算出する。次式は、遷移行列Tに基づいて導出することができる。
(数2)
Wk(s) = Ceil{(λmax)N-k・R(s)}
The
(Equation 2)
W k (s) = Ceil {(λ max ) Nk · R (s)}
遷移行列Tは、トレリス線図の構造に基づいて決まるものである。 与えられたトレリス線図に関する遷移行列Tについて、1つの最大の右固有値λmax(=定数)と、状態(例えば、Sk(2),Sk(1),…,Sk(−2))の数に応じた成分数を有する右固有ベクトルとが求まる。固有ベクトルは、遷移行列から比較的容易に算出できる。通常、固有ベクトルの成分は最大値が1となるように正規化する。固有ベクトルの成分は、それぞれの状態に対応しており、RDSの値であるsの関数となっており、この例では取りうるsの値が5つである(s=−2〜2の整数)ことに対応して、5つの成分を有する。これをR(s)と呼ぶ。 The transition matrix T is determined based on the structure of the trellis diagram. For a transition matrix T for a given trellis diagram, one maximum right eigenvalue λ max (= constant) and state (eg, S k (2), S k (1),..., S k (−2) ) To obtain the right eigenvector having the number of components corresponding to the number of. The eigenvector can be calculated relatively easily from the transition matrix. Usually, the component of the eigenvector is normalized so that the maximum value is 1. The component of the eigenvector corresponds to each state and is a function of s which is the value of RDS. In this example, there are five possible values of s (s = integer of −2 to 2). Correspondingly, it has five components. This is called R (s).
以上のような、重みの計算方法をフローチャートに整理したものを図7に示す。上述のように遷移行列Tが求まる。この遷移行列にペロン・フロベニウスの定理を適用するためには、強連結の状態遷移グラフが必要である。つまり、全ての状態のそれぞれを見ると、ある状態は、必ず前のどこかの状態からつながっており、後のどこかの状態へ出ていけるようになっている必要がある。これを遷移行列の視点から見ると、全部の要素がゼロである行または列がないということになる。したがって、遷移行列を生成する場合には、そのような行または列がないか調べて、もしあれば、そのような行または列を削除すべきである。その上で、上記の数2の式を適用することになる。すなわち、遷移行列Tの右固有値のうち最大のものλmaxを得て、さらに右固有ベクトルの成分R(s)を得る。これらは周知の解法あるいはアルゴリズムにより計算することができる。
FIG. 7 shows a flowchart of the weight calculation method as described above. As described above, the transition matrix T is obtained. In order to apply the Peron Frobenius theorem to this transition matrix, a strongly connected state transition graph is required. In other words, looking at each of all states, a certain state must always be connected from some previous state, so that it is possible to go to some later state. From a transition matrix perspective, this means that there are no rows or columns where all elements are zero. Therefore, when generating a transition matrix, it should be checked for such rows or columns and, if any, such rows or columns should be deleted. Then, the
ここで、上の数1による重みWk(s)の計算では、まず、遷移行列Tが分かっているので、それの最大固有値λmaxと固有ベクトルR(s)が分かる。固有ベクトルはその最大ベクトルの大きさを1に正規化したものを用いることができる。算出する必要があるのは、(λmax)N-kである。ところが、回路によってこのような累乗を計算しようとすると、乗算器を多く使うことになって、回路設計が複雑になる。そこで、N−k=yとした上で、新たな変数qとQを導入して、λmax y=2(y−Q)・2(−r/q)とする。すると、Qも整数であるとすると、y(=N−k)はもとより整数であるので、2(y−Q)は、ビットシフトにより簡単に計算できるようになるので、回路で簡単に実現することができる。残りの2(−r/q)については、予め、計算結果をルックアップテーブルにまとめておくことによって演算を省略することができる。 つまり、rの値がわかった時点で、ルックアップテーブルを参照して、2(−r/q)の値を求めることができる。
Here, in the calculation of the weight W k (s) by the
すなわち、次式を満たす整数であるqを求める。
(数3)
2(−1/q)≦λmax/2
そして、所与のy及び上記qについて、次式を満たすQ及びr(整数)を求める。ちなみに、Qとrは時点kに依存するが、qは依存しないものとする。
(数4)
y=Q・q+r
ここで、0≦r≦q−1である。
そして、λmaxの代わりにλ0=2・2(-1/q)を用いて上記の重み系を計算することとする。このとき、λmaxとλ0との間の誤差は、小さく、例えば、M=8,q=45であれば、10のマイナス5乗のオーダーであることが分かっている。すると、
(数5)
λ0 y=2(y−Q)・2(−r/q)
ここで、1/2<2(−r/q)<1,1<r<qである。
That is, q which is an integer satisfying the following formula is obtained.
(Equation 3)
2 (−1 / q) ≦ λ max / 2
Then, for a given y and q, Q and r (integer) satisfying the following expression are obtained. Incidentally, Q and r depend on the time point k, but q does not.
(Equation 4)
y = Q · q + r
Here, 0 ≦ r ≦ q−1.
Then, the above weight system is calculated using λ 0 = 2 · 2 (−1 / q) instead of λ max . At this time, the error between λ max and λ 0 is small. For example, if M = 8 and q = 45, it is known that the error is on the order of 10 to the fifth power. Then
(Equation 5)
λ 0 y = 2 (yQ) · 2 (−r / q)
Here, 1/2 <2 (−r / q) <1,1 <r <q.
2(−r/q)は、q個の値をとり得るが、1/2〜1の範囲であることから、予め計算しておいて、ルックアップテーブルでの保存が可能である。数4の式からrが求まった時点で、このルックアップテーブルを利用して2(−r/q)の値を求めることができる。2(y−Q)は、ビットシフトによって簡単に演算することができるので、(λmax)N-kによく近似している(λ0)N-kを浮動小数点法によって演算することができる。 2 (−r / q) can take q values, but is in a range of ½ to 1, and can be calculated in advance and stored in a lookup table. When r is obtained from the equation (4 ), a value of 2 (−r / q) can be obtained using this lookup table. Since 2 ( yQ ) can be easily calculated by bit shift, (λ 0 ) Nk that is well approximated to (λ max ) Nk can be calculated by the floating point method.
本実施形態によれば、ある状態遷移行列Tに対して、qと2(−r/q)を予め求めて記憶しておけば 、λmax を容易に計算することができる。また、固有ベクトルを予め算出して記憶しておくことも容易であるし、また、その記憶も困難を伴うものではない。したがって、状態の遷移のたびに重みWkを計算することが可能であるので、状態毎に重みWkを記憶しておくための記憶素子の容量を削減できる。換言すれば、数え上げ法において、本発明によって、N=4000といった大きな数値の符号化と復号が実現できるようになっている。 According to the present embodiment, if q and 2 (−r / q) are obtained and stored in advance for a certain state transition matrix T, λ max can be easily calculated. Further, it is easy to calculate and store eigenvectors in advance, and the storage is not difficult. Therefore, since the weight W k can be calculated for each state transition, the capacity of the storage element for storing the weight W k for each state can be reduced. In other words, in the counting method, encoding and decoding of a large numerical value such as N = 4000 can be realized by the present invention.
以下、本発明の復号方法の二つの実施形態を説明する。本実施形態では、所定の拘束条件(例えば、M=2のRDS拘束条件)のもとで冗長ビットを含んで設定したコード長Nの符号cを、nビットのもとのデータ(source data)に復号する(図2)。 Hereinafter, two embodiments of the decoding method of the present invention will be described. In this embodiment, a code c having a code length N set including redundant bits under a predetermined constraint condition (for example, an RDS constraint condition of M = 2) is converted into n-bit original data (source data). (FIG. 2).
[左から右への復号]
図9は、本実施形態に係る復号装置の左から右へのアルゴリズム(left-to-right algorithm)の動作を示すフローチャートである。
[Decryption from left to right]
FIG. 9 is a flowchart showing the operation of the left-to-right algorithm of the decoding apparatus according to this embodiment.
まず、S21では、初期化として、インデクスIを0に設定するとともに、時点kを0に、状態をS0(0)に設定する。RDSの値sはゼロである。 First, in S21, as initialization, the index I is set to 0, the time point k is set to 0, and the state is set to S 0 (0). The RDS value s is zero.
S22では、入力した符号内の対応する数値c(k+1)が「1」であるか否かを判定する。「1」である場合は、S23へ進み、「1」でない場合は、S24へ進む。 In S22, it is determined whether or not the corresponding numerical value c (k + 1) in the input code is “1”. If it is “1”, the process proceeds to S23, and if it is not “1”, the process proceeds to S24.
S23では、状態SkをRDSが増える方向のパスに沿って状態Sk+1に遷移させるとともに(sはs+1となる。)、RDSが減る方向のパスに続く状態の重みWk+1(s−1)を、インデクスIに加算する。
(数6)
I=I+Wk+1(s−1)
In S23, the state S k is shifted to the state S k + 1 along the path in the direction in which the RDS increases (s becomes s + 1), and the weight W k + 1 (s−1) of the state following the path in the direction in which the RDS decreases. Is added to the index I.
(Equation 6)
I = I + W k + 1 (s−1)
S24では、状態SkをRDSが減る方向のパスに沿って状態Sk+1に遷移させる(sはs−1となる)。インデクスIは、現時点の値を維持する(I=I)。 In S24, it shifts to state S k + 1 along the direction of the path reduces the state S k is RDS (s becomes s-1). The index I maintains the current value (I = I).
S25では、時点kを1だけ進めるとともに、1を加算したkが(N−1)以下であるか否かを判定する。(N−1)以下である場合は、S22へ戻り、(N−1)よりも大きい場合は、復号処理を終了する。 In S25, the time point k is advanced by 1, and it is determined whether k obtained by adding 1 is equal to or less than (N−1). If it is (N-1) or less, the process returns to S22, and if it is greater than (N-1), the decoding process is terminated.
このように、符号化に際してトレリス線図上で状態Sが遷移するパスは、復号する符号内の個々の数値(0または1)に基づいて特定することができる。従って、本実施形態によれば、状態Sが遷移するパスに基づいて、符号に対するもとのデータiの十進法インデクスIを算出することが可能である。そして、入力データの取りうる値とその十進法インデクスとの関係を予め定めておくことで、インデクスと符号との対応を計算によって判断し、符号をもとのデータに復号することができる。このようなやり方では、インデクスと符号との対応を記憶するためのルックアップテーブルが不要となる。 In this way, the path through which the state S transitions on the trellis diagram during encoding can be specified based on the individual numerical values (0 or 1) in the code to be decoded. Therefore, according to the present embodiment, it is possible to calculate the decimal index I of the original data i for the code based on the path where the state S transitions. Then, by predetermining the relationship between possible values of the input data and their decimal indexes, the correspondence between the index and the code can be determined by calculation, and the code can be decoded into the original data. In such a manner, a lookup table for storing the correspondence between the index and the code becomes unnecessary.
ここで、この重みの積算について、図4のトレリス線図を参照して、符号c1=(0011100111)を入力した場合を例に説明する。入力した符号c1において、最初の二つの数値は0であるので、I=0のままである。第3番目の値は1であるがW3(−3)の値は上述のようにゼロになるので、I=0のままである。第4番目の値も1であり、状態はS4(0)となる。この状態S4(0)を始点としてRDSが減る方向に続くパスの数である重みW5(−1)が18であるので、これを時点4において切り捨てられていたパスの数として積算する。これを次々と行って行くと、Iは35(時点5)、39(時点8)、41(時点9)と積算されていき、最終的に時点9までで、I=41ということが分かる。このインデクスが41であるというは、もとのデータの42番目の符号であることが分かるので、もとのデータへと復号することができる。
Here, this weight integration will be described with reference to the trellis diagram of FIG. 4 as an example in which the code c1 = (0011100111) is input. In the inputted code c1, since the first two numerical values are 0, I = 0 remains. The third value is 1, but the value of W 3 (−3) becomes zero as described above, and therefore I = 0. The fourth value is also 1, and the state is S 4 (0). Since this state S 4 (0) is the starting point and the weight W 5 (−1), which is the number of paths that continue in the direction in which RDS decreases, is 18, this is integrated as the number of paths that were truncated at
そして、インデクス算出部214は、算出した重み積算値をインデクスIに設定し、もとのデータiとインデクスIとの予め定められた関係に基づいて、インデクスIをもとのデータiに換算し、出力する。本実施形態において、インデクスIは、もとのデータiの十進数換算値であるので、インデクスIともとのデータiは直接的に関連している。
Then, the
以上に述べた第2の実施形態では、符号の先頭から後尾に向けてパスを特定し、RDSが減る方向のパスに沿って状態を遷移させることによって切り捨てられていたパスの数である重みWk+1(s−1)を積算することとした。このような方法に限らず、符合の後尾から先頭に向けてパスを特定することによっても復号を実行することができる。このように符号の後尾から先頭に向けてパスを選択する、第3の実施形態に係る復号方法について、以下に説明する。 In the second embodiment described above, the weight W, which is the number of paths that have been truncated by specifying a path from the head to the tail of the code and making the state transition along the path in the direction in which the RDS decreases. k + 1 (s-1) was integrated. The decoding can be executed not only by such a method but also by specifying a path from the tail of the code toward the head. A decoding method according to the third embodiment, in which a path is selected from the tail of the code toward the head, will be described below.
図10は、上記の第2の実施形態を実行するための復号装置のブロックダイアグラムである。 FIG. 10 is a block diagram of a decoding device for executing the second embodiment.
状態更新部211は、符号cを受け付けて、この入力された符号c内の個々の数値0または1に応じてトレリス線図(図4)上で状態が遷移するパスを特定する。重み算出部212は、時点kにおける状態Sk(s)の重みWk(s)を算出する。本実施形態において、重み算出部212は、トレリス線図上の状態Sk(s)毎に重みWk(s)を算出する。重み算出部212に必要なデータを与えるパラメータ設定部221を備え、このパラメータ設定部221は、遷移行列生成部225、固有ベクトル算出部226及び最大固有値算出部227を備える。パラメータ設定部221は、第1の実施形態に係る符号化装置のパラメータ設定部121(図1)と同様の構成であり、第1の実施形態の場合と同様に本発明の装置に必ずしも含まれなくてもいい部分である。
The
インデクス算出部214は、状態更新部211によって特定したパスに従って状態を遷移させることによって切り捨てられるパスに続く状態の重みWk+1(s+1),Wk+1(s−1)を求め、これを時点毎に積算する。ここで、この重みの積算について、図4のトレリス線図を参照して、符号c1=(0011100111)を入力した場合を例に説明する。入力した符号c1において、現時点4の状態は、S4(s)=S4(0)である。現時点4に対応する符号c1内の数値が「1」であることから、この状態S4(0)を始点としてRDSが減る方向に続くパスの数である重みW5(−1)=18を求め、これを時点4において切り捨てられていたパスの数として積算する。これを次の時点について行って、各時点について算出される切り捨て分の数を積算するのである。
The
そして、出力部215は、算出した重み積算値をインデクスIに設定し、復号データiとインデクスIとの予め定められた関係に基づいて、インデクスIを復号されたもとのデータiに換算し、出力する。本実施形態において、インデクスIは、もとのデータiの十進数換算値であるので、インデクスIともとのデータiは直接的に関連している。なお、上述のように、ここでは、インデクスを十進表示にしているが、これは説明のためであり、実際の計算においては、2進法の数値のままであって良いので、出力部215を省略することも可能である。
Then, the
本実施形態では、重み積算値の算出において、負方向のパスを選択することによって切り捨てられるパスの数を積算したことから、算出した重み積算値をインデクスIに代入することができる。換言すれば、本実施形態において算出される重み積算値は、インデクスIに等しい。しかしながら、正方向のパスを選択することによって切り捨てられるパスの数を積算することによってもインデクスIを算出することが可能である。その場合は、時点0における状態の重みW0から重み積算値を減算したものをインデクスIとして、もとのデータiに変換する。
In the present embodiment, in calculating the weight integrated value, the number of paths to be rounded down by selecting a negative path is integrated, so that the calculated weight integrated value can be substituted for the index I. In other words, the weight integrated value calculated in the present embodiment is equal to the index I. However, it is also possible to calculate the index I by accumulating the number of paths that are discarded by selecting the positive path. In that case, the minus the weight accumulated value from the weight W 0 of the state at
[右から左への復号]
図11は、本発明の第3の実施形態に係る右から左への復号アルゴリズムの各ステップを示すフローチャートである。まず、最も右側の最終時点における状態Sfを求める必要がある。この状態Sfは符号から決定することができる。例えば、符号がc=(c(1)c(2)c(3)...c(f))であれば、それぞれの符号値の1に+1を、0に−1を対応させて、和を取ることにより、RDSを計算することができる。符号値c(1)からc(f)に対応する+1と−1の和を取ることによりSfでのRDSの値をすることができ、これを最終状態におけるsの値とする(ステップS30)。S31では、初期化として、インデクスIを0に設定するとともに、時点kをNに、最終時点の状態を求めたSfに設定する。
[Decoding from right to left]
FIG. 11 is a flowchart showing the steps of a right-to-left decoding algorithm according to the third embodiment of the present invention. First, it is necessary to obtain the state Sf at the right end point. This state Sf can be determined from the sign. For example, if the code is c = (c (1) c (2) c (3)... C (f)), +1 is associated with 1 of each code value, and −1 is associated with 0, By taking the sum, RDS can be calculated. By taking the sum of +1 and −1 corresponding to code values c (1) to c (f), the value of RDS at Sf can be obtained, and this is set as the value of s in the final state (step S30). . In S31, as initialization, the index I is set to 0, the time point k is set to N, and the state at the final time point is set to Sf.
S32では、c(k)の値から、現時点kの状態Sk(s)が一つ前の時点のどの状態Sk−1(s’)から遷移したのかを判定する。 In S32, from the value of c (k), it is determined from which state S k-1 (s ′) of the previous time the state S k (s) at the current k has transitioned.
S33では、入力された符号内の対応する数値c(k)が1であるか否かを判定する。1である場合は、S34へ進み、1でない場合は、S35へ進む。 In S33, it is determined whether or not the corresponding numerical value c (k) in the input code is 1. When it is 1, it progresses to S34, and when it is not 1, it progresses to S35.
S34では、状態sを一つ前の時点の状態s’に遷移させるとともに、s’からsに状態を遷移させることによって切り捨てられるパスの数である重みWk(s’−1)を、インデクスIに加算する。
(数7)
I=I+Wk(s’−1)
In S34, the state s is changed to the state s ′ at the previous time point, and the weight W k (s′−1), which is the number of paths that are truncated by changing the state from s ′ to s, is indexed. Add to I.
(Equation 7)
I = I + W k (s′−1)
S35では、状態sを前の時点の状態s’に遷移させる。インデクスIは、現時点の値を維持する(I=I)。 In S35, the state s is transitioned to the previous state s'. The index I maintains the current value (I = I).
S36では、時点kを1つ前に戻すとともに、1を減算したkが1以上であるか否かを判定する。1以上である場合は、S33へ戻り、1よりも小さい場合は、データiに関する復号処理を終了する。 In S36, the time point k is returned to the previous one, and it is determined whether or not k obtained by subtracting 1 is 1 or more. When it is 1 or more, the process returns to S33, and when it is smaller than 1, the decoding process for data i is terminated.
本実施形態によれば、重みWkを計算によって設定することが可能であるとともに、符号への変換に際して算出した最大固有値λ等の演算結果を再利用して復号を実行することができるので、回路構成の簡略化が可能である。また、上記の左から右への復号アルゴリズムの場合、I=I+Wk+1(s−1)計算する際、時点k=0の時Wk+1の値は(λmax)N-k によって非常に大きいので、ハードウエアのサイズが大きくなる。右から左への復号アルゴリズムによれば、ハードウエアのサイズを抑えることができる利点がある。 According to this embodiment, the weight W k can be set by calculation, and decoding can be performed by reusing the calculation result such as the maximum eigenvalue λ calculated at the time of conversion to the code. The circuit configuration can be simplified. In the case of the above left-to-right decoding algorithm, when calculating I = I + W k + 1 (s−1), the value of W k + 1 at time k = 0 is very large due to (λ max ) Nk . The size of the wear increases. The right-to-left decoding algorithm has the advantage that the hardware size can be reduced.
なお、本発明によれば、もう一つの実施形態として、符号化と復号の際に、処理速度を上げるため、入力信号を並列化し、時点kから時点k+1に遷移するときにmビット(m>1)を同時に符号化または復号することも可能である(これをhigh-radixという)。この場合には、それに合わせて遷移行列Tの形は変わるが、符号化または復号の方法自体は変わらない。 According to the present invention, as another embodiment, in order to increase the processing speed during encoding and decoding, the input signals are parallelized and m bits ( It is also possible to encode or decode m> 1) simultaneously (this is called high-radix). In this case, the shape of the transition matrix T changes accordingly, but the encoding or decoding method itself does not change.
111…インデクス算出部、112…比較・出力部、113…重み算出部、115…状態更新部、121…パラメータ設定部、125…遷移行列生成部、126…固有ベクトル算出部、127…最大固有値算出部、211…状態更新部、212…重み算出部、213…重み記憶部、214…インデクス算出部、215…出力部、221…パラメータ設定部、225…遷移行列生成部、226…固有ベクトル算出部、227…最大固有値算出部 。
DESCRIPTION OF
Claims (8)
nビットのデータを受け付けて、初期化を行うステップと、
受け付けたnビットのデータに対するインデクスを決定するインデクス決定ステップと、
前記拘束条件のもとで定められるトレリス線図において、次時点のある状態を始点とした場合に前記トレリス線図において終点に至るまでにとり得るパスの総数を次時点の当該状態の重みと定義し、その重みあるいはそれに近似する値を数値計算する重み算出ステップと、
現時点から次時点への状態の遷移をインデクスと次時点の状態の重みあるいはそれに近似する値とに基づいて、現時点の状態から続く複数のパスのうちいずれか1つを選択することにより決定するパス決定ステップと、
決定されたパスに対して予め割り当てられた値を符号のシンボル値を決定するシンボル値 決定ステップと、
決定されたパスに基づいてそのパスが所定の条件に当てはまる場合にインデクスを正規化する正規化ステップと、
パス決定ステップにおいて決定したパスに従って状態を次時点に遷移させて状態を更新する状態更新ステップと、
重み算出ステップから状態更新ステップまでをN回繰り返す繰り返しステップと、
決定ステップで決定された数値の列を符号として出力する符号出力ステップと
を含んでなる符号化方法。 An encoding method for converting n-bit input data into an N-bit code including redundant bits under a predetermined constraint condition,
receiving n-bit data and performing initialization;
An index determination step for determining an index for the received n-bit data;
In the trellis diagram determined under the constraint conditions, the total number of paths that can be taken to reach the end point in the trellis diagram when a state at the next time point is defined as the start point is defined as the weight of the state at the next time point. A weight calculation step for numerically calculating the weight or a value approximate thereto,
A path that is determined by selecting one of a plurality of paths that continue from the current state based on the index and the weight of the state at the next time point or a value that approximates the state transition from the current time point to the next time point A decision step;
A symbol value determining step for determining a symbol value of a code with a value assigned in advance to the determined path;
A normalization step for normalizing the index if the path meets a predetermined condition based on the determined path;
A state update step for updating the state by transitioning the state to the next time point according to the path determined in the path determination step;
A repetition step of repeating N times from the weight calculation step to the state update step;
And a code output step of outputting the sequence of numerical values determined in the determination step as a code.
符号を受け付けて、初期化を行うステップと、
前記拘束条件のもとで定められるトレリス線図において前記符号に含まれる個々の時点に対応するビットの シンボル値に応じて該トレリス線図上で状態が右へと1時点進むパスを特定するパス特定ステップと、
トレリス線図において時点kのある状態を始点とした場合にとり得る全ての終点に至るまでのパスの数をその時点kにおける当該状態の重みとして定義し、前記特定したパスについて、現時点に対応する符号内の数値が所定の値であることによって切り捨てられるパスに続く状態の重みあるいはそれに近似する値を数値計算する重み算出ステップと、
切り捨てられた重みがある場合にその切り捨てられた重みあるいはそれに近似する値をインデクスに加算するインデクス加算ステップと、
パス決定ステップにおいて選択したパスに従って状態を次の時点に遷移させて状態を更新する状態更新ステップと、
前記パス特定ステップから状態更新ステップまでを符号に含まれている全てのシンボル値 について繰り返すインデクス積算値算出ステップと、
算出したインデクスの値をもとのデータのインデクスとして決定するとともに、もとのデータとそのインデクスとの間の予め定められた関係に基づいて、もとのデータを出力するステップと
を含んでなる復号方法。 A decoding method for decoding a code encoded with redundant bits under a predetermined constraint condition into original n-bit data,
Receiving a code and initializing;
In the trellis diagram determined under the constraint conditions, a path that specifies a path whose state advances one point to the right on the trellis diagram according to the symbol value of the bit corresponding to each time point included in the code Specific steps,
In the trellis diagram, the number of paths up to all possible end points when a state at time k is the start point is defined as the weight of the state at that time k. A weight calculation step for numerically calculating the weight of the state following the path that is truncated when the numerical value in the value is a predetermined value or a value approximate thereto;
An index addition step of adding the truncated weight or a value approximate thereto to the index when there is a truncated weight;
A state update step for updating the state by transitioning the state to the next time point according to the path selected in the path determination step;
An index integrated value calculating step for repeating all the symbol values included in the code from the path specifying step to the state updating step;
Determining the calculated index value as an index of the original data, and outputting the original data based on a predetermined relationship between the original data and the index. Decryption method.
符号を受け付けるステップと、
前記拘束条件のもとで定められるトレリス線図において、符号に基づいて、その符号に対応する最終状態を決定するステップと、
前記最終状態を出発点として、インデクスをゼロに設定する初期化ステップと、
符号に含まれる個々の時点に対応するビットのシンボル値 に応じて該トレリス線図上で状態が左へ1時点戻るパスを特定するパス特定ステップと、
トレリス線図において時点kのある状態を始点とした場合にとり得る全ての終点に至るまでのパスの総数をその時点kにおける当該状態の重みとして定義し、前記特定したパスについて、現時点に対応する符号内の数値が所定の値であることによって、時点が一つ戻る際に切り捨てられるパスに続く状態の重みあるいはそれに近似する値を数値計算する重み算出ステップと、
切り捨てられた重みあるいはそれに近似する値がある場合のみにその切り捨てられた重みあるいはそれに近似する値の値をインデクスに加算するインデクス加算ステップと、
パス特定ステップにおいて決定したパスに従って状態を前の時点に遷移させて状態を更新する状態更新ステップと、
前記パス特定ステップから状態更新ステップまでを符号に含まれている全てのシンボル値 について繰り返すインデクス積算値算出ステップと、
算出したインデクスの積算値をもとのデータのインデクスとして決定するとともに、もとのデータとそのインデクスとの間の予め定められた関係に基づいて、もとのデータを出力するステップと
を含んでなる方法。 A decoding method for decoding a code encoded with redundant bits under a predetermined constraint condition into original n-bit data,
Receiving a code;
In the trellis diagram defined under the constraint conditions, based on the code, determining a final state corresponding to the code;
An initialization step of setting the index to zero, starting from the final state;
A path specifying step for specifying a path whose state returns one time point to the left on the trellis diagram according to a symbol value of a bit corresponding to each time point included in the code;
In the trellis diagram, the total number of paths up to all possible end points when a state at time k is set as the start point is defined as a weight of the state at that time k. A weight calculation step for numerically calculating a weight of a state following a path that is rounded down when a point in time is returned or a value approximate thereto, by the numerical value in
An index addition step of adding the value of the truncated weight or an approximate value to the index only when there is a truncated weight or an approximate value thereof;
A state update step for updating the state by transitioning the state to a previous time point according to the path determined in the path specifying step;
An index integrated value calculating step for repeating all the symbol values included in the code from the path specifying step to the state updating step;
Determining the integrated value of the calculated index as an index of the original data, and outputting the original data based on a predetermined relationship between the original data and the index. How to be.
nビットのデータを受け付けて、初期化を行い、そのデータに対するデータ系列内の順位を示すインデクスを算出するインデクス計算部と、
前記拘束条件のもとで定められるトレリス線図において、次時点のある状態を始点とした場合に前記トレリス線図において終点に至るまでにとり得るパスの総数を次時点の当該状態の重みと定義して、その重みあるいはそれに近似する値を数値計算する重み算出部と、
現時点から次時点への状態の遷移をインデクスと次時点の状態の重みあるいはそれに近似する値とに基づいて、現時点の状態から続く複数のパスのうちいずれか1つを選択することにより決定し、決定されたパスに対して予め割り当てられた値を符号のシンボル値として決定し、決定されたパスに基づいてそのパスが所定の条件に当てはまる場合にインデクスを正規化する比較・出力部と、
決定したパスに従って状態を次時点に遷移させて状態を更新する状態更新部と
を備えており、
重み算出から状態更新までをN回繰り返すものである符号化装置。 An encoding device for converting n-bit input data into an N-bit code including redundant bits under a predetermined constraint condition,
an index calculation unit that accepts n-bit data, performs initialization, and calculates an index indicating a rank in the data series for the data;
In the trellis diagram determined under the constraint conditions, the total number of paths that can be taken to reach the end point in the trellis diagram when a state at the next time point is defined as the start point is defined as the weight of the state at the next time point. A weight calculation unit for numerically calculating the weight or a value approximate thereto,
The transition of the state from the current time point to the next time point is determined by selecting any one of a plurality of paths continuing from the current state based on the index and the weight of the next time point state or a value approximate thereto, A comparison / output unit that determines a value assigned in advance to the determined path as a symbol value of the code, and normalizes the index when the path meets a predetermined condition based on the determined path;
A state update unit that changes the state to the next time point according to the determined path and updates the state, and
An encoding apparatus that repeats N times from weight calculation to state update.
符号を受け付けて、初期化を行い、前記拘束条件のもとで定められるトレリス線図において前記符号に含まれる個々の時点に対応するビットのシンボル値に応じて該トレリス線図上で状態が右へと1時点進むパスを特定して、状態更新を行う状態更新部と、
トレリス線図において時点kの状態を始点とした場合にとり得る全ての終点に至るまでのパスの総数をその時点kにおける状態の重みとして定義し、前記特定したパスについて、現時点に対応する符号内の数値が所定の値であることによって切り捨てられるパスに続く状態の重みあるいはそれに近似する値を数値計算する重み算出部と、
切り捨てられた重みあるいはそれに近似する値がある場合にその切り捨てられた重みあるいはそれに近似する値をインデクスに加算するインデクス計算部と
を備えており、
状態更新からインデクス計算を符号に含まれている全てのシンボル値について繰り返して、最終的なインデクスの積算値に基づいてもとのデータを出力する復号装置。 A decoding device that decodes a code encoded with redundant bits under a predetermined constraint condition into original n-bit data,
Accepts the code, initializes it, and in the trellis diagram determined under the constraint condition, the state is shown on the trellis diagram according to the symbol value of the bit corresponding to each time point included in the code. A state update unit that identifies a path that advances to one point in time and updates the state;
In the trellis diagram, the total number of paths up to all possible end points when the state at the time point k is set as the start point is defined as the weight of the state at the time point k. A weight calculation unit that numerically calculates a weight of a state following a path that is truncated when the numerical value is a predetermined value, or a value approximate thereto,
An index calculation unit that adds a truncated weight or an approximate value to the index when there is a truncated weight or an approximate value;
A decoding device that repeats index calculation from state update for all symbol values included in a code, and outputs original data based on an integrated value of a final index.
符号を受け付けて、前記拘束条件のもとで定められるトレリス線図において、該符号に基づいて最終時点の状態を特定し、初期化を行う最終状態特定部と、
前記トレリス線図において前記符号に含まれる個々の時点に対応するビットのシンボル値に応じて該トレリス線図上で状態が左へと1時点戻るパスを特定して、状態更新を行う状態更新部と、
トレリス線図において時点kの状態を始点とした場合にとり得る全ての終点に至るまでのパスの総数をその時点kにおける状態の重みとして定義し、前記特定したパスについて、現時点に対応する符号内の数値が所定の値であることによって切り捨てられるパスに続く状態の重みあるいはそれに近似する値を数値計算する重み算出部と、
切り捨てられた重みがある場合にその切り捨てられた重みの値をインデクスに加算するインデクス計算部と
を備えており、
状態更新からインデクス計算を符号に含まれている全てのシンボル値について繰り返して、最終的なインデクスの積算値に基づいてもとのデータを出力する復号装置。 A decoding device that decodes a code encoded with redundant bits under a predetermined constraint condition into original n-bit data,
In a trellis diagram that accepts a code and is determined under the constraint condition, a final state specifying unit that specifies a state at the final time point based on the code and performs initialization,
In the trellis diagram, a state update unit that performs state update by identifying a path whose state returns to the left by one point on the trellis diagram in accordance with a symbol value of a bit corresponding to each time point included in the code When,
In the trellis diagram, the total number of paths up to all possible end points when the state at the time point k is set as the start point is defined as the weight of the state at the time point k. A weight calculation unit that numerically calculates a weight of a state following a path that is truncated when the numerical value is a predetermined value, or a value approximate thereto,
An index calculation unit that adds a value of the truncated weight to the index when there is a truncated weight;
A decoding device that repeats index calculation from state update for all symbol values included in a code, and outputs original data based on an integrated value of a final index.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2009196037A JP5409196B2 (en) | 2009-08-26 | 2009-08-26 | Encoding method and decoding method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2009196037A JP5409196B2 (en) | 2009-08-26 | 2009-08-26 | Encoding method and decoding method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2011049786A JP2011049786A (en) | 2011-03-10 |
| JP5409196B2 true JP5409196B2 (en) | 2014-02-05 |
Family
ID=43835680
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2009196037A Expired - Fee Related JP5409196B2 (en) | 2009-08-26 | 2009-08-26 | Encoding method and decoding method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP5409196B2 (en) |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP3896661B2 (en) * | 1997-12-17 | 2007-03-22 | ソニー株式会社 | Trellis encoding method |
| JP3552632B2 (en) * | 2000-02-28 | 2004-08-11 | 日本電信電話株式会社 | Encoding device |
| JP2002314433A (en) * | 2001-04-04 | 2002-10-25 | Daewoo Electronics Co Ltd | Error correctable channel coding method |
| US7292161B2 (en) * | 2005-05-31 | 2007-11-06 | International Business Machines Corporation | NB/MB coding apparatus and method using both disparity independent and disparity dependent encoded vectors |
-
2009
- 2009-08-26 JP JP2009196037A patent/JP5409196B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2011049786A (en) | 2011-03-10 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP3769753B2 (en) | Encoding apparatus, encoding method, recording medium, and program | |
| KR100894002B1 (en) | Device and data method for selective compression and decompression and data format for compressed data | |
| KR101049699B1 (en) | Data Compression Method | |
| KR100778885B1 (en) | A method of converting a stream of data bits of a binary information signal into a stream of data bits of a constrained binary channel signal, an encoding apparatus, a recording medium, and a decoding apparatus. | |
| JP4098187B2 (en) | Variable length code decoding apparatus and method | |
| CN101095284A (en) | Device and data method for selectively compressing and decompressing and data format for compressed data | |
| CN104038233B (en) | Testing data compression and decompression method based on ortho-position exclusive or operation | |
| CN103746706B (en) | Test data compression based on double distance of swimming alternate coded and decompression method | |
| CN107251438A (en) | Data compression device, data decompression device, data compression method, uncompressing data and program | |
| JP2811651B2 (en) | Encoding / decoding method and apparatus | |
| CZ200273A3 (en) | A method of converting a data bits stream of a binary information signal into a data bits stream of a constrained binary channel signal, a signal coding device, a record carrier, a decoding method, and a decoding device. | |
| JP5409196B2 (en) | Encoding method and decoding method | |
| KR101030726B1 (en) | A Hoffman decoding method and apparatus for multimedia with improved memory efficiency by applying a Hoffman table based on symbols generated by a stochastic table | |
| JP5095033B2 (en) | Data compression apparatus, data compression method, and program | |
| JP4692234B2 (en) | Modulation table, modulation apparatus and method, program, and recording medium | |
| CN110999088B (en) | Audio data encoding device, audio data decoding device, audio data encoding method, audio data decoding method, and recording medium | |
| JP2009182421A (en) | Decoding method and decoding apparatus | |
| JP7688981B2 (en) | Method and data processing system | |
| JP4618293B2 (en) | Decoding device and check matrix generation method | |
| JP2004120623A (en) | Encoding device, encoding method, decoding device and decoding method | |
| JP4124233B2 (en) | Decoding device, decoding method, and recording medium | |
| KR100207428B1 (en) | An apparatus and method for fast variable length decoding adaptive to Huffman code conversion | |
| JP4110483B2 (en) | Encoding device, encoding method, decoding device, decoding method, and recording medium | |
| JP5222160B2 (en) | Image encoding device, image decoding device, image encoding method, and image decoding method | |
| JP4049137B2 (en) | Semi-static entropy encoding system, semi-static entropy decoding system, semi-static entropy encoding method, and semi-static entropy decoding method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20120718 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20130718 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20130730 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20130924 |
|
| 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: 20131011 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20131105 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 5409196 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| LAPS | Cancellation because of no payment of annual fees |