JP3287461B2 - Variable length code decoding method and apparatus - Google Patents

Variable length code decoding method and apparatus

Info

Publication number
JP3287461B2
JP3287461B2 JP24837498A JP24837498A JP3287461B2 JP 3287461 B2 JP3287461 B2 JP 3287461B2 JP 24837498 A JP24837498 A JP 24837498A JP 24837498 A JP24837498 A JP 24837498A JP 3287461 B2 JP3287461 B2 JP 3287461B2
Authority
JP
Japan
Prior art keywords
code
length
variable
run
bit
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
JP24837498A
Other languages
Japanese (ja)
Other versions
JP2000078024A (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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP24837498A priority Critical patent/JP3287461B2/en
Publication of JP2000078024A publication Critical patent/JP2000078024A/en
Application granted granted Critical
Publication of JP3287461B2 publication Critical patent/JP3287461B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、MPEGなどの規
定に基づいて可変長符号化を行うデジタル信号処理に関
し、特に可変長符号を復号する可変長符号復号方法及び
装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to digital signal processing for performing variable length coding based on the regulations of MPEG and the like, and more particularly to a variable length code decoding method and apparatus for decoding variable length codes.

【0002】[0002]

【従来の技術】一般に、画像およびオーディオの圧縮符
号化装置では、入力される時間領域の信号を直交変換、
例えば、離散コサイン変換により周波数領域の係数に変
換して量子化したのち、符号を割り当てる。この符号の
割り当てでは、圧縮効率向上のため、発生頻度の確率に
応じて符号長を変化させる可変長符号化を施すことが多
い。圧縮方式の例としては、ISO/IEC(Internat
ional Standard Organisation/International Electrot
echnical Commission)13818−7で規定するMP
EG−2/AAC(Moving Picture Experts Group-Pha
se 2/Advanced Audio Coding)があげられる。
2. Description of the Related Art In general, in an image and audio compression encoding apparatus, an input time-domain signal is subjected to an orthogonal transform,
For example, after transforming into a coefficient in the frequency domain by discrete cosine transform and quantizing, the code is assigned. In this code allocation, in order to improve the compression efficiency, variable-length coding that changes the code length according to the probability of occurrence frequency is often performed. Examples of compression methods include ISO / IEC (Internat
ional Standard Organization / International Electrot
Chemical Commission) MP defined by 13818-7
EG-2 / AAC (Moving Picture Experts Group-Pha
se 2 / Advanced Audio Coding).

【0003】圧縮された信号の伸張では、可変長符号化
されたビット列を復号語に変換する操作が必要となる。
可変長符号復号装置の一例が、特開平9−307456
号公報に記載されている。
[0003] Decompression of a compressed signal requires an operation of converting a variable-length coded bit string into a decoded word.
An example of a variable-length code decoding device is disclosed in Japanese Patent Application Laid-Open No. 9-307456.
No., published in Japanese Unexamined Patent Publication No.

【0004】図5は、前記公報記載の可変長符号復号装
置の構成を示す図である。この可変長符号復号装置は、
制御部499、レジスタファイル500、選択器50
1、選択器502、プライオリティエンコーダ503、
バレルシフタ504、ALU505、選択器506、デ
ータRAM507で構成される。このハードウェア構成
は、汎用のマイクロコンピュータ中のデータパス部にプ
ライオリティエンコーダ503とバレルシフタ504を
付加した構成であり、可変長符号の復号動作は、その処
理内容を記述したマイクロプログラムを実行することに
より実現される。図5では明示的に示されていないが、
プライオリティエンコーダ503とALU505との双
方に入力される信号線を通じて可変符号ビット列が入力
される。
FIG. 5 is a diagram showing a configuration of a variable-length code decoding device described in the above publication. This variable-length code decoding device includes:
Control unit 499, register file 500, selector 50
1, selector 502, priority encoder 503,
It comprises a barrel shifter 504, an ALU 505, a selector 506, and a data RAM 507. This hardware configuration is a configuration in which a priority encoder 503 and a barrel shifter 504 are added to a data path section in a general-purpose microcomputer. The decoding operation of a variable-length code is performed by executing a microprogram describing the processing contents. Is achieved. Although not explicitly shown in FIG. 5,
A variable code bit string is input through signal lines input to both the priority encoder 503 and the ALU 505.

【0005】同図において、プライオリティエンコーダ
503は、可変長符号ビット列の先頭からある論理値が
連続して続くビット列の長さを検出する。ここで、ある
論理値の連続であるビット列をランと呼ぶ。データRA
M507には、ランに後続するビット列に対応する復号
語を格納する。データRAM507のアドレスのビット
数は、ランに後続するビット列の最大長と等しい。復号
語を得るためには、ALU505ならびにバレルシフタ
504により、ランに後続するビット列のビット数分切
り出された可変長符号ビット列のビットパタンをアドレ
スとして、データRAM507より出力する。
[0005] In the figure, a priority encoder 503 detects the length of a bit sequence in which a certain logical value continues from the beginning of a variable-length code bit sequence. Here, a bit string that is a continuation of a certain logical value is called a run. Data RA
M507 stores a decoded word corresponding to the bit string following the run. The number of bits of the address of the data RAM 507 is equal to the maximum length of the bit string following the run. To obtain a decoded word, the ALU 505 and the barrel shifter 504 output from the data RAM 507 the bit pattern of the variable-length code bit string cut out by the number of bits of the bit string following the run as an address.

【0006】図2は、MPEG−2/AACにおける可
変長符号の例を示す図である。図2に示す例により、図
5に示す従来の可変長符号復号装置の動作を詳細に説明
する。なお、符号値の表記において、” ”で囲まれた
値は2進数、「 」で囲まれた値は10進数とする。図
2に示す可変長符号の例では、論理”1”の長さがラン
長となり、論理”1”が反転する論理”0”以降のビッ
トパタンの最大長は符号番号7〜10ならびに符号番号
13〜15の4ビットであるから、データRAM507
に格納されるテーブルは、図6のようになる。
FIG. 2 is a diagram showing an example of a variable length code in MPEG-2 / AAC. The operation of the conventional variable-length code decoding device shown in FIG. 5 will be described in detail with reference to the example shown in FIG. In the notation of a code value, a value enclosed by "" is a binary number, and a value enclosed by "" is a decimal number. In the example of the variable length code shown in FIG. 2, the length of the logic "1" is the run length, and the maximum length of the bit pattern after the logic "0" in which the logic "1" is inverted is the code number 7 to 10 and the code number Since it is 4 bits of 13 to 15, the data RAM 507
Is as shown in FIG.

【0007】図6において、ラン長はビット列の先頭よ
り続く論理”1”の長さであり、ビットパタンはランに
続く4ビットの符号パタンである。図6のビットパタン
に記された破線は、上位より破線部までが実際の可変長
符号ビット列であり、破線部以降はビット長を合わせる
ための付加ビットである。入力される可変長符号ビット
列を仮に”101111000”として説明すると、プ
ライオリティエンコーダ503によりラン長「1」が検
出され、データRAM507の「1」の部分テーブルを
指定する。部分テーブルには、ランに後続しているビッ
トパタンの最大長である4ビットの”0111”がアド
レスとして与えられ、テーブルより復号語の「3」を得
ることができる。
In FIG. 6, the run length is the length of logical "1" following the head of the bit string, and the bit pattern is a 4-bit code pattern following the run. The dashed line shown in the bit pattern of FIG. 6 is the actual variable-length code bit string from the upper part to the dashed line part, and additional bits for adjusting the bit length after the dashed line part. Assuming that the input variable-length code bit string is “101111000”, the run length “1” is detected by the priority encoder 503 and a partial table of “1” in the data RAM 507 is specified. In the partial table, 4-bit "0111", which is the maximum length of the bit pattern following the run, is given as an address, and the decoded word "3" can be obtained from the table.

【0008】図6を見て明らかなように、この従来の可
変長符号復号装置において、復号語を得るテーブル用の
データRAMは、全ての可変長符号語のうち最大のビッ
トパタン長をLとする時、(2のL乗)×ラン長の個数
のワード数を有する。
As is apparent from FIG. 6, in the conventional variable length code decoding apparatus, the data RAM for the table for obtaining the decoded word uses L as the maximum bit pattern length of all the variable length code words. In this case, the number of words is (2 to the power of L) × run length.

【0009】また、ハフマン符号化においては、一次元
ではなく、多次元のものが利用される場合がある。この
場合、一つの復号語が複数の量子化係数に対応する。M
PEG−2/AACの例では、一つの復号語が2個また
は4個の量子化係数に対応する。一例では、復号語Aと
量子化係数w、x、y、zは以下の関係を持つ。
In Huffman coding, multi-dimensional coding may be used instead of one-dimensional coding. In this case, one decoded word corresponds to a plurality of quantization coefficients. M
In the example of PEG-2 / AAC, one decoded word corresponds to two or four quantization coefficients. In one example, the decoded word A and the quantization coefficients w, x, y, z have the following relationship.

【0010】A=w×27+x×9+y×3+z 量子化係数w、x、y、zの値は、0、1、2のいずれ
かである。したがって、復号語Aから量子化係数w、
x、y、zを求めるためには、以下の除算計算が必要で
ある。 	w = A ÷ 27 … 余りB 	x = B ÷ 9 … 余りC 	y = C ÷ 3 … 余りD 	z = D 上式のように、復号語Aより4つの量子化係数を求める
には、3回の除算を行わねばならない。
A = w × 27 + x × 9 + y × 3 + z The values of the quantization coefficients w, x, y and z are 0, 1, or 2. Therefore, from the decoded word A, the quantization coefficient w,
In order to obtain x, y, and z, the following division calculation is required. 	 w = A ^ 27 ... remainder B 	 x = B ^ 9 ... remainder C 	 y = C ^ 3 ... remainder D 	 z = D Decoding as in the above equation To find four quantization coefficients from word A, three divisions must be performed.

【0011】[0011]

【発明が解決しようとする課題】従来の可変長符号復号
装置においては、可変長符号語の先頭から同一論理値で
つながるラン長を除くビットパタンと呼ばれる部分の最
大長でテーブルを構成し、そのテーブルをラン長の数だ
け準備しなければならない。例えば、オーディオ符号化
の国際標準であるMPEG−2/AACで用いられる振
幅情報(スケールファクタ)の変換テーブルの場合、ビ
ットパタンの最大長は6であり、ラン長の種類は20と
なる。この場合、テーブルに必要なデータRAMの容量
は、(2の6乗)×20=1280ワードとなる。テー
ブルに最低限必要な容量は復号語の数と同等であり、ス
ケールファクタの復号語の数は121であるから、10
倍以上のテーブル容量を必要とする。このため、復号語
を得るためのテーブルに要するデータRAMの容量が大
きくしなければならないという問題がある。
In a conventional variable length code decoding apparatus, a table is constituted by the maximum length of a portion called a bit pattern excluding a run length connected by the same logical value from the beginning of a variable length code word. The table must be prepared for the number of run lengths. For example, in the case of a conversion table of amplitude information (scale factor) used in MPEG-2 / AAC, which is an international standard for audio coding, the maximum length of a bit pattern is 6, and the type of run length is 20. In this case, the capacity of the data RAM required for the table is (2 6) × 20 = 1280 words. The minimum required capacity of the table is equivalent to the number of decoded words, and the number of decoded words of the scale factor is 121.
More than twice the table capacity is required. For this reason, there is a problem that the capacity of the data RAM required for the table for obtaining the decoded word must be increased.

【0012】また、従来の可変長符号復号装置では、全
ての符号語の変換は、ラン長を検出して動作することを
前提にしており、先頭から同一論理値のみで構成される
可変長符号への考慮がなされていないから、ラン長を検
出して復号を行う時に、例えば”111111”のよう
に先頭から同一論理値のみで構成される可変長符号で
は、”0”までのラン長を検出することでは正しい変換
復号を得ることができず、誤動作を起こす可能性があ
る。
Further, in the conventional variable-length code decoding apparatus, it is assumed that all codewords are converted and operated by detecting the run length, and the variable-length code consisting of only the same logical value from the head is converted. Therefore, when a run length is detected and decoded, a variable length code consisting only of the same logical value from the beginning, such as “111111”, sets the run length to “0”. By detecting, correct conversion and decoding cannot be obtained, and a malfunction may occur.

【0013】更に、MPEG−2/AACの復号語は、
2個または4個の係数が重畳されているから、復号結果
に剰余演算を施さなければならないという問題がある。
Further, the decoded word of MPEG-2 / AAC is:
Since two or four coefficients are superimposed, there is a problem that a remainder operation must be performed on the decoding result.

【0014】(発明の目的)本発明の目的は、復号語を
得る復号テーブルメモリの容量を低減することを可能と
する可変長符号復号方法及び装置を提供することにあ
る。
(Object of the Invention) It is an object of the present invention to provide a variable length code decoding method and apparatus capable of reducing the capacity of a decoding table memory for obtaining decoded words.

【0015】本発明の他の目的は、MPEG−2/AA
Cなどのオーディオ符号化の可変長符号復号において、
剰余演算に要する演算量を低減することを可能とする可
変長符号復号方法及び装置を提供することにある。
Another object of the present invention is to provide an MPEG-2 / AA
In variable length code decoding of audio coding such as C,
It is an object of the present invention to provide a variable-length code decoding method and apparatus capable of reducing the amount of calculation required for remainder calculation.

【0016】[0016]

【課題を解決するための手段】本発明の可変長符号復号
方法は、先頭より連続する同一論理値のランとこれに後
続するビット列とからなる可変長符号ビット列を復号す
る可変長符号復号方法において、予めラン長毎にランに
後続する特定のビット列を基準符号として記憶するとと
もに前記基準符号(基準アドレス)の符号番号を記憶し
た1次復号テーブルメモリと、入力可変長符号ビット列
の符号番号と復号語(例えば多次元の符号)とを記憶し
た2次復号テーブルメモリとを用い、入力可変長符号ビ
ット列のラン長を検出し、前記ラン長に基づき1次復号
テーブルメモリから対応する基準符号及び該基準符号の
符号番号を出力し、前記基準符号と入力可変長符号ビッ
ト列のランに後続するビット列の符号との差と前記基準
符号の符号番号とから入力可変長符号ビット列の符号番
号を算出し、算出した前記符号番号に基づき前記2次復
号テーブルメモリから復号語を出力することを特徴とす
る。また、前記可変長符号復号方法の前記1次復号テー
ブルメモリには、ランに後続するビット列の符号の同一
符号長単位で基準符号、該基準符号の符号番号及びビッ
ト長を記憶し、入力可変長符号の符号番号の算出は、入
力可変長符号ビット列のランに後続するビット列を前記
基準符号のビット長だけ切り出し前記基準符号と比較す
ることにより本来の基準符号を検索し、当該基準符号を
用いて算出することを特徴とする。
A variable length code decoding method according to the present invention is directed to a variable length code decoding method for decoding a variable length code bit sequence consisting of a run of the same logical value continuing from the head and a bit sequence following the run. A primary decoding table memory in which a specific bit string following a run is stored in advance for each run length as a reference code, and a code number of the reference code (reference address) is stored; And a secondary decoding table memory storing words (for example, a multidimensional code), detects a run length of the input variable-length code bit string, and, based on the run length, a corresponding reference code and a corresponding reference code from the primary decoding table memory. The code number of the reference code is output, and the difference between the reference code and the code of the bit string following the run of the input variable-length code bit string, and the code number of the reference code Calculating the code number of al the input variable length code bit string, and outputs the decoded word from said second decoding table memory based on the calculated the code number. The primary decoding table memory of the variable length code decoding method stores a reference code, a code number and a bit length of the reference code in the same code length unit of a code of a bit string following a run, and stores the input variable length. The calculation of the code number of the code is performed by searching for the original reference code by extracting the bit sequence following the run of the input variable-length code bit sequence by the bit length of the reference code and comparing it with the reference code, and using the reference code. It is characterized in that it is calculated.

【0017】本発明の可変長符号復号装置は、先頭より
連続する同一論理値のランとこれに後続するビット列と
からなる可変長符号ビット列を復号する可変長符号復号
装置において、入力可変長符号ビット列よりラン長を検
出するプライオリティエンコーダ(図1の100)と、
前記ラン長と制御器の出力をアドレスとしてランに後続
する符号の同一符号長単位の特定の符号を基準符号とし
て出力するとともに、当該基準符号の符号番号及びビッ
ト長を出力する1次復号テーブルメモリ(図1の10
2)と、前記ラン長と1次復号テーブルメモリより出力
された前記基準符号のビット長をもとに可変長符号ビッ
ト列のビット列を切り出すビットマスクシフタ(図1の
101)と、前記ビット列の符号と前記基準符号との差
と前記基準符号の符号番号とから入力可変長符号ビット
列の符号番号を演算する演算器(図1の減算器103、
105)と、入力可変長符号ビット列の符号番号をアド
レスとして復号語を出力する2次復号テーブルメモリ
(図1の104)と、前記ビット列の符号と前記基準符
号との差により1次復号テーブルメモリの切り替えアド
レスを出力する前記制御器(図1の104)とから構成
される。
A variable-length code decoding apparatus according to the present invention decodes a variable-length code bit string consisting of a run of the same logical value continuing from the beginning and a bit string following the run. A priority encoder (100 in FIG. 1) for detecting a run length more;
A primary decoding table memory that outputs a specific code of the same code length unit of a code following a run as a reference code using the run length and the output of the controller as an address, and outputs a code number and a bit length of the reference code. (10 in FIG. 1)
2) a bit mask shifter (101 in FIG. 1) for cutting out a bit string of a variable length code bit string based on the run length and the bit length of the reference code output from the primary decoding table memory; An arithmetic unit for calculating the code number of the input variable-length code bit string from the difference between the reference code and the reference code (the subtractor 103 in FIG. 1);
105), a secondary decoding table memory (104 in FIG. 1) that outputs a decoded word using the code number of the input variable-length code bit string as an address, and a primary decoding table memory based on the difference between the code of the bit string and the reference code. And the controller (104 in FIG. 1) which outputs the switching address of

【0018】前記演算器は、ビットマスクシフタより出
力されるビット列の符号と1次復号テーブルメモリより
出力される基準符号との大小の比較を行うための第一の
減算器と、1次復号テーブルメモリより出力される基準
符号(基準アドレス)から第一の減算器の出力を減算す
る第二の減算器とで構成することができる。そして、前
記制御器は、第一の減算器の出力の正負に応じて1次復
号テーブルメモリのアドレスを切り替えるように構成す
ることができる。
The arithmetic unit includes a first subtractor for comparing the code of the bit string output from the bit mask shifter with the reference code output from the primary decoding table memory, and a primary decoding table. A second subtractor for subtracting the output of the first subtractor from the reference code (reference address) output from the memory can be used. Then, the controller can be configured to switch the address of the primary decoding table memory according to the sign of the output of the first subtractor.

【0019】また、前記制御器は、同一論理値の符号の
みで構成される可変長符号ビット列のために、プライオ
リティエンコーダの出力値が、あらかじめ定められた値
より大きい場合に、2次復号テーブルメモリの入力を、
同一論理値の符号のみで構成される符号ビット列の復号
語に対応するアドレスに強制的に切り替えることを特徴
とする。
[0019] Further, when the output value of the priority encoder is larger than a predetermined value for the variable-length code bit string composed of only codes of the same logical value, the controller decodes the secondary decoding table memory. Input
Forcibly switching to an address corresponding to a decoded word of a code bit string composed of only codes of the same logical value.

【0020】前記2次復号テーブルメモリは、復号語と
して多次元の符号を直接、格納するように構成すること
を特徴とする。また、前記2次復号テーブルメモリには
復号語の数に等しいワード数が格納されることを特徴と
する。
[0020] The secondary decoding table memory is characterized in that a multidimensional code is directly stored as a decoded word. Further, the secondary decoding table memory stores the number of words equal to the number of decoded words.

【0021】[0021]

【発明の実施の形態】(構成の説明)次に、本発明の可
変長符号復号方法及び装置の実施の形態について図1〜
図4を参照して詳細に説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS (Explanation of Configuration) Next, an embodiment of a variable length code decoding method and apparatus according to the present invention will be described with reference to FIGS.
This will be described in detail with reference to FIG.

【0022】図1は、本発明の一実施の形態を示すブロ
ック図である。本実施の形態は、プライオリティエンコ
ーダ100、ビットマスクシフタ101、1次復号テー
ブルメモリ102、減算器103、制御器104、減算
器105、2次復号テーブルメモリ106により構成さ
れる。上記の図1に示す実施の形態における回路の動作
は、以下に説明する可変長符号の特徴に基づくものであ
る。
FIG. 1 is a block diagram showing an embodiment of the present invention. This embodiment includes a priority encoder 100, a bit mask shifter 101, a primary decoding table memory 102, a subtractor 103, a controller 104, a subtractor 105, and a secondary decoding table memory 106. The operation of the circuit in the embodiment shown in FIG. 1 is based on the characteristic of the variable length code described below.

【0023】図2は可変長符号を示す図である。図2に
示される可変長符号を見ると、ラン長によって符号長が
ほぼ決定することがわかる。例えばラン長が1の時の符
号長は4であり、ラン長が2の時の符号長は5または6
である。後者の場合、ランに後続する3ビットのビット
列は、符号番号6における”001”を基準とし、”0
01”と値が等しいか、あるいは、値が小さい場合には
符号長は5、”001”より大きい場合には符号長は6
である。
FIG. 2 is a diagram showing a variable length code. Looking at the variable length code shown in FIG. 2, it can be seen that the code length is almost determined by the run length. For example, when the run length is 1, the code length is 4, and when the run length is 2, the code length is 5 or 6.
It is. In the latter case, the 3-bit bit string following the run is based on “001” in code number 6 and “0”.
01 ", the code length is 5 when the value is equal or smaller, and the code length is 6 when the value is larger than" 001 ".
It is.

【0024】また、図2における可変長符号は、値(可
変長符号値)の小さい順に番号(符号番号)を附して並
べたものであるが、同一符号長かつ同一ラン長の場合に
は可変長符号値間の差と符号番号間の差は等しい。した
がって、ラン長よりテーブルを参照して基準とする符号
(基準符号ともいう)を求め、基準符号と可変長符号値
の差に基準符号の符号番号(基準アドレスともいう)を
加えることにより、復号語の符号番号(アドレスともい
う)を求めることができる。
The variable length codes in FIG. 2 are arranged with numbers (code numbers) in ascending order of value (variable length code value). The difference between variable length code values and the difference between code numbers are equal. Therefore, a reference code (also referred to as a reference code) is obtained by referring to the table from the run length, and the code number (also referred to as a reference address) of the reference code is added to the difference between the reference code and the variable-length code value, thereby performing decoding. The code number (also called an address) of a word can be determined.

【0025】次に、図1に示す本実施の形態の各部の基
本的動作を説明する。
Next, the basic operation of each section of this embodiment shown in FIG. 1 will be described.

【0026】プライオリティエンコーダ100は、入力
される可変長符号ビット列11より、先頭から同一論理
値で続くラン長を検出し、エンコード値12を出力す
る。例えば、プライオリティエンコーダで”1”の連続
値を検出する。”110……”の可変長符号ビット列の
入力があるとすると、プライオリティエンコーダはエン
コード値「2」を出力する。
The priority encoder 100 detects a run length following the same logical value from the beginning from the input variable length code bit string 11 and outputs an encoded value 12. For example, a continuous value of "1" is detected by the priority encoder. Assuming that a variable length code bit string of “110...” Is input, the priority encoder outputs an encoded value “2”.

【0027】1次復号テーブルメモリ102は、可変長
符号ビット列のラン長及びランに後続するビット長毎に
予め記憶されている基準符号、該基準符号のビット長及
び符号番号(基準アドレス)が記憶されており、制御器
104より出力されるオフセットアドレス13にプライ
オリティエンコーダ100から出力されたエンコード値
12を加算した値をアドレスとして、ラン長に応じた前
記基準符号14、基準符号14のビット長16、ならび
に、入力可変長符号ビット列の符号番号(アドレス)と
その復号語とが記憶された2次復号テーブルメモリのア
ドレスを算出する基準となる基準アドレス15の信号を
出力する。
The primary decoding table memory 102 stores a run length of a variable-length code bit string, a reference code stored in advance for each bit length following the run, a bit length of the reference code, and a code number (reference address). The reference code 14 corresponding to the run length and the bit length 16 of the reference code 14 corresponding to the run length are used as an address with the value obtained by adding the encoded value 12 output from the priority encoder 100 to the offset address 13 output from the controller 104. And outputs a signal of a reference address 15 serving as a reference for calculating an address of the secondary decoding table memory in which the code number (address) of the input variable-length code bit string and its decoded word are stored.

【0028】ビットマスクシフタ101は、可変長符号
ビット列11に対し、プライオリティエンコーダ100
より出力されたエンコード値12の数だけ上位ビットを
切り捨て、該可変長符号ビット列11のランに後続する
ビット列からビット長16の長さのビット列を抽出した
信号17を出力する。減算器103は、1次復号テーブ
ルメモリ102より出力される基準符号14から、ビッ
トマスクシフタより出力される信号17の符号値を減算
し、差の信号18を出力する。
The bit mask shifter 101 converts the variable length code bit string 11 into a priority encoder 100
Upper bits are discarded by the number of the encoded values 12 output, and a signal 17 in which a bit string having a bit length of 16 is extracted from the bit string following the run of the variable-length code bit string 11 is output. The subtractor 103 subtracts the code value of the signal 17 output from the bit mask shifter from the reference code 14 output from the primary decoding table memory 102, and outputs a difference signal 18.

【0029】減算器103の差の信号18が負であれ
ば、制御器104は、1次復号テーブルメモリに与える
オフセットアドレス13を変化させて、再度、1次復号
テーブルメモリより、よりビット長の大きい基準符号1
4、2次復号テーブルメモリ106用の基準アドレス1
5、ならびに、前記基準符号14のビット長16を読み
出す。このように制御器104は、減算器103からの
信号18が0を含む正の数になるまで、上記の動作を繰
り返す。
If the difference signal 18 of the subtractor 103 is negative, the controller 104 changes the offset address 13 given to the primary decoding table memory, and again has a bit length longer than that of the primary decoding table memory. Large reference code 1
4, reference address 1 for secondary decoding table memory 106
5 and the bit length 16 of the reference code 14 are read. Thus, the controller 104 repeats the above operation until the signal 18 from the subtractor 103 becomes a positive number including 0.

【0030】減算器103からの信号18が0を含む正
の数であれば、減算器105は、1次復号テーブルメモ
リ102より出力される2次復号テーブルメモリ106
用の基準アドレス15から減算器103より出力される
信号18の値を減算してこの可変長符号ビット列の符号
番号を算出し、入力2次復号テーブルメモリ106のア
ドレス20として与える。
If the signal 18 from the subtractor 103 is a positive number including 0, the subtractor 105 outputs a secondary decoding table memory 106 output from the primary decoding table memory 102.
The value of the signal 18 output from the subtractor 103 is subtracted from the reference address 15 for calculation, to calculate the code number of the variable-length code bit string, and to provide the calculated code number as the address 20 of the input secondary decoding table memory 106.

【0031】また、制御器104は、変換する入力可変
長符号ビット列11がすべてランで構成される符号であ
る場合に備えて、プライオリティエンコーダ100の出
力12を監視し、可変長符号ビット列11がすべてラン
で構成される符号であると検出した時には、アドレス2
0を無効とし、この符号の復号語が格納されている2次
復号テーブルメモリ106用の所定のアドレス19を出
力する。
The controller 104 monitors the output 12 of the priority encoder 100 in case that the input variable-length code bit sequence 11 to be converted is a code composed of all runs, When it is detected that the code is composed of a run, the address 2
0 is invalidated, and a predetermined address 19 for the secondary decoding table memory 106 in which the decoded word of this code is stored is output.

【0032】2次復号テーブルメモリ106は、減算器
105からのアドレス20または制御器104からのア
ドレス19に基づいて、該当する番地に対応する復号語
を出力する。例えばMPEG−2/AACのように復号
語として多次元の量子化係数を必要とする場合には、2
次復号テーブルメモリ106には剰余演算結果を予め格
納され、量子化係数を出力する。
The secondary decoding table memory 106 outputs a decoded word corresponding to the corresponding address based on the address 20 from the subtractor 105 or the address 19 from the controller 104. For example, when a multi-dimensional quantization coefficient is required as a decoded word as in MPEG-2 / AAC, 2
The next decoding table memory 106 stores the result of the remainder operation in advance, and outputs a quantized coefficient.

【0033】以上説明した動作が、図1に示す可変長符
号復号装置における基本的動作である。次に、本実施の
形態のより具体的な各部の詳細動作を図2〜図4を参照
して説明する。図3は、図2に示す可変長符号に基づく
1次復号テーブルメモリの内容を示す図である。図3に
示すように1次復号テーブルメモリには、可変長符号の
ラン長毎に基準符号、符号長及び符号番号が関連付けて
記憶される。ここで基準符号はランに後続するビット列
との大小の比較を行うための符号を示し、符号長は基準
符号のビット長、符号番号は2次復号テーブルメモリの
基準アドレスを示す。
The operation described above is the basic operation in the variable length code decoding device shown in FIG. Next, a more detailed operation of each section of the present embodiment will be described with reference to FIGS. FIG. 3 is a diagram showing the contents of the primary decoding table memory based on the variable length code shown in FIG. As shown in FIG. 3, the primary decoding table memory stores a reference code, a code length, and a code number in association with each variable length code run length. Here, the reference code indicates a code for comparing the magnitude with the bit string following the run, the code length indicates the bit length of the reference code, and the code number indicates the reference address of the secondary decoding table memory.

【0034】また、1次復号テーブルメモリには、同一
ラン長でも後続する符号長が異なるものはそれぞれ第1
列、第2列…として別のグループに記憶され、基準符号
は、本例では同一符号長内の最大値が記憶される。
In the primary decoding table memory, those having the same run length but different subsequent code lengths are respectively stored in the first decoding table memory.
.. Are stored in another group as a column, a second column,..., And the maximum value within the same code length is stored as the reference code in this example.

【0035】具体的には、図2において符号番号5から
10までのラン長2の可変長符号は、符号長5と符号長
6に分けられる。この場合、最初の基準符号は、符号番
号6の”11001”のランを除く”001”である。
この基準符号”001”は図3の第一列に格納され、こ
の基準符号からビットマスクシフタ101の出力を減算
した値が0を含む正の数の時、つまり、入力される可変
長符号の符号長が5であるとき、符号番号(基準アドレ
ス)6から前記減算結果の値をさらに減算して2次復号
テーブルメモリ106のアドレスを算出する。
More specifically, in FIG. 2, the variable length codes having run lengths 2 from code numbers 5 to 10 are divided into code lengths 5 and 6. In this case, the first reference code is “001” excluding the run of code number 6 “11001”.
This reference code “001” is stored in the first column of FIG. 3, and when the value obtained by subtracting the output of the bit mask shifter 101 from this reference code is a positive number including 0, that is, the input variable length code When the code length is 5, the value of the result of the subtraction is further subtracted from the code number (reference address) 6 to calculate the address of the secondary decoding table memory 106.

【0036】基準符号”001”からビットマスクシフ
タ101の出力を減算した値が負の場合には、つまり、
入力される可変長符号の符号長が5でない場合には、1
次復号テーブルメモリの第2列に記載されている基準符
号である”0111”との比較を行い、2次復号テーブ
ルメモリ106のアドレスを決定する操作をおこなう。
When the value obtained by subtracting the output of the bit mask shifter 101 from the reference code "001" is negative, that is,
If the code length of the input variable length code is not 5, 1
The comparison with the reference code “0111” described in the second column of the next decoding table memory is performed to determine the address of the secondary decoding table memory 106.

【0037】このように、図3に示される1次復号テー
ブルメモリの第1列は、全ての可変長符号語のラン長に
対応する情報を保持する。さらに、同一ラン長に複数の
符号長が存在する時は、第2列に対応する情報を保持す
る。図2に示す可変長符号語の例では、ラン長2、3に
複数の符号長が存在するため、1次復号テーブルメモリ
は、図3に示すように2列×4種類の情報を持つ。
As described above, the first column of the primary decoding table memory shown in FIG. 3 holds information corresponding to the run lengths of all the variable length codewords. Further, when a plurality of code lengths exist for the same run length, information corresponding to the second column is held. In the example of the variable length codeword shown in FIG. 2, since there are a plurality of code lengths in the run lengths 2 and 3, the primary decoding table memory has 2 columns × 4 types of information as shown in FIG.

【0038】図4は、多次元可変長符号化を考慮した時
の2次復号テーブルメモリの内容を示す図である。符号
番号は2次復号テーブルメモリのアドレス、量子化係数
3から0は多次元の量子化係数である。このように、本
発明では、符号が多次元の量子化係数に対応する場合に
は、2次復号テーブルメモリにあらかじめ剰余演算した
結果を格納する。
FIG. 4 is a diagram showing the contents of the secondary decoding table memory when multidimensional variable length coding is considered. The code number is the address of the secondary decoding table memory, and the quantization coefficients 3 to 0 are multidimensional quantization coefficients. As described above, in the present invention, when a code corresponds to a multidimensional quantized coefficient, the result of the remainder operation is stored in advance in the secondary decoding table memory.

【0039】次に、図2に示す可変長符号で構成される
ビット列を例とし、入力可変長符号ビット列11とし
て”110101……”の入力がある場合の図1に示す
本実施の形態の動作例を具体的に説明する。
Next, the operation of the present embodiment shown in FIG. 1 when the input variable length code bit sequence 11 includes "110101..." As an example of the bit sequence composed of the variable length code shown in FIG. An example will be specifically described.

【0040】プライオリティエンコーダ100は、上位
ビットから続くランの長さとして最初の”11”を検出
しラン長「2」を信号線12に出力する。1次復号テー
ブルメモリ102は、図3に示すテーブル情報を有し、
制御器104はラン長「2」の入力に対し最初は第1列
を指定するオフセットアドレスを出力する。1次復号テ
ーブルメモリ102では、第1列に格納されているラン
長「2」の基準符号”001”、符号長「3」及び符号
番号「6」を出力する。ビットマスクシフタ101で
は、ラン長「2」を入力して入力可変長符号ビット列1
1の上位2ビットを切り捨て、ランに後続するビット列
から符号長「3」のビット列”010”を抽出し、信号
17を出力する。減算器103では、基準符号”00
1”からビットマスクシフタの出力”010”を減算す
る。
The priority encoder 100 detects the first “11” as the run length following the higher-order bit, and outputs the run length “2” to the signal line 12. The primary decoding table memory 102 has the table information shown in FIG.
The controller 104 first outputs an offset address designating the first column in response to the input of the run length “2”. The primary decoding table memory 102 outputs the reference code “001”, the code length “3”, and the code number “6” of the run length “2” stored in the first column. In the bit mask shifter 101, the run length “2” is input and the input variable-length code bit string 1
The upper two bits of 1 are discarded, a bit string “010” having a code length “3” is extracted from the bit string following the run, and a signal 17 is output. In the subtractor 103, the reference code “00”
The output “010” of the bit mask shifter is subtracted from “1”.

【0041】減算器103の結果は、1−2=−1とな
り負となるので、制御器104は、1次復号テーブルメ
モリ102のオフセットアドレス13を切り換え、1次
復号テーブルメモリ102の第2列を指定する。1次復
号テーブルメモリ102は、第2列めのラン長「2」に
対応する基準符号”0111”、符号長「4」及び基準
アドレスとして符号番号「10」を出力する。ビットマ
スクシフタ101は、ラン長「2」により入力可変長符
号ビット列の上位2ビットを切り捨て、ランに後続する
ビット列から符号長「4」のビット列”0101”を抽
出し、信号17を出力する。減算器103では、基準符
号”0111”からビット列”0101”を減算し、
「2」を出力する。「2」は正の数であるので、減算器
105は、1次復号テーブルメモリ102の出力である
符号番号「10」から減算器103の出力「2」を減じ
た値「8」を2次復号テーブルメモリ106のアドレス
として出力する。2次復号テーブルメモリ106では、
アドレス「8」に対応する復号語「10」、もしくは剰
余演算結果「0」「1」「0」「1」を出力する。
Since the result of the subtractor 103 becomes 1-2 = −1 and becomes negative, the controller 104 switches the offset address 13 of the primary decoding table memory 102 and switches the second column of the primary decoding table memory 102. Is specified. The primary decoding table memory 102 outputs the reference code “0111” corresponding to the run length “2” in the second column, the code length “4”, and the code number “10” as the reference address. The bit mask shifter 101 discards the upper two bits of the input variable-length code bit string according to the run length “2”, extracts a bit string “0101” having a code length “4” from the bit string following the run, and outputs a signal 17. The subtractor 103 subtracts the bit string “0101” from the reference code “0111”,
"2" is output. Since “2” is a positive number, the subtracter 105 calculates the value “8” obtained by subtracting the output “2” of the subtractor 103 from the code number “10” output from the primary decoding table memory 102 as a secondary value. Output as an address of the decoding table memory 106. In the secondary decoding table memory 106,
The decoded word "10" corresponding to the address "8" or the remainder operation result "0""1""0""1" is output.

【0042】上記実施例では、基準符号とビットマスク
シフタの出力の減算について、基準符号のビット長に応
じて減算のビット幅が可変との設定としたが、減算器1
03における減算結果が変わらないならば、ビット数は
各基準符号のビット長以上の長さに設定してもよく、例
えば、基準符号の最大ビット長に固定しても良い。ま
た、上記実施例では、ビットマスクシフタでの操作にお
いて、ランを切り捨てるようにしたものとしたが、ラン
に相当するビット列を論理値”0”で置き換え、基準符
号とビットマスクシフタの出力の減算におけるビット幅
を増大させるようにしてもよい。あるいは、ビットマス
クシフタでの操作において、ランを切り捨てずに(ラン
長+符号長)のビット数の入力可変長符号ビット列を抽
出し、減算器103にて、ラン長の論理値”1”を上位
ビットに付加した基準符号との減算をおこなうようにし
てもよい。
In the above embodiment, the subtraction between the reference code and the output of the bit mask shifter is set such that the bit width of the subtraction is variable according to the bit length of the reference code.
If the result of the subtraction in 03 does not change, the number of bits may be set to be equal to or longer than the bit length of each reference code, for example, may be fixed to the maximum bit length of the reference code. Further, in the above-described embodiment, the run is truncated in the operation by the bit mask shifter. However, the bit string corresponding to the run is replaced with a logical value “0”, and the reference code and the output of the bit mask shifter are subtracted. May be increased. Alternatively, in the operation by the bit mask shifter, an input variable-length code bit string of (run length + code length) bits is extracted without truncating the run, and the logical value “1” of the run length is subtracted by the subtractor 103. Subtraction from the reference code added to the upper bits may be performed.

【0043】また、制御器104の動作に関して、基準
符号14から信号17を減算する減算器103の出力1
8が0を含む正の場合と負の場合とで、後続の動作の制
御を行うようにした例を示したが、基準符号14の設定
をあらかじめ全て+1しておき、出力18が正の場合と
0を含む負の場合とで後続の動作の制御を行うように変
更することもできる。
Further, regarding the operation of the controller 104, the output 1 of the subtractor 103 for subtracting the signal 17 from the reference code 14
An example has been shown in which the subsequent operation is controlled in a case where 8 is positive including 0 and a case where the output is positive when the output 18 is positive. It is also possible to make a change so that the subsequent operation is controlled in the negative case including 0.

【0044】[0044]

【発明の効果】本発明の可変長符号復号方法及び装置に
よれば、基準符号と入力可変長符号ビット列をマスクシ
フトした符号とを比較演算することにより、2次復号テ
ーブルメモリの容量を復号語等と同じ数に対応する容量
だけ準備すればよいようにしているので、変換テーブル
に要する記憶容量を大幅に低減できるという効果があ
る。
According to the variable length code decoding method and apparatus of the present invention, the capacity of the secondary decoding table memory is reduced by comparing the reference code with the code obtained by mask-shifting the input variable length code bit string. Since it is sufficient to prepare only the capacity corresponding to the same number as that described above, there is an effect that the storage capacity required for the conversion table can be significantly reduced.

【0045】また、本発明によれば、剰余演算を要する
復号語の場合、あらかじめ剰余演算結果を2次復号テー
ブルメモリに格納しておくことで、MPEG−2/AA
Cなどにおける剰余演算を不要にすることができるの
で、回路規模を低減できるという効果がある。
According to the present invention, in the case of a decoded word requiring a remainder operation, the result of the remainder operation is stored in advance in the secondary decoding table memory, so that MPEG-2 / AA
Since the remainder operation in C or the like can be eliminated, there is an effect that the circuit scale can be reduced.

【0046】さらに、本発明によれば、プライオリティ
エンコーダの出力を制御器で監視し、同一論理値で構成
する符号を検出した場合には、2次復号テーブルメモリ
のアドレスを制御器より供給して復号語を得るようにし
たことにより、先頭から同一論理値で構成する可変長符
号ビット列が入力されてもエラーを起こすことなく、正
常に復号語に変換できるという効果もある。
Further, according to the present invention, the output of the priority encoder is monitored by the controller, and when a code having the same logical value is detected, the address of the secondary decoding table memory is supplied from the controller. By obtaining a decoded word, there is also an effect that even if a variable-length code bit string composed of the same logical value is input from the beginning, an error can be generated and the word can be normally converted into a decoded word.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の実施の形態の構成を示すブロック図で
ある。
FIG. 1 is a block diagram showing a configuration of an embodiment of the present invention.

【図2】本発明の可変長符号の一例を示す図である。FIG. 2 is a diagram illustrating an example of a variable length code according to the present invention.

【図3】本発明の1次復号テーブルメモリの内容を示す
図である。
FIG. 3 is a diagram showing contents of a primary decoding table memory of the present invention.

【図4】本発明の2次復号テーブルメモリの内容を示す
図である。
FIG. 4 is a diagram showing the contents of a secondary decoding table memory according to the present invention.

【図5】本発明の従来例の可変長符号復号回路を示すブ
ロック図である。
FIG. 5 is a block diagram showing a conventional variable-length code decoding circuit of the present invention.

【図6】本発明の従来例のテーブルの内容を示す図であ
る。
FIG. 6 is a diagram showing the contents of a table according to a conventional example of the present invention.

【符号の説明】[Explanation of symbols]

100 プライオリティエンコーダ 101 ビットマスクシフタ 102 1次復号テーブルメモリ 103、105 減算器 104 制御器 106 2次復号テーブルメモリ 11 入力可変長符号ビット列信号 12 プライオリティエンコーダ100のエンコード出
力信号 13 オフセットアドレス信号 14 基準符号信号 15 符号番号信号 16 符号長信号 17 ビット列信号 18 減算器103の出力信号 19 制御器104からの2次復号テーブルメモリ10
6のアドレス信号 20 減算器105からの2次復号テーブルメモリ10
6のアドレス信号 499 制御部 500 レジスタファイル 501、502、506 選択器 503 プライオリティエンコーダ 504 バレルシフタ 505 ALU 507 データRAM
REFERENCE SIGNS LIST 100 priority encoder 101 bit mask shifter 102 primary decoding table memory 103, 105 subtractor 104 controller 106 secondary decoding table memory 11 input variable-length code bit string signal 12 encode output signal of priority encoder 100 13 offset address signal 14 reference code signal 15 Code number signal 16 Code length signal 17 Bit string signal 18 Output signal of subtracter 103 19 Secondary decoding table memory 10 from controller 104
6 address signal 20 Secondary decoding table memory 10 from subtractor 105
6 address signal 499 control unit 500 register file 501, 502, 506 selector 503 priority encoder 504 barrel shifter 505 ALU 507 data RAM

Claims (8)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 先頭より連続する同一論理値のランとこ
れに後続するビット列とからなる可変長符号ビット列を
復号する可変長符号復号方法において、 予めラン長毎にランに後続する特定のビット列を基準符
号として記憶するとともに前記基準符号の符号番号を記
憶した1次復号テーブルメモリと、入力可変長符号ビッ
ト列の符号番号と復号語とを記憶した2次復号テーブル
メモリとを用い、入力可変長符号ビット列のラン長を検
出し、前記ラン長に基づき1次復号テーブルメモリから
対応する基準符号及び該基準符号の符号番号を出力し、
前記基準符号と入力可変長符号ビット列のランに後続す
るビット列の符号との差と前記基準符号の符号番号とか
ら入力可変長符号ビット列の符号番号を算出し、算出し
た前記符号番号に基づき前記2次復号テーブルメモリか
ら復号語を出力することを特徴とする可変長符号復号方
法。
1. A variable-length code decoding method for decoding a variable-length code bit string consisting of a run of the same logical value continuing from the head and a bit string following the run, comprising: Using a primary decoding table memory storing a code number of the reference code and a secondary decoding table memory storing a code number of an input variable length code bit string and a decoded word, an input variable length code is stored. Detecting the run length of the bit string and outputting a corresponding reference code and a code number of the reference code from the primary decoding table memory based on the run length;
The code number of the input variable-length code bit sequence is calculated from the difference between the reference code and the code of the bit sequence following the run of the input variable-length code bit sequence, and the code number of the input variable-length code bit sequence is calculated based on the calculated code number. A variable length code decoding method comprising: outputting a decoded word from a next decoding table memory.
【請求項2】 前記1次復号テーブルメモリには、ラン
に後続するビット列の同一ビット長単位で前記基準符
号、該基準符号の符号番号及びビット長を記憶し、入力
可変長符号ビット列の符号番号の算出は、入力可変長符
号ビット列のランに後続するビット列を前記基準符号の
ビット長だけ切り出し前記基準符号と比較することによ
り対応する基準符号を検索し、当該基準符号を用いて算
出することを特徴とする請求項1記載の可変長符号復号
方法。
2. The primary decoding table memory stores the reference code, a code number of the reference code, and a bit length in the same bit length unit of a bit string following a run, and stores a code number of an input variable-length code bit string. Is calculated by extracting the bit string following the run of the input variable-length code bit string by the bit length of the reference code, comparing with the reference code, searching for the corresponding reference code, and calculating using the reference code. 3. The variable length code decoding method according to claim 1, wherein:
【請求項3】 検出されたラン長が所定値より大きい場
合には、同一論理値の符号のみで構成される入力可変長
符号として予め決められた符号番号により2次復号テー
ブルメモリから対応する復号語を出力することを特徴と
する請求項2記載の可変長符号復号方法。
3. If the detected run length is longer than a predetermined value, the corresponding decoding from the secondary decoding table memory is performed using a code number determined in advance as an input variable length code consisting of only codes of the same logical value. 3. The variable length code decoding method according to claim 2, wherein words are output.
【請求項4】 先頭より連続する同一論理値のランとこ
れに後続するビット列とからなる可変長符号ビット列を
復号する可変長符号復号装置において、 入力可変長符号ビット列よりラン長を検出するプライオ
リティエンコーダと、前記ラン長と制御器の出力をアド
レスとしてランに後続する符号の同一符号長単位の特定
の符号を基準符号として出力するとともに、当該基準符
号の符号番号及びビット長を出力する1次復号テーブル
メモリと、前記ラン長と1次復号テーブルメモリより出
力された前記基準符号のビット長をもとに可変長符号ビ
ット列から前記ビット列を切り出すビットマスクシフタ
と、前記ビット列の符号と前記基準符号との差と前記基
準符号の符号番号とから入力可変長符号ビット列の符号
番号を演算する演算器と、入力可変長符号ビット列の前
記符号番号をアドレスとして復号語を出力する2次復号
テーブルメモリと、前記ビット列の符号と前記基準符号
とにより1次復号テーブルメモリの切り替えアドレスを
出力する前記制御器とを有することを特徴とする可変長
符号復号装置。
4. A priority encoder for detecting a run length from an input variable-length code bit sequence in a variable-length code decoding device for decoding a variable-length code bit sequence consisting of a run of the same logical value continuing from the head and a bit sequence following the run. Primary decoding for outputting a specific code of the same code length unit of a code following the run as a reference code using the run length and the output of the controller as an address, and outputting a code number and a bit length of the reference code. A table memory, a bit mask shifter that cuts out the bit sequence from a variable-length code bit sequence based on the run length and the bit length of the reference code output from the primary decoding table memory, and a code of the bit sequence and the reference code. An arithmetic unit for calculating the code number of the input variable-length code bit string from the difference between A secondary decoding table memory that outputs a decoded word using the code number of the long code bit string as an address, and the controller that outputs a switching address of a primary decoding table memory based on the code of the bit string and the reference code. A variable-length code decoding device characterized by the above-mentioned.
【請求項5】 前記1次復号テーブルメモリは、基準符
号、該基準符号の番号及びビット長の情報を同一ラン長
の入力に対して複数組格納し、前記制御器は前記複数組
の格納アドレス間の切り替えを行うことを特徴とする請
求項4記載の可変長復号装置。
5. The primary decoding table memory stores a plurality of sets of reference codes, numbers of the reference codes, and bit length information for inputs having the same run length, and the controller stores the plurality of sets of storage addresses. 5. The variable length decoding device according to claim 4, wherein switching between the variable length decoding devices is performed.
【請求項6】 前記制御器は、プライオリティエンコー
ダの出力値が予め定められた値より大きい場合に、2次
復号テーブルメモリへのアドレスを同一論理値の符号の
みで構成される可変長符号ビット列の復号語に対応する
アドレスに強制的に切り替えることを特徴とする請求項
4記載の可変長復号装置。
6. The controller according to claim 1, wherein when the output value of the priority encoder is larger than a predetermined value, the controller sets an address to the secondary decoding table memory as a variable-length code bit string composed of only codes having the same logical value. 5. The variable length decoding device according to claim 4, wherein the address is forcibly switched to an address corresponding to the decoded word.
【請求項7】 前記2次復号テーブルメモリには、復号
語として多次元の符号を格納することを特徴とする請求
項4記載の可変長符号復号装置。
7. The variable length code decoding apparatus according to claim 4, wherein a multidimensional code is stored as a decoded word in said secondary decoding table memory.
【請求項8】 前記2次復号テーブルメモリのワード数
は、復号語の数に等しいことを特徴とする請求項4記載
の可変長復号装置。
8. The variable length decoding device according to claim 4, wherein the number of words in said secondary decoding table memory is equal to the number of decoded words.
JP24837498A 1998-09-02 1998-09-02 Variable length code decoding method and apparatus Expired - Fee Related JP3287461B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP24837498A JP3287461B2 (en) 1998-09-02 1998-09-02 Variable length code decoding method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP24837498A JP3287461B2 (en) 1998-09-02 1998-09-02 Variable length code decoding method and apparatus

Publications (2)

Publication Number Publication Date
JP2000078024A JP2000078024A (en) 2000-03-14
JP3287461B2 true JP3287461B2 (en) 2002-06-04

Family

ID=17177159

Family Applications (1)

Application Number Title Priority Date Filing Date
JP24837498A Expired - Fee Related JP3287461B2 (en) 1998-09-02 1998-09-02 Variable length code decoding method and apparatus

Country Status (1)

Country Link
JP (1) JP3287461B2 (en)

Also Published As

Publication number Publication date
JP2000078024A (en) 2000-03-14

Similar Documents

Publication Publication Date Title
US6587057B2 (en) High performance memory efficient variable-length coding decoder
JP3332619B2 (en) Decoding device and method thereof
JP2870515B2 (en) Variable length coding device
KR100624432B1 (en) Context adaptive binary arithmetic decoder method and apparatus
TWI658702B (en) Data encoding and decoding
US5841381A (en) Huffman coding/decoding using an intermediate code number
KR20070086661A (en) Device and data method for selective compression and decompression and data format for compressed data
JP3410629B2 (en) Variable length coding circuit and variable length coding method
JP4175366B2 (en) Encoding apparatus and method
KR930024507A (en) Variable length encoding / decoding method of video data
JP2008118307A (en) Coder, and its control method
US20140247168A1 (en) Encoder, decoder and method
US6408102B1 (en) Encoding/decoding device
EP2367290A1 (en) Data encoder for encoding an incoming stream
JP3287461B2 (en) Variable length code decoding method and apparatus
US6647064B1 (en) ADPCM encoding apparatus, ADPCM decoding apparatus and delay circuit
US6255968B1 (en) Data compression method and apparatus
JP3277425B2 (en) Digital signal encoding method, encoding table generation method, encoding apparatus, and encoding method
WO2010022023A1 (en) Combining transform coefficient decoding with variable length decoding
US6859562B2 (en) Coded data length detection apparatus, method of the same, and image coding apparatus
US6339614B1 (en) Method and apparatus for quantizing and run length encoding transform coefficients in a video coder
JP2781535B2 (en) Digital encoding device and digital code decoding device
EP1249830A1 (en) A method for decompressing a compressed audio signal
JP3239664B2 (en) Variable length code decoding method
KR100335622B1 (en) Syntax-based adaptive arithmetic encoder and/or decoder using locational probabilistic model and high efficiency image encoder and/or decoder using adaptive arithmetic encoder and/or decoder

Legal Events

Date Code Title Description
FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080315

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20090315

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20090315

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20100315

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20100315

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20110315

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20110315

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20120315

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20120315

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20130315

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20130315

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20140315

Year of fee payment: 12

LAPS Cancellation because of no payment of annual fees