JP4176097B2 - Encoding system, encoding computer program, decoding system, and decoding computer program - Google Patents

Encoding system, encoding computer program, decoding system, and decoding computer program Download PDF

Info

Publication number
JP4176097B2
JP4176097B2 JP2005269819A JP2005269819A JP4176097B2 JP 4176097 B2 JP4176097 B2 JP 4176097B2 JP 2005269819 A JP2005269819 A JP 2005269819A JP 2005269819 A JP2005269819 A JP 2005269819A JP 4176097 B2 JP4176097 B2 JP 4176097B2
Authority
JP
Japan
Prior art keywords
code range
symbol
value
symbol type
width
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
Application number
JP2005269819A
Other languages
Japanese (ja)
Other versions
JP2007082058A (en
Inventor
泰久 前田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Axell Corp
Original Assignee
Axell Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Axell Corp filed Critical Axell Corp
Priority to JP2005269819A priority Critical patent/JP4176097B2/en
Publication of JP2007082058A publication Critical patent/JP2007082058A/en
Application granted granted Critical
Publication of JP4176097B2 publication Critical patent/JP4176097B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、符号範囲を処理対象となるシンボルのシンボル種に応じた区間に分割する処理を繰り返し、この繰り返し処理によって得られた演算結果を符号化することによって、複数のシンボルで構成されたシンボル列を符号化する技術に関する。   The present invention repeats the process of dividing the code range into sections according to the symbol type of the symbol to be processed, and encodes the operation result obtained by the repetition process, thereby forming a symbol composed of a plurality of symbols. The present invention relates to a technique for encoding a sequence.

エントロピー符号化の一つとして算術符号化がある。算術符号化は、シンボル列をひとつの符号語にする符号化であり、シンボルの出現確率を線分(符号範囲)を、シンボルのシンボル種(シンボルの種類)に応じた区間に分割する処理を繰り返すことで、最終的にその区間に含まれる一つの実数を出力する処理である。特許文献1には、この算術符号化において、処理速度を高速化を図る技術が開示されている。具体的には、シンボル種の出現頻度の最大値を2の累乗に維持することで、除算処理をシフト処理のみで実行する。   One of the entropy coding is arithmetic coding. Arithmetic coding is coding in which a symbol string is a single code word, and the process of dividing the appearance probability of a symbol into segments corresponding to the symbol type (symbol type) of the line segment (code range). By repeating the process, the process finally outputs one real number included in the section. Patent Document 1 discloses a technique for increasing the processing speed in this arithmetic coding. More specifically, the division process is executed only by the shift process by maintaining the maximum value of the appearance frequency of the symbol type at a power of 2.

特開平10−32496号公報JP-A-10-32496

しかしながら、特許文献1に記載された符号化には、乗算処理が残り、この除算処理を行うための回路を別途設ける必要がある。この除算処理は、乗算処理と同様に複雑な回路を要し、符号化処理における処理速度の低下や、回路の大規模化を招く要因なる。また、算術符号化の符号範囲に類似するレンジコーダには適用ができない。   However, the encoding described in Patent Document 1 has a multiplication process, and it is necessary to separately provide a circuit for performing the division process. This division process requires a complicated circuit like the multiplication process, and causes a reduction in processing speed and an increase in the scale of the circuit in the encoding process. Further, it cannot be applied to a range coder similar to the code range of arithmetic coding.

本発明は、かかる事情に鑑みてなされたものであり、その目的は、符号化または復号化における乗算・除算処理を減らし、全体的な処理速度の高速化を図ることである。   The present invention has been made in view of such circumstances, and an object of the present invention is to reduce multiplication / division processing in encoding or decoding, and to increase the overall processing speed.

また、本発明の別の目的は、乗算・除算を行う回路を削減することにより、回路の小規模化を図ることである。   Another object of the present invention is to reduce the size of the circuit by reducing the number of circuits that perform multiplication and division.

かかる課題を解決するために、第1の発明は、符号範囲特定値によって設定される符号範囲を処理対象となるシンボルのシンボル種に応じた区間に分割する処理を繰り返し、この繰り返し処理によって得られた演算結果を符号化することによって、複数のシンボルで構成されたシンボル列を符号化する符号化システムを提供する。このシステムは、記憶部と、更新部と、符号範囲更新部と、シフト量算出部とを有する。記憶部は、シンボル列に含まれるそれぞれのシンボル種の出現頻度を特定可能な複数のカウント値を記憶する。更新部は、シンボル列よりシンボルが処理対象として読み込まれる毎に、読み込まれたシンボルのシンボル種に対応したカウント値を更新する。符号範囲更新部は、今回の処理対象として一のシンボルが読み込まれた場合、更新部によって一のシンボルのシンボル種に対応したカウント値が更新されるのに先立ち、記憶部に記憶されている出現頻度を読み出す。そして、符号範囲更新部は、一のシンボルのシンボル種に対応したカウント値に対して、今回の処理対象で用いられるn(nは自然数)ビットのシフト量でビットシフトさせるシフト処理を少なくとも含む演算処理を行うことによって、符号範囲特定値を更新する。シフト量算出部は、符号範囲更新部よって更新された符号範囲特定値により特定される符号範囲の幅を、カウント値によって特定される総出現頻度で除算した除算値を2nで近似し、この近似によって得られた値nを次回の処理対象で用いられるシフト量として設定する。 In order to solve such a problem, the first invention is obtained by repeating the process of dividing the code range set by the code range specific value into sections according to the symbol type of the symbol to be processed. An encoding system is provided that encodes a symbol string composed of a plurality of symbols by encoding the calculated result. This system includes a storage unit, an update unit, a code range update unit, and a shift amount calculation unit. The storage unit stores a plurality of count values that can specify the appearance frequency of each symbol type included in the symbol string. The update unit updates the count value corresponding to the symbol type of the read symbol each time a symbol is read from the symbol string as a processing target. When one symbol is read as the current processing target, the code range update unit is stored in the storage unit before the update unit updates the count value corresponding to the symbol type of the one symbol. Read the frequency. The code range update unit includes at least a shift process that shifts the count value corresponding to the symbol type of one symbol by a shift amount of n (n is a natural number) bits used in the current processing target. By performing the processing, the code range specific value is updated. The shift amount calculation unit approximates a division value obtained by dividing the width of the code range specified by the code range specification value updated by the code range update unit by the total appearance frequency specified by the count value by 2 n , The value n obtained by approximation is set as the shift amount used in the next processing target.

ここで、第1の発明において、符号範囲更新部の更新処理によって、符号範囲の幅が所定値よりも小さくなった場合、または、符号範囲特定値の所定範囲の上位ビットが変化しなくなった場合、今回の処理対象の処理によって更新された符号範囲特定値を符号化データとして出力する判定部をさらに設けてもよい。   Here, in the first invention, when the width of the code range becomes smaller than the predetermined value due to the update process of the code range update unit, or when the upper bits of the predetermined range of the code range specific value no longer change In addition, a determination unit that outputs the code range specific value updated by the current process to be processed as encoded data may be further provided.

また、第1の発明において、シフト量算出部は、総出現頻度に対して、近似によって得られたシフト量でビットシフトさせるシフト処理によって算出された値と、今回の処理対象で用いられる符号範囲の幅との差分値である近似誤差を算出することが好ましい。この場合、符号範囲更新部は、近似誤差をシンボル種に応じた所定の比率で按分した上で、次回の処理対象で用いられる符号範囲を構成するシンボル種毎の各区間に割り当てる。   In the first invention, the shift amount calculation unit calculates a value calculated by a shift process for performing bit shift with a shift amount obtained by approximation with respect to the total appearance frequency, and a code range used in the current processing target. It is preferable to calculate an approximation error which is a difference value with respect to the width of. In this case, the code range update unit apportions the approximation error at a predetermined ratio according to the symbol type, and assigns it to each section of the symbol type constituting the code range used for the next processing target.

第2の発明は、符号範囲特定値によって設定される符号範囲を処理対象となるシンボルのシンボル種に応じた区間に分割する処理を繰り返し、この繰り返し処理によって得られた演算結果を符号化することによって、複数のシンボルで構成されたシンボル列を符号化する符号化方法をコンピュータに実行させる符号化コンピュータ・プログラムを提供する。このプログラムは、複数のシンボルで構成されたシンボル列のうち、一のシンボルを今回の処理対象として読み込む第1のステップと、シンボル列に含まれるそれぞれのシンボル種の出現頻度を特定可能な複数のカウント値のうち、一のシンボルのシンボル種に対応したカウント値を更新する第2のステップと、一のシンボルのシンボル種に対応したカウント値が更新されるのに先立ち、一のシンボルのシンボル種に対応したカウント値に対して、今回の処理対象で用いられるn(nは自然数)ビットのシフト量でビットシフトさせるシフト処理を少なくとも含む演算処理を行うことによって、符号範囲特定値を更新する第3のステップと、更新された符号範囲特定値により特定される符号範囲の幅をカウント値によって特定される総出現頻度で除算した除算値を2nで近似し、この近似によって得られた値nを次回の処理対象で用いられるシフト量として設定する第4のステップと、シンボル列において、処理対象となる一のシンボルを順次シフトさせながら、所定の出力条件を満たすまで、第1のステップから第4のステップまでの処理を繰り返す第5のステップとを有する符号化方法をコンピュータに実行させる。 2nd invention repeats the process which divides | segments the code range set by a code range specific value into the area according to the symbol kind of the symbol used as a process target, and encodes the calculation result obtained by this repetition process Thus, there is provided an encoding computer program for causing a computer to execute an encoding method for encoding a symbol string composed of a plurality of symbols. This program includes a first step of reading one symbol as a current processing target from among a symbol string composed of a plurality of symbols, and a plurality of symbols that can specify the appearance frequency of each symbol type included in the symbol string Of the count values, the second step of updating the count value corresponding to the symbol type of one symbol and the symbol type of one symbol prior to updating the count value corresponding to the symbol type of one symbol The code range specific value is updated by performing an arithmetic process including at least a shift process for performing a bit shift with a shift amount of n (n is a natural number) bits used in the current process target, on the count value corresponding to And the total frequency of occurrences specified by the count value in step 3 and the width of the code range specified by the updated code range specification value. In the division was divided value is approximated by 2 n, and a fourth step of setting the value n obtained by the approximation as a shift amount used in the next processing object in the symbol sequence, one symbol to be processed The computer is caused to execute an encoding method including a fifth step that repeats the processing from the first step to the fourth step until a predetermined output condition is satisfied.

ここで、第2の発明において、出力条件は、符号範囲特定値の更新によって、符号範囲の幅が所定値よりも小さくなった場合、または、符号範囲特定値の所定範囲の上位ビットが変化しなくなった場合であってもよい。   Here, in the second invention, the output condition is that when the code range width becomes smaller than the predetermined value due to the update of the code range specific value, or the upper bits of the predetermined range of the code range specific value change. It may be a case where it disappears.

また、第2の発明において、第4のステップは、総出現頻度に対して、近似によって得られたシフト量でビットシフトさせるシフト処理によって算出された値と、今回の処理対象で用いられる符号範囲の幅との差分値である近似誤差を算出する第6のステップを含むことが好ましい。この場合、第3のステップは、近似誤差をシンボル種に応じた所定の比率で按分した上で、次回の処理対象で用いられる符号範囲を構成するシンボル種毎の各区間に割り当てるステップを含んでいてもよい。   In the second invention, the fourth step includes a value calculated by a shift process for performing a bit shift with a shift amount obtained by approximation with respect to the total appearance frequency, and a code range used in the current processing target. It is preferable to include a sixth step of calculating an approximation error which is a difference value with respect to the width of. In this case, the third step includes a step of assigning the approximation error to each section for each symbol type constituting the code range used in the next processing target after apportioning the approximation error by a predetermined ratio corresponding to the symbol type. May be.

第3の発明は、符号範囲特定値によって設定され、かつ、シンボルのシンボル種に応じた区間に分割された符号範囲から符号化データの値に対応した区間を特定し、この特定された区間に対応するシンボルを出力する探索処理を繰り返し、この繰り返しによって得られたシンボルを並べることによって、符号化データを複数のシンボルで構成されたシンボル列に復号化する復号化システムを提供する。このシステムは、記憶部と、更新部と、符号範囲更新部と、シフト量算出部とを有する。記憶部は、探索処理によって出力されるそれぞれのシンボル種の出現頻度を特定可能な複数のカウント値を記憶する。更新部は、探索処理によってシンボルが出力される毎に、出力されたシンボルのシンボル種に対応したカウント値を更新する。符号範囲更新部は、今回の処理として一のシンボルが出力された場合、記憶部に記憶されている出現頻度を読み出す。そして、符号範囲更新部は、一のシンボルのシンボル種に対応したカウント値に対して、今回の処理で用いられるn(nは自然数)ビットのシフト量でビットシフトさせるシフト処理を少なくとも含む演算処理を行うことによって、次回の処理で用いられる符号範囲特定値を設定する。シフト量算出部は、符号範囲更新部よって設定された符号範囲特定値により特定される符号範囲の幅を、カウント値によって特定される総出現頻度で除算した除算値を2nで近似し、この近似によって得られた値nを次回の処理で用いられるシフト量として設定する。 The third invention specifies a section corresponding to the value of the encoded data from the code range set by the code range specifying value and divided into sections according to the symbol type of the symbol, and the specified section Provided is a decoding system for decoding encoded data into a symbol string composed of a plurality of symbols by repeating search processing for outputting corresponding symbols and arranging symbols obtained by the repetition. This system includes a storage unit, an update unit, a code range update unit, and a shift amount calculation unit. The storage unit stores a plurality of count values that can specify the appearance frequency of each symbol type output by the search process. The update unit updates the count value corresponding to the symbol type of the output symbol each time the symbol is output by the search process. When one symbol is output as the current process, the code range update unit reads the appearance frequency stored in the storage unit. The code range update unit includes at least a shift process that shifts the count value corresponding to the symbol type of one symbol by a shift amount of n (n is a natural number) bits used in the current process. To set a code range specific value used in the next processing. The shift amount calculation unit approximates a division value obtained by dividing the width of the code range specified by the code range specification value set by the code range update unit by the total appearance frequency specified by the count value by 2 n , The value n obtained by approximation is set as the shift amount used in the next processing.

ここで、第3の発明において、符号範囲更新部の更新処理によって、符号範囲の幅が所定値よりも小さくなった場合、または、符号範囲特定値の所定範囲の上位ビットが変化しなくなった場合、符号化データを上位ビット数でシフト量でビットシフトさせるシフト処理を行う判定部をさらに設けてもよい。   Here, in the third invention, when the width of the code range becomes smaller than the predetermined value due to the update process of the code range update unit, or when the upper bits of the predetermined range of the code range specific value no longer change In addition, a determination unit that performs a shift process for bit-shifting the encoded data by the shift amount by the number of upper bits may be further provided.

また、第3の発明において、シフト量算出部は、総出現頻度に対して、近似によって得られたシフト量でビットシフトさせるシフト処理によって算出された値と、今回の処理対象で用いられる符号範囲の幅との差分値である近似誤差を算出することが好ましい。この場合、符号範囲更新部は、近似誤差をシンボル種に応じた所定の比率で按分した上で、次回の処理対象で用いられる符号範囲を構成するシンボル種毎の各区間に割り当てることが望ましい。   In the third invention, the shift amount calculation unit calculates a value calculated by a shift process for performing bit shift with a shift amount obtained by approximation with respect to the total appearance frequency, and a code range used in the current processing target. It is preferable to calculate an approximation error which is a difference value with respect to the width of. In this case, it is desirable that the code range update unit apportions the approximation error at a predetermined ratio according to the symbol type, and then assigns it to each section for each symbol type constituting the code range used in the next processing target.

第4の発明は、符号範囲特定値によって設定され、かつ、シンボルのシンボル種に応じた区間に分割された符号範囲から符号化データの値に対応した区間を特定し、この特定された区間に対応するシンボルを出力する探索処理を繰り返し、この繰り返しによって得られたシンボルを並べることによって、符号化データを複数のシンボルで構成されたシンボル列に復号化する復号化方法をコンピュータに実行させる復号化コンピュータ・プログラムを提供する。このプログラムは、探索処理によって、符号化データから一のシンボルのシンボル種を出力する第1のステップと、探索処理によって出力されるそれぞれのシンボル種の出現頻度を特定可能な複数のカウント値のうち、一のシンボルのシンボル種に対応したカウント値を更新する第2のステップと、一のシンボルのシンボル種に対応したカウント値に対して、今回の処理対象で用いられるn(nは自然数)ビットのシフト量でビットシフトさせるシフト処理を少なくとも含む演算処理を行うことによって、符号範囲特定値を更新する第3のステップと、更新された符号範囲特定値により特定される符号範囲の幅をカウント値によって特定される総出現頻度で除算した除算値を2nで近似し、この近似によって得られた値nを次回の処理対象で用いられるシフト量として設定する第4のステップと、シンボル列において、処理対象となる一のシンボルを順次シフトさせながら、所定の判定条件を満たすまで、第1のステップから第4のステップまでの処理を繰り返す第5のステップとを有する復号化方法をコンピュータに実行させる。 The fourth invention specifies a section corresponding to the value of the encoded data from the code range set by the code range specifying value and divided into sections according to the symbol type of the symbol, and the specified section Decoding that causes a computer to execute a decoding method for decoding encoded data into a symbol string composed of a plurality of symbols by repeating search processing for outputting corresponding symbols and arranging the symbols obtained by the repetition. Provide a computer program. The program includes a first step of outputting the symbol type of one symbol from the encoded data by the search process, and a plurality of count values that can specify the appearance frequency of each symbol type output by the search process. Second step of updating the count value corresponding to the symbol type of one symbol, and n (n is a natural number) bits used in the current processing target for the count value corresponding to the symbol type of one symbol A third step of updating the code range specific value by performing a calculation process including at least a shift process for performing bit shift by the shift amount of the code, and a count value for the width of the code range specified by the updated code range specific value the quotient obtained by dividing the total frequency of occurrence is identified approximated by 2 n, the value n obtained by the approximation in the next processed by The fourth step to be set as the shift amount, and the processing from the first step to the fourth step until one predetermined condition is satisfied while sequentially shifting one symbol to be processed in the symbol string And causing the computer to execute a decoding method having a fifth step of repeating

ここで、第4の発明において、判定条件は、符号範囲特定値の更新によって、符号範囲の幅が所定値よりも小さくなった場合、または、符号範囲特定値の所定範囲の上位ビットが変化しなくなった場合であってもよい。   Here, in the fourth invention, the determination condition is that the code range width becomes smaller than the predetermined value due to the update of the code range specific value, or the upper bits of the predetermined range of the code range specific value change. It may be a case where it disappears.

また、第4の発明において、第4のステップは、総出現頻度に対して、近似によって得られたシフト量でビットシフトさせるシフト処理によって算出された値と、今回の処理対象で用いられる符号範囲の幅との差分値である近似誤差を算出する第6のステップを含んでいてもよい。この場合、第3のステップは、近似誤差をシンボル種に応じた所定の比率で按分した上で、次回の処理対象で用いられる符号範囲を構成するシンボル種毎の各区間に割り当てるステップを含むことが好ましい。   In the fourth invention, the fourth step includes a value calculated by a shift process for performing a bit shift with a shift amount obtained by approximation with respect to the total appearance frequency, and a code range used in the current processing target. There may be included a sixth step of calculating an approximation error that is a difference value from the width of. In this case, the third step includes a step of apportioning the approximation error by a predetermined ratio corresponding to the symbol type and assigning it to each section for each symbol type constituting the code range used in the next processing target. Is preferred.

さらに、第1から第4の発明のいずれかにおいて、符号範囲は、符号範囲特定値である上限値、下限値または幅のうちの所定の組み合わせによって特定されることが好ましい。   Furthermore, in any one of the first to fourth inventions, the code range is preferably specified by a predetermined combination of an upper limit value, a lower limit value, or a width that is a code range specifying value.

第1または第2の発明によれば、符号範囲特定値により特定される符号範囲の幅が、カウント値によって特定される総出現頻度で除算した除算値をシフト量で近似される。そして、このシフト量でビットシフトさせるシフト処理を少なくとも含む演算処理を行うことによって、符号範囲特定値が更新される。このように、符号範囲特定値の更新に関して、乗算処理および除算処理をシフト処理に置き換えることで、符号化処理の高速化を図ることが可能となる。それとともに、第1の発明によれば、乗算・除算を行う回路を削減できるので、回路の小規模化を図ることが可能となる。   According to the first or second invention, the width of the code range specified by the code range specifying value is approximated by the shift amount by dividing the divided value by the total appearance frequency specified by the count value. Then, the code range specific value is updated by performing an arithmetic process including at least a shift process for performing a bit shift by this shift amount. Thus, regarding the update of the code range specific value, it is possible to increase the speed of the encoding process by replacing the multiplication process and the division process with the shift process. At the same time, according to the first aspect of the present invention, it is possible to reduce the number of circuits that perform multiplication / division, and thus it is possible to reduce the circuit scale.

また、第3または第4の発明によれば、上述した第1または第2の発明と同様の理由で、復号化処理の高速化を図ることができ、第3の発明によれば、回路の小規模化を図ることが可能となる。   Further, according to the third or fourth invention, the speed of the decoding process can be increased for the same reason as the first or second invention described above. It becomes possible to reduce the scale.

<第1の実施形態(符号化)>
図1は、符号化システムの構成図である。この符号化システムは、符号範囲特定値によって設定される符号範囲を、処理対象となるシンボルのシンボル種に応じた区間に分割する処理が繰り返し実行される。そして、この繰り返し処理によって得られた演算結果を符号化することによって、シンボル列の符号化が行われる。また、カウント値CNT等のデータに付された添字(i),(i-1)は、繰り返し処理における1サイクルを示す。添字(i)は、今回のサイクル(i)で処理対象となるシンボルに基づいて算出された値を示し、添字(i-1)は、前回のサイクル(i−1)で処理対象となったシンボルに基づいて算出された値を示す。
<First Embodiment (Encoding)>
FIG. 1 is a configuration diagram of an encoding system. In this encoding system, the process of dividing the code range set by the code range specific value into sections corresponding to the symbol type of the symbol to be processed is repeatedly executed. Then, the symbol string is encoded by encoding the calculation result obtained by this iterative process. Subscripts (i) and (i-1) attached to data such as the count value CNT indicate one cycle in the iterative process. The subscript (i) indicates a value calculated based on the symbol to be processed in the current cycle (i), and the subscript (i-1) has been processed in the previous cycle (i-1). Indicates the value calculated based on the symbol.

符号化システムは、出現頻度管理部1と、符号範囲管理部2と、シフト量算出部3と、第1の出力管理部4とから構成されている。出現頻度管理部1は、処理対象となるシンボル列に含まれるそれぞれのシンボル種が、現段階でどれだけの回数が入力されたかを管理する。出現頻度管理部1は、記憶部11と更新部12とから構成されている。   The encoding system includes an appearance frequency management unit 1, a code range management unit 2, a shift amount calculation unit 3, and a first output management unit 4. The appearance frequency management unit 1 manages how many times each symbol type included in the symbol string to be processed is input at the current stage. The appearance frequency management unit 1 includes a storage unit 11 and an update unit 12.

記憶部11は、シンボル列に含まれるそれぞれのシンボル種の出現頻度を特定可能な複数のカウント値で記憶する。この記憶部11の記憶内容は、出現頻度表としての構成を有しており、これによってカウント値が記憶される。シンボル種の出現頻度は、出現頻度CNT[j]および累積出現頻度SUM[j](j:一つのシンボルを示す)といった2種類のカウント値によって管理されている。   The storage unit 11 stores a plurality of count values that can specify the appearance frequency of each symbol type included in the symbol string. The storage content of the storage unit 11 has a configuration as an appearance frequency table, and thus count values are stored. The appearance frequency of the symbol type is managed by two types of count values such as the appearance frequency CNT [j] and the cumulative appearance frequency SUM [j] (j: one symbol).

出現頻度CNT[j]は、あるシンボル種jの出現回数である。初期値は1であり、例えばシンボル"a"が2回読み込まれた(入力された)場合、シンボル"a"の出現頻度CNT[a]が1(初期値)から3へとカウントアップされる。また、累積出現頻度SUM[j]は、出現頻度表におけるシンボルが下位から上位に至る所定の順序において、そのシンボル種より下位の出現頻度CNTの累積値である。例えば、出現頻度表が下位からシンボル"a","b","c"の順に並べられていた場合、シンボル"a"の累積出現頻度SUM[a]、シンボル"b"の累積出現頻度SUM[b]、およびシンボル"c"の累積出現頻度SUM[c]は下式で示される。

SUM[a]=0(または"NULL")
SUM[b]=CNT[a]
SUM[c]=CNT[a]+CNT[b]
The appearance frequency CNT [j] is the number of appearances of a certain symbol type j. The initial value is 1. For example, when the symbol “a” is read (input) twice, the appearance frequency CNT [a] of the symbol “a” is counted up from 1 (initial value) to 3. . The cumulative appearance frequency SUM [j] is a cumulative value of the appearance frequency CNT lower than the symbol type in a predetermined order from the lower order to the higher order in the appearance frequency table. For example, when the appearance frequency table is arranged in the order of symbols “a”, “b”, and “c” from the lower order, the cumulative appearance frequency SUM [a] of the symbol “a” and the cumulative appearance frequency SUM of the symbol “b” [b] and the cumulative appearance frequency SUM [c] of the symbol “c” are expressed by the following equations.

SUM [a] = 0 (or “NULL”)
SUM [b] = CNT [a]
SUM [c] = CNT [a] + CNT [b]

また、記憶部11の出現頻度表は、全てのシンボル種の出現頻度CNT[j]を累積した総出現頻度SUMALLも併せて記憶している。例えば、出現頻度表が3つのシンボル"a","b","c"で構成されている場合、総出現頻度SUMALLは下式で表せる。
SUMALL=CNT[a]+CNT[b]+CNT[c]
The appearance frequency table of the storage unit 11 also stores a total appearance frequency SUMALL obtained by accumulating the appearance frequencies CNT [j] of all symbol types. For example, when the appearance frequency table is composed of three symbols “a”, “b”, and “c”, the total appearance frequency SUMALL can be expressed by the following equation.
SUMALL = CNT [a] + CNT [b] + CNT [c]

なお、出現頻度表として、シンボル種毎の出現頻度CNT[j]および累積出現頻度SUM[j]が管理されているが、双方を管理する必要は必ずしもなく、少なくともいずれか一方のみを管理すれば足りる。なぜなら、累積出現頻度SUM[j]については、出現頻度CNTに基づく加算処理によって一義的に特定でき、出現頻度CNT[j]についても、累積出現頻度SUMに基づく減算処理によって一義的に特定できるからである。総出現頻度SUMALLについても同様であり、記憶部11に記憶している出現頻度表から全てのシンボル種の出現頻度CNT[j]が算出できれば、記憶部11は全てのシンボル種の出現頻度CNT[j]を管理する必要はない。   As the appearance frequency table, the appearance frequency CNT [j] and the cumulative appearance frequency SUM [j] for each symbol type are managed. However, it is not always necessary to manage both, and if at least one of them is managed It ’s enough. This is because the cumulative appearance frequency SUM [j] can be uniquely specified by the addition process based on the appearance frequency CNT, and the appearance frequency CNT [j] can also be uniquely specified by the subtraction process based on the cumulative appearance frequency SUM. It is. The same applies to the total appearance frequency SUMALL. If the appearance frequencies CNT [j] of all symbol types can be calculated from the appearance frequency table stored in the storage unit 11, the storage unit 11 displays the appearance frequencies CNT [ j] need not be managed.

また、本実施形態において、出現頻度CNT[j]はシンボル種の出現回数を管理するが、少なくともシンボル種の出現比率が把握できれば足りる。例えば、出現頻度表がシンボル"a","b","c"から構成され、それぞれの出現頻度がCNT[a]=2,CNT[b]=4,CNT[c]=2であった場合、その都度、出現頻度のそれぞれに1/2を乗じ(1ビットの右シフト処理を施し)て、CNT[a]=1,CNT[b]=2,CNT[c]=1と更新してもよい。なお、この出現頻度[j]の更新条件および更新のタイミングは、復号化における再現性の確保のために、後述の復号化システムのそれとと、同じであることが必要である。   In the present embodiment, the appearance frequency CNT [j] manages the number of appearances of the symbol type, but it is sufficient that at least the appearance ratio of the symbol type can be grasped. For example, the appearance frequency table is composed of symbols “a”, “b”, and “c”, and the appearance frequencies are CNT [a] = 2, CNT [b] = 4, and CNT [c] = 2. In each case, each occurrence frequency is multiplied by 1/2 (1-bit right shift processing is performed) to update CNT [a] = 1, CNT [b] = 2, and CNT [c] = 1. May be. Note that the update condition and update timing of the appearance frequency [j] are required to be the same as those of a later-described decoding system in order to ensure reproducibility in decoding.

更新部12は、シンボル列よりシンボルSym(i)が処理対象として入力される毎に、この入力されたシンボル種に対応したカウント値(CNT,SUM)を更新する。例えば、出現頻度表が下位からシンボル"a","b","c"の順に並べられており、シンボル"a"が処理対象として入力された場合、出現頻度CNT[a]に1を加算した値に更新される。これに応じて累積出現頻度SUM[b]、SUM[c]および総出現頻度SUMALLもそれぞれ1づつ加算した値に更新される。   The updating unit 12 updates the count value (CNT, SUM) corresponding to the input symbol type each time the symbol Sym (i) is input as a processing target from the symbol string. For example, when the appearance frequency table is arranged in the order of symbols “a”, “b”, “c” from the lower order, and the symbol “a” is input as a processing target, 1 is added to the appearance frequency CNT [a]. Is updated to the value In response to this, the cumulative appearance frequencies SUM [b], SUM [c], and the total appearance frequency SUMALL are each updated to a value obtained by adding one by one.

符号範囲管理部2は、処理対象であるシンボル列に対応する符号範囲を、シンボルが入力される毎に繰り返し更新する。符号範囲管理部2は、符号範囲記憶部21と、符号範囲更新部22とから構成されている。符号範囲記憶部21は、符号範囲を特定する符号範囲特定値を記憶する。符号範囲特定値は、1次元の線分で表現される符号範囲の絶対的な位置を特定するための情報であり、一例として、符号範囲の下限値LOWと幅RNGとが用いられる。ただし、符号範囲特定値としては、下限値LOWおよび幅RNG以外に、符号範囲の上限を示す上限値UPも存在し、これらの内の少なくとも2つを管理すれば、符号範囲を一義的に特定できる。したがって、管理すべき符号範囲特定値は、本実施形態のような組み合わせに限定されるものではなく、下限値LOWと上限値UPとの組み合わせ、上限値UPと幅RNGとの組み合わせ、或いは、下限値LOWと上限値UPと幅RNGとの組み合わせであってもよい。なお、符号範囲記憶部21に記憶する下限値LOWおよび幅RNGの初期値は、復号化時のデータ再現性を確保すべく、後述の復号化システムのそれと同一であることが前提となる。   The code range management unit 2 repeatedly updates the code range corresponding to the symbol string to be processed every time a symbol is input. The code range management unit 2 includes a code range storage unit 21 and a code range update unit 22. The code range storage unit 21 stores a code range specifying value that specifies a code range. The code range specification value is information for specifying the absolute position of the code range expressed by a one-dimensional line segment, and as an example, the lower limit value LOW and the width RNG of the code range are used. However, as the code range specification value, there is an upper limit value UP indicating the upper limit of the code range in addition to the lower limit value LOW and the width RNG. If at least two of these are managed, the code range is uniquely specified. it can. Therefore, the code range specifying value to be managed is not limited to the combination as in the present embodiment, but the combination of the lower limit value LOW and the upper limit value UP, the combination of the upper limit value UP and the width RNG, or the lower limit. A combination of the value LOW, the upper limit value UP, and the width RNG may be used. Note that the initial values of the lower limit value LOW and the width RNG stored in the code range storage unit 21 are assumed to be the same as those of a later-described decoding system in order to ensure data reproducibility at the time of decoding.

符号範囲更新部22は、今回の処理対象である一のシンボルSym(i)が入力された場合、符号範囲(符号範囲特定値)を更新する。ここで留意すべきは、符号範囲の更新は、出現頻度表の更新前、換言すれば、このシンボルSym(i)のシンボル種に対応したカウント値が更新されるのに先立って行われる点である。具体的には、まず、符号範囲更新部22は、記憶部11の出現頻度表を更新する前に、記憶部11に記憶しているカウント値CNT[j](i-1),SUM[j](i-1)を読み出す。そして、このシンボルSym(i)のシンボル種に対応したカウント値CNT[Sym(i)](i-1),SUM[Sym(i)](i-1)に対して、シフト処理を少なくとも含む演算処理が行われ、新たな符号範囲特定値として下限値LOW(i)および幅RNG(i)が算出される。シフト処理とは、今回の処理対象で用いられるnビットのシフト量SFTでビットシフトさせる演算処理である。なお、算出された符号範囲特定値は、符号範囲記憶部21に記憶される。   The code range update unit 22 updates the code range (code range specific value) when one symbol Sym (i) that is the current processing target is input. It should be noted here that the code range is updated before the update of the appearance frequency table, in other words, before the count value corresponding to the symbol type of this symbol Sym (i) is updated. is there. Specifically, the code range update unit 22 first counts CNT [j] (i−1), SUM [j stored in the storage unit 11 before updating the appearance frequency table in the storage unit 11. ] (i-1) is read. The count value CNT [Sym (i)] (i-1), SUM [Sym (i)] (i-1) corresponding to the symbol type of the symbol Sym (i) includes at least a shift process. An arithmetic process is performed, and a lower limit value LOW (i) and a width RNG (i) are calculated as new code range specifying values. The shift process is an arithmetic process in which a bit shift is performed with an n-bit shift amount SFT used in the current processing target. The calculated code range specific value is stored in the code range storage unit 21.

図2は、符号範囲更新部22の構成図である。符号範囲更新部22は、下限値算出部22aと、幅算出部22eとから構成されている。下限値算出部22aは、シフタ22bと、シフタ22cと、加算器22dとを有している。シフタ22bは、入力されたシンボル種Sym(i)に対応した更新前のカウント値SUM[Sym(i)](i-1)を読み込み、このカウント値SUM[Sym(i)](i-1)に対して、シフト量SFT(i-1)で左ビットシフト処理を行う。また、シフタ22cは、近似誤差RMD(i-1)を読み込み、下限値算出部22aに入力されたシンボルSym(i)に応じた所定値(例えば値L)で右ビットシフト処理を行う。また、加算器22dは、シフタ22b,22cがシフト処理したそれぞれの値と、符号範囲記憶部21に記憶されている更新前の下限値LOW(i-1)の値とを加算して、新たな(次回の処理対象で用いられる)符号範囲の下限値LOW(i)を算出する。なお、算出された下限値LOW(i)は、符号範囲記憶部21に記憶される。下限値算出部22aが算出する下限値LOW(i)は、下式のようになる。なお、"<<"は左ビットシフト処理、">>"は右ビットシフト処理を示し、例えば"SUM[Sym(i)](i-1)<<SFT(i-1)"は、カウント値SUM[Sym(i)](i-1)をシフト量SFT(i-1)ビット分だけ左シフト、つまり2SFT(i-1)を乗じる処理である。

LOW(i)=SUM[Sym(i)](i-1)<<SFT(i-1)+RMD(i-1)>>L+LOW(i-1)
FIG. 2 is a configuration diagram of the code range update unit 22. The code range update unit 22 includes a lower limit value calculation unit 22a and a width calculation unit 22e. The lower limit calculator 22a includes a shifter 22b, a shifter 22c, and an adder 22d. The shifter 22b reads the count value SUM [Sym (i)] (i-1) before update corresponding to the input symbol type Sym (i), and this count value SUM [Sym (i)] (i-1). ) Is subjected to left bit shift processing with a shift amount SFT (i−1). Further, the shifter 22c reads the approximate error RMD (i-1) and performs right bit shift processing with a predetermined value (for example, value L) corresponding to the symbol Sym (i) input to the lower limit calculation unit 22a. Further, the adder 22d adds the respective values shifted by the shifters 22b and 22c and the value of the lower limit value LOW (i-1) before update stored in the code range storage unit 21 to obtain a new value. The lower limit value LOW (i) of the code range (used in the next processing target) is calculated. The calculated lower limit value LOW (i) is stored in the code range storage unit 21. The lower limit value LOW (i) calculated by the lower limit value calculation unit 22a is expressed by the following equation. "<<" indicates left bit shift processing, and ">>" indicates right bit shift processing. For example, "SUM [Sym (i)] (i-1) << SFT (i-1)" This is a process of shifting the value SUM [Sym (i)] (i-1) to the left by the shift amount SFT (i-1) bits, that is, multiplying by 2 SFT (i-1) .

LOW (i) = SUM [Sym (i)] (i-1) << SFT (i-1) + RMD (i-1) >> L + LOW (i-1)

幅算出部22eは、下限値算出部22aと同様に、シフタ22fと、シフタ22gと、加算器22hとを有しているが、処理対象となるカウント値が異なっている。また、加算器22hが符号範囲記憶部21に記憶されている更新前の符号範囲特定値を用いない点も異なっている。シフタ22fは、入力されたシンボル種Sym(i)に対応した更新前のカウント値CNT[Sym(i)](i-1)を読み込み、このカウント値CNT[Sym(i)](i-1)に対して、シフト量SFT(i-1)で左ビットシフト処理を行う。また、シフタ22gは、近似誤差RMD(i-1)を読み込み、幅算出部22eに入力されたシンボルSym(i)に応じた所定値(例えば値R)で右ビットシフト処理を行う。加算器22hは、シフタ22f,22gがシフト処理したそれぞれの値とを加算して、新たな(次回の処理対象で用いられる)符号範囲の幅RNG(i)を算出する。なお、算出された幅RNG(i)は、符号範囲記憶部21に記憶される。幅算出部22eが算出する下限値RNG(i)は、下式のようになる。

RNG(i)=CNT[Sym(i)](i-1)<<SFT(i-1)+RMD(i-1)>>R
Similar to the lower limit calculation unit 22a, the width calculation unit 22e includes a shifter 22f, a shifter 22g, and an adder 22h, but the count values to be processed are different. Another difference is that the adder 22h does not use the pre-update code range specific value stored in the code range storage unit 21. The shifter 22f reads the pre-update count value CNT [Sym (i)] (i-1) corresponding to the input symbol type Sym (i), and this count value CNT [Sym (i)] (i-1 ) Is subjected to left bit shift processing with a shift amount SFT (i−1). The shifter 22g reads the approximate error RMD (i-1) and performs a right bit shift process with a predetermined value (for example, value R) corresponding to the symbol Sym (i) input to the width calculation unit 22e. The adder 22h adds the values shifted by the shifters 22f and 22g and calculates a new code range width RNG (i) (used for the next processing target). The calculated width RNG (i) is stored in the code range storage unit 21. The lower limit value RNG (i) calculated by the width calculation unit 22e is expressed by the following equation.

RNG (i) = CNT [Sym (i)] (i-1) << SFT (i-1) + RMD (i-1) >> R

シフト量算出部3は、符号範囲管理部2よって更新された符号範囲特定値により特定される符号範囲の幅RNG(i-1)を、カウント値によって特定される総出現頻度SUMALL(i-1)で除算した除算値を2n(2の階乗)で近似する。そして、この近似によって得られた値nを次回の処理対象で用いられるシフト量SFTとして設定する。 The shift amount calculation unit 3 uses the code range width RNG (i−1) specified by the code range specification value updated by the code range management unit 2 as the total appearance frequency SUMALL (i−1) specified by the count value. ) Is approximated by 2 n (2 factorial). Then, the value n obtained by this approximation is set as the shift amount SFT used for the next processing target.

図3は、シフト量算出部の構成図である。シフト量算出部3は、近似部31とシフタ32と、減算器33とから構成されている。近似部31は、符号範囲記憶部21に記憶された幅RNG(i-1)を、記憶部11に記憶された更新前の総出現頻度SUMALL(i-1)で除算した除算値を2の階乗で近似し、シフト量SFT(i-1)を算出する。本実施形態では、総出現頻度SUMALL(i-1)を左ビットシフト処理した値と、幅RNG(i-1)を比較した値とを比較することによってシフト量SFT(i-1)が算出される。具体的には、下式を満たすシフト量SFT(i-1)が算出される。なお、近似は単純に幅RNG(i-1)と総出現頻度SUMALLとの除算値を求め、この除算値と2の階乗とを比較することで、シフト量nを算出することシフト量を算出してもよい。

(SUMALL(i-1)<<SFT(i-1))≦ RNG(i-1) <(SUMALL<<SFT(i-1)+1)
FIG. 3 is a configuration diagram of the shift amount calculation unit. The shift amount calculation unit 3 includes an approximation unit 31, a shifter 32, and a subtracter 33. The approximating unit 31 divides the division value obtained by dividing the width RNG (i−1) stored in the code range storage unit 21 by the total appearance frequency SUMALL (i−1) before update stored in the storage unit 11. Approximate by factorial and calculate shift amount SFT (i-1). In this embodiment, the shift amount SFT (i-1) is calculated by comparing the value obtained by shifting the total appearance frequency SUMALL (i-1) with the left bit and the value comparing the width RNG (i-1). Is done. Specifically, a shift amount SFT (i−1) that satisfies the following equation is calculated. For approximation, simply calculate the shift amount n by obtaining the division value of the width RNG (i-1) and the total appearance frequency SUMALL and comparing this division value with the factorial of 2. It may be calculated.

(SUMALL (i-1) << SFT (i-1)) ≤RNG (i-1) << (SUMALL << SFT (i-1) +1)

シフタ32は、更新前の総出現頻度SUMALL(i-1)を近似部31で算出したシフト量SFT(i-1)で左ビットシフト処理を行う。また、減算器33は、シフタ32で算出された値と、符号範囲記憶部21に記憶された更新前の幅RNG(i-1)との減算を行い、近似誤差RMD(i-1)を算出する。近似誤差RMD(i-1)は、シフト量SFT(i-1)への近似を行った結果、総出現頻度をシフト量SFT(i-1)でビットシフトさせるシフト処理によって算出された値と、今回の処理対象で用いられる符号範囲の幅との差分値である。近似誤差RMDは下式のようになる。SUMALL<<SFT=RNGである場合、近似誤差は算出されない。

RMD(i-1)=RNG(i-1)−(SUMALL(i-1)<<SFT(i-1))
The shifter 32 performs a left bit shift process with the shift amount SFT (i−1) calculated by the approximating unit 31 for the total appearance frequency SUMALL (i−1) before the update. The subtractor 33 subtracts the value calculated by the shifter 32 and the pre-update width RNG (i−1) stored in the code range storage unit 21 to obtain the approximate error RMD (i−1). calculate. As a result of approximation to the shift amount SFT (i-1), the approximation error RMD (i-1) is a value calculated by a shift process in which the total appearance frequency is bit-shifted by the shift amount SFT (i-1). The difference value from the width of the code range used in the current processing target. The approximate error RMD is as follows. If SUMALL << SFT = RNG, no approximation error is calculated.

RMD (i-1) = RNG (i-1) − (SUMALL (i-1) << SFT (i-1))

第1の出力管理部4は、処理対象のシンボルSym(i)が入力されることによって符号範囲更新部22が更新した符号範囲特定値を、符号範囲記憶部21から読み取り、所定の条件を満たすことで、この符号範囲特定値の一部を符号化データとして出力する。第1の出力管理部4は、判定部41と、出力更新部42とによって構成される。判定部41は、符号範囲記憶部21の符号範囲の下限値LOW(i)および幅RNG(i)を読み出し、所定の出力条件および終了条件を満たすか否かの判定を行い、この判定に基づいて出力更新部42の制御を行う。また、出力更新部42は、判定部41の判定に基づき、符号範囲記憶部21に記憶される下限値LOW(i)の値を符号化データとして出力するとともに、下限値LOW(i)および幅RNG(i)を再更新する。   The first output management unit 4 reads the code range specific value updated by the code range update unit 22 when the symbol Sym (i) to be processed is input from the code range storage unit 21 and satisfies a predetermined condition. Thus, a part of the code range specific value is output as encoded data. The first output management unit 4 includes a determination unit 41 and an output update unit 42. The determination unit 41 reads the lower limit value LOW (i) and the width RNG (i) of the code range in the code range storage unit 21, determines whether or not predetermined output conditions and end conditions are satisfied, and based on this determination The output update unit 42 is controlled. Further, the output update unit 42 outputs the value of the lower limit value LOW (i) stored in the code range storage unit 21 as encoded data based on the determination of the determination unit 41, and also outputs the lower limit value LOW (i) and width. Renew RNG (i).

図4は、符号化処理のフローチャートである。この処理フローは全体として、符号範囲特定値によって設定される符号範囲を、処理対象となるシンボルのシンボル種に応じた区間に分割する処理を繰り返す(ステップ103〜ステップ112)。そして、この繰り返し処理によって得られた演算結果を出力する(ステップ107,ステップ111)ことによって、複数のシンボルで構成されたシンボル列を符号化する。   FIG. 4 is a flowchart of the encoding process. This processing flow as a whole repeats the process of dividing the code range set by the code range specific value into sections corresponding to the symbol type of the symbol to be processed (step 103 to step 112). Then, a calculation result obtained by this iterative process is output (step 107, step 111), thereby encoding a symbol string composed of a plurality of symbols.

まず、ステップ101において、処理対象のシンボルSym(i)が読み込まれる(入力される)前に、記憶部11に記憶されているカウント値CNT,SUMおよびシフト量SFTと、符号範囲記憶部21に記憶されている下限値LOWおよび幅RNGが初期化がされる。具体的には、更新部12が、記憶部11の出現頻度表に記憶されたシンボル種のカウント値CNT[j]を全て1に更新(全てのシンボルの出現確率は等確率と過程)する。   First, in step 101, before the symbol to be processed Sym (i) is read (input), the count values CNT and SUM and the shift amount SFT stored in the storage unit 11 and the code range storage unit 21 are stored. The stored lower limit value LOW and width RNG are initialized. Specifically, the update unit 12 updates all the count values CNT [j] of the symbol types stored in the appearance frequency table of the storage unit 11 to 1 (the appearance probabilities of all symbols are processes with equal probability).

例えば、処理対象のシンボル列に含まれるシンボル種が"a","b","c"のみで構成されている場合、出現頻度表のカウント値CNT[a](0),CNT[b](0),CNT[c](0)は全て1である。これに伴い、総出現頻度SUMALL(0)も3に更新される。また、符号範囲記憶部21の符号範囲特定値も所定の値(例えば、LOW(0)=0,RNG(0)=65535といった自然数)に更新される。このとき、この総出現頻度SUMALL(0)と、幅RNG(0)が既に設定されたことになるので、シフト量算出部3はこれらの値に基づいてシフト量SFT(0)、近似誤差RMD(0)を算出する。算出されたシフト量SFT(0)、近似誤差RMD(0)は、シフト量算出部3または符号範囲更新部22が備えるバッファ(図示せず)に記憶される。   For example, when the symbol type included in the symbol string to be processed is composed of only “a”, “b”, and “c”, the count values CNT [a] (0) and CNT [b] in the appearance frequency table (0) and CNT [c] (0) are all 1. Accordingly, the total appearance frequency SUMALL (0) is also updated to 3. Also, the code range specifying value of the code range storage unit 21 is also updated to a predetermined value (for example, a natural number such as LOW (0) = 0, RNG (0) = 65535). At this time, since the total appearance frequency SUMALL (0) and the width RNG (0) are already set, the shift amount calculation unit 3 determines the shift amount SFT (0) and the approximate error RMD based on these values. Calculate (0). The calculated shift amount SFT (0) and approximate error RMD (0) are stored in a buffer (not shown) provided in the shift amount calculation unit 3 or the code range update unit 22.

ステップ102において、ループ変数iが設定される。このループ変数は、シンボルの入力に対する出現頻度表および符号範囲の更新タイミングを示すものであり、初期値として1が設定される。なお、シンボルの入力に対する出現頻度表および符号範囲の更新のタイミングを管理できれば、ループ変数iは、この符号化システム内外のいずれかのバッファ(例えば、更新部12)に記憶されてもよい。   In step 102, a loop variable i is set. This loop variable indicates the update timing of the appearance frequency table and the code range for the input of the symbol, and is set to 1 as an initial value. Note that the loop variable i may be stored in any buffer (for example, the updating unit 12) inside or outside the encoding system as long as the timing of updating the appearance frequency table and the code range for the input of the symbol can be managed.

ステップ103において、処理対象のシンボル列のうちi番目(初期値であれば1)のシンボルSym(i)が入力される。入力されたシンボルSym(i)は、出現頻度管理部1の更新部12と、符号範囲管理部2の符号範囲更新部22とにそれぞれ入力される。このとき、更新部12は、この入力シンボルSym(i)に対するカウント値(出現頻度表)の更新を行わない。   In step 103, the i-th symbol (1 if the initial value is one) in the symbol string to be processed is input. The input symbol Sym (i) is input to the update unit 12 of the appearance frequency management unit 1 and the code range update unit 22 of the code range management unit 2 respectively. At this time, the updating unit 12 does not update the count value (appearance frequency table) for the input symbol Sym (i).

そして、ステップ104において、符号範囲更新部22は、入力されたシンボルSym(i)に対応したカウント値CNT[Sym(i)](i-1),SUM[Sym(i)](i-1)と、シフト量算出部3によって算出されたシフト量SFT(i-1)と、近似誤差RMD(i-1)とを読み込む。上述したように、これらのカウント値CNT[Sym(i)](i-1),SUM[Sym(i)](i-1)は、更新部12が記憶部11の出現頻度表を更新する前のものが用いられる。なお、本実施形態においてシフト量SFT(i-1)は、後述のステップ112(またはステップ101)で予め算出(設定)されているが、例えばステップ104でシフト量SFT(i-1)を算出するといった如く、次のステップ105の処理前に算出されていれば足りる。   In step 104, the code range update unit 22 counts CNT [Sym (i)] (i-1), SUM [Sym (i)] (i-1) corresponding to the input symbol Sym (i). ), The shift amount SFT (i−1) calculated by the shift amount calculation unit 3, and the approximation error RMD (i−1). As described above, the update unit 12 updates the appearance frequency table of the storage unit 11 with respect to the count values CNT [Sym (i)] (i-1) and SUM [Sym (i)] (i-1). The previous one is used. In this embodiment, the shift amount SFT (i-1) is calculated (set) in advance in step 112 (or step 101) described later. For example, in step 104, the shift amount SFT (i-1) is calculated. As described above, it is sufficient if it is calculated before the processing of the next step 105.

ステップ105において、符号範囲更新部22は、ステップ104で読み込まれたこれらの値CNT(i-1),SUM(i-1),SFT(i-1),RMD(i-1)に基づいて、次回のシンボルの入力による更新処理に用いられる新たな下限値LOW(i)および新たな幅RNG(i)を算出する。この新たな符号範囲特定値が、符号範囲記憶部21に記憶されることで符号範囲が更新される。   In step 105, the code range update unit 22 is based on these values CNT (i-1), SUM (i-1), SFT (i-1), and RMD (i-1) read in step 104. Then, a new lower limit value LOW (i) and a new width RNG (i) used for the update process by the next symbol input are calculated. The code range is updated by storing the new code range specifying value in the code range storage unit 21.

ステップ106において、第1の出力管理部4の判定部41が、シンボル列の符号化を終了するか否かの終了条件を判定する。この終了条件を満たす場合は処理をステップ107へ進め、満たさない場合は処理をステップ108へ進める。この終了条件は、符号化処理における繰り返し処理を防ぎ、後述の復号化システムにも共通して適用できる(判定できる)ものあれば、どのような条件であってもよい。本実施形態において、終了条件は例として以下がある。
(例1)
符号化処理前に予め符号化終了を示すシンボル(例えば、シンボル"EOF")を設定しておき、このシンボル処理対象として入力された場合(Sym(i)="EOF")。
(例2)
符号化処理前に予めループ回数の閾値(LAST)を設定しておき、ループ変数iが閾値に達した場合(i=LAST)。
In step 106, the determination unit 41 of the first output management unit 4 determines an end condition whether or not to end the encoding of the symbol string. If this end condition is satisfied, the process proceeds to step 107; otherwise, the process proceeds to step 108. This termination condition may be any condition as long as it can be applied (determined) in common to a decoding system described later and prevents repeated processing in the encoding process. In the present embodiment, the end conditions are as follows, for example.
(Example 1)
When a symbol indicating the end of encoding (for example, symbol “EOF”) is set in advance before encoding processing and is input as a symbol processing target (Sym (i) = “EOF”).
(Example 2)
A threshold value (LAST) of the number of loops is set in advance before the encoding process, and the loop variable i reaches the threshold value (i = LAST).

終了条件を満たし、ステップ107へ処理が進んだ場合、判定部41が出力更新部42に対して、符号範囲記憶部21に記憶されている下限値LOW(i)を符号化データとして出力して、処理を終了する。一方、終了条件を満たさず、ステップ108へ処理が進んだ場合、カウント値が更新される。具体的には、更新部12は、記憶部11に対してカウント値CNT[j],SUM[j]を更新する。なお、ステップ101と同様に、算出されたシフト量SFT(i)および近似誤差RMD(i)は、シフト量算出部3または符号範囲更新部22が備えるバッファ(図示せず)に記憶される。その後、処理をステップ109へ進める。   When the end condition is satisfied and the process proceeds to step 107, the determination unit 41 outputs the lower limit value LOW (i) stored in the code range storage unit 21 to the output update unit 42 as encoded data. The process is terminated. On the other hand, when the end condition is not satisfied and the process proceeds to step 108, the count value is updated. Specifically, the updating unit 12 updates the count values CNT [j] and SUM [j] to the storage unit 11. As in step 101, the calculated shift amount SFT (i) and approximate error RMD (i) are stored in a buffer (not shown) provided in the shift amount calculation unit 3 or the code range update unit 22. Thereafter, the process proceeds to step 109.

つぎに説明するステップ109およびステップ110は、ステップ105で更新された符号範囲特定値を出力する出力条件である。本実施形態の出力条件は、ステップ109の後にステップ110が実行されているが、ステップ110の後にステップ109が実行されてもよい。   Next, step 109 and step 110 described below are output conditions for outputting the code range specific value updated in step 105. In the output condition of the present embodiment, step 110 is executed after step 109, but step 109 may be executed after step 110.

ステップ109において、次回の処理対象で用いられる幅RNG(i)が所定値よりも小さいか否かが判定される。具体的には、第1の出力管理部4の判定部41が、符号範囲記憶部21に記憶された幅RNG(i)を読み取り、この幅RNG(i)が所定値より小さくなったかどうかを判定する。幅RNG(i)が所定値よりも小さくない場合、つまり、幅RNGは値を縮小させる余地ある(幅RNG(i)をさらに縮小させても、以降の演算処理に影響がない)場合には、処理をステップ110へ進める。一方、幅RNG(i)が所定値よりも小さい場合、つまり、幅RNGは値を縮小させる余地ない(幅RNG(i)をさらに縮小させると、以降の演算処理に影響がある)場合には、処理をステップ111へ進める。   In step 109, it is determined whether or not the width RNG (i) used for the next processing target is smaller than a predetermined value. Specifically, the determination unit 41 of the first output management unit 4 reads the width RNG (i) stored in the code range storage unit 21, and determines whether the width RNG (i) is smaller than a predetermined value. judge. When the width RNG (i) is not smaller than the predetermined value, that is, when there is room to reduce the value of the width RNG (the further arithmetic processing is not affected even if the width RNG (i) is further reduced) , The process proceeds to step 110. On the other hand, when the width RNG (i) is smaller than the predetermined value, that is, the width RNG has no room to reduce the value (if the width RNG (i) is further reduced, the subsequent arithmetic processing is affected). , The process proceeds to step 111.

ステップ110において、符号範囲更新部22の更新処理によって、符号範囲特定値の所定範囲の上位ビットが変化しなくなったか否かが判定される。この判定は、回の処理対象で用いられる符号範囲特定値の所定範囲の上位ビットと、今回の処理対象で用いられる符号範囲特定値の所定範囲の上位ビットとを比較することによって行われる。具体的には、第1の出力管理部4の判定部41が、前回の処理対象で算出されていた下限値LOW(i-1)を記憶しており、符号範囲記憶部21に記憶されている下限値LOW(i)を読み取り、下限値LOW(i-1)との比較を行う。そして、下限値(i)と下限値(i-1)の上位8ビットが異なっている、つまり下限値LOW(i)の値に大きな差がみられる場合、処理をステップ112へ進める。下限値(i)と下限値(i-1)の上位8ビットが不変、つまり、これ以上符号範囲を更新を行っても、下限値LOW(i)の値が変わらない場合、処理をステップ111へ進める。なお、本実施形態において、以前の処理対象で算出されていた下限値LOW(i-1)は、判定部41に記憶されているが、符号範囲記憶部21に記憶してもよい。この場合、判定部41は符号範囲記憶部21から、下限値LOW(i)とともに、下限値LOW(i-1)も読み込んで上記の比較を行う。   In step 110, it is determined whether or not the upper bits of the predetermined range of the code range specific value are not changed by the update process of the code range update unit 22. This determination is performed by comparing the upper bits of the predetermined range of the code range specific value used in the processing target with the upper bits of the predetermined range of the code range specific value used in the current processing target. Specifically, the determination unit 41 of the first output management unit 4 stores the lower limit value LOW (i−1) calculated for the previous processing target, and is stored in the code range storage unit 21. The lower limit value LOW (i) is read and compared with the lower limit value LOW (i-1). If the upper 8 bits of the lower limit value (i) and the lower limit value (i-1) are different, that is, if there is a large difference in the value of the lower limit value LOW (i), the process proceeds to step 112. If the upper 8 bits of the lower limit value (i) and the lower limit value (i-1) are unchanged, that is, if the value of the lower limit value LOW (i) does not change even if the code range is updated more than this, the processing is performed at step 111. Proceed to In the present embodiment, the lower limit value LOW (i−1) calculated for the previous processing target is stored in the determination unit 41, but may be stored in the code range storage unit 21. In this case, the determination unit 41 reads the lower limit value LOW (i−1) as well as the lower limit value LOW (i) from the code range storage unit 21 and performs the above comparison.

ステップ109およびステップ110における出力条件を満たし、ステップ111へ処理が進んだ場合、下限値LOW(i)が符号化データcodeとして出力され、あわせて下限値LOW(i)と幅RNG(i)とが再更新される。具体的には、判定部41が出力更新部42に対して、下限値LOW(i)の出力・更新を行うように制御する。そして、出力更新部42は、この制御に応じて符号範囲記憶部21から下限値LOW(i)および幅RNG(i)を読み取り、このうち下限値LOW(i)の上位8ビットを出力し、下限値(i)および幅RNG(i)の値を8ビット分を左シフトするビットシフト処理を行う。つまり、出力更新部42は、下限値LOW(i)を左シフトさせ、これによって桁があふれたビット分を符号化データcodeとして出力する。   When the output conditions in step 109 and step 110 are satisfied and the process proceeds to step 111, the lower limit value LOW (i) is output as encoded data code, and the lower limit value LOW (i) and width RNG (i) Will be updated again. Specifically, the determination unit 41 controls the output update unit 42 to output and update the lower limit value LOW (i). Then, the output update unit 42 reads the lower limit value LOW (i) and the width RNG (i) from the code range storage unit 21 according to this control, and outputs the upper 8 bits of the lower limit value LOW (i). A bit shift process for shifting the lower limit value (i) and the width RNG (i) by 8 bits to the left is performed. In other words, the output update unit 42 shifts the lower limit value LOW (i) to the left, and outputs the bits that have overflowed digits as encoded data code.

なお、下限値(i)を左シフトすることで空白(または"NULL")になる下位8ビットには0が挿入される。また、これと同様に、幅RNGも8ビット左シフトするビットシフト処理が行われる。この処理は、符号化データcodeの出力と同時に、値の小さくなった符号範囲特定値が再び大きくするもので、下限値LOWおよび幅RNGを用いた符号化処理の演算処理の低下を抑えることができる。そして、シフト量算出部3が符号範囲記憶部21の幅RNG(i)を読み取り、シフト量SFT(i)および近似誤差RMD(i)を算出する(ステップ112)。最後に、ループ変数がインクリメントされた上で(ステップ113)、処理をステップ103へ進める。   Note that 0 is inserted in the lower 8 bits that become blank (or “NULL”) by shifting the lower limit (i) to the left. Similarly, a bit shift process for shifting the width RNG to the left by 8 bits is performed. In this process, the code range specific value whose value has been reduced is increased again at the same time as the output of the encoded data code, and it is possible to suppress a decrease in the calculation process of the encoding process using the lower limit value LOW and the width RNG. it can. Then, the shift amount calculation unit 3 reads the width RNG (i) of the code range storage unit 21, and calculates the shift amount SFT (i) and the approximate error RMD (i) (step 112). Finally, after the loop variable is incremented (step 113), the process proceeds to step 103.

つぎに、図5の符号化における符号範囲の遷移図を参照しながら、本実施形態に係る符号範囲の具体的なケースについて説明する。本ケースでは、出現頻度表に3つのシンボル種"a","b","c"のカウント値が予め設定されており、入力として"b","a"の順にシンボル列のシンボルが入力され、この2つのシンボルの入力が完了すると、符号化が終了する(LAST=2)。なお、ステップ109,110で説明した出力条件は満たしておらず、これに伴いステップ111の処理も行わないものとする。   Next, a specific case of the code range according to the present embodiment will be described with reference to a code range transition diagram in FIG. In this case, count values of three symbol types “a”, “b”, “c” are set in advance in the appearance frequency table, and symbols in the symbol sequence are input in the order of “b”, “a”. When the input of these two symbols is completed, the encoding ends (LAST = 2). Note that the output conditions described in steps 109 and 110 are not satisfied, and accordingly, the processing in step 111 is not performed.

図5(a)は、初期状態(i=0)における符号範囲の状態を示している(ステップ101)。符号範囲記憶部21に記憶されている幅RNG(0)および下限値LOW(0)は、符号化処理前に予め設定されている初期値である。また図中の符号範囲は、シンボル種毎に線分が分割されているが、これは説明を簡略化するために表記したものであり、実装上、それぞれのシンボル種を示す区間を特定する値(境界値)は、符号範囲記憶部21には記憶されていない。   FIG. 5A shows the state of the code range in the initial state (i = 0) (step 101). The width RNG (0) and the lower limit value LOW (0) stored in the code range storage unit 21 are initial values set in advance before the encoding process. In addition, the code range in the figure has a line segment divided for each symbol type, but this is described for the sake of simplicity, and is a value that identifies a section indicating each symbol type in implementation. (Boundary value) is not stored in the code range storage unit 21.

図5(b)は、シフト量算出部3が、記憶部11のカウント値CNT[j],SUM[j]および符号範囲記憶部21の幅RNG(0)から、シフト量SFT(0)および近似誤差RMD(0)を算出した符号範囲の状態を示している(ステップ104)。符号範囲更新部22は、この近似誤差を所定の比率(a:b:c=1:2:1)で按分した上で、符号範囲を構成するシンボル種毎の各区間に割り当てる。   In FIG. 5B, the shift amount calculation unit 3 calculates the shift amount SFT (0) and the shift amount SFT (0) from the count values CNT [j] and SUM [j] of the storage unit 11 and the width RNG (0) of the code range storage unit 21. The state of the code range in which the approximate error RMD (0) is calculated is shown (step 104). The code range updating unit 22 apportions this approximation error at a predetermined ratio (a: b: c = 1: 2: 1) and assigns it to each section for each symbol type constituting the code range.

近似誤差の割り当ては、近似誤差RMDを除算および乗算処理を用いることも可能であるが、本実施形態の場合、ビットシフト処理を用いることも可能である。なぜなら、1ビットの右シフトを行うと値は1/2になり、2ビットの右シフトを行うと値は1/4になるからである。近似誤差の分割を上記の比率で固定して割り当てる場合、入力されるシンボルSym(i)と新たに算出される下限値LOW(i),幅RNG(i)の対応関係は、下式で表せる。

(1)Sym(i)="a"の場合
LOW(i)=SUM[a](i-1)<<SFT(i-1)+LOW(i-1)
RNG(i)=CNT[a](i-1)<<SFT(i-1)+RMD(i-1)>>2
(2)Sym(i)="b"の場合
LOW(i)=SUM[b](i-1)<<SFT(i-1)+RMD(i-1)>>2+LOW(i-1)
RNG(i)=CNT[b](i-1)<<SFT(i-1)+RMD(i-1)>>1
(3)Sym(i)="c"の場合
LOW(i)=SUM[c](i-1)<<SFT(i-1)+RMD(i-1)>>2++RMD(i-1)>>1+LOW(i-1)
RNG(i)=CNT[c](i-1)<<SFT(i-1)+RMD(i-1)>>2
Allocation of the approximate error can be performed by dividing and multiplying the approximate error RMD, but in the case of this embodiment, bit shift processing can also be used. This is because a 1-bit right shift makes the value 1/2, and a 2-bit right shift makes the value 1/4. When the approximate error division is fixed and assigned at the above ratio, the correspondence between the input symbol Sym (i), the newly calculated lower limit LOW (i), and the width RNG (i) can be expressed by the following equation: .

(1) When Sym (i) = "a"
LOW (i) = SUM [a] (i-1) << SFT (i-1) + LOW (i-1)
RNG (i) = CNT [a] (i-1) << SFT (i-1) + RMD (i-1) >> 2
(2) When Sym (i) = "b"
LOW (i) = SUM [b] (i-1) << SFT (i-1) + RMD (i-1) >> 2 + LOW (i-1)
RNG (i) = CNT [b] (i-1) << SFT (i-1) + RMD (i-1) >> 1
(3) When Sym (i) = “c”
LOW (i) = SUM [c] (i-1) << SFT (i-1) + RMD (i-1) >> 2 +++ RMD (i-1) >> 1 + LOW (i-1)
RNG (i) = CNT [c] (i-1) << SFT (i-1) + RMD (i-1) >> 2

したがって、本ケースの場合、入力されるシンボルが"b"なので、新たに算出される下限値LOW(1)および幅RNG(1)は下式のようになる。図5(c)は、この式により算出された近似誤差をシンボル種毎の各区間に按分した上で割り当てることによって、新たな符号範囲に更新された状態を示している。(ステップ105)。

LOW(1)=SUM[b](0)<<SFT(0)+RMD(0)>>2+LOW(0)
RNG(1)=CNT[b](0)<<SFT(0)+RMD(0)>>1
Therefore, in this case, since the input symbol is “b”, the newly calculated lower limit value LOW (1) and width RNG (1) are expressed by the following equations. FIG. 5C shows a state in which the approximate error calculated by this equation is allocated to each section for each symbol type and then assigned to a new code range. (Step 105).

LOW (1) = SUM [b] (0) << SFT (0) + RMD (0) >> 2 + LOW (0)
RNG (1) = CNT [b] (0) << SFT (0) + RMD (0) >> 1

なお、近似誤差の割り当ては、本ケースのように符号化処理前に予め設定した比率で静的に割り当てることも可能であるが、近似誤差を動的に割り当ててもよい。例えば、今回の符号処理の直前に入力したシンボルSym(i-1)や、符号処理における今現在の出現頻度表のカウント値の分布に応じて、近似誤差の割り当てを変化させてもよい。具体的には、同じシンボルが連続して出現する(入力される)可能性が高い場合、このシンボルの幅RNGに多く近似誤差RMDを割り当てたり、今現在のそれぞれのシンボル種のカウント値CNTをそのまま比率として割り当てることもできる。ただし、静的な割り当てと同様に、近似誤差RMDの割当設定は後述の復号化と同じである必要がある。   Note that the approximation error can be statically assigned at a ratio set in advance before the encoding process as in this case, but the approximation error may be dynamically assigned. For example, the allocation of the approximation error may be changed according to the symbol Sym (i−1) input immediately before the current encoding process or the distribution of count values in the current appearance frequency table in the encoding process. Specifically, when there is a high possibility that the same symbol will appear (input) continuously, an approximate error RMD is assigned to the width RNG of this symbol, or the count value CNT of each current symbol type is assigned. It can also be assigned as a ratio as it is. However, similar to the static allocation, the allocation setting of the approximation error RMD needs to be the same as the decoding described later.

図5(d)は、1回目のシンボル入力が完了した(i=1)符号範囲の状態を示している。初期状態と同様に、それぞれのシンボル種を示す区間を特定する値(境界値)は、符号範囲記憶部21には記憶されていない。そして、同図(e)はシフト量算出部3が、記憶部11のカウント値SUMALL(1)と、符号範囲記憶部21の幅RMG(1)とに基づいて、シフト量SFT(1)および近似誤差RMD(1)を算出した符号範囲の状態を示している(ステップ104)。そして、同図(b)と同様に、この近似誤差をシンボル"a","b","c"に対して1:2:1の比率で按分して割り当てる。   FIG. 5D shows the state of the code range in which the first symbol input is completed (i = 1). Similar to the initial state, the value (boundary value) for specifying the section indicating each symbol type is not stored in the code range storage unit 21. FIG. 8E shows that the shift amount calculation unit 3 performs the shift amount SFT (1) and the shift amount SFT (1) based on the count value SUMALL (1) of the storage unit 11 and the width RMG (1) of the code range storage unit 21. The state of the code range in which the approximate error RMD (1) is calculated is shown (step 104). Then, as in FIG. 5B, the approximate error is allocated equally to the symbols “a”, “b”, and “c” at a ratio of 1: 2: 1.

図5(f)は、算出された近似誤差RMD(1)をシンボル種に応じて割り当て、新たな符号範囲に更新された状態を示している(ステップ105)。なお、累積出現頻度SUMALL[a](1)には値が記憶されていない(0または"NULL")ので、左シフト処理を行っても値は0である。したがって、新たに設定される下限値LOW(2)は、下限値LOW(1)のままになる。そして、同図(g)のような次回のシンボル処理に対応する下限値LOW(2)および幅RNG(2)が更新され、このうち下限値LOW(2)がシンボル列を符号化した符号化データcodeとして、出力更新部42から出力される(ステップ107)。   FIG. 5F shows a state where the calculated approximate error RMD (1) is assigned according to the symbol type and updated to a new code range (step 105). Note that since the value is not stored in the cumulative appearance frequency SUMALL [a] (1) (0 or “NULL”), the value is 0 even if the left shift process is performed. Therefore, the newly set lower limit value LOW (2) remains the lower limit value LOW (1). Then, the lower limit value LOW (2) and the width RNG (2) corresponding to the next symbol processing as shown in (g) in the figure are updated, and the lower limit value LOW (2) of them encodes the symbol string. The data code is output from the output update unit 42 (step 107).

このように、本実施形態によれば、シフト量算出部3が、符号化において符号範囲の幅RNG(i-1)を総出現頻度SUMALL(i-1)での除算値を除算値を2nで近似し、この近似によって得られた値nを次回の処理対象で用いられるシフト量SFT(i-1)として設定する。そして、符号範囲更新部22が、このシフト量SFTとカウント値CNT[j](i-1),SUM[j](i-1)とに基づいて、新たな下限値LOW(i)および新たな幅RNG(i)を設定する。これにより、次回の符号範囲特定値の更新において、乗算処理および除算処理が、シフト処理にかえることができるので、全体の処理速度の高速化を図ることが可能となる。また、除算・乗算処理も削減されるので、回路全体の規模を縮小することが可能になる。 As described above, according to the present embodiment, the shift amount calculation unit 3 sets the division value obtained by dividing the code range width RNG (i-1) by the total appearance frequency SUMALL (i-1) into 2 in the encoding. Approximate with n , and set the value n obtained by this approximation as the shift amount SFT (i-1) used in the next processing target. The code range update unit 22 then generates a new lower limit value LOW (i) and a new lower limit value LOW (i) based on the shift amount SFT and the count values CNT [j] (i-1) and SUM [j] (i-1). Set a reasonable width RNG (i). Thereby, in the next update of the code range specific value, the multiplication process and the division process can be changed to the shift process, so that the overall processing speed can be increased. Further, since the division / multiplication processing is also reduced, it is possible to reduce the scale of the entire circuit.

また、本実施形態によれば、上記の近似においてシフト量算出部3が、総出現頻度SUMALL(i-1)をシフト量SFT(i-1)でシフト処理によって算出された値と、今回の処理対象で用いられる符号範囲の幅RNG(i-1)との差分値である近似誤差RMD(i-1)を算出している。そして、符号範囲更新部22が、この近似誤差RMD(i-1)をシンボル種に応じた所定の比率で分割するとともに、分割した値を次回の処理対象で用いられる符号範囲の下限値LOW(i)および幅RNG(i)に分配する演算処理を行う。これにより、新たに設定される下限値LOW(i)および幅RNG(i)が必要以上に減少を抑えることができるので、以降の繰り返し処理において、桁数の減少による演算量の増加を抑え、演算処理速度の低下を防止することができる。   Further, according to the present embodiment, in the above approximation, the shift amount calculation unit 3 calculates the total appearance frequency SUMALL (i-1) by the shift amount SFT (i-1) by the shift process, and the current time An approximate error RMD (i-1) that is a difference value from the width RNG (i-1) of the code range used in the processing target is calculated. Then, the code range update unit 22 divides the approximate error RMD (i-1) at a predetermined ratio according to the symbol type, and the divided value is used as the lower limit value LOW ( The calculation process is distributed to i) and the width RNG (i). As a result, the newly set lower limit value LOW (i) and width RNG (i) can be suppressed from being reduced more than necessary, so in subsequent iterations, the increase in the amount of computation due to the reduction in the number of digits is suppressed, A decrease in calculation processing speed can be prevented.

<第2の実施形態(復号化)>
図6は、復号化システムの構成図である。この復号化システムは、上述の符号化システムと同様に、符号範囲を出力するシンボルのシンボル種に応じた区間に分割する処理を繰り返す。そして、入力された符号化データcodeに対応する区間を、この符号範囲の中から検索することによって、該当する区間に対応するシンボルを出力する。
<Second Embodiment (Decoding)>
FIG. 6 is a configuration diagram of the decoding system. Similar to the above-described encoding system, this decoding system repeats the process of dividing the code range into sections corresponding to the symbol type of the symbol to be output. Then, by searching the code range for the section corresponding to the input encoded data code, the symbol corresponding to the corresponding section is output.

復号化システムは、出現頻度管理部1と、符号範囲管理部2と、シフト量算出部3と、第2の出力管理部5とから構成されている。本実施形態の出現頻度管理部1は、第2の出力管理部5からシンボルSym(i)を出力する毎に、この出力されたシンボルSym(i)のシンボル種に対応した出現頻度表のカウント値CNT[j],SUM[j]を更新する。また、シフト量算出部3は、このカウント値の更新に応じてシフト量SFT(i-1)と近似誤差RMD(i-1)を算出し、符号範囲管理部2は、このシフト量SFT(i-1)と近似誤差RMD(i-1)に基づいて新たな下限値LOW(i)および幅RNG(i)を算出する。出現頻度管理部1、符号範囲管理部2およびシフト量算出部3の構成は、上述の符号化システムのそれと同様である。   The decoding system includes an appearance frequency management unit 1, a code range management unit 2, a shift amount calculation unit 3, and a second output management unit 5. The appearance frequency management unit 1 of the present embodiment counts the appearance frequency table corresponding to the symbol type of the output symbol Sym (i) every time the symbol Sym (i) is output from the second output management unit 5. Update the values CNT [j] and SUM [j]. The shift amount calculation unit 3 calculates the shift amount SFT (i-1) and the approximate error RMD (i-1) in accordance with the update of the count value, and the code range management unit 2 calculates the shift amount SFT ( A new lower limit value LOW (i) and width RNG (i) are calculated based on i-1) and the approximation error RMD (i-1). The configurations of the appearance frequency management unit 1, the code range management unit 2, and the shift amount calculation unit 3 are the same as those of the encoding system described above.

第2の出力管理部5は、シフト量SFT(i-1)、近似誤差RMD(i-1)およびカウント値(累積出現頻度SUM[j])に基づいて、符号範囲をシンボル種毎に分割する境界値BASE[j]を算出し、シンボル種毎に対応した区間を設定する。そして、復号化システムに入力された符号化データcodeの値を含む区間を検索・特定し、特定された区間に対応するシンボル種を出力シンボルSym(i)として出力する。第2の出力管理部5は、記憶部51と、判定部52と、更新部53と、境界算出部54と、出力部55とから構成されている。   The second output management unit 5 divides the code range for each symbol type based on the shift amount SFT (i-1), the approximation error RMD (i-1), and the count value (cumulative appearance frequency SUM [j]). The boundary value BASE [j] to be calculated is calculated, and a section corresponding to each symbol type is set. Then, a section including the value of the encoded data code input to the decoding system is searched and specified, and a symbol type corresponding to the specified section is output as an output symbol Sym (i). The second output management unit 5 includes a storage unit 51, a determination unit 52, an update unit 53, a boundary calculation unit 54, and an output unit 55.

記憶部51は、シンボル列を符号化によって生成した符号化データcodeを記憶する。判定部52は、第1の実施形態と同様に、符号範囲記憶部21に記憶されている下限値LOW(i)および幅RNG(i)を読み出し、所定の更新条件および終了条件を満たすか否かの判定を行い、この判定結果に応じて、記憶部51および更新部53とを制御する。更新部53は、判定部52の判定結果に応じて、符号範囲記憶部21に記憶される下限値LOW(i)および幅RNG(i)を再更新する。   The storage unit 51 stores encoded data code generated by encoding a symbol string. As in the first embodiment, the determination unit 52 reads the lower limit value LOW (i) and the width RNG (i) stored in the code range storage unit 21, and determines whether or not predetermined update conditions and end conditions are satisfied. The storage unit 51 and the update unit 53 are controlled according to the determination result. The update unit 53 re-updates the lower limit value LOW (i) and the width RNG (i) stored in the code range storage unit 21 according to the determination result of the determination unit 52.

境界算出部54は、シフト量算出部3が算出したシフト量SFT(i-1)および近似誤差RMD(i-1)と、出現頻度管理部1に記憶したカウント値SUM[j]とに基づいて、符号範囲をシンボル種毎に分割する境界値BASE[j]を算出する。出力部55は、境界算出部54が算出した境界値BASE[j]をもとに符号範囲の区間を設定し、記憶部51に記憶した符号化データcodeに対応する区間を検索・特定する。そして、この区間に対応するシンボル種を出力シンボルSym(i)として出力する。   The boundary calculation unit 54 is based on the shift amount SFT (i−1) and the approximation error RMD (i−1) calculated by the shift amount calculation unit 3 and the count value SUM [j] stored in the appearance frequency management unit 1. The boundary value BASE [j] for dividing the code range for each symbol type is calculated. The output unit 55 sets a section of a code range based on the boundary value BASE [j] calculated by the boundary calculation unit 54, and searches and specifies a section corresponding to the encoded data code stored in the storage unit 51. The symbol type corresponding to this section is output as the output symbol Sym (i).

図7は、境界算出部54の構成図である。境界算出部54は、シフタ54aと、シフタ54bと、加算器54cとを有している。シフタ54aは、全てのシンボル種に対応した更新前のカウント値SUM[j](i-1)を読み込み、それぞれのカウント値SUM[j](i-1)に対して、シフト量SFT(i-1)で左ビットシフト処理を行う。また、シフタ54bは、近似誤差RMD(i-1)を読み込み、この近似誤差RMD(i-1)に対してシンボルに応じた所定値(例えば値B)で右シフト処理を行う。また、加算器54cは、シフタ54a,54bがシフト処理したそれぞれの値と、前回のシンボルで使用した符号範囲の下限値LOW(i-1)とを加算して、境界値BASE[j](i)を算出する。算出された境界値BASE[j](i)は、出力部55に出力される。境界算出部54が算出する境界値BASE[j](i)は、下式のようになる。

BASE[j](i)=BASE[j-1](i)+SUM[j](i-1)<<SFT(0)+RMD(i-1)>>B+LOW(i-1)
FIG. 7 is a configuration diagram of the boundary calculation unit 54. The boundary calculation unit 54 includes a shifter 54a, a shifter 54b, and an adder 54c. The shifter 54a reads the count value SUM [j] (i-1) before update corresponding to all symbol types, and shifts SFT (i) for each count value SUM [j] (i-1). The left bit shift process is performed in -1). The shifter 54b reads the approximate error RMD (i-1), and performs a right shift process on the approximate error RMD (i-1) with a predetermined value (for example, value B) corresponding to the symbol. Further, the adder 54c adds the respective values shifted by the shifters 54a and 54b and the lower limit value LOW (i-1) of the code range used in the previous symbol, thereby obtaining the boundary value BASE [j] ( i) is calculated. The calculated boundary value BASE [j] (i) is output to the output unit 55. The boundary value BASE [j] (i) calculated by the boundary calculation unit 54 is expressed by the following equation.

BASE [j] (i) = BASE [j-1] (i) + SUM [j] (i-1) << SFT (0) + RMD (i-1) >> B + LOW (i-1)

出力部55は、記憶部51に記憶された符号化データcodeと、境界算出部54が算出した境界値BASE[j]とを読み込む。そして、出力部55は、境界値BASE[j]で分割された符号範囲の区間を設定し、符号化データcodeの値に対応する区間を検索・特定し、特定された区間に対応するシンボル種を出力シンボルとしてSym(i)が出力する。   The output unit 55 reads the encoded data code stored in the storage unit 51 and the boundary value BASE [j] calculated by the boundary calculation unit 54. Then, the output unit 55 sets a section of the code range divided by the boundary value BASE [j], searches and specifies a section corresponding to the value of the encoded data code, and a symbol type corresponding to the specified section Is output as a symbol by Sym (i).

図8は、復号化のフローチャートである。全体として、まず符号範囲の境界値を設けてシンボル種に対応する区間を設定し、符号化データcodeの値に対応する区間のシンボル種を出力し、最後に符号範囲およびカウント値等を更新する。これらの一連の処理を繰り返し、シンボル種を並べることによって、符号化データcodeに対応するシンボル列に復号化する。   FIG. 8 is a flowchart of decoding. Overall, first, a boundary value of the code range is provided, a section corresponding to the symbol type is set, a symbol type of a section corresponding to the value of the encoded data code is output, and finally the code range and count value are updated. . By repeating these series of processes and arranging the symbol types, decoding is performed into a symbol string corresponding to the encoded data code.

まず、ステップ201において、カウント値CNT,SUM、シフト量SFT等が初期化され、続くステップ201においてループ変数iが1に設定される(図4のステップ101,102と同様)。ステップ203において、図4のステップ104と同様に、カウント値SUM(i-1)、シフト量SFT(i-1)等が読み込まれる。なお、本実施形態においてシフト量SFT(i-1)は、後述のステップ213(またはステップ201)で予め算出(設定)されているが、このステップ203で、シフト量SFT(i-1)を算出するといった如く、ステップ204における境界値BASE[j]の算出までに算出されていれば足りる。   First, in step 201, the count values CNT, SUM, shift amount SFT, etc. are initialized, and in the subsequent step 201, the loop variable i is set to 1 (similar to steps 101 and 102 in FIG. 4). In step 203, the count value SUM (i-1), the shift amount SFT (i-1), and the like are read as in step 104 of FIG. In this embodiment, the shift amount SFT (i-1) is calculated (set) in advance in step 213 (or step 201) described later. In step 203, the shift amount SFT (i-1) is calculated. As long as it is calculated, it suffices if it is calculated before the calculation of the boundary value BASE [j] in step 204.

ステップ204において、ステップ203で算出されたシフト量SFT(i-1)および近似誤差RMD(i-1)と、出現頻度管理部1に記憶したカウント値(SUM[j])とに基づいて、境界算出部54が、符号範囲をシンボル種毎の区間に分割する境界値BASE[j]を算出する。そして、続くステップ205において、符号化データcodeが読み込まれる。読み込まれた符号化データcodeは記憶部51に記憶され、処理をステップ206へ進める。   In step 204, based on the shift amount SFT (i-1) and approximate error RMD (i-1) calculated in step 203, and the count value (SUM [j]) stored in the appearance frequency management unit 1, The boundary calculation unit 54 calculates a boundary value BASE [j] that divides the code range into sections for each symbol type. In the subsequent step 205, the encoded data code is read. The read encoded data code is stored in the storage unit 51, and the process proceeds to step 206.

ステップ206において、ステップ204で算出された境界値BASE[j]と、記憶部51に記憶された符号化データcodeとに基づいて、出力部55が、シンボルのシンボル種に応じた区間に分割された符号範囲から符号化データcodeの値に対応した区間を探索・特定する。これによって特定された区間、すなわち、符号化データcodeの値を含む区間に対応するシンボル種が出力される。そして、続くステップ207において、判定部52は、図4のステップ107と同様に、最後のシンボルであるか否かを判定する。終了条件を満たした場合、処理を終了し、終了条件を満たしていない場合、処理をステップ208へ進める。   In step 206, based on the boundary value BASE [j] calculated in step 204 and the encoded data code stored in the storage unit 51, the output unit 55 is divided into sections corresponding to the symbol type of the symbol. The section corresponding to the value of the encoded data code is searched and specified from the code range. The symbol type corresponding to the section specified by this, that is, the section including the value of the encoded data code is output. In subsequent step 207, the determination unit 52 determines whether or not it is the last symbol as in step 107 of FIG. 4. If the end condition is satisfied, the process ends. If the end condition is not satisfied, the process proceeds to step 208.

ステップ208において、更新部53は、図4のステップ105と同様に、下限値LOW(i)および幅RNG(i)を更新する。ステップ209において、判定部52は、図4のステップ108と同様に、カウント値CNT(i),SUM(i)を更新する。ステップ210およびステップ211において、判定部52は、更新条件の判定を行う。これらの更新条件は、図4のステップ109,110に示した出力条件と同様である。それぞれの更新条件のいずれかを満たす場合、処理をステップ212へ進め、満たさない場合、処理をステップ213へ進める。   In step 208, the updating unit 53 updates the lower limit value LOW (i) and the width RNG (i), similarly to step 105 in FIG. In step 209, the determination unit 52 updates the count values CNT (i) and SUM (i) as in step 108 of FIG. In step 210 and step 211, the determination unit 52 determines an update condition. These update conditions are the same as the output conditions shown in steps 109 and 110 in FIG. If any one of the update conditions is satisfied, the process proceeds to step 212; otherwise, the process proceeds to step 213.

ステップ210およびステップ211における更新条件を満たし、処理がステップ212へ進んだ場合、符号化データcodeが更新され、あわせて下限値LOW(i)と幅RNG(i)が再更新される。具体的には、判定部52が記憶部51に対して符号化データcodeの更新を行うように制御する。そして、記憶部51はこの制御に応じて、codeの上位8ビットを左ビットシフト処理し、下位8ビットに新たな符号を加える。つまり、記憶部51は、符号化データcodeの不要な部分を削除し、これによって空白(または"NULL")ができた下位ビットに新たな符号化データが挿入される。   When the update conditions in step 210 and step 211 are satisfied and the process proceeds to step 212, the encoded data code is updated, and the lower limit value LOW (i) and width RNG (i) are updated again. Specifically, the determination unit 52 controls the storage unit 51 to update the encoded data code. Then, in accordance with this control, the storage unit 51 shifts the upper 8 bits of code to the left bit and adds a new code to the lower 8 bits. That is, the storage unit 51 deletes an unnecessary part of the encoded data code, and new encoded data is inserted into the lower bits where a blank (or “NULL”) is created.

また、記憶部51では、同様に下限値LOW(i)および幅RNG(i)も8ビット左シフトするビットシフト処理が行われる。この処理は、符号化データcodeの更新と同時に、値の小さくなった符号範囲特定値が再び大きくするもので、下限値LOWおよび幅RNGを用いた符号化処理の演算処理の低下を抑えることができる。そして、ステップ213において、シフト量算出部3は、図4のステップ112と同様に符号範囲記憶部21の幅RNG(i)を読み取り、シフト量SFT(i)および近似誤差RMD(i)を算出する。ステップ213の処理が完了すると、ループ変数がインクリメントされた上で(ステップ214)、ステップ203に処理を進める。   Similarly, the storage unit 51 performs bit shift processing for shifting the lower limit value LOW (i) and the width RNG (i) to the left by 8 bits. In this process, the code range specific value whose value has been reduced is increased again at the same time as the update of the encoded data code, and it is possible to suppress a decrease in the calculation process of the encoding process using the lower limit value LOW and the width RNG. it can. In step 213, the shift amount calculation unit 3 reads the width RNG (i) of the code range storage unit 21 and calculates the shift amount SFT (i) and the approximate error RMD (i) as in step 112 of FIG. To do. When the process of step 213 is completed, the loop variable is incremented (step 214), and the process proceeds to step 203.

つぎに、図9の復号化における符号範囲の遷移図を参照しながら、本実施形態に係る符号範囲の具体的なケースについて説明する。本ケースでは、出現頻度表に3つのシンボル種"a","b","c"のカウント値が予め設定されており、入力として上述の符号化システムによって符号化された"b","a"に対応する符号化データcodeを用いる。この2つのシンボルSym(i)の出力が完了すると、復号化も終了する(LAST=2)ものとする。   Next, a specific case of the code range according to the present embodiment will be described with reference to the code range transition diagram in the decoding of FIG. In this case, count values of three symbol types “a”, “b”, “c” are preset in the appearance frequency table, and “b”, “encoded by the above-described encoding system as input. The encoded data code corresponding to a ″ is used. When the output of these two symbols Sym (i) is completed, the decoding is also finished (LAST = 2).

図9(a)は、初期状態(i=0)における符号範囲の状態を示している。符号範囲記憶部21に記憶されている初期状態の幅RNG(0)および下限値LOW(0)は、符号化処理前に予め設定されている値である(ステップ201)。また、下限値LOW(0)および幅RNG(0)の値は第1の実施形態に記載された符号化システムと同一である。また、図9(b)は、シフト量算出部3が、記憶部11のカウント値(総出現頻度SUMALL)および符号範囲記憶部21の幅RNG(0)に基づいて、シフト量SFT(0)および近似誤差RMD(0)を算出した符号範囲の状態を示している(ステップ203)。本実施形態では、第1の実施形態と同様に符号範囲更新部22が、この近似誤差をシンボル"a","b","c"に対して1:2:1の比率で按分して割り当てる。   FIG. 9A shows the state of the code range in the initial state (i = 0). The initial width RNG (0) and the lower limit value LOW (0) stored in the code range storage unit 21 are values set in advance before the encoding process (step 201). Further, the values of the lower limit value LOW (0) and the width RNG (0) are the same as those of the encoding system described in the first embodiment. FIG. 9B shows that the shift amount calculation unit 3 uses the shift amount SFT (0) based on the count value (total appearance frequency SUMALL) of the storage unit 11 and the width RNG (0) of the code range storage unit 21. And the state of the code range in which the approximate error RMD (0) is calculated is shown (step 203). In the present embodiment, as in the first embodiment, the code range update unit 22 distributes the approximation error to the symbols “a”, “b”, and “c” at a ratio of 1: 2: 1. assign.

図9(c)は、シンボル"b"が出力される場合の境界算出部54が設定する符号範囲の状態を示している(ステップ204〜206)。境界算出部54は、シフト量算出部3が算出したシフト量SFT(0)および近似誤差RMD(0)と、出現頻度管理部1に記憶した累積出現頻度SUM[j](0)とに基づいて、符号範囲をシンボル種毎に分割する境界値BASE[j](0)を算出する。本ケースの場合、それぞれの境界値は下式で表せる。

BASE[a](1)=SUM[a](0)<<SFT(0)+LOW(0)
BASE[b](1)=SUM[b](0)<<SFT(0)+RMD(0)>>2+LOW(0)
BASE[c](1)=SUM[c](0)<<SFT(0)+RMD(0)>>2++RMD(0)>>1+LOW(0)
FIG. 9C shows the state of the code range set by the boundary calculation unit 54 when the symbol “b” is output (steps 204 to 206). The boundary calculation unit 54 is based on the shift amount SFT (0) and the approximate error RMD (0) calculated by the shift amount calculation unit 3 and the cumulative appearance frequency SUM [j] (0) stored in the appearance frequency management unit 1. Thus, the boundary value BASE [j] (0) for dividing the code range for each symbol type is calculated. In this case, each boundary value can be expressed by the following equation.

BASE [a] (1) = SUM [a] (0) << SFT (0) + LOW (0)
BASE [b] (1) = SUM [b] (0) << SFT (0) + RMD (0) >> 2 + LOW (0)
BASE [c] (1) = SUM [c] (0) << SFT (0) + RMD (0) >> 2 + 2 + RMD (0) >> 1 + LOW (0)

そして、出力部55は、これらの境界値に基づいて、記憶部51に記憶された符号化データcodeを含む区間の検索を行う。本ケースの場合、第1の実施形態が符号化した符号化データcodeは、SUM[b]<<SFT(0)+RMD(0)<<2+LOW(0)である。したがって、codeはシンボル"b"に対応する区間に含まれるのでシンボル"b"が出力される。   Then, the output unit 55 searches for a section including the encoded data code stored in the storage unit 51 based on these boundary values. In this case, the encoded data code encoded by the first embodiment is SUM [b] << SFT (0) + RMD (0) << 2 + LOW (0). Therefore, since the code is included in the section corresponding to the symbol “b”, the symbol “b” is output.

図9(d)は、1回目のシンボル出力が完了した(i=1)符号範囲の状態を示している。初期状態と同様に、それぞれのシンボル種を示す区間を特定する値(境界値)は、符号範囲記憶部21には記憶されていない(ステップ208)。そして、同図(e)はシフト量算出部3が、記憶部11のカウント値SUMALL(1)と、符号範囲記憶部21の幅RMG(1)とからシフト量SFT(1)および近似誤差RMD(1)を算出した符号範囲の状態を示している(ステップ209)。そして、同図(b)と同様に、この近似誤差をシンボル"a","b","c"に対して1:2:1の比率で按分して割り当てる。   FIG. 9D shows the state of the code range in which the first symbol output is completed (i = 1). Similar to the initial state, the value (boundary value) specifying the section indicating each symbol type is not stored in the code range storage unit 21 (step 208). FIG. 8E shows that the shift amount calculation unit 3 calculates the shift amount SFT (1) and the approximate error RMD from the count value SUMALL (1) of the storage unit 11 and the width RMG (1) of the code range storage unit 21. The state of the code range for which (1) has been calculated is shown (step 209). Then, as in FIG. 5B, the approximate error is allocated equally to the symbols “a”, “b”, and “c” at a ratio of 1: 2: 1.

図9(f)は、算出された近似誤差RMD(1)をシンボル種に応じて割り当て、新たな符号範囲に更新された状態を示している(ステップ204〜206)。なお、累積出現頻度SUMALL[a](1)には値が記憶されていない(0または"NULL")ので、左シフト処理を行っても値は0である。したがって、新たに設定される下限値LOW(2)は、下限値LOW(1)のままになる。そして、同図(g)のような次回のシンボル処理に対応する下限値LOW(2),幅RNG(2)が更新され、このうち下限値LOW(2)がシンボル列を符号化した符号化データcodeが、出力更新部42から出力される。そして、出力部55は、これらの境界値に基づいて、記憶部51に記憶された符号化データcodeを含む区間の検索を行う。本ケースの場合、第1の実施形態が符号化した符号化データcodeは、SUM[a](1)<<SFT(1)+LOW(1)(=SUM[b]<<SFT(0)+RMD(0)<<2+LOW(0))である。したがって、codeはシンボル"a"に対応する区間に含まれるのでシンボル"a"が出力される。   FIG. 9F shows a state where the calculated approximate error RMD (1) is assigned according to the symbol type and updated to a new code range (steps 204 to 206). Note that since the value is not stored in the cumulative appearance frequency SUMALL [a] (1) (0 or “NULL”), the value is 0 even if the left shift process is performed. Therefore, the newly set lower limit value LOW (2) remains the lower limit value LOW (1). Then, the lower limit value LOW (2) and the width RNG (2) corresponding to the next symbol processing as shown in FIG. 5G are updated, and the lower limit value LOW (2) of them encodes the symbol string. Data code is output from the output update unit 42. Then, the output unit 55 searches for a section including the encoded data code stored in the storage unit 51 based on these boundary values. In this case, the encoded data code encoded by the first embodiment is SUM [a] (1) << SFT (1) + LOW (1) (= SUM [b] << SFT (0) + RMD (0) << 2 + LOW (0)). Accordingly, since code is included in the section corresponding to the symbol “a”, the symbol “a” is output.

このように、本実施形態によれば、上述した第1の実施形態と同様の理由で、復号化処理の高速化を図ることができ、回路の小規模化を図ることも可能となる。   As described above, according to the present embodiment, the decoding process can be speeded up and the circuit can be reduced in size for the same reason as in the first embodiment.

上述した第1および第2の実施形態の基本的な処理フローをまとめると以下のようになる。
(1) 符号範囲の幅RNG(i-1)と、総出現頻度SUMALL(i-1)を用いてシフト量SFT(i-1)を算出する。
(2) 処理対象となるシンボルを出現頻度表の更新前に取得する。
(3) 下限値LOW(i)および幅RNG(i)を更新する。
(4) (2)で取得したシンボルに基づいて出現頻度表の更新する。
(5) (1)に戻り、所定の条件を満たすまで繰り返す。
The basic processing flow of the first and second embodiments described above is summarized as follows.
(1) The shift amount SFT (i-1) is calculated using the width RNG (i-1) of the code range and the total appearance frequency SUMALL (i-1).
(2) Acquire symbols to be processed before updating the appearance frequency table.
(3) Update lower limit value LOW (i) and width RNG (i).
(4) The appearance frequency table is updated based on the symbols acquired in (2).
(5) Return to (1) and repeat until a predetermined condition is satisfied.

符号化および復号化の相違点は、(2)における処理対象となる入力データ(シンボル)にある。具体的に、符号化システムでは、入力データがシンボル列のシンボルであり、復号化システムにおいては、入力データが復号化により出力されたシンボルである点である。したがって、符号範囲(特定値)の初期値、出現頻度表の更新ルール(出現頻度表に用意するシンボル種の数、終了条件など)を一致させることにより、シンボルの入力および出力による符号化システム・復号化システムともに再現性を確保することができる。   The difference between encoding and decoding lies in input data (symbol) to be processed in (2). Specifically, in the encoding system, the input data is a symbol string symbol, and in the decoding system, the input data is a symbol output by decoding. Therefore, by matching the initial value of the code range (specific value) and the update rule of the appearance frequency table (number of symbol types prepared in the appearance frequency table, end condition, etc.) Both the decoding system and the reproducibility can be ensured.

なお、第1および第2の実施形態において、処理対象が"a"や"b"といったテキスト(文字)データであったが、例えば、"0"〜"255"といった数値が処理対象であってもよい。したがって、画像データおよび音声データといったデータ形式に限らず符号化が可能である。なお、この場合、記憶部11には入力され得るシンボル種の数(j=256)に応じた出現頻度表(カウント値)の確保が必要である。   In the first and second embodiments, the processing target is text (character) data such as “a” or “b”. For example, numerical values such as “0” to “255” are processing targets. Also good. Therefore, encoding is possible without being limited to data formats such as image data and audio data. In this case, it is necessary to secure an appearance frequency table (count value) corresponding to the number of symbol types that can be input (j = 256) in the storage unit 11.

さらに、上述した2つの実施形態は、図1の符号化システム、または図6の復号化システムの機能を実現するプログラムを、コンピュータが読み取り可能な記録媒体に記録し、この記録媒体に記録されたプログラムをコンピュータシステムに導入することでも実現可能である。ここでいう「コンピュータシステム」とは、OSやハードウェアを含むものとする。また、「コンピュータシステム」は、ホームページ提供環境あるいは表示環境を備えたWWWシステムも含むものとする。また、「コンピュータが読み取り可能な記録媒体」は、ROM(Read Only Memory)、磁気ディスク、光ディスク、光磁気ディスクなどといった可搬媒体、およびハードディスクを指す。さらに、「コンピュータが読み取り可能な記録媒体は、インターネットなどのネットワーク回線を介してプログラムが送信されるサーバや、コンピュータシステム内部の揮発性メモリも含まれる。また、「プログラム」は、このプログラムを記憶媒体に記憶したコンピュータシステムから、伝送媒体を介して、あるいは、伝送媒体中の伝送波により、他のコンピュータシステムに伝送されてもよい。ここで、プログラムを伝送する「伝送媒体」は、インターネット等のネットワークや電話回線等の通信回線(通信線)のように、情報を一部実現するためのものであってもよい。またこれら機能をコンピュータシステムによって、すでに記録されているプログラムとの組み合わせで実現できる差分ファイルであってもよい。   Further, in the above-described two embodiments, a program that realizes the functions of the encoding system of FIG. 1 or the decoding system of FIG. 6 is recorded on a computer-readable recording medium, and recorded on this recording medium. It can also be realized by introducing the program into a computer system. The “computer system” here includes an OS and hardware. The “computer system” also includes a WWW system having a homepage providing environment or a display environment. The “computer-readable recording medium” refers to a portable medium such as a ROM (Read Only Memory), a magnetic disk, an optical disk, a magneto-optical disk, and a hard disk. Further, “a computer-readable recording medium includes a server to which a program is transmitted via a network line such as the Internet, and a volatile memory inside the computer system. Further,“ program ”stores this program. It may be transmitted from a computer system stored in a medium to another computer system via a transmission medium or by a transmission wave in the transmission medium. Here, the “transmission medium” for transmitting the program may be a part for realizing a part of information such as a network such as the Internet or a communication line (communication line) such as a telephone line. Moreover, the difference file which can implement | achieve these functions with the combination with the program already recorded by the computer system may be sufficient.

符号化システムの構成図Configuration diagram of encoding system 符号範囲更新部の構成図Configuration diagram of code range update unit シフト量算出部の構成図Configuration diagram of shift amount calculation unit 符号化処理のフローチャートEncoding process flowchart 符号化における符号範囲の遷移図Transition diagram of code range in encoding 復号化システムの構成図Configuration diagram of decryption system 出力部の構成図Configuration of output unit 復号化処理のフローチャートFlow chart of decryption process 復号化における符号範囲の遷移図Transition diagram of code range in decoding

符号の説明Explanation of symbols

1 出現頻度管理部
11 記憶部
12 更新部
2 符号範囲管理部
21 符号範囲記憶部
22 符号範囲更新部
22a 下限値算出部
22b シフタ
22c シフタ
22d 加算器
22e 幅算出部
22f シフタ
22g シフタ
22h 加算器
3 シフト量算出部
31 近似部
32 シフタ
33 減算器
4 第1の出力管理部
41 判定部
42 出力更新部
5 第2の出力管理部
51 記憶部
52 判定部
53 更新部
54 境界算出部
55 出力部
54a シフタ
54b シフタ
54c 加算器
55 出力部
DESCRIPTION OF SYMBOLS 1 Appearance frequency management part 11 Storage part 12 Update part 2 Code range management part 21 Code range storage part 22 Code range update part 22a Lower limit calculation part 22b Shifter 22c Shifter 22d Adder 22e Width calculation part 22f Shifter 22g Shifter 22h Adder 3 Shift amount calculation unit 31 Approximation unit 32 Shifter 33 Subtractor 4 First output management unit 41 Determination unit 42 Output update unit 5 Second output management unit 51 Storage unit 52 Determination unit 53 Update unit 54 Boundary calculation unit 55 Output unit 54a Shifter 54b Shifter 54c Adder 55 Output section

Claims (16)

符号範囲特定値によって設定される符号範囲を処理対象となるシンボルのシンボル種に応じた区間に分割する処理を繰り返し、当該繰り返し処理によって得られた演算結果を符号化することによって、複数のシンボルで構成されたシンボル列を符号化する符号化システムにおいて、
シンボル列に含まれるそれぞれのシンボル種の出現頻度を特定可能な複数のカウント値を記憶する記憶部と、
シンボル列よりシンボルが処理対象として読み込まれる毎に、当該読み込まれたシンボルのシンボル種に対応したカウント値を更新する更新部と、
今回の処理対象として一のシンボルが読み込まれた場合、前記更新部によって前記一のシンボルのシンボル種に対応したカウント値が更新されるのに先立ち、前記記憶部に記憶されている出現頻度を読み出して、前記一のシンボルのシンボル種に対応したカウント値に対して、今回の処理対象で用いられるn(nは自然数)ビットのシフト量でビットシフトさせるシフト処理を少なくとも含む演算処理を行うことによって、符号範囲特定値を更新する符号範囲更新部と、
前記符号範囲更新部よって更新された符号範囲特定値により特定される符号範囲の幅を、カウント値によって特定される総出現頻度で除算した除算値を2nで近似し、当該近似によって得られた値nを次回の処理対象で用いられるシフト量として設定するシフト量算出部と
を有することを特徴とする符号化システム。
By repeating the process of dividing the code range set by the code range specific value into sections according to the symbol type of the symbol to be processed, and encoding the operation result obtained by the repetition process, a plurality of symbols can be obtained. In an encoding system for encoding a configured symbol sequence,
A storage unit for storing a plurality of count values capable of specifying the appearance frequency of each symbol type included in the symbol string;
An update unit that updates a count value corresponding to the symbol type of the read symbol each time a symbol is read from the symbol string as a processing target;
When one symbol is read as the current processing target, the appearance frequency stored in the storage unit is read before the update unit updates the count value corresponding to the symbol type of the one symbol. By performing an arithmetic process including at least a shift process for performing a bit shift with a shift amount of n (n is a natural number) bits used in the current processing target, on the count value corresponding to the symbol type of the one symbol. A code range update unit for updating the code range specific value;
The division value obtained by dividing the width of the code range specified by the code range specification value updated by the code range update unit by the total appearance frequency specified by the count value is approximated by 2 n , and obtained by the approximation And a shift amount calculation unit that sets a value n as a shift amount to be used in the next processing target.
前記符号範囲更新部の更新処理によって、前記符号範囲の幅が所定値よりも小さくなった場合、または、前記符号範囲特定値の所定範囲の上位ビットが変化しなくなった場合、今回の処理対象の処理によって更新された前記符号範囲特定値を符号化データとして出力する判定部をさらに有することを特徴とする請求項1に記載された符号化システム。   When the width of the code range becomes smaller than a predetermined value by the update process of the code range update unit, or when the upper bits of the predetermined range of the code range specific value no longer change, the current processing target The encoding system according to claim 1, further comprising a determination unit that outputs the code range specific value updated by the processing as encoded data. 前記シフト量算出部は、前記総出現頻度に対して、前記近似によって得られたシフト量でビットシフトさせるシフト処理によって算出された値と、今回の処理対象で用いられる符号範囲の幅との差分値である近似誤差を算出し、
前記符号範囲更新部は、前記近似誤差をシンボル種に応じた所定の比率で按分した上で、次回の処理対象で用いられる前記符号範囲を構成するシンボル種毎の各区間に割り当てることを特徴とする請求項1また2に記載された符号化システム。
The shift amount calculation unit calculates a difference between a value calculated by a shift process for performing a bit shift with the shift amount obtained by the approximation with respect to the total appearance frequency, and a width of a code range used in the current processing target. Calculate the approximation error that is the value,
The code range update unit apportions the approximation error at a predetermined ratio according to a symbol type, and assigns it to each section of the symbol type constituting the code range used in the next processing target. An encoding system according to claim 1 or 2.
前記符号範囲は、前記符号範囲特定値である上限値、下限値または幅のうちの所定の組み合わせによって特定されることを特徴とする請求項1から3のいずれかに記載された符号化システム。   The encoding system according to any one of claims 1 to 3, wherein the code range is specified by a predetermined combination of an upper limit value, a lower limit value, or a width that is the code range specifying value. 符号範囲特定値によって設定される符号範囲を処理対象となるシンボルのシンボル種に応じた区間に分割する処理を繰り返し、当該繰り返し処理によって得られた演算結果を符号化することによって、複数のシンボルで構成されたシンボル列を符号化する符号化方法をコンピュータに実行させる符号化コンピュータ・プログラムおいて、
複数のシンボルで構成されたシンボル列のうち、一のシンボルを今回の処理対象として読み込む第1のステップと、
前記シンボル列に含まれるそれぞれのシンボル種の出現頻度を特定可能な複数のカウント値のうち、前記一のシンボルのシンボル種に対応したカウント値を更新する第2のステップと、
前記一のシンボルのシンボル種に対応したカウント値が更新されるのに先立ち、前記一のシンボルのシンボル種に対応したカウント値に対して、今回の処理対象で用いられるn(nは自然数)ビットのシフト量でビットシフトさせるシフト処理を少なくとも含む演算処理を行うことによって、符号範囲特定値を更新する第3のステップと、
前記更新された符号範囲特定値により特定される符号範囲の幅をカウント値によって特定される総出現頻度で除算した除算値を2nで近似し、当該近似によって得られた値nを次回の処理対象で用いられるシフト量として設定する第4のステップと、
シンボル列において、処理対象となる一のシンボルを順次シフトさせながら、所定の出力条件を満たすまで、前記第1のステップから前記第4のステップまでの処理を繰り返す第5のステップと
を有することを特徴とする符号化方法をコンピュータに実行させる符号化コンピュータ・プログラム。
By repeating the process of dividing the code range set by the code range specific value into sections corresponding to the symbol type of the symbol to be processed, and encoding the operation result obtained by the repetition process, In an encoding computer program for causing a computer to execute an encoding method for encoding a configured symbol string,
A first step of reading one symbol as a current processing target from among a symbol string composed of a plurality of symbols;
A second step of updating a count value corresponding to the symbol type of the one symbol among a plurality of count values capable of specifying the appearance frequency of each symbol type included in the symbol sequence;
Prior to updating the count value corresponding to the symbol type of the one symbol, n (n is a natural number) bits used in the current processing target with respect to the count value corresponding to the symbol type of the one symbol A third step of updating the code range specific value by performing an arithmetic process including at least a shift process for performing a bit shift by a shift amount of:
The division value obtained by dividing the width of the code range specified by the updated code range specification value by the total appearance frequency specified by the count value is approximated by 2 n , and the value n obtained by the approximation is processed next time A fourth step of setting as a shift amount used in the object;
And a fifth step of repeating the processing from the first step to the fourth step until a predetermined output condition is satisfied while sequentially shifting one symbol to be processed in the symbol string. An encoding computer program for causing a computer to execute a characteristic encoding method.
前記出力条件は、前記符号範囲特定値の更新によって、前記符号範囲の幅が所定値よりも小さくなった場合、または、前記符号範囲特定値の所定範囲の上位ビットが変化しなくなった場合であることを特徴とする請求項5に記載された符号化コンピュータ・プログラム。   The output condition is when the width of the code range becomes smaller than a predetermined value due to the update of the code range specific value, or when the upper bits of the predetermined range of the code range specific value no longer change. 6. An encoded computer program as claimed in claim 5, wherein: 前記第4のステップは、前記総出現頻度に対して、前記近似によって得られたシフト量でビットシフトさせるシフト処理によって算出された値と、今回の処理対象で用いられる符号範囲の幅との差分値である近似誤差を算出する第6のステップを含み、
前記第3のステップは、前記近似誤差をシンボル種に応じた所定の比率で按分した上で、次回の処理対象で用いられる前記符号範囲を構成するシンボル種毎の各区間に割り当てるステップを含むことを特徴とする請求項5または6に記載された符号化コンピュータ・プログラム。
In the fourth step, the difference between the value calculated by the shift process for performing the bit shift with the shift amount obtained by the approximation with respect to the total appearance frequency and the width of the code range used in the current process target Including a sixth step of calculating an approximation error that is a value;
The third step includes a step of allocating the approximation error at a predetermined ratio according to a symbol type and assigning the approximation error to each section for each symbol type constituting the code range used in the next processing target. An encoding computer program according to claim 5 or 6, characterized in that
前記符号範囲は、前記符号範囲特定値である上限値、下限値または幅のうちの所定の組み合わせによって特定されることを特徴とする請求項5から7のいずれかに記載された符号化コンピュータ・プログラム。   8. The encoding computer according to claim 5, wherein the code range is specified by a predetermined combination of an upper limit value, a lower limit value, and a width, which are the code range specification values. 9. program. 符号範囲特定値によって設定され、かつ、シンボルのシンボル種に応じた区間に分割された符号範囲から符号化データの値に対応した区間を特定し、当該特定された区間に対応するシンボルを出力する探索処理を繰り返し、当該繰り返しによって得られたシンボルを並べることによって、符号化データを複数のシンボルで構成されたシンボル列に復号化する復号化システムにおいて、
前記探索処理によって出力されるそれぞれのシンボル種の出現頻度を特定可能な複数のカウント値を記憶する記憶部と、
前記探索処理によってシンボルが出力される毎に、当該出力されたシンボルのシンボル種に対応したカウント値を更新する更新部と、
今回の処理対象として一のシンボルが出力された場合、前記更新部によって前記一のシンボルのシンボル種に対応したカウント値が更新されるのに先立ち、
前記記憶部に記憶されている出現頻度を読み出して、前記一のシンボルのシンボル種に対応したカウント値に対して、今回の処理で用いられるn(nは自然数)ビットのシフト量でビットシフトさせるシフト処理を少なくとも含む演算処理を行うことによって、次回の処理で用いられる符号範囲特定値を設定する符号範囲更新部と、
前記符号範囲更新部よって設定された符号範囲特定値により特定される符号範囲の幅を、カウント値によって特定される総出現頻度で除算した除算値を2nで近似し、当該近似によって得られた値nを次回の処理で用いられるシフト量として設定するシフト量算出部と
を有することを特徴とする復号化システム。
A section corresponding to the value of the encoded data is specified from the code range set by the code range specifying value and divided into sections corresponding to the symbol type of the symbol, and a symbol corresponding to the specified section is output. In a decoding system that decodes encoded data into a symbol string composed of a plurality of symbols by repeating search processing and arranging symbols obtained by the repetition,
A storage unit that stores a plurality of count values that can specify the appearance frequency of each symbol type output by the search process;
An update unit that updates a count value corresponding to the symbol type of the output symbol each time a symbol is output by the search process;
When one symbol is output as the processing target this time, before the count value corresponding to the symbol type of the one symbol is updated by the update unit,
The appearance frequency stored in the storage unit is read, and the count value corresponding to the symbol type of the one symbol is bit-shifted by the shift amount of n (n is a natural number) bits used in the current process. A code range update unit that sets a code range specific value used in the next process by performing an arithmetic process including at least a shift process;
The division value obtained by dividing the width of the code range specified by the code range specification value set by the code range update unit by the total appearance frequency specified by the count value is approximated by 2 n , and obtained by the approximation And a shift amount calculation unit that sets a value n as a shift amount used in the next processing.
前記符号範囲更新部の更新処理によって、前記符号範囲の幅が所定値よりも小さくなった場合、または、前記符号範囲特定値の所定範囲の上位ビットが変化しなくなった場合、前記符号化データを前記上位ビット数のシフト量でビットシフトさせるシフト処理を行う判定部をさらに有することを特徴とする請求項9に記載された復号化システム。   When the width of the code range becomes smaller than a predetermined value by the update process of the code range update unit, or when the upper bits of the predetermined range of the code range specific value no longer change, the encoded data is The decoding system according to claim 9, further comprising a determination unit that performs a shift process for performing a bit shift by a shift amount of the number of upper bits. 前記シフト量算出部は、前記総出現頻度に対して、前記近似によって得られたシフト量でビットシフトさせるシフト処理によって算出された値と、今回の処理対象で用いられる符号範囲の幅との差分値である近似誤差を算出し、
前記符号範囲更新部は、前記近似誤差をシンボル種に応じた所定の比率で按分した上で、次回の処理対象で用いられる前記符号範囲を構成するシンボル種毎の各区間に割り当てることを特徴とする請求項9また10に記載された復号化システム。
The shift amount calculation unit calculates a difference between a value calculated by a shift process for performing a bit shift with the shift amount obtained by the approximation with respect to the total appearance frequency, and a width of a code range used in the current processing target. Calculate the approximation error that is the value,
The code range update unit apportions the approximation error at a predetermined ratio according to a symbol type, and assigns it to each section of the symbol type constituting the code range used in the next processing target. The decoding system according to claim 9 or 10.
前記符号範囲は、前記符号範囲特定値である上限値、下限値または幅のうちの所定の組み合わせによって特定されることを特徴とする請求項9から11のいずれかに記載された復号化システム。   The decoding system according to any one of claims 9 to 11, wherein the code range is specified by a predetermined combination of an upper limit value, a lower limit value, or a width that is the code range specifying value. 符号範囲特定値によって設定され、かつ、シンボルのシンボル種に応じた区間に分割された符号範囲から符号化データの値に対応した区間を特定し、当該特定された区間に対応するシンボルを出力する探索処理を繰り返し、当該繰り返しによって得られたシンボルを並べることによって、符号化データを複数のシンボルで構成されたシンボル列に復号化する復号化方法をコンピュータに実行させる復号化コンピュータ・プログラムおいて、
前記探索処理によって、前記符号化データから前記一のシンボルのシンボル種を出力する第1のステップと、
前記探索処理によって出力されるそれぞれのシンボル種の出現頻度を特定可能な複数のカウント値のうち、前記一のシンボルのシンボル種に対応したカウント値を更新する第2のステップと、
前記一のシンボルのシンボル種に対応したカウント値が更新されるのに先立ち、前記一のシンボルのシンボル種に対応したカウント値に対して、今回の処理対象で用いられるn(nは自然数)ビットのシフト量でビットシフトさせるシフト処理を少なくとも含む演算処理を行うことによって、符号範囲特定値を更新する第3のステップと、
前記更新された符号範囲特定値により特定される符号範囲の幅をカウント値によって特定される総出現頻度で除算した除算値を2nで近似し、当該近似によって得られた値nを次回の処理対象で用いられるシフト量として設定する第4のステップと、
シンボル列において、処理対象となる一のシンボルを順次シフトさせながら、所定の判定条件を満たすまで、前記第1のステップから前記第4のステップまでの処理を繰り返す第5のステップと
を有することを特徴とする復号化方法をコンピュータに実行させる復号化コンピュータ・プログラム。
A section corresponding to the value of the encoded data is specified from the code range set by the code range specifying value and divided into sections corresponding to the symbol type of the symbol, and a symbol corresponding to the specified section is output. In a decoding computer program for causing a computer to execute a decoding method for decoding encoded data into a symbol string composed of a plurality of symbols by repeating search processing and arranging symbols obtained by the repetition,
A first step of outputting a symbol type of the one symbol from the encoded data by the search process;
A second step of updating a count value corresponding to the symbol type of the one symbol among a plurality of count values capable of specifying the appearance frequency of each symbol type output by the search process;
Prior to updating the count value corresponding to the symbol type of the one symbol, n (n is a natural number) bits used in the current processing target with respect to the count value corresponding to the symbol type of the one symbol A third step of updating the code range specific value by performing an arithmetic process including at least a shift process for performing a bit shift by a shift amount of:
The division value obtained by dividing the width of the code range specified by the updated code range specification value by the total appearance frequency specified by the count value is approximated by 2 n , and the value n obtained by the approximation is processed next time A fourth step of setting as a shift amount used in the object;
And a fifth step of repeating the processing from the first step to the fourth step until a predetermined determination condition is satisfied while sequentially shifting one symbol to be processed in the symbol string. A decryption computer program for causing a computer to execute a characteristic decryption method.
前記判定条件は、前記符号範囲特定値の更新によって、前記符号範囲の幅が所定値よりも小さくなった場合、または、前記符号範囲特定値の所定範囲の上位ビットが変化しなくなった場合であることを特徴とする請求項13に記載された復号化コンピュータ・プログラム。   The determination condition is when the width of the code range becomes smaller than a predetermined value due to the update of the code range specific value, or when the upper bits of the predetermined range of the code range specific value no longer change. 14. A decryption computer program as claimed in claim 13. 前記第4のステップは、前記総出現頻度に対して、前記近似によって得られたシフト量でビットシフトさせるシフト処理によって算出された値と、今回の処理対象で用いられる符号範囲の幅との差分値である近似誤差を算出する第6のステップを含み、
前記第3のステップは、前記近似誤差をシンボル種に応じた所定の比率で按分した上で、次回の処理対象で用いられる前記符号範囲を構成するシンボル種毎の各区間に割り当てるステップを含むことを特徴とする請求項13また14に記載された復号化コンピュータ・プログラム。
In the fourth step, the difference between the value calculated by the shift process for performing the bit shift with the shift amount obtained by the approximation with respect to the total appearance frequency and the width of the code range used in the current process target Including a sixth step of calculating an approximation error that is a value;
The third step includes a step of allocating the approximation error at a predetermined ratio according to a symbol type and assigning the approximation error to each section for each symbol type constituting the code range used in the next processing target. 15. A decoding computer program according to claim 13 or 14, characterized in that:
前記符号範囲は、前記符号範囲特定値である上限値、下限値または幅のうちの所定の組み合わせによって特定されることを特徴とする請求項13から15のいずれかに記載された復号化コンピュータ・プログラム。   The decoding computer according to any one of claims 13 to 15, wherein the code range is specified by a predetermined combination of an upper limit value, a lower limit value, or a width that is the code range specifying value. program.
JP2005269819A 2005-09-16 2005-09-16 Encoding system, encoding computer program, decoding system, and decoding computer program Expired - Fee Related JP4176097B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005269819A JP4176097B2 (en) 2005-09-16 2005-09-16 Encoding system, encoding computer program, decoding system, and decoding computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005269819A JP4176097B2 (en) 2005-09-16 2005-09-16 Encoding system, encoding computer program, decoding system, and decoding computer program

Publications (2)

Publication Number Publication Date
JP2007082058A JP2007082058A (en) 2007-03-29
JP4176097B2 true JP4176097B2 (en) 2008-11-05

Family

ID=37941847

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005269819A Expired - Fee Related JP4176097B2 (en) 2005-09-16 2005-09-16 Encoding system, encoding computer program, decoding system, and decoding computer program

Country Status (1)

Country Link
JP (1) JP4176097B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4524501B2 (en) * 2007-12-27 2010-08-18 株式会社アクセル Encoding system, encoding method, encoding program, decoding system, decoding method, and decoding program

Also Published As

Publication number Publication date
JP2007082058A (en) 2007-03-29

Similar Documents

Publication Publication Date Title
JP3017379B2 (en) Encoding method, encoding device, decoding method, decoder, data compression device, and transition machine generation method
JP2800880B2 (en) High-speed decoding arithmetic coding device
US20230041067A1 (en) Systems and methods of data compression
CN112506880B (en) Data processing method and related equipment
CN109075804B (en) Communication apparatus and communication method using polarization code
EP4014322A1 (en) Flexible huffman tree approximation for low latency encoding
JP4767266B2 (en) Arithmetic unit, error correction decoding circuit, and error position polynomial calculation method
CN106537914B (en) The method and apparatus of arithmetic compiling is executed by the carry operations of limitation
JP4176097B2 (en) Encoding system, encoding computer program, decoding system, and decoding computer program
CN112332854A (en) Hardware implementation method and device of Huffman coding and storage medium
US11063614B1 (en) Polar decoder processor
CN104412512B (en) Encoding device, decoding device, encoding method, and decoding method
JP5752337B1 (en) Information processing system, information processing method, and program
JP2011028312A (en) Processor, control method thereof, and arithmetic processing program
JP2003533765A (en) Method and device for remainder calculation
US8976048B2 (en) Efficient processing of Huffman encoded data
CN112000667B (en) Method, apparatus, server and medium for retrieving tree data
JPWO2004070955A1 (en) Encoding apparatus and method, decoding apparatus and method, program, and recording medium
JP4220534B2 (en) Encoding system and encoding method
JP4524501B2 (en) Encoding system, encoding method, encoding program, decoding system, decoding method, and decoding program
CN116149600B (en) Method, device, equipment and medium for setting logic circuit of multi-constant multiplier
WO2022145057A1 (en) Decoding device, decoding method, and program
CN113746599B (en) Encoding method, decoding method, terminal, electronic device, and storage medium
Dey Iterative Data Compression with Calculated Codes-IEEE_1col
CN117807082A (en) Hash processing method, device, equipment and computer readable storage medium

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20071211

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080116

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: 20080808

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080819

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110829

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4176097

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110829

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110829

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120829

Year of fee payment: 4

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120829

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120829

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120829

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130829

Year of fee payment: 5

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130829

Year of fee payment: 5

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

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