JPH07288809A - Coder for digital picture signal - Google Patents

Coder for digital picture signal

Info

Publication number
JPH07288809A
JPH07288809A JP10336194A JP10336194A JPH07288809A JP H07288809 A JPH07288809 A JP H07288809A JP 10336194 A JP10336194 A JP 10336194A JP 10336194 A JP10336194 A JP 10336194A JP H07288809 A JPH07288809 A JP H07288809A
Authority
JP
Japan
Prior art keywords
quantization
coefficient data
class
data
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.)
Pending
Application number
JP10336194A
Other languages
Japanese (ja)
Inventor
Yuka Oikawa
由佳 及川
Hisafumi Yanagihara
尚史 柳原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sony Corp
Original Assignee
Sony Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sony Corp filed Critical Sony Corp
Priority to JP10336194A priority Critical patent/JPH07288809A/en
Publication of JPH07288809A publication Critical patent/JPH07288809A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To attain a high compression rate by controlling the fineness of quantization by both luminance and activity so as to suppress deterioration in the image quality when coefficient data generated by cosine transformation is quantized. CONSTITUTION:AC coefficient data and DC coefficient DCT are generated from a DCT transmission circuit 4. The AC coefficient data are quantized by a quantization circuit 7 and subjected to variable length coding by a VLC encoder 11. A quantization number controller 10 detects the degree of luminance from the DC coefficient data of a Y signal and classifies the data into macro blocks based on a maximum value of the absolute value of the AC coefficient data. A data quantity estimate device 9 selects a quantization number in the quantization table for each of 5 macro blocks and it is fed to the quantization number controller 10 and the quantization number is adjusted by class information. A class of most rough quantization is allocated to a macro block whose luminance is high to make the deterioration in the image quality unremarkable.

Description

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

【0001】[0001]

【産業上の利用分野】この発明は、コサイン変換を使用
するディジタル画像信号の符号化装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a digital image signal coding apparatus using a cosine transform.

【0002】[0002]

【従来の技術】ディジタルビデオ信号を例えば回転ヘッ
ドにより磁気テープに記録するディジタルVTRが知ら
れている。ディジタルビデオ信号の情報量が多いので、
その伝送データ量を圧縮するための高能率符号化が採用
されることが多い。種々の高能率符号化の中でも、DC
T(Discrete Cosine Transform)の実用化が進んでい
る。
2. Description of the Related Art A digital VTR for recording a digital video signal on a magnetic tape by a rotary head is known. Since the amount of information in a digital video signal is large,
High-efficiency coding for compressing the amount of transmitted data is often adopted. Among various high efficiency coding, DC
Practical application of T (Discrete Cosine Transform) is progressing.

【0003】DCTは、1フレームの画像を例えば(8
×8)のブロック構造に変換し、このDCTブロックを
直交変換の一種であるコサイン変換処理するものであ
る。その結果、(8×8)の係数データが発生する。こ
のような係数データは、量子化され、そして、ランレン
グス符号、ハフマン符号等の可変長符号化の処理を受け
てから伝送される。伝送時には、再生側でのデータ処理
を容易とするために、符号化出力であるコード信号を一
定長のシンクブロックのデータエリア内に挿入し、コー
ド信号に対して同期信号、ID信号が付加されたシンク
ブロックを構成するフレーム化がなされる。
In the DCT, one frame image is converted into, for example, (8
X8) is converted into a block structure, and this DCT block is subjected to cosine transform processing which is a kind of orthogonal transform. As a result, (8 × 8) coefficient data is generated. Such coefficient data is quantized, subjected to variable length coding processing such as run-length coding and Huffman coding, and then transmitted. At the time of transmission, in order to facilitate data processing on the reproduction side, a code signal, which is an encoded output, is inserted into the data area of a sync block of a certain length, and a sync signal and an ID signal are added to the code signal. The frames that form the sync blocks are framed.

【0004】量子化を行なう時に、復元画像の画質の劣
化を抑えながら、圧縮効率を高めるために、画像の特徴
(アクティビィティー)に応じて量子化処理がなされる
ことが考えられている。本願出願人は、アクティビィテ
ィーに応じてDCTブロックをクラス分けし、クラスに
応じた量子化ステップで係数データを量子化することを
提案している。これは、アクティビィティーが高い画像
は、量子化ステップを粗くしても視覚上の歪が目立たな
いことに着目したものである。先に提案されている方法
では、アクティビィティーに応じたクラス分けとして、
AC(交流分)係数の絶対値の最大値を使用していた。
It is considered that, when performing quantization, in order to improve the compression efficiency while suppressing the deterioration of the image quality of the restored image, the quantization process is performed according to the feature (activity) of the image. The applicant of the present application proposes to classify the DCT blocks into classes according to the activity and quantize the coefficient data in a quantization step according to the class. This is because an image with high activity has no noticeable visual distortion even if the quantization step is roughened. In the method proposed earlier, as a class classification according to activity,
The maximum absolute value of the AC (alternating current) coefficient was used.

【0005】[0005]

【発明が解決しようとする課題】かかるクラス分けの方
法は、視覚的には、粗く量子化を行なっても、劣化が目
立たないにもかかわらず、細かく量子化できる場合が残
っていた。その結果、圧縮の効率をより向上できる余地
があった。
In the classification method as described above, there are still cases where even if coarse quantization is performed, fine quantization can be performed although deterioration is not noticeable. As a result, there is room for further improvement in compression efficiency.

【0006】従って、この発明の目的は、先に提案され
ているDCT係数の適応量子化を改良し、より効率を向
上できるディジタル画像信号の符号化装置を提供するこ
とにある。
Therefore, an object of the present invention is to provide a coding apparatus for a digital image signal, which can improve the previously proposed adaptive quantization of DCT coefficients and can further improve the efficiency.

【0007】[0007]

【課題を解決するための手段】この発明は、ディジタル
画像信号をコサイン変換により符号化し、符号化により
発生した交流係数データを可変長符号化するようにした
ディジタル画像信号の符号化装置において、交流係数デ
ータを量子化するための量子化回路と、予め用意された
量子化テーブルを参照して、所定期間の可変長符号化出
力のデータ量を目標値以下に抑えるように、量子化回路
における量子化ステップを選択するためのデータ量見積
り回路と、符号化により発生した直流係数データおよび
交流係数データを受け取り、量子化しようとする部分的
画像の量子化の細かさを指示するクラスを決定するため
の回路と、データ量見積り回路で決定される所定期間の
量子化ステップを部分画像のクラスに応じて調整するた
めの回路とからなるディジタル画像信号の符号化装置で
ある。
According to the present invention, there is provided a digital image signal coding apparatus, wherein a digital image signal is coded by cosine transform, and AC coefficient data generated by the coding is variable length coded. The quantization circuit for quantizing the coefficient data and the quantization table prepared in advance are used to refer to the quantization table of the quantization circuit in order to keep the data amount of the variable length coded output for a predetermined period below the target value. A data amount estimation circuit for selecting the quantization step and for receiving the DC coefficient data and the AC coefficient data generated by the encoding, and determining the class indicating the fineness of the quantization of the partial image to be quantized. And a circuit for adjusting the quantization step for a predetermined period determined by the data amount estimation circuit according to the class of the partial image. An encoding apparatus in a digital image signal.

【0008】[0008]

【作用】部分的画像の特徴に適応して量子化ステップの
幅を制御する時に、コサイン変換によって得られる係数
データの直流分から部分的画像の輝度を検出する。輝度
が高い時には、量子化ステップを粗くしてもそれによる
劣化が視覚上、目立たなくできる。このように量子化ス
テップを粗くすることで生じた余裕によって、他のデー
タの量子化をより細かくすることができる。
When the width of the quantization step is controlled according to the characteristics of the partial image, the brightness of the partial image is detected from the DC component of the coefficient data obtained by the cosine transform. When the brightness is high, the deterioration due to the coarse quantization step can be made visually inconspicuous. As a result of the margin generated by roughening the quantization step, other data can be quantized more finely.

【0009】[0009]

【実施例】以下、この発明の一実施例について図面を参
照して説明する。図1は、ディジタルVTRの記録側に
設けられるビデオデータの処理回路の構成を示す。図1
において、1で示す入力端子には、ディジタル化された
ビデオデータが供給される。このビデオデータがブロッ
ク化回路2に供給される。ブロック化回路2では、イン
ターレス走査の順序のビデオデータが例えば(8×8)
のDCTブロックの構造のデータに変換される。すなわ
ち、時間的に連続する第1および第2フィールドの空間
的に同一位置の(4×8)のブロックを二つ組み合わせ
て(8×8)のブロックが形成される。(8×8)のブ
ロックでは、奇数番目のライン上の画素データが第1フ
ィールドに含まれるものであり、偶数番目のライン上の
画素データが第2フィールドに含まれるものである。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 shows the configuration of a video data processing circuit provided on the recording side of a digital VTR. Figure 1
In, the digitized video data is supplied to the input terminal indicated by 1. This video data is supplied to the blocking circuit 2. In the blocking circuit 2, the video data in the interlace scanning order is, for example, (8 × 8).
Is converted into data of the DCT block structure. That is, two (4 × 8) blocks at the same spatial position in the first and second fields that are temporally consecutive are combined to form an (8 × 8) block. In the (8 × 8) block, pixel data on odd-numbered lines is included in the first field, and pixel data on even-numbered lines is included in the second field.

【0010】ブロック化回路2の出力がシャフリング回
路3に供給される。シャフリング回路3では、ドロップ
アウト、テープの傷、ヘッドクロッグ等によって、エラ
ーが集中し、画質の劣化が目立つのを防止するように、
1フレーム内で、複数のマクロブロックを単位として、
空間的な位置を元のものと異ならせる処理、すなわち、
シャフリングがなされる。この例では、シャフリング単
位とバッファリング単位とを等しく、5マクロブロック
としている。
The output of the blocking circuit 2 is supplied to the shuffling circuit 3. In the shuffling circuit 3, to prevent errors from concentrating due to dropouts, scratches on the tape, head clogs, etc., and conspicuous deterioration of image quality,
Within one frame, with multiple macroblocks as a unit,
The process of making the spatial position different from the original one, that is,
Shuffling is done. In this example, the shuffling unit is equal to the buffering unit and is set to 5 macroblocks.

【0011】シャフリング回路3の出力がDCT(コサ
イン変換)回路4および動き検出回路5に供給される。
DCT回路4からは(8×8)の係数データ(すなわ
ち、直流分DC、交流分ACの係数データ)が発生す
る。このDCT回路4は、動きブロックについては、
(8×8)のブロックに含まれる(4×8)のブロック
に関してフィールド内DCTを行うように切り替えられ
る。
The output of the shuffling circuit 3 is supplied to a DCT (cosine transform) circuit 4 and a motion detection circuit 5.
From the DCT circuit 4, (8 × 8) coefficient data (that is, coefficient data of DC component AC and AC component AC) is generated. This DCT circuit 4
Switching is performed so that the intra-field DCT is performed on the (4 × 8) block included in the (8 × 8) block.

【0012】マクロブロックは、DCTブロック当りの
(8×8)の係数データを複数ブロック集めたものであ
る。例えば525/60システムのコンポーネント方式
の(Y:CB:CR=4:1:1)のビデオデータの場
合には、図2Aに示すように、1フレーム内の同一位置
の、4個のYブロックと1個のCBブロックと1個のC
Rブロックとの計6ブロックが1マクロブロックを構成
する。サンプリング周波数が4fsc(fsc:カラーサブ
キャリア周波数)の場合では、1フレームの画像が(9
10サンプル×525ライン)であり、その内の有効デ
ータが(720サンプル×480ライン)とされる。上
述のコンポーネント方式の場合には、1フレームの全ブ
ロック数は、(720×6/4)×480÷(8×8)
=8100として求められる。従って、8100÷6=
1350が1フレーム内のマクロブロックの個数であ
る。
A macroblock is a collection of a plurality of (8 × 8) coefficient data per DCT block. For example, in the case of (Y: CB: CR = 4: 1: 1) video data of the component system of the 525/60 system, as shown in FIG. 2A, four Y blocks at the same position in one frame And 1 CB block and 1 C
A total of 6 blocks including R blocks constitute one macroblock. When the sampling frequency is 4 fsc (fsc: color subcarrier frequency), one frame image is (9
10 samples × 525 lines), and the valid data therein is (720 samples × 480 lines). In the case of the component system described above, the total number of blocks in one frame is (720 × 6/4) × 480 / (8 × 8)
= 8100. Therefore, 8100 ÷ 6 =
1350 is the number of macroblocks in one frame.

【0013】625/50システムのコンポーネント方
式の(Y:CB:CR=4:2:0)のビデオデータの
場合には、図2Bに示すように、1フレーム内の同一位
置の、4個のYブロックと1個のCBブロックと1個の
CRブロックとの計6ブロックが1マクロブロックを構
成する。
In the case of (Y: CB: CR = 4: 2: 0) video data of the component system of the 625/50 system, as shown in FIG. 2B, four video data at the same position in one frame are used. A total of 6 blocks including the Y block, one CB block and one CR block constitute one macro block.

【0014】DCT回路4で発生した(8×8)の係数
データの内のDC(直流分)係数データが圧縮されずに
後段の回路に伝送され、残りの63個のAC係数データ
がバッファ6を介して量子化回路7に供給される。AC
係数データは、図3に示すように、ジグザク走査の順で
次数が低い交流分からこれが高いものに向かって順に伝
送される。また、このAC係数データがクラス分け回路
8およびデータ量見積り器9にも供給される。バッファ
6は、見積り器9で適切な量子化番号QNoが決定され
るのに必要な時間、係数データを遅延させるとともに、
静止ブロックおよび動きブロックのそれぞれの係数デー
タを所定の順序で出力するために設けられている。見積
り器9からの量子化番号QNoは、量子化回路7に供給
されるとともに、後段に伝送される。
The DC (direct current component) coefficient data of the (8 × 8) coefficient data generated in the DCT circuit 4 is transmitted to the circuit in the subsequent stage without being compressed, and the remaining 63 pieces of AC coefficient data are buffered by the buffer 6. Is supplied to the quantization circuit 7 via. AC
As shown in FIG. 3, the coefficient data is transmitted in the order of zigzag scanning from an alternating current component having a lower order to one having a higher order. Further, this AC coefficient data is also supplied to the classification circuit 8 and the data amount estimator 9. The buffer 6 delays the coefficient data for a time required for the estimator 9 to determine an appropriate quantization number QNo, and
It is provided to output the coefficient data of each of the still block and the moving block in a predetermined order. The quantization number QNo from the estimator 9 is supplied to the quantization circuit 7 and transmitted to the subsequent stage.

【0015】上述のDCT回路4からの係数データの発
生は、フレーム内のDCT変換の場合であって、若し、
動き検出回路5によって、動きがあると検出されると、
フィールド内のDCTの処理が選択される。すなわち、
時間的に連続する第1および第2フィールド内の同一位
置の(4×8)の二つのブロック毎に、DCTを行うの
がフィールド内DCTである。若し、そのブロックに関
してフィールド間で動きがあると動き検出回路5が検出
すると、この検出に応答してフレーム内DCTからフィ
ールド内DCTに変更される。動き検出回路5は、(8
×8)のブロックの画像データをアダマール変換した時
の垂直方向の係数データに基づいて静止/動きの判定を
ブロック毎に行う。動き検出としては、他にフィールド
差の絶対値に基づいて行うものでも良い。
The above-mentioned generation of the coefficient data from the DCT circuit 4 is the case of the DCT conversion within the frame,
When the motion detection circuit 5 detects that there is motion,
The DCT process in the field is selected. That is,
The intra-field DCT is to perform DCT for every two (4 × 8) blocks at the same position in the first and second fields that are temporally continuous. If the motion detection circuit 5 detects that there is a motion between fields in the block, the intra-frame DCT is changed to the intra-field DCT in response to the detection. The motion detection circuit 5 displays (8
For each block, the still / movement determination is performed based on the coefficient data in the vertical direction when the image data of the block of (8) is Hadamard transformed. Alternatively, the motion detection may be performed based on the absolute value of the field difference.

【0016】フィールド内DCTの場合では、第1フィ
ールドに関しての(4×8)の係数データと、第2フィ
ールドに関しての(4×8)の係数データとが発生し、
これらは、図4に示すように、上下に位置する(8×
8)の配列として扱われる。第1フィールドの係数デー
タの中には、直流成分DC1が含まれる。第2フィール
ドにも、同様に直流成分DC2が含まれる。これらの各
フィールドの係数データを別個に扱うと、フレーム内D
CTとフィールド内DCTとで、以降の処理を別個にせ
ざるを得ない。その結果、ハードウエアの規模の増加等
の問題が生じる。そこで、第2フィールドの直流成分D
C2に代えて、差分直流成分ΔDC2(=DC1−DC
2)を伝送する。
In the case of the intra-field DCT, (4 × 8) coefficient data for the first field and (4 × 8) coefficient data for the second field are generated,
These are located above and below (8 x
It is treated as an array of 8). The DC data DC1 is included in the coefficient data of the first field. Similarly, the second field also contains the DC component DC2. If the coefficient data of each of these fields is treated separately, D
The subsequent processing is unavoidable separately for the CT and the in-field DCT. As a result, problems such as an increase in the scale of hardware occur. Therefore, the DC component D of the second field
Instead of C2, the differential DC component ΔDC2 (= DC1-DC
2) is transmitted.

【0017】動き検出回路5からの検出信号(動きフラ
グ)Mがデータ量見積り器9に供給されるとともに、後
段において、記録データ中に挿入される。データ量見積
り器9では、係数データの出力順序とエリア分割の方法
とを静止/動きによって切り替えるために、動きフラグ
Mが使用される。
The detection signal (motion flag) M from the motion detection circuit 5 is supplied to the data amount estimator 9 and is inserted into the recording data at the subsequent stage. In the data amount estimator 9, the motion flag M is used to switch the output order of coefficient data and the area division method depending on the stillness / motion.

【0018】量子化回路7では、係数データ内の交流分
が量子化される。すなわち、適切な量子化ステップでA
C係数データが割算され、その商が整数化される。この
量子化ステップがQNoコントローラ10からの量子化
番号QNoによって決定される。ディジタルVTRの場
合では、編集等の処理が1フィールドあるいは1フレー
ム単位でなされるので、1フィールドあるいは1フレー
ム当りの発生データ量が目標値以下となる必要がある。
DCTおよび可変長符号化で発生するデータ量は、符号
化の対象の絵柄によって変化するので、1フィールドあ
るいは1フレーム期間より短いバッファリング単位の発
生データ量を目標値以下とするためのバッファリング処
理がなされる。バッファリング単位を短くするのは、バ
ッファリングのためのメモリ容量を低減するなど、バッ
ファリング回路の簡略化のためである。この例では、5
マクロブロック(=30DCTブロック)がバッファリ
ング単位とされている。
In the quantizing circuit 7, the AC component in the coefficient data is quantized. That is, A with an appropriate quantization step
The C coefficient data is divided and the quotient is converted into an integer. This quantization step is determined by the quantization number QNo from the QNo controller 10. In the case of a digital VTR, since processing such as editing is performed in units of one field or one frame, it is necessary that the amount of generated data in one field or one frame be equal to or less than the target value.
The amount of data generated by DCT and variable-length coding varies depending on the pattern to be coded. Therefore, a buffering process for reducing the amount of generated data in a buffering unit shorter than one field or one frame period to a target value or less. Is done. The reason for shortening the buffering unit is to simplify the buffering circuit, such as reducing the memory capacity for buffering. In this example, 5
A macro block (= 30 DCT block) is a buffering unit.

【0019】また、クラス分け回路8は、後述のよう
に、マクロブロックの単位で、絵柄の細かさを調べ、そ
のマクロブロックのアクティビィティーを4段階にクラ
ス分けし、そのクラスを示す2ビットのアクティビィテ
ィーコードATを発生する。検出結果がQNoコントロ
ーラ10に供給されるとともに、アクティビィティーコ
ードATが後段において記録データ中に挿入される。
As will be described later, the classifying circuit 8 checks the fineness of the picture in units of macroblocks, classifies the activity of the macroblocks into four levels, and sets a 2-bit class indicating the class. The activity code AT is generated. The detection result is supplied to the QNo controller 10, and the activity code AT is inserted in the recording data in the subsequent stage.

【0020】量子化回路7の出力が可変長符号化回路1
1に供給され、ランレングス符号化、ハフマン符号化等
がなされる。例えば係数データのゼロの連続数であるラ
ンレングスと係数データの値とをROM内に格納された
ハフマンテーブルに与え、可変長コード(符号化出力)
を発生する2次元ハフマン符号化が採用される。可変長
符号化回路11からのコード信号が後段に供給される。
The output of the quantizing circuit 7 is the variable length coding circuit 1.
1, run-length coding, Huffman coding, etc. are performed. For example, a run length, which is the number of consecutive zeros of coefficient data, and the value of coefficient data are given to a Huffman table stored in ROM, and a variable length code (encoded output) is given.
Two-dimensional Huffman coding is used to generate The code signal from the variable length coding circuit 11 is supplied to the subsequent stage.

【0021】見積り器9と関連して、可変長符号化回路
11で参照されるのと同一のハフマンテーブル12が設
けられている。このハフマンテーブル12は、可変長符
号化した時の出力コードのビット数データを発生する。
見積り器9で最適な量子化ステップの組が判定され、そ
の判定出力がQNoコントローラ10に供給される。Q
Noコントローラ10は、量子化回路7がこの量子化ス
テップの組で係数データを量子化するように制御する。
これとともに、量子化ステップの組を識別するための量
子化番号QNoが後段に伝送される。
In connection with the estimator 9, the same Huffman table 12 referred to by the variable length coding circuit 11 is provided. The Huffman table 12 generates bit number data of an output code when variable length coding is performed.
The estimator 9 determines the optimum set of quantization steps, and the determination output is supplied to the QNo controller 10. Q
The No controller 10 controls the quantization circuit 7 to quantize the coefficient data in the set of the quantization steps.
At the same time, the quantization number QNo for identifying the set of quantization steps is transmitted to the subsequent stage.

【0022】図示せずも、上述の処理で発生したデータ
(DC係数DCT、可変長符号化出力、量子化番号QN
o、動きフラグM、アクティビィティーコードAT)が
後段のフレーム化回路において、エラー訂正符号化の処
理と記録データのフレーム構造への変換の処理がなされ
る。フレーム化回路からは、シンクブロック構成のデー
タが現れる。記録データは、チャンネル符号化回路、記
録アンプを介して2個の回転ヘッドに供給され、磁気テ
ープ上に記録される。
Although not shown, the data (DC coefficient DCT, variable length coded output, quantization number QN)
o, the motion flag M, and the activity code AT) are subjected to error correction coding processing and conversion of recording data into a frame structure in a framing circuit in the subsequent stage. Data of a sync block configuration appears from the framing circuit. The recording data is supplied to two rotary heads via a channel encoding circuit and a recording amplifier and recorded on a magnetic tape.

【0023】量子化回路7では、AC係数データが量子
化ステップで割算され、その商が整数に丸められる。A
C係数データの絶対値をCとし、量子化ステップの値を
Dとすると、丸め後の値Q(C) は、次式で表される。 Q(C) = INT〔{C+(D/2)}/D〕
In the quantization circuit 7, the AC coefficient data is divided by the quantization step and the quotient is rounded to an integer. A
When the absolute value of the C coefficient data is C and the value of the quantization step is D, the rounded value Q (C) is expressed by the following equation. Q (C) = INT [{C + (D / 2)} / D]

【0024】次にクラス分け回路8によりなされるアク
ティビィティー検出とそれに基づくクラス分けについて
説明する。この例では、DC係数データとAC係数デー
タの絶対値とを使用してクラス分けを行なう。アクティ
ビィティー検出は、各マクロブロックの絵柄の細かさを
検出することである。視覚上、細かい絵柄(アクティビ
ィティーが高い)のマクロブロックは、多少、量子化ス
テップが粗くても、歪みが目立たない。一方、平坦な絵
柄(アクティビィティーが低い)のブロックは、粗く量
子化すると、歪みが目立ち易い。従って、マクロブロッ
ク単位でもって、アクティビィティーが高いマクロブロ
ックに対する量子化は、粗いものとし、アクティビィテ
ィー低いマクロブロックに対する量子化は、細かいもの
とすることは、有効である。
Next, the activity detection performed by the classification circuit 8 and the classification based on it will be described. In this example, the classification is performed using the DC coefficient data and the absolute value of the AC coefficient data. The activity detection is to detect the fineness of the pattern of each macroblock. Visually, a macroblock with a fine pattern (high activity) has no noticeable distortion even if the quantization step is a little rough. On the other hand, if a block having a flat pattern (low activity) is roughly quantized, distortion tends to stand out. Therefore, it is effective to quantize macroblocks with high activity and coarse quantize macroblocks with low activity in units of macroblocks.

【0025】さらに、輝度の高いブロックの場合には、
量子化が粗くても、視覚的に劣化が目立たない。そこ
で、この一実施例では、輝度が高いかどうかを決定する
ために、YブロックのDCT係数のDC成分を使用す
る。このY信号のDC成分の値が大きい時には、輝度が
高いと判断する。これら輝度およびアクティビィティー
に基づくクラス分けの一例を図5に示す。
Further, in the case of a block with high brightness,
Even if the quantization is rough, the deterioration is not noticeable visually. Therefore, in this embodiment, the DC component of the DCT coefficient of the Y block is used to determine whether the brightness is high. When the value of the DC component of the Y signal is large, it is determined that the brightness is high. An example of the classification based on the brightness and activity is shown in FIG.

【0026】クラス0からクラス3の4種類のクラスが
用意される。クラス0が最も細かく係数データが量子化
されるクラスであり、クラス1、2、3の順に量子化が
粗くなる。従って、クラス3の量子化が最も粗いもので
ある。図5に示すように、クラス分けは、まずY信号の
DC係数に基づいてなされる。この例では、DC係数
は、9ビットであり、0〜511の値をとりうる。しき
い値として、400を設定し、DC係数が400より大
きい時には、一律にクラス3と決定する。すなわち、Y
信号のDC係数が大きいことは、輝度が高いことを意味
するので、この場合に対して量子化ステップが最も粗い
クラス3が割り当てられる。なお、クラス3のみは、量
子化の前処理としてスケーリングによって、例えば全て
の係数データの値が1/2とされる。
Four types of classes, class 0 to class 3, are prepared. Class 0 is the class in which coefficient data is quantized most finely, and quantization becomes coarser in the order of classes 1, 2, and 3. Therefore, class 3 quantization is the coarsest. As shown in FIG. 5, classification is first performed based on the DC coefficient of the Y signal. In this example, the DC coefficient is 9 bits and can take values from 0 to 511. As the threshold value, 400 is set, and when the DC coefficient is larger than 400, the class 3 is uniformly determined. That is, Y
A large DC coefficient of the signal means that the luminance is high, so that the class 3 having the coarsest quantization step is assigned to this case. Note that, for class 3 only, the values of all coefficient data are reduced to 1/2 by scaling as preprocessing for quantization.

【0027】DC係数が0〜400の範囲にあるとき
は、そのDCTブロックのAC係数の絶対値の最大値、
すなわち、アクティビィティーに基づいてクラスが決定
される。例えばY信号のDCTブロックに関して、AC
係数の絶対値の最大値が12〜23の範囲に存在する時
には、そのDCTブロックがクラス1と決定される。他
の例として、CR信号のDCTブロックに関して、AC
係数の絶対値の最大値が0〜11の範囲に存在する時に
は、そのDCTブロックがクラス1と決定される。図5
から分かるように、Y信号は、CR、CBと比較して、
クラスがより小さい番号のものとされ、また、視覚上よ
り目立つCR信号の方がCB信号に比して量子化がより
細かいものとされる。
When the DC coefficient is in the range of 0 to 400, the maximum absolute value of the AC coefficient of the DCT block,
That is, the class is determined based on the activity. For example, for the DCT block of the Y signal, the AC
When the maximum absolute value of the coefficient is in the range of 12 to 23, the DCT block is determined to be class 1. As another example, for the DCT block of the CR signal, the AC
When the maximum absolute value of the coefficient is in the range of 0 to 11, the DCT block is determined to be class 1. Figure 5
As can be seen from the above, the Y signal is compared with CR and CB,
The class is assigned a smaller number, and the CR signal, which is more visible, is finer in quantization than the CB signal.

【0028】なお、DC係数によるクラス分けの方法と
しては、上述のものに限らず、二つのしきい値を使用し
て3種類の範囲に分割することもできる。また、AC係
数の絶対値の最大値の代わりに、AC係数のn乗値、A
C係数の最大値および最小値の差を使用しても良い。さ
らに、しきい値より大きい係数の個数を使用してクラス
を決定しても良い。よりさらに、アクティビィティー検
出のために用いる係数データを高域のものに限定するよ
うにしても良い。
The method of classifying by the DC coefficient is not limited to the above method, but it is also possible to use two threshold values and divide into three types of ranges. Also, instead of the maximum absolute value of the AC coefficient, the n-th power of the AC coefficient, A
The difference between the maximum and minimum values of the C coefficient may be used. Further, the number of coefficients larger than the threshold value may be used to determine the class. Furthermore, coefficient data used for activity detection may be limited to high frequency data.

【0029】データ量見積り器9は、バッファリング単
位(5マクロブロック)の発生データ量を目標値以下と
することができ、且つなるべく小さい値の量子化ステッ
プを決定する。この見積り器9では、5マクロブロック
毎に量子化番号を決定する。また、ブロック内のエリア
を例えば8分割し、各エリアに応じた量子化を行う。エ
リアを考慮した量子化について説明する。
The data amount estimator 9 can make the generated data amount of the buffering unit (5 macroblocks) equal to or less than the target value, and determines the quantization step of the smallest possible value. The estimator 9 determines the quantization number for every 5 macroblocks. Further, the area in the block is divided into eight, for example, and quantization is performed according to each area. Quantization considering the area will be described.

【0030】図6Aは、静止ブロックに関しての係数デ
ータのエリア分割の一例を示す。各係数データに対して
付された0〜7の各数字がエリア番号を表す。このエリ
ア番号が大きくなるにつれて、係数データが高域側のも
のになるように、エリア番号が規定される。エリア分割
を行うのは、係数データを量子化する時に、高域の係数
データほど、量子化を粗くしても、復元画像の質の劣化
が少ない点に基づいている。また、図3および図6を参
照すると分かるように、係数データの走査(出力)順序
に従ってエリア番号が昇順で変化する。
FIG. 6A shows an example of area division of coefficient data for a still block. Each number of 0 to 7 attached to each coefficient data represents an area number. The area number is defined such that the coefficient data is on the high frequency side as the area number increases. Area division is based on the fact that when the coefficient data is quantized, the higher the coefficient data, the less the quality of the restored image deteriorates even if the quantization is roughened. As can be seen from FIGS. 3 and 6, the area numbers change in ascending order according to the scanning (output) order of the coefficient data.

【0031】図6Bは、動きブロックに関しての係数デ
ータのエリア分割の一例である。動きブロックの場合に
は、上述したように、フィールド内DCTがなされる。
第1フィールドで発生したDCT係数が図6Bの上側の
ようにエリア分割され、第2フィールドで発生したDC
T係数が図6Bの下側のようにエリア分割される。輝度
信号と色信号との間でエリア分割を同一とし、色信号を
輝度信号よりも高域側のエリア番号にシフトするように
しても良い。
FIG. 6B is an example of area division of coefficient data for motion blocks. In the case of a motion block, the intra-field DCT is performed as described above.
The DCT coefficient generated in the first field is divided into areas as shown in the upper part of FIG. 6B, and the DC generated in the second field is divided.
The T coefficient is divided into areas as shown in the lower part of FIG. 6B. The area division may be the same between the luminance signal and the color signal, and the color signal may be shifted to the area number on the higher frequency side than the luminance signal.

【0032】図7は、量子化テーブルの一例を示す。図
7では、0〜15の量子化番号QNoで識別される16
種類の量子化ステップの組が用意されている。各組は、
0〜7の各エリア番号に対応する量子化ステップからな
る。この量子化テーブルは、量子化番号QNoが増加す
るに伴って、量子化ステップが小さくなる変化を有して
いる。言い換えると、量子化番号QNoが増加すると、
量子化が細かいものへ変化する。全ての量子化ステップ
が2のべき乗で表現されているので、これらの量子化ス
テップで係数データを割算する回路として簡単なものを
使用できる。
FIG. 7 shows an example of the quantization table. In FIG. 7, 16 are identified by the quantization numbers QNo of 0 to 15.
A set of different quantization steps is provided. Each group is
The quantization step corresponds to each area number from 0 to 7. This quantization table has a change in which the quantization step becomes smaller as the quantization number QNo increases. In other words, if the quantization number QNo increases,
The quantization changes to fine ones. Since all quantization steps are expressed by powers of 2, a simple circuit can be used as a circuit for dividing coefficient data by these quantization steps.

【0033】さらに、この量子化テーブルでは、クラス
0、1、2、3と対応して、量子化番号の0〜15が調
整されている。クラス0とクラス1の間、並びにクラス
1とクラス2の間では、量子化ステップが大きくなる方
向へ、量子化番号の3の差が存在する。また、クラス2
とクラス3の間には、量子化ステップが小さくなる方向
へ、量子化番号の2の差が存在する。クラス3の量子化
ステップが最も大きくなるはずであるが、上述のよう
に、初期的スケーリングがされているために、逆転関係
が生じている。
Further, in this quantization table, quantization numbers 0 to 15 are adjusted in correspondence with classes 0, 1, 2, and 3. Between class 0 and class 1, and between class 1 and class 2, there is a difference of 3 in quantization number in the direction of increasing quantization step. Also, class 2
And the class 3, there is a difference of 2 in the quantization number in the direction of decreasing the quantization step. The class 3 quantization step should be the largest, but because of the initial scaling, as described above, there is an inversion relation.

【0034】図1におけるデータ量見積り器9において
は、まず、5マクロブロックのデータ量を検出する時
に、暫定的にクラス1として、図7の量子化テーブルを
参照しながら発生データ量を量子化番号ごとに検出す
る。16通りの量子化番号の中で、最適な量子化番号が
選択される。すなわち、発生データ量が目標値より多く
ならないで、且つ量子化が最も細かくなされる量子化番
号が選択される。この量子化番号が量子化番号コントロ
ーラ10に供給される。
In the data amount estimator 9 in FIG. 1, first, when detecting the data amount of 5 macroblocks, the generated data amount is quantized while referring to the quantization table of FIG. 7 provisionally as class 1. Detect by number. The optimum quantization number is selected from the 16 quantization numbers. That is, the quantization number is selected so that the generated data amount does not become larger than the target value and the quantization is most finely performed. This quantization number is supplied to the quantization number controller 10.

【0035】量子化番号コントローラ10には、クラス
分け回路8において、上述のように、輝度およびAC係
数の絶対値に基づき決定されたクラス情報が供給され
る。クラス情報としては、アクティビィティーコードA
Tを使用できる。5マクロブロック毎に量子化番号が選
択されているので、この量子化番号を固定として、クラ
スに応じた量子化ステップの調整がなされる。この調整
は、図7の量子化テーブルを使用してなされる。
The quantization number controller 10 is supplied with the class information determined by the classifying circuit 8 based on the brightness and the absolute value of the AC coefficient, as described above. As class information, activity code A
T can be used. Since the quantization number is selected for every 5 macroblocks, the quantization step is fixed and the quantization step is adjusted according to the class. This adjustment is made using the quantization table of FIG.

【0036】以上の実施例は、ディジタルビデオ信号を
磁気テープに記録するディジタルVTRの例である。し
かしながら、テープ以外のディスク等の媒体を使用する
場合にも、この発明を適用できる。
The above embodiment is an example of a digital VTR for recording a digital video signal on a magnetic tape. However, the present invention can be applied to the case where a medium such as a disk other than a tape is used.

【0037】[0037]

【発明の効果】この発明によれば、コサイン変換で発生
した係数データを量子化する時に、部分的画像の輝度お
よびアクティビィティーの両者からそのクラスを決定す
るので、画質の劣化が生じることなく、高圧縮率を達成
することができる。
According to the present invention, when the coefficient data generated by the cosine transform is quantized, the class is determined from both the brightness and the activity of the partial image, so that the image quality is not deteriorated. A high compression rate can be achieved.

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

【図1】この発明をディジタルVTRの記録データ処理
回路に適用した一実施例のブロック図である。
FIG. 1 is a block diagram of an embodiment in which the present invention is applied to a recording data processing circuit of a digital VTR.

【図2】マクロブロックの説明に用いる略線図である。FIG. 2 is a schematic diagram used to describe a macroblock.

【図3】DCT係数データの出力順序の一例を示す略線
図である。
FIG. 3 is a schematic diagram showing an example of an output order of DCT coefficient data.

【図4】フィールド内DCTの処理を示す略線図であ
る。
FIG. 4 is a schematic diagram showing an intra-field DCT process.

【図5】この発明の一実施例におけるクラス分けの説明
に用いる略線図である。
FIG. 5 is a schematic diagram used to explain classification according to an embodiment of the present invention.

【図6】エリア規定の一例の略線図である。FIG. 6 is a schematic diagram of an example of area regulation.

【図7】量子化テーブルの一例の略線図である。FIG. 7 is a schematic diagram of an example of a quantization table.

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

4 DCT回路 5 動き検出回路 7 量子化回路 8 クラス分け回路 9 見積り器 4 DCT circuit 5 Motion detection circuit 7 Quantization circuit 8 Classification circuit 9 Estimator

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.6 識別記号 庁内整理番号 FI 技術表示箇所 H03M 7/40 8842−5J H04N 1/41 B ─────────────────────────────────────────────────── ─── Continuation of the front page (51) Int.Cl. 6 Identification number Office reference number FI technical display location H03M 7/40 8842-5J H04N 1/41 B

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 ディジタル画像信号をコサイン変換によ
り符号化し、符号化により発生した交流係数データを可
変長符号化するようにしたディジタル画像信号の符号化
装置において、 上記交流係数データを量子化するための量子化手段と、 予め用意された量子化テーブルを参照して、所定期間の
上記可変長符号化出力のデータ量を目標値以下に抑える
ように、上記量子化手段における量子化ステップを選択
するためのデータ量見積り手段と、 上記符号化により発生した直流係数データおよび上記交
流係数データを受け取り、量子化しようとする部分的画
像の量子化の細かさを指示するクラスを決定するための
手段と、 上記データ量見積り手段で決定される上記所定期間の量
子化ステップを上記部分画像の上記クラスに応じて調整
するための手段とからなるディジタル画像信号の符号化
装置。
1. A digital image signal coding apparatus, wherein a digital image signal is coded by cosine transform, and AC coefficient data generated by coding is variable-length coded, in order to quantize the AC coefficient data. And a quantization table prepared in advance so as to select a quantization step in the quantizing means so that the data amount of the variable-length coded output in a predetermined period is kept below a target value. And a means for receiving the DC coefficient data and the AC coefficient data generated by the encoding, and determining a class indicating the fineness of the quantization of the partial image to be quantized. , For adjusting the quantization step of the predetermined period determined by the data amount estimating means according to the class of the partial image Encoding apparatus in a digital image signal comprising a stage.
【請求項2】 請求項1に記載のディジタル画像信号の
符号化装置において、 上記クラスを決定するための手段は、直流係数データが
しきい値より大きい時には、量子化ステップを最大に設
定するものにクラスが固定され、上記直流係数データが
上記しきい値より小さい時には、交流係数データの絶対
値に基づいてクラスを決定することを特徴とするディジ
タル画像信号の符号化装置。
2. The digital image signal coding apparatus according to claim 1, wherein the means for determining the class sets the quantization step to the maximum when the DC coefficient data is larger than a threshold value. An apparatus for encoding a digital image signal, wherein the class is fixed, and when the DC coefficient data is smaller than the threshold value, the class is determined based on the absolute value of the AC coefficient data.
【請求項3】 請求項1に記載のディジタル画像信号の
符号化装置において、 上記データ量見積り手段は、複数のブロック毎に可変長
符号化出力のデータ量を目標値以下に抑えることができ
る量子化ステップを選択し、 上記クラスを決定するための手段は、上記ブロック毎に
上記クラスを決定することを特徴とするディジタル画像
信号の符号化装置。
3. The digital image signal encoding device according to claim 1, wherein the data amount estimating means is capable of suppressing the data amount of the variable-length encoded output to a target value or less for each of a plurality of blocks. An encoding device for a digital image signal, wherein the means for selecting a coding step and determining the class determines the class for each block.
JP10336194A 1994-04-18 1994-04-18 Coder for digital picture signal Pending JPH07288809A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10336194A JPH07288809A (en) 1994-04-18 1994-04-18 Coder for digital picture signal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10336194A JPH07288809A (en) 1994-04-18 1994-04-18 Coder for digital picture signal

Publications (1)

Publication Number Publication Date
JPH07288809A true JPH07288809A (en) 1995-10-31

Family

ID=14351996

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10336194A Pending JPH07288809A (en) 1994-04-18 1994-04-18 Coder for digital picture signal

Country Status (1)

Country Link
JP (1) JPH07288809A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998010594A1 (en) * 1996-09-06 1998-03-12 Sony Corporation Method and device for encoding data
US6577681B1 (en) 1998-09-16 2003-06-10 Fuji Xerox Co., Ltd. Image coding apparatus
JP2018533860A (en) * 2015-09-02 2018-11-15 トムソン ライセンシングThomson Licensing Method and apparatus for quantization in video encoding and decoding

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998010594A1 (en) * 1996-09-06 1998-03-12 Sony Corporation Method and device for encoding data
US6348945B1 (en) 1996-09-06 2002-02-19 Sony Corporation Method and device for encoding data
US6577681B1 (en) 1998-09-16 2003-06-10 Fuji Xerox Co., Ltd. Image coding apparatus
JP2018533860A (en) * 2015-09-02 2018-11-15 トムソン ライセンシングThomson Licensing Method and apparatus for quantization in video encoding and decoding

Similar Documents

Publication Publication Date Title
KR100299202B1 (en) Digital image signal processing device and processing method
EP0565219B1 (en) Image compression and decompression
USRE40909E1 (en) Adaptive variable-length coding and decoding methods for image data
US6137835A (en) Picture coding apparatus using orthogonal transforms
JPH07288809A (en) Coder for digital picture signal
US5929794A (en) Digital information data recording and reproducing apparatus
JPH07236142A (en) Highly efficient encoding and decoding devices
JP2629409B2 (en) Motion compensated prediction interframe coding device
JP3127629B2 (en) Error correction device for digital image signal
JP3218744B2 (en) Digital image signal transmission equipment
JP3190164B2 (en) Code amount estimation device
JP3309474B2 (en) Digital video signal encoding device
JP3232750B2 (en) Digital video signal coding and framing apparatus
JP2897585B2 (en) Image coding recording and playback device
JP3161097B2 (en) High efficiency coding device
JPH06178287A (en) Picture coder
JPH0686257A (en) Picture encoder
JPH0514873A (en) Image encoder
JPH04367183A (en) Picture encoder
JP2000278690A (en) Encoding device
JPH06217279A (en) Image data processor