JP3277425B2 - Digital signal encoding method, encoding table generation method, encoding apparatus, and encoding method - Google Patents

Digital signal encoding method, encoding table generation method, encoding apparatus, and encoding method

Info

Publication number
JP3277425B2
JP3277425B2 JP1810794A JP1810794A JP3277425B2 JP 3277425 B2 JP3277425 B2 JP 3277425B2 JP 1810794 A JP1810794 A JP 1810794A JP 1810794 A JP1810794 A JP 1810794A JP 3277425 B2 JP3277425 B2 JP 3277425B2
Authority
JP
Japan
Prior art keywords
data
coefficient
zero coefficients
encoding
events
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 - Lifetime
Application number
JP1810794A
Other languages
Japanese (ja)
Other versions
JPH06343168A (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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP1810794A priority Critical patent/JP3277425B2/en
Publication of JPH06343168A publication Critical patent/JPH06343168A/en
Application granted granted Critical
Publication of JP3277425B2 publication Critical patent/JP3277425B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、例えば映像や音声等各
種情報を伝送、或いは記録、再生するような装置に適用
して好適なディジタル信号の符号化方法、符号化用テー
ブル生成方法、符号化装置及び符号化方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a digital signal encoding method, an encoding table generating method, and an encoding method suitable for transmitting, recording, and reproducing various information such as video and audio. The present invention relates to an encoding device and an encoding method.

【0002】[0002]

【従来の技術】従来より、十分な品質を維持しながらで
きるだけ小さなビットレートで画像を伝送したり記録す
るために、種々の映像信号の符号化装置が提案されてい
る。その一例として、DCT(離散コサイン変換)及び
ハフマン符号化を用いた高能率符号化装置が提案されて
いる。このような符号化装置では、符号化しようとする
映像や音声等のデータをブロック毎に例えば離散コサイ
ン変換(DCT)回路等によって直流成分から高次交流
成分までを係数データに変換し、この係数データを量子
化し、量子化した係数データを可変長符号化回路で符号
化する。
2. Description of the Related Art Conventionally, various video signal encoding apparatuses have been proposed in order to transmit or record an image at a bit rate as small as possible while maintaining sufficient quality. As one example, a high-efficiency coding apparatus using DCT (discrete cosine transform) and Huffman coding has been proposed. In such an encoding apparatus, data such as video and audio to be encoded is converted into coefficient data from a DC component to a high-order AC component by a discrete cosine transform (DCT) circuit or the like for each block. The data is quantized, and the quantized coefficient data is encoded by a variable length encoding circuit.

【0003】DCTではブロック化されたデータの直流
成分から高次交流成分までを2次元の係数データに変換
する。そしてこの変換で得られた変換係数は、図24に
示すように走査(ジグザグスキャン)されて符号化され
る。符号化は走査の順番に従って行われ、量子化後に非
零となる最後の係数までが符号化範囲とされる。
[0003] In DCT, a DC component to a high-order AC component of blocked data is converted into two-dimensional coefficient data. Then, the transform coefficients obtained by this transform are scanned (zigzag scan) and encoded as shown in FIG. Encoding is performed according to the order of scanning, and up to the last coefficient that becomes non-zero after quantization is taken as an encoding range.

【0004】ジグザグスキャンによって符号化範囲内と
された係数データは例えば図25に示すように1列に並
べられ、1列に並べられた係数データが可変長符号化回
路において上述したようなハフマン符号化等の手法によ
り符号化される。このハフマン符号化技術は特開昭63
−132530号公報において開示されている。
[0004] Coefficient data within the coding range by the zigzag scan are arranged in one column as shown in FIG. 25, for example, and the coefficient data arranged in one column is converted into a Huffman code as described above in a variable length encoding circuit. It is encoded by a technique such as conversion. This Huffman coding technique is disclosed in
It is disclosed in JP-A-132530.

【0005】図25において、DCは直流成分の係数デ
ータ(この図の例では“168”としている)、AC0
1〜AC33は交流成分の係数データで、交流成分の係
数データは添えられている番号が大きい程、高次の交流
成分となっている。この図に示すように、直流成分の係
数データDCから高次の交流成分の係数データAC33
までを順に符号C1〜符号Cnに符号化する。また、こ
の図25に示すように、各係数データを符号化する際、
連続する“0”とその後に続く値で符号化するようにす
る。この連続する“0”の個数を示すことばとして、
「0ラン」ということばを用いる。例えば「0ラン0」
と記述した場合は連続する“0”(0ラン)の個数が
“0”、即ち、“0”がないことを示す。
In FIG. 25, DC is coefficient data of a DC component (in this example, it is “168”), AC0
1 to AC33 are coefficient data of the AC component. The larger the number attached to the coefficient data of the AC component, the higher the AC component. As shown in the figure, the coefficient data DC33 of the higher-order AC component is converted from the coefficient data DC of the DC component.
Are sequentially encoded into codes C1 to Cn. As shown in FIG. 25, when each coefficient data is encoded,
Encoding is performed using consecutive “0” and subsequent values. As a word indicating the number of consecutive “0”,
The word "zero run" is used. For example, "0 run 0"
Indicates that the number of consecutive “0” (0 run) is “0”, that is, there is no “0”.

【0006】図25においては、交流成分の係数AC2
0が“0”、続くAC11が“0”、続くAC02が
“0”、続くAC03が“4”であるので、この場合は
これを「0ラン3 値4」という言い方となる。また、
交流成分の係数AC01は“120”であるので、この
場合は「0ラン0 値120」という言い方となる。
In FIG. 25, a coefficient AC2 of an AC component
0 is “0”, the following AC11 is “0”, the following AC02 is “0”, and the following AC03 is “4”. In this case, this is called “0 run 3 value 4”. Also,
Since the AC component coefficient AC01 is “120”, in this case, the expression is “0 run 0 value 120”.

【0007】さて、この図25に示す係数データを符号
化する場合について図26を参照して説明する。図26
は0ランと最後の“0”に続く値に応じて符号を与える
ためのテーブルである。説明の便宜上、図26において
は図25に示した0ランの値とそれに続く係数値のみを
示している。また、図26に示すテーブルは周知のハフ
マン符号の作成手順に従って作成されるものである。
Now, the case of encoding the coefficient data shown in FIG. 25 will be described with reference to FIG. FIG.
Is a table for giving codes according to 0 runs and the value following the last "0". For convenience of explanation, FIG. 26 shows only the value of the 0 run shown in FIG. 25 and the coefficient values following the 0 run. The table shown in FIG. 26 is created according to a well-known Huffman code creation procedure.

【0008】先ず、交流成分の係数AC01は“12
0”なので、図26に示すように「0ラン0、係数値
“120”」となるので、割り当てる可変長符号は例え
ば符号C1となり、交流成分の係数AC10は“50”
なので、図26に示すように「0ラン0、係数値“5
0”」となるので、割り当てる可変長符号は例えば符号
C2となる。
First, the AC component coefficient AC01 is “12”.
Since it is “0”, as shown in FIG. 26, it becomes “0 run 0, coefficient value“ 120 ””, so that the variable length code to be assigned is, for example, code C1, and the AC component coefficient AC10 is “50”.
Therefore, as shown in FIG. 26, “0 run 0, coefficient value“ 5
0 "", the variable length code to be assigned is, for example, code C2.

【0009】続く係数AC20は“0”、係数AC11
は“0”、係数AC02は“0”、係数AC03は
“4”、即ち、“0”が3個連続し、その次の非0であ
る“4”が並んでいるので、この場合は図26に示すよ
うに「0ラン3、係数値“4”」となり、従って、割り
当てる可変長符号は符号C3となる。同様に係数AC1
2は“0”、係数AC21は“0”、係数AC30は
“3”であるから、この場合は図26に示すように「0
ラン2、係数値“3”」となり、割り当てる可変長符号
は符号C4となる。
The following coefficient AC20 is "0" and the coefficient AC11 is
Is "0", coefficient AC02 is "0", coefficient AC03 is "4", that is, three "0" s are continuous, and the next non-zero "4" is arranged. As shown in FIG. 26, “0 run 3, coefficient value“ 4 ””, and therefore, the variable length code to be assigned is code C3. Similarly, the coefficient AC1
2 is “0”, the coefficient AC21 is “0”, and the coefficient AC30 is “3”. In this case, as shown in FIG.
Run 2 has a coefficient value of “3”, and the variable length code to be assigned is code C4.

【0010】次に、係数AC31は“1”であるのでこ
の場合は図26に示すように「0ラン0、値“1”」と
なるので、割り当てる可変長符号は符号C5となる。次
に、係数AC22は“0”、係数AC13は“0”、係
数AC23は“1”であるので、この場合は図26に示
すように「0ラン2、値“1”」となり、従って、割り
当てる符号は符号C6となる。そして係数AC32は
“1”なので、図26に示すように「0ラン0、値
“1”」となるので、割り当てる符号は符号C7とな
り、同様に係数AC33は“1”なので、図26に示す
ように「0ラン0、値“1”」となり、割り当てる符号
は符号C8となる。
Next, since the coefficient AC31 is "1", in this case "0 run 0, value" 1 "" as shown in FIG. 26, the variable length code to be assigned is code C5. Next, since the coefficient AC22 is “0”, the coefficient AC13 is “0”, and the coefficient AC23 is “1”, in this case, “0 run 2, value“ 1 ”” is obtained as shown in FIG. The code to be assigned is code C6. Since the coefficient AC32 is "1", it becomes "0 run 0, value" 1 "" as shown in FIG. 26. Therefore, the code to be assigned is code C7. Similarly, since the coefficient AC33 is "1", it is shown in FIG. Thus, “0 run 0, value“ 1 ”” is obtained, and the code to be assigned is code C8.

【0011】このように、従来の符号化装置において
は、離散コサイン変換によって得た係数データを直流成
分から高次交流成分までをジグザグスキャンによって走
査して係数データの符号化の範囲を決定し、符号化の範
囲となった係数データをジグザグスキャンの走査の順に
1列に並べ、1列に並べた係数データをハフマン符号の
作成手順に従って作成したテーブル、即ち、連続する
“0”の個数とこれに続く非0の値に応じた符号からな
るテーブルを参照して符号化するようにしている。
As described above, in the conventional encoding apparatus, the coefficient data obtained by the discrete cosine transform is scanned from the DC component to the high-order AC component by zigzag scanning to determine the encoding range of the coefficient data. The coefficient data in the range of encoding is arranged in one column in the order of zigzag scan, and the coefficient data arranged in one column is created according to the Huffman code creation procedure. The encoding is performed by referring to a table consisting of codes corresponding to non-zero values following the.

【0012】尚、本出願人は先に(n×n)の画素から
なる2次元の画像ブロックに対し、コサイン変換等の変
換符号化を行い、変換符号化で得られた直流成分を所定
ビット数で伝送し、(nの2乗−1)個の交流成分を
(m×m)(n>m)のサブブロックに分割し、サブブ
ロック単位で有意なデータを有するサブブロックのアド
レス情報と伝送されるサブブロック内の有意な係数デー
タとを伝送することで、フィードフォワード制御により
伝送データ量を所定の目標値より小に制御できるように
したデータ伝送装置を提案している(特開平2−226
886号公報参照)。
The applicant of the present invention first performs transform coding such as cosine transform on a two-dimensional image block composed of (n × n) pixels, and converts a DC component obtained by the transform coding into a predetermined bit. , And divides (n 2 −1) AC components into (m × m) (n> m) sub-blocks, and stores address information of sub-blocks having significant data in sub-block units. There has been proposed a data transmission apparatus in which the amount of transmission data can be controlled to be smaller than a predetermined target value by feedforward control by transmitting significant coefficient data in a transmitted sub-block (Japanese Patent Laid-Open No. Hei 2 (1994)). -226
886).

【0013】また、本出願人は先に(n×n)の画素か
らなる2次元の画像ブロックに対し、コサイン変換等の
変換符号化を行い、変換符号化で得られた直流成分を所
定ビット数で伝送し、(nの2乗−1)個の交流成分の
データについて1フィールド、1フレーム等の単位期間
における発生度数を検出し、この発生度数を累積分布デ
ータに変換し、累積度数分布データを参照して、単位期
間における発生データ量を目標の伝送データ量より少な
いものに制御するようにしたデータ伝送装置を提案して
いる(特開平2−238787号公報参照)。
The applicant of the present invention performs transform coding such as cosine transform on a two-dimensional image block composed of (n × n) pixels, and converts a DC component obtained by the transform coding into a predetermined bit. , And the frequency of occurrence in a unit period of one field, one frame, etc. is detected with respect to the data of (n squared -1) AC components, and the frequency is converted into cumulative distribution data, and the cumulative frequency distribution is calculated. A data transmission apparatus has been proposed in which the amount of generated data in a unit period is controlled to be smaller than a target transmission data amount by referring to data (see Japanese Patent Application Laid-Open No. Hei 2-238787).

【0014】[0014]

【発明が解決しようとする課題】上述したように、DC
T等の変換符号化では、ブロック内を低次の係数から高
次の係数までジグザグにスキャンし、連続する“0”と
それに続く“0”以外の数とを組にして、一意に定まる
符号を割り当てていた。サブバンドコーディングでも、
バンド内またはバンド間の連続する“0”とそれに続く
係数の組に対して、一意に定まる符号を割り当てるのが
一般的である。
SUMMARY OF THE INVENTION As described above, DC
In transform coding such as T, the inside of a block is scanned in a zigzag manner from a low-order coefficient to a high-order coefficient, and a continuous “0” and a subsequent number other than “0” are paired to uniquely determine a code. Had been assigned. Even in sub-band coding,
In general, a code that is uniquely determined is assigned to a set of consecutive “0” s in a band or between bands and a coefficient subsequent thereto.

【0015】これらの方法では、圧縮率の高いときには
“0”が連続し、効率良く符号化することが可能である
が、圧縮率の低いときには、“0”が減少するために効
率良く符号化することができない。即ち、上述したよう
な一意に係数データに符号を割り当てる変換符号化で
は、符号化効率を向上させることができないという不都
合があった。
In these methods, when the compression rate is high, "0" s are continuous, and encoding can be performed efficiently. However, when the compression rate is low, "0" decreases, so that encoding is performed efficiently. Can not do it. That is, in the above-described transform coding in which codes are uniquely assigned to coefficient data, there is a disadvantage that coding efficiency cannot be improved.

【0016】本発明はこのような点を解決するためにな
されたもので、符号化効率を大幅に向上させることので
きる符号化装置を提案しようとするものである。
The present invention has been made to solve such a problem, and an object of the present invention is to propose an encoding apparatus capable of greatly improving encoding efficiency.

【0017】[0017]

【課題を解決するための手段】本発明ディジタル信号の
符号化方法は、ディジタル信号を、連続する零係数と、
非零係数とで連なるデータ列に変換するステップ(a)
と、データ列から、所定のランレングスを有する零係数
の連続と、零係数の連続の前または後に連なる少なくと
も1つの非零係数とでなる複数の事象を得るステップ
(b)と、1つ前の事象毎に応じて、各事象に対して異
なる符号語を与えるテーブルデータを基に、複数の事象
に対して、1つの符号語を設定するステップ(c)とか
らなるものである。
According to the present invention, there is provided a method for encoding a digital signal, comprising the steps of:
Step (a) of converting to a data sequence that is continuous with non-zero coefficients
(B) obtaining, from the data sequence, a plurality of events consisting of a series of zero coefficients having a predetermined run length and at least one non-zero coefficient before or after the series of zero coefficients; (C) setting one code word for a plurality of events based on table data that gives a different code word to each event in accordance with each event.

【0018】また本発明符号化用テーブル生成方法は、
所定のディジタル信号を、連続する零係数と、非零係数
とで連なるデータ列に変換するステップ(a)と、デー
タ列から、所定のランレングスを有する零係数の連続
と、零係数の連続の前または後に連なる少なくとも1つ
の非零係数とでなる複数の事象を得るステップ(b)
と、複数の事象の個々に対し、その事象の次に現れる各
事象の発生頻度を検出するステップ(c)と、各事象の
発生頻度に応じて、所望のデータ列を前のデータ列の状
態に応じて符号化する際に使用するテーブルデータを生
成してメモリに記憶するステップ(d)とからなるもの
である。
Further, the encoding table generating method of the present invention comprises:
(A) converting a predetermined digital signal into a continuous data sequence consisting of continuous zero coefficients and non-zero coefficients; and, from the data sequence, a series of zero coefficients having a predetermined run length and a series of zero coefficients. Obtaining a plurality of events consisting of at least one non-zero coefficient connected before or after (b)
(C) detecting, for each of a plurality of events, the frequency of occurrence of each event appearing next to the event; and, in accordance with the frequency of occurrence of each event, changing a desired data sequence to the state of the previous data sequence. (D) of generating table data to be used when encoding according to the above and storing the table data in a memory.

【0019】また本発明ディジタル信号の符号化方法
は、所定のディジタル信号を、連続する零係数と、非零
係数とで連なるデータ列に変換するステップ(a)と、
データ列から、所定のランレングスを有する零係数の連
続と、零係数の連続の前または後に連なる少なくとも1
つの非零係数とでなる複数の事象を得るステップ(b)
と、複数の事象の個々に対し、その事象の次に現れる各
事象の発生頻度を検出するステップ(c)と、ステップ
(c)で得た各事象の発生頻度に応じて、所望のデータ
列を前のデータ列の状態に応じて符号化する際に使用す
るテーブルデータを生成してメモリに記憶するステップ
(d)と、任意のディジタル信号を、連続する零係数
と、非零係数とで連なるデータ列に変換するステップ
(e)と、ステップ(e)で得たデータ列から、各事象
を得るステップ(f)と、テーブルデータを基に、ステ
ップ(f)で得た複数の事象に対して、1つの符号語を
決定するステップ(g)とからなるものである。
The method of encoding a digital signal according to the present invention further comprises the step of: (a) converting a predetermined digital signal into a data string that is continuous with continuous zero coefficients and non-zero coefficients;
From the data sequence, a series of zero coefficients having a predetermined run length and at least one of the series of zero coefficients before or after the series of zero coefficients.
Obtaining a plurality of events having two non-zero coefficients (b)
(C) detecting, for each of the plurality of events, the frequency of occurrence of each event appearing next to the event, and a desired data string according to the frequency of occurrence of each event obtained in step (c). (D) generating table data to be used when encoding is performed in accordance with the state of the previous data string and storing the table data in a memory; and converting an arbitrary digital signal into continuous zero coefficients and non-zero coefficients. Step (e) of converting into a continuous data string, step (f) of obtaining each event from the data string obtained in step (e), and a plurality of events obtained in step (f) based on the table data. (G) determining one codeword.

【0020】また本発明符号化装置は、ディジタル信号
を、連続する零係数と、非零係数とで連なるデータ列に
変換する変換手段2及び3と、所定のランレングスを有
する零係数の連続と、零係数の連続の前または後に連な
る少なくとも1つの非零係数とでなる複数の事象に対
し、夫々次にくる事象に対して与える符号語を表す複数
のテーブルデータを記憶してなる記憶手段4aと、デー
タ列から複数の事象を得て、テーブルデータを基に、複
数の事象に対して、夫々1つの符号語を与える符号化手
段4からなるものである。
The encoding apparatus according to the present invention further comprises conversion means 2 and 3 for converting a digital signal into a data sequence that is continuous with continuous zero coefficients and non-zero coefficients, and a series of zero coefficients having a predetermined run length. Storage means 4a for storing, for a plurality of events consisting of at least one non-zero coefficient before or after the series of zero coefficients, a plurality of table data representing code words to be given to the following events, respectively. And encoding means 4 which obtains a plurality of events from the data sequence and gives one code word to each of the plurality of events based on the table data.

【0021】また本発明ディジタル信号の符号化方法
は、所定のディジタル信号を、連続する零係数と、非零
係数とで連なるデータ列に変換するステップ(a)と、
非零係数を、その値に応じて複数のグループに分類する
ステップ(b)と、データ列から、所定のランレングス
を有する零係数の連続と、零係数の連続の前または後に
連なる少なくとも1つの非零係数とでなる複数の事象を
得るステップ(c)と、夫々の事象に対して、1つ前の
事象におけるグループ毎に符号語を与えるテーブルデー
タを基に、複数の事象に対して、夫々1つの符号語を決
定するステップ(d)からなるものである。
The digital signal encoding method according to the present invention further comprises the steps of: (a) converting a predetermined digital signal into a data string that is continuous with continuous zero coefficients and non-zero coefficients;
(B) classifying the non-zero coefficients into a plurality of groups according to their values; and, from the data sequence, a series of zero coefficients having a predetermined run length, and at least one continuous series before or after the series of zero coefficients. (C) obtaining a plurality of events having non-zero coefficients, and for each event, for a plurality of events, based on table data giving a codeword for each group in the immediately preceding event, It comprises the step (d) of determining one code word each.

【0022】更に本発明ディジタル信号の符号化方法は
上述において、ステップ(d)において、更にグループ
内における順位情報を符号語に付加するようにしたもの
である。
Further, in the digital signal encoding method of the present invention, in step (d), the order information in the group is further added to the code word in the step (d).

【0023】また本発明ディジタル信号の符号化方法は
所定のディジタル信号を、連続する零係数と、非零係数
とで連なるデータ列に変換するステップ(a)と、デー
タ列から、所定のランレングスを有する零係数と、零係
数の連続の前または後に連なる少なくとも1つの非零係
数とでなる複数の事象を得るステップ(b)と、非零係
数を、その値に応じて複数のグループに分類するステッ
プ(c)と、各グループに対し、その次に現れる各事象
の発生頻度を検出するステップ(d)と、各事象の発生
頻度に応じて、所望のデータ列を前データ列の状態に応
じて符号化する際に使用するテーブルデータを生成して
メモリに記憶するステップ(e)と、任意のディジタル
信号を、連続する零係数と、非零係数とで連なるデータ
列に変換するステップ(f)と、ステップ(f)で得た
データ列から、各事象を得るステップ(g)と、テーブ
ルデータを基に、ステップ(g)で得た複数の事象に対
して、夫々1つの符号語を決定するステップ(h)とか
らなるものである。
The method of encoding a digital signal according to the present invention further comprises the steps of: (a) converting a predetermined digital signal into a data string that is continuous with continuous zero coefficients and non-zero coefficients; (B) obtaining a plurality of events consisting of a zero coefficient having at least one non-zero coefficient before or after the continuation of the zero coefficient, and classifying the non-zero coefficients into a plurality of groups according to their values. (C), detecting the occurrence frequency of each event appearing next to each group (d), and changing the desired data sequence to the state of the previous data sequence according to the occurrence frequency of each event. (E) generating table data to be used when encoding according to the data and storing the data in a memory; and converting an arbitrary digital signal into a continuous data sequence of continuous zero coefficients and non-zero coefficients. (F), a step (g) for obtaining each event from the data sequence obtained in the step (f), and a plurality of events obtained in the step (g) based on the table data. (H) determining a codeword.

【0024】また本発明符号化装置は、ディジタル信号
を、連続する零係数と、非零係数とで連なるデータ列に
変換する変換手段2及び3と、非零係数を、その値に応
じて複数のグループに分類する分類手段4と、所定のラ
ンレングスを有する零係数の連続と、零係数の連続の前
または後に連なる少なくとも1つの非零係数とでなる複
数の事象に対し、夫々のグループに応じて夫々次にくる
事象に対して与える符号語を表す複数のテーブルデータ
を記憶してなる記憶手段4aと、データ列から複数の事
象を得て、テーブルデータを基に、複数の事象に対し
て、夫々1つの符号語を与える符号化手段4とからなる
ものである。
The encoding apparatus according to the present invention further comprises conversion means 2 and 3 for converting a digital signal into a continuous data sequence of continuous zero coefficients and non-zero coefficients, and a plurality of non-zero coefficients corresponding to the values. Classifying means 4 for classifying a plurality of events having a continuous run of zero coefficients having a predetermined run length and at least one non-zero coefficient connected before or after the run of zero coefficients. A storage means 4a for storing a plurality of table data representing codewords to be given to the next event in response to the plurality of events from a data string, And encoding means 4 for giving one code word each.

【0025】また本発明符号化装置は、ディジタル信号
を、所定の形態のデータ列に変換する変換手段2および
3と、所定の形態のデータ列における複数の事象に対
し、夫々次にくる事象に対して与える符号語を表す複数
のテーブルデータを記憶してなる記憶手段4aと、デー
タ列から複数の事象を得て、テーブルデータを基に、複
数の事象に対して、夫々1つの符号語を与える符号化手
段4からなるものである。また本発明符号化方法は、デ
ィジタル信号を、所定の形態のデータ列に変換する変換
ステップと、所定の形態のデータ列における複数の事象
に対し、夫々次にくる事象に対して与える符号語を表す
複数のテーブルデータを記憶してなる記憶ステップと、
データ列から複数の事象を得て、テーブルデータを基
に、複数の事象に対して、夫々1つの符号語を与える符
号化ステップからなるものである。
Further, the encoding apparatus of the present invention includes conversion means 2 and 3 for converting a digital signal into a data stream in a predetermined form, and a plurality of events in the data stream in a predetermined form.
And a plurality of codewords to be given to the next event
Formed by storing the table data storing means 4a, Day
Multiple events are obtained from the data sequence, and multiple events are
It comprises encoding means 4 for giving one code word to each of a number of events . The encoding method of the present invention
Conversion of a digital signal into a data stream of a predetermined format
Steps and multiple events in a given sequence of data
Represents the code word given to the next event
A storage step for storing a plurality of table data;
Obtain multiple events from a data string and
, A code that gives one codeword for each of multiple events
It consists of an encryption step.

【0026】[0026]

【作用】上述せる本発明ディジタル信号の符号化方法に
よれば、ステップ(a)においてディジタル信号を、連
続する零係数と、非零係数とで連なるデータ列に変換
し、ステップ(b)においてデータ列から、所定のラン
レングスを有する零係数の連続と、零係数の連続の前ま
たは後に連なる少なくとも1つの非零係数とでなる複数
の事象を得、ステップ(c)において1つ前の事象毎に
応じて、各事象に対して異なる符号語を与えるテーブル
データを基に、複数の事象に対して、1つの符号語を設
定する。
According to the digital signal encoding method of the present invention described above, in step (a), the digital signal is converted into a continuous data sequence consisting of continuous zero coefficients and non-zero coefficients. From the sequence, a plurality of events consisting of a series of zero coefficients having a predetermined run length and at least one non-zero coefficient before or after the series of zero coefficients are obtained. , One code word is set for a plurality of events based on table data that gives a different code word to each event.

【0027】また上述せる本発明符号化用テーブル生成
方法によれば、ステップ(a)において所定のディジタ
ル信号を、連続する零係数と、非零係数とで連なるデー
タ列に変換し、ステップ(b)においてデータ列から、
所定のランレングスを有する零係数の連続と、零係数の
連続の前または後に連なる少なくとも1つの非零係数と
でなる複数の事象を得、ステップ(c)において複数の
事象の個々に対し、その事象の次に現れる各事象の発生
頻度を検出し、ステップ(d)において各事象の発生頻
度に応じて、所望のデータ列を前のデータ列の状態に応
じて符号化する際に使用するテーブルデータを生成して
メモリに記憶する。
According to the encoding table generating method of the present invention described above, in step (a), the predetermined digital signal is converted into a continuous data sequence of continuous zero coefficients and non-zero coefficients. )
Obtaining a plurality of events consisting of a series of zero coefficients having a predetermined run length and at least one non-zero coefficient before or after the series of zero coefficients, and in step (c), for each of the plurality of events, A table used to detect the occurrence frequency of each event appearing next to the event and to encode a desired data sequence in step (d) according to the occurrence frequency of each event according to the state of the previous data sequence Generate data and store it in memory.

【0028】また上述せる本発明ディジタル信号の符号
化方法によれば、ステップ(a)において所定のディジ
タル信号を、連続する零係数と、非零係数とで連なるデ
ータ列に変換し、ステップ(b)においてデータ列か
ら、所定のランレングスを有する零係数の連続と、零係
数の連続の前または後に連なる少なくとも1つの非零係
数とでなる複数の事象を得、ステップ(c)において複
数の事象の個々に対し、その事象の次に現れる各事象の
発生頻度を検出し、ステップ(d)においてステップ
(c)で得た各事象の発生頻度に応じて、所望のデータ
列を前のデータ列の状態に応じて符号化する際に使用す
るテーブルデータを生成してメモリに記憶し、ステップ
(e)において任意のディジタル信号を、連続する零係
数と、非零係数とで連なるデータ列に変換し、ステップ
(f)においてステップ(e)で得たデータ列から、各
事象を得、ステップ(g)においてテーブルデータを基
に、ステップ(f)で得た複数の事象に対して、1つの
符号語を決定する。
According to the above-described digital signal encoding method of the present invention, in step (a), a predetermined digital signal is converted into a continuous data sequence of continuous zero coefficients and non-zero coefficients. In step (c), a plurality of events consisting of a series of zero coefficients having a predetermined run length and at least one non-zero coefficient before or after the series of zero coefficients are obtained. , The occurrence frequency of each event appearing next to the event is detected, and in step (d), a desired data string is replaced with the previous data string according to the occurrence frequency of each event obtained in step (c). Table data to be used for encoding according to the state is generated and stored in a memory, and in step (e), an arbitrary digital signal is linked with a continuous zero coefficient and a non-zero coefficient. In step (f), each event is obtained from the data string obtained in step (e), and in step (g), a plurality of events obtained in step (f) are obtained based on the table data. On the other hand, one codeword is determined.

【0029】また上述せる本発明符号化装置の構成によ
れば、変換手段2及び3でディジタル信号を、連続する
零係数と、非零係数とで連なるデータ列に変換し、所定
のランレングスを有する零係数の連続と、零係数の連続
の前または後に連なる少なくとも1つの非零係数とでな
る複数の事象に対し、夫々次にくる事象に対して与える
符号語を表す複数のテーブルデータを記憶手段4aに記
憶し、符号化手段4でデータ列から複数の事象を得て、
テーブルデータを基に、複数の事象に対して、夫々1つ
の符号語を与える。
According to the configuration of the encoding apparatus of the present invention described above, the conversion means 2 and 3 convert the digital signal into a continuous data sequence of continuous zero coefficients and non-zero coefficients, and a predetermined run length is obtained. For a plurality of events consisting of a series of zero coefficients and at least one non-zero coefficient preceding or following the series of zero coefficients, a plurality of table data representing a code word to be given to each of the following events is stored. Means 4a, and a plurality of events are obtained from the data sequence by the encoding means 4,
One codeword is assigned to each of a plurality of events based on the table data.

【0030】また上述せる本発明ディジタル信号の符号
化方法によれば、ステップ(a)において所定のディジ
タル信号を、連続する零係数と、非零係数とで連なるデ
ータ列に変換し、ステップ(b)において非零係数を、
その値に応じて複数のグループに分類し、ステップ
(c)においてデータ列から、所定のランレングスを有
する零係数の連続と、零係数の連続の前または後に連な
る少なくとも1つの非零係数とでなる複数の事象を得、
ステップ(d)において夫々の事象に対して、1つ前の
事象におけるグループ毎に符号語を与えるテーブルデー
タを基に、複数の事象に対して、夫々1つの符号語を決
定する。
According to the digital signal encoding method of the present invention described above, in step (a), the predetermined digital signal is converted into a continuous data sequence consisting of continuous zero coefficients and non-zero coefficients. ), The non-zero coefficient is
According to the value, the data is classified into a plurality of groups. In step (c), the data sequence is divided into a series of zero coefficients having a predetermined run length and at least one non-zero coefficient connected before or after the series of zero coefficients. Multiple events,
In step (d), one codeword is determined for each of a plurality of events based on table data that provides a codeword for each group in the previous event for each event.

【0031】更に上述において本発明ディジタル信号の
符号化方法によれば、ステップ(d)において、更にグ
ループ内における順位情報を符号語に付加する。
Further, according to the digital signal encoding method of the present invention described above, in step (d), the order information in the group is further added to the code word.

【0032】また上述せる本発明ディジタル信号の符号
化方法によれば、ステップ(a)において所定のディジ
タル信号を、連続する零係数と、非零係数とで連なるデ
ータ列に変換し、ステップ(b)においてデータ列か
ら、所定のランレングスを有する零係数と、零係数の連
続の前または後に連なる少なくとも1つの非零係数とで
なる複数の事象を得、ステップ(c)において非零係数
を、その値に応じて複数のグループに分類し、ステップ
(d)において各グループに対し、その次に現れる各事
象の発生頻度を検出し、ステップ(e)において各事象
の発生頻度に応じて、所望のデータ列を前データ列の状
態に応じて符号化する際に使用するテーブルデータを生
成してメモリに記憶し、ステップ(f)において任意の
ディジタル信号を、連続する零係数と、非零係数とで連
なるデータ列に変換し、ステップ(g)においてステッ
プ(f)で得たデータ列から、各事象を得、ステップ
(h)においてテーブルデータを基に、ステップ(g)
で得た複数の事象に対して、夫々1つの符号語を決定す
る。
According to the above-described digital signal encoding method of the present invention, in step (a), a predetermined digital signal is converted into a continuous data sequence of continuous zero coefficients and non-zero coefficients. ), From the data sequence, a plurality of events consisting of a zero coefficient having a predetermined run length and at least one non-zero coefficient before or after the continuation of the zero coefficient are obtained. In step (c), the non-zero coefficient is obtained by: In step (d), the frequency of occurrence of each event that appears next is detected for each group, and in step (e), a desired frequency is determined according to the frequency of occurrence of each event. Table data to be used when encoding the data sequence according to the state of the previous data sequence is generated and stored in the memory. In step (f), an arbitrary digital signal is In the step (g), each event is obtained from the data string obtained in the step (f). In the step (h), based on the table data, Step (g)
One code word is determined for each of the plurality of events obtained in step (1).

【0033】また上述せる本発明符号化装置の構成によ
れば、変換手段2及び3でディジタル信号を、連続する
零係数と、非零係数とで連なるデータ列に変換し、分類
手段4により非零係数を、その値に応じて複数のグルー
プに分類し、所定のランレングスを有する零係数の連続
と、零係数の連続の前または後に連なる少なくとも1つ
の非零係数とでなる複数の事象に対し、夫々のグループ
に応じて夫々次にくる事象に対して与える符号語を表す
複数のテーブルデータを記憶手段4aに記憶し、符号化
手段4でデータ列から複数の事象を得て、テーブルデー
タを基に、複数の事象に対して、夫々1つの符号語を与
える。
Further, according to the configuration of the encoding apparatus of the present invention described above, the converting means 2 and 3 convert the digital signal into a continuous data sequence of continuous zero coefficients and non-zero coefficients, The zero coefficients are classified into a plurality of groups according to their values, and are classified into a plurality of events including a series of zero coefficients having a predetermined run length and at least one non-zero coefficient before or after the series of zero coefficients. On the other hand, a plurality of table data representing a code word to be given to the next event according to each group is stored in the storage unit 4a, and a plurality of events are obtained from the data sequence by the encoding unit 4 to obtain the table data. , One code word is assigned to each of a plurality of events.

【0034】また上述せる本発明符号化装置の構成によ
れば、変換手段2および3でディジタル信号を、所定の
形態のデータ列に変換し、所定の形態のデータ列におけ
る複数の事象に対し、夫々次にくる事象に対して与える
符号語を表す複数のテーブルデータを記憶手段4aに
憶し、符号化手段4でデータ列から複数の事象を得て、
テーブルデータを基に、複数の事象に対して、夫々1つ
の符号語を与えるまた上述せる本発明符号化方法の構
成によれば、ディジタル信号を、所定の形態のデータ列
に変換し、所定の形態のデータ列における複数の事象に
対し、夫々次にくる事象に対して与える符号語を表す複
数のテーブルデータを記憶し、データ列から複数の事象
を得て、テーブルデータを基に、複数の事象に対して、
夫々1つの符号語を与える。
Further, according to the configuration of the encoding apparatus of the present invention described above, the conversion means 2 and 3 convert the digital signal into a data stream of a predetermined form and convert the digital signal into a data stream of a predetermined form.
Given to multiple events that occur next
Serial multiple table data representing the codeword storage unit 4a
The encoding means 4 obtains a plurality of events from the data sequence,
One for each of multiple events based on table data
Gives the code word of The structure of the encoding method of the present invention described above is also described.
According to the configuration, a digital signal is converted into a data stream of a predetermined form.
Into multiple events in the data stream of the specified form.
On the other hand, a compound representing the code word given to the next event
Stores a number of table data and allows multiple events
And based on the table data, for multiple events,
Each gives one codeword.

【0035】[0035]

【実施例】以下に、図1及び図2を参照して本発明ディ
ジタル信号の符号化方法、符号化テーブル生成方法、符
号化装置及び符号化方法の一実施例について詳細に説明
する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of a digital signal encoding method, an encoding table generating method, an encoding apparatus and an encoding method according to the present invention will be described below in detail with reference to FIGS.

【0036】先ず、図1を参照して本発明ディジタル信
号の符号化方法、符号化装置、符号化方法を適用した高
能率符号化装置について説明する。図1Aは高能率符号
化装置のエンコーダを示し、図1Bは高能率符号化装置
のデコーダを示す。
First, an encoding method, an encoding device, and a high-efficiency encoding device to which the encoding method of the present invention is applied will be described with reference to FIG. FIG. 1A shows an encoder of the high-efficiency encoder, and FIG. 1B shows a decoder of the high-efficiency encoder.

【0037】先ず、図1Aを参照してエンコーダについ
て説明する。図1Aにおいて、1は例えばディジタルV
TR等の電子機器本体回路からの変換すべき画像データ
等が供給される入力端子で、この入力端子1を介して画
像データが変換回路2に供給される。
First, the encoder will be described with reference to FIG. 1A. In FIG. 1A, 1 is a digital V
An input terminal to which image data or the like to be converted from an electronic device main body circuit such as a TR is supplied. Image data is supplied to the conversion circuit 2 via the input terminal 1.

【0038】この変換回路2は、例えば離散コサイン変
換(DCT)回路であり、入力端子1を介して供給され
る画像データをブロック毎に余弦関数のみを用いて離散
変換処理を行い、上述したように、直流成分から高次交
流成分までの係数データを得る。ここで考えられる直交
変換としては、例えばフーリエ変換、アダマール変換、
カルーネン・レーベ変換が考えられるが、フーリエ変換
は複素数演算を含み、構成が複雑となる。また、直交変
換以外の変換方式としては、例えば傾斜変換(スラント
変換)やハール変換も考えられる。この例においては、
高速演算アルゴリズムが存在し、画像の実時間変換を可
能とする1チップLSIでの実現が可能であり、更に符
号化効率に直接影響する低周波成分への電力集中度に優
れるDCTを用いる。
The transform circuit 2 is, for example, a discrete cosine transform (DCT) circuit, and performs a discrete transform process on the image data supplied via the input terminal 1 for each block using only the cosine function. Next, coefficient data from a DC component to a higher-order AC component is obtained. As the orthogonal transform considered here, for example, a Fourier transform, a Hadamard transform,
The Karhunen-Loeve transform is conceivable, but the Fourier transform involves complex arithmetic and the configuration is complicated. Further, as a conversion method other than the orthogonal transformation, for example, a gradient transformation (slant transformation) or a Haar transformation can be considered. In this example,
A DCT that has a high-speed operation algorithm, can be realized by a one-chip LSI that enables real-time conversion of an image, and has excellent power concentration on low-frequency components that directly affects coding efficiency is used.

【0039】画像データはこの変換回路2において変換
処理されて係数データにされ、量子化回路3に供給され
る。この量子化回路3は変換回路2からの係数データを
量子化する。この量子化された係数データは可変長符号
化回路4に供給される。可変長符号化回路4は量子化回
路3からの係数データに対し、図24を参照して説明し
たように走査(ジグザグスキャン)して符号化する。そ
して符号化範囲内とした係数データを例えば図4に示す
ように1列に並べ、1列に並べた係数データをハフマン
符号化の手法により符号化する。
The image data is converted by the conversion circuit 2 into coefficient data and supplied to the quantization circuit 3. The quantization circuit 3 quantizes the coefficient data from the conversion circuit 2. The quantized coefficient data is supplied to the variable length coding circuit 4. The variable length coding circuit 4 scans (zigzag scans) the coefficient data from the quantization circuit 3 as described with reference to FIG. Then, the coefficient data within the coding range is arranged in one line as shown in FIG. 4, for example, and the coefficient data arranged in one line is encoded by the Huffman coding technique.

【0040】本例においては、1列に並べた係数データ
を符号化するために条件系列に応じたテーブルを複数用
意し、ある係数データを符号化しようとするとき、その
係数データの前の係数データの条件に対応したテーブル
を選択し、選択したテーブルを参照して符号化するよう
にする。変換符号化においては、変換後の係数は互いに
相関を持っているので、これを利用して符号化すれば符
号化効率を大幅に向上させることができる。
In this example, a plurality of tables corresponding to the condition series are prepared in order to encode coefficient data arranged in one column, and when a certain coefficient data is to be encoded, the coefficient before the coefficient data is set. A table corresponding to the data condition is selected, and encoding is performed with reference to the selected table. In the transform coding, since the coefficients after the transform have a correlation with each other, the coding efficiency can be greatly improved by performing the coding using the coefficients.

【0041】図2はこのようなテーブルを作成するため
のものであり、本発明符号化用テーブル生成方法を適用
したハフマンテーブル生成装置である。
FIG. 2 is for creating such a table, and is a Huffman table generating apparatus to which the encoding table generating method of the present invention is applied.

【0042】図2において、11は例えば所定のサイク
ルで同一の内容の映像信号が供給される入力端子で、外
部からの映像信号はこの入力端子11を介して変換回路
12に供給される。この変換回路12は入力端子11を
介して外部から供給される映像信号に例えばDCT(離
散コサイン変換)等の変換処理を施し、変換処理を施し
た映像信号を量子化回路13に供給する。
In FIG. 2, reference numeral 11 denotes an input terminal to which video signals having the same contents are supplied, for example, in a predetermined cycle. An external video signal is supplied to the conversion circuit 12 via the input terminal 11. The conversion circuit 12 performs a conversion process such as DCT (Discrete Cosine Transform) on a video signal supplied from the outside via the input terminal 11, and supplies the converted video signal to the quantization circuit 13.

【0043】量子化回路13は変換回路12からの変換
出力、即ち、係数データを量子化し、ハフマン符号化回
路14に供給する。ハフマン符号化回路14は量子化回
路13からの量子化された係数データをメモリ16に記
憶されているテーブルを参照してハフマン符号化すると
共に、総符号長データを量子化回路13に供給する。こ
の総符号長データは量子化回路13での量子化の粗さを
変更するためのものである。ここで、メモリ16は図示
せずも、読みだし、書き込み回路と例えばDRAM(ダ
イナミックRAM)やSRAM(スタティックRAM)
等のメモリ回路から構成する。
The quantization circuit 13 quantizes the conversion output from the conversion circuit 12, that is, the coefficient data, and supplies it to the Huffman coding circuit 14. The Huffman encoding circuit 14 performs Huffman encoding on the quantized coefficient data from the quantization circuit 13 with reference to a table stored in the memory 16, and supplies the total code length data to the quantization circuit 13. The total code length data is for changing the roughness of the quantization in the quantization circuit 13. Here, although not shown, the memory 16 is a read / write circuit and, for example, a DRAM (dynamic RAM) or an SRAM (static RAM).
And the like.

【0044】一方、量子化回路13からの係数データは
発生頻度検出回路15にも供給される。この発生頻度検
出回路15は量子化回路13からの係数データについて
発生頻度を検出し、その結果に基いてハフマン符号化を
行うためのテーブルを生成し、生成したテーブルデータ
をメモリ16に供給する。
On the other hand, the coefficient data from the quantization circuit 13 is also supplied to the occurrence frequency detection circuit 15. The occurrence frequency detection circuit 15 detects the occurrence frequency of the coefficient data from the quantization circuit 13, generates a table for performing Huffman coding based on the detection result, and supplies the generated table data to the memory 16.

【0045】次に、図2に示したハフマンテーブル生成
装置の動作について説明する。入力端子11には例えば
所定長のテーブル作成用の映像信号が繰り返して供給さ
れる。また、メモリ16には初期値としてランダムに選
択されたテーブルが発生頻度検出回路15から予めロー
ドされている。
Next, the operation of the Huffman table generation device shown in FIG. 2 will be described. For example, a video signal of a predetermined length for table creation is repeatedly supplied to the input terminal 11. In addition, a table randomly selected as an initial value is previously loaded from the occurrence frequency detection circuit 15 into the memory 16.

【0046】量子化回路13は入力端子11からの所定
長のテーブル作成用映像信号を例えばハフマン符号化回
路14からの初期制御による粗さで量子化し、量子化し
た係数データをハフマン符号化回路14及び発生頻度検
出回路15に夫々供給する。ハフマン符号化回路14は
メモリ16から初期値としてロードされているテーブル
に応じて係数データを符号化する。
The quantizing circuit 13 quantizes the table-producing video signal of a predetermined length from the input terminal 11 by, for example, the roughness by the initial control from the Huffman encoding circuit 14, and quantizes the coefficient data into the Huffman encoding circuit 14. And to the occurrence frequency detection circuit 15 respectively. The Huffman coding circuit 14 codes the coefficient data according to a table loaded as an initial value from the memory 16.

【0047】一方、発生頻度検出回路15は量子化回路
13からの係数データの発生頻度を検出し、その検出結
果に基いて新たなテーブルを作成し、作成した新たなテ
ーブルをメモリ16にロードする。
On the other hand, the occurrence frequency detection circuit 15 detects the occurrence frequency of the coefficient data from the quantization circuit 13, creates a new table based on the detection result, and loads the created new table into the memory 16. .

【0048】ここでいう条件系列とは、「0ラン、値
(係数値)」である。また、ここでいう発生頻度の検出
とは、条件系列毎に0ランと値の組の発生確率を求める
ことである。そしてこの発生確率を用いて、ハフマンの
方法に従って条件系列毎の符号の組を作成する。この方
法としては周知のように、シンボル(0ランと値の組)
をその生起確率の大きいものから順に並べ、出現確率が
最も小さいシンボルと2番目に小さいシンボルに任意に
“1”及び“0”を割り当て、これら2つのシンボルを
併せて1つのシンボルと考え、合併したシンボルの生起
確率を合併する前の生起確率の和とすることによってシ
ンボルの数を1つ減少させ、これを新たな情報源と考
え、再びそのシンボルを生起確率の大きいものから順に
並べ直すという処理をシンボルが“1”になるまで繰り
返し、シンボルが“1”になったら各シンボルに対して
最初にシンボルに割り当てた“1”及び“0”を逆の順
序で読み出し、これをそのシンボルに対する符号語とす
ることである。
The condition series referred to here is “0 run, value (coefficient value)”. In addition, the detection of the occurrence frequency as referred to herein means finding the occurrence probability of a set of 0 run and value for each condition series. Then, using this occurrence probability, a set of codes for each condition sequence is created according to the Huffman method. As a well-known method, a symbol (a set of 0 run and value) is used.
Are arranged in ascending order of their occurrence probabilities, and “1” and “0” are arbitrarily assigned to the symbol having the smallest appearance probability and the symbol having the second smallest occurrence probability. The number of symbols is reduced by one by taking the occurrence probabilities of the determined symbols as the sum of the occurrence probabilities before merging, and this is considered as a new information source, and the symbols are rearranged again in descending order of occurrence probability. The process is repeated until the symbol becomes "1", and when the symbol becomes "1", "1" and "0" assigned to the symbol for each symbol are read out in reverse order, and this is read out for that symbol. Code word.

【0049】一般的にDCTのブロック内の係数の絶対
値は、1つが大きいときには、他の係数も大きく、1つ
が小さいときには、他の係数も小さい傾向にあり、互い
に相関がある。つまり、条件系列によって、0ランと値
の組の出現頻度も変化し、これを利用して可変長符号を
割り当てることで全体の符号長を更に短く抑えることが
できるのである。
Generally, the absolute value of a coefficient in a DCT block tends to be large when one is large, the other coefficient is also large when one is small, and the other coefficient is also small when one is small. That is, the appearance frequency of the set of 0 run and value also changes depending on the condition series, and by using this to assign a variable length code, the entire code length can be further reduced.

【0050】この新たなテーブルがメモリ16にロード
されると、ハフマン符号化回路14はそのテーブルを参
照して量子化回路13からの係数データを符号化すると
共に総符号長データを量子化回路13に供給して量子化
回路13における量子化の粗さを変更させる。そして以
下同様に所定長のテーブル作成用データに対して変更し
たテーブルに基いて符号化を行い、この符号化で得られ
た総符号長データを量子化回路13に供給して量子化の
粗さを変え、発生頻度を検出して新たなテーブルを作成
し、これを用いて符号化を行うという動作を繰り返して
上述したような条件系列に対応した符号化用のテーブル
を多数作成する。
When this new table is loaded into the memory 16, the Huffman encoding circuit 14 encodes the coefficient data from the quantization circuit 13 with reference to the table, and encodes the total code length data into the quantization circuit 13. To change the roughness of the quantization in the quantization circuit 13. In the same manner, encoding is performed based on the changed table with respect to the table creation data of a predetermined length, and the total code length data obtained by this encoding is supplied to the quantization circuit 13 and the quantization roughness is calculated. Is changed, the frequency of occurrence is detected, a new table is created, and encoding is performed using this table. By repeating this operation, a large number of encoding tables corresponding to the above-described condition series are created.

【0051】作成したテーブルデータは、図1Aに示し
た高能率符号化装置のエンコーダの可変長符号化回路4
のメモリ4a、例えばEEPROM、バックアップ機能
付きRAM、PROM、ワンタイムROM等に記憶させ
る。この記憶のし方としては、メモリ4aにデータを書
き込む装置でテーブルデータを書き込み、テーブルデー
タを書き込んだメモリ4aを可変長符号化回路4に搭載
する方法と、図1に示したハフマンテーブル生成装置か
らテーブルデータを可変長符号化回路4のメモリ4aに
ロードする方法の何れかを採用することが可能である。
The created table data is stored in the variable length coding circuit 4 of the encoder of the high efficiency coding apparatus shown in FIG. 1A.
, For example, an EEPROM, a RAM with a backup function, a PROM, a one-time ROM, and the like. As a method of storing the data, a method of writing table data by a device for writing data to the memory 4a and mounting the memory 4a in which the table data is written on the variable length coding circuit 4 and a method of generating the Huffman table shown in FIG. To load the table data into the memory 4a of the variable-length coding circuit 4 from.

【0052】図3は図2に示したハフマンテーブル生成
装置の具体的構成例を示す構成図である。この図3にお
いて図2と対応する部分には同一符号を付し、その詳細
説明を省略する。
FIG. 3 is a configuration diagram showing a specific configuration example of the Huffman table generation device shown in FIG. 3, parts corresponding to those in FIG. 2 are denoted by the same reference numerals, and detailed description thereof will be omitted.

【0053】図において、17は制御部17a及びRO
M17bからなるコントローラであり、このコントロー
ラ17のROM17bには上述したデフォルト値として
のテーブルデータが記憶されている。制御部17aは例
えば電源オン時、或いは図示しないリセットスイッチが
押された場合にスイッチ18に切り換え制御信号を供給
し、スイッチ18の可動接点18cを一方の固定接点1
8aに接続させる。
In the figure, reference numeral 17 denotes a control unit 17a and RO
The controller 17 is composed of M17b, and the ROM 17b of the controller 17 stores the table data as the above-described default value. For example, when the power is turned on or when a reset switch (not shown) is pressed, the control unit 17a supplies a switch control signal to the switch 18 and sets the movable contact 18c of the switch 18 to one fixed contact 1
8a.

【0054】このスイッチ18の可動接点18cはハフ
マン符号化回路14の入力端に接続され、このスイッチ
18の他方の固定接点18bはメモリ16の出力端に接
続されている。従って、スイッチ18cの可動接点18
cが一方の固定接点18aに接続されると、ROM17
bに記憶されているデフォルト値としてのテーブルデー
タがスイッチ18を介してハフマン符号化回路14にロ
ードされ、スイッチ18の可動接点18cが他方の固定
接点18bに接続されると、メモリ16に記憶されてい
る生成されたテーブルデータがハフマン符号化回路14
にロードされる。
The movable contact 18c of the switch 18 is connected to the input terminal of the Huffman encoding circuit 14, and the other fixed contact 18b of the switch 18 is connected to the output terminal of the memory 16. Therefore, the movable contact 18 of the switch 18c
c is connected to one fixed contact 18a, the ROM 17
b is loaded into the Huffman encoding circuit 14 via the switch 18, and when the movable contact 18c of the switch 18 is connected to the other fixed contact 18b, the table data is stored in the memory 16. The generated table data is stored in the Huffman encoding circuit 14.
Is loaded.

【0055】電源をオンした時点、或いはリセットした
時点ではコントローラ17の制御部17aによってスイ
ッチ18の可動接点18cが一方の固定接点18aに接
続されるので、ROM17bからのデフォルト値として
のテーブルデータがハフマン符号化回路14に供給され
る。ハフマン符号化回路14は供給されたテーブルを参
照して量子化回路13からの係数データを符号化すると
共に総符号長データを量子化回路13に供給して量子化
回路13における量子化の粗さを変更させる。
When the power is turned on or reset, the controller 17a of the controller 17 connects the movable contact 18c of the switch 18 to one of the fixed contacts 18a. It is supplied to the encoding circuit 14. The Huffman encoding circuit 14 encodes the coefficient data from the quantization circuit 13 with reference to the supplied table, and supplies the total code length data to the quantization circuit 13 so that the roughness of the quantization in the quantization circuit 13 is reduced. To change.

【0056】そして新たなテーブルがメモリ16にロー
ドされると、制御部17aはスイッチ18の可動接点1
8cを他方の固定接点18bに接続させるので、メモリ
16からの新たなテーブルデータがハフマン符号化回路
14に供給される。ハフマン符号化回路14はそのテー
ブルを参照して量子化回路13からの係数データを符号
化すると共に総符号長データを量子化回路13に供給し
て量子化回路13における量子化の粗さを変更させる。
そして以下同様に所定長のテーブル作成用データに対し
て変更したテーブルに基いて符号化を行い、この符号化
で得られた総符号長データを量子化回路13に供給して
量子化の粗さを変え、発生頻度を検出して新たなテーブ
ルを作成し、これを用いて符号化を行うという動作を繰
り返して上述したような条件系列に対応した符号化用の
テーブルを多数作成する。作成したテーブルデータは、
図1Aに示した高能率符号化装置のエンコーダの可変長
符号化回路4の書き込み可能なメモリ4aに記憶させ
る。
When the new table is loaded into the memory 16, the control unit 17a operates the movable contact 1 of the switch 18.
Since 8c is connected to the other fixed contact 18b, new table data from the memory 16 is supplied to the Huffman encoding circuit 14. The Huffman encoding circuit 14 encodes the coefficient data from the quantization circuit 13 with reference to the table and supplies the total code length data to the quantization circuit 13 to change the quantization roughness in the quantization circuit 13. Let it.
In the same manner, encoding is performed based on the changed table with respect to the table creation data of a predetermined length, and the total code length data obtained by this encoding is supplied to the quantization circuit 13 and the quantization roughness is calculated. Is changed, the frequency of occurrence is detected, a new table is created, and encoding is performed using this table. By repeating this operation, a large number of encoding tables corresponding to the above-described condition series are created. The created table data is
It is stored in the writable memory 4a of the variable length coding circuit 4 of the encoder of the high efficiency coding device shown in FIG. 1A.

【0057】上述のようにしてテーブルデータを作成す
るときに考えられる条件としては、0ランの値と、それ
に続く非0の値が考えられる。例として図4に示す1列
に並べた係数データを上述のようにして作成した、条件
系列に応じたテーブルを参照して符号化する場合につい
て説明する。
As a condition considered when the table data is created as described above, a value of 0 run and a value of non-zero following it can be considered. As an example, a case will be described in which coefficient data arranged in one row shown in FIG. 4 is encoded with reference to a table corresponding to a condition series created as described above.

【0058】図4において、DCは直流成分の係数デー
タ(この図の例では“168”である)、AC01〜A
C33は交流成分の係数データで、交流成分の係数デー
タは添えられている番号が大きい程、高次の交流成分と
なっている。この図に示すように、直流成分の係数デー
タDCから高次の交流成分の係数データAC33までを
順に符号1〜符号nに符号化する。また、この図4に示
すように、各係数データを符号化する際、上述したよう
に、連続する“0”とその後に続く値に応じて符号化す
るようにする。また、図24と同様にこの連続する
“0”の個数を示すことばとして、「0ラン」というこ
とばを用いる。例えば「0ラン0」と記述した場合は連
続する“0”(0ラン)の個数が“0”、即ち、“0”
がないことを示す。
In FIG. 4, DC is coefficient data of a direct current component (“168” in the example of this figure), and AC 01 to A
C33 is the coefficient data of the AC component. The larger the number attached to the coefficient data of the AC component, the higher the AC component. As shown in this figure, the components from the DC component coefficient data DC to the higher-order AC component coefficient data AC33 are sequentially encoded into codes 1 to n. Further, as shown in FIG. 4, when encoding each coefficient data, as described above, encoding is performed in accordance with a continuous "0" and a value subsequent thereto. 24, the word "0 run" is used as the word indicating the number of consecutive "0". For example, when "0 run 0" is described, the number of consecutive "0" (0 run) is "0", that is, "0".
Indicates that there is no

【0059】図4においては、交流成分の係数AC22
が“0”、続くAC13が“0”、続くAC23が
“1”であるので、この場合は「0ラン2、値1」とな
る。また、交流成分の係数AC01は“120”である
ので、この場合は「0ラン0、値120」となる。
In FIG. 4, the AC component coefficient AC22
Is "0", the subsequent AC13 is "0", and the subsequent AC23 is "1". In this case, "0 run 2, value 1" is obtained. Further, since the AC component coefficient AC01 is “120”, in this case, it is “0 run 0, value 120”.

【0060】次に、この図4に示す係数データAC10
を符号化する場合について図5を参照して説明する。図
5はAC10の条件系列であるところの「0ラン0、値
“120”の符号」のテーブルを示している。即ち、テ
ーブルはこの図5に示すように、条件系列毎に0ランの
値と係数データの値に対応して符号を割り当てるように
なっている。ここで従来と異なるのは、本例において
は、条件系列に応じてハフマン符号の作成手順に従って
多数のテーブルを作成しておき、ある係数データを符号
化しようとするとき、その係数データの前の係数データ
の条件に基いて多数のテーブルから該当テーブルを選択
し、選択したテーブルを参照して係数データを符号化す
ることである。
Next, the coefficient data AC10 shown in FIG.
Will be described with reference to FIG. FIG. 5 shows a table of “0 run 0, sign of value“ 120 ”” which is a condition series of AC10. That is, as shown in FIG. 5, the table assigns a code corresponding to the value of the 0 run and the value of the coefficient data for each condition series. Here, the difference from the prior art is that, in this example, a large number of tables are created in accordance with the Huffman code creation procedure according to the condition series, and when encoding certain coefficient data, That is, a corresponding table is selected from many tables based on the condition of the coefficient data, and the coefficient data is encoded with reference to the selected table.

【0061】図6は図5を参照して説明した条件系列に
基いて作成したテーブルを、符号化しようとする係数デ
ータの前の係数データの系列で選択し、選択したテーブ
ルを参照して符号化する場合について、図4に示す例に
基いて示した説明図である。
FIG. 6 shows a table created based on the condition series described with reference to FIG. 5 selected by a series of coefficient data before the coefficient data to be coded, and referring to the selected table. FIG. 5 is an explanatory diagram showing a case where the conversion is performed based on the example shown in FIG. 4.

【0062】この図6及び図4に夫々示すように、先
ず、値“120”の係数AC01は交流成分の先頭であ
るから、条件系列がないことになる。従って、交流成分
の先頭の係数においては、現在の値、即ち、0ランの値
と係数の値に対して符号が与えられているテーブル(図
26に示したテーブル)から可変長符号1を得るように
する。
As shown in FIGS. 6 and 4, first, since the coefficient AC01 having the value "120" is the head of the AC component, there is no condition series. Therefore, for the coefficient at the head of the AC component, the variable length code 1 is obtained from the table (the table shown in FIG. 26) in which the code is given to the current value, that is, the value of the 0 run and the value of the coefficient. To do.

【0063】続いて交流成分の係数AC10は“50”
であるが、この係数AC10の前の係数はAC01であ
り、その値は「0ラン0、係数値“120”」であるか
ら、複数のテーブルからこれを条件系列とするテーブル
を選択し、そのテーブルを参照して係数AC10の値
“50”に可変長符号2を与える。
Subsequently, the AC component coefficient AC10 is "50".
However, since the coefficient before this coefficient AC10 is AC01 and its value is “0 run 0, coefficient value“ 120 ””, a table having this as a conditional sequence is selected from a plurality of tables. The variable length code 2 is given to the value “50” of the coefficient AC10 with reference to the table.

【0064】続く係数AC20は“10”であるが、こ
の係数AC20の前の係数はAC10であり、その値は
「0ラン0、係数値“50”」であるから、複数のテー
ブルからこれを条件系列とするテーブルを選択し、その
テーブルを参照して係数AC20の値“10”に可変長
符号3を与える。
The following coefficient AC20 is "10". The coefficient before this coefficient AC20 is AC10, and its value is "0 run 0, coefficient value" 50 "". A table as a condition series is selected, and a variable length code 3 is given to the value “10” of the coefficient AC20 with reference to the table.

【0065】続く係数AC11は“20”であるが、こ
の係数AC11の前の係数はAC20であり、その値は
「0ラン0、値“10”」であるから、複数のテーブル
からこれを条件系列とするテーブルを選択し、そのテー
ブルを参照して係数AC11の値“20”に可変長符号
4を与える。
The following coefficient AC11 is "20". The coefficient before this coefficient AC11 is AC20, and its value is "0 run 0, value" 10 "". A table to be a series is selected, and a variable length code 4 is given to the value “20” of the coefficient AC11 with reference to the table.

【0066】続く係数AC02は“30”であるが、こ
の係数AC02の前の係数はAC11であり、その値は
「0ラン0、値“20”」であるから、複数のテーブル
からこれを条件系列とするテーブルを選択し、そのテー
ブルを参照して係数AC02の値“30”に可変長符号
5を与える。
The following coefficient AC02 is "30". The coefficient before this coefficient AC02 is AC11, and its value is "0 run 0, value" 20 "". A table to be a series is selected, and a variable length code 5 is given to the value “30” of the coefficient AC02 with reference to the table.

【0067】続く係数AC03は“41”であるが、こ
の係数AC03の前の係数はAC02であり、その値は
「0ラン0、値“30”」であるから、複数のテーブル
からこれを条件系列とするテーブルを選択し、そのテー
ブルを参照して係数AC03の値“41”に可変長符号
6を与える。
The following coefficient AC03 is "41", but the coefficient before this coefficient AC03 is AC02, and its value is "0 run 0, value" 30 "". A table to be a series is selected, and a variable length code 6 is given to the value “41” of the coefficient AC03 with reference to the table.

【0068】続く係数AC12は“10”であるが、こ
の係数AC12の前の係数はAC03であり、その値は
「0ラン0、値“41”」であるから、複数のテーブル
からこれを条件系列とするテーブルを選択し、そのテー
ブルを参照して係数AC12の値“10”に可変長符号
7を与える。
The following coefficient AC12 is "10". The coefficient before this coefficient AC12 is AC03, and its value is "0 run 0, value" 41 "". A table to be a series is selected, and a variable length code 7 is given to the value “10” of the coefficient AC12 with reference to the table.

【0069】次に、係数AC21は“10”であるが、
この係数AC21の前の係数はAC12であり、その値
は「0ラン0、値“10”」であるから、複数のテーブ
ルからこれを条件系列とするテーブルを選択し、そのテ
ーブルを参照して係数AC21の値“10”に可変長符
号8を与える。
Next, the coefficient AC21 is "10",
Since the coefficient before this coefficient AC21 is AC12 and its value is “0 run 0, value“ 10 ””, a table having this as a conditional sequence is selected from a plurality of tables, and the table is referred to. The variable length code 8 is given to the value “10” of the coefficient AC21.

【0070】次に、係数AC30は“3”であるが、こ
の係数AC30の前の係数はAC21であり、その値は
「0ラン0、値“10”」であるから、複数のテーブル
からこれを条件系列とするテーブルを選択し、そのテー
ブルを参照して係数AC30の値“3”に可変長符号9
を与える。
Next, although the coefficient AC30 is "3", the coefficient preceding this coefficient AC30 is AC21, whose value is "0 run 0, value" 10 "". Is selected as a condition series, and the variable length code 9 is set to the value “3” of the coefficient AC30 with reference to the table.
give.

【0071】次に、係数AC31は“1”であるが、こ
の係数AC31の前の係数はAC30であり、その値は
「0ラン0、値“3”」であるから、複数のテーブルか
らこれを条件系列とするテーブルを選択し、そのテーブ
ルを参照して係数AC31の値“1”に可変長符号10
を与える。
Next, although the coefficient AC31 is "1", the coefficient preceding this coefficient AC31 is AC30, and its value is "0 run 0, value" 3 "". Is selected as a condition series, and the variable length code 10 is set to the value “1” of the coefficient AC31 with reference to the table.
give.

【0072】次に、係数AC22は“0”、続く係数A
C13は“0”、続く係数AC23は“1”であるが、
係数AC22の前の係数はAC31であり、その値は
「0ラン0、値“1”」であるから、複数のテーブルか
らこれを条件系列とするテーブルを選択し、そのテーブ
ルを参照してこれら係数AC22の値“0”、係数AC
13の値“0”、係数AC23の値“1”に可変長符号
11を与える。
Next, the coefficient AC22 is "0", and the following coefficient A
C13 is "0" and the following coefficient AC23 is "1",
Since the coefficient before the coefficient AC22 is AC31, and its value is “0 run 0, value“ 1 ””, a table having this as a conditional sequence is selected from a plurality of tables, and the table is referred to and Coefficient AC22 value “0”, coefficient AC
The variable length code 11 is given to the value “0” of 13 and the value “1” of the coefficient AC23.

【0073】次に、係数AC32は“1”であるが、こ
の係数AC32の前の係数はAC22、AC13、AC
23であり、その値は「0ラン0、値“1”」であるか
ら、複数のテーブルからこれを条件系列とするテーブル
を選択し、そのテーブルを参照して係数AC32の値
“1”に可変長符号12を与える。
Next, the coefficient AC32 is "1", and the coefficients before this coefficient AC32 are AC22, AC13, AC13.
23, and its value is “0 run 0, value“ 1 ””. Therefore, a table having this as a condition series is selected from a plurality of tables, and the table is referred to the value “1” of the coefficient AC32. A variable length code 12 is provided.

【0074】次に、係数AC33は“1”であるが、こ
の係数AC33の前の係数はAC32であり、その値は
「0ラン0、値“1”」であるから、複数のテーブルか
らこれを条件系列とするテーブルを選択し、そのテーブ
ルを参照して係数AC33の値“1”に可変長符号13
を与える。
Next, although the coefficient AC33 is "1", the coefficient preceding this coefficient AC33 is AC32, and its value is "0 run 0, value" 1 "". Is selected as the condition series, and the variable length code 13 is set to the value “1” of the coefficient AC33 with reference to the table.
give.

【0075】さて、以上のように符号化するためのエン
コーダについて説明したが、次に図1Bを参照して高能
率符号化装置のデコーダについて説明する。
Now, the encoder for encoding as described above has been described. Next, the decoder of the high efficiency encoding apparatus will be described with reference to FIG. 1B.

【0076】図1Bにおいて、6は例えば図示しない伝
送経路、或いは図示しない電子機器の出力側からの伝送
データ、或いは再生、読み出しデータが供給される入力
端子で、この入力端子6からの符号化されている各種デ
ータは可変長符号復号化回路7に供給される。可変長符
号復号化回路7は入力端子6を介して供給される可変長
符号データを復号して量子化された係数データを得、こ
の係数データを量子化復元回路8に供給する。
In FIG. 1B, reference numeral 6 denotes an input terminal to which, for example, a transmission path (not shown) or transmission data from an output side of an electronic device (not shown) or reproduction / readout data is supplied. These various data are supplied to the variable length code decoding circuit 7. The variable length code decoding circuit 7 decodes the variable length code data supplied via the input terminal 6 to obtain quantized coefficient data, and supplies the coefficient data to the quantization restoration circuit 8.

【0077】量子化復元回路8は可変長符号復号化回路
7からの係数データを復元し、量子化する前の係数デー
タを得、この係数データを逆変換回路9に供給する。逆
変換回路9としては、変換回路2について説明した離散
コサイン変換、アダマール変換等の逆の変換を行い、逆
変換を行って得た元のデータを出力端子10を介してこ
の高能率符号化装置を搭載する電子機器の再生系等に供
給する。
The quantization restoration circuit 8 restores the coefficient data from the variable length code decoding circuit 7, obtains the coefficient data before quantization, and supplies the coefficient data to the inverse transformation circuit 9. The inverse transform circuit 9 performs the inverse transform such as the discrete cosine transform and the Hadamard transform described for the transform circuit 2, and outputs the original data obtained by performing the inverse transform via the output terminal 10 to the high efficiency encoding apparatus. Is supplied to the reproduction system of the electronic device equipped with.

【0078】可変長符号データを可変長符号復号化回路
7で復号する場合、つまり、「0ラン、値」を条件系列
として符号化している場合は、例えば符号化するときの
テーブルをそのまま用いるか、符号データから元の係数
データを求めるためのテーブル(符号データに夫々係数
データを対応させたもの、但し、どのテーブルを参照し
て符号化したかを示すデータを符号化時に符号化した係
数データに付加しておかなければならない)を可変長符
号復号化回路7に持たせておく必要がある。
When the variable-length code data is decoded by the variable-length code decoding circuit 7, that is, when "0 run, value" is coded as a conditional sequence, for example, the coding table is used as it is. A table for obtaining the original coefficient data from the code data (corresponding to the respective coefficient data to the code data, provided that the data indicating which table is referred to and coded is the coefficient data coded at the time of coding) Must be added to the variable-length code decoding circuit 7.

【0079】このように、本例においては、ハフマンテ
ーブル生成装置を用い、量子化回路13で量子化した係
数データの発生頻度を検出してテーブルを作成し、作成
したテーブルに基いてハフマン符号化回路14で符号化
し、そのときの総符号長データを量子化回路13に供給
して量子化の粗さを制御するという動作を繰り返し行っ
て条件系列(0ラン、値)に基いたテーブルを多数作成
し、作成したテーブルを高能率符号化装置のエンコーダ
の可変長符号化回路4のメモリ4aにロードし、高能率
符号化装置で係数データを符号化する際、その係数デー
タの前の係数データの条件系列に対応したテーブルを選
択し、選択したテーブルを参照して符号化するようにし
たので、全体の符号長を短く抑えることができる。
As described above, in the present embodiment, a table is created by detecting the frequency of occurrence of the coefficient data quantized by the quantization circuit 13 using the Huffman table generator, and Huffman coding is performed based on the created table. An operation of encoding by the circuit 14 and supplying the total code length data at that time to the quantization circuit 13 to control the roughness of the quantization is repeated, and a large number of tables based on the condition series (0 run, value) are obtained. When the created table is loaded into the memory 4a of the variable length encoding circuit 4 of the encoder of the high efficiency encoding device, and the coefficient data is encoded by the high efficiency encoding device, the coefficient data before the coefficient data is encoded. Since the table corresponding to the condition series is selected and the encoding is performed with reference to the selected table, the entire code length can be reduced.

【0080】尚、上述の例においては、図2或いは図3
に示したハフマンテーブル生成装置で生成した条件系列
に基いた複数のテーブルを図1に示した高能率符号化装
置の可変長符号化回路4のメモリ4aに書き込む、或い
はロードする場合について説明したが、図2及び図3に
示した量子化回路13の次段以降の回路、つまり、図2
の場合はハフマン符号化回路14、発生頻度検出回路1
5、メモリ16、図3の場合はハフマン符号化回路1
4、発生頻度検出回路15、メモリ16、コントローラ
17及びスイッチ18を可変長符号化回路4に内蔵させ
ても良い。その場合は図1に示したメモリ4aを図2或
いは図3に示したメモリ16で兼用することができる。
In the above example, FIG. 2 or FIG.
Has been described in which a plurality of tables based on the condition series generated by the Huffman table generating apparatus shown in FIG. 1 are written or loaded into the memory 4a of the variable length coding circuit 4 of the high efficiency coding apparatus shown in FIG. 2 and subsequent circuits of the quantization circuit 13 shown in FIGS.
, The Huffman encoding circuit 14 and the occurrence frequency detection circuit 1
5, the memory 16, the Huffman encoding circuit 1 in the case of FIG.
4. The occurrence frequency detection circuit 15, the memory 16, the controller 17, and the switch 18 may be built in the variable length coding circuit 4. In that case, the memory 4a shown in FIG. 1 can be shared with the memory 16 shown in FIG. 2 or FIG.

【0081】次に、図7から図23を参照して上述した
条件系列「0ラン、値」以外の条件系列(サイズ)を用
いた場合について説明する。この「サイズ」は、係数の
値を2の累乗で表したときに、累乗の指数の値となるも
のであり、係数をその値に応じて分類したときのインデ
ックスとして用いられるものである。但し、2の9乗は
256であるが、これを9ビットで表す場合の最大値は
255となる。従って、実際にサイズで分類する場合は
その係数の値を2の累乗で表したときの累乗の指数+1
となる。
Next, a case where a condition series (size) other than the above-described condition series “0 run, value” is used will be described with reference to FIGS. 7 to 23. The “size” is a value of the exponent of the power when the value of the coefficient is represented by a power of 2, and is used as an index when the coefficient is classified according to the value. However, the 2 9th power is 256, but the maximum value when representing this with 9 bits is 255. Therefore, when actually classifying by size, the exponent of the power + 1 when the value of the coefficient is represented by a power of 2 +
Becomes

【0082】図7はこのサイズと称している概念によっ
て係数データを分類した例であり、この図7に示すよう
に、係数の値“0”はサイズ0(0乗)、係数の値“−
1”及び係数の値“1”はサイズ1(1乗)、・・・・
係数の値“−1023〜−512”並びに係数の値“5
12〜1023”はサイズ10(10乗)、・・・・係
数の値“−8191〜−4096”並びに“4096〜
8191”はサイズ13(13乗)と分類している。
FIG. 7 shows an example in which coefficient data is classified based on the concept called the size. As shown in FIG. 7, the coefficient value “0” is the size 0 (zero power) and the coefficient value “−”.
1 ”and the coefficient value“ 1 ”are size 1 (the first power),.
The coefficient value “−1023 to −512” and the coefficient value “5
12 to 1023 ”are size 10 (10th power)... Coefficient values“ −8191 to −4096 ”and“ 4096 to
8191 "is classified as size 13 (13th power).

【0083】また、各サイズでの係数データの並べ方で
あるが、この図においては例えば左から順次値の大きな
係数データを並べるようにする。分類の仕方であるが、
この図7に示すようなテーブルを例えば図2や図3に示
すハフマン符号化回路14が持つものとする。また、図
に示すサイズ0〜13は夫々累乗の指数を示し、これら
サイズに対し、その範囲内の値の係数データを割り当て
るようにする。例えば係数データの値が“50”だった
場合、この“50”はサイズでいえば累乗の指数が
“6”、即ち、“64”の範囲になる。従って図7に示
すように、この“50”の値の係数データはサイズ6と
なる。
In the method of arranging coefficient data in each size, coefficient data having larger values are arranged in order from the left in FIG. How to classify,
It is assumed that the table shown in FIG. 7 is provided in the Huffman encoding circuit 14 shown in FIGS. 2 and 3, for example. Also, the sizes 0 to 13 shown in the figure indicate exponents of the respective powers, and coefficient data having a value within the range is assigned to these sizes. For example, if the value of the coefficient data is “50”, the “50” has a power exponent of “6”, that is, a range of “64” in terms of size. Therefore, as shown in FIG. 7, the coefficient data having the value “50” has a size of 6.

【0084】この例においては、係数データの値をサイ
ズ毎に分類し、係数データのサイズに対応したテーブル
を多数作成しておき、或係数データを符号化するとき
に、前の係数データのサイズに対応したテーブルを選択
し、選択したテーブルを参照してその符号化しようとす
る係数データにハフマン符号を与えるようにする。先に
説明した例では「0ラン、値」を条件系列としたが、こ
の例においてはサイズを条件系列とする。但し、前の係
数データの条件系列に対応したテーブルを選択し、選択
したテーブルを参照して符号化を行うという点について
は同じである。
In this example, the values of the coefficient data are classified by size, a number of tables corresponding to the sizes of the coefficient data are prepared, and when encoding the coefficient data, the size of the previous coefficient data is reduced. And a Huffman code is given to the coefficient data to be encoded by referring to the selected table. In the example described above, “0 run, value” is used as the condition series, but in this example, the size is used as the condition series. However, it is the same in that a table corresponding to the condition series of the previous coefficient data is selected, and encoding is performed with reference to the selected table.

【0085】ここで、図2や図3に示したハフマンテー
ブル生成装置を用いて条件系列(前の係数データのサイ
ズ)に対応したテーブルを作成する動作について図8の
フローチャートを参照して説明する。尚、交流成分の先
頭の係数については、既に説明した係数の値からサイズ
の値を得るテーブル(図7参照)を用いてサイズの値を
得るものとする。
Here, the operation of creating a table corresponding to a condition series (the size of the previous coefficient data) using the Huffman table generation device shown in FIGS. 2 and 3 will be described with reference to the flowchart of FIG. . For the leading coefficient of the AC component, the size value is obtained by using the table (see FIG. 7) for obtaining the size value from the coefficient values already described.

【0086】先ずステップS1では条件系列であるとこ
ろの1つ前の係数のサイズの値を示す変数Jに“0”を
代入する。そしてステップS2に移行する。つまり、図
2や図3に示した発生頻度検出回路15が変数Jに
“0”をセットする。
First, in step S1, "0" is substituted for a variable J indicating the value of the size of the previous coefficient which is a condition series. Then, control goes to a step S2. That is, the occurrence frequency detection circuit 15 shown in FIGS. 2 and 3 sets the variable J to “0”.

【0087】ステップS2では変数J≦条件系列である
ところの1つ前の係数のサイズの最大値か否かを判断
し、「YES」であればステップS3に移行し、「N
O」であればテーブル作成処理を終了する。
In step S2, it is determined whether or not the variable J ≦ the maximum value of the size of the coefficient immediately before the condition series. If “YES”, the process proceeds to step S3, where “N” is determined.
If "O", the table creation processing ends.

【0088】ステップS3では前のサイズがJである部
分集合に対し、その部分集合内で現在のサイズの生起確
率を求める。そしてステップS4に移行する。
In step S3, for the subset whose previous size is J, the occurrence probability of the current size in the subset is determined. Then, control goes to a step S4.

【0089】ステップS4ではサイズを生起確率の大き
い順に調べる。そしてステップS5に移行する。
In step S4, the sizes are checked in descending order of occurrence probability. Then, control goes to a step S5.

【0090】ステップS5では生起確率が最小のものと
次に小さいものを縮退して新しいサイズを割り当て、そ
の生起確率は夫々の和とし、更に小さい方に符号ビット
“0”を、大きい方に符号ビット“1”を追加する。そ
してステップS6に移行する。
In step S5, the smallest occurrence probability and the next smallest occurrence probability are degenerated, and a new size is assigned. The occurrence probability is summed, and the sign bit “0” is assigned to the smaller one and the sign bit is assigned to the larger one. Add bit “1”. Then, control goes to a step S6.

【0091】ステップS6では確率1のものしかないか
否かを判断し、「YES」であればステップS7に移行
し、「NO」であれば再びステップS4に移行する。こ
こで「確率1のものしかない」とは、最小の生起確率の
ものとその次のものを1つに縮退するという作業を繰り
返した結果、全てが1つに縮退されてしまった状態であ
る。
In step S6, it is determined whether or not there is only one with probability 1. If "YES", the flow shifts to step S7, and if "NO", the flow shifts to step S4 again. Here, “there is only one with a probability of 1” is a state in which all have been reduced to one as a result of repeating the work of reducing the occurrence of the minimum occurrence probability and the next one to one. .

【0092】ステップS7においては、条件系列である
ところの1つ前の係数のサイズが変数Jである条件下の
ハフマン符号を得られたことになる。そしてステップS
8に移行する。つまり、縮退するときに、割り当てられ
た“1”、“0”のビットを逆に読んでいくことによ
り、条件系列がJであるところの現在の係数のサイズ夫
々に対するハフマン符号が得られる。
In step S7, the Huffman code is obtained under the condition that the size of the previous coefficient which is the condition series is the variable J. And step S
Move to 8. In other words, the Huffman code for each of the current coefficient sizes where the condition series is J can be obtained by reading the assigned bits of “1” and “0” in reverse during degeneration.

【0093】ステップS8では変数Jに1を加算する。
そして再びステップS2に移行する。即ち、つぎの条件
系列に対する符号表を求めるのである。
In step S8, 1 is added to the variable J.
Then, the process returns to step S2. That is, a code table for the next condition series is obtained.

【0094】尚、上述の例においては、交流成分の先頭
の係数について条件系列を無視して全データの統計をと
るようにしても良い。
In the above example, statistics of all data may be obtained by ignoring the condition series for the leading coefficient of the AC component.

【0095】次に図4を再び参照して、条件系列をサイ
ズとした場合の符号化について説明する。尚、以下の説
明においては、図4に示す係数データのみを参照し、
「符号1」〜「符号13」、これに係数データを対応さ
せている矢印並びに各係数データの値を囲っている枠は
参照しない。
Next, with reference to FIG. 4 again, encoding when the size of the condition series is described. In the following description, only the coefficient data shown in FIG.
Reference numerals 1 to 13 and arrows corresponding to the coefficient data and frames surrounding the values of the coefficient data are not referred to.

【0096】先ず、交流成分の先頭である係数AC01
は“120”、サイズは図7に示したテーブルから
“7”となる。ところで、一実施例で説明した「0ラ
ン、値」を条件系列とした例において説明したように、
交流成分の先頭である。従って、この先頭の係数につい
ては図23に示すように、今の係数のサイズ及びそのサ
イズに対応して当てられる可変長符号からなるテーブル
を参照して可変長符号を当てるようにする。このテーブ
ルは図23に示すように、今の係数のサイズ及びそのサ
イズに対応して当てられる可変長符号からなるテーブル
であり、交流成分の先頭の係数から可変長符号を得るた
めのテーブルである。
First, the coefficient AC01 which is the head of the AC component
Is "120" and the size is "7" from the table shown in FIG. By the way, as described in the example in which “0 run, value” described in one embodiment is a condition series,
This is the head of the AC component. Therefore, as shown in FIG. 23, the leading coefficient is assigned a variable length code by referring to a table consisting of the current coefficient size and the variable length code assigned according to the size. As shown in FIG. 23, this table is a table including the current coefficient size and the variable length code assigned to the size, and is a table for obtaining the variable length code from the first coefficient of the AC component. .

【0097】つまり、この交流成分の先頭である係数A
C01は“120”であるから、図7に示したテーブル
からサイズ“7”を与え、交流成分の先頭であることか
ら、図23に示したテーブルから、今の係数のサイズ
“7”に対応した可変長符号“111110”を与え
る。ここで、この符号に、更に図7に示したテーブルに
おいて“120”は何番目かを示すデータを付加する。
That is, the coefficient A which is the head of the AC component
Since C01 is "120", the size "7" is given from the table shown in FIG. 7, and since it is the head of the AC component, it corresponds to the current coefficient size "7" from the table shown in FIG. The obtained variable length code “111110” is given. Here, data indicating the number of “120” in the table shown in FIG. 7 is further added to this code.

【0098】ここで、この何番目かを示すデータを、0
番目、1番目、2番目のように、0番目から数えること
にする。そして何番目かを示すデータのビット長はその
サイズの値と同じビット長で表すようにする。例えばサ
イズ“7”に該当する係数の場合、サイズ“7”から何
番目かを示すデータのビット長は7ビットとなる。ここ
で、その係数の順番の数え方を“0”からにしたことが
サイズで示す数値のビット長で順番を示すデータをその
サイズの範囲の係数全てについて表せることになる。
Here, the data indicating the number is represented by 0
The first, second, and so on are counted from the 0th. The bit length of the data indicating the number is represented by the same bit length as the value of the size. For example, in the case of the coefficient corresponding to the size “7”, the bit length of the data indicating the number from the size “7” is 7 bits. Here, the fact that the order of the coefficient is counted from "0" means that the data indicating the order by the bit length of the numerical value indicated by the size can be represented for all the coefficients within the size range.

【0099】さて、何番目かを示すデータについて実際
に説明すると、係数AC01の値“120”のサイズは
“7”であり、サイズ“7”の0番目は“−127”で
あるから、“120”は−127、−126、・・・・
−64、64、65、・・・・120と数えることにな
るので、この場合は120番目、つまり、“11110
00”となるので、係数AC01の値“120”の符号
化出力は“1111110 1111000”となる。
Now, the data indicating the number is actually described. The size of the value “120” of the coefficient AC01 is “7” and the 0th of the size “7” is “−127”. 120 "is -127, -126, ...
−64, 64, 65,... 120, and in this case, the 120th, that is, “11110”
00, the encoded output of the value “120” of the coefficient AC01 is “1111110 1111000”.

【0100】続いて交流成分の係数AC10は“5
0”、サイズは図7に示したテーブルから“6”である
が、この係数AC10の前の係数AC01のサイズは
“7”であるから、図1に示す、前の係数のサイズ
“7”のテーブルを選択し、そのテーブルの今の係数の
サイズ“6”に対応する可変長符号“01”を与える。
ここで、この符号に、更に図7に示したテーブルにおい
て“50”は何番目かを示すデータを付加する。“5
0”はサイズが“6”であり、サイズ“6”の0番目は
“−63”であるから、“50”は−63、−62、・
・・・−32、32、33、・・・・63と数えること
になるので、この場合は50番目となる。
Subsequently, the AC component coefficient AC10 is set to "5
0 "is a, the size of the previous coefficient AC01 coefficient AC10 is"", the size from the table shown in FIG. 7" 6 "because it is, shown in FIG. 1 6, the size of the previous coefficient" 7 7 And a variable length code "01" corresponding to the current coefficient size "6" of the table is given.
Here, data indicating the number of “50” in the table shown in FIG. 7 is added to this code. “5
Since “0” has a size of “6” and the 0th of the size “6” is “−63”, “50” is −63, −62,.
...- 32, 32, 33, ..., 63, so in this case it is the 50th.

【0101】続く係数AC20は“10”、サイズは図
7に示したテーブルから“4”であるが、この係数AC
20の前の係数AC10のサイズは“6”であるから、
図1に示す、前の係数のサイズ“6”のテーブルを選
択し、そのテーブルの今の係数のサイズ“4”に対応す
る可変長符号“00”を与える。ここで、この符号に、
更に図7に示したテーブルにおいて“10”は何番目か
を示すデータを付加する。“10”はサイズが“4”で
あり、サイズ“4”の0番目は“−15”であるから、
“10”は−15、−14、・・・・−8、8、9、・
・・・15と数えることになるので、この場合は10番
目となる。
The subsequent coefficient AC20 is "10" and the size is "4" from the table shown in FIG.
Since the size of the coefficient AC10 before 20 is “6”,
1 5, select the table of the previous size of the coefficient "6", giving the variable length code "00" corresponding to the size "4" of the now coefficient of that table. Here, this code:
Further, in the table shown in FIG. 7, "10" adds data indicating the number. Since “10” has a size of “4” and the 0th of the size “4” is “−15”,
"10" is -15, -14, ... -8, 8, 9, ...
.., 15 in this case, which is the tenth.

【0102】続く係数AC11は“20”、サイズは図
7に示したテーブルから“5”であるが、この係数AC
11の前の係数AC20のサイズは“4”であるから、
図1に示す、前の係数のサイズ“4”のテーブルを選
択し、そのテーブルの今の係数のサイズ“5”に対応す
る可変長符号“110”を与える。ここで、この符号
に、更に図7に示したテーブルにおいて“20”は何番
目かを示すデータを付加する。“20”はサイズが
“5”であり、サイズ“5”の0番目は“−31”であ
るから、“20”は−31、−30、・・・・−16、
16、17、・・・・31と数えることになるので、こ
の場合は20番目となる。
The following coefficient AC11 is "20" and the size is "5" from the table shown in FIG.
Since the size of the coefficient AC20 before “11” is “4”,
1 3, select the table of the previous size of the coefficient "4" gives the variable length code "110" corresponding to the size "5" of the current coefficients of the table. Here, data indicating the number of “20” in the table shown in FIG. 7 is further added to this code. Since “20” has a size of “5” and the 0th of the size “5” is “−31”, “20” is −31, −30,.
Since it is counted as 16, 17,... 31, it is the 20th in this case.

【0103】続く係数AC02は“30”、サイズは図
7に示したテーブルから“5”であるが、この係数AC
02の前の係数AC11のサイズは“5”であるから、
図1に示す、前の係数のサイズ“5”のテーブルを選
択し、そのテーブルの今の係数のサイズ“5”に対応す
る可変長符号“10”を与える。ここで、この符号に、
更に図7に示したテーブルにおいて、“30”は何番目
かを示すデータを付加する。“30”はサイズが“5”
であり、サイズ“5”の0番目は“−31”であるか
ら、“30”は−31、−30、・・・・−16、1
6、17、・・・・31と数えることになるので、この
場合は30番目となる。
The subsequent coefficient AC02 is "30" and the size is "5" from the table shown in FIG.
Since the size of the coefficient AC11 before “02” is “5”,
1 4, select the table of the previous size of the coefficient "5", giving the variable length code "10" corresponding to the size "5" of the current coefficients of the table. Here, this code:
Further, in the table shown in FIG. 7, "30" adds data indicating the number. “30” has a size of “5”
And the 0th of the size “5” is “−31”, so “30” is −31, −30,.
.., 31, so that in this case it is the 30th.

【0104】続く係数AC03は“41”、サイズは図
7に示したテーブルから“6”であるが、この係数AC
03の前の係数AC02のサイズは“5”であるから、
図1に示す、前の係数のサイズ“5”のテーブルを選
択し、そのテーブルの今の係数のサイズ“6”に対応す
る可変長符号“111110”を与える。ここで、この
符号に、更に図7に示したテーブルにおいて、“41”
は何番目かを示すデータを付加する。“41”はサイズ
が“6”であり、サイズ“6”の0番目は“−63”で
あるから、“63”は−63、−62、・・・・−3
2、32、33、・・・・63と数えることになるの
で、この場合は41番目となる。
The following coefficient AC03 is "41" and the size is "6" from the table shown in FIG.
Since the size of the coefficient AC02 before “03” is “5”,
1 4, select the table of the previous size of the coefficient "5", giving the variable length code "111110" corresponding to the size "6" of the current coefficients of the table. Here, in the table shown in FIG.
Appends data indicating the number. Since “41” has a size of “6” and the 0th of the size “6” is “−63”, “63” is −63, −62,.
63, so that in this case it is the 41st.

【0105】続く係数AC12は“10”、サイズは図
7に示したテーブルから“4”であるが、この係数AC
12の前の係数AC03のサイズは“6”であるから、
図1に示す、前の係数のサイズ“6”のテーブルを選
択し、そのテーブルの今の係数のサイズ“4”に対応す
る可変長符号“00”を与える。ここで、この符号に、
更に図7に示したテーブルにおいて、“10”は何番目
かを示すデータを付加する。“10”はサイズが“4”
であり、サイズ“4”の0番目は“−15”であるか
ら、“10”は−15、−14、・・・・−8、8、
9、・・・・15と数えることになるので、この場合は
10番目となる。
The following coefficient AC12 is "10" and the size is "4" from the table shown in FIG.
Since the size of the coefficient AC03 before “12” is “6”,
1 5, select the table of the previous size of the coefficient "6", giving the variable length code "00" corresponding to the size "4" of the now coefficient of that table. Here, this code:
Further, in the table shown in FIG. 7, "10" adds data indicating the number. "10" means size "4"
And the 0th of the size “4” is “−15”, so “10” is “−15, −14,... -8, 8,
In this case, it is the tenth since it is counted as 9,...

【0106】次に、係数AC21は“10”、サイズは
図7に示したテーブルから“4”であるが、この係数A
C21の前の係数AC12のサイズは“4”であるか
ら、図1に示す、前の係数のサイズ“4”のテーブル
を選択し、そのテーブルの今の係数のサイズ“4”に対
応する可変長符号“10”を与える。ここで、この符号
に、更に図7に示したテーブルにおいて、“10”は何
番目かを示すデータを付加する。この場合も上述と同様
に10番目となる。
Next, the coefficient AC21 is "10" and the size is "4" from the table shown in FIG.
Since the size of the previous coefficient AC12 of C21 is "4", 1 3, select the table of the previous size of the coefficient "4", corresponding to the size "4" of the now coefficient of the table A variable length code "10" is given. Here, in the table shown in FIG. 7, "10" is added to the code to indicate the number. In this case as well, it is the tenth as described above.

【0107】次に、係数AC30“3”、サイズは図7
に示したテーブルから“2”であるが、この係数AC3
0の前の係数AC21のサイズは“4”であるから、図
に示す、前の係数のサイズ“4”のテーブルを選択
し、そのテーブルの今の係数のサイズ“2”に対応する
可変長符号“011”を与える。ここで、この符号に、
更に図7に示したテーブルにおいて、“3”は何番目か
を示すデータを付加する。“3”はサイズが“2”であ
り、サイズ“2”の0番目は“−3”であるから、
“3”は−3、−2、2、3と数えることになるので、
この場合は3番目となる。
Next, the coefficient AC30 is "3" and the size is as shown in FIG.
Is "2" from the table shown in FIG.
Since the size of the previous coefficient AC21 0 is "4", 1 3, select the table of the previous size of the coefficient "4", corresponding to the size "2" of the now coefficient of the table A variable length code "011" is given. Here, this code:
Further, in the table shown in FIG. 7, "3" adds data indicating the number. Since “3” has a size of “2” and the 0th of the size “2” is “−3”,
"3" is counted as -3, -2, 2, 3,
In this case, it is the third.

【0108】次に、係数AC31は“1”、サイズは図
7に示したテーブルから“1”であるが、この係数AC
31の前の係数AC30のサイズは“2”であるから、
図1に示す、前の係数のサイズ“2”のテーブルを選
択し、そのテーブルの今の係数のサイズ“1”に対応す
る可変長符号“00”を与える。ここで、この符号に、
更に図7に示したテーブルにおいて、“1”は何番目か
を示すデータを付加する。“1”はサイズが“1”であ
り、サイズ“1”の0番目は“−1”であるから、
“1”は−1、1と数えることになるので、この場合は
1番目となる。
Next, the coefficient AC31 is "1" and the size is "1" from the table shown in FIG.
Since the size of the coefficient AC30 before “31” is “2”,
1 1, select the table of the previous size of the coefficient "2", it gives the variable length code "00" corresponding to the size "1" now in the coefficient of that table. Here, this code:
Further, in the table shown in FIG. 7, "1" adds data indicating the number. Since “1” has a size of “1” and the 0th of the size “1” is “−1”,
Since "1" is counted as -1, 1 in this case, it is the first.

【0109】次に、係数AC22は“0”、サイズは図
7に示したテーブルから“0”であるが、この係数AC
22の前の係数AC31のサイズは“1”であるから、
図1に示す、前の係数のサイズが“1”のテーブルを
選択し、そのテーブルの今の係数のサイズ“0”に対応
する可変長符号“00”を与える。ここで、この符号
に、この場合、“0”が何番目かを示すデータは付加し
ない。これは、サイズ“0”は“0”しかメンバとして
ないから何番目かを示すデータ自身意味を持たないので
付加しない。
Next, the coefficient AC22 is "0" and the size is "0" from the table shown in FIG.
Since the size of the coefficient AC31 before “22” is “1”,
1 0, the size of the previous coefficient select table "1", giving the variable length code "00" corresponding to the size "0" of the current coefficients of the table. Here, in this case, data indicating what number “0” is is not added to this code. Since the size "0" has only "0" as a member and has no meaning itself, the data indicating the number is not added.

【0110】次に、係数AC13は“0”、サイズは図
7に示したテーブルから“0”であるが、この係数AC
13の前の係数AC22のサイズは“1”であるから、
に示す、前の係数のサイズが“0”のテーブルを選
択し、そのテーブルの今の係数のサイズ“0”に対応す
る可変長符号“00”を与える。また、上述と同様に、
この符号には“0”が何番目かを示すデータは付加しな
い。
Next, the coefficient AC13 is "0" and the size is "0" from the table shown in FIG.
Since the size of the coefficient AC22 before “13” is “1”,
The table in which the previous coefficient size is “0” shown in FIG. 9 is selected, and a variable length code “00” corresponding to the current coefficient size “0” of the table is given. Also, as described above,
No data indicating the number of “0” is added to this code.

【0111】次に、係数AC23は“1”、サイズは図
7に示したテーブルから“1”であるが、この係数AC
23の前の係数AC13のサイズは“0”であるから、
に示す、前の係数のサイズ“0”のテーブルを選択
し、そのテーブルの今の係数のサイズ“1”に対応する
可変長符号“01”を与える。ここで、この符号に、更
に図7に示したテーブルにおいて、“1”は何番目かを
示すデータを付加する。“1”はサイズが“1”であ
り、サイズ“1”の0番目は“−1”であるから、
“1”は−1、1と数えることになるので、この場合は
1番目となる。
Next, the coefficient AC23 is "1" and the size is "1" from the table shown in FIG.
Since the size of the coefficient AC13 before “23” is “0”,
The table with the previous coefficient size “0” shown in FIG. 9 is selected, and the variable length code “01” corresponding to the current coefficient size “1” in the table is given. Here, in the table shown in FIG. 7, data indicating the number is added to this code. Since “1” has a size of “1” and the 0th of the size “1” is “−1”,
Since "1" is counted as -1, 1 in this case, it is the first.

【0112】次に、係数AC32は“1”、サイズは図
7に示したテーブルから“1”であるが、この係数AC
32の前の係数AC23のサイズは“1”であるから、
10に示す、前の係数のサイズが“1”のテーブルを
選択し、そのテーブルの今の係数のサイズ“1”に対応
する可変長符号“01”を与える。ここで、この符号
に、更に図7に示したテーブルにおいて、“1”は何番
目かを示すデータを付加する。何番目かを示すデータは
上述と同様“1”となる。
Next, the coefficient AC32 is "1" and the size is "1" from the table shown in FIG.
Since the size of the coefficient AC23 before 32 is “1”,
A table with the previous coefficient size "1" shown in FIG. 10 is selected, and a variable length code "01" corresponding to the current coefficient size "1" in the table is given. Here, in the table shown in FIG. 7, data indicating the number is added to this code. The data indicating the number is "1" as described above.

【0113】次に、係数AC33は“1”、サイズは図
7に示したテーブルから“1”であるが、この係数AC
33の前の係数AC32のサイズは“1”であるから、
10に示す、前の係数のサイズが“1”のテーブルを
選択し、そのテーブルの今の係数のサイズ“1”に対応
する可変長符号“01”を与える。ここで、この符号
に、更に図7に示したテーブルにおいて、“1”は何番
目かを示すデータを付加する。何番目かを示すデータは
上述と同様“1”となる。
Next, the coefficient AC33 is "1" and the size is "1" from the table shown in FIG.
Since the size of the coefficient AC32 before “33” is “1”,
A table with the previous coefficient size "1" shown in FIG. 10 is selected, and a variable length code "01" corresponding to the current coefficient size "1" in the table is given. Here, in the table shown in FIG. 7, data indicating the number is added to this code. The data indicating the number is "1" as described above.

【0114】一方、可変長符号データを可変長符号復号
化回路17で復号する場合、つまり、条件系列をサイズ
とし、前の係数のサイズに基いてテーブルを選択し、選
択したテーブルを参照して符号化した符号データを復号
する場合は、既に説明したように、符号データにその係
数データの値が図7に示したテーブルの何番目かを示す
データを付加しているので、図7に示したテーブル、図
8〜図23に示したテーブルをそのまま用いるか、或い
はこれら多数のテーブルを復号専用に圧縮して新たなテ
ーブルを作成し、作成した新たなテーブルを用いるかす
れば良い。
On the other hand, when the variable-length code data is decoded by the variable-length code decoding circuit 17, that is, the condition series is set to a size, a table is selected based on the size of the previous coefficient, and the selected table is referred to. When decoding the encoded code data, as described above, data indicating the number of the coefficient data in the table shown in FIG. 7 is added to the code data. The tables shown in FIGS. 8 to 23 may be used as they are, or a large number of these tables may be compressed for decoding only to create a new table, and the created new table may be used.

【0115】ところで、この符号化の方法では、符号デ
ータに夫々その係数データの値が図7に示したテーブル
の何番目かを示すデータを付加しているので、可変長符
号復号化回路17においてはそのデータを参照すること
で、図7〜図23に示したテーブル、或いはこれら圧縮
したテーブルを持っているだけで簡単に復号化できると
共に、各符号データに夫々その係数データの値が図7に
示したテーブルの何番目かを示すデータを付加している
のでたとえ符号が同じであっても、その符号に付加して
ある順番を示すデータを検出することによって、その符
号の係数データを簡単に得ることができる。
In this encoding method, data indicating the number of the coefficient data in the table shown in FIG. 7 is added to the code data. Can be easily decoded simply by having the tables shown in FIGS. 7 to 23 or these compressed tables by referring to the data, and the value of the coefficient data is assigned to each code data in FIG. Since the data indicating the order of the table shown in (1) is added, even if the code is the same, the coefficient data of the code can be easily detected by detecting the data indicating the order added to the code. Can be obtained.

【0116】このように、本例においては、量子化回路
13で量子化した係数データの発生頻度を検出してサイ
ズを条件系列としたテーブルを作成し、作成したテーブ
ルに基いてハフマン符号化回路14で符号化し、そのと
きの総符号長データを量子化回路13に供給して量子化
の粗さを制御するという動作を繰り返し行って条件系列
に基いたテーブルを多数作成し、作成した多数のテーブ
ルを高能率符号化装置のエンコーダの可変長符号化回路
4のメモリ4aにロードし、高能率符号化装置で係数デ
ータを符号化する際、その係数データの前の係数データ
のサイズに対応したテーブルを選択し、選択したテーブ
ルを参照して符号化するようにしたので、全体の符号長
を短く抑えることができる。更に、本例においては、符
号化した係数データにその係数データのサイズがサイズ
のテーブルにおいて何番目かを示すデータを付加するよ
うにしたので、簡単な構成及び処理で符号化したデータ
を復号化することができる。
As described above, in this example, the frequency of occurrence of the coefficient data quantized by the quantization circuit 13 is detected to create a table in which the size is a conditional sequence, and based on the created table, the Huffman encoding circuit is used. 14, the total code length data at that time is supplied to the quantization circuit 13, and the operation of controlling the quantization roughness is repeated to create a large number of tables based on the condition series. The table is loaded into the memory 4a of the variable-length coding circuit 4 of the encoder of the high-efficiency coding apparatus, and when the coefficient data is coded by the high-efficiency coding apparatus, the table corresponds to the size of the coefficient data before the coefficient data. Since a table is selected and encoding is performed with reference to the selected table, the entire code length can be reduced. Further, in this example, data indicating the number of the size of the coefficient data in the size table is added to the encoded coefficient data, so that the encoded data can be decoded with a simple configuration and processing. can do.

【0117】尚、上述の実施例は本発明の一例であり、
本発明の要旨を逸脱しない範囲でその他様々な構成が取
り得ることは勿論である。
The above embodiment is an example of the present invention.
It goes without saying that various other configurations can be adopted without departing from the spirit of the present invention.

【0118】[0118]

【発明の効果】上述せる本発明ディジタル信号の符号化
方法によれば、ステップ(a)においてディジタル信号
を、連続する零係数と、非零係数とで連なるデータ列に
変換し、ステップ(b)においてデータ列から、所定の
ランレングスを有する零係数の連続と、零係数の連続の
前または後に連なる少なくとも1つの非零係数とでなる
複数の事象を得、ステップ(c)において1つ前の事象
毎に応じて、各事象に対して異なる符号語を与えるテー
ブルデータを基に、複数の事象に対して、1つの符号語
を設定するようにしたので、係数同士の相関を利用で
き、これによって符号化効率を大幅に向上させることが
できるという効果がある。
According to the above-described digital signal encoding method of the present invention, in step (a), the digital signal is converted into a continuous data sequence with continuous zero coefficients and non-zero coefficients, and step (b) In step (c), a plurality of events consisting of a sequence of zero coefficients having a predetermined run length and at least one non-zero coefficient before or after the sequence of zero coefficients are obtained from the data sequence. One code word is set for a plurality of events based on table data that gives a different code word to each event according to each event, so that correlation between coefficients can be used. This has the effect that the coding efficiency can be greatly improved.

【0119】また上述せる本発明符号化用テーブル生成
方法によれば、ステップ(a)において所定のディジタ
ル信号を、連続する零係数と、非零係数とで連なるデー
タ列に変換し、ステップ(b)においてデータ列から、
所定のランレングスを有する零係数の連続と、零係数の
連続の前または後に連なる少なくとも1つの非零係数と
でなる複数の事象を得、ステップ(c)において複数の
事象の個々に対し、その事象の次に現れる各事象の発生
頻度を検出し、ステップ(d)において各事象の発生頻
度に応じて、所望のデータ列を前のデータ列の状態に応
じて符号化する際に使用するテーブルデータを生成して
メモリに記憶するようにしたので、係数同士の相関を利
用したテーブルデータを作成することができ、これによ
ってこのように作成したテーブルデータを用いて符号化
を行った場合に符号化効率を大幅に向上させることがで
きるという効果がある。
Further, according to the encoding table generating method of the present invention described above, in step (a), the predetermined digital signal is converted into a data string that is continuous with continuous zero coefficients and non-zero coefficients. )
Obtaining a plurality of events consisting of a series of zero coefficients having a predetermined run length and at least one non-zero coefficient before or after the series of zero coefficients, and in step (c), for each of the plurality of events, A table used to detect the occurrence frequency of each event appearing next to the event and to encode a desired data sequence in step (d) according to the occurrence frequency of each event according to the state of the previous data sequence Since the data is generated and stored in the memory, it is possible to create table data using the correlation between the coefficients, and thus, when encoding is performed using the table data thus created, the code is generated. There is an effect that the conversion efficiency can be greatly improved.

【0120】また上述せる本発明ディジタル信号の符号
化方法によれば、ステップ(a)において所定のディジ
タル信号を、連続する零係数と、非零係数とで連なるデ
ータ列に変換し、ステップ(b)においてデータ列か
ら、所定のランレングスを有する零係数の連続と、零係
数の連続の前または後に連なる少なくとも1つの非零係
数とでなる複数の事象を得、ステップ(c)において複
数の事象の個々に対し、その事象の次に現れる各事象の
発生頻度を検出し、ステップ(d)においてステップ
(c)で得た各事象の発生頻度に応じて、所望のデータ
列を前のデータ列の状態に応じて符号化する際に使用す
るテーブルデータを生成してメモリに記憶し、ステップ
(e)において任意のディジタル信号を、連続する零係
数と、非零係数とで連なるデータ列に変換し、ステップ
(f)においてステップ(e)で得たデータ列から、各
事象を得、ステップ(g)においてテーブルデータを基
に、ステップ(f)で得た複数の事象に対して、1つの
符号語を決定するようにしたので、係数同士の相関を利
用でき、これによって符号化、復号化効率を大幅に向上
させることができるという効果がある。
Further, according to the digital signal encoding method of the present invention described above, in step (a), the predetermined digital signal is converted into a continuous data sequence of continuous zero coefficients and non-zero coefficients, and step (b) In step (c), a plurality of events consisting of a series of zero coefficients having a predetermined run length and at least one non-zero coefficient before or after the series of zero coefficients are obtained. , The occurrence frequency of each event appearing next to the event is detected, and in step (d), a desired data string is replaced with the previous data string according to the occurrence frequency of each event obtained in step (c). Table data to be used for encoding according to the state is generated and stored in a memory, and in step (e), an arbitrary digital signal is linked with a continuous zero coefficient and a non-zero coefficient. In step (f), each event is obtained from the data string obtained in step (e), and in step (g), a plurality of events obtained in step (f) are obtained based on the table data. On the other hand, since one codeword is determined, the correlation between coefficients can be used, which has the effect of greatly improving coding and decoding efficiency.

【0121】また上述せる本発明符号化装置によれば、
変換手段でディジタル信号を、連続する零係数と、非零
係数とで連なるデータ列に変換し、所定のランレングス
を有する零係数の連続と、零係数の連続の前または後に
連なる少なくとも1つの非零係数とでなる複数の事象に
対し、夫々次にくる事象に対して与える符号語を表す複
数のテーブルデータを記憶手段に記憶し、符号化手段で
データ列から複数の事象を得て、テーブルデータを基
に、複数の事象に対して、夫々1つの符号語を与えるよ
うにしたので、係数同士の相関を利用でき、これによっ
て符号化効率を大幅に向上させることができるという効
果がある。
Further, according to the encoding apparatus of the present invention described above,
The conversion means converts the digital signal into a continuous data sequence of continuous zero coefficients and non-zero coefficients, and a series of zero coefficients having a predetermined run length and at least one non-continuous series of zero coefficients before or after the series of zero coefficients. For a plurality of events having zero coefficients, a plurality of table data representing code words to be given to each of the following events is stored in a storage means, and a plurality of events are obtained from a data string by an encoding means, and a table is obtained. Since one codeword is given to each of a plurality of events based on the data, the correlation between the coefficients can be used, and the coding efficiency can be greatly improved.

【0122】また上述せる本発明ディジタル信号の符号
化方法によれば、ステップ(a)において所定のディジ
タル信号を、連続する零係数と、非零係数とで連なるデ
ータ列に変換し、ステップ(b)において非零係数を、
その値に応じて複数のグループに分類し、ステップ
(c)においてデータ列から、所定のランレングスを有
する零係数の連続と、零係数の連続の前または後に連な
る少なくとも1つの非零係数とでなる複数の事象を得、
ステップ(d)において夫々の事象に対して、1つ前の
事象におけるグループ毎に符号語を与えるテーブルデー
タを基に、複数の事象に対して、夫々1つの符号語を決
定するようにしたので、係数同士の相関を利用でき、こ
れによって符号化効率を大幅に向上させることができる
という効果がある。
Further, according to the above-described digital signal encoding method of the present invention, in step (a), the predetermined digital signal is converted into a continuous data sequence of continuous zero coefficients and non-zero coefficients, and step (b) ), The non-zero coefficient is
According to the value, the data is classified into a plurality of groups. In step (c), the data sequence is divided into a series of zero coefficients having a predetermined run length and at least one non-zero coefficient connected before or after the series of zero coefficients. Multiple events,
In step (d), one codeword is determined for each of a plurality of events based on table data that provides a codeword for each group in the immediately preceding event for each event. , The correlation between the coefficients can be used, and thereby the coding efficiency can be greatly improved.

【0123】更に上述において本発明ディジタル信号の
符号化方法によれば、ステップ(d)において、更にグ
ループ内における順位情報を符号語に付加するようにし
たので、上述の効果に加え、復号化の効率を向上させる
ことができる。
Further, according to the digital signal encoding method of the present invention described above, in step (d), the rank information in the group is further added to the code word. Efficiency can be improved.

【0124】また上述せる本発明ディジタル信号の符号
化方法によれば、ステップ(a)において所定のディジ
タル信号を、連続する零係数と、非零係数とで連なるデ
ータ列に変換し、ステップ(b)においてデータ列か
ら、所定のランレングスを有する零係数と、零係数の連
続の前または後に連なる少なくとも1つの非零係数とで
なる複数の事象を得、ステップ(c)において非零係数
を、その値に応じて複数のグループに分類し、ステップ
(d)において各グループに対し、その次に現れる各事
象の発生頻度を検出し、ステップ(e)において各事象
の発生頻度に応じて、所望のデータ列を前データ列の状
態に応じて符号化する際に使用するテーブルデータを生
成してメモリに記憶し、ステップ(f)において任意の
ディジタル信号を、連続する零係数と、非零係数とで連
なるデータ列に変換し、ステップ(g)においてステッ
プ(f)で得たデータ列から、各事象を得、ステップ
(h)においてテーブルデータを基に、ステップ(g)
で得た複数の事象に対して、夫々1つの符号語を決定す
るようにしたので、1つの符号語を決定するようにした
ので、係数同士の相関を利用でき、これによって符号
化、復号化効率を大幅に向上させることができるという
効果がある。
Further, according to the above-described digital signal encoding method of the present invention, in step (a), the predetermined digital signal is converted into a continuous data sequence of continuous zero coefficients and non-zero coefficients, and step (b) ), From the data sequence, a plurality of events consisting of a zero coefficient having a predetermined run length and at least one non-zero coefficient before or after the continuation of the zero coefficient are obtained, and in step (c), the non-zero coefficient is obtained by: In step (d), the frequency of occurrence of each event that appears next is detected for each group, and in step (e), a desired frequency is determined according to the frequency of occurrence of each event. Table data to be used in encoding the data sequence according to the state of the preceding data sequence is generated and stored in the memory. In step (f), an arbitrary digital signal is In the step (g), each event is obtained from the data string obtained in the step (f). In the step (h), based on the table data, Step (g)
Since one code word is determined for each of the plurality of events obtained in the above, one code word is determined, so that correlation between coefficients can be used, thereby performing encoding and decoding. There is an effect that efficiency can be greatly improved.

【0125】また上述せる本発明符号化装置によれば、
変換手段でディジタル信号を、連続する零係数と、非零
係数とで連なるデータ列に変換し、分類手段により非零
係数を、その値に応じて複数のグループに分類し、所定
のランレングスを有する零係数の連続と、零係数の連続
の前または後に連なる少なくとも1つの非零係数とでな
る複数の事象に対し、夫々のグループに応じて夫々次に
くる事象に対して与える符号語を表す複数のテーブルデ
ータを記憶手段に記憶し、符号化手段でデータ列から複
数の事象を得て、テーブルデータを基に、複数の事象に
対して、夫々1つの符号語を与えるようにしたので、係
数同士の相関を利用でき、これによって符号化効率を大
幅に向上させることができるという効果がある。
Further, according to the encoding apparatus of the present invention described above,
The conversion means converts the digital signal into a continuous data sequence with continuous zero coefficients and non-zero coefficients, classifies the non-zero coefficients into a plurality of groups according to the values, and classifies a predetermined run length. For a plurality of events consisting of a series of zero coefficients and at least one non-zero coefficient before or after the series of zero coefficients, a code word to be given to an event that comes next according to each group. Since a plurality of table data are stored in the storage unit, a plurality of events are obtained from the data sequence by the encoding unit, and one code word is given to each of the plurality of events based on the table data. There is an effect that the correlation between the coefficients can be used, and thereby the coding efficiency can be greatly improved.

【0126】また上述せる本発明符号化装置によれば、
変換手段でディジタル信号を、所定の形態のデータ列に
変換し、所定の形態のデータ列における複数の事象に対
し、夫々次にくる事象に対して与える符号語を表す複数
のテーブルデータを記憶手段に記憶し、符号化手段で
ータ列から複数の事象を得て、テーブルデータを基に、
複数の事象に対して、夫々1つの符号語を与えるので、
前後のデータの相関を利用でき、これによって符号化効
率を大幅に向上させることができるという効果がある。
また上述せる本発明符号化方法の構成によれば、ディジ
タル信号を、所定の形態のデータ列に変換し、所定の形
態のデータ列における複数の事象に対し、夫々次にくる
事象に対して与える符号語を表す複数のテーブルデータ
を記憶し、データ列から複数の事象を得て、テーブルデ
ータを基に、複数の事象に対して、夫々1つの符号語を
与えるので、前後のデータの相関を利用でき、これによ
って符号化効率を大幅に向上させることができるという
効果がある。
Further, according to the encoding apparatus of the present invention described above,
The conversion means converts the digital signal into a data stream of a predetermined form and responds to a plurality of events in the data stream of the predetermined form.
And a plurality of codewords to be given to the next event
Storing table data in a storage unit, de-in coding means
Obtain multiple events from the data sequence and, based on the table data,
Since one code word is given to each of multiple events,
There is an effect that the correlation between the preceding and following data can be used, and thereby the coding efficiency can be greatly improved.
According to the configuration of the encoding method of the present invention described above,
Signal is converted into a data stream in a predetermined format, and
Next to multiple events in the data string
Multiple table data representing codewords given to events
To obtain multiple events from the data sequence,
One codeword for each of multiple events based on data
To use the correlation between the data before and after.
Can greatly improve the coding efficiency
effective.

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

【図1】本発明ディジタル信号の符号化方法、符号化装
置及び符号化方法の一実施例を示す高能率符号化装置の
構成図である。
FIG. 1 is a configuration diagram of a high-efficiency encoding apparatus showing an embodiment of an encoding method, an encoding apparatus, and an encoding method of a digital signal according to the present invention.

【図2】本発明符号化用テーブル生成方法の一実施例を
示すハフマンテーブル生成装置の構成図である。
FIG. 2 is a configuration diagram of a Huffman table generation device showing an embodiment of a coding table generation method of the present invention.

【図3】本発明符号化用テーブル生成方法の他の例を示
すハフマンテーブル生成装置の構成図である。
FIG. 3 is a configuration diagram of a Huffman table generation device showing another example of the encoding table generation method of the present invention.

【図4】本発明ディジタル信号の符号化方法、符号化装
置及び符号化方法の一実施例の説明に供する係数データ
に対する符号の決定を説明するための説明図である。
FIG. 4 is an explanatory diagram for explaining a determination of a code for coefficient data for explaining an embodiment of a digital signal encoding method, an encoding device, and an encoding method according to the present invention.

【図5】本発明ディジタル信号の符号化方法、符号化装
置及び符号化方法の一実施例の説明に供する条件系列
(0ラン、値)に対応したテーブルを説明するための説
明図である。
FIG. 5 is an explanatory diagram for explaining a table corresponding to a condition series (0 run, value) used for describing an embodiment of a digital signal encoding method, an encoding device, and an encoding method of the present invention.

【図6】本発明ディジタル信号の符号化方法、符号化装
置及び符号化方法の一実施例の説明に供する係数データ
の値、条件系列に基いて符号を決定する場合の例を示す
説明図である。
FIG. 6 is an explanatory diagram showing an example of a case where a code is determined based on a coefficient data value and a condition sequence for explaining an embodiment of a digital signal encoding method, an encoding apparatus, and an encoding method of the present invention. is there.

【図7】本発明符号化用テーブル生成方法の一実施例の
説明に供する係数データのサイズを決定するためのテー
ブルを示す説明図である。
FIG. 7 is an explanatory diagram showing a table for determining the size of coefficient data for explaining an embodiment of the encoding table generation method of the present invention.

【図8】本発明符号化用テーブル生成方法の一実施例の
説明に供する条件系列に対応したテーブルを作成する動
作を説明するためのフローチャートである。
FIG. 8 is a flowchart for explaining an operation of creating a table corresponding to a condition series for explaining an embodiment of the encoding table generation method of the present invention.

【図9】本発明ディジタル信号の符号化方法、符号化装
置及び符号化方法の一実施例の説明に供するサイズ
“0”に対応したテーブルの例を示す説明図である。
FIG. 9 is an explanatory diagram showing an example of a table corresponding to a size “0” for explaining an embodiment of a digital signal encoding method, an encoding device, and an encoding method of the present invention.

【図10】本発明ディジタル信号の符号化方法、符号化
装置及び符号化方法の一実施例の説明に供するサイズ
“1”に対応したテーブルの例を示す説明図である。
FIG. 10 is an explanatory diagram showing an example of a table corresponding to a size “1” for describing an embodiment of a digital signal encoding method, an encoding device, and an encoding method of the present invention.

【図11】本発明ディジタル信号の符号化方法、符号化
装置及び符号化方法の一実施例の説明に供するサイズ
“2”に対応したテーブルの例を示す説明図である。
FIG. 11 is an explanatory diagram showing an example of a table corresponding to a size “2” for describing an embodiment of a digital signal encoding method, an encoding device, and an encoding method according to the present invention.

【図12】本発明ディジタル信号の符号化方法、符号化
装置及び符号化方法の一実施例の説明に供するサイズ
“3”に対応したテーブルの例を示す説明図である。
FIG. 12 is an explanatory diagram showing an example of a table corresponding to a size “3” for explaining an embodiment of a digital signal encoding method, an encoding device, and an encoding method of the present invention.

【図13】本発明ディジタル信号の符号化方法、符号化
装置及び符号化方法の一実施例の説明に供するサイズ
“4”に対応したテーブルの例を示す説明図である。
FIG. 13 is an explanatory diagram showing an example of a table corresponding to a size “4” for describing an embodiment of a digital signal encoding method, an encoding device, and an encoding method of the present invention.

【図14】本発明ディジタル信号の符号化方法、符号化
装置及び符号化方法の一実施例の説明に供するサイズ
“5”に対応したテーブルの例を示す説明図である。
FIG. 14 is an explanatory diagram showing an example of a table corresponding to a size “5” for explaining an embodiment of a digital signal encoding method, an encoding device, and an encoding method of the present invention.

【図15】本発明ディジタル信号の符号化方法、符号化
装置及び符号化方法の一実施例の説明に供するサイズ
“6”に対応したテーブルの例を示す説明図である。
FIG. 15 is an explanatory diagram showing an example of a table corresponding to a size “6” for explaining an embodiment of an encoding method, an encoding device, and an encoding method of a digital signal of the present invention.

【図16】本発明ディジタル信号の符号化方法、符号化
装置及び符号化方法の一実施例の説明に供するサイズ
“7”に対応したテーブルの例を示す説明図である。
FIG. 16 is an explanatory diagram showing an example of a table corresponding to a size “7” for explaining an embodiment of a digital signal encoding method, an encoding device, and an encoding method of the present invention.

【図17】本発明ディジタル信号の符号化方法、符号化
装置及び符号化方法の一実施例の説明に供するサイズ
“8”に対応したテーブルの例を示す説明図である。
FIG. 17 is an explanatory diagram showing an example of a table corresponding to a size “8” used for describing an embodiment of a digital signal encoding method, an encoding device, and an encoding method of the present invention.

【図18】本発明ディジタル信号の符号化方法、符号化
装置及び符号化方法の一実施例の説明に供するサイズ
“9”に対応したテーブルの例を示す説明図である。
FIG. 18 is an explanatory diagram showing an example of a table corresponding to a size “9” for explaining an embodiment of a digital signal encoding method, an encoding device, and an encoding method according to the present invention.

【図19】本発明ディジタル信号の符号化方法、符号化
装置及び符号化方法の一実施例の説明に供するサイズ
“10”に対応したテーブルの例を示す説明図である。
FIG. 19 is an explanatory diagram showing an example of a table corresponding to a size “10” for explaining an embodiment of a digital signal encoding method, an encoding device, and an encoding method of the present invention.

【図20】本発明ディジタル信号の符号化方法、符号化
装置及び符号化方法の一実施例の説明に供するサイズ
“11”に対応したテーブルの例を示す説明図である。
FIG. 20 is an explanatory diagram showing an example of a table corresponding to a size “11” used for describing an embodiment of a digital signal encoding method, an encoding device, and an encoding method according to the present invention.

【図21】本発明ディジタル信号の符号化方法、符号化
装置及び符号化方法の一実施例の説明に供するサイズ
“12”に対応したテーブルの例を示す説明図である。
FIG. 21 is an explanatory diagram showing an example of a table corresponding to a size “12” for explaining an embodiment of an encoding method, an encoding device, and an encoding method of a digital signal of the present invention.

【図22】本発明ディジタル信号の符号化方法、符号化
装置及び符号化方法の一実施例の説明に供するサイズ
“13”に対応したテーブルの例を示す説明図である。
FIG. 22 is an explanatory diagram showing an example of a table corresponding to a size “13” for explaining an embodiment of a digital signal encoding method, an encoding device, and an encoding method according to the present invention.

【図23】本発明ディジタル信号の符号化方法、符号化
装置及び符号化方法の一実施例の説明に供する交流成分
の先頭の係数を変換するためのテーブルの例を示す説明
図である。
FIG. 23 is an explanatory diagram showing an example of a table for converting a leading coefficient of an AC component used for describing an embodiment of a digital signal encoding method, an encoding device, and an encoding method of the present invention.

【図24】従来の符号化装置の説明に供する離散コサイ
ン変換スキャン方法の説明図である。
FIG. 24 is an explanatory diagram of a discrete cosine transform scanning method for describing a conventional encoding device.

【図25】従来の符号化装置の説明に供する0の連続数
及び最後の0に続く係数値に基いた符号決定を説明する
ための説明図である。
FIG. 25 is an explanatory diagram for explaining a code determination based on the number of consecutive 0s and a coefficient value following the last 0, which is used for describing a conventional encoding device.

【図26】従来の符号化装置の説明に供する係数データ
の符号化を説明するための説明図である。
FIG. 26 is an explanatory diagram for describing encoding of coefficient data for describing a conventional encoding device.

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

2、12 変換回路 3、13 量子化回路 4 可変長符号化回路 4a、16 メモリ 7 可変長符号復号化回路 8 量子化復元回路 9 逆変換回路 14 ハフマン符号化回路 15 発生頻度検出回路 17 コントローラ 17a 制御部 17b ROM 18 スイッチ 2,12 conversion circuit 3,13 quantization circuit 4 variable length coding circuit 4a, 16 memory 7 variable length code decoding circuit 8 quantization restoration circuit 9 inverse conversion circuit 14 Huffman coding circuit 15 occurrence frequency detection circuit 17 controller 17a Control unit 17b ROM 18 switch

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 平5−46358(JP,A) 特表 昭61−500345(JP,A) (58)調査した分野(Int.Cl.7,DB名) H03M 7/40 H04N 1/41 ──────────────────────────────────────────────────続 き Continuation of the front page (56) References JP-A-5-46358 (JP, A) Special Table Sho 61-500345 (JP, A) (58) Fields investigated (Int. Cl. 7 , DB name) H03M 7/40 H04N 1/41

Claims (10)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 ディジタル信号を、連続する零係数と、
非零係数とで連なるデータ列に変換するステップ(a)
と、 上記データ列から、所定のランレングスを有する零係数
の連続と、上記零係数の連続の前または後に連なる少な
くとも1つの非零係数とでなる複数の事象を得るステッ
プ(b)と、 1つ前の事象毎に応じて、各事象に対して異なる符号語
を与えるテーブルデータを基に、上記複数の事象に対し
て、1つの符号語を設定するステップ(c)とからなる
ことを特徴とするディジタル信号の符号化方法。
1. A digital signal comprising: a continuous zero coefficient;
Step (a) of converting to a data sequence that is continuous with non-zero coefficients
(B) obtaining from the data sequence a plurality of events consisting of a series of zero coefficients having a predetermined run length and at least one non-zero coefficient preceding or following the series of zero coefficients; (C) setting one codeword for the plurality of events based on table data that gives a different codeword to each event in accordance with each preceding event. Encoding method of a digital signal.
【請求項2】 所定のディジタル信号を、連続する零係
数と、非零係数とで連なるデータ列に変換するステップ
(a)と、 上記データ列から、所定のランレングスを有する零係数
の連続と、上記零係数の連続の前または後に連なる少な
くとも1つの非零係数とでなる複数の事象を得るステッ
プ(b)と、 上記複数の事象の個々に対し、その事象の次に現れる各
事象の発生頻度を検出するステップ(c)と、 上記各事象の発生頻度に応じて、所望のデータ列を前の
データ列の状態に応じて符号化する際に使用するテーブ
ルデータを生成してメモリに記憶するステップ(d)と
からなることを特徴とする符号化用テーブル生成方法。
2. A step (a) of converting a predetermined digital signal into a data string that is continuous with continuous zero coefficients and non-zero coefficients, and, from the data string, a series of zero coefficients having a predetermined run length. (B) obtaining a plurality of events consisting of at least one non-zero coefficient before or after the series of zero coefficients, and for each of the plurality of events, occurrence of each event appearing next to the event (C) detecting the frequency; generating table data used in encoding a desired data sequence according to the state of the previous data sequence according to the frequency of occurrence of each of the above events; (D) generating a coding table.
【請求項3】 所定のディジタル信号を、連続する零係
数と、非零係数とで連なるデータ列に変換するステップ
(a)と、 上記データ列から、所定のランレングスを有する零係数
の連続と、上記零係数の連続の前または後に連なる少な
くとも1つの非零係数とでなる複数の事象を得るステッ
プ(b)と、 上記複数の事象の個々に対し、その事象の次に現れる各
事象の発生頻度を検出するステップ(c)と、 上記ステップ(c)で得た各事象の発生頻度に応じて、
所望のデータ列を前のデータ列の状態に応じて符号化す
る際に使用するテーブルデータを生成してメモリに記憶
するステップ(d)と、 任意のディジタル信号を、連続する零係数と、非零係数
とで連なるデータ列に変換するステップ(e)と、 上記ステップ(e)で得たデータ列から、上記各事象を
得るステップ(f)と、 上記テーブルデータを基に、上記ステップ(f)で得た
複数の事象に対して、1つの符号語を決定するステップ
(g)とからなることを特徴とするディジタル信号の符
号化方法。
3. A step (a) of converting a predetermined digital signal into a data string which is continuous with continuous zero coefficients and non-zero coefficients, and from the data string, a sequence of zero coefficients having a predetermined run length. (B) obtaining a plurality of events consisting of at least one non-zero coefficient before or after the series of zero coefficients, and for each of the plurality of events, occurrence of each event appearing next to the event (C) detecting the frequency, and according to the occurrence frequency of each event obtained in the step (c),
(D) generating table data to be used in encoding a desired data sequence according to the state of the previous data sequence and storing the table data in a memory; A step (e) of converting the data string into a series of zero coefficients, a step (f) of obtaining each event from the data string obtained in the step (e), and a step (f) based on the table data. (G) determining one code word for the plurality of events obtained in (d).
【請求項4】 ディジタル信号を、連続する零係数と、
非零係数とで連なるデータ列に変換する変換手段と、 所定のランレングスを有する零係数の連続と、上記零係
数の連続の前または後に連なる少なくとも1つの非零係
数とでなる複数の事象に対し、夫々次にくる事象に対し
て与える符号語を表す複数のテーブルデータを記憶して
なる記憶手段と、 上記データ列から上記複数の事象を得て、上記テーブル
データを基に、上記複数の事象に対して、夫々1つの符
号語を与える符号化手段からなることを特徴とする符号
化装置。
4. The method of claim 1, wherein the digital signal is represented by a continuous zero coefficient,
Conversion means for converting the data sequence into a series of non-zero coefficients; a plurality of events consisting of a series of zero coefficients having a predetermined run length and at least one non-zero coefficient before or after the series of zero coefficients. On the other hand, storage means for storing a plurality of table data each representing a code word to be given to the next event, and obtaining the plurality of events from the data sequence, based on the table data, An encoding device comprising encoding means for giving one code word to each event.
【請求項5】 所定のディジタル信号を、連続する零係
数と、非零係数とで連なるデータ列に変換するステップ
(a)と、 上記非零係数を、その値に応じて複数のグループに分類
するステップ(b)と、 上記データ列から、所定のランレングスを有する零係数
の連続と、上記零係数の連続の前または後に連なる少な
くとも1つの非零係数とでなる複数の事象を得るステッ
プ(c)と、 夫々の事象に対して、1つ前の事象における上記グルー
プ毎に符号語を与えるテーブルデータを基に、上記複数
の事象に対して、夫々1つの符号語を決定するステップ
(d)からなることを特徴とするディジタル信号の符号
化方法。
5. A step (a) of converting a predetermined digital signal into a continuous data sequence of continuous zero coefficients and non-zero coefficients, and classifying the non-zero coefficients into a plurality of groups according to their values. And (b) obtaining, from the data sequence, a plurality of events consisting of a sequence of zero coefficients having a predetermined run length and at least one non-zero coefficient before or after the sequence of zero coefficients. c) and determining one codeword for each of the plurality of events based on table data that provides codewords for each group in the previous event for each event (d) ), A method for encoding a digital signal.
【請求項6】 上記ステップ(d)において、更に上記
グループ内における順位情報を上記符号語に付加するよ
うにしたことを特徴とする請求項5記載のディジタル信
号の符号化方法。
6. The digital signal encoding method according to claim 5, wherein in the step (d), rank information in the group is further added to the codeword.
【請求項7】 所定のディジタル信号を、連続する零係
数と、非零係数とで連なるデータ列に変換するステップ
(a)と、 上記データ列から、所定のランレングスを有する零係数
と、上記零係数の連続の前または後に連なる少なくとも
1つの非零係数とでなる複数の事象を得るステップ
(b)と、 上記非零係数を、その値に応じて複数のグループに分類
するステップ(c)と、 上記各グループに対し、その次に現れる各事象の発生頻
度を検出するステップ(d)と、 上記各事象の発生頻度に応じて、所望のデータ列を前デ
ータ列の状態に応じて符号化する際に使用するテーブル
データを生成してメモリに記憶するステップ(e)と、 任意のディジタル信号を、連続する零係数と、非零係数
とで連なるデータ列に変換するステップ(f)と、 上記ステップ(f)で得たデータ列から、上記各事象を
得るステップ(g)と、 上記テーブルデータを基に、上記ステップ(g)で得た
複数の事象に対して、夫々1つの符号語を決定するステ
ップ(h)とからなることを特徴とするディジタル信号
の符号化方法。
7. A step (a) of converting a predetermined digital signal into a continuous data sequence consisting of continuous zero coefficients and non-zero coefficients, and from said data sequence, a zero coefficient having a predetermined run length; (B) obtaining a plurality of events consisting of at least one non-zero coefficient before or after the series of zero coefficients; and (c) classifying the non-zero coefficients into a plurality of groups according to their values. (D) detecting, for each of the groups, the frequency of occurrence of each of the following events; (E) generating table data to be used at the time of conversion and storing it in a memory; and (f) converting an arbitrary digital signal into a continuous data sequence of continuous zero coefficients and non-zero coefficients. , (G) obtaining each event from the data string obtained in the step (f); and codewords for each of the plurality of events obtained in the step (g) based on the table data. (H) determining a digital signal.
【請求項8】 ディジタル信号を、連続する零係数と、
非零係数とで連なるデータ列に変換する変換手段と、 上記非零係数を、その値に応じて複数のグループに分類
する分類手段と、 所定のランレングスを有する零係数の連続と、上記零係
数の連続の前または後に連なる少なくとも1つの非零係
数とでなる複数の事象に対し、夫々のグループに応じて
夫々次にくる事象に対して与える符号語を表す複数のテ
ーブルデータを記憶してなる記憶手段と、 上記データ列から上記複数の事象を得て、上記テーブル
データを基に、上記複数の事象に対して、夫々1つの符
号語を与える符号化手段とからなることを特徴とする符
号化装置。
8. The method of claim 1, further comprising: converting the digital signal to a continuous zero coefficient;
Converting means for converting the data into a series of data with non-zero coefficients; classifying means for classifying the non-zero coefficients into a plurality of groups according to their values; continuation of zero coefficients having a predetermined run length; For a plurality of events consisting of at least one non-zero coefficient before or after a series of coefficients, a plurality of table data representing a code word to be given to an event that comes next according to each group is stored. Storage means, and encoding means for obtaining the plurality of events from the data sequence and giving one codeword to each of the plurality of events based on the table data. Encoding device.
【請求項9】 ディジタル信号を、所定の形態のデータ
列に変換する変換手段と、 上記所定の形態のデータ列における複数の事象に対し、
夫々次にくる事象に対して与える符号語を表す複数のテ
ーブルデータを記憶してなる記憶手段と、 上記データ列から上記複数の事象を得るとともに、得ら
れた各事象に対して、その前に符号化された事象に応じ
て上記テーブルデータを参照することにより、1つの符
号語を与える符号化手段からなることを特徴とする符号
化装置。
9. A conversion means for converting a digital signal into a data stream in a predetermined form, and a plurality of events in the data stream in the predetermined form.
Storage means for storing a plurality of table data each representing a code word given to the next event; and obtaining the plurality of events from the data sequence .
For each event that is encoded,
By referring to the above table data,
An encoding device comprising encoding means for giving a word .
【請求項10】 ディジタル信号を、所定の形態のデー
タ列に変換する変換ステップと、 上記データ列から上記複数の事象を得るとともに、1つ
前の事象毎に応じて、各事象に対して異なる符号語を与
えるテーブルデータを基に、得られた各事象に対して、
その前に符号化された事象に応じて上記テーブルデータ
を参照することにより、1つの符号語を与える符号化ス
テップからなることを特徴とする符号化方法。
10. A conversion step of converting a digital signal into a data stream of a predetermined form, obtaining the plurality of events from the data stream, and
A different codeword is assigned to each event depending on the previous event.
Based on the obtained table data, for each obtained event,
The above table data according to the event encoded before
, An encoding step of giving one code word .
JP1810794A 1993-03-19 1994-02-15 Digital signal encoding method, encoding table generation method, encoding apparatus, and encoding method Expired - Lifetime JP3277425B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1810794A JP3277425B2 (en) 1993-03-19 1994-02-15 Digital signal encoding method, encoding table generation method, encoding apparatus, and encoding method

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP6028693 1993-03-19
JP5-60286 1993-03-19
JP1810794A JP3277425B2 (en) 1993-03-19 1994-02-15 Digital signal encoding method, encoding table generation method, encoding apparatus, and encoding method

Publications (2)

Publication Number Publication Date
JPH06343168A JPH06343168A (en) 1994-12-13
JP3277425B2 true JP3277425B2 (en) 2002-04-22

Family

ID=26354728

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1810794A Expired - Lifetime JP3277425B2 (en) 1993-03-19 1994-02-15 Digital signal encoding method, encoding table generation method, encoding apparatus, and encoding method

Country Status (1)

Country Link
JP (1) JP3277425B2 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2575697A (en) * 1996-04-16 1997-11-07 Dome Inc. Encoder, decoder, encoding method and decoding method
JP2001094433A (en) 1999-09-17 2001-04-06 Matsushita Electric Ind Co Ltd Sub-band coding and decoding medium
JP4570006B2 (en) * 2001-09-25 2010-10-27 株式会社リコー Encoding apparatus, encoding method, and decoding apparatus
JP4368575B2 (en) 2002-04-19 2009-11-18 パナソニック株式会社 Variable length decoding method, variable length decoding apparatus and program
JP4515994B2 (en) * 2002-04-19 2010-08-04 パナソニック株式会社 Variable length coding method, variable length coding apparatus and program
JP4090862B2 (en) 2002-04-26 2008-05-28 松下電器産業株式会社 Variable length encoding method and variable length decoding method
JP2006324944A (en) * 2005-05-19 2006-11-30 Renesas Technology Corp Encoding device

Also Published As

Publication number Publication date
JPH06343168A (en) 1994-12-13

Similar Documents

Publication Publication Date Title
KR100289589B1 (en) Digital signal encoding method, encoding table generation method, encoding apparatus and encoding method
JP3210996B2 (en) High efficiency coding device and high efficiency decoding device
JP3380810B2 (en) Image coding method
US7411526B2 (en) Variable length coding method and variable length decoding method
JP3446237B2 (en) Variable length code table generation method and apparatus
JP3277425B2 (en) Digital signal encoding method, encoding table generation method, encoding apparatus, and encoding method
JP2000165252A (en) Data compression method and device
JP3009993B2 (en) Huffman decoding device
KR100200627B1 (en) Video signal compression encoding device
KR100255062B1 (en) Circuit for zero-run developing run/level sets and method for zero-run developing the same
JP3015001B2 (en) Huffman decoding device
JP3158648B2 (en) Digital special effect generator
JPH09154133A (en) Image encoder and variable length coding method
JP3005384B2 (en) Huffman decoding circuit
KR0134359B1 (en) Coding and decoding system of variable scan region
JPH06245200A (en) Method and device for scanning two-dimensional data by energy distribution
JP3238444B2 (en) Image coding system and image decoding system
JP3093485B2 (en) Decryption device
KR0134358B1 (en) Coding and decoding system of variable scan method
JPH02248162A (en) Picture data encoding system
JP2001128176A (en) Image compressing and expanding device
JP2005303680A (en) Decoding device and decoding method
JPS6356020A (en) Compression decoding device
JPH06284411A (en) Coder
JPH05207292A (en) Variable length coding decoding circuit

Legal Events

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

Free format text: PAYMENT UNTIL: 20080215

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20090215

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20100215

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20100215

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20110215

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20120215

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20130215

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20140215

Year of fee payment: 12

EXPY Cancellation because of completion of term