JP4460521B2 - Orthogonal transform coefficient scanning method, inverse scanning method, scanning device, inverse scanning device, program thereof, and computer-readable recording medium recording the program - Google Patents

Orthogonal transform coefficient scanning method, inverse scanning method, scanning device, inverse scanning device, program thereof, and computer-readable recording medium recording the program Download PDF

Info

Publication number
JP4460521B2
JP4460521B2 JP2005321923A JP2005321923A JP4460521B2 JP 4460521 B2 JP4460521 B2 JP 4460521B2 JP 2005321923 A JP2005321923 A JP 2005321923A JP 2005321923 A JP2005321923 A JP 2005321923A JP 4460521 B2 JP4460521 B2 JP 4460521B2
Authority
JP
Japan
Prior art keywords
scan
dimensional data
orthogonal transform
scanning
transform coefficient
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2005321923A
Other languages
Japanese (ja)
Other versions
JP2007129612A (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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone 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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2005321923A priority Critical patent/JP4460521B2/en
Publication of JP2007129612A publication Critical patent/JP2007129612A/en
Application granted granted Critical
Publication of JP4460521B2 publication Critical patent/JP4460521B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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

本発明は,映像符号化方式において,直交変換係数のスキャン順を切り換えるスキャン方法に関するものである。   The present invention relates to a scanning method for switching the scan order of orthogonal transform coefficients in a video encoding system.

映像を複数画素のブロックサイズに分割し,直交変換を施す符号化方式を用いて風景などの自然界の映像を符号化すると,直交変換係数のエネルギーは低周波領域に集中する傾向がある。そこで多くの符号化方式では,直交変換係数の量子化値を低周波から順にジグザグにスキャンし,2次元のデータを1次元のデータ列に並べ替える。   When the video is divided into block sizes of a plurality of pixels and the video in the natural world such as landscape is encoded using an encoding method that performs orthogonal transformation, the energy of the orthogonal transformation coefficient tends to concentrate in the low frequency region. Therefore, in many encoding methods, the quantized values of the orthogonal transform coefficients are scanned in a zigzag order from the low frequency, and the two-dimensional data is rearranged into a one-dimensional data string.

ブロックサイズが8×8の場合のジグザグスキャンの一例を図13に示す。このようなジグザグスキャンによってできたデータ列は,最初の方に有意の係数が連続し,後ろにいくに従って有意係数の存在確率が低くなる。そこで,ハフマン符号などを用い,有意係数が連続するほど短い符号長を割り当てることで,符号化効率が向上する。また,有意係数が無くなったところにEOB(End of Block)符号を入れてデータ列を打ち切ることで,さらに符号長を短くすることができる。   An example of a zigzag scan when the block size is 8 × 8 is shown in FIG. In a data string formed by such a zigzag scan, significant coefficients continue in the first direction, and the existence probability of significant coefficients decreases as it goes backward. Thus, by using a Huffman code or the like and assigning a shorter code length as the significant coefficient continues, the coding efficiency is improved. Further, the code length can be further shortened by inserting an EOB (End of Block) code where the significant coefficient is lost and terminating the data string.

しかし,必ずしもこのジグザグのスキャン順が最適とは限らないため,複数のスキャン順を状況に応じて切り換える手法が考えられる。例えば特許文献1では,複数のスキャンパターンでスキャンを行い,EOBが最も早く発生するスキャン順を選択している。この方式の処理フローを図14に示す。スキャン順のパターンは1からSまであるとする。   However, since the zigzag scan order is not always optimal, a method of switching a plurality of scan orders depending on the situation is conceivable. For example, in Patent Document 1, scanning is performed with a plurality of scan patterns, and the scan order in which EOB occurs earliest is selected. The processing flow of this method is shown in FIG. Assume that there are 1 to S scan order patterns.

直交変換係数の量子化が終了後,まずスキャンパターンのインデックス番号iを1に初期化し(S100),i番目のスキャンパターンについてスキャンを行い,1次元のデータ列を求める(S101)。また,そのデータ列の最後の有意係数の位置k[i](即ちEOBの位置)を求める(S103)。この操作を全てのスキャンパターンi(i=1,…,S)について行う(S101〜S104)。   After the quantization of the orthogonal transform coefficient is completed, first, the scan pattern index number i is initialized to 1 (S100), and the i-th scan pattern is scanned to obtain a one-dimensional data string (S101). Further, the position k [i] (that is, the position of EOB) of the last significant coefficient of the data string is obtained (S103). This operation is performed for all scan patterns i (i = 1,..., S) (S101 to S104).

全スキャンパターンについて終了した後,最後の有意係数の位置が最も手前となるスキャンパターンi_minを実際に使用するスキャンパターンとし(S105),そのスキャン順で求まる1次元データ列を可変長符号化する(S106)。また,選択したスキャンパターンの番号i_minを出力する(S107)。   After all the scan patterns have been completed, the scan pattern i_min in which the position of the last significant coefficient is closest is set as the scan pattern to be actually used (S105), and the one-dimensional data sequence obtained in the scan order is variable-length encoded ( S106). The number i_min of the selected scan pattern is output (S107).

この処理を実現するための構成例を図15に示す。この構成例は,量子化部100,第1スキャン部,第2スキャン部,... ,第Sスキャン部101−1〜S,スキャン順決定部102,セレクタ104,可変長符号化部105から構成される。なお,スキャン部101は,スキャンパターンの個数分あるとする(この場合はS個ある)。   A configuration example for realizing this processing is shown in FIG. This configuration example includes a quantization unit 100, a first scan unit, a second scan unit,..., An S-th scan unit 101-1 to S, a scan order determination unit 102, a selector 104, and a variable length coding unit 105. Composed. It is assumed that there are as many scan units 101 as the number of scan patterns (in this case, there are S).

量子化部100は,入力された2次元直交変換係数を所定の量子化幅で量子化する。第1スキャン部〜第Sスキャン部101は,それぞれ予め設定されたスキャンパターンで2次元直交変換係数の量子化値を走査し,連続するゼロの個数(ラン)と量子化値(レベル)情報をセレクタ104に出力する。また,EOBの位置情報をスキャン順決定部102に送信する。   The quantization unit 100 quantizes the input two-dimensional orthogonal transform coefficient with a predetermined quantization width. Each of the first to S-th scanning units 101 scans the quantization value of the two-dimensional orthogonal transform coefficient with a preset scan pattern, and obtains the number of consecutive zeros (run) and quantization value (level) information. Output to the selector 104. Also, the EOB position information is transmitted to the scan order determination unit 102.

スキャン順決定部102は,第1スキャン部〜第Sスキャン部101から送られてくるEOBの位置情報から,最もEOBの位置が手前となるスキャンパターンを求め,その番号をセレクタ104に送信するとともに,スキャンモード番号として出力する。セレクタ104は,第1スキャン部〜第Sスキャン部101から送られてくる1次元データ列のうち,スキャン順決定部102から送られるモード番号のデータ列を出力する。可変長符号化部105は,入力された1次元のデータ列を可変長符号化して出力する。   The scan order determination unit 102 obtains a scan pattern with the EOB position closest to the EOB position information sent from the first scan unit to the S-th scan unit 101, and transmits the number to the selector 104. , Output as scan mode number. The selector 104 outputs the data string of the mode number sent from the scan order determining unit 102 among the one-dimensional data strings sent from the first scan unit to the S-th scan unit 101. The variable length coding unit 105 performs variable length coding on the input one-dimensional data string and outputs the result.

このような仕組みを用いて複数のスキャン順を切り換えることで,符号化効率がさらに向上する。   Encoding efficiency is further improved by switching a plurality of scan orders using such a mechanism.

また,この出力データを復号する場合の構成例を図16に示す。この装置は可変長符号復号部200,可変順序逆スキャン部201,逆量子化部202から構成される。可変長符号復号部200は,入力された可変長符号を1次元のデータ列に直し,可変順序逆スキャン部201に出力する。可変順序逆スキャン部201は,スキャン順モード情報で指定されたパターンをもとに,入力された1次元データ列の各係数について,2次元配列での格納位置を求め,量子化値とともに逆量子化部202に送る。逆量子化部202では,可変順序逆スキャン部201から量子化値と格納位置を受信すると,2次元配列の指定位置に量子化値を格納し,入力量子化幅で逆量子化して直交変換係数として出力する。   Also, FIG. 16 shows a configuration example when decoding this output data. This apparatus includes a variable length code decoding unit 200, a variable order reverse scan unit 201, and an inverse quantization unit 202. The variable-length code decoding unit 200 converts the input variable-length code into a one-dimensional data string and outputs it to the variable order reverse scanning unit 201. The variable order reverse scan unit 201 obtains the storage position in the two-dimensional array for each coefficient of the input one-dimensional data sequence based on the pattern specified by the scan order mode information, and performs the inverse quantum together with the quantization value. To the conversion unit 202. When the inverse quantization unit 202 receives the quantized value and the storage position from the variable order inverse scan unit 201, the inverse quantization unit 202 stores the quantized value at the designated position of the two-dimensional array, and performs inverse quantization with the input quantization width to perform orthogonal transform coefficients. Output as.

このような仕組みを用いることで,複数のスキャン順を使用した符号化データを復号することができる。
特開平6−86076号公報
By using such a mechanism, encoded data using a plurality of scan orders can be decoded.
JP-A-6-86076

しかしながら,複数のスキャン順を切り換える場合には,スキャン順を決定するための演算コストがかかる上,選択されたスキャン順の情報をビットストリーム内に埋め込む必要があるなどの問題がある。特に4×4DCTを用いるH.264映像符号化規格など,DCTの単位が小さい場合にはスキャン回数が多くなるため,この問題は顕著になる。   However, when a plurality of scan orders are switched, there are problems such as high calculation costs for determining the scan order and the need to embed information on the selected scan order in the bitstream. In particular, H.264 using 4 × 4 DCT. This problem becomes significant when the DCT unit is small, such as the H.264 video coding standard, because the number of scans increases.

本発明は上記問題点の解決を図り,スキャン順を決定するための演算コストの増加を抑えつつ,スキャン順のパターン情報無しでスキャン順の切り換えを行うことができるようにすることを目的とする。   SUMMARY OF THE INVENTION It is an object of the present invention to solve the above-described problems and to enable switching of the scan order without pattern information on the scan order while suppressing an increase in calculation cost for determining the scan order. .

そこで本発明では,前記課題を解決するために,途中までのスキャン順を固定とし,それ以降のスキャン順を可変とする手段を備え,可変部分のスキャン順のパターンは固定部分までのスキャンで読み取った量子化値から決定することを特徴とする。   Therefore, in the present invention, in order to solve the above-described problem, there is provided means for fixing the scan order up to the middle and making the subsequent scan order variable, and the pattern of the variable part scan order is read by scanning up to the fixed part. It is characterized in that it is determined from the quantized value.

例えば,最初の3係数のスキャンは(0,0)→(0,1)→(1,0)の固定順で行い,それ以降の係数のスキャンは,(0,1)の係数と(1,0)の係数の大小比較から,
・(0,1)=(1,0):スキャンパターン1
・(0,1)>(1,0):スキャンパターン2
・(0,1)<(1,0):スキャンパターン3
という形で決定する,という方法を採る。
For example, the first three coefficients are scanned in the fixed order of (0,0) → (0,1) → (1,0), and the subsequent coefficients are scanned with the coefficients (0,1) and (1 , 0)
(0, 1) = (1, 0): Scan pattern 1
(0, 1)> (1, 0): Scan pattern 2
(0, 1) <(1, 0): Scan pattern 3
The method of making decisions is used.

図1に,本発明における符号化器のスキャン処理のフローの一例を示す。
[ステップS1]:処理を開始すると,量子化値の2次元データの最初からN番目(Nは3以上の所定数)までを固定したスキャン順で読み出す。
[ステップS2]:読み出した量子化値からN+1番目以降の量子化値のスキャン順のパターンPを決定する。
[ステップS3]:スキャンパターンPのスキャン順で量子化値をスキャンする。
[ステップS4]:スキャン結果を可変長符号化する。
FIG. 1 shows an example of a flow of scan processing of the encoder in the present invention.
[Step S1]: When the process is started, the first to Nth (N is a predetermined number of 3 or more) of the two-dimensional data of the quantized values are read in a fixed scan order.
[Step S2]: The pattern P in the scan order of the (N + 1) th and subsequent quantized values is determined from the read quantized values.
[Step S3]: The quantized values are scanned in the scan order of the scan pattern P.
[Step S4]: The scan result is variable-length encoded.

本フローチャートのステップS2にあるスキャンパターンP決定処理フローの一例を図2に示す。   An example of the scan pattern P determination process flow in step S2 of this flowchart is shown in FIG.

スキャンパターンP決定処理では,例えば読み出した係数A(0,1)とA(1,0)とを比較(S210)し,A(0,1)=A(1,0)ならジグザグスキャンをスキャンパターン(P=1)として選択する(S211)。A(0,1)>A(1,0)なら横方向優先スキャンをスキャンパターン(P=2)として選択する(S212)。A(0,1)<A(1,0)なら縦方向優先スキャンをスキャンパターン(P=3)として選択する(S213)。   In the scan pattern P determination process, for example, the read coefficient A (0,1) and A (1,0) are compared (S210), and if A (0,1) = A (1,0), a zigzag scan is scanned. A pattern (P = 1) is selected (S211). If A (0, 1)> A (1, 0), the horizontal priority scan is selected as the scan pattern (P = 2) (S212). If A (0, 1) <A (1, 0), the vertical priority scan is selected as the scan pattern (P = 3) (S213).

符号化単位のブロックサイズが4×4の場合のジグザグスキャン,横方向優先スキャン,縦方向優先スキャンの例を図3に示す。この切り換え方法を用いた場合,7割以上の正答率でスキャンパターンの切り換えを行うことができる。   FIG. 3 shows examples of zigzag scanning, horizontal direction priority scanning, and vertical direction priority scanning when the block size of the encoding unit is 4 × 4. When this switching method is used, the scan pattern can be switched at a correct answer rate of 70% or more.

また,最初の6係数のスキャンを(0,0)→(0,1)→(1,0)→(2,0)→(1,1)→(0,2)の固定順に行い,それ以降のスキャンは,これら6つの分散から,「低周波領域優先スキャン」と「ジグザグスキャン」を切り換えるという方法も考えられる。   Also, the first 6 coefficients are scanned in the fixed order of (0,0) → (0,1) → (1,0) → (2,0) → (1,1) → (0,2). In the subsequent scan, a method of switching between “low frequency region priority scan” and “zigzag scan” from these six dispersions may be considered.

符号化単位として8×8ブロックを用いる場合のスキャンパターンの一例を図4に示す。また,この場合の図1に示すフローチャートのS2にあるスキャンパターンP決定処理フローの一例を図5に示す。   An example of a scan pattern in the case of using an 8 × 8 block as a coding unit is shown in FIG. FIG. 5 shows an example of the scan pattern P determination processing flow in S2 of the flowchart shown in FIG. 1 in this case.

この例のスキャンパターンP決定処理では,読み出した係数(0,0),(0,1),(1,0),(2,0),(1,1),(0,2)の分散Varを計算し(S220),分散Varと予め定めた閾値Thとを比較する(S221)。もしVar>Thならばジグザグスキャンをスキャンパターン(P=1)として選択し(S222),もしVar≦Thならば低周波領域優先スャンをスキャンパターン(P=4)として選択する(S223)。   In the scan pattern P determination process of this example, the distribution of the read coefficients (0, 0), (0, 1), (1, 0), (2, 0), (1, 1), (0, 2) Var is calculated (S220), and the variance Var is compared with a predetermined threshold Th (S221). If Var> Th, the zigzag scan is selected as the scan pattern (P = 1) (S222), and if Var ≦ Th, the low frequency region priority scan is selected as the scan pattern (P = 4) (S223).

図1のフローチャートに示す処理を実現するための構成図の一例を図6に示す。この装置は,量子化部10,スキャン順決定部11,第1スキャン部12−1,第2スキャン部12−2,... ,第Sスキャン部12−S,セレクタ13,可変長符号化部14から構成される。   An example of a configuration diagram for realizing the processing shown in the flowchart of FIG. 1 is shown in FIG. This apparatus includes a quantization unit 10, a scan order determination unit 11, a first scan unit 12-1, a second scan unit 12-2,..., An S scan unit 12-S, a selector 13, and a variable length coding. The unit 14 is configured.

量子化部10,セレクタ13,可変長符号化部14は,それぞれ図15に示した既存技術の復号部の構成例における同名のものと同等の機能を有するものとする。第1スキャン部12−1,第2スキャン部12−2,... ,第Sスキャン部12−Sについても,前述の図15における同名のものと同等の機能を有するが,先頭からN番目までのスキャン順は全て等しいとする。スキャン順決定部102は,スキャン順でN番目までの量子化値をもとに,予め決められたスキャンパターンから一つを選択し,そのモード番号を出力する。このような仕組みを用いることで,図1に示すフローチャートの処理を実現できる。   The quantizing unit 10, the selector 13, and the variable length coding unit 14 are assumed to have functions equivalent to those of the same name in the configuration example of the decoding unit of the existing technology shown in FIG. The first scan unit 12-1, the second scan unit 12-2,..., The S-th scan unit 12-S have the same functions as those of the same name in FIG. The scan order up to is all equal. The scan order determining unit 102 selects one of the predetermined scan patterns based on the Nth quantized values in the scan order and outputs the mode number. By using such a mechanism, the processing of the flowchart shown in FIG. 1 can be realized.

また,復号部におけるスキャン処理のフローの一例を図7に示す。
[ステップS30]:可変長符号を復号し,ランとレベルのデータに直す。
[ステップS31]:スキャン順でN番目までの量子化値を取り出し,その値からスキャンパターンPを決定する。
[ステップS32]:スキャンパターンPの逆スキャン順から決定される2次元配列の所定の位置へ量子化値を格納する。
An example of the scan processing flow in the decoding unit is shown in FIG.
[Step S30]: The variable length code is decoded and converted into run and level data.
[Step S31]: The Nth quantized values in the scan order are extracted, and the scan pattern P is determined from the values.
[Step S32]: The quantized value is stored in a predetermined position of the two-dimensional array determined from the reverse scan order of the scan pattern P.

この処理を実現するための構成図の一例を図8に示す。この装置は,可変長符号復号部20,量子化値読み出し部21,スキャン順決定部22,可変順序逆スキャン部23,逆量子化部24から構成される。可変長符号復号部20,逆量子化部24は,それぞれ図16に示した既存技術の構成例における同名のものと同等の機能を有するものとする。また,スキャン順決定部22は,図6のスキャン順決定部11と同等の機能を有するものとする。   An example of a configuration diagram for realizing this processing is shown in FIG. This apparatus includes a variable length code decoding unit 20, a quantized value reading unit 21, a scan order determination unit 22, a variable order reverse scan unit 23, and an inverse quantization unit 24. The variable-length code decoding unit 20 and the inverse quantization unit 24 have functions equivalent to those of the same name in the configuration example of the existing technology shown in FIG. The scan order determining unit 22 has the same function as the scan order determining unit 11 in FIG.

可変順序逆スキャン部23は,スキャン順決定部22の出力であるスキャン順モード情報で指定されたパターンをもとに,量子化値の2次元配列での格納位置を求め,量子化値とともに逆量子化部24に送る。   The variable order reverse scanning unit 23 obtains the storage position in the two-dimensional array of the quantized values based on the pattern specified by the scan order mode information that is the output of the scan order determining unit 22, and reverses it together with the quantized values. The data is sent to the quantization unit 24.

このような仕組みを用いることで,可変長符号を直交変換係数へと復号することができる。   By using such a mechanism, a variable length code can be decoded into an orthogonal transform coefficient.

なお,固定部分,可変部分のスキャンの順序はこれらの例に限定されるものではなく,任意のものを用いることができる。   Note that the scanning order of the fixed portion and the variable portion is not limited to these examples, and an arbitrary one can be used.

本発明によれば,スキャンパターンの決定を量子化値の一部のみから行うため,判定処理が軽くなる。また,スキャン順が固定されている部分の量子化値からスキャン順のパターンを判定するため,スキャン順のパターン情報を復号側へ送る必要がなくなる。これらにより,演算コストの増加を最小限に抑えつつ,スキャン順のパターン情報無しでスキャン順の切り換えを行うことができる。   According to the present invention, since the scan pattern is determined from only a part of the quantized value, the determination process is lightened. In addition, since the scan order pattern is determined from the quantization value of the portion where the scan order is fixed, it is not necessary to send the scan order pattern information to the decoding side. As a result, the scan order can be switched without the pattern information of the scan order while minimizing the increase in the calculation cost.

したがって,本発明は,スキャン順を選択する計算量の削減という効果,さらにスキャン順をヘッダー情報として伝送する必要が無いことによる情報伝送効率の向上という効果を奏する。   Therefore, the present invention has the effect of reducing the amount of calculation for selecting the scan order and the effect of improving the information transmission efficiency because it is not necessary to transmit the scan order as header information.

以下に本発明の実施例について説明する。本実施例では,映像を4×4ブロック毎に直交変換・量子化と可変長符号化を施すものとする。また,量子化値の2次元配列Aのうち,(0,0),(0,1),(1,0)の位置の3つの量子化値A(0,0),A(0,1),A(0,1)は常にこの順番でスキャンし,それ以降の13個の量子化値のスキャンパターンは3種類から切り換えるものとする(即ちN=3)。先頭から3番目までのスキャン順は同じで,それ以降が異なっている。また,これらのスキャンパターンの切り換えは,A(0,1)とA(1,0)の大小比較から以下のように決定する。   Examples of the present invention will be described below. In this embodiment, the video is subjected to orthogonal transform / quantization and variable length coding for each 4 × 4 block. Also, in the two-dimensional array A of quantized values, three quantized values A (0, 0), A (0, 1) at positions (0, 0), (0, 1), (1, 0). ), A (0, 1) are always scanned in this order, and the scan pattern of the 13 quantized values thereafter is switched from three types (ie, N = 3). The scan order from the top to the third is the same, and the rest is different. Further, the switching of these scan patterns is determined as follows from the comparison of the magnitudes of A (0, 1) and A (1, 0).

・A(0,1)=A(1,0):スキャンパターン1(ジグザグスキャン)
・A(0,1)>A(1,0):スキャンパターン2(横方向優先スキャン)
・A(0,1)<A(1,0):スキャンパターン3(縦方向優先スキャン)
本実施例の処理フローの例を図9に示す。直交変換行列を所定の量子化幅で量子化した後,変換係数の量子化値の2次元配列Aのうち,A(0,0),A(0,1),A(1,0)をこの順でスキャンする(S40)。次に,A(0,1)とA(1,0)の大小を比較し(S41),A(0,1)=A(1,0)ならば1をPに代入し(S42),A(0,1)>A(1,0)ならば2をPに代入し(S43),A(0,1)<A(1,0)ならば3をPに代入する(S44)。その後,量子化値の2次元配列AをスキャンパターンPで走査し(S45),可変長符号化を施す(S46)。
A (0, 1) = A (1, 0): Scan pattern 1 (zigzag scan)
A (0, 1)> A (1, 0): Scan pattern 2 (horizontal direction priority scan)
A (0, 1) <A (1, 0): Scan pattern 3 (vertical priority scan)
An example of the processing flow of this embodiment is shown in FIG. After the orthogonal transformation matrix is quantized with a predetermined quantization width, A (0,0), A (0,1), A (1,0) are converted from the two-dimensional array A of the quantized values of the transform coefficients. Scan in this order (S40). Next, the magnitudes of A (0,1) and A (1,0) are compared (S41), and if A (0,1) = A (1,0), 1 is substituted into P (S42), If A (0,1)> A (1,0), 2 is substituted into P (S43), and if A (0,1) <A (1,0), 3 is substituted into P (S44). Thereafter, the two-dimensional array A of quantized values is scanned with the scan pattern P (S45), and variable length coding is performed (S46).

また,この処理を実現するための構成図の一例を図10に示す。この装置は,量子化部10,比較器110,第1スキャン部12−1,第2スキャン部12−2,第3スキャン部12−3,セレクタ13,可変長符号化部14から構成される。   An example of a configuration diagram for realizing this processing is shown in FIG. This apparatus comprises a quantizing unit 10, a comparator 110, a first scanning unit 12-1, a second scanning unit 12-2, a third scanning unit 12-3, a selector 13, and a variable length coding unit 14. .

量子化部10,セレクタ13,可変長符号化部14については,図6における同名のものと同等の機能を有する。セレクタ13は,比較器110から送信されるモード番号が1のときは第1スキャン部12−1のランとレベルを可変長符号化部14へ送信する。また,モード番号が2,3のときはそれぞれ第2スキャン部12−2,第3スキャン部12−3のランとレベルを可変長符号化部14へと送る。   The quantizing unit 10, the selector 13, and the variable length coding unit 14 have functions equivalent to those of the same name in FIG. When the mode number transmitted from the comparator 110 is 1, the selector 13 transmits the run and level of the first scan unit 12-1 to the variable length coding unit 14. When the mode number is 2 or 3, the run and level of the second scan unit 12-2 and the third scan unit 12-3 are sent to the variable length coding unit 14, respectively.

第1スキャン部12−1は,スキャンパターン1に従って量子化値を走査し,ランとレベルの情報をセレクタ13へと送信する。第2スキャン部12−2は,スキャンパターン2に従って,第3スキャン部12−3は,スキャンパターン3に従って同様の操作を行う。比較器110は,A(0,1)とA(1,0)の比較結果からスキャンモード番号をセレクタ13に送信する。このような装置を用いることで,図9に示す処理を実現することができる。   The first scan unit 12-1 scans the quantized value according to the scan pattern 1 and transmits run and level information to the selector 13. The second scan unit 12-2 performs the same operation according to the scan pattern 2, and the third scan unit 12-3 performs the same operation according to the scan pattern 3. The comparator 110 transmits a scan mode number to the selector 13 based on the comparison result between A (0,1) and A (1,0). By using such an apparatus, the processing shown in FIG. 9 can be realized.

次に,復号時のスキャン操作のフローチャートの一例を図11に示す。まず,可変長符号をランとレベルのデータに復号する(S50)。次に,3番目までの量子化値A(0,0),A(0,1),A(1,0)を取り出して(S51),A(0,1)とA(1,0)の大小を比較し(S52),A(0,1)=A(1,0)ならば1をPに代入し(S53),A(0,1)>A(1,0)ならば2をPに代入し(S54),A(0,1)<A(1,0)ならば3をPに代入する(S55)。そして各量子化値の2次元配列での格納位置を,スキャンパターンPの逆スキャン順から求め,それぞれ所定の位置に格納する(S56)。その後,所定の量子化幅で逆量子化を施すことで,直交変換係数の2次元配列へと復号することができる。   Next, an example of a flowchart of the scanning operation at the time of decoding is shown in FIG. First, the variable length code is decoded into run and level data (S50). Next, the third quantized values A (0, 0), A (0, 1), A (1, 0) are extracted (S51), A (0, 1) and A (1, 0) Are compared (S52). If A (0,1) = A (1,0), 1 is substituted into P (S53), and if A (0,1)> A (1,0), 2 is substituted. Is substituted into P (S54), and if A (0,1) <A (1,0), 3 is substituted into P (S55). Then, the storage position of each quantized value in the two-dimensional array is obtained from the reverse scan order of the scan pattern P and stored in a predetermined position (S56). Then, by performing inverse quantization with a predetermined quantization width, it is possible to decode into a two-dimensional array of orthogonal transform coefficients.

この処理を実現するための構成図の一例を図12に示す。この装置は,可変長符号復号部20,量子化値読み出し部21,スイッチ26,比較器25,第1逆スキャン部27−1,第2逆スキャン部27−2,第3逆スキャン部27−3,逆量子化部24から構成される。可変長符号復号部20,逆量子化部24は,図8における同名のものと同等の機能を有する。   An example of a configuration diagram for realizing this processing is shown in FIG. This apparatus includes a variable length code decoding unit 20, a quantized value reading unit 21, a switch 26, a comparator 25, a first reverse scan unit 27-1, a second reverse scan unit 27-2, and a third reverse scan unit 27-. 3 and an inverse quantization unit 24. The variable length code decoding unit 20 and the inverse quantization unit 24 have functions equivalent to those of the same name in FIG.

量子化値読み出し部21は,ランとレベルから先頭の3つの量子化値を取り出し,そのうちA(0,1)とA(1,0)を比較器25へと送る。比較器25は,A(0,1)とA(1,0)の大小を比較し,スイッチ26に制御信号を送り,A(0,1)=A(1,0)ならばa,A(0,1)>A(1,0)ならばb,A(0,1)<A(1,0)ならばcにスイッチ26を切り換える。   The quantized value reading unit 21 extracts the first three quantized values from the run and level, and sends A (0,1) and A (1,0) to the comparator 25 among them. The comparator 25 compares A (0,1) and A (1,0), sends a control signal to the switch 26, and if A (0,1) = A (1,0), a, A If (0,1)> A (1,0), switch 26 is switched to b, and if A (0,1) <A (1,0), switch 26 is switched to c.

スイッチ26は,比較器25からの制御信号に応じてランとレベルの送信先を切り換える。   The switch 26 switches between the run and level transmission destinations according to the control signal from the comparator 25.

第1逆スキャン部27−1は,スキャンパターン1をもとに,入力されたランとレベルから量子化値の2次元配列での格納位置を求め,量子化値とともに逆量子化部24へと送る。第2逆スキャン部27−2は,スキャンパターン2をもとに,第3逆スキャン部27−3は,スキャンパターン3をもとに,同様の動作を行う。   Based on the scan pattern 1, the first inverse scan unit 27-1 obtains a storage position in a two-dimensional array of quantized values from the input run and level, and sends the quantized values to the inverse quantizer 24 together with the quantized values. send. The second reverse scan unit 27-2 performs the same operation based on the scan pattern 2, and the third reverse scan unit 27-3 performs the same operation based on the scan pattern 3.

このような仕組みを用いることで,可変長符号を直交変換係数へと復号することができる。   By using such a mechanism, a variable length code can be decoded into an orthogonal transform coefficient.

実施例として,図3に示したスキャンパターンの切り換えの例を説明したが,例えば図4に示したジグザグスキャンと低周波領域優先スキャンの切り換えについても,同様に実施可能である。本発明の実施において,どのようなスキャンパターンを用いるかについては設計選択的事項であり,他のスキャンパターンを用いてもよいことは明らかである。   As an example, the example of switching the scan pattern shown in FIG. 3 has been described. However, for example, the switching between the zigzag scan and the low-frequency region priority scan shown in FIG. 4 can be similarly performed. In the implementation of the present invention, what scan pattern is used is a matter of design choice, and it is obvious that other scan patterns may be used.

以上のスキャン順切り換えの処理は,コンピュータとソフトウェアプログラムとによっても実現することができ,そのプログラムをコンピュータ読み取り可能な記録媒体に記録して提供することも,ネットワークを通して提供することも可能である。   The above scan order switching processing can be realized by a computer and a software program, and the program can be provided by being recorded on a computer-readable recording medium or provided through a network.

本発明における符号化器のスキャン処理のフローチャートである。It is a flowchart of the scanning process of the encoder in this invention. パターンP決定処理フローチャート(その1)である。It is a pattern P determination process flowchart (the 1). スキャンパターンの一例(縦横切り換え)を示す図である。It is a figure which shows an example (vertical / horizontal switching) of a scanning pattern. スキャンパターンの一例(ジグザグと低周波優先での切り換え)を示す図である。It is a figure which shows an example (switching by a zigzag and low frequency priority) of a scanning pattern. パターンP決定処理フローチャート(その2)である。It is a pattern P determination process flowchart (the 2). 本発明の構成例を示す図である。It is a figure which shows the structural example of this invention. 本発明の復号部のフローチャートである。It is a flowchart of the decoding part of this invention. 本発明の復号部の構成例を示す図である。It is a figure which shows the structural example of the decoding part of this invention. 実施例のフローチャートである。It is a flowchart of an Example. 実施例の構成例を示す図である。It is a figure which shows the structural example of an Example. 実施例の復号部のフローチャートである。It is a flowchart of the decoding part of an Example. 実施例の復号部の構成例を示す図である。It is a figure which shows the structural example of the decoding part of an Example. 8×8ブロックのジグザグスキャンの一例を示す図である。It is a figure which shows an example of the 8x8 block zigzag scan. スキャン順決定方法の既存技術のフローチャートである。It is a flowchart of the existing technique of a scanning order determination method. 既存技術の構成例を示す図である。It is a figure which shows the structural example of the existing technique. 既存技術の復号部の構成例を示す図である。It is a figure which shows the structural example of the decoding part of the existing technique.

符号の説明Explanation of symbols

10 量子化部
11 スキャン順決定部
12−1〜12〜S 第1スキャン部〜第Sスキャン部
13 セレクタ
14 可変長符号化部
20 可変長符号復号部
21 量子化値読み出し部
22 スキャン順決定部
23 可変順序逆スキャン部
24 逆量子化部
DESCRIPTION OF SYMBOLS 10 Quantization part 11 Scan order determination part 12-1 to 12-S 1st scan part-S-th scan part 13 Selector 14 Variable length encoding part 20 Variable length code decoding part 21 Quantized value reading part 22 Scan order determination part 23 Variable Order Reverse Scan Unit 24 Inverse Quantization Unit

Claims (10)

画像を複数画素のブロックに分割し,ブロック毎に直交変換係数を量子化することで得られる2次元データを1次元データ列に変換する直交変換係数のスキャン方法において,
前記量子化値の2次元データの先頭からN番目までを予め定められたジグザグスキャンのスキャン順で読み出す過程と,
それぞれ異なるスキャン順を定める複数のスキャンパターンの中から,前記読み出したN個の量子化値により一意に定まる一つのスキャンパターンを選択する過程と,
前記選択したスキャンパターンによって定められたスキャン順に従って前記2次元データを1次元データ列に変換する過程とを有する
ことを特徴とする直交変換係数のスキャン方法。
In an orthogonal transform coefficient scanning method for transforming two-dimensional data obtained by dividing an image into a plurality of pixel blocks and quantizing the orthogonal transform coefficient for each block into a one-dimensional data string,
A step of reading out the scan order of predetermined zigzag scanning from the beginning of the two-dimensional data to N-th of the quantized value,
Selecting one scan pattern uniquely determined by the read N quantized values from a plurality of scan patterns that define different scan orders;
A method of scanning orthogonal transform coefficients, comprising: converting the two-dimensional data into a one-dimensional data string according to a scan order determined by the selected scan pattern.
前記スキャンパターンを選択する過程では,前記先頭からN番目までの量子化値の大小比較にもとづいてスキャンパターンを選択する
ことを特徴とする請求項1記載の直交変換係数のスキャン方法。
The orthogonal transform coefficient scanning method according to claim 1, wherein, in the process of selecting the scan pattern, the scan pattern is selected based on a comparison of the magnitudes of the quantized values from the head to the Nth.
前記スキャンパターンを選択する過程では,前記先頭からN番目までの量子化値の分散にもとづいてスキャンパターンを選択する
ことを特徴とする請求項1記載の直交変換係数のスキャン方法。
The orthogonal transform coefficient scanning method according to claim 1, wherein, in the process of selecting the scan pattern, a scan pattern is selected based on a variance of the quantized values from the head to the Nth.
請求項1記載の直交変換係数のスキャン方法によって生成した量子化値の1次元データ列を2次元データに変換する直交変換係数の逆スキャン方法であって,
前記1次元データ列の先頭からN番目までの量子化値を取り出す過程と,
求項1記載の複数のスキャンパターンの中から,前記取り出した量子化値により一意に定まる一つのスキャンパターンを選択する過程と,
選択されたスキャンパターンに対応するスキャン順に従って,前記1次元データ列の各量子化値を2次元データの定められた位置に格納する過程とを有する
ことを特徴とする直交変換係数の逆スキャン方法。
An inverse transform coefficient inverse scan method for transforming a one-dimensional data string of quantized values generated by the orthogonal transform coefficient scan method according to claim 1 into two-dimensional data,
Taking out the quantized values from the beginning to the Nth of the one-dimensional data sequence;
From the plurality of scan patterns in Motomeko 1 wherein the steps of selecting one of the scan pattern uniquely determined by the retrieved quantization value,
Storing each quantized value of the one-dimensional data string in a predetermined position of the two-dimensional data according to a scan order corresponding to the selected scan pattern. .
画像を複数画素のブロックに分割し,ブロック毎に直交変換係数を量子化することで得られる2次元データを1次元データ列に変換するスキャン装置であって,
あらかじめ定められた複数の異なるスキャンパターンにそれぞれ対応したスキャン順に従って前記2次元データを1次元データ列に変換する複数のスキャン手段と,
前記複数のスキャンパターンの中から,先頭からN番目までの予め定められたジグザグスキャンのスキャン順でスキャンされた量子化値により一意に定まる一つのスキャンパターンを選択するスキャン順決定手段と,
前記スキャン順決定手段によって選択されたスキャンパターンに対応するスキャン手段の出力を,1次元データ列への変換結果として出力する選択手段とを備え,
先頭からN番目までの固定のスキャン順に従って読み出された結果からスキャン順を切り換える
ことを特徴とする直交変換係数のスキャン装置。
A scanning device that converts two-dimensional data obtained by dividing an image into a plurality of pixel blocks and quantizing orthogonal transform coefficients for each block into a one-dimensional data string,
A plurality of scanning means for converting the two-dimensional data into a one-dimensional data string in accordance with a scanning order corresponding to a plurality of predetermined different scanning patterns;
A scan order determining means for selecting , from among the plurality of scan patterns, one scan pattern uniquely determined by a quantized value scanned in a scan order of a predetermined zigzag scan from the head to the Nth;
Selecting means for outputting the output of the scanning means corresponding to the scan pattern selected by the scanning order determining means as a conversion result to a one-dimensional data string;
A scan device for orthogonal transform coefficients, wherein the scan order is switched from the result read in accordance with a fixed scan order from the top to the Nth.
請求項5記載の直交変換係数のスキャン装置によって生成した量子化値の1次元データ列を2次元データに変換する逆スキャン装置であって,
前記1次元データ列の先頭からN番目までの量子化値を取り出す手段と,
求項1記載の複数のスキャンパターンの中から,前記取り出した量子化値により一意に定まる一つのスキャンパターンを選択するスキャン順決定手段と,
前記スキャン順決定手段によって選択されたスキャンパターンに対応するスキャン順に従って,前記1次元データ列の各量子化値を2次元データの定められた位置に格納する可変順序逆スキャン手段とを備える
ことを特徴とする直交変換係数の逆スキャン装置。
An inverse scanning device for converting a one-dimensional data sequence of quantized values generated by the orthogonal transform coefficient scanning device according to claim 5 into two-dimensional data,
Means for extracting quantized values from the beginning to the Nth of the one-dimensional data sequence;
From the plurality of scan patterns in Motomeko 1, wherein the scan order decision means for selecting one of the scan pattern uniquely determined by the retrieved quantization value,
Variable order reverse scanning means for storing each quantized value of the one-dimensional data string at a predetermined position of the two-dimensional data according to a scan order corresponding to the scan pattern selected by the scan order determining means. Characteristic orthogonal transform coefficient inverse scanning device.
請求項1,請求項2または請求項3記載の直交変換係数のスキャン方法を,コンピュータに実行させるための直交変換係数のスキャン用プログラム。   An orthogonal transform coefficient scanning program for causing a computer to execute the orthogonal transform coefficient scanning method according to claim 1, 2 or 3. 請求項4記載の直交変換係数の逆スキャン方法を,コンピュータに実行させるための直交変換係数の逆スキャン用プログラム。   An orthogonal transform coefficient inverse scan program for causing a computer to execute the orthogonal transform coefficient inverse scan method according to claim 4. 請求項1,請求項2または請求項3記載の直交変換係数のスキャン方法を,コンピュータに実行させるための直交変換係数のスキャン用プログラムを記録したコンピュータ読み取り可能な記録媒体。   A computer-readable recording medium recording an orthogonal transform coefficient scanning program for causing a computer to execute the orthogonal transform coefficient scanning method according to claim 1, 2 or 3. 請求項4記載の直交変換係数の逆スキャン方法を,コンピュータに実行させるための直交変換係数の逆スキャン用プログラムを記録したコンピュータ読み取り可能な記録媒体。   5. A computer-readable recording medium on which an orthogonal transform coefficient inverse scan program for causing a computer to execute the orthogonal transform coefficient inverse scan method according to claim 4 is recorded.
JP2005321923A 2005-11-07 2005-11-07 Orthogonal transform coefficient scanning method, inverse scanning method, scanning device, inverse scanning device, program thereof, and computer-readable recording medium recording the program Expired - Fee Related JP4460521B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005321923A JP4460521B2 (en) 2005-11-07 2005-11-07 Orthogonal transform coefficient scanning method, inverse scanning method, scanning device, inverse scanning device, program thereof, and computer-readable recording medium recording the program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005321923A JP4460521B2 (en) 2005-11-07 2005-11-07 Orthogonal transform coefficient scanning method, inverse scanning method, scanning device, inverse scanning device, program thereof, and computer-readable recording medium recording the program

Publications (2)

Publication Number Publication Date
JP2007129612A JP2007129612A (en) 2007-05-24
JP4460521B2 true JP4460521B2 (en) 2010-05-12

Family

ID=38151881

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005321923A Expired - Fee Related JP4460521B2 (en) 2005-11-07 2005-11-07 Orthogonal transform coefficient scanning method, inverse scanning method, scanning device, inverse scanning device, program thereof, and computer-readable recording medium recording the program

Country Status (1)

Country Link
JP (1) JP4460521B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5421609B2 (en) * 2009-02-17 2014-02-19 キヤノン株式会社 Scan conversion device, image encoding device, and control method thereof
JP5004986B2 (en) 2009-03-19 2012-08-22 キヤノン株式会社 Scan conversion device, image encoding device, and control method thereof
JP5302769B2 (en) 2009-05-14 2013-10-02 キヤノン株式会社 Scan conversion apparatus, image encoding apparatus, and control method thereof
US9641846B2 (en) 2010-10-22 2017-05-02 Qualcomm Incorporated Adaptive scanning of transform coefficients for video coding
WO2012090962A1 (en) * 2010-12-28 2012-07-05 シャープ株式会社 Image decoding device, image encoding device, data structure of encoded data, arithmetic decoding device, and arithmetic encoding device
CN102651816B (en) * 2011-02-23 2014-09-17 华为技术有限公司 Method and device for scanning transformation coefficient block

Also Published As

Publication number Publication date
JP2007129612A (en) 2007-05-24

Similar Documents

Publication Publication Date Title
JP5409909B2 (en) How to decode a bitstream
JP5957560B2 (en) Video encoding / decoding method and apparatus using large size transform unit
US5999655A (en) Method and apparatus for transmission of video pictures which are segmented to form maps of picture blocks of variable block sizes
JP4418762B2 (en) Image encoding apparatus, image decoding apparatus, control method thereof, computer program, and computer-readable storage medium
JP5258664B2 (en) Image coding apparatus, method and program, and image decoding apparatus, method and program
US20030128753A1 (en) Optimal scanning method for transform coefficients in coding/decoding of image and video
US6950471B2 (en) Coding device, coding method and storage medium
KR20110135787A (en) Image/video coding and decoding system and method using edge-adaptive transform
JP2010528555A (en) Video signal processing method and apparatus
JP4460521B2 (en) Orthogonal transform coefficient scanning method, inverse scanning method, scanning device, inverse scanning device, program thereof, and computer-readable recording medium recording the program
US20070206868A1 (en) Image encoding apparatus and control method thereof
JP4522199B2 (en) Image encoding apparatus, image processing apparatus, control method therefor, computer program, and computer-readable storage medium
JP2000069292A (en) Image processing unit, its method and storage medium
TWI510031B (en) Multi-level significance maps for encoding and decoding
JP4855417B2 (en) Video encoding device, video decoding device
KR100796176B1 (en) Method and device of coding a signal, encoder, camera system, method of decoding, scalable decoder, and receiver
US9008448B2 (en) Method and apparatus for successively encoding/decoding image
JP2020184702A (en) Decoding device and method for controlling decoding device
JPH0723385A (en) Highly efficient encoding device
JP4054430B2 (en) Image processing apparatus and method, and storage medium
JP4186470B2 (en) Encoding processing device, decoding processing device and method, and computer program
WO1998054841A1 (en) Data compressing device by permutation encoding and decompressing device
JP2001258033A (en) Coder and method for image data, and storage medium
KR101694399B1 (en) Video encoding/decoding Method and Apparatus generating/using adaptive coding pattern information, and Recording Medium therefore
JP4181699B2 (en) Encoding apparatus and method, and storage medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080205

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20080529

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20091023

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20091110

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100112

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20100209

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100212

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20130219

Year of fee payment: 3

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees