JPH10285592A - Image encoding device and method, computer readable recording medium recording program for image encoding control and data preparation device for recording - Google Patents

Image encoding device and method, computer readable recording medium recording program for image encoding control and data preparation device for recording

Info

Publication number
JPH10285592A
JPH10285592A JP9121397A JP9121397A JPH10285592A JP H10285592 A JPH10285592 A JP H10285592A JP 9121397 A JP9121397 A JP 9121397A JP 9121397 A JP9121397 A JP 9121397A JP H10285592 A JPH10285592 A JP H10285592A
Authority
JP
Japan
Prior art keywords
quantization
encoding
switching
block
image
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
JP9121397A
Other languages
Japanese (ja)
Inventor
Kanji Mihara
寛司 三原
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 JP9121397A priority Critical patent/JPH10285592A/en
Publication of JPH10285592A publication Critical patent/JPH10285592A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To improve subjective image quality while providing a function for making a quantization characteristic value for each block fluctuate corresponding to the complication of images for each block within a screen. SOLUTION: The switching information of whether or not to use a fluctuating quantization mechanism is recorded in a fluctuating quantization mechanism setting file inside a computer 12 for video encoder control corresponding to the time code of the images. The computer 12 for the video encoder control controls a switch part 44 based on the fluctuating quantization mechanism setting file and turns the fluctuating quantization mechanism on and off. The switch part 44 connects a quantization circuit 33 and a quantization index decision part 42 in the case of turning off the fluctuating quantization mechanism and connects the quantization circuit 33 and a macroblock quantization index decision part 43 for using the fluctuating quantization mechanism in the case of turning on the fluctuating quantization mechanism.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、画像データを圧縮
符号化する画像符号化装置および方法、画像符号化装置
に用いられる画像符号化制御用プログラムを記録したコ
ンピュータ読み取り可能な記録媒体ならびに画像符号化
装置を用いた記録用データ作成装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image encoding apparatus and method for compressing and encoding image data, a computer-readable recording medium storing an image encoding control program used in the image encoding apparatus, and an image encoding method. The present invention relates to a recording data creation device using a digitizing device.

【0002】[0002]

【従来の技術】送信側で画像データを圧縮して送信する
と共に、受信側では圧縮された画像データを伸張する通
信システムや、画像データを圧縮して記録すると共に、
再生時には圧縮された画像データを伸張して出力する圧
縮画像記録再生システム等において、画像データの圧縮
の方法としては、例えばMPEG(Moving Picture Exp
erts Group)規格で採用されている双方向予測符号化方
式がある。この双方向予測符号化方式では、双方向予測
を用いることで符号化効率を向上させている。双方向予
測符号化方式では、フレーム内符号化、フレーム間順方
向予測符号化および双方向予測符号化の3つのタイプの
符号化が行われ、各符号化タイプによる画像は、それぞ
れIピクチャ(intra coded picture )、Pピクチャ
(predictivecoded picture)およびBピクチャ(bidir
ectionally predictive coded picture)と呼ばれる。
2. Description of the Related Art A transmitting side compresses image data and transmits the compressed data, and a receiving side compresses and records the compressed image data.
In a compressed image recording / reproducing system or the like that expands and outputs compressed image data during reproduction, a method of compressing image data includes, for example, MPEG (Moving Picture Exposure).
erts Group) standard. In this bidirectional prediction encoding method, encoding efficiency is improved by using bidirectional prediction. In the bidirectional predictive coding method, three types of coding are performed: intraframe coding, interframe forward predictive coding, and bidirectional predictive coding. An image of each coding type is an I picture (intra picture). coded picture), P picture (predictive coded picture) and B picture (bidir
(ectionally predictive coded picture).

【0003】ところで、MPEG規格による画像データ
圧縮方法を用いる装置としては、DVD(Digital Vide
o Disk)のオーサリング装置がある。DVDのオーサリ
ングとは、記録対象となる画像データや音声データ等を
MPEG規格に基づいてディジタル符号化し、得られた
符号化データをDVD規格に従った形式で多重化するこ
とによって、DVDに対して記録するデータを編集、作
成する作業を言い、DVDのオーサリング装置は、この
ような編集、作成作業を行うための装置である。
As an apparatus using the image data compression method based on the MPEG standard, a DVD (Digital Video) is used.
o Disk) authoring device. Authoring a DVD is to digitally encode image data and audio data to be recorded based on the MPEG standard and multiplex the obtained encoded data in a format in accordance with the DVD standard. It refers to the work of editing and creating data to be recorded, and a DVD authoring device is a device for performing such editing and creation work.

【0004】DVDのオーサリングでは、リアルタイム
性が要求されないので、一旦、映像信号を固定の量子化
特性値(量子化のための割り算の係数)で符号化するこ
とによって各ピクチャ毎の符号化難易度を測定し、その
結果に基づいて、可変ビットレートで再度符号化するよ
うな、いわゆる2パスエンコードが用いられている。図
8は、この2パスエンコードの概略を示す説明図であ
る。2パスエンコードでは、まず、図8(a)に示した
ように、1回目の符号化(1パス目)で、ビデオエンコ
ーダ101によって、入力映像信号S11を固定の量子化
特性値で符号化して、発生ビット量を示す発生ビット量
データS12を、ビデオエンコーダ制御用コンピュータ1
02に送り、ビデオエンコーダ制御用コンピュータ10
2によって、発生ビット量または発生ビット量より求め
た各ピクチャ毎の符号化難易度に基づいて目標符号量を
決定する。次に、図8(b)に示したように、2回目の
符号化(2パス目)では、ビデオエンコーダ制御用コン
ピュータ102は、目標符号量を示す目標符号量データ
13をビデオエンコーダ101に与え、ビデオエンコー
ダ101は、この目標符号量データS13と、過去の発生
ビット量やそれによるVBV(Video Buffering Verifi
er)バッファの占有量等に基づいて、可変ビットレート
で、入力映像信号S11を符号化し、一定のビットレート
のビットストリームからなる圧縮画像データS14として
出力する。
[0004] Since real-time performance is not required in DVD authoring, the video signal is once encoded with a fixed quantization characteristic value (coefficient of division for quantization), thereby making it difficult to encode each picture. Is measured, and based on the result, so-called two-pass encoding is performed in which encoding is performed again at a variable bit rate. FIG. 8 is an explanatory diagram showing an outline of the two-pass encoding. In 2-pass encoding, first, as shown in FIG. 8 (a), by the first coding (first pass), by the video encoder 101, an input video signal S 11 encodes the quantization characteristic value of the fixed The generated bit amount data S 12 indicating the generated bit amount is transmitted to the video encoder control computer 1.
02, the video encoder control computer 10
2, the target code amount is determined based on the generated bit amount or the encoding difficulty for each picture obtained from the generated bit amount. Next, as shown in FIG. 8 (b), the second coding (second pass), a video encoder control computer 102, a target code amount data S 13 indicating the target amount of code to the video encoder 101 given, the video encoder 101, and the target code amount data S 13, past the bitrate and VBV according to which (video Buffering Verifi
er) based on the occupation amount of the buffer, at a variable bit rate, it encodes the input video signal S 11, and outputs it as compressed image data S 14 composed of a bit stream of constant bit rate.

【0005】図9は、2パスエンコードに使用されるビ
デオエンコーダ101の構成の一例を示すブロック図で
ある。このビデオエンコーダ101は、入力画像信号S
11を入力し、符号化する順番に従ってピクチャ(Iピク
チャ,Pピクチャ,Bピクチャ)の順番を並べ替える画
像並べ替え回路121と、この画像並べ替え回路121
の出力データを入力し、フレーム構造かフィールド構造
かを判別し、判別結果に応じた走査変換および16×1
6画素のマクロブロック化を行う走査変換・マクロブロ
ック化回路122と、この走査変換・マクロブロック化
回路122の出力データと予測画像データとの差分をと
る減算回路131と、この減算回路131の出力データ
に対して、DCT(離散コサイン変換)ブロック単位で
DCTを行い、DCT係数を出力するDCT回路132
と、このDCT回路132の出力データを量子化する量
子化回路133と、この量子化回路133の出力データ
を可変長符号化する可変長符号化回路134と、この可
変長符号化回路134の出力データを一旦保持し、一定
のビットレートのビットストリームからなる圧縮画像デ
ータS14として出力するバッファメモリ135とを備え
ている。バッファメモリ135は、可変長符号化回路1
34の発生ビット量を示す発生ビット量データS12をビ
デオエンコーダ制御用コンピュータ102に送るように
なっている。
FIG. 9 is a block diagram showing an example of the configuration of a video encoder 101 used for two-pass encoding. This video encoder 101 receives the input image signal S
11 , an image rearranging circuit 121 for rearranging the order of pictures (I picture, P picture, B picture) according to the encoding order;
, And determines whether the frame structure or the field structure, scan conversion and 16 × 1 according to the determination result.
A scan conversion / macroblock circuit 122 for performing macroblocking of six pixels, a subtraction circuit 131 for taking a difference between output data of the scan conversion / macroblock circuit 122 and predicted image data, and an output of the subtraction circuit 131 DCT circuit 132 that performs DCT on the data in DCT (discrete cosine transform) block units and outputs DCT coefficients
A quantization circuit 133 for quantizing output data of the DCT circuit 132, a variable length encoding circuit 134 for variable length encoding of the output data of the quantization circuit 133, and an output of the variable length encoding circuit 134. data temporarily hold, and a buffer memory 135 for output as compressed image data S 14 composed of a bit stream of constant bit rate. The buffer memory 135 includes the variable length encoding circuit 1
34 generated bit amount data S 12 indicating the amount of bits generated is adapted to send the video encoder control computer 102.

【0006】ビデオエンコーダ101は、更に、走査変
換・マクロブロック化回路122の出力データに基づい
て動きベクトルを検出する動き検出回路114と、量子
化回路133の出力データを逆量子化する逆量子化回路
136と、この逆量子化回路136の出力データに対し
て逆DCTを行う逆DCT回路137と、この逆DCT
回路137の出力データと予測画像データとを加算して
出力する加算回路138と、この加算回路138の出力
データを保持し、動き検出回路114から送られる動き
ベクトルに応じて動き補償を行って予測画像データを減
算回路131および加算回路138に出力する動き補償
回路139とを備えている。
The video encoder 101 further includes a motion detection circuit 114 for detecting a motion vector based on output data of the scan conversion / macroblock conversion circuit 122 and an inverse quantization for inversely quantizing output data of the quantization circuit 133. A circuit 136, an inverse DCT circuit 137 for performing an inverse DCT on the output data of the inverse quantization circuit 136, and an inverse DCT
An addition circuit 138 for adding and outputting the output data of the circuit 137 and the predicted image data, and holding the output data of the addition circuit 138 and performing motion compensation according to the motion vector sent from the motion detection circuit 114 to perform prediction. A motion compensation circuit 139 that outputs image data to the subtraction circuit 131 and the addition circuit 138 is provided.

【0007】ビデオエンコーダ101は、更に、走査変
換・マクロブロック化回路122の出力データに基づい
て、画像の複雑さを表すパラメータであるアクティビィ
ティ(Activity)を計算するアクティビィティ
計算部141と、バッファメモリ135からの発生ビッ
ト量データS12とビデオエンコーダ制御用コンピュータ
102からの目標符号量データS13とに基づいて、発生
符号量(発生ビット量)が目標符号量となるように量子
化回路133における量子化特性値を表す量子化インデ
ックスを決定する量子化インデックス決定部142と、
この量子化インデックス決定部142によって決定され
た量子化インデックスとアクティビィティ計算部141
によって計算されたアクティビィティとに基づいて、マ
クロブロック単位の量子化インデックスを決定し、量子
化回路133に与えるマクロブロック量子化インデック
ス決定部143とを備えている。
The video encoder 101 further includes an activity calculation section 141 for calculating an activity (Activity) which is a parameter representing the complexity of an image, based on output data of the scan conversion / macroblocking circuit 122, and a buffer. based on the target code amount data S 13 from the generated bit amount data S 12 and the video encoder control computer 102 from the memory 135, the generated code amount (number of bits generated) is the target code amount and so as to quantization circuit 133 A quantization index determination unit 142 that determines a quantization index representing a quantization characteristic value in
The quantization index determined by the quantization index determination unit 142 and the activity calculation unit 141
And a macroblock quantization index determination unit 143 that determines a quantization index for each macroblock based on the activity calculated by the macroblock and provides the quantization index to the quantization circuit 133.

【0008】ところで、MPEG等で採用されている双
方向予測符号化方式では、性質の異なる3種類のピクチ
ャが存在するため、ピクチャタイプ毎に発生符号量が大
幅に異なり、また、量子化特性値の変化に対する発生符
号量の変化の割合もピクチャタイプ毎に大幅に異なると
いう特徴を有する。双方向予測符号化方式では、更に、
Iピクチャ、Pピクチャの量子化ノイズは、Pピクチ
ャ、Bピクチャにも伝搬するが、Bピクチャの量子化ノ
イズは、他のピクチャに伝搬しないという特徴を有す
る。従って、全てのピクチャに対する量子化特性値を均
一にすることは、必ずしも圧縮後の画像データ全体の画
質を最適化することにはならない。
By the way, in the bidirectional predictive coding system employed in MPEG and the like, since there are three types of pictures having different properties, the amount of generated codes greatly differs for each picture type, and the quantization characteristic value Is characterized in that the rate of change in the amount of generated code with respect to the change in picture size is also significantly different for each picture type. In bidirectional predictive coding,
The quantization noise of the I picture and the P picture also propagates to the P and B pictures, but the quantization noise of the B picture does not propagate to other pictures. Therefore, making the quantization characteristic values uniform for all the pictures does not necessarily optimize the image quality of the entire compressed image data.

【0009】圧縮後の画像データにおいて良好な画質を
得るための圧縮アルゴリズムとしては、TM5(Test M
odel Editing Commitee:“Test Model 5”;ISO/IEC JTC
/SC292/WG11/NO400(Apr.1993) )という方法が有名であ
る。このTM5は、3ステップによって構成されるアル
ゴリズムであり、各ステップは次のような機能を持って
いる。
As a compression algorithm for obtaining good image quality in compressed image data, TM5 (Test M
odel Editing Commitee: “Test Model 5”; ISO / IEC JTC
/ SC292 / WG11 / NO400 (Apr. 1993)) is famous. This TM5 is an algorithm composed of three steps, and each step has the following function.

【0010】ステップ1は、前に符号化した同じタイプ
のピクチャにおける画面の複雑さを示すパラメータであ
るグローバル・コンプレキシティ(Global Complexity
)を使って、次に符号化するピクチャの目標符号量を
決定する。
[0010] Step 1 is a global complexity (Global Complexity) parameter that indicates the complexity of the screen in a previously encoded picture of the same type.
) Is used to determine the target code amount of the picture to be coded next.

【0011】ステップ2では、ステップ1で決まった目
標符号量と実際の発生符号量を略一致させるために、仮
想バッファの容量を使って、量子化特性値をマクロブロ
ック毎にフィードバック制御により求める。
In step 2, in order to make the target code amount determined in step 1 substantially coincide with the actual generated code amount, a quantization characteristic value is obtained for each macroblock by feedback control using the capacity of the virtual buffer.

【0012】ステップ3では、ステップ2で決まった量
子化特性値を、各マクロブロック毎の絵柄の特徴に応じ
て変化させることによって視覚特性を向上させる。
In step 3, the visual characteristic is improved by changing the quantization characteristic value determined in step 2 according to the feature of the picture for each macroblock.

【0013】図9に示したビデオエンコーダ101で
は、ビデオエンコーダ制御用コンピュータ102によっ
てステップ1が実行され、量子化インデックス決定部1
42によってステップ2が実行され、アクティビィティ
計算部141およびマクロブロック量子化インデックス
決定部143によってステップ3が実行される。
In the video encoder 101 shown in FIG. 9, step 1 is executed by the video encoder control computer 102, and the quantization index determination unit 1
Step 2 is executed by 42, and step 3 is executed by the activity calculation unit 141 and the macroblock quantization index determination unit 143.

【0014】TM5におけるステップ3では、具体的に
は、各マクロブロック毎のアクティビィティを求め、ア
クティビィティの大きな部分すなわち複雑な絵柄の部分
では、量子化特性値(量子化インデックス)を大きくし
て粗く量子化し、逆にアクティビィティの小さな部分す
なわち平坦部では、量子化特性値(量子化インデック
ス)を小さくして細かく量子化する。なお、アクティビ
ィティは、例えば次の式(1)のように定義される。
In step 3 in TM5, specifically, the activity of each macroblock is obtained, and in a portion where the activity is large, that is, in a portion of a complicated picture, a quantization characteristic value (quantization index) is increased. On the other hand, quantization is performed roughly, and conversely, in a portion where the activity is small, that is, in a flat portion, the quantization characteristic value (quantization index) is reduced to perform fine quantization. The activity is defined, for example, as in the following equation (1).

【0015】 actj =1+min(varsblk) …(1)Act j = 1 + min (varsblk) (1)

【0016】なお、式(1)において、actj はマク
ロブロックjのアクティビィティ、varsblkはサ
ブブロックにおける原画の輝度信号の画素値の分散であ
り、式(2)によって表される。また、min(var
sblk)は、フレームDCT符号化モードにおける4
個のサブブロックとフィールドDCT符号化モードにお
ける4個のサブブロックとの合計8個のサブブロックに
おける原画の輝度信号の画素値の分散のうちの最小値を
とることを意味する。
In the equation (1), act j is the activity of the macroblock j, and varsblk is the variance of the pixel value of the luminance signal of the original picture in the sub-block, which is expressed by the equation (2). In addition, min (var
sblk) is 4 in the frame DCT coding mode.
Means the minimum value of the variance of the pixel values of the luminance signal of the original picture in a total of eight sub-blocks including the four sub-blocks and the four sub-blocks in the field DCT coding mode.

【0017】 varsblk=(1/64)・Σ(Pk −P′)2 …(2)Varsblk = (1/64) Σ (P k −P ′) 2 (2)

【0018】なお、式(2)において、Pk はサブブロ
ック内の原画の輝度信号の画素値、kは画素の番号(k
=1〜64)、P′はサブブロック内の原画の輝度信号
の画素値の平均値であり、次の式(3)によって表され
る。また、Σは、k=1〜64についての総和を意味す
る。
In equation (2), P k is the pixel value of the luminance signal of the original picture in the sub-block, and k is the pixel number (k
= 1 to 64), and P 'is the average of the pixel values of the luminance signal of the original image in the sub-block, and is represented by the following equation (3). Σ means the sum of k = 1 to 64.

【0019】P′=(1/64)・ΣPk …(3)P '= (1/64) ΣP k (3)

【0020】TM5におけるステップ3では、以上のよ
うにして求めたアクティビィティactj を用いて、次
の式(4)に基づいて、各マクロブロックの量子化イン
デックスmquantj を決定する。
At step 3 in TM5, the quantization index mquant j of each macroblock is determined based on the following equation (4) using the activity act j obtained as described above.

【0021】 mquantj =Qj ×{(2×actj +aveact)/(actj +2 ×aveact)} …(4)Mquant j = Q j × {(2 × act j + aveact) / (act j +2 × aveact)} (4)

【0022】なお、式(4)において、aveactは
直前に符号化したピクチャにおけるアクティビィティa
ctj の平均値であり、Qj はステップ2で決定された
量子化インデックスである。また、式(4)中の(2×
actj +aveact)/(actj +2×avea
ct)は、その値が0.5〜2の範囲をとる正規化アク
ティビィティである。
In equation (4), aveact is the activity a in the picture encoded immediately before.
ct j is the average value, and Q j is the quantization index determined in step 2. Further, (2 ×
act j + aveact) / (act j + 2 × avea
ct) is a normalized activity whose value ranges from 0.5 to 2.

【0023】このような処理によって、画面内のアクテ
ィビィティの大きい部分は粗く量子化するようなことが
実現されている。これは、人間の視覚特性が複雑な絵柄
においては圧縮に伴う歪みを感知しにくいことを利用
し、背景のような平坦な部分の量子化インデックスを小
さくすることで、背景雑音や疑似輪郭といった歪みを軽
減するようにしたものである。以下、本出願において、
このようにアクティビィティ等によってマクロブロック
毎の量子化インデックスを変動させることを変動量子化
機構と呼ぶことにする。
By such processing, a portion having a large activity in a screen is roughly quantized. This utilizes the fact that human visual characteristics make it difficult to perceive distortion due to compression in a complex pattern, and reduces the quantization index of flat parts such as the background to reduce distortion such as background noise and pseudo contours. Is to be reduced. Hereinafter, in the present application,
Varying the quantization index for each macroblock by activity or the like in this way is referred to as a variable quantization mechanism.

【0024】[0024]

【発明が解決しようとする課題】しかしながら、画面内
のアクティビィティの大きい部分であっても、画面を見
る人間がその部分だけに注目して画面を見ている場合に
は、その歪みが非常に目障りな場合がある。このこと
を、図10を参照して説明する。図10(a)は、平坦
な背景の中に、小さく、映画の主人公のような人物が映
っているような映像を簡単に示したものである。図10
(b)は、図10(a)における背景の部分と人物の部
分との境界部分でのマクロブロック毎のアクティビィテ
ィの変化を表したものである。図10(b)において、
符号151で示した背景部分は、平坦なのでアクティビ
ィティは非常に小さいが、符号152で示した人物の部
分は、服装の模様等によりアクティビィティは大きくな
り、符号153で示した背景の部分と人物の部分との境
界部分は、輝度の差が大きいことから、更にアクティビ
ィティが大きくなる。図10(c)は、図10(b)に
おいて符号154で示した直線上でのアクティビィティ
の変化を表したものである。図10(d)は、図10
(c)に示したアクティビィティに基づいて決定される
マクロブロックの量子化インデックスmquantの変
化を表したものである。このように、TM5では、アク
ティビィティの大きい部分では、マクロブロックの量子
化インデックスmquantも大きくなり、粗く量子化
される。
However, even in a portion of the screen where the activity is large, if a person watching the screen looks at the screen while paying attention to only that portion, the distortion is extremely large. May be annoying. This will be described with reference to FIG. FIG. 10A simply shows an image in which a small person such as a hero of a movie appears in a flat background. FIG.
FIG. 10B illustrates a change in activity for each macroblock at the boundary between the background portion and the person portion in FIG. 10A. In FIG. 10B,
The activity indicated by the reference numeral 151 is very small because it is flat, but the activity of the person indicated by the reference numeral 152 is large due to the pattern of clothes and the like. Because the difference in luminance is large at the boundary with the portion, the activity is further increased. FIG. 10C shows a change in activity on a straight line indicated by reference numeral 154 in FIG. 10B. FIG.
FIG. 11C illustrates a change in a quantization index mquant of a macroblock determined based on the activity illustrated in FIG. As described above, in the TM5, in a portion where the activity is large, the quantization index mquant of the macroblock is also large and coarsely quantized.

【0025】しかし、図10(a)に示したように、画
面の中に小さく、映画の主人公のような人物が映ってい
るような映像においては、視聴者は、主人公の顔に注目
するものであるが、人間の顔が小さく映っているという
ことは、その部分は背景部分に比べてアクティビィティ
が非常に大きくなり、上述のような変動量子化機構を用
いると、その部分は背景部分に比べて粗く量子化される
ことになり、歪みが大きくなって目障りになる。特に、
背景の部分と人物の部分との境界部分では、アクティビ
ィティが大きくなることから粗く量子化されて歪みが大
きくなり、画面内で人物が動くと歪みの大きな部分も動
いて、いわゆるモスキート雑音が発生するという問題点
があった。
However, as shown in FIG. 10 (a), in an image in which a person such as a hero of a movie is shown on a small screen, the viewer pays attention to the hero's face. However, the fact that the human face is reflected small means that the part has much greater activity than the background part, and using the above-mentioned fluctuation quantization mechanism, the part becomes the background part. As a result, quantization is performed coarsely, and distortion is increased, which is annoying. Especially,
At the boundary between the background and the person, the activity is increased and the quantization is coarse and the distortion is increased. There was a problem of doing.

【0026】同様に、画面の中に文章が書かれている場
合には、視聴者はその文章を読もうとするので、背景に
注目する人はほとんどいなくなり、多くの人は文字だけ
を注目することになるが、変動量子化機構を用いると、
文字の周辺に歪みが顕著に発生して目障りになる。この
ように、人間が画面内のどの部分を注目しているかによ
って、変動量子化機構は、逆に主観的な画質を悪くして
しまうという問題点があった。
Similarly, when a sentence is written on the screen, the viewer tries to read the sentence, so that almost no one pays attention to the background, and many people pay attention only to the characters. However, using the variable quantization mechanism,
Distortion is noticeably generated around the character, which is annoying. As described above, the variable quantization mechanism has a problem in that the subjective image quality deteriorates depending on which part of the screen the human observes.

【0027】なお、DVDのオーサリングでは、図8を
用いて説明したような、いわゆる2パスエンコードが用
いられている。また、更に高画質を実現するために、2
パスエンコードの結果でも満足な結果が得られなかった
シーンに対して、更に多めのビット量を配分して、再
度、3パス目のエンコードを行う手法等が知られてい
る。しかしながら、上述のような変動量子化機構を用い
ている場合には、いかにフレームに割り当てるビット量
を多くしても、アクティビィティの大きい部分は背景部
分よりも粗く量子化されるで、歪みを取り去ることは難
しいという問題点があった。
In DVD authoring, so-called two-pass encoding as described with reference to FIG. 8 is used. Also, in order to achieve higher image quality,
There is known a method of allocating a larger bit amount to a scene in which a satisfactory result is not obtained even as a result of the pass encoding, and performing the third pass encoding again. However, when the above-described variable quantization mechanism is used, no matter how much the amount of bits allocated to a frame is increased, a portion having a large activity is quantized coarser than a background portion, so that distortion is removed. There was a problem that it was difficult.

【0028】本発明はかかる問題点に鑑みてなされたも
ので、その目的は、画面内におけるブロック毎の画像の
複雑さに応じてブロック毎の量子化特性値を変動させる
機能を有しながら、主観的な画質を向上させることがで
きるようにした画像符号化装置および方法、画像符号化
制御用プログラムを記録したコンピュータ読み取り可能
な記録媒体ならびに記録用データ作成装置を提供するこ
とにある。
The present invention has been made in view of such a problem, and an object of the present invention is to provide a function of changing a quantization characteristic value for each block according to the complexity of an image for each block in a screen. It is an object of the present invention to provide an image encoding device and method capable of improving subjective image quality, a computer-readable recording medium recording an image encoding control program, and a recording data creating device.

【0029】[0029]

【課題を解決するための手段】本発明の画像符号化装置
は、1枚当たりの入力画像データを複数のブロックに分
割し、ブロック単位で、量子化を含む符号化によって入
力画像データを圧縮符号化する符号化手段と、ブロック
毎の画像の複雑さに応じて、符号化手段における量子化
特性値をブロック毎に変動させる量子化特性変動手段
と、この量子化特性変動手段の動作の特性を切り換え可
能な切り換え手段とを備えたものである。
An image encoding apparatus according to the present invention divides input image data per image into a plurality of blocks, and compresses input image data by encoding including quantization in units of blocks. Encoding means for encoding, a quantization characteristic varying means for varying the quantization characteristic value in the encoding means for each block according to the complexity of the image for each block, and an operation characteristic of the quantization characteristic varying means. Switchable switching means.

【0030】本発明の画像符号化方法は、1枚当たりの
入力画像データを複数のブロックに分割し、ブロック単
位で、量子化を含む符号化によって入力画像データを圧
縮符号化する画像符号化方法において、ブロック毎の画
像の複雑さに応じて、圧縮符号化の際の量子化特性値を
ブロック毎に変動可能とすると共に、量子化特性値をブ
ロック毎に変動させる動作の特性を切り換え可能とした
ものである。
The image encoding method according to the present invention divides input image data per image into a plurality of blocks, and compresses and encodes the input image data by encoding including quantization in block units. In accordance with the complexity of the image for each block, the quantization characteristic value at the time of compression encoding can be varied for each block, and the characteristic of the operation of varying the quantization characteristic value for each block can be switched. It was done.

【0031】本発明の画像符号化制御用プログラムを記
録したコンピュータ読み取り可能な記録媒体は、1枚当
たりの入力画像データを複数のブロックに分割し、ブロ
ック単位で、量子化を含む符号化によって入力画像デー
タを圧縮符号化する符号化手段と、ブロック毎の画像の
複雑さに応じて、符号化手段における量子化特性値をブ
ロック毎に変動させる量子化特性変動手段とを備えた画
像符号化装置に用いられ、コンピュータに、量子化特性
変動手段の動作の特性を切り換え可能とする機能を実現
するさせるための画像符号化制御用プログラムを記録し
たものである。
A computer-readable recording medium storing the image encoding control program of the present invention divides input image data per sheet into a plurality of blocks, and inputs the image data by encoding including quantization in units of blocks. An image coding apparatus comprising: coding means for compressing and coding image data; and quantization characteristic changing means for changing a quantization characteristic value in the coding means for each block according to the complexity of an image for each block. And a computer-readable recording medium for recording an image encoding control program for realizing a function of enabling a computer to switch an operation characteristic of a quantization characteristic varying unit.

【0032】本発明の記録用データ作成装置は、画像デ
ータを圧縮符号化する画像符号化装置と、この画像符号
化装置を制御する制御装置と、画像符号化装置によって
圧縮符号化された画像データと他のデータとを多重化し
て映像記録媒体に対する記録用データを作成する多重化
装置とを備えた記録用データ作成装置において、画像符
号化装置は、1枚当たりの入力画像データを複数のブロ
ックに分割し、ブロック単位で、量子化を含む符号化に
よって入力画像データを圧縮符号化する符号化手段と、
ブロック毎の画像の複雑さに応じて、符号化手段におけ
る量子化特性値をブロック毎に変動させる量子化特性変
動手段と、この量子化特性変動手段の動作の特性を切り
換え可能な切り換え手段とを有し、制御装置は、切り換
え手段による切り換え動作の設定を行うものである。
According to the present invention, there is provided an image encoding apparatus for compressing and encoding image data, a control apparatus for controlling the image encoding apparatus, and image data compressed and encoded by the image encoding apparatus. And a multiplexing device for multiplexing data with other data to create recording data for a video recording medium, wherein the image encoding device converts input image data per sheet into a plurality of blocks. Encoding means for compressing and encoding the input image data by encoding including quantization in units of blocks,
A quantizing characteristic varying means for varying the quantizing characteristic value in the encoding means for each block in accordance with the complexity of the image for each block; and a switching means capable of switching the operation characteristics of the quantizing characteristic varying means. The control device sets the switching operation by the switching unit.

【0033】本発明の画像符号化装置では、符号化手段
によって、1枚当たりの入力画像データが複数のブロッ
クに分割され、ブロック単位で、量子化を含む符号化に
よって入力画像データが圧縮符号化される。符号化手段
における量子化特性値は、量子化特性変動手段によっ
て、ブロック毎の画像の複雑さに応じて、ブロック毎に
変動される。量子化特性変動手段の動作の特性は、切り
換え手段によって切り換え可能とされる。
In the image coding apparatus according to the present invention, the input image data per sheet is divided into a plurality of blocks by the coding means, and the input image data is compression-coded by coding including quantization in block units. Is done. The quantization characteristic value in the encoding means is varied for each block by the quantization characteristic variation means according to the complexity of the image for each block. The characteristics of the operation of the quantization characteristic changing means can be switched by the switching means.

【0034】本発明の画像符号化方法では、1枚当たり
の入力画像データが複数のブロックに分割され、ブロッ
ク単位で、量子化を含む符号化によって入力画像データ
を圧縮符号化する際に、ブロック毎の画像の複雑さに応
じて、量子化特性値がブロック毎に変動され、その変動
動作の特性が切り換え可能とされる。
According to the image encoding method of the present invention, input image data per sheet is divided into a plurality of blocks, and when the input image data is compression-encoded by encoding including quantization in units of blocks, the input image data is divided into blocks. The quantization characteristic value is changed for each block according to the complexity of each image, and the characteristics of the changing operation can be switched.

【0035】本発明の画像符号化制御用プログラムを記
録したコンピュータ読み取り可能な記録媒体に記録され
た画像符号化制御用プログラムでは、符号化手段におけ
る量子化特性値をブロック毎に変動させる量子化特性変
動手段の動作の特性が切り換え可能とされる。
According to the image encoding control program recorded on a computer-readable recording medium on which the image encoding control program of the present invention is recorded, the quantization characteristic for varying the quantization characteristic value in the encoding means for each block is provided. The characteristics of the operation of the variation means can be switched.

【0036】本発明の記録用データ作成装置では、画像
符号化装置において、符号化手段によって、1枚当たり
の入力画像が複数のブロックに分割され、ブロック単位
で、量子化を含む符号化によって入力画像データが圧縮
符号化され、符号化手段における量子化特性値が、量子
化特性変動手段によって、ブロック毎に画像の複雑さに
応じて、ブロック毎に変動される。量子化特性変動手段
の動作の特性は切り換え手段によって切り換え可能とさ
れる。また、制御装置において、切り換え手段による切
り換え動作の設定が行われる。
In the recording data generating apparatus according to the present invention, in the image encoding apparatus, an input image per sheet is divided into a plurality of blocks by the encoding means, and the input image is input in blocks by encoding including quantization. The image data is compression-encoded, and the quantization characteristic value in the encoding means is varied for each block by the quantization characteristic variation means according to the complexity of the image for each block. The characteristics of the operation of the quantization characteristic changing means can be switched by the switching means. In the control device, the setting of the switching operation by the switching means is performed.

【0037】[0037]

【発明の実施の形態】以下、本発明の実施の形態につい
て図面を参照して詳細に説明する。
Embodiments of the present invention will be described below in detail with reference to the drawings.

【0038】[第1の実施の形態]図1は、本発明の第
1の実施の形態に係る画像符号化装置としてのビデオエ
ンコーダの構成を示すブロック図である。このビデオエ
ンコーダ11は、入力画像信号S1 を入力し、符号化す
る順番に従ってピクチャ(Iピクチャ,Pピクチャ,B
ピクチャ)の順番を並べ替える画像並べ替え回路21
と、この画像並べ替え回路21の出力データを入力し、
フレーム構造かフィールド構造かを判別し、判別結果に
応じた走査変換および16×16画素のマクロブロック
化を行う走査変換・マクロブロック化回路22と、この
走査変換・マクロブロック化回路22の出力データと予
測画像データとの差分をとる減算回路31と、この減算
回路31の出力データに対して、DCTブロック単位で
DCTを行い、DCT係数を出力するDCT回路32
と、このDCT回路32の出力データを量子化する量子
化回路33と、この量子化回路33の出力データを可変
長符号化する可変長符号化回路34と、この可変長符号
化回路34の出力データを一旦保持し、一定のビットレ
ートのビットストリームからなる圧縮画像データS4
して出力するバッファメモリ35とを備えている。バッ
ファメモリ35は、可変長符号化回路34の発生ビット
量を示す発生ビット量データS2 をビデオエンコーダ制
御用コンピュータ12に送るようになっている。
[First Embodiment] FIG. 1 is a block diagram showing a configuration of a video encoder as an image coding apparatus according to a first embodiment of the present invention. The video encoder 11 receives an input image signal S 1 and pictures (I picture, P picture, B picture) in the order of encoding.
Picture sorting circuit 21 for sorting the order of pictures
And the output data of the image rearranging circuit 21
A scan conversion / macroblock circuit 22 that determines whether a frame structure or a field structure is used and performs scan conversion and macroblock formation of 16 × 16 pixels according to the determination result, and output data of the scan conversion / macroblock circuit 22. Circuit 31 for taking the difference between the subtraction data and the predicted image data, and a DCT circuit 32 for performing DCT on the output data of the subtraction circuit 31 in DCT block units and outputting DCT coefficients
A quantization circuit 33 for quantizing output data of the DCT circuit 32, a variable length encoding circuit 34 for variable length encoding of the output data of the quantization circuit 33, and an output of the variable length encoding circuit 34. data temporarily hold, and a buffer memory 35 to output as compressed image data S 4 consisting bitstream constant bit rate. The buffer memory 35 sends generated bit amount data S 2 indicating the generated bit amount of the variable length encoding circuit 34 to the video encoder control computer 12.

【0039】ビデオエンコーダ11は、更に、走査変換
・マクロブロック化回路22の出力データに基づいて動
きベクトルを検出する動き検出回路40と、量子化回路
33の出力データを逆量子化する逆量子化回路36と、
この逆量子化回路36の出力データに対して逆DCTを
行う逆DCT回路37と、この逆DCT回路37の出力
データと予測画像データとを加算して出力する加算回路
38と、この加算回路38の出力データを保持し、動き
検出回路40から送られる動きベクトルに応じて動き補
償を行って予測画像データを減算回路31および加算回
路38に出力する動き補償回路39とを備えている。
The video encoder 11 further includes a motion detection circuit 40 for detecting a motion vector based on output data of the scan conversion / macroblock conversion circuit 22, and an inverse quantization for inversely quantizing output data of the quantization circuit 33. A circuit 36;
An inverse DCT circuit 37 for performing an inverse DCT on the output data of the inverse quantization circuit 36; an addition circuit 38 for adding the output data of the inverse DCT circuit 37 to the predicted image data and outputting the result; And a motion compensation circuit 39 for performing motion compensation in accordance with the motion vector sent from the motion detection circuit 40 and outputting predicted image data to the subtraction circuit 31 and the addition circuit 38.

【0040】ビデオエンコーダ11は、更に、走査変換
・マクロブロック化回路22の出力データに基づいて、
画像の複雑さを表すパラメータであるアクティビィティ
(Activity)を計算するアクティビィティ計算
部41と、バッファメモリ35からの発生ビット量デー
タS2 とビデオエンコーダ制御用コンピュータ12から
の目標符号量データS3 とに基づいて、発生符号量(発
生ビット量)が目標符号量となるように量子化回路33
における量子化特性値を表す量子化インデックスQを決
定する量子化インデックス決定部42と、この量子化イ
ンデックス決定部42によって決定された量子化インデ
ックスとアクティビィティ計算部41によって計算され
たアクティビィティとに基づいて、マクロブロック単位
の量子化インデックスを決定するマクロブロック量子化
インデックス決定部43とを備えている。これらのアク
ティビィティ計算部41とマクロブロック量子化インデ
ックス決定部43が前述の変動量子化機構に相当する。
ビデオエンコーダ11は、更に、ビデオエンコーダ制御
用コンピュータ12からの変動量子化機構を使用するか
否かの切り換え指示信号S5 に基づいて、マクロブロッ
ク量子化インデックス決定部42によって決定された量
子化インデックスmquantと量子化インデックス決
定部42によって決定された量子化インデックスQの一
方を選択的に量子化回路33に与えるスイッチ部44を
備えている。アクティビィティ計算部41は、例えば式
(1)に基づいて、各マクロブロック毎のアクティビィ
ティを求める。マクロブロック量子化インデックス決定
部43は、例えば式(4)に基づいて、各マクロブロッ
クの量子化インデックスmquantを決定する。
The video encoder 11 further obtains, based on the output data of the scan conversion and macroblock conversion circuit 22,
An activity calculation unit 41 for calculating an activity (Activity) which is a parameter representing the complexity of an image; generated bit amount data S 2 from a buffer memory 35; and target code amount data S 3 from a video encoder control computer 12. Based on the above, the quantization circuit 33 generates the target code amount so that the generated code amount (the generated bit amount) becomes the target code amount.
, A quantization index determination unit 42 that determines a quantization index Q representing a quantization characteristic value, and a quantization index determined by the quantization index determination unit 42 and the activity calculated by the activity calculation unit 41. A macroblock quantization index determination unit 43 for determining a quantization index for each macroblock based on the macroblock quantization index. The activity calculator 41 and the macroblock quantization index determiner 43 correspond to the above-described variable quantization mechanism.
Video encoder 11 may further, based on whether the switching instruction signal S 5 using the variation quantization mechanism from the video encoder control computer 12, the quantization index determined by the macroblock quantization index determining unit 42 There is provided a switch unit 44 for selectively supplying one of the mquant and the quantization index Q determined by the quantization index determination unit 42 to the quantization circuit 33. The activity calculation unit 41 calculates an activity for each macroblock based on, for example, Expression (1). The macroblock quantization index determination unit 43 determines the quantization index mquant of each macroblock based on, for example, Equation (4).

【0041】図2は、図1におけるビデオエンコーダ1
1のハードウェア構成を示すブロック図である。このビ
デオエンコーダ11は、互いにバス17を介して接続さ
れたCPU(中央処理装置)13,RAM(ランダム・
アクセス・メモリ)14,EEPROM(電気的消去可
能なプログラマブル・リード・オンリ・メモリ)15を
有するコンピュータと、バス17に接続されたエンコー
ダ主要部16によって構成されている。ここで、図1に
おける量子化インデックス決定部42、マクロブロック
量子化インデックス決定部43およびスイッチ部44
は、EEPROM15に格納されたプログラムにより実
現され、これら以外の部分がエンコーダ主要部16であ
る。また、ビデオエンコーダ11には、バス17を介し
てビデオエンコーダ11を制御するビデオエンコーダ制
御用コンピュータ12が接続され、ビデオエンコーダ1
1の拡張スロットには着脱可能なメモリカード18が取
り付けられている。メモリカード18は、本発明に係る
画像符号化制御用プログラムが記録されたコンピュータ
読み取り可能な記録媒体に相当し、メモリカード18に
記録されたプログラムをEEPROM15に記録するこ
とによって、ビデオエンコーダ11のCPUが実行する
プログラムのインストールまたは変更が可能になってい
る。
FIG. 2 shows the video encoder 1 shown in FIG.
FIG. 2 is a block diagram illustrating a hardware configuration of a first example. The video encoder 11 includes a CPU (Central Processing Unit) 13 and a RAM (Random
It comprises a computer having an access memory 14 and an electrically erasable programmable read only memory (EEPROM) 15, and a main encoder 16 connected to a bus 17. Here, the quantization index determination unit 42, the macroblock quantization index determination unit 43, and the switch unit 44 in FIG.
Are realized by a program stored in the EEPROM 15, and the other part is the encoder main part 16. The video encoder 11 is connected to a video encoder control computer 12 that controls the video encoder 11 via a bus 17.
A removable memory card 18 is attached to one expansion slot. The memory card 18 corresponds to a computer-readable recording medium on which the image encoding control program according to the present invention is recorded, and stores the program recorded on the memory card 18 in the EEPROM 15 so that the CPU of the video encoder 11 Can be installed or modified.

【0042】図3は、本実施の形態に係るビデオエンコ
ーダ11を使用した本実施の形態に係る記録用データ作
成装置としてのオーサリング装置の構成を示すブロック
図である。このオーサリング装置は、画像信号を入力
し、圧縮符号化するビデオエンコーダ11と、このビデ
オエンコーダ11を制御するビデオエンコーダ制御用コ
ンピュータ12と、オーディオ信号を入力し、圧縮符号
化するオーディオエンコーダ51と、このオーディオエ
ンコーダ51を制御するオーディオエンコーダ制御用コ
ンピュータ52と、字幕等の静止画像信号を入力し、符
号化するサブピクチャエンコーダ53と、このサブピク
チャエンコーダ53を制御するサブピクチャエンコーダ
制御用コンピュータ54と、これらの符号化されたデー
タをDVD規格に即した順序で多重化するマルチプレク
サ56と、データの多重化処理および符号化処理の検査
を行うためのビューワ57と、ディスク製造工程に多重
化処理後のデータを渡すために所定の記録媒体に記録す
るテープストリーマ58と、ビデオエンコーダ11,オ
ーディオエンコーダ51,サブピクチャエンコーダ5
3,マルチプレクサ56,ビューワ57およびテープス
トリーマ58に接続されたハードディスクアレイ55
と、ネットワーク60を介してビデオエンコーダ制御用
コンピュータ12,オーディオエンコーダ制御用コンピ
ュータ52,サブピクチャエンコーダ制御用コンピュー
タ54,マルチプレクサ56,ビューワ57およびテー
プストリーマ58に接続され、これらの動作を管理する
システムコントローラ59とを備えている。
FIG. 3 is a block diagram showing a configuration of an authoring device as a recording data creation device according to the present embodiment using the video encoder 11 according to the present embodiment. The authoring apparatus includes a video encoder 11 that inputs and compresses and encodes an image signal, a video encoder control computer 12 that controls the video encoder 11, an audio encoder 51 that receives and compresses and encodes an audio signal, An audio encoder control computer 52 for controlling the audio encoder 51; a sub-picture encoder 53 for inputting and encoding a still image signal such as subtitles; and a sub-picture encoder control computer 54 for controlling the sub-picture encoder 53 A multiplexer 56 for multiplexing these coded data in an order conforming to the DVD standard, a viewer 57 for checking the data multiplexing process and the coding process, and a multiplexing process for the disc manufacturing process. To pass the data The tape streamer 58 to be recorded on the constant of the recording medium, the video encoder 11, audio encoder 51, sub-picture encoder 5
3, hard disk array 55 connected to multiplexer 56, viewer 57 and tape streamer 58
And a system controller connected to a video encoder control computer 12, an audio encoder control computer 52, a sub-picture encoder control computer 54, a multiplexer 56, a viewer 57, and a tape streamer 58 via a network 60, and managing these operations. 59.

【0043】次に、上述のオーサリング装置の動作につ
いて説明する。まず、システムコントローラ59は、ビ
デオエンコーダ制御用コンピュータ12,オーディオエ
ンコーダ制御用コンピュータ52およびサブピクチャエ
ンコーダ制御用コンピュータ54に符号化処理の開始を
指示する。各エンコーダ11,51,53では、各エン
コーダ制御用コンピュータ12,52,54の指示によ
り符号化処理を開始する。その結果得られる符号化デー
タは、システムコントローラ59から指示されたハード
ディスクアレイ55の記憶領域に順次格納される。各エ
ンコーダ11,51,53における符号化処理が終了す
ると、マルチプレクサ56において多重化処理を行う。
Next, the operation of the above-described authoring apparatus will be described. First, the system controller 59 instructs the video encoder control computer 12, the audio encoder control computer 52, and the sub-picture encoder control computer 54 to start encoding processing. Each of the encoders 11, 51, 53 starts an encoding process according to an instruction from each of the encoder control computers 12, 52, 54. The resulting encoded data is sequentially stored in the storage area of the hard disk array 55 specified by the system controller 59. When the encoding process in each of the encoders 11, 51, and 53 is completed, the multiplexer 56 performs a multiplexing process.

【0044】マルチプレクサ56は、システムコントロ
ーラ59の指示によりハードディスクアレイ55の記憶
領域から符号化データを読み出し、これをDVD規格に
則した順序で多重化し、その結果得られる多重化データ
をシステムコントローラ59に指示されたハードディス
クアレイ55の記憶領域に順次格納する。マルチプレク
サ56における多重化処理が終了すると、ビューワ57
において検査処理を行う。ビューワ57は、システムコ
ントローラ59の指示によりハードディスクアレイ55
の記憶領域から多重化データを読み出し、これを順次復
号化して、図示しないモニタに表示する。これにより符
号化処理および多重化処理が正常に行われたか否かが検
査される。ビューワ57における検査処理が終了する
と、テープストリーマ58において記録処理を行う。テ
ープストリーマ58は、システムコントローラ59の指
示によりハードディスクアレイ55の記憶領域から多重
化データを読み出し、これを所定のテープ状の記録媒体
に順次記録する。システムコントローラ59は、テープ
ストリーマ58から記録終了の通知を受信すると、記録
処理が終了したとして記録用データの作成を終了する。
The multiplexer 56 reads the encoded data from the storage area of the hard disk array 55 in accordance with the instruction of the system controller 59, multiplexes the read data in the order conforming to the DVD standard, and sends the resulting multiplexed data to the system controller 59. The data is sequentially stored in the designated storage area of the hard disk array 55. When the multiplexing process in the multiplexer 56 ends, the viewer 57
Inspection processing is performed. The viewer 57 operates according to an instruction from the system controller 59.
Multiplexed data is read out from the storage area, and is sequentially decoded and displayed on a monitor (not shown). Thereby, it is checked whether the encoding process and the multiplexing process have been performed normally. When the inspection process in the viewer 57 is completed, the recording process is performed in the tape streamer 58. The tape streamer 58 reads the multiplexed data from the storage area of the hard disk array 55 in accordance with an instruction from the system controller 59, and sequentially records the data on a predetermined tape-shaped recording medium. Upon receiving the recording end notification from the tape streamer 58, the system controller 59 determines that the recording process has ended and ends the creation of the recording data.

【0045】次に、図1に示した本実施の形態に係る画
像符号化装置の主要な動作について説明する。なお、以
下の説明は、本実施の形態に係る画像符号化方法の説明
を兼ねている。ビデオエンコーダ11では、まず、画像
並べ替え回路21によって、入力画像信号S1 に対し
て、符号化する順番に従ってピクチャ(Iピクチャ,P
ピクチャ,Bピクチャ)の順番を並べ替え、次に、走査
変換・マクロブロック化回路22によって、フレーム構
造かフィールド構造かを判別し、判別結果に応じた走査
変換およびマクロブロック化を行い、減算回路31に送
る。また、走査変換・マクロブロック化回路22の出力
データは、アクティビィティ計算部41および動き検出
回路40にも送られる。
Next, main operations of the image encoding apparatus according to the present embodiment shown in FIG. 1 will be described. The following description also serves as a description of the image encoding method according to the present embodiment. In the video encoder 11, first, the image rearranging circuit 21, the input image signal S 1, a picture in the order of coding (I picture, P
Picture, B picture), and then the scan conversion / macroblock conversion circuit 22 determines whether the frame structure or the field structure is used, and performs scan conversion and macroblock conversion according to the determination result. Send to 31. The output data of the scan conversion / macroblock conversion circuit 22 is also sent to the activity calculation unit 41 and the motion detection circuit 40.

【0046】アクティビィティ計算部41は、画面の複
雑さを表すパラメータであるアクティビィティ(Act
ivity)を算出し、マクロブロック量子化インデッ
クス決定部43に送る。動き検出回路40は、動きベク
トルを検出して動き補償回路39に送る。
The activity calculation section 41 has an activity (Act) which is a parameter representing the complexity of the screen.
iv)) and sends it to the macroblock quantization index determining unit 43. The motion detection circuit 40 detects a motion vector and sends it to the motion compensation circuit 39.

【0047】Iピクチャの場合には、減算回路31にお
いて予測画像データとの差分をとることなく、走査変換
・マクロブロック化回路22の出力データをそのままD
CT回路32に入力してDCTを行い、量子化回路33
によってDCT係数を量子化し、可変長符号化回路34
によって量子化回路33の出力データを可変長符号化
し、バッファメモリ35によって可変長符号化回路34
の出力データを一旦保持し、一定のビットレートのビッ
トストリームからなる圧縮画像データS4 として出力す
る。また、逆量子化回路36によって量子化回路33の
出力データを逆量子化し、逆DCT回路37によって逆
量子化回路36の出力データに対して逆DCTを行い、
逆DCT回路37の出力画像データを加算回路38を介
して動き補償回路39に入力して保持させる。
In the case of an I picture, the output data of the scan conversion / macroblock conversion circuit 22 is used as it is in the subtraction circuit 31 without taking the difference from the predicted image data.
The DCT is input to the CT circuit 32 to perform DCT.
The DCT coefficient is quantized by the variable-length coding circuit 34.
The output data of the quantization circuit 33 is variable-length encoded by the
Temporarily holding the output data, and outputs the compressed image data S 4 consisting bitstream constant bit rate. Further, the output data of the quantization circuit 33 is inversely quantized by the inverse quantization circuit 36, and the inverse DCT is performed on the output data of the inverse quantization circuit 36 by the inverse DCT circuit 37.
The output image data of the inverse DCT circuit 37 is input to the motion compensation circuit 39 via the addition circuit 38 and held.

【0048】Pピクチャの場合には、動き補償回路39
によって、保持している過去のIピクチャまたはPピク
チャに対応する画像データと動き検出回路40からの動
きベクトルとに基づいて予測画像データを生成し、予測
画像データを減算回路31および加算回路38に出力す
る。また、減算回路31によって、走査変換・マクロブ
ロック化回路22の出力データと動き補償回路39から
の予測画像データとの差分をとり、DCT回路32によ
ってDCTを行い、量子化回路33によってDCT係数
を量子化し、可変長符号化回路34によって量子化回路
33の出力データを可変長符号化し、バッファメモリ3
5によって可変長符号化回路34の出力データを一旦保
持し圧縮画像データS4 として出力する。また、逆量子
化回路36によって量子化回路33の出力データを逆量
子化し、逆DCT回路37によって逆量子化回路36の
出力データに対して逆DCTを行い、加算回路38によ
って逆DCT回路37の出力データと予測画像データと
を加算し、動き補償回路39に入力して保持させる。
In the case of a P picture, the motion compensation circuit 39
Thus, predicted image data is generated based on the stored image data corresponding to the past I picture or P picture and the motion vector from the motion detection circuit 40, and the predicted image data is sent to the subtraction circuit 31 and the addition circuit 38. Output. Further, the difference between the output data of the scan conversion / macroblocking circuit 22 and the predicted image data from the motion compensation circuit 39 is calculated by the subtraction circuit 31, the DCT is performed by the DCT circuit 32, and the DCT coefficient is calculated by the quantization circuit 33. The output data of the quantization circuit 33 is variable-length coded by the variable length coding circuit 34 and the buffer memory 3
5 temporarily outputs held as compressed image data S 4 the output data of the variable-length encoding circuit 34 by. Further, the output data of the quantization circuit 33 is inversely quantized by the inverse quantization circuit 36, inverse DCT is performed on the output data of the inverse quantization circuit 36 by the inverse DCT circuit 37, and the inverse DCT circuit 37 The output data and the predicted image data are added and input to the motion compensation circuit 39 to be held.

【0049】Bピクチャの場合には、動き補償回路39
によって、保持している過去および未来のIピクチャま
たはPピクチャに対応する2つの画像データと動き検出
回路40からの2つの動きベクトルとに基づいて予測画
像データを生成し、予測画像データを減算回路31およ
び加算回路38に出力する。また、減算回路31によっ
て、走査変換・マクロブロック化回路22の出力データ
と動き補償回路39からの予測画像データとの差分をと
り、DCT回路32によってDCTを行い、量子化回路
33によってDCT係数を量子化し、可変長符号化回路
34によって量子化回路33の出力データを可変長符号
化し、バッファメモリ35によって可変長符号化回路3
4の出力データを一旦保持し圧縮画像データS4 として
出力する。なお、Bピクチャは動き補償回路39に保持
させない。
In the case of a B picture, the motion compensation circuit 39
To generate predicted image data based on two image data corresponding to the past and future I pictures or P pictures and two motion vectors from the motion detection circuit 40, and subtract the predicted image data from the subtraction circuit. 31 and an adder circuit 38. Further, the difference between the output data of the scan conversion / macroblocking circuit 22 and the predicted image data from the motion compensation circuit 39 is calculated by the subtraction circuit 31, the DCT is performed by the DCT circuit 32, and the DCT coefficient is calculated by the quantization circuit 33. The output data of the quantization circuit 33 is variable-length coded by a variable length coding circuit 34, and the variable length coding circuit 3 is
Temporarily holding the fourth output data is output as compressed image data S 4. The B picture is not stored in the motion compensation circuit 39.

【0050】なお、バッファメモリ35は、可変長符号
化回路34より発生されるビット量を表す発生ビット量
データS2 をビデオエンコーダ制御用コンピュータ12
に送る。
The buffer memory 35 stores the generated bit amount data S 2 representing the bit amount generated by the variable length coding circuit 34 in the video encoder control computer 12.
Send to

【0051】次に、本実施の形態に係る画像符号化装置
において、例えば2パスエンコード方式を使用して、量
子化回路33における量子化インデックスを最適化して
入力画像信号を圧縮符号化する場合の動作について説明
する。まず、1回目の符号化(1パス目)では、ビデオ
エンコーダ11に入力された入力画像信号S1 に対し
て、上述のようにピクチャ毎にDCTを行い、量子化回
路33によって固定の量子化特性値で量子化し、可変長
符号化回路34によって量子化回路33の出力データを
可変長符号化して、バッファメモリ35によって可変長
符号化回路34より発生される発生ビット量データS2
を、ビデオエンコーダ制御用コンピュータ12に送る。
ビデオエンコーダ制御用コンピュータ12には、発生ビ
ット量または発生ビット量より求めた各ピクチャ毎の符
号化難易度に基づいて目標符号量を決定する。
Next, in the image encoding apparatus according to the present embodiment, when the input image signal is compression-encoded by optimizing the quantization index in the quantization circuit 33 using, for example, a two-pass encoding method. The operation will be described. First, in the first encoding (first pass), the input image signal S 1 input to the video encoder 11 is subjected to DCT for each picture as described above, and the quantization circuit 33 performs fixed quantization. The output data of the quantization circuit 33 is variable-length coded by the variable length coding circuit 34 by the characteristic value, and the generated bit amount data S 2 generated by the variable length coding circuit 34 by the buffer memory 35.
To the video encoder control computer 12.
The video encoder control computer 12 determines the target code amount based on the generated bit amount or the encoding difficulty for each picture obtained from the generated bit amount.

【0052】次に、2回目の符号化(2パス目)では、
ビデオエンコーダ制御用コンピュータ12は、目標符号
量を示す目標符号量データS3 をビデオエンコーダ11
の量子化インデックス決定部42に与える。量子化イン
デックス決定部42では、目標符号量データS3 とバッ
ファメモリ35から与えられた発生ビット量データS2
またはそれによるVBVバッファの占有量等に基づい
て、発生符号量(発生ビット量)が目標符号量となるよ
うに量子化回路33における量子化特性値を表す量子化
インデックスQを決定する。また、変動量子化機構によ
り、アクティビィティ計算部41では、例えば式(1)
のように定義されるマクロブロック毎のアクティビィテ
ィを求め、マクロブロック量子化インデックス決定部4
3において、このアクティビィティと量子化インデック
ス決定部42で求められた量子化インデックスQに基づ
いて、各マクロブロックの量子化インデックスmqua
ntを決定する。ビデオエンコーダ制御用コンピュータ
12は、スイッチ部44を制御して、量子化回路33と
マクロブロック量子化インデックス決定部43とを接続
する。ビデオエンコーダ11は、量子化回路33によっ
て、マクロブロック量子化インデックス決定部43で決
定された量子化インデックスmquantに基づいてD
CT回路32の出力データを量子化し、可変長符号化回
路34によって可変長符号化して、一定のビットレート
のビットストリームからなる圧縮画像データS4 として
出力する。2パス目を終了した後、作業者は、ビューワ
57により圧縮画像データS4 を順次復号化して、画像
を見ながら、変動量子化機構を使用するか否かの切り換
え情報を画像のタイムコードに対応させて、ビデオエン
コーダ制御用コンピュータ12内の変動量子化機構設定
ファイルに記録する。例えば、画像内の視聴者の注目し
やすい場所にモスキート雑音が顕著に発生している場
合、そのシーンの変動量子化機構はオフと記録する。
Next, in the second encoding (second pass),
The video encoder control computer 12 sends the target code amount data S 3 indicating the target code amount to the video encoder 11.
Is given to the quantization index determination unit 42. The quantization index determination unit 42 generates the target code amount data S 3 and the generated bit amount data S 2 given from the buffer memory 35.
Alternatively, the quantization index Q representing the quantization characteristic value in the quantization circuit 33 is determined based on the occupation amount of the VBV buffer and the like so that the generated code amount (the generated bit amount) becomes the target code amount. Further, the activity calculator 41 uses, for example, the equation (1) according to the variable quantization mechanism.
The activity for each macroblock defined as follows is determined, and the macroblock quantization index determination unit 4
3, based on the activity and the quantization index Q obtained by the quantization index determination unit 42, the quantization index mqua of each macroblock is obtained.
Determine nt. The video encoder control computer 12 controls the switch unit 44 to connect the quantization circuit 33 and the macroblock quantization index determination unit 43. The video encoder 11 uses the quantization circuit 33 to calculate D based on the quantization index mquant determined by the macroblock quantization index determination unit 43.
The output data of the CT circuit 32 quantizes and variable-length coding by the variable-length coding circuit 34, and outputs it as compressed image data S 4 consisting bitstream constant bit rate. After finishing the second pass, the operator sequentially decodes the compressed image data S 4 by the viewer 57 and, while watching the image, sets switching information as to whether or not to use the variable quantization mechanism in the time code of the image. Correspondingly, the variable quantization mechanism setting file in the video encoder control computer 12 is recorded. For example, when mosquito noise is noticeably generated at a place in the image where the viewer is likely to pay attention, the variation quantization mechanism of the scene is recorded as off.

【0053】変動量子化機構の切り換えの設定が終了し
た後、3回目の符号化(3パス目)を行う。この3パス
目では、ビデオエンコーダ11に入力された入力画像信
号S1 に対して、上述のようにピクチャ毎にDCTを行
い、ビデオエンコーダ制御用コンピュータ12は、変動
量子化機構設定ファイルを読み込み、タイムコードに応
じて変動量子化機構の切り換え指示データS5 をスイッ
チ部44に与える。切り換え指示データS5 が変動量子
化機構のオフを指示する場合、スイッチ部44は量子化
回路33と量子化インデックス決定部42とを接続す
る。この場合には、DCT回路32の出力データは、量
子化インデックス決定部42で決定された量子化インデ
ックスQに基づいて、量子化回路33により量子化され
る。一方、切り換え指示データS5 が変動量子化機構の
オンを指示する場合、スイッチ部44は量子化回路33
とマクロブロック量子化インデックス決定部43とを接
続する。この場合には、DCT回路32の出力データ
は、マクロブロック量子化インデックス決定部43で決
定された量子化インデックスmquantに基づいて、
量子化回路33により量子化される。
After the setting of the switching of the variable quantization mechanism is completed, the third encoding (third pass) is performed. In the third pass, the input image signal S 1 input to the video encoder 11 performs DCT for each picture as described above, the video encoder control computer 12 reads the variation quantization mechanism configuration file, providing a switching instruction data S 5 variation quantization mechanism according to the time code to the switch unit 44. If the switching instruction data S 5 indicating the off fluctuations quantization mechanism, the switch section 44 connects the quantization circuit 33 and the quantization index determining unit 42. In this case, the output data of the DCT circuit 32 is quantized by the quantization circuit 33 based on the quantization index Q determined by the quantization index determination unit 42. On the other hand, when the switching instruction data S 5 instructs to turn on the variable quantization mechanism, the switch unit 44
And the macroblock quantization index determination unit 43. In this case, the output data of the DCT circuit 32 is based on the quantization index mquant determined by the macroblock quantization index determination unit 43.
The quantization is performed by the quantization circuit 33.

【0054】図4は、2時間の映画を符号化するとき
に、変動量子化機構の切り換え情報をタイムコードに対
応させて設定したときの切り換え情報の時間的変化の一
例を表したものであり、縦軸が変動量子化機構のオン,
オフ、横軸がタイムコードを表している。図4に示した
例では、オープニングのようにタイトル文字等を重視し
たいシーン61、背景より主人公の顔を重視したいシー
ン62、エンディングのクレジット文字を重視したいシ
ーン63において変動量子化機構をオフにして、視聴者
が注目している物体の周辺の歪みを軽減するようにして
いる。
FIG. 4 shows an example of a temporal change of the switching information when the switching information of the variable quantization mechanism is set in correspondence with the time code when encoding a two-hour movie. , The vertical axis is the variable quantization mechanism on,
Off, the horizontal axis represents time code. In the example shown in FIG. 4, the variable quantization mechanism is turned off in a scene 61 in which the title character or the like is to be emphasized as in the opening, a scene 62 in which the hero's face is to be emphasized from the background, and a scene 63 in which the ending credit character is to be emphasized. In addition, the distortion around the object of interest is reduced.

【0055】図5および図6は、変動量子化機構の切り
換え情報の入力を半自動的に行うことができるようにし
た第1の実施の形態の変形例を表すものである。なお、
上記実施の形態と同一構成部分については同一符号を付
してその説明は省略する。この例では、VTR60から
入力画像信号S1 とタイムコード情報S6 がビデオエン
コーダ11に入力される。ビデオエンコーダ11による
1回目、2回目までの符号化は第1の実施の形態と同様
である。2回目の符号化の終了後、圧縮画像データは、
SCSI(Small Computer System Interface)等のイ
ンターフェースを介して、記録媒体例えばハードディス
クアレイ55に記録される。ビデオエンコーダ制御用コ
ンピュータ12は、SCSI等のインターフェースを介
してハードディスクアレイ55内のデータの読み出しお
よび更新が可能であり、圧縮画像データを読み出すこと
ができる。また、この例では、ビデオエンコーダ制御用
コンピュータ12は、圧縮画像データを順次復号化して
再生し、再生画面を、ビデオエンコーダ制御用コンピュ
ータ12のモニタに表示させる機能を有しているものと
する。従って、作業者は、図6に示したように、復号化
した再生画面をウィンドウ65上で確認しながら、任意
のシーンを呼び出すことができる。また、ビデオエンコ
ーダ制御用コンピュータ12は、圧縮画像データの最初
のフレームのタイムコードを知っているので、全てのフ
レームについてタイムコードとの対応関係をつけること
ができる。
FIGS. 5 and 6 show a modification of the first embodiment in which the switching information of the variable quantization mechanism can be input semi-automatically. In addition,
The same components as those in the above embodiment are denoted by the same reference numerals, and description thereof will be omitted. In this example, the input image signal S 1 and the time code information S 6 are input from the VTR 60 to the video encoder 11. The first and second encodings by the video encoder 11 are the same as in the first embodiment. After the end of the second encoding, the compressed image data is
The data is recorded on a recording medium such as a hard disk array 55 via an interface such as SCSI (Small Computer System Interface). The video encoder control computer 12 can read and update data in the hard disk array 55 via an interface such as SCSI, and can read compressed image data. In this example, the video encoder control computer 12 has a function of sequentially decoding and reproducing the compressed image data and displaying a reproduced screen on a monitor of the video encoder control computer 12. Therefore, as shown in FIG. 6, the operator can call an arbitrary scene while checking the decrypted playback screen on the window 65. Further, since the video encoder control computer 12 knows the time code of the first frame of the compressed image data, it can associate all the frames with the time code.

【0056】作業者は、ファンクションキー66によっ
て変動量子化機構のオフ(MQUANT OFF)を指
定し、変動量子化機構をオフに設定したいシーンの最初
のフレームを表示させた状態でインキー67を押すこと
により、変動量子化機構をオフに設定したいシーンの開
始点のタイムコード情報をビデオエンコーダ制御用コン
ピュータ12内の変動量子化機構設定ファイルに記憶さ
せ、次に、変動量子化機構をオフに設定したいシーンの
最後のフレームを表示させた状態でアウトキー68を押
すことにより、変動量子化機構をオフに設定したいシー
ンの終了点のタイムコード情報をビデオエンコーダ制御
用コンピュータ12内の変動量子化機構設定ファイルに
記憶させ、タイムコードに対する変動量子化機構のオ
ン,オフの対応関係を作成することができる。このよう
しにして変動量子化機構の切り換え情報の設定を終了し
た後、変動量子化機構設定ファイルに従って、入力画像
信号の3回目の符号化を行うことにより、所望のシーン
での変動量子化機構の切り換えを実現できる。なお、入
力画像信号の3回目の符号化の動作は第1の実施の形態
と同様である。
The operator designates that the variable quantization mechanism is turned off (MQUANT OFF) by using the function key 66, and presses the in key 67 while displaying the first frame of the scene in which the variable quantization mechanism is to be set to be off. Thus, the time code information of the start point of the scene for which the variation quantization mechanism is to be turned off is stored in the variation quantization mechanism setting file in the video encoder control computer 12, and then the variation quantization mechanism is to be turned off. By pressing the out key 68 with the last frame of the scene displayed, the time code information of the end point of the scene for which the variable quantization mechanism is to be turned off is set to the variable quantization mechanism setting in the video encoder control computer 12. File and store the relationship between the time code on and off of the variable quantization mechanism. Can be created. After the setting of the switching information of the variable quantization mechanism is completed in this manner, the third encoding of the input image signal is performed according to the variable quantization mechanism setting file, so that the variable quantization mechanism in a desired scene is obtained. Switching can be realized. The operation of the third encoding of the input image signal is the same as that of the first embodiment.

【0057】以上説明したように本実施の形態に係る画
像符号化装置および記録用データ作成装置によれば、画
面内のアクティビィティに応じてブロック毎の量子化特
性値を変動させる変動量子化機構を有しながら、この変
動量子化機構の動作の特性を切り換え可能としたので、
人間の主観的な画質を向上させることが可能となる。具
体的には、例えば、符号化する画像の2パスエンコード
の結果を確認しながら、視聴者の注目しやすい部分にモ
スキート雑音が発生している場合は、そのシーンの変動
量子化機構をオフに設定して量子化することにより、画
面内の視聴者が注目している物体の周辺の歪みが小さく
なり、画面内のモスキート雑音を防止することができ
る。また、画面内に文字が書かれている場合には、文字
の周辺の歪みが低減され、主観的な画質を向上させるこ
とができる。
As described above, according to the image encoding apparatus and the recording data creating apparatus according to the present embodiment, the variable quantization mechanism for changing the quantization characteristic value for each block according to the activity in the screen. Since the characteristics of the operation of the variable quantization mechanism can be switched while having
Human subjective image quality can be improved. Specifically, for example, while checking the result of the two-pass encoding of the image to be coded, if mosquito noise is generated in a portion that is easily noticed by the viewer, the variable quantization mechanism of the scene is turned off. By setting and quantizing, distortion around an object of interest to the viewer in the screen is reduced, and mosquito noise in the screen can be prevented. When characters are written on the screen, distortion around the characters is reduced, and subjective image quality can be improved.

【0058】[第2の実施の形態]図7は本発明の第2
の実施の形態に係る画像符号化装置としてのビデオエン
コーダの構成を示すブロック図である。本実施の形態に
よるビデオエンコーダは、変動量子化機構における量子
化インデックスの変動幅を制御する機構を持つようにし
たものである。なお、ここでは、第1の実施の形態と同
一の構成部分には同一符号を付してその説明は省略す
る。
[Second Embodiment] FIG. 7 shows a second embodiment of the present invention.
It is a block diagram which shows the structure of the video encoder as an image coding apparatus which concerns on Embodiment of this invention. The video encoder according to the present embodiment has a mechanism for controlling the fluctuation width of the quantization index in the fluctuation quantization mechanism. Here, the same components as those in the first embodiment are denoted by the same reference numerals, and description thereof will be omitted.

【0059】本実施の形態におけるビデオエンコーダ7
1は、第1の実施の形態におけるビデオエンコーダ11
中のマクロブロック量子化インデックス決定部43およ
びスイッチ部44の代わりに、マクロブロック単位の量
子化インデックスmquantの変動幅の制御を行うマ
クロブロック量子化インデックス決定部73を備えてい
る。マクロブロック量子化インデックス決定部73は、
量子化インデックス決定部42で算出されたマクロブロ
ック単位の量子化インデックスQj とアクティビィティ
計算部41により算出されたアクティビィティactj
を用いて、次の式(5)に基づいて、各マクロブロック
の量子化インデックスmquantj を決定する。
The video encoder 7 in the present embodiment
1 is a video encoder 11 according to the first embodiment.
Instead of the macro block quantization index determination unit 43 and the switch unit 44, a macro block quantization index determination unit 73 that controls the variation width of the quantization index mquant in macro block units is provided. The macroblock quantization index determination unit 73 calculates
The macroblock-based quantization index Q j calculated by the quantization index determination unit 42 and the activity act j calculated by the activity calculation unit 41
With, based on the following equation (5), determines the quantization index mquant j of each macro block.

【0060】 mquantj =Qj ×{(Rj ×actj +aveact)/(actj + Rj ×aveact)} …(5)Mquant j = Q j × {(R j × act j + aveact) / (act j + R j × aveact)} (5)

【0061】なお、式(5)において、aveactは
直前に符号化したピクチャにおけるアクティビィティa
ctj の平均値である。また、変動幅制御係数Rj は、
作業者が任意に決定する値であり、ビデオエンコーダ制
御用コンピュータ12からの指示データS7 によってマ
クロブロック量子化インデックス決定部73に与えられ
る。例えば、Rj =1とした場合は量子化インデックス
mquantj は変動しない、すなわち第1の実施の形
態における変動量子化機構のオフ状態と同様である。ま
た、量子化インデックスmquantj の変動幅は、R
j の値を大きくすることにより大きくなり、Rj の値を
小さくすることにより小さくなる。
In equation (5), aveact is the activity a in the picture encoded immediately before.
ct j is the average value. Also, the fluctuation width control coefficient R j is
Is a value operator arbitrarily determined, given macroblock quantization index determining unit 73 an instruction data S 7 from the video encoder control computer 12. For example, when R j = 1, the quantization index mquant j does not change, that is, it is the same as the off-state of the variable quantization mechanism in the first embodiment. Further, the fluctuation range of the quantization index mquant j is R
increased by increasing the value of j, it reduced by reducing the value of R j.

【0062】次に、本実施の形態に係る画像符号化装置
において、例えば2パスエンコード方式を使用して、量
子化回路33における量子化インデックスを最適化して
入力画像信号を圧縮符号化する場合の動作について説明
する。ビデオエンコーダ71に入力された入力画像信号
1 に対する1パス目および2パス目の動作は第1の実
施の形態と同様である。2パス目では、ビデオエンコー
ダ制御用コンピュータ12は、マクロブロック量子化イ
ンデックス決定部73において、例えば変動幅制御係数
R=2としてマクロブロック単位の量子化インデックス
mquantを決定し、量子化回路33により、量子化
インデックスmquantに基づいて入力画像信号S1
を量子化し、可変長符号化回路34によって可変長符号
化して、一定のビットレートのビットストリームからな
る圧縮画像データS4 として出力する。2パス目を終了
した後、作業者はビューワ57により圧縮画像データS
4を順次復号化して、画像を見ながら、画像のタイムコ
ードに対応させて、変動幅制御係数Rの値を決定して、
ビデオエンコーダ制御用コンピュータ12内の変動量子
化機構設定ファイルに記録する。作業者は、変動幅制御
係数Rの値の設定が終了した後、3パス目を行う。この
とき、ビデオエンコーダ71の量子化インデックス決定
部42には、ビデオエンコーダ制御用コンピュータ12
からの指示データS7 によって変動幅制御係数Rが与え
られ、マクロブロック量子化インデックス決定部73
は、この変動幅制御係数Rに基づいて量子化インデック
スmquantを決定する。
Next, in the image encoding apparatus according to the present embodiment, when the input image signal is compression-encoded by optimizing the quantization index in the quantization circuit 33 using, for example, a two-pass encoding method. The operation will be described. First pass and second-pass operation with respect to the input image signal S 1 input to the video encoder 71 are the same as in the first embodiment. In the second pass, the video encoder control computer 12 determines, in the macroblock quantization index determination unit 73, a quantization index mquant for each macroblock, for example, with the variation width control coefficient R = 2. Input image signal S 1 based on quantization index mquant
The quantized, and variable length coding by the variable-length coding circuit 34, and outputs it as compressed image data S 4 consisting bitstream constant bit rate. After completing the second pass, the operator uses the viewer 57 to compress the compressed image data S
4 is sequentially decoded, and while watching the image, the value of the fluctuation width control coefficient R is determined in accordance with the time code of the image,
It is recorded in a variable quantization mechanism setting file in the video encoder control computer 12. The operator performs the third pass after the setting of the value of the variation width control coefficient R is completed. At this time, the quantization index determination unit 42 of the video encoder 71 includes the video encoder control computer 12
The variable width control coefficient R is given by the instruction data S 7 from the macro block quantization index determination unit 73.
Determines the quantization index mquant based on the variation width control coefficient R.

【0063】以上説明したように本実施の形態に係る画
像符号化装置によれば、作業者が2パスエンコードの結
果を見ながら、変動量子化機構における量子化インデッ
クスQの変動幅を設定して、その変動幅を用いて決定し
た量子化インデックスmquantで入力画像の符号化
を行うようにしたので、更に、細かい画質の調整が可能
となり、より高品質な画像を実現することができる。な
お、本実施におけるその他の構成、動作および効果は、
第1の実施の形態と同様である。
As described above, according to the image encoding apparatus according to the present embodiment, the operator sets the fluctuation width of the quantization index Q in the fluctuation quantization mechanism while watching the result of the two-pass encoding. Since the input image is encoded using the quantization index mquant determined using the fluctuation width, finer adjustment of the image quality is possible, and a higher quality image can be realized. Other configurations, operations, and effects in the present embodiment are as follows.
This is the same as in the first embodiment.

【0064】なお、本発明は、上記各実施の形態に限定
されず、例えば、上記の各実施の形態では、2パスエン
コードにより入力映像を符号化した後に、復号化して変
動量子化機構による量子化インデックスQの変動の切り
換えあるいは変動幅の切り換えを設定する場合について
説明したが、本発明は、DVDのオーサリングのように
予め符号化する入力画像が例えばビデオテープ等の記録
媒体に保存されており、作業者が入力画像の内容を知っ
ている場合には、2パスエンコードを行わずに適用する
ことができる。また、画面の複雑さを表すパラメータ
は、実施の形態で用いたアクティビィティに限らず、他
の定義方法によるものでも良い。
The present invention is not limited to the above embodiments. For example, in each of the above embodiments, an input video is encoded by two-pass encoding, and then decoded and quantized by a variable quantization mechanism. Although the description has been given of the case of setting the change of the change or the change of the change width of the coded index Q, in the present invention, an input image to be coded in advance like a DVD authoring is stored in a recording medium such as a video tape. If the operator knows the contents of the input image, the present invention can be applied without performing the two-pass encoding. The parameter representing the complexity of the screen is not limited to the activity used in the embodiment, but may be based on another definition method.

【0065】なお、本発明に係る画像符号化制御用プロ
グラムを記録したコンピュータ読み取り可能な記録媒体
は、図2に示したメモリカード18に限らず、CD(コ
ンパクトディスク)−ROM等の光ディスクやフロッピ
ィディスク等の磁気ディスク等でも良いし、EEPRO
M等のIC(集積回路)でも良い。
The computer readable recording medium on which the image encoding control program according to the present invention is recorded is not limited to the memory card 18 shown in FIG. 2, but may be an optical disk such as a CD (Compact Disk) -ROM or a floppy disk. A magnetic disk such as a disk may be used.
An IC (integrated circuit) such as M may be used.

【0066】[0066]

【発明の効果】以上説明したように、請求項1ないし3
のいずれかに記載の画像符号化装置、請求項4ないし6
のいずれかに記載の画像符号化方法、請求項7ないし9
のいずれかに記載の画像符号化制御用プログラムを記録
したコンピュータ読み取り可能な記録媒体、もしくは請
求項10または11記載の記録用データ作成装置によれ
ば、画面内におけるブロック毎の画像の複雑さに応じて
量子化特性値を変動させる動作の特性を切り換え可能と
したので、画像が複雑な部分および人間の注目する部分
の歪みを軽減することができ、人間の主観的な画質の印
象を向上させることが可能となるという効果を奏する。
As described above, claims 1 to 3 are described.
An image encoding device according to any one of claims 1 to 7,
An image encoding method according to any one of claims 7 to 9,
According to a computer-readable recording medium recording the image encoding control program according to any one of claims 1 to 10, or according to the recording data creating apparatus according to claim 10 or 11, the complexity of an image for each block in a screen is reduced. Since the characteristics of the operation of changing the quantization characteristic value can be switched in response to the above, it is possible to reduce distortion in a part where an image is complicated and a part which is noticed by a human, and improves a subjective image quality of a human. The effect that it becomes possible is produced.

【0067】また、請求項3記載の画像符号化装置、請
求項6記載の画像符号化方法または請求項9記載の画像
符号化制御用プログラムを記録したコンピュータ読み取
り可能な記録媒体によれば、量子化特性値を変動させる
際の変動幅を任意に切り換えて、入力画像データを圧縮
符号化することを可能としたので、更に、細かい画質の
調整が可能となり、更に人間の主観的な画質の印象を向
上させることが可能となるという効果を奏する。
According to a third aspect of the present invention, there is provided an image encoding apparatus, an image encoding method according to the sixth aspect, or a computer readable recording medium recording the image encoding control program according to the ninth aspect. The input image data can be compression-encoded by arbitrarily changing the variation width when changing the encoding characteristic value, so that it is possible to further finely adjust the image quality, and to further improve human subjective image quality. The effect that it becomes possible to improve it is produced.

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

【図1】本発明の第1の実施の形態に係る画像符号化装
置の構成を示すブロック図である。
FIG. 1 is a block diagram illustrating a configuration of an image encoding device according to a first embodiment of the present invention.

【図2】本発明の第1の実施の形態に係る画像符号化装
置のハードウェア構成を示すブロック図である。
FIG. 2 is a block diagram illustrating a hardware configuration of the image encoding device according to the first embodiment of the present invention.

【図3】本発明の第1の実施の形態に係る記録用データ
作成装置の概略の構成を示すブロック図である。
FIG. 3 is a block diagram showing a schematic configuration of a recording data creation device according to the first embodiment of the present invention.

【図4】本発明の第1の実施の形態に係る画像符号化装
置における変動量子化機構の動作を説明するための説明
図である。
FIG. 4 is an explanatory diagram for explaining an operation of a variable quantization mechanism in the image encoding device according to the first embodiment of the present invention.

【図5】本発明の第1の実施の形態における変形例の構
成を示すブロック図である。
FIG. 5 is a block diagram showing a configuration of a modified example in the first embodiment of the present invention.

【図6】図5に示した変形例の動作を説明するための説
明図である。
FIG. 6 is an explanatory diagram for explaining the operation of the modification shown in FIG. 5;

【図7】本発明の第2の実施の形態に係る画像符号化装
置の構成を示すブロック図である。
FIG. 7 is a block diagram illustrating a configuration of an image encoding device according to a second embodiment of the present invention.

【図8】2パスエンコードを説明するための説明図であ
る。
FIG. 8 is an explanatory diagram for describing two-pass encoding.

【図9】ビデオエンコーダの構成の一例を示すブロック
図である。
FIG. 9 is a block diagram illustrating an example of a configuration of a video encoder.

【図10】従来の問題点を説明するための説明図であ
る。
FIG. 10 is an explanatory diagram for explaining a conventional problem.

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

11…ビデオエンコーダ、12…ビデオエンコーダ制御
用コンピュータ、13…CPU、14…RAM、15…
EEPROM、16…エンコーダ主要部、17…バス、
18…メモリカード、21…画像並べ替え回路、22…
走査変換・マクロブロック化回路、31…減算回路、3
2…DCT回路、33…量子化回路、34…可変長符号
化回路、35…バッファメモリ、36…逆量子化回路、
37…逆DCT回路、38…加算回路、39…動き補償
回路、40…動き検出回路、41…アクティビィティ計
算部、42…量子化インデックス決定部、43…マクロ
ブロック量子化インデックス決定部、44…スイッチ部
11 video encoder, 12 video encoder control computer, 13 CPU, 14 RAM, 15
EEPROM, 16: main part of encoder, 17: bus,
18 memory card 21 image sorting circuit 22
Scan conversion / macroblocking circuit, 31 ... subtraction circuit, 3
2 DCT circuit, 33 quantization circuit, 34 variable length encoding circuit, 35 buffer memory, 36 inverse quantization circuit
37 inverse DCT circuit, 38 addition circuit, 39 motion compensation circuit, 40 motion detection circuit, 41 activity calculation unit, 42 quantization index determination unit, 43 macroblock quantization index determination unit, 44 Switch section

Claims (11)

【特許請求の範囲】[Claims] 【請求項1】 1枚当たりの入力画像データを複数のブ
ロックに分割し、ブロック単位で、量子化を含む符号化
によって入力画像データを圧縮符号化する符号化手段
と、 ブロック毎の画像の複雑さに応じて、前記符号化手段に
おける量子化特性値をブロック毎に変動させる量子化特
性変動手段と、 この量子化特性変動手段の動作の特性を切り換え可能な
切り換え手段とを備えたことを特徴とする画像符号化装
置。
1. An encoding means for dividing input image data per sheet into a plurality of blocks, and compressing and encoding the input image data by encoding including quantization in block units; A quantizing characteristic varying means for varying a quantizing characteristic value in the encoding means for each block, and a switching means for switching an operation characteristic of the quantizing characteristic varying means. Image encoding device.
【請求項2】 前記切り換え手段は、前記量子化特性変
動手段によって前記符号化手段における量子化特性値を
ブロック毎に変動させるか否かの切り換えを可能とする
ことを特徴とする請求項1記載の画像符号化装置。
2. The switching means according to claim 1, wherein said quantization characteristic changing means enables switching of whether or not a quantization characteristic value in said encoding means is changed for each block. Image encoding device.
【請求項3】 前記切り換え手段は、前記量子化特性変
動手段によって前記符号化手段における量子化特性値を
ブロック毎に変動させる際の変動幅の切り換えを可能と
することを特徴とする請求項1記載の画像符号化装置。
3. The switching unit according to claim 1, wherein the quantization characteristic changing unit enables switching of a variation width when the quantization characteristic value in the encoding unit is changed for each block. The image encoding device according to claim 1.
【請求項4】 1枚当たりの入力画像データを複数のブ
ロックに分割し、ブロック単位で、量子化を含む符号化
によって入力画像データを圧縮符号化する画像符号化方
法において、 ブロック毎の画像の複雑さに応じて、圧縮符号化の際の
量子化特性値をブロック毎に変動可能とすると共に、量
子化特性値をブロック毎に変動させる動作の特性を切り
換え可能としたことを特徴とする画像符号化方法。
4. An image encoding method for dividing input image data per image into a plurality of blocks, and compressing and encoding the input image data by encoding including quantization on a block basis. An image characterized in that the quantization characteristic value at the time of compression encoding can be varied for each block according to the complexity, and the characteristic of the operation of varying the quantization characteristic value for each block can be switched. Encoding method.
【請求項5】 量子化特性値をブロック毎に変動させる
動作の特性の切り換えは、量子化特性値をブロック毎に
変動させるか否かの切り換えを含むことを特徴とする請
求項4記載の画像符号化方法。
5. The image according to claim 4, wherein the switching of the characteristic of the operation for varying the quantization characteristic value for each block includes switching whether or not to vary the quantization characteristic value for each block. Encoding method.
【請求項6】 量子化特性値をブロック毎に変動させる
動作の特性の切り換えは、量子化特性値をブロック毎に
変動させる際の変動幅の切り換えを含むことを特徴とす
る請求項4記載の画像符号化方法。
6. The method according to claim 4, wherein switching of the characteristic of the operation for varying the quantization characteristic value for each block includes switching of a variation width when varying the quantization characteristic value for each block. Image coding method.
【請求項7】 1枚当たりの入力画像データを複数のブ
ロックに分割し、ブロック単位で、量子化を含む符号化
によって入力画像データを圧縮符号化する符号化手段
と、ブロック毎の画像の複雑さに応じて、前記符号化手
段における量子化特性値をブロック毎に変動させる量子
化特性変動手段とを備えた画像符号化装置に用いられ、 コンピュータに、前記量子化特性変動手段の動作の特性
を切り換え可能とする機能を実現させるための画像符号
化制御用プログラムを記録したコンピュータ読み取り可
能な記録媒体。
7. An encoding means for dividing input image data per sheet into a plurality of blocks, and compressing and encoding the input image data by encoding including quantization in units of blocks, and a complex image for each block. Quantification characteristic varying means for varying the quantization characteristic value in the encoding means for each block in accordance with the characteristic. And a computer-readable recording medium on which an image encoding control program for realizing a function capable of switching between images is recorded.
【請求項8】 前記量子化特性変動手段の動作の特性を
切り換え可能とする機能は、前記量子化特性変動手段に
よって前記符号化手段における量子化特性値をブロック
毎に変動させるか否かの切り換えを可能とする機能を含
むことを特徴とする請求項7記載の画像符号化制御用プ
ログラムを記録したコンピュータ読み取り可能な記録媒
体。
8. The function of enabling switching of the operation characteristics of the quantization characteristic varying means includes switching whether or not the quantization characteristic value in the encoding means is varied for each block by the quantization characteristic varying means. 8. A computer-readable recording medium having recorded thereon the image encoding control program according to claim 7, wherein the recording medium has a function of enabling the function.
【請求項9】 前記量子化特性変動手段の動作の特性を
切り換え可能とする機能は、前記量子化特性変動手段に
よって前記符号化手段における量子化特性値をブロック
毎に変動させる際の変動幅の切り換えを可能とする機能
を含むことを特徴とする請求項7記載の画像符号化制御
用プログラムを記録したコンピュータ読み取り可能な記
録媒体。
9. The function of enabling switching of the operation characteristics of the quantization characteristic varying means includes a function of changing the quantization characteristic value in the encoding means by the quantization characteristic varying means for each block. 8. A computer-readable recording medium storing an image encoding control program according to claim 7, including a function of enabling switching.
【請求項10】 画像データを圧縮符号化する画像符号
化装置と、この画像符号化装置を制御する制御装置と、
前記画像符号化装置によって圧縮符号化された画像デー
タと他のデータとを多重化して映像記録媒体に対する記
録用データを作成する多重化装置とを備えた記録用デー
タ作成装置において、 前記画像符号化装置は、1枚当たりの入力画像データを
複数のブロックに分割し、ブロック単位で、量子化を含
む符号化によって入力画像データを圧縮符号化する符号
化手段と、ブロック毎の画像の複雑さに応じて、前記符
号化手段における量子化特性値をブロック毎に変動させ
る量子化特性変動手段と、この量子化特性変動手段の動
作の特性を切り換え可能な切り換え手段とを有し、 前記制御装置は、前記切り換え手段による切り換え動作
の設定を行うことを特徴とする記録用データ作成装置。
10. An image encoding device for compressing and encoding image data, a control device for controlling the image encoding device,
A multiplexing device for multiplexing the image data compression-encoded by the image encoding device and other data to create recording data for a video recording medium; The apparatus divides input image data per image into a plurality of blocks, and compresses and encodes the input image data by encoding including quantization in block units. Accordingly, the control device includes: a quantization characteristic variation unit that varies a quantization characteristic value in the encoding unit for each block; and a switching unit that can switch an operation characteristic of the quantization characteristic variation unit. A recording data generating apparatus for setting a switching operation by the switching means.
【請求項11】 前記制御装置は、前記切り換え手段に
よる切り換え動作の設定を、画像データの時間軸情報に
対応させて行うことを特徴とする請求項10記載の記録
用データ作成装置。
11. The recording data creation device according to claim 10, wherein the control device sets the switching operation by the switching means in accordance with time axis information of the image data.
JP9121397A 1997-04-09 1997-04-09 Image encoding device and method, computer readable recording medium recording program for image encoding control and data preparation device for recording Pending JPH10285592A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9121397A JPH10285592A (en) 1997-04-09 1997-04-09 Image encoding device and method, computer readable recording medium recording program for image encoding control and data preparation device for recording

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9121397A JPH10285592A (en) 1997-04-09 1997-04-09 Image encoding device and method, computer readable recording medium recording program for image encoding control and data preparation device for recording

Publications (1)

Publication Number Publication Date
JPH10285592A true JPH10285592A (en) 1998-10-23

Family

ID=14020154

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9121397A Pending JPH10285592A (en) 1997-04-09 1997-04-09 Image encoding device and method, computer readable recording medium recording program for image encoding control and data preparation device for recording

Country Status (1)

Country Link
JP (1) JPH10285592A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010515344A (en) * 2006-12-28 2010-05-06 トムソン ライセンシング Method and apparatus for automatic visual artifact analysis and visual artifact reduction

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010515344A (en) * 2006-12-28 2010-05-06 トムソン ライセンシング Method and apparatus for automatic visual artifact analysis and visual artifact reduction
US9602838B2 (en) 2006-12-28 2017-03-21 Thomson Licensing Method and apparatus for automatic visual artifact analysis and artifact reduction

Similar Documents

Publication Publication Date Title
JP2000278692A (en) Compressed data processing method, processor and recording and reproducing system
JP3189861B2 (en) Video encoding apparatus and method
EP1280356A2 (en) Apparatus and method for compressing multiplexed video signals
JP4023324B2 (en) Watermark embedding and image compression unit
US5291283A (en) Decoding apparatus of a compressed digital video signal
JPH09322176A (en) Encoding mode selecting method, moving image encoding device, encoding method, recording method and transmitting method
JP3956394B2 (en) Audio / video data encoding apparatus and method
JP2003179921A (en) Coded image decoding apparatus
JP3227674B2 (en) Video encoding apparatus and method
JPH11196410A (en) Method and device for dynamic picture encoding and dynamic picture signal record medium
JP2007142809A (en) Video recording apparatus
JP3951152B2 (en) Image coding apparatus and method
JPH10271498A (en) Compression data conversion method, information quantity conversion method for image compression data, and image recorder adopting the method
JP3776735B2 (en) Image predictive decoding method, image predictive decoding device, image predictive encoding method, image predictive encoding device, and data storage medium
JPH11328937A (en) Device and method for recording signal
JPH10285592A (en) Image encoding device and method, computer readable recording medium recording program for image encoding control and data preparation device for recording
JPH10108197A (en) Image coder, image coding control method, and medium storing image coding control program
JPH08149413A (en) Variable bit rate encoder, recorder and recording medium
JPH06268997A (en) Moving image compression device
JP3307367B2 (en) Variable transfer rate coding device
JP3660514B2 (en) Variable rate video encoding method and video editing system
JPH06339111A (en) Compressed moving picture reproduction device
JP3922581B2 (en) Variable transfer rate encoding method and apparatus
JP3427505B2 (en) Image coding method and editing device
JPH114444A (en) Image coder and its method