JPH05183443A - Code conversion method - Google Patents
Code conversion methodInfo
- Publication number
- JPH05183443A JPH05183443A JP34615991A JP34615991A JPH05183443A JP H05183443 A JPH05183443 A JP H05183443A JP 34615991 A JP34615991 A JP 34615991A JP 34615991 A JP34615991 A JP 34615991A JP H05183443 A JPH05183443 A JP H05183443A
- Authority
- JP
- Japan
- Prior art keywords
- code
- bits
- lookup table
- length
- value
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 19
- 238000006243 chemical reaction Methods 0.000 title claims abstract description 12
- 238000010586 diagram Methods 0.000 description 9
- 238000007906 compression Methods 0.000 description 3
- 230000006835 compression Effects 0.000 description 3
- 238000013144 data compression Methods 0.000 description 3
- 239000013643 reference control Substances 0.000 description 2
- 239000013589 supplement Substances 0.000 description 2
- 238000007796 conventional method Methods 0.000 description 1
- 230000002950 deficient Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
Landscapes
- Image Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression Of Band Width Or Redundancy In Fax (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Abstract
(57)【要約】
【目的】 画像データの伝送に用いられるハフマン符号
などの可変長符号の符号化/復号化に有用なルックアッ
プテーブルを用いた符号変換方法に関し、ルックアップ
テーブルのサイズを削減することを目的としている。
【構成】 可変長符号のような有効符号値が疎に分布す
る第1の符号系の入力符号を他の第2の符号系の符号に
変換するためのルックアップテーブルを、空間圧縮用の
第1ルックアップテーブルでは、入力符号の上位ビット
の値の列を、より密な識別符号の列に置換し、第2のル
ックアップテーブルでは、第1のルックアップテーブル
から得られる識別符号と入力符号の下位ビットの値との
組み合わせの値を第2の符号系の対応する符号(復号
値)に変換する構成をもつ。
(57) [Abstract] [Purpose] A code conversion method using a lookup table useful for encoding / decoding a variable length code such as a Huffman code used for transmitting image data, and reducing the size of the lookup table. The purpose is to do. A lookup table for converting an input code of a first code system, such as a variable-length code, in which effective code values are sparsely distributed, to a code of another second code system, In one lookup table, the sequence of high-order bit values of the input code is replaced with a sequence of denser identification codes, and in the second lookup table, the identification code and the input code obtained from the first lookup table. The value of the combination with the value of the lower bit of is converted into the corresponding code (decoded value) of the second code system.
Description
【0001】[0001]
【産業上の利用分野】本発明は、画像データの伝送に用
いられるハフマン符号などの可変長符号の符号化/復号
化に有用なルックアップテーブルを用いた符号変換方法
に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a code conversion method using a lookup table useful for coding / decoding a variable length code such as Huffman code used for transmitting image data.
【0002】[0002]
【従来の技術】ハフマン符号は、発生確率の高いデータ
に短い符号を割り当て、発生確率の低いデータほどその
データに長い符号を割り当てることにより、データ圧縮
を行う可変長符号の一種である。ハフマン符号で符号化
されたデータを通常の固定長符号に復号化する場合、一
般にルックアップテーブルを用いた符号変換方法がとら
れる。この場合、可変長符号中の最大符号長に満たない
符号は全て最大符号長と同じ長さの固定長符号として扱
われる。その値は、テーブルを参照するポインタとして
用いられる。2. Description of the Related Art The Huffman code is a type of variable-length code that performs data compression by assigning a shorter code to data having a higher occurrence probability and assigning a longer code to data having a lower occurrence probability. When decoding the data encoded by the Huffman code into a normal fixed length code, a code conversion method using a lookup table is generally used. In this case, all the codes that are less than the maximum code length in the variable-length code are treated as fixed-length codes having the same length as the maximum code length. Its value is used as a pointer to refer to the table.
【0003】テーブルには入力可変長符号に対応する出
力符号が設定されており、ポインタにより参照された出
力符号が復号値として取り出される。図11にハフマン
符号の例を示す。図において、画像データ0〜8は、ド
ットの濃度レベルあるいは白ランや黒ランの長さを示す
データであり、たとえば1バイトで表される。An output code corresponding to the input variable length code is set in the table, and the output code referenced by the pointer is taken out as a decoded value. FIG. 11 shows an example of the Huffman code. In the figure, image data 0 to 8 are data indicating the density level of dots or the lengths of white runs and black runs, and are represented by 1 byte, for example.
【0004】これらの画像データ0〜8に対してハフマ
ン符号長2〜6のハフマン符号列が対応づけられてお
り、画像データは、データ圧縮時に画像データとハフマ
ン符号とを対応づけたルックアップテーブルを用いたハ
フマン符号に変換される。A Huffman code string having a Huffman code length of 2 to 6 is associated with these image data 0 to 8. The image data is a look-up table that associates the image data with the Huffman code at the time of data compression. Is converted to a Huffman code using.
【0005】またハフマン符号で符号化されたデータを
復号化する場合には、図11のハフマン符号を最大符号
長の6ビットで固定長化したデータをポインタにしてル
ックアップテーブルを参照し、対応する復号値に変換す
る。When decoding the data encoded by the Huffman code, the lookup table is referenced by using the data obtained by fixing the Huffman code of FIG. 11 with a fixed code length of 6 bits as a pointer to the lookup table. Convert to a decrypted value.
【0006】図11のハフマン符号を6ビットに固定長
符号化するには、6ビット未満のハフマン符号(ハフマ
ン符号長2〜5)の下位に不足分のビットを補えばよ
い。この下位に補うビットの値は任意(あるいは不定)
である。しかしそのため復号化用のルックアップテーブ
ルには、エントリ数が26 必要となり、著しく冗長にな
る。In order to perform the fixed length coding of the Huffman code of FIG. 11 into 6 bits, it is sufficient to supplement the deficient bits below the Huffman code of less than 6 bits (Huffman code length 2 to 5). The value of the bits to supplement this lower order is arbitrary (or undefined)
Is. But in the order lookup table for decoding the number becomes 2 6 requires entry becomes significantly redundant.
【0007】[0007]
【発明が解決しようとする課題】ルックアップテーブル
を用いて可変長符号を復号化する場合のように、有効な
符号値が符号空間内に疎に分布している符号系の入力符
号を他の符号系の符号に変換する場合には、ルックアッ
プテーブルの構成が冗長になり、テーブルを格納するた
めに大きなメモリスペースが必要になるという問題があ
った。As in the case of decoding a variable length code using a look-up table, the input code of the code system in which the effective code values are sparsely distributed in the code space is replaced with another code. When converting to a code of the code system, there is a problem that the structure of the lookup table becomes redundant and a large memory space is required to store the table.
【0008】本発明は、有効な符号値が符号空間内で疎
に分布している入力符号を他の符号系の出力符号に変換
するために用いるルックアップテーブルのサイズを削減
できる符号変換方法を提供することを目的としている。The present invention provides a code conversion method capable of reducing the size of a look-up table used for converting an input code whose effective code values are sparsely distributed in a code space into an output code of another code system. It is intended to be provided.
【0009】[0009]
【課題を解決するための手段】本発明は、有効符号値が
疎に分布する第1の符号系の入力符号を他の第2の符号
系の符号に変換するためのルックアップテーブルを、空
間圧縮用の第1ルックアップテーブルでは、入力符号の
上位ビットの値の列を、より密な識別符号の列に置換
し、第2のルックアップテーブルでは、第1のルックア
ップテーブルから得られる識別符号と入力符号の下位ビ
ットの値との組み合わせの値を第2の符号系の対応する
符号(復号値)に変換するようにして、ルックアップテ
ーブルの全体のサイズの圧縮を図るものである。According to the present invention, a lookup table for converting an input code of a first code system in which effective code values are sparsely distributed into a code of another second code system is provided as a space. In the first look-up table for compression, the sequence of high-order bit values of the input code is replaced with a sequence of denser identification codes, and in the second look-up table, the identification obtained from the first look-up table. By converting the value of the combination of the code and the value of the lower bit of the input code into the corresponding code (decoded value) of the second code system, the overall size of the lookup table is compressed.
【0010】図1は、例示的方法で示した本発明の原理
説明図である。ここでは、最大符号長がnビットの可変
長符号の入力データを復号化する際の符号変換の例が示
される。FIG. 1 is a diagram for explaining the principle of the present invention shown by an exemplary method. Here, an example of code conversion when decoding input data of a variable length code having a maximum code length of n bits is shown.
【0011】図において、1は、符号参照制御部であ
り、ルックアップテーブルを参照して符号/復号化を行
うプログラムをCPUが実行することにより実現され
る。In the figure, reference numeral 1 is a code reference control unit, which is realized by the CPU executing a program for performing coding / decoding by referring to a lookup table.
【0012】2は、ソースデータメモリであり、最大符
号長nビットの可変長符号が符号化されたデータ圧縮形
式のソースデータ、たとえば画像データが格納されてい
る。3は、空間圧縮用の第1のルックアップテーブルで
あり、mをn−1>m>1なる整数とし(mがn,n−
1,1,0の各値の場合にはテーブルの圧縮効果はな
い)、最大符号長nビットの可変長符号を左寄せしてn
ビットに固定長符号化したときの上位n−mビットの値
をポインタとして参照される。参照されるテーブルのエ
ントリには上位n−mビットの値を識別する符号が設定
されている。この識別符号は、上位n−mビットの値の
個数を識別可能なビット値のn−m>lなるlビットで
表される。つまり入力のn−mビットの疎な符号空間
は、テーブルでlビットの密な符号空間に圧縮される。A source data memory 2 stores source data, for example, image data in a data compression format in which a variable length code having a maximum code length of n bits is encoded. 3 is a first look-up table for spatial compression, in which m is an integer such that n-1>m> 1 (m is n, n-
In the case of each value of 1, 1, 0, there is no compression effect of the table), and the variable length code having the maximum code length n bits is left-justified to n.
The value of the upper mn bits when fixed length coding is performed into bits is referred to as a pointer. A code for identifying the value of the upper nm bits is set in the entry of the referenced table. This identification code is represented by 1 bit of mn> l, which is a bit value capable of identifying the number of values of the upper nm bits. That is, the input mn-bit sparse code space is compressed into a 1-bit dense code space in the table.
【0013】4は、符号変換用の第2のルックアップテ
ーブルであり、第1のルックアップテーブルから出力さ
れるlビットの識別符号と、固定長符号化された可変長
符号の下位mビットとの組み合わせをポインタとして参
照され、可変長符号に対応する第2の符号系の符号を出
力する。Reference numeral 4 is a second look-up table for code conversion, which is an l-bit identification code output from the first look-up table and the lower m bits of the fixed-length coded variable-length code. Is referred to as a pointer, and the code of the second code system corresponding to the variable length code is output.
【0014】5は、ディスティネーションデータメモリ
であり、第2のルックアップテーブルから出力された変
換結果の復号化データが格納される。A destination data memory 5 stores the decoded data of the conversion result output from the second lookup table.
【0015】[0015]
【作用】図2に示す具体例を用いて本発明の作用を説明
する。図2の例は、入力符号の最大符号長が16ビット
で有効符号数が28 (256)個であるような可変長符
号系の入力符号を符号変換するためのものである。ここ
では、図1のn,m,lの値は、n=16,m=4,l
=8となる。The operation of the present invention will be described with reference to the specific example shown in FIG. The example of FIG. 2 is for transcoding an input code of a variable length code system in which the maximum code length of the input code is 16 bits and the number of effective codes is 2 8 (256). Here, the values of n, m and l in FIG. 1 are n = 16, m = 4 and l
= 8.
【0016】入力符号の16ビットは上位8ビットと下
位4ビットに分割され、第1のルックアップテーブル3
は、上位8ビットの値を8ビットの識別符号に変換す
る。第2のルックアップテーブル4は、8ビットの識別
符号と入力符号の下位4ビットとにより参照される。The 16 bits of the input code are divided into upper 8 bits and lower 4 bits, and the first look-up table 3
Converts the upper 8-bit value into an 8-bit identification code. The second look-up table 4 is referred to by the 8-bit identification code and the lower 4 bits of the input code.
【0017】図3に示すように第2のルックアップテー
ブル4は、8ビットの識別符号対応に領域をもち、さら
に各領域は入力符号の下位4ビットで16ワードに分割
されている(1ワードはテーブルの1エントリに対
応)。ただし12ビット長以下の入力符号については、
下位4ビットが不定となるので、領域内分割は不要であ
る。As shown in FIG. 3, the second lookup table 4 has an area corresponding to an 8-bit identification code, and each area is divided into 16 words by the lower 4 bits of the input code (1 word). Corresponds to one entry in the table). However, for input codes with a length of 12 bits or less,
Since the lower 4 bits are indefinite, the area division is unnecessary.
【0018】このような構成により、第1のルックアッ
プテーブル3と第2のルックアップテーブル4に要する
メモリスペースは212+212=213ワードとなり、従来
の方法では216ワードが必要となるから、この本発明の
例ではメモリスペースを87.5%削減できたことにな
る。With such a configuration, the memory space required for the first look-up table 3 and the second look-up table 4 is 2 12 +2 12 = 2 13 words, and 2 16 words are required in the conventional method. Therefore, in this example of the present invention, the memory space can be reduced by 87.5%.
【0019】[0019]
【実施例】次に、本発明の実施例を説明する。はじめ
に、図4を用いて最小サイズのルックアップテーブルの
設計方法を説明する。図4において、3は第1のルック
アップテーブル、4は第2のルックアップテーブル、z
は入力可変長符号の最大符号長、yは分割した8の上位
ビット数、z−yは分割したzの下位ビット数、xは識
別符号のビット数を表す。EXAMPLES Next, examples of the present invention will be described. First, a method of designing a minimum size lookup table will be described with reference to FIG. In FIG. 4, 3 is a first lookup table, 4 is a second lookup table, z
Is the maximum code length of the input variable-length code, y is the number of divided high-order bits of 8, z-y is the number of divided low-order bits of z, and x is the number of bits of the identification code.
【0020】zは入力可変長符号の符号系によりきまる
値で、ここではz=16ビットとする。またxは入力可
変長符号の符号系における有効符号数できまる値で、こ
こではx=8ビットとする。Z is a value determined by the code system of the input variable length code, and here z = 16 bits. Further, x is a value that allows the number of effective codes in the code system of the input variable length code, and here x = 8 bits.
【0021】第1と第2のルックアップテーブルの合計
のサイズをF(x,y,z)で表すと、 F(x,y,z)=2y +22-y+x z=16,x=8から F(y)=2y +224-y ・・・・・ となる。When the total size of the first and second lookup tables is represented by F (x, y, z), F (x, y, z) = 2 y +2 2−y + x z = 16, From x = 8, F (y) = 2 y +2 24-y .
【0022】このF(y)を最小にするyの値を求める
ため、式をyで微分すると、In order to find the value of y that minimizes this F (y), the equation is differentiated by y,
【0023】[0023]
【数1】 [Equation 1]
【0024】となる。式を最小にするには、右辺の括
弧内を0にすればよい。よって、 2y −224-y =0 y=24−y y=12 が得られる。これにより、zの16ビットを12ビット
と4ビットに分割するのが最適値とする。実際には、使
用される装置のシステムバス幅やメモリ素子のワード幅
などによって最適値に近い値を決定すればよい。It becomes In order to minimize the expression, the value inside the parenthesis on the right side should be 0. Therefore, 2 y −2 24-y = 0 y = 24−y y = 12 is obtained. As a result, the optimum value is to divide 16 bits of z into 12 bits and 4 bits. In practice, a value close to the optimum value may be determined according to the system bus width of the device used and the word width of the memory device.
【0025】次に、本発明実施例による第1と第2のル
ックアップテーブルの例を示す。簡単化のため、最大符
号長が6ビットのハフマン符号列が上位4ビットと下位
2ビットに分割される場合について説明する。Next, examples of the first and second lookup tables according to the embodiment of the present invention will be shown. For simplification, a case where a Huffman code string having a maximum code length of 6 bits is divided into upper 4 bits and lower 2 bits will be described.
【0026】図5は、画像データと、ハフマン符号列、
ハフマン符号長、第1のルックアップテーブルに設定さ
れる識別符号の値IDとの対応を示す。ハフマン符号列
の上位4ビット(点線の左側)の値が異なるごとに、1
から始まる順序数がIDに割り付けられる。ID数は8
個でよいため、出力の識別符号は3ビットとなる。FIG. 5 shows image data, Huffman code string,
The correspondence between the Huffman code length and the value ID of the identification code set in the first lookup table is shown. 1 for each different value of the upper 4 bits (left side of the dotted line) of the Huffman code string
An ordinal number starting with is assigned to the ID. Number of ID is 8
Since the number is sufficient, the output identification code is 3 bits.
【0027】図6に第1のルックアップテーブル3と第
2のルックアップテーブル4の構成を示す。第1のルッ
クアップテーブル3には、ハフマン符号の上位4ビット
の値と対応するIDが設定されている。なおハフマン符
号長が4ビット未満のハフマン符号については、不足ビ
ットの値が不定となるので同一IDが重複設定される。FIG. 6 shows the configuration of the first look-up table 3 and the second look-up table 4. In the first look-up table 3, an ID corresponding to the value of the upper 4 bits of the Huffman code is set. For a Huffman code having a Huffman code length of less than 4 bits, the value of the insufficient bits becomes indefinite, and thus the same ID is set redundantly.
【0028】第2のルックアップテーブル4には、ID
の3ビットとハフマン符号の下位2ビットの値に対応す
る復号値、つまり図5のハフマン符号列に対応する画像
データの値が設定されている。なおハフマン符号長が4
ビット未満のハフマン符号のIDについては、ハフマン
符号の下位2ビットの値00〜11に対して同一復号値
が設定される。The second lookup table 4 has an ID
3 and the lower 2 bits of the Huffman code, that is, the decoded value, that is, the image data value corresponding to the Huffman code string in FIG. Huffman code length is 4
For the ID of the Huffman code having less than bits, the same decoded value is set for the values 0 to 11 of the lower 2 bits of the Huffman code.
【0029】次に、図7に示すように、最大符号長16
ビットのハフマン符号列をmビットと16−mビットに
分割し、識別符号が8ビットの場合の第1のルックアッ
プテーブル3と第2のルックアップテーブル4のそれぞ
れのテーブル作成処理のフローを、図8と図9に示す。Next, as shown in FIG. 7, the maximum code length 16
A Huffman code string of bits is divided into m bits and 16-m bits, and a flow of table creation processing of each of the first lookup table 3 and the second lookup table 4 when the identification code is 8 bits will be described. This is shown in FIGS. 8 and 9.
【0030】図8の第1のルックアップテーブル作成処
理のフローにおいて、(1)で最初に設定するIDを1
とし、(2)で最初のハフマン符号とSize(ハフマ
ン符号長)をロードする。(3)でSizeがmビット
以上あれば、(4)でn=0とし、Sizeがmビット
未満ならば(5)でn=12−Sizeとする。次に
(4)あるいは(5)のnを用いて、(6)でメモリの
連続する2n 個のアドレスにIDを2n 回書き込む。
(7)で次のハフマン符号とSizeをロードし、
(8)でSizeが0かどうかを判定して0ならば終了
し、0以外ならば(9)を実行する。(9)ではハフマ
ン符号の上位mビットが以前に設定済みかどうかを判定
し、設定済みならば(10)でID=ID+1にして
(3)に戻り、設定済みであれば(7)に戻り次のハフ
マン符号とSizeをロードし、同様な処理を繰り返
す。In the flow of the first lookup table creation processing of FIG. 8, the ID initially set in (1) is 1
In step (2), the first Huffman code and Size (Huffman code length) are loaded. If Size is m bits or more in (3), n = 0 is set in (4), and if Size is less than m bits, n = 12-Size is set in (5). Next, using n in (4) or (5), the ID is written 2 n times in 2 n consecutive addresses in the memory in (6).
In (7), load the next Huffman code and Size,
In (8), it is determined whether or not Size is 0, and if it is 0, the process ends. If it is not 0, (9) is executed. In (9), it is determined whether or not the upper m bits of the Huffman code have been previously set. If set, set ID = ID + 1 in (10) and return to (3). If set, return to (7). The next Huffman code and Size are loaded, and the same processing is repeated.
【0031】次に図9第2のルックアップテーブル作成
処理のフローを説明する。まず(11)で最初のハフマ
ン符号とSizeをロードする。(12)でSize=
0かどうかを判定し、Sizeが0ならば終了し、0以
外ならば(13)でSize≧mかどうかを判定する。
Sizeがm以上ならば(14)でn=16−Size
とし、Sizeがn未満ならば(15)でn=16−m
とする。次にこれらのnを用いて(16)で復号値を2
n 回メモリの連続アドレスに書き込む。そして(17)
で次のハフマン符号とSizeをロードし、(12)に
戻って同様な処理を繰り返す。Next, the flow of the second lookup table creating process shown in FIG. 9 will be described. First, in (11), the first Huffman code and Size are loaded. Size = in (12)
It is determined whether or not 0. If Size is 0, the process ends. If it is other than 0, it is determined whether or not Size ≧ m in (13).
If Size is m or more, in (14), n = 16-Size
And if Size is less than n, then in (15), n = 16−m
And Next, using these n, the decoded value is set to 2 in (16).
Write to consecutive addresses in memory n times. And (17)
Then, the next Huffman code and Size are loaded, and the process returns to (12) to repeat the same processing.
【0032】図10は、このようにして作成された第1
と第2のルックアップテーブルを用いて最大符号長が1
6ビットのハフマン符号データを復号化する際のテーブ
ルアクセス処理のフローである。またm=12とする。FIG. 10 shows the first created in this way.
And using the second lookup table, the maximum code length is 1
It is a flow of a table access process at the time of decoding 6-bit Huffman code data. Also, m = 12.
【0033】まず(18)でハフマン符号をロードす
る。(19)でハフマン符号の上位12ビットを用いて
第1のルックアップテーブルを参照し、該当するIDを
読み出す。(20)ではIDを左に4ビットシフトし、
(21)で、シフトされたIDとハフマン符号の下位4
ビット(16−m=4)とを加算する。この加算結果の
コードを用いて、(22)で第2のルックアップテーブ
ルを参照し、該当する復号値を読み出す。First, at (18), the Huffman code is loaded. At (19), the first look-up table is referenced using the upper 12 bits of the Huffman code, and the corresponding ID is read. In (20), the ID is shifted 4 bits to the left,
In (21), the shifted ID and the lower 4 of the Huffman code
Add the bits (16-m = 4). The code of this addition result is used to refer to the second lookup table in (22) to read the corresponding decoded value.
【0034】[0034]
【発明の効果】本発明によれば、可変長符号のような符
号値が疎に分布する符号系を符号変換する場合に、従来
にくらべてルックアップテーブルのサイズを大幅に圧縮
することができ、メモリ資源の有効利用化とコストの低
減とを図ることができる。As described above, according to the present invention, the size of the lookup table can be significantly reduced as compared with the conventional case when code conversion is performed on a code system such as a variable length code in which code values are sparsely distributed. Thus, effective utilization of memory resources and cost reduction can be achieved.
【図1】本発明の原理説明図である。FIG. 1 is a diagram illustrating the principle of the present invention.
【図2】本発明の作用を説明するルックアップテーブル
の例の説明図である。FIG. 2 is an explanatory diagram of an example of a look-up table for explaining the operation of the present invention.
【図3】第2のルックアップテーブルの構成説明図であ
る。FIG. 3 is an explanatory diagram of a configuration of a second lookup table.
【図4】本発明実施例によるルックアップテーブルの設
計方法の説明図である。FIG. 4 is an explanatory diagram of a look-up table designing method according to an embodiment of the present invention.
【図5】本発明実施例による用いるハフマン符号列の例
の説明図である。FIG. 5 is an explanatory diagram of an example of a Huffman code string used according to the embodiment of the present invention.
【図6】本発明実施例によるルックアップテーブルの構
成例説明図である。FIG. 6 is an explanatory diagram of a configuration example of a lookup table according to the embodiment of the present invention.
【図7】本発明実施例のルックアップテーブル処理説明
図である。FIG. 7 is an explanatory diagram of a lookup table process according to the embodiment of this invention.
【図8】本発明実施例による第1のルックアップテーブ
ルの作成処理のフロー図である。FIG. 8 is a flowchart of a process of creating a first lookup table according to the embodiment of the present invention.
【図9】本発明実施例による第2のルックアップテーブ
ルの作成処理のフロー図である。FIG. 9 is a flowchart of a process of creating a second lookup table according to the embodiment of the present invention.
【図10】本発明実施例によるルックアップテーブルア
クセス処理のフロー図である。FIG. 10 is a flowchart of lookup table access processing according to the embodiment of the present invention.
【図11】ハフマン符号の例の説明図である。FIG. 11 is an explanatory diagram of an example of a Huffman code.
1 符号参照制御部 2 ソースデータメモリ 3 第1のルックアップテーブル 4 第2のルックアップテーブル 5 ディスティネーションデータメモリ 1 Code Reference Control Unit 2 Source Data Memory 3 First Lookup Table 4 Second Lookup Table 5 Destination Data Memory
Claims (2)
符号値が疎に分布している第1の符号系の入力符号を他
の異なる第2の符号系の対応する符号に変換する符号変
換方法において、 第1の符号系の入力符号のビット長をnとし、mをn−
1>m>1なる値とし、lをn−m>lなる値として、 第1の符号系の入力符号の上位n−mビットの値をlビ
ットの識別符号に変換する第1のルックアップテーブル
と、 第1の符号系の入力符号の下位mビットと第1のルック
アップテーブルから得られるlビットの識別符号とを組
み合わせた値を第2の符号系の対応する符号に変換する
第2のルックアップテーブルとを設け、 第1の符号系の入力符号を上位n−mビットと下位mビ
ットに分割し、上記第1および第2のルックアップテー
ブルをそれぞれ参照して第2の符号系の出力符号を得る
ことを特徴とする符号変換方法。1. A code conversion method for converting an input code of a first code system in which effective code values are sparsely distributed into a corresponding code of another different second code system by using a lookup table. , The bit length of the input code of the first code system is n, and m is n−
A first lookup for converting a value of upper mn bits of an input code of the first code system into a 1-bit identification code, with 1>m> 1 as a value and l as a value of nm> l A second combination for converting a value obtained by combining the table and the lower m bits of the input code of the first code system and the 1-bit identification code obtained from the first lookup table into the corresponding code of the second code system. Of the first code system, the input code of the first code system is divided into upper mn bits and lower m bits, and the second code system is referred to by referring to the first and second lookup tables, respectively. A code conversion method characterized by obtaining an output code of.
符号は、可変長符号であり、符号長が最大符号長未満の
符号は、その最上位ビットを最大符号長の符号の最上位
ビットに対応させて固定長符号化して取り扱われること
を特徴とする符号変換方法。2. The input code of the first code system according to claim 1, wherein the input code is a variable-length code, and the code having a code length less than the maximum code length has the most significant bit as the most significant code of the maximum code length. A code conversion method characterized in that fixed-length coding is performed in correspondence with bits to be handled.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP34615991A JP2968112B2 (en) | 1991-12-27 | 1991-12-27 | Code conversion method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP34615991A JP2968112B2 (en) | 1991-12-27 | 1991-12-27 | Code conversion method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH05183443A true JPH05183443A (en) | 1993-07-23 |
| JP2968112B2 JP2968112B2 (en) | 1999-10-25 |
Family
ID=18381517
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP34615991A Expired - Fee Related JP2968112B2 (en) | 1991-12-27 | 1991-12-27 | Code conversion method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2968112B2 (en) |
Cited By (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH07235878A (en) * | 1993-12-28 | 1995-09-05 | Matsushita Electric Ind Co Ltd | Variable length decoder |
| WO2002101935A1 (en) * | 2001-06-06 | 2002-12-19 | Seiko Epson Corporation | Decoding apparatus, decoding method, lookup table, and decoding program |
| WO2006067988A1 (en) * | 2004-12-22 | 2006-06-29 | Matsushita Electric Industrial Co., Ltd. | Mpeg audio decoding method |
| JP2006254225A (en) * | 2005-03-11 | 2006-09-21 | Toshiba Corp | Variable length code decoding apparatus and decoding method |
| US7148820B2 (en) | 2002-04-15 | 2006-12-12 | Fujitsu Limited | Variable-length encoded data decoding apparatus and decoding method |
| JP2006352548A (en) * | 2005-06-16 | 2006-12-28 | Fujifilm Holdings Corp | Data compression apparatus and data compression program |
| JP2007060206A (en) * | 2005-08-24 | 2007-03-08 | Fujifilm Corp | Data compression apparatus and data compression program |
| JP2007060203A (en) * | 2005-08-24 | 2007-03-08 | Fujifilm Corp | Data compression apparatus and data compression program |
| JP2007060205A (en) * | 2005-08-24 | 2007-03-08 | Fujifilm Corp | Data compression apparatus and data compression program |
| JP2007059999A (en) * | 2005-08-22 | 2007-03-08 | Fujifilm Corp | Data compression apparatus and data compression program |
| US7620676B2 (en) | 2003-08-04 | 2009-11-17 | Fujitsu Limited | Lookup table and data acquisition method |
| JP2011109678A (en) * | 2005-05-13 | 2011-06-02 | Qualcomm Inc | Method and apparatus for improved multimedia decoder |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS6276931A (en) * | 1985-09-30 | 1987-04-09 | Toshiba Corp | Data compressor |
| JPH01312625A (en) * | 1988-06-13 | 1989-12-18 | Fuji Xerox Co Ltd | Code converter |
| JPH02233023A (en) * | 1989-03-06 | 1990-09-14 | Fujitsu Ltd | Decoding circuit |
| JPH03145223A (en) * | 1989-10-30 | 1991-06-20 | Toshiba Corp | Variable length code demodulator |
| JPH04192744A (en) * | 1990-11-26 | 1992-07-10 | Matsushita Electric Ind Co Ltd | decoding device |
| JPH04215321A (en) * | 1990-12-14 | 1992-08-06 | Fujitsu Ltd | Variable length code decoding circuit |
-
1991
- 1991-12-27 JP JP34615991A patent/JP2968112B2/en not_active Expired - Fee Related
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS6276931A (en) * | 1985-09-30 | 1987-04-09 | Toshiba Corp | Data compressor |
| JPH01312625A (en) * | 1988-06-13 | 1989-12-18 | Fuji Xerox Co Ltd | Code converter |
| JPH02233023A (en) * | 1989-03-06 | 1990-09-14 | Fujitsu Ltd | Decoding circuit |
| JPH03145223A (en) * | 1989-10-30 | 1991-06-20 | Toshiba Corp | Variable length code demodulator |
| JPH04192744A (en) * | 1990-11-26 | 1992-07-10 | Matsushita Electric Ind Co Ltd | decoding device |
| JPH04215321A (en) * | 1990-12-14 | 1992-08-06 | Fujitsu Ltd | Variable length code decoding circuit |
Cited By (14)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH07235878A (en) * | 1993-12-28 | 1995-09-05 | Matsushita Electric Ind Co Ltd | Variable length decoder |
| WO2002101935A1 (en) * | 2001-06-06 | 2002-12-19 | Seiko Epson Corporation | Decoding apparatus, decoding method, lookup table, and decoding program |
| US6812863B2 (en) | 2001-06-06 | 2004-11-02 | Seiko Epson Corporation | Decoder, decoding method, look-up table, and decoding program |
| US7148820B2 (en) | 2002-04-15 | 2006-12-12 | Fujitsu Limited | Variable-length encoded data decoding apparatus and decoding method |
| US7620676B2 (en) | 2003-08-04 | 2009-11-17 | Fujitsu Limited | Lookup table and data acquisition method |
| WO2006067988A1 (en) * | 2004-12-22 | 2006-06-29 | Matsushita Electric Industrial Co., Ltd. | Mpeg audio decoding method |
| JP2006254225A (en) * | 2005-03-11 | 2006-09-21 | Toshiba Corp | Variable length code decoding apparatus and decoding method |
| JP2013118656A (en) * | 2005-05-13 | 2013-06-13 | Qualcomm Inc | Method and apparatus for improved multimedia decoder |
| JP2011109678A (en) * | 2005-05-13 | 2011-06-02 | Qualcomm Inc | Method and apparatus for improved multimedia decoder |
| JP2006352548A (en) * | 2005-06-16 | 2006-12-28 | Fujifilm Holdings Corp | Data compression apparatus and data compression program |
| JP2007059999A (en) * | 2005-08-22 | 2007-03-08 | Fujifilm Corp | Data compression apparatus and data compression program |
| JP2007060205A (en) * | 2005-08-24 | 2007-03-08 | Fujifilm Corp | Data compression apparatus and data compression program |
| JP2007060203A (en) * | 2005-08-24 | 2007-03-08 | Fujifilm Corp | Data compression apparatus and data compression program |
| JP2007060206A (en) * | 2005-08-24 | 2007-03-08 | Fujifilm Corp | Data compression apparatus and data compression program |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2968112B2 (en) | 1999-10-25 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP3332619B2 (en) | Decoding device and method thereof | |
| US6195026B1 (en) | MMX optimized data packing methodology for zero run length and variable length entropy encoding | |
| US6373412B1 (en) | Fast JPEG huffman encoding and decoding | |
| US5818877A (en) | Method for reducing storage requirements for grouped data values | |
| JP3009727B2 (en) | Improved data compression device | |
| JPH10107645A (en) | Encoder and encoding system | |
| JPH0744462B2 (en) | Compression encoding method and decoding method | |
| JPH0916373A (en) | Variable-length code encoding and dividing device | |
| US6225922B1 (en) | System and method for compressing data using adaptive field encoding | |
| JP2968112B2 (en) | Code conversion method | |
| US5668737A (en) | High-speed data processor and coding method | |
| US6798914B1 (en) | Neural-network-based method of image compression | |
| US8406538B2 (en) | Image processing apparatus and image processing method | |
| JP3593884B2 (en) | Encoding device and decoding device | |
| US20100039300A1 (en) | Lzw data compression algorithm | |
| US4972497A (en) | Image coding system | |
| US7002494B2 (en) | Low memory and MIPS efficient technique for decoding Huffman codes using multi-stage, multi-bits lookup at different levels | |
| CN111600610A (en) | Variable-length integer universal coding method, system and electronic equipment | |
| US6324306B1 (en) | Variable length code decoder and moving picture decoder having variable length code decoder | |
| US6580377B1 (en) | Huffman decoding using cascaded sub-table lookup method | |
| JPH09247466A (en) | Encoding device | |
| JP3124887B2 (en) | Data compression / decoding method | |
| JP2537551B2 (en) | Variable length code decoding circuit | |
| JPH0629861A (en) | Data compression method | |
| JPH0786957A (en) | Variable length coding device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| S531 | Written request for registration of change of domicile |
Free format text: JAPANESE INTERMEDIATE CODE: R313532 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
| LAPS | Cancellation because of no payment of annual fees |