JP2003318740A - Variable length encoding method and variable length decoding method - Google Patents

Variable length encoding method and variable length decoding method

Info

Publication number
JP2003318740A
JP2003318740A JP2002121052A JP2002121052A JP2003318740A JP 2003318740 A JP2003318740 A JP 2003318740A JP 2002121052 A JP2002121052 A JP 2002121052A JP 2002121052 A JP2002121052 A JP 2002121052A JP 2003318740 A JP2003318740 A JP 2003318740A
Authority
JP
Japan
Prior art keywords
value
values
binarization
coefficient
absolute value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2002121052A
Other languages
Japanese (ja)
Inventor
Toshiyuki Kondo
敏志 近藤
Shinya Sumino
眞也 角野
Makoto Hagai
誠 羽飼
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2002121052A priority Critical patent/JP2003318740A/en
Publication of JP2003318740A publication Critical patent/JP2003318740A/en
Pending legal-status Critical Current

Links

Abstract

<P>PROBLEM TO BE SOLVED: To improve encoding efficiency for variable length encoding in image encoding. <P>SOLUTION: An RL row generating portion 201 makes a frequency coefficient value dimensional by a predetermined scanning order from a low frequency component to a high frequency component, and generates a combined (RL value) row of a successive number R of coefficients whose coefficient value is 0 and a following coefficient value L. A rearranging portion 202 rearranges a row of the RL value in inverse order. A cord assigning portion 203 converts the row of RL value, from the top, into variable length codes by using a first variable length conversion table, and converts the following RL value into the variable length codes by using a second variable length conversion table, when an absolute value of L of the RL value which is a conversion object becomes equal to or more than a predetermined threshold value. <P>COPYRIGHT: (C)2004,JPO

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、画像データを算術
符号化を用いて符号化および復号化を行う際に、画像デ
ータの係数値を符号化および復号化する方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for coding and decoding coefficient values of image data when the image data is coded and decoded by using arithmetic coding.

【0002】[0002]

【従来の技術】動画像符号化処理では、一般に動画像が
有する空間方向および時間方向の冗長性を利用して情報
量の圧縮が行われる。ここで一般に、空間方向の冗長性
を利用する方法としては、周波数領域への変換が用いら
れ、時間方向の冗長性を利用する方法としては、ピクチ
ャ間予測符号化処理が用いられる。
2. Description of the Related Art In a moving image coding process, the amount of information is compressed by utilizing the spatial and temporal redundancy of moving images. Generally, as a method of utilizing the redundancy in the spatial direction, conversion into the frequency domain is used, and as a method of utilizing the redundancy in the time direction, an inter-picture predictive coding process is used.

【0003】H.26Lとして規格化作業中の動画像符
号化方式では、可変長符号化方法として、算術符号化を
用いるモードが提案されている。ここでは、4×4画素
の大きさを有するブロック単位で周波数変換を行い、さ
らに量子化を行って係数値を生成する。そして、直流成
分から高周波数成分に向かって走査し、連続する値が0
である係数の個数Rとそれに続く係数値Lとの組み合わ
せを作成する。そして、これらのR、Lの値を2値化テ
ーブルを用いて0と1に2値化した後、2値算術符号化
を施す。例えば、係数値Lの絶対値に対する2値化テー
ブルには、図8のようなテーブルが用いられる。
H. In the moving picture coding method under standardization as 26L, a mode using arithmetic coding has been proposed as a variable length coding method. Here, frequency conversion is performed for each block having a size of 4 × 4 pixels, and further quantization is performed to generate coefficient values. Then, scanning is performed from the DC component toward the high frequency component, and continuous values are 0
Then, a combination of the number R of coefficients and the subsequent coefficient value L is created. Then, these R and L values are binarized into 0 and 1 using a binarization table, and then binary arithmetic coding is performed. For example, a table as shown in FIG. 8 is used as the binarization table for the absolute value of the coefficient value L.

【0004】[0004]

【発明が解決しようとする課題】上記従来の方法では、
係数値Lの絶対値が大きくなると、符号長が長くなり、
符号化効率の低下を招く。一般に、低周波数成分値の係
数値Lの絶対値は大きな値となるため、低周波数成分値
を符号化する際の符号化効率の低下が顕著となる。
SUMMARY OF THE INVENTION In the above conventional method,
When the absolute value of the coefficient value L increases, the code length increases,
This leads to a decrease in coding efficiency. In general, since the absolute value of the coefficient value L of the low frequency component value is a large value, the coding efficiency when coding the low frequency component value is significantly reduced.

【0005】[0005]

【課題を解決するための手段】上記目的を達成するため
に、本発明の可変長符号化方法は、請求項1の構成によ
ると、画像データを所定の大きさを有するブロック単位
で分割し、前記ブロックの周波数係数値を符号化する際
の可変長符号化方法であって、前記ブロック内の周波数
係数値を、低周波数成分から高周波数成分への所定の走
査順序により一次元化し、係数値が0である係数の連続
数Rと、それに続く係数値Lとの組み合わせ(RL値)
の列を生成する組み合わせ列生成ステップと、前記組み
合わせ列生成ステップにより生成されたRL値の列を、
逆順に並べ直す並べ替えステップと、前記並べ替えステ
ップにより並べ替えられたLの値の列を、先頭のLの値
であるか、または直前のLの絶対値が所定のしきい値以
下である場合には、第1の2値化テーブルを用いて2値
化列に変換し、直前のLの絶対値が前記しきい値を超え
る場合には、第2の2値化テーブルを用いて2値化列に
変換する2値化ステップと、前記2値化ステップにより
得られた2値化列に対して算術符号化を施して可変長符
号に変換する算術符号化ステップとからなる構成を有し
ている。
In order to achieve the above object, the variable length coding method of the present invention has a structure according to claim 1 in which image data is divided into blocks having a predetermined size, A variable-length encoding method for encoding frequency coefficient values of the block, wherein the frequency coefficient values in the block are one-dimensionalized in a predetermined scanning order from a low frequency component to a high frequency component, and a coefficient value A combination of the number R of consecutive coefficients whose value is 0 and the subsequent coefficient value L (RL value)
And a sequence of RL values generated in the combination sequence generation step,
The rearrangement step of rearranging in the reverse order and the sequence of L values rearranged by the rearrangement step are the first L value or the immediately preceding absolute value of L is less than or equal to a predetermined threshold value. In this case, the first binarization table is used for conversion into a binarization sequence, and when the immediately preceding absolute value of L exceeds the threshold value, the second binarization table is used for conversion to 2 It has a configuration including a binarization step of converting into a binarized sequence and an arithmetic coding step of performing arithmetic coding on the binarized sequence obtained by the binarization step and converting into a variable length code. is doing.

【0006】また本発明の可変長復号化方法は、請求項
6の構成によると、画像データを所定の大きさを有する
ブロック単位で分割し、前記ブロックの周波数係数値
を、所定の走査順序で一次元化し、連続する係数値が0
である係数の連続数Rと、それに続く係数値Lとの組み
合わせ(RL値)の列を符号化して生成された符号列を
復号化する際の可変長復号化方法であって、前記符号列
を算術復号化を用いて2値化列に復号化する算術復号化
ステップと、前記算術復号化ステップにより得られた2
値化列に対して、先頭の2値化値であるか、または直前
のLの絶対値が所定のしきい値以下である場合には、第
1の2値化テーブルを用いてLの絶対値への変換を施
し、直前のLの絶対値が前記しきい値を超える場合に
は、第2の2値化テーブルを用いてLの絶対値への変換
を施す多値化ステップと、前記多値化ステップにより生
成されたRL値の列を逆順に並べ替える並べ替えステッ
プと、前記並べ替えステップにより並べ替えられたRL
値の列を連続する値が0である係数の個数Rとそれに続
く係数値Lとに戻し、その組み合わせから周波数係数値
を生成する係数生成ステップとからなる構成を有してい
る。
According to a sixth aspect of the variable length decoding method of the present invention, the image data is divided into blocks each having a predetermined size, and the frequency coefficient values of the blocks are scanned in a predetermined scanning order. One-dimensional, continuous coefficient value is 0
A variable length decoding method for decoding a code string generated by coding a combination (RL value) of a continuous number R of coefficients and a subsequent coefficient value L. Arithmetic decoding step for decoding the binary sequence into a binary string using arithmetic decoding, and 2 obtained by the arithmetic decoding step.
For the binarized string, if it is the first binarized value or the absolute value of L immediately before is less than or equal to a predetermined threshold value, the absolute binarization of L is performed using the first binarization table. Converting to an absolute value of L by using a second binarization table when the absolute value of L immediately before exceeds the threshold value. A rearrangement step of rearranging the sequence of RL values generated by the multi-value quantization step in reverse order, and an RL rearranged by the rearrangement step.
It has a configuration including a coefficient generation step of returning a sequence of values to the number R of consecutive coefficients having a value of 0 and the subsequent coefficient value L and generating a frequency coefficient value from the combination thereof.

【0007】[0007]

【発明の実施の形態】本発明における実施の形態を図面
を参照して説明する。実施の形態1は、本発明の可変長
符号化方法を用いてフレーム内符号化処理を行う場合を
示している。 (第一の実施の形態)図1は、ブロック変換部101、
周波数変換部102、量子化部103、可変長符号化部
104から構成される本発明の動画像符号化方法のブロ
ック図である。入力画像はブロック変換部101に入力
され、水平4画素、垂直4画素の大きさを有するブロッ
クに分割され、周波数変換部102に入力される。周波
数変換部102では、入力された画素ブロックに対し
て、周波数変換を施し、周波数係数に変換する。変換さ
れた周波数係数は量子化部103に入力される。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described with reference to the drawings. The first embodiment shows a case where intraframe coding processing is performed using the variable length coding method of the present invention. (First Embodiment) FIG. 1 shows a block conversion unit 101,
FIG. 3 is a block diagram of a moving picture coding method according to the present invention, which includes a frequency conversion unit 102, a quantization unit 103, and a variable length coding unit 104. The input image is input to the block conversion unit 101, divided into blocks having a size of 4 horizontal pixels and 4 vertical pixels, and input to the frequency conversion unit 102. The frequency conversion unit 102 performs frequency conversion on the input pixel block and converts it into a frequency coefficient. The converted frequency coefficient is input to the quantization unit 103.

【0008】量子化部103では、入力された周波数係
数に対して、量子化処理を行う。ここで量子化処理と
は、周波数係数値を所定の量子化値によって除算するこ
とを意味する。ここで量子化値は、一般的にブロック
毎、周波数帯域毎によって異なる。量子化された周波数
係数は可変長符号化部104に入力される。可変長符号
化部104の構成を図2に示す。図2に示すように可変
長符号化部104は、RL列生成部201、並べ替え部
202、2値化部203、テーブル記憶部204、算術
符号化部205から構成される。
The quantizing unit 103 performs a quantizing process on the input frequency coefficient. Here, the quantization processing means dividing the frequency coefficient value by a predetermined quantization value. Here, the quantized value generally differs for each block and each frequency band. The quantized frequency coefficient is input to the variable length coding unit 104. The structure of the variable length coding unit 104 is shown in FIG. As shown in FIG. 2, the variable length coding unit 104 includes an RL sequence generation unit 201, a rearrangement unit 202, a binarization unit 203, a table storage unit 204, and an arithmetic coding unit 205.

【0009】量子化部103から出力された量子化され
た周波数係数は、組み合わせ列生成部201に入力され
る。RL列生成部201では、まず量子化された周波数
係数値を所定の走査方法で一次元化する。そして、一次
元化された係数値に対して、連続する係数値0の個数R
とそれに続く0以外の係数値Lとの組み合わせ(以下、
RL値と呼ぶ)の列(以下、RL列と呼ぶ)を生成す
る。その例を図3、図4を用いて説明する。
The quantized frequency coefficient output from the quantizer 103 is input to the combination sequence generator 201. In the RL string generation unit 201, the quantized frequency coefficient value is first dimensionalized by a predetermined scanning method. Then, the number R of consecutive coefficient values 0 with respect to the one-dimensionalized coefficient value R
And a subsequent coefficient value L other than 0 (hereinafter,
A sequence of RL values) (hereinafter referred to as RL sequence) is generated. An example thereof will be described with reference to FIGS.

【0010】図3(a)は、量子化部103から出力さ
れた量子化された周波数係数を示す。ここで、左上の係
数が直流成分を示すとし、右に向かうほど水平方向の周
波数成分が高くなり、下に向かうほど垂直方向の周波数
成分が高くなるとする。図3(b)は、量子化された周
波数係数値を一次元化する際の走査方法を示す。低周波
数領域から高周波数領域に向かって走査することによ
り、一次元化を行う。そして、一次元化された係数値に
対して、RL列を生成した結果が図4(a)となる。こ
こで図4(a)の中で、最初の数字は係数の個数を示
す。一般的に高周波数成分ほど係数値が0になりやすい
ので、低周波数領域から高周波数領域に向かって走査す
ることにより、RL列の情報量を小さくすることができ
る。生成されたRL列は並べ替え部202に入力され
る。
FIG. 3A shows the quantized frequency coefficients output from the quantizer 103. Here, it is assumed that the coefficient at the upper left indicates a DC component, the frequency component in the horizontal direction increases toward the right, and the frequency component in the vertical direction increases toward the bottom. FIG. 3B shows a scanning method for one-dimensionalizing the quantized frequency coefficient values. One-dimensionalization is performed by scanning from the low frequency region to the high frequency region. Then, the result of generating the RL sequence for the one-dimensionalized coefficient value is shown in FIG. Here, in FIG. 4A, the first number indicates the number of coefficients. Generally, the higher the frequency component, the more easily the coefficient value becomes 0. Therefore, by scanning from the low frequency region toward the high frequency region, the amount of information in the RL sequence can be reduced. The generated RL sequence is input to the rearrangement unit 202.

【0011】並べ替え部202では、入力されたRL列
を逆方向に並べ直す。ただし、係数の個数は並べ替えの
対象からは除外する。並べ替えた後の状態は図4(b)
となる。このように並べ換えられたRL列はコード割当
部203に入力される。
The rearrangement unit 202 rearranges the input RL sequences in the reverse direction. However, the number of coefficients is excluded from the sorting target. The state after rearrangement is shown in FIG.
Becomes The RL string thus rearranged is input to the code assigning unit 203.

【0012】2値化部では、RL列の各組に対してR、
Lの値の2値化、すなわち0または1への変換を行う。
ここでLの値は、絶対値と正負符号を別に符号化すると
する。また2値化は、予め定められた2値化テーブルを
用いて行う。2値化テーブルはテーブル記憶部204に
保持されており、テーブル記憶部204を参照すること
により2値化を行う。Lの絶対値に対する2値化テーブ
ルの一例を図5に示す。Lの絶対値の最小値は1である
ので、図5に示すように値0に対する2値化テーブルは
定義されない。2値化テーブルは、一般にLの絶対値が
大きいほど長い2値化値が割り当てられている。ここ
で、図5では2つの2値化テーブルを示しているが、L
の絶対値が小さいときには2値化テーブル1の方が短い
2値化値が割り当てられ、Lの絶対値が大きいときには
2値化テーブル2の方が短い2値化値が割り当てられる
構成となっている。
In the binarization unit, R,
The value of L is binarized, that is, converted to 0 or 1.
Here, the value of L is assumed to be encoded separately from the absolute value and the sign. The binarization is performed using a predetermined binarization table. The binarization table is held in the table storage unit 204, and the binarization is performed by referring to the table storage unit 204. An example of the binarization table for the absolute value of L is shown in FIG. Since the minimum absolute value of L is 1, the binarization table for the value 0 is not defined as shown in FIG. In the binarization table, generally, the larger the absolute value of L, the longer the binarization value is assigned. Here, although FIG. 5 shows two binarization tables, L
When the absolute value of is small, the binary table 1 is assigned a shorter binary value, and when the absolute value of L is larger, the binary table 2 is assigned a shorter binary value. There is.

【0013】最初のLの絶対値に対しては、2値化テー
ブル1を用いる。例えば最初のLの値(−2)の絶対値
に対する2値化値は"01"となる。そして順にLの絶対
値に対する2値化を行っていき、Lの絶対値がしきい値
を超えると、次のLの絶対値に対しては2値化テーブル
2を用いる。ここでLの絶対値に対するしきい値を5と
すると、3番目のLの値(6)で絶対値がしきい値を超
えることになる。したがって、1〜3番目のLの絶対値
に対しては、2値化テーブル1を用いて2値化を行い、
4番目のLの絶対値に対しては、2値化テーブル2を用
いて変換を行うことになる。ここで、5番目のL値
(2)でLの絶対値が再びしきい値以下となるので、6
番目のLの絶対値に対しては、再び2値化テーブル1を
用いて2値化を行う。このような2値化処理により、2
番目〜5番目のL値(−2、3、6、−12)の絶対値
は、それぞれ2値"1"、"01"、"00001"、"00
01100"となる。そして、2値化を施されたR値、
Lの絶対値等は、算術符号化部205において算術符号
を用いて可変長符号に変換され出力される。
For the first absolute value of L, the binarization table 1 is used. For example, the binarized value for the absolute value of the first L value (−2) is “01”. Then, the absolute value of L is binarized in order, and when the absolute value of L exceeds the threshold value, the binarization table 2 is used for the next absolute value of L. When the threshold value for the absolute value of L is 5, the absolute value exceeds the threshold value at the third value (6) of L. Therefore, the first to third absolute values of L are binarized using the binarization table 1.
The fourth absolute value of L is converted using the binarization table 2. Here, at the fifth L value (2), the absolute value of L becomes below the threshold value again, so
The second absolute value of L is binarized again using the binarization table 1. By such binarization processing, 2
The absolute values of the 1st to 5th L values (-2, 3, 6, -12) are binary values "1", "01", "00001", and "00", respectively.
01100 ". Then, the binarized R value,
The absolute value of L and the like are converted into a variable-length code using the arithmetic code in the arithmetic coding unit 205 and output.

【0014】以上のように、本発明の可変長符号化方法
は、ブロック内の周波数係数値を低周波数域から高周波
数域に向けて走査し一次元化する。そして、一次元化さ
れた係数値に対して、連続する係数値0の個数Rとそれ
に続く0以外の係数値Lとの組み合わせであるRL値の
列を生成する。そして、RL値を走査順とは逆順に可変
長符号に変換していく。可変長符号に変換する際には、
R値、Lの絶対値、Lの正負符号を個別に変換する。こ
れらの変換の際には、まず2値化を行う。Lの絶対値の
2値化の際には、2値化テーブルを複数用意する。そし
て、まず第1の2値化テーブルを用いて変換を行い、L
の絶対値がしきい値を超えると、次のLの絶対値に対し
ては第2の2値化テーブルを用いて変換を行う。この際
には、第1の2値化テーブルは、第2の2値化テーブル
と比較して、Lの絶対値が小さいときに2値化値が短く
なる構成とし、第2の2値化テーブルは、第1の2値化
テーブルと比較して、Lの絶対値が大きいときに2値化
値が短くなる構成とする。
As described above, according to the variable length coding method of the present invention, the frequency coefficient values in the block are scanned from the low frequency region to the high frequency region to be one-dimensional. Then, for a one-dimensionalized coefficient value, a sequence of RL values, which is a combination of the number R of consecutive coefficient values 0 and the subsequent coefficient value L other than 0, is generated. Then, the RL value is converted into a variable length code in the reverse order of the scanning order. When converting to a variable length code,
The R value, the absolute value of L, and the sign of L are individually converted. At the time of these conversions, first, binarization is performed. When binarizing the absolute value of L, a plurality of binarizing tables are prepared. Then, first, conversion is performed using the first binarization table, and L
When the absolute value of exceeds the threshold value, the second absolute value of L is converted using the second binarization table. In this case, the first binarization table has a configuration in which the binarization value becomes shorter when the absolute value of L is smaller than that of the second binarization table. The table is configured such that the binarized value becomes shorter when the absolute value of L is larger than that of the first binarized table.

【0015】一般に低周波数成分ほどLの絶対値は大き
くなるため、低周波数域から高周波数域に走査してRL
値を生成したのとは逆順にRL値を可変長符号に変換し
ていくと、Lの絶対値は順に大きくなっていく。したが
って、Lの絶対値がしきい値を超えた後に、Lの絶対値
が大きいときに2値化値長が短くなる2値化テーブルを
用いることにより、合計の符号量を小さくすることがで
きる。
In general, the lower the frequency component, the larger the absolute value of L. Therefore, the RL is scanned by scanning from the low frequency region to the high frequency region.
When the RL value is converted into a variable length code in the reverse order of the value being generated, the absolute value of L gradually increases. Therefore, the total code amount can be reduced by using the binarization table in which the length of the binarized value is shortened when the absolute value of L is large after the absolute value of L exceeds the threshold value. .

【0016】なお、本実施の形態では、フレーム内符号
化により画像を符号化する場合について説明したが、こ
れは動画像入力に対して動き補償等を用いてフレーム間
符号化をする場合であっても良く、本実施の形態の方法
により、同様の効果が得られる。また、本実施の形態で
は、入力画像を水平4画素、垂直4画素のブロックに分
割する場合について説明したが、ブロックの大きさは他
の大きさであっても良い。
In the present embodiment, the case of encoding an image by intra-frame encoding has been described, but this is a case of performing inter-frame encoding on a moving image input using motion compensation or the like. However, the same effect can be obtained by the method of the present embodiment. Further, although the case where the input image is divided into blocks of horizontal 4 pixels and vertical 4 pixels has been described in the present embodiment, the size of the block may be another size.

【0017】また、本実施の形態では、ブロック内の走
査方法として図3(b)を用いて説明したが、これは低
周波数域から高周波数域への走査であれば他の走査順序
であっても良い。また、本実施の形態では、2値化テー
ブルの例として図5を用いて説明したが、これは他のテ
ーブルであっても良い。また、2値化テーブルを2つ用
いる場合について説明したが、これは2値化テーブルを
3つ以上用い、複数のしきい値を用いて、各しきい値を
超える度に2値化テーブルを切り替えるようにしても良
い。また、本実施の形態では、図3に示す走査方法で、
一次元化したRL列を得る場合について説明したが、こ
れは他の方法でも良い。
In the present embodiment, the method of scanning within a block has been described with reference to FIG. 3B, but this is another scanning order if scanning from a low frequency region to a high frequency region. May be. Further, although the present embodiment has been described with reference to FIG. 5 as an example of the binarization table, this may be another table. Further, although the case where two binarization tables are used has been described, this uses three or more binarization tables, uses a plurality of threshold values, and creates a binarization table each time each threshold value is exceeded. You may make it switch. Further, in the present embodiment, the scanning method shown in FIG.
The case where the one-dimensionalized RL sequence is obtained has been described, but this may be another method.

【0018】また、本実施の形態では、Lの絶対値がし
きい値を超えると、次のLの絶対値に対しては第2の2
値化テーブルを、Lの絶対値がしきい値以下であると、
次のLの絶対値に対しては第1の2値化テーブルを用い
る場合について説明したが、これはLの絶対値が一度し
きい値を超えると、それ以降のLの絶対値に対しては常
に第2の2値化テーブルを用いるようにしても良い。こ
の場合、図3、図4の例においては、Lの絶対値に対す
るしきい値を5とすると、3番目のLの値(6)で絶対
値がしきい値を超えることになる。したがって、1〜3
番目のLの絶対値に対しては、2値化テーブル1を用い
て2値化を行い、4番目以降のLの絶対値に対しては、
2値化テーブル2を用いて変換を行うことになる。ここ
で、5番目のL値(2)でLの絶対値が再びしきい値以
下となっても、再び2値化テーブル1を用いて2値化を
行うことはない。
In the present embodiment, when the absolute value of L exceeds the threshold value, the second absolute value of 2 is applied to the next absolute value of L.
If the absolute value of L is less than or equal to the threshold value,
The case where the first binarization table is used for the next absolute value of L has been described, but once the absolute value of L exceeds the threshold value, the absolute value of L thereafter becomes May always use the second binarization table. In this case, in the examples of FIGS. 3 and 4, when the threshold value for the absolute value of L is 5, the absolute value exceeds the threshold value at the third value (6) of L. Therefore, 1-3
The binarization table 1 is used to binarize the absolute value of the th L, and the absolute values of the fourth and subsequent Ls are binarized.
Conversion is performed using the binarization table 2. Here, even if the absolute value of L becomes the threshold value or less again at the fifth L value (2), the binarization table 1 is not used to perform binarization again.

【0019】また本実施の形態においては、並べ替え部
202において、RL列を逆順に並べ替え、逆順に並べ
替えたRL値に対して2値化を行う場合について説明し
たが、これは逆順に並べ替えを行わずに2値化を行って
も良い。ただし、この場合は、2値化部においては、最
初のLの絶対値に対して、図5の第2の2値化テーブル
を用いて2値化を行う。そして、Lの絶対値がしきい値
以下であれば、次のLの絶対値に対しては第1の2値化
テーブルを用い、Lの絶対値がしきい値を超えれば、次
のLの絶対値に対しては第2の2値化テーブルを用い
る。または、2値化部においては、最初のLの絶対値に
対して、図5の第2の2値化テーブルを用いて2値化を
行う。そして、Lの絶対値がしきい値以下となると、以
降のLの絶対値に対しては第1の2値化テーブルを用い
る。これにより、上記の実施の形態と同様の効果が得ら
れる。この際、図2における並べ替え部202は不要と
なる。
In this embodiment, the case where the rearrangement unit 202 rearranges the RL sequences in the reverse order and performs binarization on the RL values rearranged in the reverse order has been described. The binarization may be performed without rearranging. However, in this case, the binarization unit binarizes the first absolute value of L using the second binarization table of FIG. If the absolute value of L is less than or equal to the threshold value, the first binarization table is used for the next absolute value of L. If the absolute value of L exceeds the threshold value, the next L The second binarization table is used for the absolute value of. Alternatively, the binarization unit binarizes the first absolute value of L using the second binarization table of FIG. Then, when the absolute value of L becomes equal to or less than the threshold value, the first binarization table is used for the subsequent absolute values of L. As a result, the same effect as that of the above embodiment can be obtained. At this time, the rearrangement unit 202 in FIG. 2 is unnecessary.

【0020】(第2の実施の形態)図6は、可変長復号
化部601、逆量子化部602、逆周波数変換部60
3、フレームメモリ604から構成される本発明の可変
長復号化方法のブロック図である。ここでは、第1の実
施の形態で説明した本発明の可変長符号化方法により生
成された符号列が入力されるとする。符号列は可変長復
号化部601に入力される。
(Second Embodiment) FIG. 6 shows a variable length decoding unit 601, an inverse quantization unit 602, and an inverse frequency conversion unit 60.
3 is a block diagram of a variable length decoding method of the present invention including a frame memory 604. FIG. Here, it is assumed that the code string generated by the variable length coding method of the present invention described in the first embodiment is input. The code string is input to the variable length decoding unit 601.

【0021】可変長復号化部601の構成を図7に示
す。図7に示すように可変長復号化部601は算術復号
化部701、多値化部702、テーブル記憶部703、
並べ替え部704、係数生成部705から構成される。
算術復号化部701では、まず入力された符号列に対し
て、算術復号化を行う。算術復号化により、2値化デー
タ列が得られることになる。算術復号化により得られた
2値化データ列は、多値化部702に対して出力され
る。
The configuration of the variable length decoding unit 601 is shown in FIG. As shown in FIG. 7, the variable length decoding unit 601 includes an arithmetic decoding unit 701, a multi-value quantization unit 702, a table storage unit 703,
It is composed of a rearrangement unit 704 and a coefficient generation unit 705.
The arithmetic decoding unit 701 first performs arithmetic decoding on the input code string. A binary data string is obtained by arithmetic decoding. The binarized data string obtained by arithmetic decoding is output to the multi-value quantization unit 702.

【0022】多値化部702では、2値化データ列から
R値、Lの絶対値、Lの正負符号への変換を行う。ここ
では、Lの絶対値への変換について説明する。Lの絶対
値への変換は、複数の2値化テーブルを用いて行う。こ
の2値化テーブルはテーブル記憶部703に保持されて
おり、テーブル記憶部703を参照することにより多値
データ(Lの絶対値)への変換を行う。2値化テーブル
の一例を図5に示す。2値化テーブルは2種類保持され
ている。Lの絶対値が小さいときには2値化テーブル1
の方が短い符号が割り当てられ、Lの絶対値が大きいと
きには2値化テーブル2の方が短い符号が割り当てられ
る構成となっている。ここでは、入力符号列の2値化デ
ータ列の先頭部が01001000001000110
0であるとする。1番目の2値化データに対しては、2
値化テーブル1が用いられる。今、図5の2値化テーブ
ル1を参照した場合、入力2値化列に一致するのは、2
値化列01であり、この場合のLの絶対値は2となる。
The multi-value conversion unit 702 converts the binarized data string into the R value, the absolute value of L, and the sign of L. Here, the conversion of L into an absolute value will be described. The conversion of L into an absolute value is performed using a plurality of binarization tables. This binarization table is held in the table storage unit 703, and by referring to the table storage unit 703, conversion into multivalued data (absolute value of L) is performed. An example of the binarization table is shown in FIG. Two types of binarization tables are held. Binarization table 1 when the absolute value of L is small
Is assigned a shorter code, and when the absolute value of L is larger, the binarization table 2 is assigned a shorter code. Here, the head part of the binarized data string of the input code string is 01001000001000110.
It is assumed to be 0. 2 for the first binarized data
The binarization table 1 is used. Now, when referring to the binarization table 1 of FIG.
It is the binarization sequence 01, and the absolute value of L in this case is 2.

【0023】同様にして、2値化列からLの絶対値への
変換を順に行っていくと、2値化テーブル1を用いて、
2値化列001がLの絶対値3に、2値化列00000
1がLの絶対値6に変換される。
Similarly, when the conversion from the binarization sequence to the absolute value of L is performed in order, the binarization table 1 is used.
The binarization sequence 001 becomes the absolute value 3 of L and the binarization sequence 00000
1 is converted to the absolute value 6 of L.

【0024】ここで、多値化部702は、得られたLの
絶対値がしきい値を超えると、次の2値化列からLの絶
対値への変換では、2値化テーブル2を用いる。ここで
Lの絶対値に対するしきい値を5とすると、3番目のL
の絶対値6でしきい値を超えることになる。したがっ
て、4番目の2値化列に対しては、2値化テーブル2を
用いて変換を行うことになる。よって、次の可変長符号
0001100は、Lの絶対値12に変換される。ここ
で、Lの絶対値が再びしきい値以下となると、その次の
2値化列に対しては、再び2値化テーブル1を用いてL
の絶対値への変換を行う。以上のようにして、1ブロッ
ク分のLの絶対値およびRの値、Lの正負符号が生成さ
れると、それらは並べ替え部704に入力される。ここ
では、図4(b)のRL列が生成されたとする。
Here, when the obtained absolute value of L exceeds a threshold value, the multi-value quantization unit 702 uses the binarization table 2 in the conversion from the next binarization sequence to the absolute value of L. To use. If the threshold value for the absolute value of L is 5, then the third L
The absolute value of 6 will exceed the threshold value. Therefore, the binarization table 2 is used to perform conversion on the fourth binarized column. Therefore, the next variable length code 0001100 is converted into the absolute value 12 of L. Here, when the absolute value of L becomes equal to or less than the threshold value again, the binarization table 1 is used again for the next binarization sequence.
Convert to the absolute value of. As described above, when the absolute value of L, the value of R, and the sign of L for one block are generated, they are input to the rearrangement unit 704. Here, it is assumed that the RL sequence in FIG. 4B is generated.

【0025】並べ替え部704では、入力されたRL列
を逆方向に並べ直す。ただし、係数の個数は並べ替えの
対象からは除外する。並べ替えた後の状態は図4(a)
となる。このように並べ換えられたRL列は係数生成部
705に入力される。
The rearrangement section 704 rearranges the input RL sequences in the reverse direction. However, the number of coefficients is excluded from the sorting target. The state after rearrangement is shown in FIG.
Becomes The RL sequence thus rearranged is input to the coefficient generation unit 705.

【0026】係数生成部705では、入力されたRL列
をして、係数値に変換する。この際には、所定の走査順
序に基づいて、Rで示された値だけ係数値0を生成し、
その次にLで示された値の係数値を生成する、を繰り返
すことにより、RL列から係数値への変換を行う。ここ
では、低周波数領域から高周波数領域に向かってジグザ
グに走査するとすると、図4(a)のRL列は図3
(a)の係数ブロックに変換されることになる。生成さ
れた係数ブロックは逆量子化部602に入力される。
The coefficient generator 705 converts the input RL sequence into coefficient values. At this time, the coefficient value 0 is generated by the value indicated by R based on the predetermined scanning order,
Then, the coefficient value of the value indicated by L is generated repeatedly to convert the RL sequence into the coefficient value. Here, if scanning is performed in a zigzag manner from the low frequency region to the high frequency region, the RL row in FIG.
It will be converted into the coefficient block of (a). The generated coefficient block is input to the inverse quantization unit 602.

【0027】逆量子化部602では、入力された係数ブ
ロックに対して、逆量子化処理を行う。ここで逆量子化
処理とは、係数値に所定の量子化値を積算することを意
味する。ここで量子化値は、一般的にブロック毎、周波
数帯域毎によって異なっており、符号列中から得られる
ものとする。逆量子化された係数ブロックは逆周波数変
換部603に入力される。
The inverse quantization unit 602 performs inverse quantization processing on the input coefficient block. Here, the inverse quantization process means to add a predetermined quantized value to the coefficient value. Here, the quantized value is generally different for each block and each frequency band and is obtained from the code string. The inversely quantized coefficient block is input to the inverse frequency transform unit 603.

【0028】逆周波数変換部603では、逆量子化され
た係数ブロックに対して、逆周波数変換を施し、画素ブ
ロックに変換する。変換された画素ブロックはフレーム
メモリ604に入力される。フレームメモリ604に
は、復号化された画素ブロックが順に蓄積され、1画面
分の画素ブロックが蓄積されると、出力画像として出力
される。
The inverse frequency converter 603 performs inverse frequency conversion on the inversely quantized coefficient block to convert it into a pixel block. The converted pixel block is input to the frame memory 604. Decoded pixel blocks are sequentially stored in the frame memory 604, and when one screen of pixel blocks are stored, the decoded pixel blocks are output as an output image.

【0029】以上のように、本発明の可変長復号化方法
は、入力符号列を算術復号化して得られる2値化列か
ら、Lの絶対値への変換を行う場合に、まず第1の2値
化テーブルを用いて変換する。そして、Lの絶対値がし
きい値を超えると、その次の2値化列に対しては、第2
の2値化テーブルを用いる。また、Lの絶対値がしきい
値以下である場合には、その次の2値化列に対しては、
第1の2値化テーブルを用いる。そして、得られたRL
値を逆順に並べ替えた後、ブロック内の所定の走査順に
基づいて、RL値を係数値に変換する。
As described above, in the variable length decoding method of the present invention, when the binary sequence obtained by arithmetically decoding the input code sequence is converted into the absolute value of L, first of all, Convert using a binarization table. When the absolute value of L exceeds the threshold value, the second binarization sequence for the next binarization sequence becomes the second
2 binarization table is used. If the absolute value of L is less than or equal to the threshold value, for the next binarized sequence,
The first binarization table is used. And the obtained RL
After rearranging the values in reverse order, the RL value is converted into a coefficient value based on a predetermined scanning order within the block.

【0030】以上の動作により、本発明の可変長復号化
方法を用いることにより、本発明の可変長符号化方法を
用いて符号化された符号列を正しく復号化することが可
能となる。なお、本実施の形態では、フレーム内符号化
により生成された符号列を復号化する場合について説明
したが、これは動画像入力に対して動き補償等を用いて
フレーム間符号化をして生成された符号列を復号化する
場合であっても良く、本実施の形態の方法により、同様
の効果が得られる。
By the above operation, by using the variable length decoding method of the present invention, it is possible to correctly decode the code string encoded by the variable length coding method of the present invention. In the present embodiment, the case of decoding the code string generated by the intra-frame coding has been described, but this is generated by performing inter-frame coding on a moving image input using motion compensation or the like. It is also possible to decode the generated code string, and the method of the present embodiment can obtain the same effect.

【0031】また、本実施の形態では、入力画像が水平
4画素、垂直4画素のブロックに分割されて符号化され
ている場合について説明したが、ブロックの大きさは他
の大きさであっても良い。また、本実施の形態では、ブ
ロック内の走査方法として図3(b)を用いて説明した
が、これは符号化の際に用いた走査方法と同じであれ
ば、他の走査順序であっても良い。
Further, in the present embodiment, the case where the input image is divided into blocks of horizontal 4 pixels and vertical 4 pixels and coded is described, but the size of the block is other size. Is also good. In addition, although the present embodiment has been described with reference to FIG. 3B as a scanning method within a block, this may be another scanning order as long as it is the same as the scanning method used at the time of encoding. Is also good.

【0032】また、本実施の形態では、2値化テーブル
の例として図5を用いて説明したが、これは符号化の際
に用いた2値化テーブルと同じであれば、他のテーブル
であっても良い。また、2値化テーブルを2つ用いる場
合について説明したが、これは2値化テーブルを3つ以
上用い、複数のしきい値を用いて、各しきい値を超える
度に2値化テーブルを切り替えるようにしても良い。た
だし、この際の2値化テーブルの構成およびしきい値
は、符号化の際に用いたものと同じでなければならな
い。
In the present embodiment, an example of the binarization table has been described with reference to FIG. 5. However, if this is the same as the binarization table used at the time of encoding, another table is used. It may be. Further, although the case where two binarization tables are used has been described, this uses three or more binarization tables, uses a plurality of threshold values, and creates a binarization table each time each threshold value is exceeded. You may make it switch. However, the configuration of the binarization table and the threshold value at this time must be the same as those used at the time of encoding.

【0033】また、本実施の形態では、Lの絶対値がし
きい値を超えると、次のLの絶対値に対しては第2の2
値化テーブルを、Lの絶対値がしきい値以下であると、
次のLの絶対値に対しては第1の2値化テーブルを用い
る場合について説明したが、これはLの絶対値が一度し
きい値を超えると、それ以降の2値化列に対しては常に
第2の2値化テーブルを用いるようにしても良い。上記
の実施の形態においては、3番目のLの絶対値(6)で
しきい値を超えることになる。したがって、1〜3番目
のLの絶対値に対しては、2値化テーブル1を用いて2
値化を行い、4番目以降のLの絶対値に対しては、2値
化テーブル2を用いて変換を行うことになる。ここで、
得られたLの絶対値が再びしきい値以下となっても、再
び2値化テーブル1を用いて2値化を行うことはない。
Further, in this embodiment, when the absolute value of L exceeds the threshold value, the second absolute value of 2 is applied to the next absolute value of L.
If the absolute value of L is less than or equal to the threshold value,
The case where the first binarization table is used for the next absolute value of L has been described. This is because once the absolute value of L exceeds the threshold value, the subsequent binarization sequence is performed. May always use the second binarization table. In the above embodiment, the absolute value (6) of the third L exceeds the threshold value. Therefore, using the binarization table 1 for the absolute values of the first to third L
The binarization table 2 is used to perform the binarization, and the fourth and subsequent absolute values of L are transformed. here,
Even if the obtained absolute value of L falls below the threshold value again, the binarization table 1 is not used to perform binarization again.

【0034】また本実施の形態においては、RL列が本
来の順序とは逆順に符号化されている場合について説明
したが、RL列が本来の順序で符号化されている場合、
多値化部702においては、最初の2値化列に対して、
図5の第2の2値化テーブルを用いてLの絶対値への変
換を行う。そして、Lの絶対値がしきい値以下であれ
ば、次の2値化列に対しては第1の2値化テーブルを用
い、Lの絶対値がしきい値を超えれば、次の2値化列に
対しては第2の2値化テーブルを用いる。または、多値
化部702においては、最初の2値化列に対して、図5
の第2の2値化テーブルを用いてLの絶対値への変換を
行う。そして、Lの絶対値がしきい値以下となると、以
降の2値化列に対しては第1の2値化テーブルを用い
る。これにより、上記の実施の形態と同様の効果が得ら
れる。この際、図7における並べ替え部704は不要と
なる。
Further, although the case where the RL sequence is encoded in the reverse order to the original order has been described in the present embodiment, when the RL sequence is encoded in the original order,
In the multi-value quantization unit 702, for the first binarization sequence,
Conversion to an absolute value of L is performed using the second binarization table of FIG. Then, if the absolute value of L is less than or equal to the threshold value, the first binarization table is used for the next binarization sequence, and if the absolute value of L exceeds the threshold value, the next 2 The second binarization table is used for the binarization sequence. Alternatively, in the multi-value quantization unit 702, as shown in FIG.
The conversion to the absolute value of L is performed using the second binarization table of Then, when the absolute value of L becomes equal to or less than the threshold value, the first binarization table is used for the subsequent binarization sequence. As a result, the same effect as that of the above embodiment can be obtained. At this time, the rearrangement unit 704 in FIG. 7 is unnecessary.

【0035】[0035]

【発明の効果】以上のように、本発明の可変長符号化方
法は、ブロック内の周波数係数値を低周波数域から高周
波数域に向けて走査し一次元化する。そして、一次元化
された係数値に対して、連続する係数値0の個数Rとそ
れに続く0以外の係数値Lとの組み合わせであるRL値
の列を生成する。そして、RL値を走査順とは逆順に可
変長符号に変換していく。可変長符号に変換する際に
は、R値、Lの絶対値、Lの正負符号を個別に変換す
る。これらの変換の際には、まず2値化を行う。2値化
の際には、2値化テーブルを複数用意する。そして、ま
ず第1の2値化テーブルを用いて変換を行い、Lの絶対
値がしきい値を超えると、次のLの絶対値に対しては第
2の2値化テーブルを用いて変換を行う。この際には、
第1の2値化テーブルは、第2の2値化テーブルと比較
して、Lの絶対値が小さいときに2値化値が短くなる構
成とし、第2の2値化テーブルは、第1の2値化テーブ
ルと比較して、Lの絶対値が大きいときに2値化値が短
くなる構成とする。
As described above, according to the variable length coding method of the present invention, the frequency coefficient values in a block are scanned from the low frequency region to the high frequency region to be one-dimensional. Then, for a one-dimensionalized coefficient value, a sequence of RL values, which is a combination of the number R of consecutive coefficient values 0 and the subsequent coefficient value L other than 0, is generated. Then, the RL value is converted into a variable length code in the reverse order of the scanning order. When converting to a variable-length code, the R value, the absolute value of L, and the sign of L are individually converted. At the time of these conversions, first, binarization is performed. When binarizing, a plurality of binarizing tables are prepared. Then, first, conversion is performed using the first binarization table, and when the absolute value of L exceeds the threshold value, conversion is performed using the second binarization table for the next absolute value of L. I do. In this case,
The first binarization table is configured such that the binarization value becomes shorter when the absolute value of L is smaller than that of the second binarization table, and the second binarization table is the first binarization table. The binarized value becomes shorter when the absolute value of L is larger than that of the binarized table.

【0036】一般に低周波数成分ほどLの絶対値は大き
くなるため、低周波数域から高周波数域に走査してRL
値を生成したのとは逆順にRL値を可変長符号に変換し
ていくと、Lの絶対値は順に大きくなっていく。したが
って、Lの絶対値がしきい値を超えた後に、Lの絶対値
が大きいときに2値化値長が短くなる2値化テーブルを
用いることにより、合計の符号量を小さくすることがで
きる。
Generally, the lower the frequency component, the larger the absolute value of L. Therefore, scanning from the low frequency region to the high frequency region causes RL to scan.
When the RL value is converted into a variable length code in the reverse order of the value being generated, the absolute value of L gradually increases. Therefore, the total code amount can be reduced by using the binarization table in which the length of the binarized value is shortened when the absolute value of L is large after the absolute value of L exceeds the threshold value. .

【0037】以上のように、本発明の可変長復号化方法
は、入力符号列を算術復号化して得られる2値化列か
ら、Lの絶対値への変換を行う場合に、まず第1の2値
化テーブルを用いて変換する。そして、Lの絶対値がし
きい値を超えると、その次の2値化列に対しては、第2
の2値化テーブルを用いる。また、Lの絶対値がしきい
値以下である場合には、その次の2値化列に対しては、
第1の2値化テーブルを用いる。そして、得られたRL
値を逆順に並べ替えた後、ブロック内の所定の走査順に
基づいて、RL値を係数値に変換する。以上の動作によ
り、本発明の可変長復号化方法を用いることにより、本
発明の可変長符号化方法を用いて符号化された符号列を
正しく復号化することが可能となる。
As described above, in the variable length decoding method of the present invention, when the binarized string obtained by arithmetically decoding the input code string is converted into the absolute value of L, first of all, Convert using a binarization table. When the absolute value of L exceeds the threshold value, the second binarization sequence for the next binarization sequence becomes the second
2 binarization table is used. If the absolute value of L is less than or equal to the threshold value, for the next binarized sequence,
The first binarization table is used. And the obtained RL
After rearranging the values in reverse order, the RL value is converted into a coefficient value based on a predetermined scanning order within the block. By the above operation, by using the variable length decoding method of the present invention, it becomes possible to correctly decode the code string encoded by the variable length coding method of the present invention.

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

【図1】本発明の実施の形態を説明するためのブロック
FIG. 1 is a block diagram for explaining an embodiment of the present invention.

【図2】本発明の実施の形態を説明するためのブロック
FIG. 2 is a block diagram for explaining an embodiment of the present invention.

【図3】本発明の実施の形態を説明するための模式図FIG. 3 is a schematic diagram for explaining an embodiment of the invention.

【図4】本発明の実施の形態を説明するための模式図FIG. 4 is a schematic diagram for explaining an embodiment of the invention.

【図5】本発明の実施の形態を説明するための2値化テ
ーブルの例
FIG. 5 is an example of a binarization table for explaining an embodiment of the present invention.

【図6】本発明の実施の形態を説明するためのブロック
FIG. 6 is a block diagram for explaining an embodiment of the present invention.

【図7】本発明の実施の形態を説明するためのブロック
FIG. 7 is a block diagram for explaining an embodiment of the present invention.

【図8】従来例を説明するための2値化テーブルの例FIG. 8 is an example of a binarization table for explaining a conventional example.

【符号の説明】 101 ブロック変換部 102 周波数変換部 103 量子化部 104 可変長符号化部 201 RL列生成部 202 並べ替え部 203 2値化部 204 テーブル記憶部 205 算術符号化部[Explanation of symbols] 101 Block converter 102 frequency converter 103 quantizer 104 variable length coding unit 201 RL sequence generator 202 Sorting unit 203 Binarization unit 204 table storage 205 arithmetic coding unit

フロントページの続き (72)発明者 羽飼 誠 大阪府門真市大字門真1006番地 松下電器 産業株式会社内 Fターム(参考) 5C059 MA05 MA21 MC11 ME01 ME05 ME11 ME17 NN21 PP04 TA58 TB08 TC04 TD12 UA02 UA05 UA38 5J064 AA02 BA09 BA10 BA16 BB05 BC01 BC16 BD01 Continued front page    (72) Inventor Makoto Hakai             1006 Kadoma, Kadoma-shi, Osaka Matsushita Electric             Sangyo Co., Ltd. F-term (reference) 5C059 MA05 MA21 MC11 ME01 ME05                       ME11 ME17 NN21 PP04 TA58                       TB08 TC04 TD12 UA02 UA05                       UA38                 5J064 AA02 BA09 BA10 BA16 BB05                       BC01 BC16 BD01

Claims (10)

【特許請求の範囲】[Claims] 【請求項1】 画像データを所定の大きさを有するブロ
ック単位で分割し、前記ブロックの周波数係数値を符号
化する際の可変長符号化方法であって、 前記ブロック内の周波数係数値を、低周波数成分から高
周波数成分への所定の走査順序により一次元化し、係数
値が0である係数の連続数Rと、それに続く係数値Lと
の組み合わせ(RL値)の列を生成する組み合わせ列生
成ステップと、 前記組み合わせ列生成ステップにより生成されたRL値
の列を、逆順に並べ直す並べ替えステップと、 前記並べ替えステップにより並べ替えられたLの値の列
を、先頭のLの値であるか、または直前のLの絶対値が
所定のしきい値以下である場合には、第1の2値化テー
ブルを用いて2値化列に変換し、直前のLの絶対値が前
記しきい値を超える場合には、第2の2値化テーブルを
用いて2値化列に変換する2値化ステップと、 前記2値化ステップにより得られた2値化列に対して算
術符号化を施して可変長符号に変換する算術符号化ステ
ップとからなることを特徴とする可変長符号化方法。
1. A variable-length coding method when image data is divided into blocks having a predetermined size and the frequency coefficient values of the block are coded, wherein the frequency coefficient value in the block is A combination sequence that generates a sequence of combinations (RL values) of a continuous number R of coefficients having a coefficient value of 0 and a subsequent coefficient value L, which is one-dimensionalized by a predetermined scanning order from low frequency components to high frequency components. A generation step, a rearrangement step of rearranging the sequence of RL values generated by the combination sequence generation step in reverse order, and a sequence of L values rearranged by the rearrangement step with a leading L value. If there is, or if the absolute value of the immediately preceding L is less than or equal to a predetermined threshold value, it is converted into a binary string using the first binarization table, and the absolute value of the immediately preceding L is as described above. When the threshold is exceeded Is a binarization step of converting into a binarization sequence using the second binarization table, and a variable length code by performing arithmetic coding on the binarization sequence obtained by the binarization step. A variable-length coding method, comprising: an arithmetic coding step of converting to.
【請求項2】 画像データを所定の大きさを有するブロ
ック単位で分割し、前記ブロックの周波数係数値を符号
化する際の可変長符号化方法であって、 前記ブロック内の周波数係数値を、低周波数成分から高
周波数成分への所定の走査順序により一次元化し、係数
値が0である係数の連続数Rと、それに続く係数値Lと
の組み合わせ(RL値)の列を生成する組み合わせ列生
成ステップと、 前記組み合わせ列生成ステップにより生成されたRL値
の列を、逆順に並べ直す並べ替えステップと、 前記並べ替えステップにより並べ替えられたLの値の列
を、先頭から順に第1の2値化テーブルを用いて2値化
列に変換し、変換対象のLの絶対値が所定のしきい値を
超えると、以降のLの値に対しては第2の2値化テーブ
ルを用いて2値化列に変換する2値化ステップと、 前記2値化ステップにより得られた2値化列に対して算
術符号化を施して可変長符号に変換する算術符号化ステ
ップとからなることを特徴とする可変長符号化方法。
2. A variable length coding method for dividing image data into blocks having a predetermined size and coding frequency coefficient values of the block, wherein the frequency coefficient values in the block are: A combination sequence that generates a sequence of combinations (RL values) of a continuous number R of coefficients having a coefficient value of 0 and a subsequent coefficient value L, which is one-dimensionalized by a predetermined scanning order from low frequency components to high frequency components. A generation step; a rearrangement step of rearranging the RL value sequence generated by the combination sequence generation step in reverse order; and a L value sequence rearranged by the rearrangement step in order from the top to the first. When the absolute value of L to be converted exceeds a predetermined threshold value by converting into a binary string using the binary table, the second binary table is used for the subsequent values of L. Converted to a binary string Variable-length code, wherein the binary-coding step of performing the binary-coding sequence is performed, and the binary-coded sequence obtained by the binarizing step is subjected to arithmetic coding to convert it into a variable-length code. Method.
【請求項3】 画像データを所定の大きさを有するブロ
ック単位で分割し、前記ブロックの周波数係数値を符号
化する際の算術符号化方法であって、 前記ブロック内の周波数係数値を、低周波数成分から高
周波数成分への所定の走査順序により一次元化し、係数
値が0である係数の連続数Rと、それに続く係数値Lと
の組み合わせ(RL値)の列を生成する組み合わせ列生
成ステップと、 前記組み合わせ列生成ステップにより生成されたLの値
の列を、先頭のLの値であるか、または直前のLの絶対
値が所定のしきい値を超える場合には、第2の2値化テ
ーブルを用いて2値化列に変換し、直前のLの絶対値が
前記しきい値以下である場合には、第1の2値化テーブ
ルを用いて2値化列に変換する2値化ステップと、 前記2値化ステップにより得られた2値化列に対して算
術符号化を施して可変長符号に変換する算術符号化ステ
ップとからなることを特徴とする可変長符号化方法。
3. An arithmetic coding method when image data is divided into blocks having a predetermined size and the frequency coefficient values of the block are coded. Combinatorial column generation for generating a column of combinations (RL values) of a continuous number R of coefficients having a coefficient value of 0 and a subsequent coefficient value L, which is one-dimensionalized by a predetermined scanning order from frequency components to high frequency components If the first value of the L or the absolute value of the immediately preceding L exceeds the predetermined threshold value, the second value Convert to a binary string using the binary table, and if the absolute value of L immediately before is equal to or less than the threshold value, convert it to the binary string using the first binary table. A binarization step, and the binarization step A variable length coding method, comprising: an arithmetic coding step of performing arithmetic coding on the obtained binary string to convert it into a variable length code.
【請求項4】 画像データを所定の大きさを有するブロ
ック単位で分割し、前記ブロックの周波数係数値を符号
化する際の算術符号化方法であって、 前記ブロック内の周波数係数値を、低周波数成分から高
周波数成分への所定の走査順序により一次元化し、係数
値が0である係数の連続数Rと、それに続く係数値Lと
の組み合わせ(RL値)の列を生成する組み合わせ列生
成ステップと、 前記組み合わせ列生成ステップにより生成されたLの値
の列を、先頭から順に第2の2値化テーブルを用いて2
値化列に変換し、変換対象のLの絶対値が所定のしきい
値以下となると、以降のLの値に対しては第1の2値化
テーブルを用いて2値化列への変換する2値化ステップ
と、 前記2値化ステップにより得られた2値化列に対して算
術符号化を施して可変長符号に変換する算術符号化ステ
ップとからなることを特徴とする可変長符号化方法。
4. An arithmetic coding method when image data is divided into blocks having a predetermined size and the frequency coefficient values of the block are coded, wherein the frequency coefficient value in the block is reduced. Combinatorial column generation for generating a column of combinations (RL values) of a continuous number R of coefficients having a coefficient value of 0 and a subsequent coefficient value L, which is one-dimensionalized by a predetermined scanning order from frequency components to high frequency components And a sequence of L values generated in the combination sequence generation step by using the second binarization table in order from the beginning.
When the absolute value of L to be converted becomes less than or equal to a predetermined threshold value after conversion into a binarized string, the first binarized table is used to convert the subsequent L value into a binarized string. Variable-length code, wherein the binary-coding step of performing the binary-coding sequence is performed, and the binary-coded sequence obtained by the binarizing step is subjected to arithmetic coding to convert it into a variable-length code. Method.
【請求項5】 請求項1から請求項4のいずれか1項に
記載の可変長符号化方法であって、 前記第1の2値化テーブルは前記第2の2値化テーブル
と比較して、Lの絶対値が小さいときに、より短い2値
化値を割り当てており、 前記第2の2値化テーブルは前記第1の2値化テーブル
と比較して、Lの絶対値が大きいときに、より長い2値
化値を割り当てていることを特徴とする可変長符号化方
法。
5. The variable length coding method according to claim 1, wherein the first binarization table is compared with the second binarization table. , L is assigned a shorter binarization value when the absolute value is smaller, and the second binarization table is larger than the first binarization table when the absolute value of L is large. The variable-length coding method is characterized in that a longer binarized value is assigned to.
【請求項6】 画像データを所定の大きさを有するブロ
ック単位で分割し、前記ブロックの周波数係数値を、所
定の走査順序で一次元化し、連続する係数値が0である
係数の連続数Rと、それに続く係数値Lとの組み合わせ
(RL値)の列を符号化して生成された符号列を復号化
する際の可変長復号化方法であって、 前記符号列を算術復号化を用いて2値化列に復号化する
算術復号化ステップと、 前記算術復号化ステップにより得られた2値化列に対し
て、先頭の2値化値であるか、または直前のLの絶対値
が所定のしきい値以下である場合には、第1の2値化テ
ーブルを用いてLの絶対値への変換を施し、直前のLの
絶対値が前記しきい値を超える場合には、第2の2値化
テーブルを用いてLの絶対値への変換を施す多値化ステ
ップと、 前記多値化ステップにより生成されたRL値の列を逆順
に並べ替える並べ替えステップと、 前記並べ替えステップにより並べ替えられたRL値の列
を連続する値が0である係数の個数Rとそれに続く係数
値Lとに戻し、その組み合わせから周波数係数値を生成
する係数生成ステップとからなることを特徴とする可変
長復号化方法。
6. The image data is divided into blocks having a predetermined size, the frequency coefficient values of the block are one-dimensionalized in a predetermined scanning order, and the number R of consecutive coefficients having a continuous coefficient value of 0. And a variable length decoding method for decoding a code string generated by coding a string of combinations (RL values) with the following coefficient value L, wherein the code string is subjected to arithmetic decoding. An arithmetic decoding step of decoding into a binary string, and a binary value at the head of the binary string obtained in the arithmetic decoding step, or an absolute value of L immediately before is predetermined. When the absolute value of L is equal to or smaller than the threshold value, the first binarization table is used to perform conversion to the absolute value of L. A multi-value conversion step for converting L into an absolute value using the binarization table of A rearrangement step of rearranging the RL value sequence generated in the multi-value conversion step in reverse order, and the number R of coefficients whose consecutive values are 0 in the RL value sequence rearranged in the rearrangement step and A variable length decoding method, further comprising a coefficient generating step of generating a frequency coefficient value from the subsequent coefficient value L and generating a frequency coefficient value from the combination thereof.
【請求項7】 画像データを所定の大きさを有するブロ
ック単位で分割し、前記ブロックの周波数係数値を、所
定の走査順序で一次元化し、連続する係数値が0である
係数の連続数Rと、それに続く係数値Lとの組み合わせ
(RL値)の列を符号化して生成された符号列を復号化
する際の可変長復号化方法であって、 前記符号列を算術復号化を用いて2値化列に復号化する
算術復号化ステップと、 前記算術復号化ステップにより得られた2値化列に対し
て、先頭から順に第1の2値化テーブルを用いてLの絶
対値への変換を施し、直前のLの絶対値が所定のしきい
値を超えると、それ以降の2値化値に対しては第2の2
値化テーブルを用いてLの絶対値への変換を施す多値化
ステップと、 前記多値化ステップにより生成されたRL値の列を逆順
に並べ替える並べ替えステップと、 前記並べ替えステップにより並べ替えられたRL値の列
を連続する値が0である係数の個数Rとそれに続く係数
値Lとに戻し、その組み合わせから周波数係数値を生成
する係数生成ステップとからなることを特徴とする可変
長復号化方法。
7. The image data is divided into blocks each having a predetermined size, the frequency coefficient values of the blocks are one-dimensionalized in a predetermined scanning order, and the number R of consecutive coefficients having a continuous coefficient value of 0. And a variable length decoding method for decoding a code string generated by coding a string of combinations (RL values) with the following coefficient value L, wherein the code string is subjected to arithmetic decoding. An arithmetic decoding step of decoding into a binary string, and a binary string obtained by the arithmetic decoding step, from the beginning to the absolute value of L using the first binary table. When the conversion is performed and the absolute value of L immediately before exceeds a predetermined threshold value, the second 2 is added to the subsequent binarized value.
A multi-value quantization step of converting the absolute value of L using a binarization table, a rearrangement step of rearranging the columns of RL values generated by the multi-value quantization step in reverse order, A variable characterized in that the sequence of replaced RL values is returned to the number R of coefficients whose consecutive values are 0 and the subsequent coefficient value L, and a coefficient generating step of generating a frequency coefficient value from the combination thereof. Long decoding method.
【請求項8】 画像データを所定の大きさを有するブロ
ック単位で分割し、前記ブロックの周波数係数値を、所
定の走査順序で一次元化し、連続する係数値が0である
係数の連続数Rと、それに続く係数値Lとの組み合わせ
(RL値)の列を符号化して生成された符号列を復号化
する際の可変長復号化方法であって、 前記符号列を算術復号化を用いて2値化列に復号化する
算術復号化ステップと、 前記算術復号化ステップにより得られた2値化列に対し
て、先頭の2値化値であるか、または直前のLの絶対値
が所定のしきい値を超える場合には、第2の2値化テー
ブルを用いてLの絶対値への変換を施し、直前のLの絶
対値が前記しきい値以下である場合には、第1の2値化
テーブルを用いてLの絶対値への変換を施す多値化ステ
ップと、 前記多値化ステップにより生成されたRL値の列を連続
する値が0である係数の個数Rとそれに続く係数値Lと
に戻し、その組み合わせから周波数係数値を生成する係
数生成ステップとからなることを特徴とする可変長復号
化方法。
8. The image data is divided into blocks having a predetermined size, the frequency coefficient values of the block are one-dimensionalized in a predetermined scanning order, and the number R of consecutive coefficients having a continuous coefficient value of 0. And a variable length decoding method for decoding a code string generated by coding a string of combinations (RL values) with the following coefficient value L, wherein the code string is subjected to arithmetic decoding. An arithmetic decoding step of decoding into a binary string, and a binary value at the head of the binary string obtained in the arithmetic decoding step, or an absolute value of L immediately before is predetermined. If the absolute value of L is exceeded by the second binarization table when the absolute value of L is immediately below the threshold value, A multi-value conversion step for converting L into an absolute value using the binarization table of The sequence of RL values generated by the multi-value quantization step is returned to the number R of coefficients whose consecutive values are 0 and the subsequent coefficient value L, and a coefficient generation step of generating a frequency coefficient value from the combination thereof. A variable length decoding method characterized by the above.
【請求項9】 画像データを所定の大きさを有するブロ
ック単位で分割し、前記ブロックの周波数係数値を、所
定の走査順序で一次元化し、連続する係数値が0である
係数の連続数Rと、それに続く係数値Lとの組み合わせ
(RL値)の列を符号化して生成された符号列を復号化
する際の可変長復号化方法であって、 前記符号列を算術復号化を用いて2値化列に復号化する
算術復号化ステップと、 前記算術復号化ステップにより得られた2値化列に対し
て、先頭から順に第2の2値化テーブルを用いてLの絶
対値への変換を施し、直前のLの絶対値が所定のしきい
値以下となると、それ以降の2値化値に対しては第1の
2値化テーブルを用いてLの絶対値への変換を施す多値
化ステップと、 前記多値化ステップにより生成されたRL値の列を連続
する値が0である係数の個数Rとそれに続く係数値Lと
に戻し、その組み合わせから周波数係数値を生成する係
数生成ステップとからなることを特徴とする可変長復号
化方法。
9. The image data is divided into blocks each having a predetermined size, the frequency coefficient value of the block is one-dimensionalized in a predetermined scanning order, and the number R of consecutive coefficients having a continuous coefficient value of 0. And a variable length decoding method for decoding a code string generated by coding a string of combinations (RL values) with the following coefficient value L, wherein the code string is subjected to arithmetic decoding. An arithmetic decoding step of decoding into a binary string and a binary string obtained by the arithmetic decoding step are sequentially converted into absolute values of L using a second binary table from the beginning. When the absolute value of L immediately before is converted to a value equal to or smaller than a predetermined threshold value after conversion, the first binarization table is used to convert the subsequent binarized value to the absolute value of L. A multivalued step and a sequence of RL values generated by the multivalued step A variable length decoding method comprising: a coefficient generating step of returning to the number R of coefficients having consecutive values of 0 and the coefficient value L following the coefficient value L, and generating a frequency coefficient value from the combination thereof.
【請求項10】 請求項6から請求項9のいずれか1項
に記載の可変長復号化方法であって、 前記第1の2値化テーブルは前記第2の2値化テーブル
と比較して、Lの絶対値が小さいときに、より短い2値
化値を割り当てており、 前記第2の2値化テーブルは前記第1の2値化テーブル
と比較して、Lの絶対値が大きいときに、より長い2値
化値を割り当てていることを特徴とする可変長復号化方
法。
10. The variable length decoding method according to any one of claims 6 to 9, wherein the first binarization table is compared with the second binarization table. , L is assigned a shorter binarization value when the absolute value is smaller, and the second binarization table is larger than the first binarization table when the absolute value of L is large. The variable length decoding method is characterized in that a longer binarized value is assigned to.
JP2002121052A 2002-04-23 2002-04-23 Variable length encoding method and variable length decoding method Pending JP2003318740A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002121052A JP2003318740A (en) 2002-04-23 2002-04-23 Variable length encoding method and variable length decoding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002121052A JP2003318740A (en) 2002-04-23 2002-04-23 Variable length encoding method and variable length decoding method

Publications (1)

Publication Number Publication Date
JP2003318740A true JP2003318740A (en) 2003-11-07

Family

ID=29537105

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002121052A Pending JP2003318740A (en) 2002-04-23 2002-04-23 Variable length encoding method and variable length decoding method

Country Status (1)

Country Link
JP (1) JP2003318740A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007116436A (en) * 2005-10-20 2007-05-10 Matsushita Electric Ind Co Ltd Coding device and decoding device
JP2008294669A (en) * 2007-05-23 2008-12-04 Toshiba Corp Image encoding device
WO2013065262A1 (en) * 2011-11-04 2013-05-10 日本電気株式会社 Video encoding device, video decoding device, video encoding method, video decoding method, and program
JP2013526140A (en) * 2010-04-09 2013-06-20 株式会社エヌ・ティ・ティ・ドコモ Adaptive binarization for arithmetic coding
JP2016129405A (en) * 2010-04-09 2016-07-14 三菱電機株式会社 Image decoder, image encoder and data structure of encoding data

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007116436A (en) * 2005-10-20 2007-05-10 Matsushita Electric Ind Co Ltd Coding device and decoding device
JP4540585B2 (en) * 2005-10-20 2010-09-08 パナソニック株式会社 Encoding device and decoding device
US7817864B2 (en) 2005-10-20 2010-10-19 Panasonic Corporation Coding apparatus and decoding apparatus
JP2008294669A (en) * 2007-05-23 2008-12-04 Toshiba Corp Image encoding device
JP2013526140A (en) * 2010-04-09 2013-06-20 株式会社エヌ・ティ・ティ・ドコモ Adaptive binarization for arithmetic coding
JP2016129405A (en) * 2010-04-09 2016-07-14 三菱電機株式会社 Image decoder, image encoder and data structure of encoding data
WO2013065262A1 (en) * 2011-11-04 2013-05-10 日本電気株式会社 Video encoding device, video decoding device, video encoding method, video decoding method, and program

Similar Documents

Publication Publication Date Title
KR102118694B1 (en) Method and apparatus for entropy Coding and decoding of transformation coefficient
US10103746B2 (en) Methods and devices for coding and decoding the position of the last significant coefficient
JP3764457B2 (en) Image encoding method, image decoding method, image encoding device, image decoding device, and program
CN1200568C (en) Optimum scanning method for change coefficient in coding/decoding image and video
JP3679083B2 (en) Image encoding method, image decoding method, image encoding device, image decoding device, image encoding program, image decoding program
JP4700491B2 (en) Adaptive coefficient scan ordering
JP3764458B2 (en) Image encoding method, image decoding method, image encoding device, image decoding device, and program
EP3229473B1 (en) Methods and devices for coding and decoding the position of the last significant coefficient
JP2005237004A (en) Method and device for arithmetic encoding and decoding of conversion factor, corresponding computer program, and storage medium readable by the corresponding computer
JP2003319391A (en) Encoding apparatus and method, decoding apparatus and method, recording medium, and program
US9287894B2 (en) Methods for encoding and decoding images, corresponding encoding and decoding devices and computer programs
JP2011147193A (en) Dynamic image encoding device and dynamic image decoding device
JP2003318740A (en) Variable length encoding method and variable length decoding method
KR100717002B1 (en) Apparatus for encoding and decoding image, and method thereof, and a recording medium storing program to implement the method
KR100359813B1 (en) Alternative Double Scan For Video Coding And Decoding
JP2021005867A (en) Encoding device, decoding device and program
KR100460947B1 (en) Device for processing image signal and method thereof
JP4607638B2 (en) Variable length decoding apparatus and method
KR100327364B1 (en) Image compression device using multiple huffman table
WO1999005649A1 (en) Adaptive entropy encoding/decoding
JP2021093574A (en) Coding device, decoding device and program
JP2003309848A (en) Image encoding apparatus and control method thereof
JPH01114278A (en) Orthogonal transform coding method
JPH02308673A (en) Picture data coding system
JPH03179975A (en) Encoder