JP2009005417A - Signal encoding method, signal encoding apparatus and signal recording medium - Google Patents

Signal encoding method, signal encoding apparatus and signal recording medium Download PDF

Info

Publication number
JP2009005417A
JP2009005417A JP2008260100A JP2008260100A JP2009005417A JP 2009005417 A JP2009005417 A JP 2009005417A JP 2008260100 A JP2008260100 A JP 2008260100A JP 2008260100 A JP2008260100 A JP 2008260100A JP 2009005417 A JP2009005417 A JP 2009005417A
Authority
JP
Japan
Prior art keywords
encoding
image
predetermined time
signal
circuit
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.)
Granted
Application number
JP2008260100A
Other languages
Japanese (ja)
Other versions
JP4636159B2 (en
JP2009005417A5 (en
Inventor
Motoki Kato
元樹 加藤
Takashi Kojima
尚 小嶋
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 JP2008260100A priority Critical patent/JP4636159B2/en
Publication of JP2009005417A publication Critical patent/JP2009005417A/en
Publication of JP2009005417A5 publication Critical patent/JP2009005417A5/ja
Application granted granted Critical
Publication of JP4636159B2 publication Critical patent/JP4636159B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To perform encoding, approximately in real time, at the optimal encoding rate according to complexity of an image in response to input of video signals, and further to perform encoding in such a manner as to reflect characteristics of the visual sense of the human being. <P>SOLUTION: An image analysis circuit 60 determines information on picture characteristics such as luminance of an image of an input video signal, chromaticity, flatness, a moving amount of a moving image, a differential between images and the like and sends it to an encoding control circuit 30. The encoding control circuit 30 relates encoding difficulty obtained based on the information on picture characteristics form the image analysis circuit 60 and an encoding bit rate based on a predetermined relational expression or based on a predetermined table and sends a resultant encoding bit rate to an encoder circuit 40. The encoder circuit 40 encodes the input video signal in accordance with the encoding bit rate obtained for every pre-set time interval to produce encoded data. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、信号符号化方法、信号符号化装置及び信号記録媒体に関し、特に、光ディスク、磁気ディスク、磁気テープ等の記録媒体に動画の映像信号等を蓄積用符号化して記録するシステムや、伝送路を介して動画の映像信号等を伝送するシステム等において使用される信号符号化方法、信号符号化装置及び信号記録媒体に関するものである。   The present invention relates to a signal encoding method, a signal encoding apparatus, and a signal recording medium, and in particular, a system for encoding and recording a moving image video signal on a recording medium such as an optical disk, a magnetic disk, and a magnetic tape, and transmission The present invention relates to a signal encoding method, a signal encoding device, and a signal recording medium used in a system or the like that transmits a video signal of a moving image through a channel.

従来、例えばテレビ会議システム、テレビ電話システム等のように動画の映像信号を遠隔地に伝送するシステムや、動画の映像信号を光ディスク、磁気ディスク、磁気テープ等の画像記録媒体に記録し、また記録された動画の映像信号を再生するシステム等において、伝送路(あるいは画像記録媒体)を効率良く利用するために、映像信号の有するライン相関やフレーム相関を利用して映像信号を所謂高能率符号化し、空間軸方向と時間軸方向の冗長度を落として有意情報のみを伝送し、伝送効率を高めるようになされている。   Conventionally, for example, a video transmission system such as a video conferencing system or a videophone system transmits a video signal to a remote location, and a video signal is recorded on an image recording medium such as an optical disk, a magnetic disk, or a magnetic tape. In a system for reproducing a video signal of a moving image, etc., in order to efficiently use a transmission path (or image recording medium), so-called high-efficiency encoding is performed on the video signal using line correlation or frame correlation of the video signal. The system reduces the redundancy in the space axis direction and the time axis direction and transmits only significant information to increase transmission efficiency.

例えば空間軸方向の符号化処理(以下フレーム内符号化処理という)では、映像信号の例えばライン相関を利用するもので、図19のAに示す時刻t 、t 、t 、・・・において動画を構成する各画像PC1、PC2、PC3・・・を伝送しようとする場合、伝送処理すべき画像データを、例えば同一走査線内で1次元符号化したり、例えば画像を複数のブロックに分割し、各ブロックの画像データを2次元符号化することにより、データ圧縮を行い、伝送効率を向上させている。 For example, in the encoding process in the spatial axis direction (hereinafter referred to as intra-frame encoding process), for example, line correlation of the video signal is used, and the times t 1 , t 2 , t 3 ,... Shown in FIG. When transmitting each image PC1, PC2, PC3... Constituting the moving image in FIG. 1, the image data to be transmitted is encoded one-dimensionally within the same scanning line, for example, or the image is divided into a plurality of blocks. Then, the image data of each block is two-dimensionally encoded to perform data compression and improve transmission efficiency.

また、時間軸方向の符号化処理(以下フレーム間符号化処理という)では、映像信号のフレーム間相関を利用して例えば所謂予測符号化により、すなわち図19のBに示すように、順次隣合う画像PC1及びPC2、PC2及びPC3・・・間の対応する画素毎の画像データの差分(所謂予測誤差)でなる画像データPC12、PC23・・・を求め、これらの画像データPC12、PC23・・・を伝送することにより、データ圧縮を行い、伝送効率を向上させている。   Further, in the encoding process in the time axis direction (hereinafter referred to as inter-frame encoding process), for example, by so-called predictive encoding using the inter-frame correlation of the video signal, that is, as shown in FIG. Image data PC12, PC23..., Which are image data differences (so-called prediction errors) for the corresponding pixels between the images PC1 and PC2, PC2 and PC3..., Are obtained, and these image data PC12, PC23. By transmitting the data, data compression is performed and transmission efficiency is improved.

かくして、画像PC1、PC2、PC3・・・の全ての画像データを伝送する場合と比較して、格段に少ないデータ量で映像信号を伝送することができる。   Thus, it is possible to transmit a video signal with a remarkably small amount of data compared to the case of transmitting all image data of the images PC1, PC2, PC3.

また、上述のフレーム間符号化処理における予測符号化では、さらに効率を高めるために、例えばマクロブロック単位で動き補償予測が用いられる。すなわち、例えば画面中央の人物が移動する場合等、画面中の動いている物体に対してその動きを検出し、その動き分だけ前の画像中で予測に用いる画像データの位置を補正して予測符号化を行うことにより、符号化効率を向上させることができる。しかし、これでもまだ、物体が移動して後ろから出現した部分に対しては、多くのデータを送らなけらばならない。そこで、動き補償予測を上述の前方だけではなく、後方あるいは両者を組み合わせて行うことにより、さらに符号化効率を高めることができる。   Further, in the predictive coding in the above-described interframe coding processing, motion compensation prediction is used, for example, in units of macroblocks in order to further increase the efficiency. That is, for example, when a person in the center of the screen moves, the movement of the moving object in the screen is detected, and the position of the image data used for prediction is corrected in the previous image by the amount of the movement. Encoding efficiency can be improved by performing encoding. However, a lot of data still needs to be sent to the part where the object has moved and appeared from behind. Therefore, encoding efficiency can be further improved by performing motion compensation prediction not only in the above-described direction but also in the backward direction or a combination of both.

具体的には、図20のAに示すように、伝送しようとする動画の映像信号VDの第0、第1、第2、第3・・・番目のフレームのフレームデータF0、F1、F2、F3・・・のマクロブロックにおいて、順次フレーム間に動きベクトルX0、X1、X2、X3・・・でそれぞれ表わされるような画像の変化があった場合、送信側の装置は、所定フレーム数(例えば1フレーム)置きの、すなわち第2、第4・・・番目のフレームを補間フレームに指定し、これらの補間フレームに対して、図20のBに示すように、所定の補間フレーム処理により伝送補間フレームデータF2X、F4X・・・を生成する。また、残りの非補間フレームに対して、フレームデータF1、F3・・・に所定の符号化処理を施して、伝送非補間フレームデータF1X、F3X・・・を生成する。   Specifically, as shown in A of FIG. 20, the frame data F0, F1, F2, and the 0th, 1st, 2nd, 3rd,..., Frame data of the video signal VD of the moving image to be transmitted. In the macro block of F3..., When there is a change in the image represented by the motion vectors X0, X1, X2, X3. Every second frame), that is, the second, fourth,... Frames are designated as interpolation frames, and transmission interpolation is performed with respect to these interpolation frames by predetermined interpolation frame processing as shown in FIG. Frame data F2X, F4X,... Are generated. Further, the frame data F1, F3,... Are subjected to a predetermined encoding process for the remaining non-interpolated frames to generate transmission non-interpolated frame data F1X, F3X,.

例えば、動き補償されたフレームデータF3とフレームデータF2の差分SP2(予測誤差)、動き補償されたフレームデータF1とフレームデータF2の差分SP3、動き補償されたフレームデータF1、F3を補間処理して得られるフレームデータとフレームデータF2の差分SP4をマクロブロック単位でそれぞれ求め、フレームデータF2のマクロブロックSP1とこれらの差分の比較を行う。そして、これらのデータSP1〜SP4のうちでデータ発生量が最小のデータをマクロブロック単位で伝送補間データF2Xとし、以下同様して各補間フレームに対する伝送補間データF4X・・・を生成する。また、非補間フレームのフレームデータF1、F3・・・にそれぞれ、例えばDCT変換処理、可変長符号化処理等を施して伝送非補間フレームデータF1X、F3X・・・を生成する。   For example, the difference SP2 (prediction error) between the frame data F3 and the frame data F2 subjected to motion compensation, the difference SP3 between the frame data F1 and the frame data F2 subjected to motion compensation, and the frame data F1 and F3 subjected to the motion compensation are interpolated. The difference SP4 between the obtained frame data and the frame data F2 is obtained for each macroblock, and the difference between the macroblock SP1 of the frame data F2 and these differences is compared. Then, among these data SP1 to SP4, data with the smallest data generation amount is set as transmission interpolation data F2X in units of macroblocks, and transmission interpolation data F4X... For each interpolation frame is generated in the same manner. Further, the non-interpolated frame data F1, F3,... Are subjected to, for example, DCT conversion processing, variable length coding processing, and the like to generate transmission non-interpolated frame data F1X, F3X,.

そして、これらの伝送非補間フレームデータF1X、F3X・・・及び伝送補間データF2X、F4X・・・を、動きベクトルX0, X1, X3・・・のデータと共に、伝送データDATAとして受信側の装置に伝送する。   These transmission non-interpolated frame data F1X, F3X,... And transmission interpolation data F2X, F4X,..., Together with the motion vectors X0, X1, X3. To transmit.

一方、受信側の装置は、送られてくる伝送データDATA(伝送非補間フレームデータF1X、F3X・・・、伝送補間データF2X、F4X・・・、動きベクトルX0, X1, X3・・・のデータ)に、送信側の符号化処理に対応した復号化処理を施して、フレームデータF0、F1、F2、F3・・・を再生する。この結果、動き補償予測を前方だけではなく、後方あるいは両者を組み合わせて行うことにより、さらに符号化効率を高めることができる。   On the other hand, the receiving-side apparatus sends transmission data DATA (transmission non-interpolated frame data F1X, F3X..., Transmission interpolation data F2X, F4X..., Motion vectors X0, X1, X3. ) Is subjected to a decoding process corresponding to the encoding process on the transmission side to reproduce the frame data F0, F1, F2, F3. As a result, encoding efficiency can be further improved by performing motion compensation prediction not only in the forward direction but also in the backward direction or a combination of both.

ここで、上述の機能を有する画像符号化装置と画像復号化装置について、図21を参照しながら説明する。   Here, an image encoding device and an image decoding device having the above-described functions will be described with reference to FIG.

この図21に示す画像符号化装置70は、入力映像信号VDを輝度信号と色差信号に分離する前処理回路71と、該前処理回路71からの輝度信号、色差信号をそれぞれディジタル信号に変換するアナログ/ディジタル(以下A/Dという)変換回路72a、72bと、該A/D変換回路72a、72bからの輝度データ、色差データ(以下これらを画像データという)を記憶するフレームメモリ群73と、フレームメモリ群73から画像データをブロックフォーマットに従って読み出すフォーマット変換回路74と、フォーマット変換回路74からのブロックの画像データを高能率符号化するエンコーダ75とを備える。   The image encoding apparatus 70 shown in FIG. 21 converts a preprocessing circuit 71 that separates an input video signal VD into a luminance signal and a color difference signal, and converts the luminance signal and the color difference signal from the preprocessing circuit 71 into digital signals, respectively. Analog / digital (hereinafter referred to as A / D) conversion circuits 72a and 72b; a frame memory group 73 for storing luminance data and color difference data (hereinafter referred to as image data) from the A / D conversion circuits 72a and 72b; A format conversion circuit 74 that reads image data from the frame memory group 73 according to a block format, and an encoder 75 that performs high-efficiency encoding on the block image data from the format conversion circuit 74 are provided.

そして、前処理回路71は、入力映像信号VDを輝度信号と色差信号に分離し、A/D変換回路72a、72bは、輝度信号、色差信号をそれぞれ8ビツトからなる輝度データ、色差データに変換し、フレームメモリ群73は、これらの輝度データ、色差データを記憶する。   The preprocessing circuit 71 separates the input video signal VD into a luminance signal and a color difference signal, and the A / D conversion circuits 72a and 72b convert the luminance signal and the color difference signal into luminance data and color difference data each consisting of 8 bits. The frame memory group 73 stores these luminance data and color difference data.

フォーマット変換回路74は、フレームメモリ群73に記憶されている画像データ(輝度データ、色差データ)を、ブロックフォーマットに従って読み出し、エンコーダ75は、この読みだされた画像データを所定の高能率符号化により符号化して、ビットストリームを出力する。   The format conversion circuit 74 reads image data (luminance data, color difference data) stored in the frame memory group 73 in accordance with the block format, and the encoder 75 reads the read image data by predetermined high-efficiency encoding. Encode and output a bitstream.

そして、このビットストリームは、伝送路や、光ディスク、磁気ディスク、磁気テープ等の画像記録媒体からなる伝送メディア90を介して、画像復号化装置80に供給される。   The bit stream is supplied to the image decoding apparatus 80 via a transmission path 90 and a transmission medium 90 including an image recording medium such as an optical disk, a magnetic disk, and a magnetic tape.

この画像復号化装置80は、上述の図21に示すように、上記エンコーダ75に対応したデコーダ81と、該デコーダ81で再生された画像データを、フレームフォーマットに変換するフォーマット変換回路82と、該フォーマット変換回路82からの画像データを記憶するフレームメモリ群83と、該フレームメモリ群83から読み出された輝度データ、色差データをアナログ信号に変換するD/A変換回路84a、84bと、該D/A変換回路84a、84bからの輝度信号、色差信号を混合して出力映像信号を生成する後処理回路85とを備える。   As shown in FIG. 21, the image decoding apparatus 80 includes a decoder 81 corresponding to the encoder 75, a format conversion circuit 82 for converting image data reproduced by the decoder 81 into a frame format, A frame memory group 83 for storing image data from the format conversion circuit 82; D / A conversion circuits 84a and 84b for converting luminance data and color difference data read from the frame memory group 83 into analog signals; And a post-processing circuit 85 that generates an output video signal by mixing luminance signals and color difference signals from the / A conversion circuits 84a and 84b.

そして、デコーダ81は、エンコーダ75の高能率符号化に対応した復号化によりビットストリームを復号化して、ブロックフォーマットの画像データを再生し、フォーマット変換回路82は、この画像データをフレームフォーマットに変換してフレームメモリ群83に記憶する。   The decoder 81 decodes the bit stream by decoding corresponding to the high-efficiency encoding of the encoder 75 and reproduces the image data in the block format, and the format conversion circuit 82 converts the image data into the frame format. And stored in the frame memory group 83.

D/A変換回路84a、84bは、フレームメモリ群83から読み出された輝度データ、色差データをそれぞれ輝度信号、色差信号に変換し、後処理回路81は、これらの輝度信号、色差信号を混合して出力映像信号を生成する。   The D / A conversion circuits 84a and 84b convert the luminance data and color difference data read from the frame memory group 83 into luminance signals and color difference signals, respectively. The post-processing circuit 81 mixes these luminance signals and color difference signals. Thus, an output video signal is generated.

具体的には、前処理回路71及びA/D変換回路72a、72bは、上述したように輝度信号及び色差信号をディジタル信号に変換すると共に、色差信号に対しては上下左右方向に画素数が輝度信号の1/2となるようにデータ量を削減した後、時間軸多重化し、得られる輝度データと色差データをフレームメモリ群73に供給する。   Specifically, the pre-processing circuit 71 and the A / D conversion circuits 72a and 72b convert the luminance signal and the color difference signal into digital signals as described above, and the number of pixels in the vertical and horizontal directions with respect to the color difference signal. After reducing the data amount so as to be ½ of the luminance signal, time axis multiplexing is performed, and the obtained luminance data and color difference data are supplied to the frame memory group 73.

そして、フレームメモリ群73からは、上述したようにブロックフォーマットに従って輝度データと色差データが読み出される。すなわち、例えば1フレーム分の画像データは、図22のAに示すように、N個のスライスに分割され、各スライスが、図22のBに示すように、M個のマクロブロックを含むようになされ、各マクロブロックは、図22のCに示すように、8×8画素からなるブロック単位であって上下左右に隣接する4つの輝度ブロックの輝度データY[1] 、Y[2] 、Y[3] 、Y[4] と、これらの4つの輝度ブロックに対応する範囲の8×8画素からなる色差ブロックの色差データCb[5]、Cr[6]とを含んでなる。そして、フレームメモリ群73からは、スライスではマクロブロツク単位で画像データが連続し、マクロブロツク内ではY[1],Y[2],Y[3],Y[4],Cb[5],Cr[6] の順に連続するように輝度データと色差データが読み出される。このようにしてブロックフォーマットに従って読み出された画像データは、エンコーダ75に供給される。   Then, as described above, the luminance data and the color difference data are read from the frame memory group 73 according to the block format. That is, for example, image data for one frame is divided into N slices as shown in FIG. 22A, and each slice includes M macroblocks as shown in B of FIG. Each macroblock is made up of luminance data Y [1], Y [2], Y of four luminance blocks adjacent to each other vertically and horizontally, as shown in C of FIG. [3], Y [4] and color difference data Cb [5], Cr [6] of a color difference block composed of 8 × 8 pixels in a range corresponding to these four luminance blocks. From the frame memory group 73, image data continues in units of macroblocks in the slice, and Y [1], Y [2], Y [3], Y [4], Cb [5], in the macroblock. Luminance data and color difference data are read out so as to be continuous in the order of Cr [6]. The image data read according to the block format in this way is supplied to the encoder 75.

エンコーダ75は、図23に示すように、動きベクトル検出回路101を備え、この動きベクトル検出回路101は、ブロックフォーマットで供給される画像データの動きベクトルをマクロブロック単位で検出する。すなわち、動きベクトル検出回路101は、フレームメモリ群102に記憶された前方原画像及び/又は後方原画像を用いて、現在の参照画像の動きベクトルをマクロブロック単位で検出する。ここで、動きベクトルの検出は、マクロブロック単位でのフレーム間差分の絶対値和が最小になるものを、その動きベクトルとする。そして、検出された動きベクトルは動き補償回路113等に供給され、マクロブロック単位でのフレーム間差分の絶対値和はフレーム内/前方/後方/両方向予測判定回路103に供給される。   As shown in FIG. 23, the encoder 75 includes a motion vector detection circuit 101. The motion vector detection circuit 101 detects a motion vector of image data supplied in a block format in units of macroblocks. That is, the motion vector detection circuit 101 detects the motion vector of the current reference image in units of macroblocks using the front original image and / or the rear original image stored in the frame memory group 102. Here, in the detection of the motion vector, the motion vector is determined so that the absolute value sum of the inter-frame difference in the macro block unit is minimized. The detected motion vector is supplied to the motion compensation circuit 113 and the like, and the sum of absolute values of inter-frame differences in units of macroblocks is supplied to the intraframe / forward / backward / bidirectional prediction determination circuit 103.

このフレーム内/前方/後方/両方向予測判定回路103は、この値をもとに、参照ブロックの予測モードを決定し、決定した予測モードに基づいて、マクロブロック単位でフレーム内/前方/後方/両方向予測の切り換えを行うように予測符号化回路104を制御する。そして、予測符号化回路104は、加算回路104a、104b、104c及び切換スイッチ104dを備え、フレーム内符号化モードのときは入力画像データそのものを、前方/後方/両方向予測モードのときはそれぞれの予測画像に対する入力画像データの画素毎の差分(以下差分データという)を選択し、選択したデータをDCT回路105に供給する。   Based on this value, the intra-frame / forward / backward / bidirectional prediction determination circuit 103 determines the prediction mode of the reference block, and based on the determined prediction mode, the intra-frame / front / backward / backward / The predictive coding circuit 104 is controlled so as to switch bidirectional prediction. The predictive coding circuit 104 includes adder circuits 104a, 104b, and 104c and a changeover switch 104d. The predictive encoding circuit 104 predicts the input image data itself in the intra-frame encoding mode and the predictive encoding circuit in the forward / backward / bidirectional prediction mode. A difference for each pixel of input image data with respect to an image (hereinafter referred to as difference data) is selected, and the selected data is supplied to the DCT circuit 105.

DCT回路105は、映像信号の2次元相関を利用して、入力画像データ又は差分データをブロツク単位でDCT変換し、得られる係数データを量子化回路106に供給する。   The DCT circuit 105 performs DCT conversion of input image data or difference data in units of blocks using the two-dimensional correlation of the video signal, and supplies the obtained coefficient data to the quantization circuit 106.

量子化回路106は、マクロブロック又はスライス毎に定まる量子化ステップサイズ(量子化スケール)を用いて係数データを量子化し、得られる量子化データを可変長符号化(VLC:Variable Length Code)回路107及び逆量子化回路108に供給する。ところで、この量子化に用いる量子化ステップサイズは、後述する送信バッファメモリ109のバッファ残量をフィードバックすることによって、送信バッファメモリ109が破綻しない値に決定され、この量子化ステップサイズも、可変長符号化回路107及び逆量子化回路108に供給される。   The quantization circuit 106 quantizes the coefficient data using a quantization step size (quantization scale) determined for each macroblock or slice, and the obtained quantization data is a variable length coding (VLC) circuit 107. And supplied to the inverse quantization circuit 108. By the way, the quantization step size used for the quantization is determined to a value that does not cause the transmission buffer memory 109 to fail by feeding back the remaining buffer capacity of the transmission buffer memory 109, which will be described later. This quantization step size is also a variable length. This is supplied to the encoding circuit 107 and the inverse quantization circuit 108.

可変長符号化回路107は、量子化データを、量子化ステップサイズ、予測モード、動きベクトルと共に可変長符号化し、伝送データとして送信バッファメモリ109に供給する。   The variable length coding circuit 107 performs variable length coding of the quantized data together with the quantization step size, the prediction mode, and the motion vector, and supplies the data to the transmission buffer memory 109 as transmission data.

送信バッファメモリ109は、伝送データを一旦記憶した後、一定のビットレートで読み出すことにより、伝送データを平滑化してビットストリームとして出力すると共に、メモリに残留している残留データ量に応じてマクロブロック単位の量子化制御信号を量子化回路106にフィードバックして量子化ステップサイズを制御する。これにより送信バッファメモリ109は、ビットストリームとして発生されるデータ量を調整し、メモリ内に適正な残量(オーバーフロー又はアンダーフローを生じさせないようなデータ量)のデータを維持する。例えば、送信バッファメモリ109のデータ残量が許容上限にまで増量すると、送信バッファメモリ109は、量子化制御信号によつて量子化回路106の量子化ステップサイズを大きくすることにより、量子化データのデータ量を低下させる。一方、送信バッファメモリ109のデータ残量が許容下限まで減量すると、送信バッファメモリ109は、量子化制御信号によつて量子化回路106の量子化ステップサイズを小さくすることにより、量子化データのデータ量を増大させる。   The transmission buffer memory 109 temporarily stores the transmission data, and then reads out the transmission data at a constant bit rate, thereby smoothing the transmission data and outputting it as a bit stream, and also according to the amount of residual data remaining in the memory. The unit quantization control signal is fed back to the quantization circuit 106 to control the quantization step size. As a result, the transmission buffer memory 109 adjusts the amount of data generated as a bit stream, and maintains an appropriate remaining amount of data (data amount that does not cause overflow or underflow) in the memory. For example, when the remaining amount of data in the transmission buffer memory 109 increases to an allowable upper limit, the transmission buffer memory 109 increases the quantization step size of the quantization circuit 106 with the quantization control signal, thereby Reduce the amount of data. On the other hand, when the remaining amount of data in the transmission buffer memory 109 is reduced to the allowable lower limit, the transmission buffer memory 109 reduces the quantization step size of the quantization circuit 106 by using the quantization control signal, so that the quantized data data is reduced. Increase the amount.

このようにして、バッファメモリ109から出力されるビットストリームは一定のビットレートで、上述したように伝送路や、光ディスク、磁気ディスク、磁気テープ等の画像記録媒体からなる伝送メディア90を介して、画像復号化装置80に供給される。   In this way, the bit stream output from the buffer memory 109 has a constant bit rate and, as described above, via the transmission path and the transmission medium 90 composed of an image recording medium such as an optical disk, a magnetic disk, or a magnetic tape, This is supplied to the image decoding device 80.

一方、逆量子化回路108は、量子化回路106から供給される量子化データを逆量子化して、上述のDCT回路105の出力に対応する係数データ(量子化歪みが加算されている)を再生し、この係数データを逆離散余弦変換(以下IDCT:Inverse Discrete Cosine Trasformという)回路110に供給する。   On the other hand, the inverse quantization circuit 108 inversely quantizes the quantized data supplied from the quantization circuit 106, and reproduces coefficient data (quantization distortion added) corresponding to the output of the DCT circuit 105 described above. The coefficient data is supplied to an inverse discrete cosine transform (IDCT: Inverse Discrete Cosine Trasform) circuit 110.

IDCT回路110は、係数データをIDCT変換して、フレーム内符号化モードでは入力画像データに対応する画像データを再生し、前方/後方/両方向予測モードでは予測符号化回路104の出力に対応する差分データを再生して、加算回路111に供給する。   The IDCT circuit 110 performs IDCT conversion on the coefficient data and reproduces image data corresponding to the input image data in the intra-frame coding mode, and a difference corresponding to the output of the prediction coding circuit 104 in the forward / backward / bidirectional prediction mode. Data is reproduced and supplied to the adder circuit 111.

この加算回路111には、前方/後方/両方向予測モードのとき、後述する動き補償回路113から動き補償された予測画像データが供給されており、この動き補償された予測画像データと差分データを加算することにより、入力画像データに対応する画像データを再生する。   In the forward / backward / bidirectional prediction mode, the adder circuit 111 is supplied with motion compensated predicted image data from a motion compensation circuit 113 described later, and adds the motion compensated predicted image data and difference data. As a result, the image data corresponding to the input image data is reproduced.

そして、このようにして再生された画像データは、フレームメモリ112に記憶される。すなわち、逆量子化回路108〜加算回路111は、局所復号化回路を構成し、予測モードに基づいて、量子化回路106から出力される量子化データを局所復号化し、得られる復号画像を前方予測画像もしくは後方予測画像としてフレームメモリ112に書き込む。フレームメモリ112は、複数のフレームメモリからなり、フレームメモリのバンク切り換えが行われ、符号化する画像に応じて、単一のフレームが、前方予測画像データとして出力されたり、後方予測画像データとして出力される。また、両方向予測の場合は、前方予測画像データと後方予測画像データが例えば平均化されて出力される。これらの予測画像データは、後述するデコーダ81で再生される画像と全く同一の画像であり、次の処理画像はこの予測画像をもとに前方/後方/両方向予測符号化が行われる。   The image data reproduced in this way is stored in the frame memory 112. That is, the inverse quantization circuit 108 to the addition circuit 111 constitute a local decoding circuit, and based on the prediction mode, the quantized data output from the quantization circuit 106 is locally decoded, and the obtained decoded image is subjected to forward prediction. An image or a backward predicted image is written in the frame memory 112. The frame memory 112 is composed of a plurality of frame memories, the bank of the frame memory is switched, and a single frame is output as forward prediction image data or output as backward prediction image data depending on the image to be encoded. Is done. Further, in the case of bi-directional prediction, the forward prediction image data and the backward prediction image data are averaged and output, for example. These predicted image data are exactly the same as the images reproduced by the decoder 81, which will be described later, and the next processed image is subjected to forward / rearward / bidirectional predictive coding based on the predicted image.

すなわち、フレームメモリ112から読み出された画像データは動き補償回路113に供給され、この動き補償回路113は、動きベクトルに基づいて、予測画像データに動き補償を施し、動き補償された予測画像データを予測符号化回路104及び加算回路111に供給する。
次に、デコーダ81について図24を参照しながら説明する。
That is, the image data read from the frame memory 112 is supplied to the motion compensation circuit 113. The motion compensation circuit 113 performs motion compensation on the predicted image data based on the motion vector, and the motion compensated predicted image data. Is supplied to the prediction encoding circuit 104 and the addition circuit 111.
Next, the decoder 81 will be described with reference to FIG.

この図24に示すデコーダ81には、上記図21の伝送メディア90を介してビットストリームが入力される。このビットストリームは、受信バッファ201を介して可変長復号化(IVLC)回路202に入力される。可変長復号化回路202は、ビットストリームから量子化データ、動きベクトル、予測モード、量子化ステップサイズ等を再生する。これらの量子化データと量子化ステップサイズは逆量子化回路203に供給され、動きベクトルは動き補償回路207に供給され、予測モードは加算回路205に供給される。   The bit stream is input to the decoder 81 shown in FIG. 24 via the transmission medium 90 shown in FIG. This bit stream is input to the variable length decoding (IVLC) circuit 202 via the reception buffer 201. The variable length decoding circuit 202 reproduces quantized data, a motion vector, a prediction mode, a quantization step size, and the like from the bit stream. The quantized data and the quantization step size are supplied to the inverse quantization circuit 203, the motion vector is supplied to the motion compensation circuit 207, and the prediction mode is supplied to the addition circuit 205.

逆量子化回路203〜加算回路205の動作は、上記図23に示すエンコーダ75の局所復号化回路と同様であり、フレームメモリ群206、動き補償回路207の動作はそれぞれエンコーダ75のフレームメモリ112、動き補償回路113と同じであり、量子化データ、動きベクトル、予測モード、量子化ステップサイズをもとに復号化が行われる。この結果、加算回路205から再生画像データが出力され、この再生画像データは、上記図21のフォーマット変換回路82に送られる。   The operations of the inverse quantization circuit 203 to the addition circuit 205 are the same as those of the local decoding circuit of the encoder 75 shown in FIG. 23, and the operations of the frame memory group 206 and the motion compensation circuit 207 are the frame memory 112 of the encoder 75, respectively. Similar to the motion compensation circuit 113, decoding is performed based on the quantized data, the motion vector, the prediction mode, and the quantization step size. As a result, reproduced image data is output from the adder circuit 205, and this reproduced image data is sent to the format conversion circuit 82 in FIG.

従来技術として、特許文献1、2が知られている。   Patent documents 1 and 2 are known as prior art.

特開平6−334968号公報JP-A-6-334968 国際公開第94/24822号公報International Publication No. 94/24822

以上のように、従来の装置では、エンコーダ75で発生するビットストリームの符号化ビットレートは伝送メディア90の転送レートにあわせて一定とされ、この制限のもとでデータ発生量、すなわちエンコーダ75における量子化回路106の量子化ステップサイズが制御されていた。換言すると、例えば絵柄が複雑な画像が連続するときは、量子化ステップサイズを大きくしてデータ発生量を抑圧し、逆に単純な絵柄が連続するときは、量子化ステップサイズを小さくしてデータ発生量を増加させることにより、バッファメモリ109のオーバーフロー又はアンダーフローを生じさせないようにして固定レートを保持するようになっていた。   As described above, in the conventional apparatus, the encoding bit rate of the bit stream generated by the encoder 75 is constant according to the transfer rate of the transmission medium 90, and the data generation amount, that is, the encoder 75 The quantization step size of the quantization circuit 106 was controlled. In other words, for example, when images with complicated patterns continue, the quantization step size is increased to suppress the amount of data generated, and conversely, when simple patterns continue, the quantization step size is decreased to reduce the data generation amount. By increasing the generation amount, a fixed rate is maintained without causing an overflow or underflow of the buffer memory 109.

したがって、従来の装置では複雑な画像が連続するときは、量子化ステップサイズが大きくされ、画質が劣化し、単純な画像が連続するときは、量子化ステップサイズが小さくされ、全体を通じて均等な画質を得ることができなかった。   Therefore, in the conventional apparatus, when complex images are continuous, the quantization step size is increased and the image quality is deteriorated. When simple images are continuous, the quantization step size is decreased and the image quality is uniform throughout. Could not get.

また、ビットストリームをデータ容量が限られている画像記録媒体に記録する場合、絵柄が複雑な画像に対する極端な画質劣化を避けるためには、この複雑な画像の画質を損なわないような高いレートの固定レートを全体に対して適用しなければならず、記録時間を減少させる結果となっていた。   Also, when recording a bitstream on an image recording medium with a limited data capacity, a high rate that does not impair the image quality of the complex image in order to avoid extreme image quality degradation for images with complex patterns. A fixed rate had to be applied to the whole, resulting in a reduction in recording time.

さらに、単に画像の複雑さが同じ場合でも、絵柄によって符号化画質の主観的印象が悪い場合がある。これは、人間の視覚特性によるものであり、例えば画像の暗い部分や、赤い部分や、平坦な部分で、符号化ノイズ、例えばブロックノイズやモスキートノイズ等が目立つ、という問題がある。   Furthermore, even if the complexity of the images is the same, the subjective impression of the encoded image quality may be poor depending on the design. This is due to human visual characteristics. For example, there is a problem that coding noise such as block noise and mosquito noise is conspicuous in a dark portion, a red portion, and a flat portion of an image.

ここで、入力信号の実際の符号化に先立って、同じ入力信号を符号化することにより所定時間当たりの割当符号量を求め、記録媒体等により定まる使用可能なデータ総量を越えない範囲で所定時間毎の符号化ビットレートを計算して、実際の符号化を行うことが提案されている。これは、いわゆる2パスの符号化方法であり、入力信号の1シーケンス、例えば1本の映画を全て符号化して符号化ビットレートを計算するため、実際の符号化を開始するまでに1シーケンス以上の時間がかかり、最終的な伝送用あるいは記録用の符号化データのビットストリームを生成するためには2シーケンス以上の時間がかかるという問題がある。   Here, prior to the actual encoding of the input signal, the allocated code amount per predetermined time is obtained by encoding the same input signal, and the predetermined time is within a range not exceeding the total usable data determined by the recording medium or the like. It has been proposed to perform the actual encoding by calculating the encoding bit rate for each. This is a so-called two-pass encoding method, in which one sequence of input signals, for example, one movie is encoded to calculate the encoding bit rate, so that one sequence or more is required before actual encoding is started. There is a problem that it takes more than two sequences to generate a bit stream of encoded data for final transmission or recording.

また、以上は動画の映像信号を取り扱う場合であったが、入力信号がオーディオ信号の場合や、字幕データあるいはキャラクタデータ等の信号の場合にも同様の問題がある。   Further, the above is a case of handling a video signal of a moving image, but there is a similar problem when an input signal is an audio signal or a signal such as caption data or character data.

本発明は、このような実情に鑑みてなされたものであり、全体を通じて均等で良好な品質の符号化データを得ることができ、長時間記録を可能にし、入力信号をほぼリアルタイムで符号化できるような信号符号化方法、信号符号化装置及び信号記録媒体を提供することを目的とする。さらに、入力信号が映像信号の場合に、人間の視覚特性を反映して符号化ノイズを目立たせないように符号化することを可能とすることを目的とする。   The present invention has been made in view of such circumstances, and can obtain encoded data with uniform and good quality throughout, enabling long-time recording and encoding an input signal almost in real time. An object of the present invention is to provide a signal encoding method, a signal encoding device, and a signal recording medium. It is another object of the present invention to enable encoding so that encoding noise is not conspicuous reflecting human visual characteristics when the input signal is a video signal.

本発明によれば、入力信号が属する種類の一般の入力信号により予め標準化された所定時間毎の符号化難易度と割当符号量とを関係付け、入力信号の所定時間毎の符号化難易度を求め、この入力信号の所定時間毎の符号化難易度に対して上記関係付けられた上記所定時間毎の割当符号量を求め、この割当符号量に基づいて上記所定時間毎に上記入力信号を符号化して符号化データを生成することにより、上述の課題を解決する。   According to the present invention, the encoding difficulty level for each predetermined time standardized by a general input signal of the type to which the input signal belongs is related to the allocated code amount, and the encoding difficulty level for the predetermined time period of the input signal is determined. The allocated code amount for each predetermined time that is related to the encoding difficulty level of the input signal for each predetermined time is determined, and the input signal is encoded for each predetermined time based on the allocated code amount. The above-described problems are solved by generating encoded data by converting the data.

上記符号化難易度は、入力信号の少なくとも一部を符号化して生成された符号化データの上記所定時間毎のデータ量に基づいて求めることが挙げられる。   The encoding difficulty level may be obtained based on the data amount per predetermined time of encoded data generated by encoding at least a part of an input signal.

また、上記入力信号が映像信号の場合には、上記符号化難易度として、入力映像信号の所定時間毎の画像特性情報に基づいて求めることが挙げられ、このときの上記画像特性情報としては、画像の輝度情報としての輝度信号の所定時間毎の平均値、色度情報としての色度信号の所定時間毎の平均値、平坦度情報としての輝度信号の分散値、画像の動き情報としてのマクロブロックの動きベクトル量の所定時間毎の平均値、画像間差分情報としてマクロブロックの動きベクトルの画像間予測残差の所定時間毎の総和等を挙げることができる。   In addition, when the input signal is a video signal, the encoding difficulty may be obtained based on image characteristic information for each predetermined time of the input video signal. As the image characteristic information at this time, Average value of luminance signal as luminance information of image every predetermined time, average value of chromaticity signal as chromaticity information every predetermined time, variance value of luminance signal as flatness information, macro as motion information of image The average value of the motion vector amount of the block every predetermined time, and the inter-image difference information can include the sum of the inter-picture prediction residuals of the motion vector of the macro block every predetermined time.

入力信号が属する種類の一般の入力信号により予め標準化された所定時間毎の符号化難易度と割当符号量とを関係付けておき、入力信号の所定時間毎の符号化難易度に対して上記関係付けられた上記所定時間毎の割当符号量に基づいて上記所定時間毎に上記入力信号を符号化して符号化データを生成する。これにより、信号の入力に応じて、ほぼリアルタイムで、信号の複雑さに応じた最適の割当符号量での符号化が行える。   The encoding difficulty level for each predetermined time standardized by the general input signal of the type to which the input signal belongs is associated with the assigned code amount, and the above relationship with respect to the encoding difficulty level for the predetermined time period of the input signal. Based on the assigned code amount for each predetermined time, the input signal is encoded for each predetermined time to generate encoded data. As a result, in accordance with the input of the signal, it is possible to perform encoding with an optimum allocated code amount corresponding to the complexity of the signal in almost real time.

本発明によれば、入力信号が属する種類の一般の入力信号により予め標準化された所定時間毎の符号化難易度と割当符号量とを関係付け、入力信号の所定時間毎の符号化難易度を求め、この入力信号の所定時間毎の符号化難易度に対して上記関係付けられた上記所定時間毎の割当符号量を求め、この割当符号量に基づいて上記所定時間毎に上記入力信号を符号化して符号化データを生成しているため、信号の入力に応じて、ほぼリアルタイムで、信号の複雑さに応じた最適の割当符号量での符号化が行える。   According to the present invention, the encoding difficulty level for each predetermined time standardized by a general input signal of the type to which the input signal belongs is related to the allocated code amount, and the encoding difficulty level for the predetermined time period of the input signal is determined. The allocated code amount for each predetermined time that is related to the encoding difficulty level of the input signal for each predetermined time is determined, and the input signal is encoded for each predetermined time based on the allocated code amount. Since encoded data is generated by encoding, encoding can be performed with an optimum allocated code amount corresponding to the complexity of the signal in almost real time according to the input of the signal.

また、上記符号化難易度を、入力信号の少なくとも一部を符号化して生成された符号化データの上記所定時間毎のデータ量に基づいて求めることにより、複雑な信号が連続しても量子化ステップサイズが極端に大きくされることなく、全体を通じて均等な高品質の符号化データを得ることができる。   Further, the encoding difficulty level is obtained based on the data amount per predetermined time of the encoded data generated by encoding at least a part of the input signal, so that even if a complex signal continues, quantization is performed. Even if the step size is not extremely increased, uniform high-quality encoded data can be obtained throughout.

また、上記入力信号が映像信号の場合に、上記符号化難易度として、入力映像信号の所定時間毎の画像特性情報に基づいて求め、このときの上記画像特性情報として、画像の輝度情報としての輝度信号の所定時間毎の平均値、色度情報としての色度信号の所定時間毎の平均値、平坦度情報としての輝度信号の分散値、画像の動き情報としてのマクロブロックの動きベクトル量の所定時間毎の平均値、画像間差分としてマクロブロックの動きベクトルの画像間予測残差の所定時間毎の総和等を用いることにより、画像特性情報により人間の視覚特性が反映された符号化レートで符号化が行える。   Further, when the input signal is a video signal, the encoding difficulty is obtained based on image characteristic information for each predetermined time of the input video signal, and the image characteristic information at this time is used as luminance information of the image. Average value of luminance signal every predetermined time, average value of chromaticity signal every predetermined time as chromaticity information, variance value of luminance signal as flatness information, macro block motion vector amount as image motion information By using the average value for each predetermined time, the sum of the inter-picture prediction residuals of the motion vector of the macroblock for each predetermined time as the inter-image difference, etc., at a coding rate in which human visual characteristics are reflected by the image characteristic information Can be encoded.

以下、本発明に係る信号符号化方法、信号符号化装置及び信号記録媒体のいくつかの好ましい実施の形態について図面を参照しながら説明する。   Hereinafter, several preferred embodiments of a signal encoding method, a signal encoding apparatus, and a signal recording medium according to the present invention will be described with reference to the drawings.

ここで、以下の実施の形態においては、特に画像信号や映像信号を符号化する場合の画像符号化方法、画像符号化装置及び画像記録媒体の例について説明するが、本発明はこれに限定されず、オーディオ信号の符号化にも適用でき、また、字幕データやキャラクタデータの信号の符号化にも適用できるものである。   Here, in the following embodiments, an example of an image encoding method, an image encoding apparatus, and an image recording medium when encoding an image signal or a video signal will be described, but the present invention is not limited to this. The present invention can also be applied to encoding of audio signals, and can also be applied to encoding of subtitle data and character data signals.

第1の実施の形態
本発明の第1の実施の形態を適用した画像符号化装置は、例えば図1に示すように、入力映像信号を符号化して第1の符号化データを生成する第1の符号化回路10と、入力映像信号の統計的性質あるいは画像特性を求める画像解析回路60と、該第1の符号化回路10からの第1の符号化データの所定時間毎のデータ量、及び該画像解析回路60からの統計データあるいは画像特性情報、及び使用可能なデータ総量に基づいて上記所定時間毎の符号化レートを求める符号化制御回路30と、該符号化制御回路30からの符号化レートに基づいて上記所定時間毎に上記入力映像信号を符号化して第2の符号化データを生成する第2の符号化回路40とを備える。
First Embodiment An image encoding apparatus to which a first embodiment of the present invention is applied, as shown in FIG. 1, for example, encodes an input video signal to generate first encoded data. The encoding circuit 10, the image analysis circuit 60 for obtaining statistical properties or image characteristics of the input video signal, the amount of data of the first encoded data from the first encoding circuit 10 per predetermined time, and An encoding control circuit 30 for obtaining an encoding rate for each predetermined time based on statistical data or image characteristic information from the image analysis circuit 60 and the total amount of usable data, and encoding from the encoding control circuit 30 And a second encoding circuit 40 that encodes the input video signal every predetermined time based on a rate to generate second encoded data.

上記画像解析回路60は、上述の図1に示すように、フレーム内情報解析回路61とフレーム間情報解析回路62からなる。フレーム内情報解析回路61では、入力画像の画像特性情報として、例えば、輝度,色度,平坦度の統計情報を計算し、フレーム間情報解析回路62では、入力画像の画像特性情報として、例えば、動画像の動き量の統計情報を計算する。   The image analysis circuit 60 includes an intra-frame information analysis circuit 61 and an inter-frame information analysis circuit 62 as shown in FIG. The intra-frame information analysis circuit 61 calculates, for example, statistical information on luminance, chromaticity, and flatness as the image characteristic information of the input image, and the inter-frame information analysis circuit 62 calculates, for example, the image characteristic information of the input image. Calculate statistical information on the amount of motion of moving images.

上記画像特性情報の具体例を挙げると、入力画像の輝度についての統計情報としては、例えば、輝度信号Yの所定時間毎の平均値(L)を計算し、また入力画像の色度についての統計情報としては、例えば、色度信号Crの所定時間毎の平均値(R)を計算し、また入力画像の平坦度の統計情報としては、例えば、輝度信号Yの所定時間毎の分散値(V)を計算し、入力画像の動き量の統計情報としては、例えば、動きベクトル量の所定時間毎の平均値(M)を計算する。   As a specific example of the image characteristic information, as the statistical information about the luminance of the input image, for example, an average value (L) of the luminance signal Y every predetermined time is calculated, and the statistical information about the chromaticity of the input image As the information, for example, an average value (R) of the chromaticity signal Cr every predetermined time is calculated, and as the statistical information of the flatness of the input image, for example, the variance value (V) of the luminance signal Y every predetermined time As the statistical information of the motion amount of the input image, for example, an average value (M) of the motion vector amount per predetermined time is calculated.

さらに、上記第1の符号化回路10は、上述の図1に示すように、入力映像信号である入力画像データを記憶するフレームメモリ群12と、該フレームメモリ群12に記憶された画像データに基づいて、入力画像データの動きベクトルを検出する動きベクトル検出回路11と、予測画像データを記憶するフレームメモリ22と、上記動きベクトル検出回路11からの動きベクトルに基づいて、上記フレームメモリ22から読み出された予測画像データに動き補償を施する動き補償回路23と、該動き補償回路23からの動き補償された予測画像データに基づいて、入力画像データを予測符号する予測符号化回路14と、該予測符号化回路14からの予測誤差である差分等を符号化、例えば離散余弦変換(以下DCT:Discrete Cosine Transform という)して係数データを生成するDCT回路15と、該DCT回路15からの係数データを一定の量子化ステップサイズで量子化して、量子化データを生成する量子化回路16と、該量子化回路16からの量子化データを可変長符号化して、可変長符号データを出力する可変長符号化(VLC:Variable Length Code)回路17と、上記量子化回路16からの量子化データを逆量子化して係数データを再生する逆量子化回路18と、該逆量子化回路18からの係数データを復号化、例えば逆離散余弦変換(以下IDCT:Inverse Discrete Cosine Trasformという)して上記差分を再生するIDCT回路20と、該IDCT回路20からの差分と上記動き補償回路23からの動き補償された予測画像データを加算して次の入力画像データに対する予測画像データを生成し、該予測画像データを上記フレームメモリ22に供給する加算回路21とを備える。   Further, as shown in FIG. 1, the first encoding circuit 10 includes a frame memory group 12 that stores input image data that is an input video signal, and image data stored in the frame memory group 12. Based on the motion vector detection circuit 11 for detecting the motion vector of the input image data, the frame memory 22 for storing the predicted image data, and the frame memory 22 based on the motion vector from the motion vector detection circuit 11. A motion compensation circuit 23 that performs motion compensation on the predicted image data that has been output; a prediction encoding circuit 14 that predictively encodes input image data based on the motion-compensated prediction image data from the motion compensation circuit 23; A difference or the like that is a prediction error from the predictive encoding circuit 14 is encoded, for example, a discrete cosine transform (hereinafter referred to as DCT: Discrete Cosine Transform). ) To generate coefficient data, quantize the coefficient data from the DCT circuit 15 with a constant quantization step size, and generate quantized data; and the quantizing circuit 16 A variable length coding (VLC) circuit 17 that performs variable length coding on the quantized data from the output and outputs variable length code data, and a coefficient obtained by dequantizing the quantized data from the quantization circuit 16 An inverse quantization circuit 18 for reproducing data, and an IDCT circuit 20 for decoding the coefficient data from the inverse quantization circuit 18, for example, inverse discrete cosine transform (hereinafter referred to as IDCT) and reproducing the difference. And the difference from the IDCT circuit 20 and the motion compensated predicted image data from the motion compensation circuit 23 are added to obtain predicted image data for the next input image data. Form, and an adder circuit 21 supplied to the frame memory 22 the predicted image data.

また、上記第2の符号化回路40は、上述の図1に示すように、入力画像データを遅延する遅延器43と、予測画像データを記憶するフレームメモリ52と、上記動きベクトル検出回路11からの動きベクトルに基づいて上記フレームメモリ52から読み出された予測画像データに動き補償を施す動き補償回路53と、該動き補償回路53からの動き補償された予測画像データに基づいて、上記遅延器43で遅延された入力画像データを予測符号化する予測符号化回路44と、該予測符号化回路44からの差分等を符号化、例えばDCT変換して係数データを生成するDCT回路45と、上記符号化制御回路30からの符号化レートに基づいて量子化ステップサイズを設定する量子化スケール設定回路33と、上記DCT回路45からの係数データを上記量子化スケール設定回路33からの量子化ステップサイズで量子化して、量子化データを生成する量子化回路46と、該量子化回路46からの量子化データを可変長符号化して、可変長符号データを出力する可変長符号化回路47と、該可変長符号化回路47からの可変長符号データを一旦記憶し、一定のビットレートで出力する送信バッファメモリ49と、上記量子化回路46からの量子化データを逆量子化して係数データを再生する逆量子化回路48と、該逆量子化回路48からの係数データを復号化、例えばIDCT変換して上記差分を再生するIDCT回路50と、該IDCT回路50からの差分と上記動き補償回路53からの動き補償された予測画像データを加算して次の入力画像データに対する予測画像データを生成し、該予測画像データを上記フレームメモリ52に供給する加算回路51とを備える。   As shown in FIG. 1, the second encoding circuit 40 includes a delay unit 43 that delays input image data, a frame memory 52 that stores predicted image data, and the motion vector detection circuit 11. A motion compensation circuit 53 for performing motion compensation on the predicted image data read out from the frame memory 52 based on the motion vector, and the delay unit based on the motion compensated predicted image data from the motion compensation circuit 53. A predictive encoding circuit 44 that predictively encodes input image data delayed at 43, a DCT circuit 45 that encodes a difference from the predictive encoding circuit 44, for example, DCT transforms to generate coefficient data, and the above A quantization scale setting circuit 33 for setting a quantization step size based on an encoding rate from the encoding control circuit 30; and a coefficient from the DCT circuit 45 Data is quantized with the quantization step size from the quantization scale setting circuit 33 to generate quantized data, and the quantized data from the quantization circuit 46 is variable-length encoded, Variable length encoding circuit 47 for outputting variable length code data, transmission buffer memory 49 for temporarily storing variable length code data from the variable length encoding circuit 47 and outputting it at a constant bit rate, and the quantization circuit An inverse quantization circuit 48 that dequantizes the quantized data from 46 to reproduce coefficient data, and an IDCT circuit 50 that decodes the coefficient data from the inverse quantization circuit 48, for example, performs IDCT conversion to reproduce the difference. And the difference from the IDCT circuit 50 and the motion compensated predicted image data from the motion compensation circuit 53 are added to generate predicted image data for the next input image data. And, an adding circuit 51 supplied to the frame memory 52 the predicted image data.

この画像符号化装置では、第1の符号化回路10により、入力画像データに対して符号化処理、例えば予測符号化処理、DCT変換処理、一定の量子化ステップサイズでの量子化処理、可変長符号化処理を施し、符号化制御回路30により得られる符号化ビットレートに基づいて第2の符号化回路40により符号化を行っている。符号化制御回路30は、第1の符号化回路により得られた第1のビットストリームである可変長符号データの所定時間毎のデータ量と、画像解析回路60により求められた入力映像信号の輝度信号Yの所定時間毎の平均値(L)および分散(V),色度信号Crの所定時間毎の平均値(R)と、動きベクトル量の所定時間毎の平均値(M)と、例えば光ディスク、磁気ディスク、磁気テープ等からなる画像記録媒体55のデータ容量、あるいは伝送路のビットレート(転送レート)等により定まる使用可能なデータ総量とに基づいて、所定時間毎の符号化ビットレートを求めている。また、第2の符号化回路40は、入力画像データに再び予測符号化処理、DCT変換処理、量子化処理、可変長符号化処理を施して、第2のビットストリームである可変長符号データを生成する際に、上記符号化ビットレートに基づいた量子化ステップサイズで量子化している。   In this image coding apparatus, the first coding circuit 10 performs coding processing on input image data, for example, prediction coding processing, DCT conversion processing, quantization processing with a constant quantization step size, variable length Encoding processing is performed, and encoding is performed by the second encoding circuit 40 based on the encoding bit rate obtained by the encoding control circuit 30. The encoding control circuit 30 has a data amount per predetermined time of the variable length code data that is the first bit stream obtained by the first encoding circuit, and the luminance of the input video signal obtained by the image analysis circuit 60. The average value (L) and variance (V) of the signal Y every predetermined time, the average value (R) of the chromaticity signal Cr every predetermined time, and the average value (M) of the motion vector amount every predetermined time, for example, Based on the total data volume determined by the data capacity of the image recording medium 55 such as an optical disk, magnetic disk, magnetic tape or the like, or the bit rate (transfer rate) of the transmission path, the encoding bit rate per predetermined time is determined. Seeking. Further, the second encoding circuit 40 performs the predictive encoding process, the DCT conversion process, the quantization process, and the variable length encoding process on the input image data again to obtain the variable length code data that is the second bit stream. When generating, quantization is performed with a quantization step size based on the encoding bit rate.

ここで、上記第1の実施の形態の画像符号化装置を構成する第1の符号化回路10の動作の具体例について、図2のフローチャートを参照しながら説明する。   Here, a specific example of the operation of the first encoding circuit 10 constituting the image encoding apparatus of the first embodiment will be described with reference to the flowchart of FIG.

すなわち、図2に示すフローチャートのステップST1において、上記図1の第1の符号化回路10の量子化回路16は、量子化ステップサイズを例えば1としてDCT回路15から供給される係数データを量子化して、量子化データを生成し、符号化制御回路30のカウンタ31は、この量子化データを可変長符号化して得られる可変長符号データ(第1のビットストリーム)のデータ量を所定の単位時間、例えばマクロブロック毎に計数して、発生符号量(y)をマクロブロック毎に求める。さらに、画像解析回路60により、該マクロブロック内の輝度信号Yの平均値(L)及び分散(V)と、色度信号Crの平均値(R)とを求め、またマクロブロックの動きベクトル量の平均値(M)を求める。   That is, in step ST1 of the flowchart shown in FIG. 2, the quantization circuit 16 of the first encoding circuit 10 in FIG. 1 quantizes the coefficient data supplied from the DCT circuit 15 with the quantization step size set to 1, for example. Then, the quantized data is generated, and the counter 31 of the encoding control circuit 30 determines the data amount of the variable length code data (first bit stream) obtained by variable length encoding the quantized data for a predetermined unit time. For example, the number of generated codes (y) is obtained for each macroblock by counting for each macroblock. Further, the image analysis circuit 60 obtains the average value (L) and variance (V) of the luminance signal Y in the macroblock and the average value (R) of the chromaticity signal Cr, and the motion vector amount of the macroblock The average value (M) is obtained.

次のステップST2において、上記ビットレート演算回路32は、上記各値y,L,V,R,Mと、上述した使用可能なデータ総量(B)とに基づいて、マクロブロック毎に割り当てられる割当符号量(b)を求める。この場合、具体的には上記各値y,L,V,R,Mに基づいて符号化の難易度(difficulty)(d)を求め、この符号化難易度(d)と上記使用可能なデータ総量(B)とに基づいて上記割当符号量(b)を求めている。   In the next step ST2, the bit rate calculation circuit 32 assigns each macroblock based on the values y, L, V, R, and M and the total usable data (B) described above. The code amount (b) is obtained. In this case, specifically, the encoding difficulty (difficulty) (d) is obtained based on the values y, L, V, R, and M, and the encoding difficulty (d) and the usable data are obtained. The allocated code amount (b) is obtained based on the total amount (B).

ステップST3において、第2の符号化回路40の量子化回路46は、割当符号量に基づいた量子化ステップサイズにより、DCT回路45から供給される係数データを量子化して、量子化データを生成するようになっている。   In step ST3, the quantization circuit 46 of the second encoding circuit 40 quantizes the coefficient data supplied from the DCT circuit 45 with the quantization step size based on the allocated code amount, and generates quantized data. It is like that.

このような第1の符号化回路10の動作について、図1を参照しながらより具体的に説明する。   The operation of the first encoding circuit 10 will be described more specifically with reference to FIG.

入力された画像データは、フレームメモリ群12に一旦記憶される。そして、フレームメモリ群12からは、従来の技術で述べたようにブロックフォーマットに従って読み出される。   The input image data is temporarily stored in the frame memory group 12. Then, it is read from the frame memory group 12 according to the block format as described in the prior art.

動きベクトル検出回路11は、フレームメモリ群12から必要な画像データを上述のマクロブロック単位で読みだし、動きベクトルを検出する。すなわち、動きベクトル検出回路11は、フレームメモリ群12に記憶されている前方原画像及び/又は後方原画像を用いて、現在の参照画像の動きベクトルをマクロブロック単位で検出する。ここで、動きベクトルの検出は、例えばマクロブロック単位でのフレーム間差分の絶対値和が最小になるものを、その動きベクトルとする。そして、検出された動きベクトルは動き補償回路23、53等に供給され、マクロブロック単位でのフレーム間差分の絶対値和はフレーム内/前方/後方/両方向予測判定回路13に供給される。   The motion vector detection circuit 11 reads necessary image data from the frame memory group 12 in units of the macroblocks described above, and detects a motion vector. That is, the motion vector detection circuit 11 detects the motion vector of the current reference image in units of macroblocks using the front original image and / or the rear original image stored in the frame memory group 12. Here, for the detection of the motion vector, for example, a motion vector having the smallest absolute value sum of inter-frame differences in units of macroblocks is set as the motion vector. The detected motion vector is supplied to the motion compensation circuits 23 and 53, and the absolute value sum of the inter-frame difference in units of macroblocks is supplied to the intra-frame / forward / backward / bidirectional prediction determination circuit 13.

フレーム内/前方/後方/両方向予測判定回路13は、この値をもとに、参照ブロックの予測モードを決定し、決定した予測モードに基づいて、ブロック単位でフレーム内/前方/後方/両方向予測の切り換えを行うように予測符号化回路14を制御する。   The intra-frame / forward / backward / bidirectional prediction determination circuit 13 determines the prediction mode of the reference block based on this value, and based on the determined prediction mode, the intra-frame / forward / backward / bidirectional prediction is performed in units of blocks. The predictive coding circuit 14 is controlled so as to perform switching.

予測符号化回路14は、上述の図1に示すように、加算回路14a、14b、14c及び切換スイッチ14dを備え、フレーム内符号化モードのときは入力画像データそのものを、前方/後方/両方向予測モードのときはそれぞれの予測画像に対する入力画像データの画素毎の差分(以下差分データという)を選択し、選択したデータをDCT回路15に供給する。   As shown in FIG. 1 described above, the predictive coding circuit 14 includes adder circuits 14a, 14b, 14c and a changeover switch 14d, and in the intra-frame coding mode, the input image data itself is forward / backward / bidirectionally predicted. In the mode, a difference for each pixel of input image data (hereinafter referred to as difference data) with respect to each predicted image is selected, and the selected data is supplied to the DCT circuit 15.

DCT回路15は、映像信号の2次元相関を利用して、切換スイッチ14dから供給される入力画像データ又は差分データをブロツク単位でDCT変換し、得られる係数データを量子化回路16に供給する。   The DCT circuit 15 DCT-transforms input image data or difference data supplied from the changeover switch 14d in units of blocks using the two-dimensional correlation of the video signal, and supplies the obtained coefficient data to the quantization circuit 16.

量子化回路16は、一定の量子化ステップサイズ、例えば量子化ステップサイズを1として、DCT回路15から供給される係数データを量子化し、得られる量子化データを可変長符号化回路17及び逆量子化回路18に供給する。   The quantization circuit 16 quantizes the coefficient data supplied from the DCT circuit 15 with a constant quantization step size, for example, a quantization step size of 1, and converts the obtained quantized data into the variable length coding circuit 17 and the inverse quantum. To the circuit 18.

可変長符号化回路17は、量子化データを、量子化ステップサイズ、予測モード、動きベクトル等と共に可変長符号化し、得られる可変長符号データを第1のビットストリームとして符号化制御回路30に供給する。   The variable length coding circuit 17 performs variable length coding on the quantized data together with the quantization step size, prediction mode, motion vector, and the like, and supplies the obtained variable length code data to the coding control circuit 30 as a first bit stream. To do.

符号化制御回路30は、上述の図1に示すように、上記可変長符号化回路17から可変長符号データの所定時間毎のデータ量を計数するカウンタ31と、該カウンタ31からのデータ量及び使用可能なデータ総量に基づいて所定時間当たりの割当符号量を求めるビットレート演算回路32とを備える。そして、カウンタ31は、第1のビットストリームのデータ量を所定時間毎、例えばマクロブロック毎に計数して、発生符号量をマクロブロック毎に求め、この発生符号量をビットレート演算回路32に供給する。   As shown in FIG. 1 described above, the encoding control circuit 30 includes a counter 31 that counts the data amount of the variable length code data from the variable length encoding circuit 17 every predetermined time, and the data amount from the counter 31 and And a bit rate calculation circuit 32 for obtaining an allocated code amount per predetermined time based on the total usable data amount. Then, the counter 31 counts the data amount of the first bit stream every predetermined time, for example, every macro block, obtains the generated code amount for each macro block, and supplies this generated code amount to the bit rate calculation circuit 32. To do.

ビットレート演算回路32は、このマクロブロック毎の発生符号量と、マクロブロックの輝度信号Yの平均値(L)と分散(V)と、マクロブロックの色度信号Crの平均値(R)と、マクロブロックの動きベクトル量の平均値(M)と、使用可能なデータ総量に基づいて、マクロブロック毎に割り当てられる割当符号量すなわちマクロブロック時間毎の平均符号化レートを求めると共に、この割当符号量を第2の符号化回路40の量子化スケール設定回路33に供給する。   The bit rate calculation circuit 32 generates the generated code amount for each macroblock, the average value (L) and variance (V) of the luminance signal Y of the macroblock, and the average value (R) of the chromaticity signal Cr of the macroblock. Based on the average value (M) of the motion vector amount of the macroblock and the total usable data amount, the assigned code amount assigned to each macroblock, that is, the average coding rate for each macroblock time is obtained, and this assigned code The quantity is supplied to the quantization scale setting circuit 33 of the second encoding circuit 40.

具体的には、ビットレート演算回路32は、先ず次の式1に示すように、符号化する1シーケンスの時間SQTと、使用可能なデータ総量Bとに基づいて、そのシーケンスの平均ビットレートSQBRを計算する。   Specifically, the bit rate calculation circuit 32 first calculates the average bit rate SQBR of the sequence based on the time SQT of one sequence to be encoded and the total available data B as shown in the following equation 1. Calculate

SQBR = B/SQT ・・・ 式1
ここで、上記1シーケンスとは、例えば映画や番組の1本分のように、1つの画像記録媒体に記録される全フレームを想定しており、この他、記録媒体を分割して用いるときには各分割領域毎に記録される全フレームを1シーケンスとしてもよい。
SQBR = B / SQT Equation 1
Here, the one sequence assumes all frames recorded on one image recording medium, for example, for one movie or program. In addition, each sequence is used when the recording medium is divided and used. All frames recorded for each divided area may be one sequence.

またビットレート演算回路32は、上記1シーケンスの全マクロブロック数をNとし、使用可能なデータ総量をBとし、i(i=0、1、2・・・N−1)番目のマクロブロックの発生符号量をyi とし、i番目のマクロブロックの輝度信号Yの平均値をLi、分散をViとし、色度信号Crの平均値をRiとし、動きベクトル量の平均値をMiとし、それぞれ関数f 、f 、f 、f の特性から画像の絵柄の主観的印象を符号化難易度di へ反映する係数α ,β ,γ ,θ を求め、式6に示すように、これらの係数とyiの積により、符号化難易度diを求めている。 The bit rate calculation circuit 32 sets the total number of macro blocks in the one sequence as N, sets the total usable data amount as B, and sets the i (i = 0, 1, 2,... N−1) -th macro block. The generated code amount is yi, the average value of the luminance signal Y of the i-th macroblock is Li, the variance is Vi, the average value of the chromaticity signal Cr is Ri, the average value of the motion vector amount is Mi, Coefficients α i , β i , γ i , and θ i that reflect the subjective impression of the picture pattern on the encoding difficulty di are obtained from the characteristics of f 1 , f 2 , f 3 , and f 4 , as shown in Equation 6. In addition, the encoding difficulty level di is obtained by the product of these coefficients and yi.

α = f(Li) ・・・式2
β = f(Ri) ・・・式3
γ = f(Vi) ・・・式4
θ = f(Mi) ・・・式5
= α×β×γ×θ×y ・・・式6
ここで、関数f 、f 、f 、f の特性の具体例について、図3〜図6を参照しながら説明する。
α i = f 1 (Li) Equation 2
β i = f 2 (Ri) Equation 3
γ i = f 3 (Vi) Equation 4
θ i = f 4 (Mi) Equation 5
d i = α i × β i × γ i × θ i × y i Expression 6
Here, specific examples of the characteristics of the functions f 1 , f 2 , f 3 , and f 4 will be described with reference to FIGS.

図3に、輝度信号Yの平均値Lに対する係数αを表す関数f の特性を示す。この図3の横軸のLは、0が黒であり、MAXが最も明るい値である。一般に、人間の目は、暗い画像では、符号化ノイズをわかりやすい。ただし、あるレベル以下の暗さでは、暗すぎて符号化ノイズを知覚できなくなる。この特徴に基づいて、L=0付近では、α=1とし、最も劣化を知覚しやすいLのレベルで、αはピークをもち、それ以上のLでは、徐々にαを小さくする。αが1以上の場合、符号化難易度dを増大させ、逆にαが1以下の場合、符号化難易度dを減少させる。なお、i番目のマクロブロックについての輝度信号Yの平均値はLiであり、このi番目のマクロブロックについての係数α は f(Li)となる。 FIG. 3 shows the characteristics of the function f 1 representing the coefficient α with respect to the average value L of the luminance signal Y. In the L on the horizontal axis in FIG. 3, 0 is black and MAX is the brightest value. In general, human eyes can easily understand coding noise in dark images. However, at darkness below a certain level, it is too dark to perceive coding noise. Based on this feature, α = 1 in the vicinity of L = 0, L is at the level of L that is most easily perceived of deterioration, α has a peak, and at more than L, α is gradually reduced. When α is 1 or more, the encoding difficulty level d is increased. Conversely, when α is 1 or less, the encoding difficulty level d is decreased. Note that the average value of the luminance signal Y for the i-th macroblock is Li, and the coefficient α i for this i-th macroblock is f 1 (Li).

図4に、色度信号Crの平均値Rと係数βの関数f の特性を示す。図4の横軸のRは、0がグレーであり、MAXが最も赤い値である。一般に、人間の目は赤の劣化をわかりやすい特徴がある。この特徴に基づいて、Rが大きい値ほどβを1以上の大きな値とし、符号化難易度dを増大させる。なお、i番目のマクロブロックについての色度信号Crの平均値はRiであり、このi番目のマクロブロックについての係数β は f(Ri)となる。 Figure 4 shows the mean value characteristic of the function f 2 of the R and the coefficient β of the chroma signal Cr. As for R on the horizontal axis in FIG. 4, 0 is gray and MAX is the most red value. In general, the human eye has a feature that makes red deterioration easy to understand. Based on this feature, the larger R is, the larger β is 1 or more, and the encoding difficulty d is increased. Note that the average value of the chromaticity signal Cr for the i-th macroblock is Ri, and the coefficient β i for this i-th macroblock is f 2 (Ri).

図5に、輝度信号Yの分散値Vと係数γの関数f の特性を示す。図5の横軸のVは、0が完全に平坦であり、MAXが最も絵柄が乱雑である。一般に、人間の目は、絵柄の平坦部分で、符号化ノイズがわかりやすく、逆に、絵柄が乱雑な部分では、劣化はわかりにくい。この特徴に基づいて、Vが大きい値ほどγを1以下の小さな値とし、符号化難易度dを減少させる。i番目のマクロブロックについての輝度信号Yの分散値はViであり、このi番目のマクロブロックについての係数γ は f(Vi)となる。 FIG. 5 shows the characteristics of the function f 3 of the variance value V of the luminance signal Y and the coefficient γ. As for V on the horizontal axis in FIG. 5, 0 is completely flat, and MAX has the most random pattern. In general, the human eye can easily understand the coding noise in the flat portion of the design, and conversely, the deterioration is difficult to understand in the portion where the design is messy. Based on this feature, as the value of V increases, γ is set to a smaller value of 1 or less, and the encoding difficulty d is decreased. variance value of the luminance signal Y for the i-th macro block is Vi, the coefficient gamma i of the i-th macro block is f 3 (Vi).

図6に、動きベクトル量の平均値Mと係数θの関数f の特性を示す。図6の横軸のMは、0が静止している場合で、MAXが最も動きが大きい(速い)。一般に、人間の目は、画像の動きが大きい(速い)と、目が動きについていけず、画像の劣化がわかりにくい。この特徴に基づいて、Mが大きい値ほどθを1以下の小さな値とし、符号化難易度dを減少させる。なお、マクロブロックがイントラ符号化される時は、θ=1とする。i番目のマクロブロックについての動きベクトル量の平均値はMiで、このi番目のマクロブロックについての係数θ は f(Mi)となる。 Figure 6 shows the characteristic of the function f 4 of the mean value M and the coefficient of the motion vector amount theta. M on the horizontal axis in FIG. 6 is a case where 0 is stationary, and MAX has the largest movement (fast). Generally, when the movement of an image is large (fast), the human eye cannot keep up with the movement, and it is difficult to understand the deterioration of the image. Based on this feature, θ is set to a smaller value of 1 or less as M increases, and the encoding difficulty d is reduced. When the macro block is intra-coded, θ = 1. the average value of the motion vector amount for the i-th macroblock in Mi, coefficient theta i for this i-th macro block is f 4 (Mi).

このように求めた係数α,β,γ,θを、発生符号量yと乗算することで、符号化難易度dを求める。なお、i番目のマクロブロックについては、それぞれ係数α ,β ,γ ,θ を求め、上記式6に示したように発生符号量yi と乗算し、符号化難易度diとする。 The coefficient α, β, γ, θ obtained in this way is multiplied by the generated code amount y to obtain the encoding difficulty level d. For the i-th macroblock, coefficients α i , β i , γ i , and θ i are respectively obtained and multiplied by the generated code amount y i as shown in the above equation 6 to obtain the encoding difficulty level di.

ビットレート演算回路32は、i番目のマクロブロックに対する割当符号量をbi として、この割当符号量bi を下記式7に従って計算する。ここでa,cは定数であり、1シーケンスの上記平均ビットレートSQBRに応じて決定される値である。   The bit rate calculation circuit 32 calculates the allocated code amount bi according to the following equation (7), where bi is the allocated code amount for the i-th macroblock. Here, a and c are constants and are values determined according to the average bit rate SQBR of one sequence.

bi = a×di + c ・・・式7
なお、上記式7のような線形の関係式を用いないで、テーブル・ルックアップで割当符号量bi を求めるようにしてもよい。
bi = a × di + c Expression 7
Note that the allocated code amount bi may be obtained by table lookup without using a linear relational expression such as Expression 7.

次に、上記関係式7について説明する。   Next, the relational expression 7 will be described.

式7は、多くの動画像シーケンス、例えば多くの映画を符号化実験し、その画質を評価し、思考錯誤を通じて、経験的に求められる。一般に、1シーケンスでのdiの分布は、図7に示すような形となる。   Equation 7 is obtained empirically through coding experiments on many moving image sequences, for example, many movies, evaluating the image quality, and thinking and error. In general, the distribution of di in one sequence is as shown in FIG.

この図7において、横軸は符号化難易度dを示し、縦軸は該符号化難易度dの1シーケンス内での出現確率h(d)、すなわち、所定時間単位が例えばマクロブロック単位のときには、符号化難易度dとなるマクロブロックの1シーケンス内での出現頻度を1シーケンス内の全マクロブロック数で割ったもの、を示しており、図中の分布曲線と横軸とで囲まれた斜線部の面積は1となる。   In FIG. 7, the horizontal axis indicates the encoding difficulty d, and the vertical axis indicates the appearance probability h (d) in one sequence of the encoding difficulty d, that is, when the predetermined time unit is, for example, a macroblock unit. , Shows the frequency of appearance of a macroblock with encoding difficulty level d divided by the total number of macroblocks in one sequence, and is surrounded by the distribution curve and the horizontal axis in the figure. The area of the shaded area is 1.

ここで、いくつかのシーケンスについての平均的な符号化難易度が高いか低いかは、各シーケンスの符号化難易度dの平均値によって判断できる。例えば、図8は、平均的な符号化難易度が、低位、中位、高位の3種類の映画についての符号化難易度の分布曲線A、B、Cを示す図である。これらの分布曲線A、B、Cにそれぞれ対応する各映画のi番目のマクロブロックの符号化難易度を、それぞれdAi (i=0〜N)、dBi (i=0〜M)、dCi (i=0〜K)とすると、以下の関係がある。   Here, whether the average encoding difficulty level of several sequences is high or low can be determined by the average value of the encoding difficulty levels d of the respective sequences. For example, FIG. 8 is a diagram illustrating encoding difficulty distribution curves A, B, and C for three types of movies having an average encoding difficulty level of low, medium, and high. The encoding difficulty levels of the i-th macroblock of each movie corresponding to the distribution curves A, B, and C are respectively represented by dAi (i = 0 to N), dBi (i = 0 to M), and dCi (i = 0 to K), there is the following relationship.

Figure 2009005417
Figure 2009005417

この場合、平均的な符号化難易度が最も高い映画の分布曲線Cに基づいて、上記式7の関係をつくる。手順としては、使用可能なデータ総量Bの範囲内で、符号化難易度dに対して、十分な画質を得るために必要な割当符号量bを、経験的に関係づける。こうして作られた関係式は、他の種類の分布曲線A、Bの映画についても適用することが可能となる。   In this case, based on the distribution curve C of the movie having the highest average encoding difficulty level, the relationship of the above equation 7 is created. As a procedure, within the range of the total data amount B that can be used, the allocated code amount b necessary for obtaining sufficient image quality is empirically related to the encoding difficulty level d. The relational expression thus created can be applied to movies of other types of distribution curves A and B.

具体的に説明すると、映画A、B、Cのi番目のマクロブロックの割当符号量bAi 、bBi 、bCi は、以下ように計算される。   More specifically, the allocated code amounts bAi, bBi, bCi of the i-th macroblocks of movies A, B, C are calculated as follows.

bAi =a×dAi +c ・・・式9
bBi =a×dBi +c ・・・式10
bCi =a×dCi +c ・・・式11
また、映画A、B、Cのそれぞれのシーケンスあたりの割当符号量、BA、BB、BCは、以下ように計算される。
bAi = a × dAi + c (9)
bB i = a × dB i + c (10)
bC i = a × dC i + c (11)
In addition, the allocated code amounts, BA, BB, and BC for each sequence of movies A, B, and C are calculated as follows.

Figure 2009005417
Figure 2009005417

このとき、以下のような関係になる。
BA<BB<BC ・・・式15
すなわち、全記録容量が一定の記録媒体に1シーケンス分の映像信号、例えば映画を記録する場合には、上記分布曲線Cに基づく上記式7の関係をつくっておくことで、曲線A、B、Cに対応するいずれの映画でも、記録媒体の容量を越えることなく記録することができる。
At this time, the relationship is as follows.
BA <BB <BC (Formula 15)
That is, when a video signal for one sequence, for example, a movie, is recorded on a recording medium having a constant total recording capacity, by creating the relationship of Equation 7 based on the distribution curve C, the curves A, B, Any movie corresponding to C can be recorded without exceeding the capacity of the recording medium.

多くの動画像シーケンスを符号化実験することによって求めたモデルとなる、あるいは基準となる典型的なシーケンス(例えば映画)の符号化難易度dの分布曲線を図7に示す。このモデルの平均符号化難易度は、世の中にある動画シーケンスのほとんどをカバーするものと考えることができる。ここで、任意のシーケンスでの平均ビットレートSQBRを所定値としたときの、符号化難易度dとその割当符号量bとの関係を図9に示す。この図9において、関数b(d)は、上記式7を一般化したb(d)=a×d+cを表すものであり、i番目のマクロブロックに対する割当符号量bi は、該i番目のマクロブロックについての符号化難易度diにより、bi=a×di+cにて求められることは勿論である。   FIG. 7 shows a distribution curve of the coding difficulty d of a typical sequence (for example, a movie) which is a model obtained by coding experiments on many moving image sequences or a reference. The average coding difficulty of this model can be considered to cover most moving image sequences in the world. Here, FIG. 9 shows the relationship between the encoding difficulty level d and the allocated code amount b when the average bit rate SQBR in an arbitrary sequence is set to a predetermined value. In FIG. 9, a function b (d) represents b (d) = a × d + c, which is a generalization of Equation 7, and the allocated code amount bi for the i-th macroblock is the i-th macroblock. Of course, it is obtained by bi = a × di + c according to the encoding difficulty level di for the block.

また、シーケンスでの平均ビットレートSQBRを独立変数としたときの、所定時間毎の符号化難易度dと割当符号量bとの関係を図10に示す。この図10では、具体例として、上記平均ビットレートSQBRが7Mbps 、6Mbps 、5Mbps 、4Mbps 、3Mbps の場合をそれぞれ示している。   FIG. 10 shows the relationship between the encoding difficulty level d and the allocated code amount b for each predetermined time when the average bit rate SQBR in the sequence is an independent variable. FIG. 10 shows, as specific examples, cases where the average bit rate SQBR is 7 Mbps, 6 Mbps, 5 Mbps, 4 Mbps, and 3 Mbps.

これらの図9や図10に示す上記式7に相当する関係式は、使用可能なデータ総量B以内で、世の中のほとんどのシーケンスの可変ビットレート符号化に適用できる。   These relational expressions corresponding to Expression 7 shown in FIG. 9 and FIG. 10 can be applied to variable bit rate coding of most sequences in the world within the total amount B of usable data.

1スライスを構成する全てのマクロブロックについてのbiを加算したものが、そのスライスの割当符号量である。また、1フレームを構成する全てのマクロブロックについてのbiを加算したものが、そのフレームの割当符号量である。かくして、ビットレート演算回路32は、例えば複雑な絵柄のフレームに対しては割当符号量を多くし、逆に単純な絵柄のフレームに対しては割当符号量を少なくする。   A sum of bi for all macroblocks constituting one slice is an allocated code amount of the slice. Also, the sum of bi for all macroblocks constituting one frame is the allocated code amount of that frame. Thus, for example, the bit rate calculation circuit 32 increases the assigned code amount for a frame with a complex picture, and conversely reduces the assigned code amount for a frame with a simple picture.

一方、逆量子化回路18は、量子化回路16から供給される量子化データを、量子化ステップサイズを1として逆量子化して、DCT回路15の出力に対応した係数データ(量子化歪みが加算されている)を再生し、この係数データをIDCT回路20に供給する。   On the other hand, the inverse quantization circuit 18 inversely quantizes the quantization data supplied from the quantization circuit 16 with a quantization step size of 1, and adds coefficient data (quantization distortion is added) corresponding to the output of the DCT circuit 15. The coefficient data is supplied to the IDCT circuit 20.

IDCT回路20は、係数データをIDCT変換して、フレーム内符号化モードでは予測符号化回路14の出力に対応した入力画像データを再生し、前方/後方/両方向予測モードでは差分データを再生して、加算回路21に供給する。   The IDCT circuit 20 performs IDCT conversion on the coefficient data, reproduces input image data corresponding to the output of the predictive coding circuit 14 in the intra-frame coding mode, and reproduces difference data in the forward / backward / bidirectional prediction mode. , And supplied to the adder circuit 21.

加算回路21には、前方/後方/両方向予測モードのとき、動き補償回路23から動き補償された予測画像データが供給されており、この予測画像データとIDCT回路20から供給される差分データを加算することにより、入力画像データに対応した画像データを再生する。   In the forward / backward / bidirectional prediction mode, the adder circuit 21 is supplied with predicted image data subjected to motion compensation from the motion compensation circuit 23, and adds the predicted image data and the difference data supplied from the IDCT circuit 20. Thus, the image data corresponding to the input image data is reproduced.

そして、このようにして再生された画像データは、フレームメモリ22に予測画像データとして記憶される。すなわち、逆量子化回路18〜加算回路21は、局所復号化回路を構成し、予測モードに基づいて、量子化回路16から出力される量子化データを局所復号化し、得られる復号画像を前方予測画像もしくは後方予測画像としてフレームメモリ22に書き込む。フレームメモリ22は、複数のフレームメモリからなり、フレームメモリのバンク切り替えが行われ、符号化する画像に応じて、例えば単一のフレームが、前方予測画像データとして出力されたり、後方予測画像データとして出力される。また、前方/後方/両方向予測の場合は、前方予測画像データと後方予測画像データが例えば平均化されて出力される。これらの予測画像データは、後述する画像復号化装置で再生される画像データと全く同一の画像データであり、次の処理画像はこの予測画像をもとに前方/後方/両方向予測符号化が行われる。   The image data reproduced in this way is stored in the frame memory 22 as predicted image data. That is, the inverse quantization circuit 18 to the addition circuit 21 constitute a local decoding circuit, locally decode the quantized data output from the quantization circuit 16 based on the prediction mode, and perform forward prediction on the obtained decoded image. An image or a backward predicted image is written in the frame memory 22. The frame memory 22 is composed of a plurality of frame memories, and bank switching of the frame memory is performed. Depending on the image to be encoded, for example, a single frame is output as forward predicted image data or as backward predicted image data Is output. Further, in the case of forward / backward / bidirectional prediction, the forward prediction image data and the backward prediction image data are averaged and output, for example. These predicted image data are exactly the same image data as those reproduced by an image decoding apparatus to be described later, and the next processed image is subjected to forward / backward / bidirectional predictive coding based on this predicted image. Is called.

次に、第2の符号化回路40の動作について説明する。なお、第2の符号化回路40を構成する量子化スケール設定回路33、遅延器43、量子化回路46、送信バッファメモリ49以外の回路は、上述した第1の符号化回路10を構成する回路と同じ動作を行うので、説明を省略する。   Next, the operation of the second encoding circuit 40 will be described. The circuits other than the quantization scale setting circuit 33, the delay unit 43, the quantization circuit 46, and the transmission buffer memory 49 that constitute the second encoding circuit 40 are circuits that constitute the first encoding circuit 10 described above. Since the same operation is performed, the description is omitted.

遅延器43は、入力画像データを、例えば符号化制御回路30から符号化制御信号が出力されるまでの時間遅延する。この遅延器43の遅延時間としては、従来の2パス方式の場合には1シーケンス以上の時間が必要であったが、この実施の形態の場合には、ビットレートの切換単位時間、例えば後述する1GOP(グループオブピクチャ)の時間程度とすればよい。そして、予測符号化回路44、DCT回路45において、遅延された入力画像データにフレーム内/前方/後方/両方向予測判定回路13から供給される予測モードに従った予測符号化処理、DCT変換処理が施され、係数データが生成される。   The delay unit 43 delays the input image data for a time until the encoding control signal is output from the encoding control circuit 30, for example. As a delay time of the delay unit 43, a time of one sequence or more is required in the case of the conventional two-pass method, but in this embodiment, a bit rate switching unit time, for example, described later. The time may be about 1 GOP (group of pictures). Then, the predictive encoding circuit 44 and the DCT circuit 45 perform predictive encoding processing and DCT conversion processing according to the prediction mode supplied from the intra-frame / forward / backward / bidirectional prediction determination circuit 13 to the delayed input image data. The coefficient data is generated.

量子化スケール設定回路33は、送信バッファ49からのバッファフィードバックから検出される、あるマクロブロックにおいて発生した発生符号量と、このマクロブロック毎の割当符号量の比較を行う。   The quantization scale setting circuit 33 compares the generated code amount generated in a certain macroblock detected from the buffer feedback from the transmission buffer 49 and the allocated code amount for each macroblock.

量子化スケール設定回路33は、第2の符号化での各マクロブロックの発生符号量を設定された各マクロブロックの割当符号量に近付けるため、当該マクロブロックにおける発生符号量がマクロブロック毎の割当符号量より大きい場合、次のマクロブロックの発生符号量を抑えるために次のマクロブロックの量子化ステップサイズを大きく設定し、当該マクロブロックにおける発生符号量がマクロブロック毎の割当符号量より小さい場合は、発生符号量を多くするために次のマクロブロックの量子化ステップサイズを小さくする。なお上記の説明では、マクロブロック毎に割当符号量と発生符号化量を近付けるように制御したが、この他、スライス毎に、フレーム毎に、あるいは後述するようにGOP(グループオブピクチャ)毎に制御を行わせるようにしてもよい。   The quantization scale setting circuit 33 approaches the generated code amount of each macroblock in the second encoding to the assigned code amount of each set macroblock, so that the generated code amount in the macroblock is assigned to each macroblock. When the code amount is larger, the quantization step size of the next macroblock is set to be large in order to suppress the generated code amount of the next macroblock, and the generated code amount in the macroblock is smaller than the allocated code amount for each macroblock. Reduces the quantization step size of the next macroblock in order to increase the amount of generated codes. In the above description, the allocated code amount and the generated encoding amount are controlled to be close to each macroblock. However, in addition to this, for each slice, for each frame, or for each GOP (group of pictures) as described later. Control may be performed.

さらに、量子化スケール設定回路33は、送信バッファ49からのバッファフィードバックが、送信バッファ49のオーバーフローが近いことを示す場合、上記の割当符号量と発生符号量との比較結果によらず、量子化ステップサイズを大きくしてオーバーフローを抑制し、また、送信バッファからのバッファフィードバックが、送信バッファ49のアンダーフローが近いことを示す場合、上記の割当符号量と発生符号量との比較結果によらず、量子化ステップサイズを小さくしてアンダーフローを抑制するようにしてもよい。   Further, when the buffer feedback from the transmission buffer 49 indicates that the overflow of the transmission buffer 49 is close, the quantization scale setting circuit 33 performs quantization regardless of the comparison result between the allocated code amount and the generated code amount. If the overflow is suppressed by increasing the step size, and the buffer feedback from the transmission buffer indicates that the underflow of the transmission buffer 49 is close, it does not depend on the comparison result between the allocated code amount and the generated code amount. The underflow may be suppressed by reducing the quantization step size.

なお、上記の説明では、マクロブロック毎に発生符号量と割当符号量とを比較して、マクロブロック毎に量子化ステップサイズを切り換えるようにしたが、スライス毎、フレーム毎、あるいはGOP毎に切り換えを行うこともできる。   In the above description, the generated code amount and the assigned code amount are compared for each macro block, and the quantization step size is switched for each macro block. However, the switching is performed for each slice, each frame, or each GOP. Can also be done.

また、上記の説明では、発生符号量を送信バッファ49の蓄積量から検出するようにしたが、可変長符号化回路47の出力から直接得ることもできる。量子化スケール設定回路33は、このようにして設定した量子化ステップサイズを量子化回路46に供給する。   In the above description, the generated code amount is detected from the accumulated amount of the transmission buffer 49, but it can also be obtained directly from the output of the variable length encoding circuit 47. The quantization scale setting circuit 33 supplies the quantization step size set in this way to the quantization circuit 46.

量子化回路46は、上述した量子化スケール設定回路33から供給される量子化ステップサイズにより、DCT回路45から供給される係数データを量子化して、量子化データを生成する。   The quantization circuit 46 quantizes the coefficient data supplied from the DCT circuit 45 with the quantization step size supplied from the quantization scale setting circuit 33 described above, and generates quantized data.

そして、可変長符号化回路47は、量子化回路46から供給される量子化データを、量子化スケール設定回路33からの量子化ステップサイズ、フレーム内/前方/後方/両方向予測判定回路13からの予測モード、動きベクトル検出回路11からの動きベクトル等と共に可変長符号化し、得られる可変長符号データを第2のビットストリームとして送信バッファメモリ49に供給する。   Then, the variable length coding circuit 47 converts the quantized data supplied from the quantization circuit 46 into the quantization step size from the quantization scale setting circuit 33, the intra-frame / forward / backward / bidirectional prediction determination circuit 13 and the like. Variable length coding is performed together with the prediction mode, the motion vector from the motion vector detection circuit 11 and the like, and the obtained variable length code data is supplied to the transmission buffer memory 49 as a second bit stream.

ここで、図11は、この画像符号化装置の第2の符号化回路40の動作を概略的に示すフローチャートである。   Here, FIG. 11 is a flowchart schematically showing the operation of the second encoding circuit 40 of the image encoding device.

この図11に示すように、ステップST11において、遅延器43を介して画像データが入力されると、ステップST12において、量子化スケール設定回路33は、現在符号化の対象とされているフレームに対する割当符号量を符号化制御回路30から読み込み、ステップST13に進む。   As shown in FIG. 11, when image data is input via the delay unit 43 in step ST11, in step ST12, the quantization scale setting circuit 33 assigns the frame to be currently encoded. The code amount is read from the encoding control circuit 30, and the process proceeds to step ST13.

ステップST13において、予測符号化回路44〜可変長符号化回路47は、画像データに予測符号化処理、DCT変換処理を施すと共に、マクロブロックの割当符号量に基づいた量子化ステップサイズにより係数データを量子化した後、可変長符号化し、ステップST14に進む。   In step ST13, the predictive coding circuit 44 to the variable length coding circuit 47 perform predictive coding processing and DCT conversion processing on the image data, and also obtain coefficient data by a quantization step size based on the allocated code amount of the macroblock. After quantization, variable length coding is performed, and the process proceeds to step ST14.

ステップST14において、例えば同一の画面サイズや同一の転送レートが適用される全フレーム(シーケンス)に対して符号化処理が終了したかが判断され、該当するときは終了し、該当しないときはステップST11に戻る。かくして、フレーム単位で符号化レートが変わる可変レート符号化が実現され、絵柄が複雑な画像(フレーム)が連続しても、これらの画像に対して量子化ステップサイズが従来の装置のように大きくされることなく、全体を通じて均等な高画質を得ることができる。   In step ST14, for example, it is determined whether or not the encoding process has been completed for all frames (sequences) to which the same screen size and the same transfer rate are applied. If applicable, the process ends. If not, step ST11. Return to. Thus, variable-rate coding in which the coding rate is changed in units of frames is realized, and even if images (frames) with complicated patterns are continuous, the quantization step size for these images is large as in the conventional device. Therefore, uniform image quality can be obtained throughout.

一方、逆量子化回路48は、量子化回路46から供給される量子化データを、上述の量子化回路46で用いた量子化ステップサイズにより逆量子化して、DCT回路45の出力に対応した係数データ(量子化歪みが加算されている)を再生し、この係数データをIDCT回路50に供給する。すなわち、局所復号化回路を構成する逆量子化回路48〜加算回路51は、量子化回路46から出力される量子化データを局所復号化し、得られる復号画像を前方予測画像もしくは後方予測画像としてフレームメモリ52に書き込む。フレームメモリ52に記憶された画像データは、次の処理画像に対する予測画像として使用される。   On the other hand, the inverse quantization circuit 48 inversely quantizes the quantized data supplied from the quantization circuit 46 with the quantization step size used in the quantization circuit 46 described above, and a coefficient corresponding to the output of the DCT circuit 45. Data (quantized distortion is added) is reproduced, and this coefficient data is supplied to the IDCT circuit 50. That is, the inverse quantization circuit 48 to the addition circuit 51 constituting the local decoding circuit locally decode the quantized data output from the quantization circuit 46, and use the obtained decoded image as a forward prediction image or a backward prediction image as a frame. Write to memory 52. The image data stored in the frame memory 52 is used as a predicted image for the next processed image.

送信バッファメモリ49は、必要に応じて設ければよいが、設けた場合には、送信バッファメモリ49は、可変長符号データを一旦記憶した後、一定のビットレートで読み出すことにより、可変長符号データを平滑化してビットストリームとして出力する。そして、送信バッファメモリ49から出力されたビットストリームは、例えば符号化されたオーディオ信号、同期信号等と多重化され、更にエラー訂正用のコードが付加され、伝送あるいは記録に適した所定の変調が加えられた後、例えば伝送路を介して画像復号化装置に伝送されたり、上述の図1に示すように、光ディスク、磁気ディスク、磁気テープ等からなる画像記録媒体55に記録される。すなわち、第2の符号化回路40において、例えば予め複雑な画像に対しては割当符号量bi を多くして、単純な画像に対しては割当符号量bi を少なくして可変レート符号化を行っていることから、従来の装置のように絵柄が複雑な画像に対して極端な画質劣化をさけるために全体を通じて高いレートの固定レートを適用する必要がなく、画像記録媒体55の記録時間を長くすることができる。   The transmission buffer memory 49 may be provided as necessary. In such a case, the transmission buffer memory 49 temporarily stores the variable length code data and then reads out the variable length code by reading it at a constant bit rate. Data is smoothed and output as a bit stream. The bit stream output from the transmission buffer memory 49 is multiplexed with, for example, an encoded audio signal, a synchronization signal, etc., and further added with an error correction code to perform predetermined modulation suitable for transmission or recording. After being added, for example, it is transmitted to an image decoding apparatus via a transmission path, or recorded on an image recording medium 55 made up of an optical disk, a magnetic disk, a magnetic tape or the like as shown in FIG. That is, in the second encoding circuit 40, variable rate coding is performed by increasing the allocated code amount bi for a complex image in advance and decreasing the allocated code amount bi for a simple image, for example. Therefore, it is not necessary to apply a high fixed rate throughout the image in order to avoid extreme image quality degradation with respect to an image with a complicated pattern as in the conventional apparatus, and the recording time of the image recording medium 55 is increased. can do.

送信バッファメモリ49を設けない場合、あるいは小容量のメモリを設ける場合には、可変ビットレートで出力ビットストリームが画像記録媒体55に供給されることになるが、記録レートを可変制御でき最高記録レートが出力ビットストリームの最高ビットレート以上の記録装置を用いることにより、画像記録媒体55の全記録容量あるいは上記使用可能なデータ総量Bをオーバーフローすることがない範囲で、1シーケンスの映像信号を記録することができ、画像記録媒体55の全記録容量を、複雑な画像には多く、単純な画像には少なく割り当てて、全体として良好な画質が得られるように、媒体容量の最適の有効利用を図ることができる。   When the transmission buffer memory 49 is not provided or when a small-capacity memory is provided, the output bit stream is supplied to the image recording medium 55 at a variable bit rate. However, the recording rate can be variably controlled and the maximum recording rate can be controlled. By using a recording device having a bit rate higher than the maximum bit rate of the output bit stream, one sequence of video signals is recorded in a range that does not overflow the total recording capacity of the image recording medium 55 or the total usable data amount B. It is possible to allocate the total recording capacity of the image recording medium 55 to a large amount for a complex image and a small amount to a simple image so as to obtain a good image quality as a whole. be able to.

以上説明した本発明の実施の形態からも明らかなように、第1の符号化回路10において、所定時間毎に符号化の難易度(difficulty)を計算するために、標準量子化値を予め設定し、バッファの占有量による制御を行なわず、適応量子化のみでDCT係数を量子化し符号量を求めており、適応量子化は、固定の標準量子化値とした時の符号化情報量に加え、画像の明るさ、平坦度、色度、画像の動きのような画像特性情報を所定時間毎に計算し、ビットレート演算回路では、これらの画像特性情報と、符号化情報量と、使用可能なデータ総量とに基づいて、所定時間毎に割り当てられる割当符号量、例えばフレーム時間毎の平均符号化レートを求めている。   As is clear from the embodiment of the present invention described above, a standard quantization value is set in advance in the first encoding circuit 10 in order to calculate an encoding difficulty level every predetermined time. However, the code amount is obtained by quantizing the DCT coefficient only by adaptive quantization without performing control based on the buffer occupancy, and adaptive quantization is added to the amount of encoded information when a fixed standard quantization value is used. Image characteristic information such as image brightness, flatness, chromaticity, and image motion is calculated every predetermined time, and the bit rate calculation circuit can use the image characteristic information and the amount of encoded information. Based on the total amount of data, an allocated code amount allocated every predetermined time, for example, an average encoding rate for each frame time is obtained.

ここで、上記画像の明るさとしては、例えば、輝度信号Yの所定時間毎の平均値(L)を、平坦度としては、例えば、輝度信号Yの所定時間毎の分散値(V)を、色度としては、例えば、色度信号Crの所定時間毎の平均値(R)を、画像の動きとしては、例えば、マクロブロックの動きベクトル量の所定時間毎の平均値(M)を、それぞれ用いている。   Here, as the brightness of the image, for example, the average value (L) of the luminance signal Y every predetermined time, and as the flatness, for example, the variance value (V) of the luminance signal Y every predetermined time, As the chromaticity, for example, an average value (R) per predetermined time of the chromaticity signal Cr, and as the image motion, for example, an average value (M) per predetermined time of the motion vector amount of the macroblock, respectively. Used.

第2の符号化回路40では、仮符号化(第1の符号化)で得られた所定時間毎の発生符号量に対して、目標符号量を決めて、量子化ステップサイズあるいは量子化値を制御して、画像の符号化を行なう。すなわち、各所定時間毎に、人間の視覚特性に応じた符号量が配分されるように、暗い画像のノイズを知覚しやすい部分で量子化ステップサイズを小さくし、画面の平坦部分ほど量子化ステップサイズを小さくし、赤レベルが大きいほど量子化ステップサイズを小さくし、動きベクトル量が大きい(動きが速い)ほど量子化ステップサイズを大きくしている。   In the second encoding circuit 40, a target code amount is determined with respect to the generated code amount for each predetermined time obtained by the temporary encoding (first encoding), and the quantization step size or the quantization value is set. Control and perform image coding. That is, at each predetermined time, the quantization step size is reduced at a portion where the noise of dark images is easily perceived so that a code amount corresponding to human visual characteristics is allocated, and the quantization step is performed at a flat portion of the screen. The size is reduced, the quantization step size is reduced as the red level is increased, and the quantization step size is increased as the motion vector amount is increased (motion is faster).

このように、人間の視覚特性が反映された符号化を行うことにより、絵柄によって符号化画質の主観的印象が悪い場合、例えば、画像の暗い部分や、赤い部分や、平坦な部分等でも、符号化ノイズ(ブロックノイズ、モスキートノイズ)が目立つことを未然に回避できる。   In this way, by performing encoding that reflects human visual characteristics, if the subjective impression of encoded image quality is bad depending on the design, for example, even in the dark part, red part, flat part, etc. of the image, The conspicuous encoding noise (block noise, mosquito noise) can be avoided in advance.

ここで、上記第2の符号化回路40で、i番目のマクロブロックでの発生符号量をb'i とすると、シーケンスを符号化し終えた時、すべてのb'i についての総和は、下記の式16を満たさねばならない。   Here, assuming that the generated code amount in the i-th macroblock is b′i in the second encoding circuit 40, when the sequence has been encoded, the sum total for all b′i is as follows: Equation 16 must be satisfied.

Figure 2009005417
Figure 2009005417

このため失敗するケースを減らすために、符号化制御回路30から割当てる符号量の総和を、実際のBよりも少なめに、例えばBの95%くらいに控えることは有効である。また、一シーケンスの長さを、例えば4分割し、それぞれの小シーケンスの中で、それぞれBの1/4を目標符号量として符号化しきるように制御することが有効な場合もある。   For this reason, in order to reduce the number of failure cases, it is effective to refrain from the total amount of codes allocated from the encoding control circuit 30 to be less than the actual B, for example, about 95% of B. In some cases, it may be effective to divide the length of one sequence into, for example, four parts, and to perform encoding so that ¼ of B is the target code amount in each small sequence.

以上説明したような本発明に係る実施の形態の信号符号化方法あるいは装置は、いわゆる1パスのエンコーダであり、ほぼリアルタイムで入力信号の符号化が行える。これに対し、いわゆる2パスのエンコーダ、すなわち、第1の符号化の際には予め1シーケンス分の全ての符号化難易度diを計算し、この全ての符号化難易度diと使用可能なデータ総量に基づいて、所定時間毎に割り当てられる割当符号量を求め、第2の符号化の際は、第1の符号化で求めた符号量配分に応じてビットレート制御を行なうような符号化方法や装置においては、信号を入力してから出力までに少なくとも1シーケンス分だけ待ち時間あるいは遅延時間が必要とされる。   The signal encoding method or apparatus according to the embodiment of the present invention as described above is a so-called one-pass encoder, and can encode an input signal almost in real time. In contrast, a so-called two-pass encoder, that is, all the encoding difficulty levels di for one sequence are calculated in advance in the first encoding, and all the encoding difficulty levels di and usable data are calculated. An encoding method in which an allocated code amount allocated every predetermined time is obtained based on the total amount, and bit rate control is performed according to the code amount distribution obtained in the first encoding in the second encoding. In apparatuses and apparatuses, a waiting time or delay time of at least one sequence is required from the input of a signal to the output.

従って、上述したような本実施の形態によれば、上記2パスのエンコーダと比較して、世の中のほとんどのシーケンスについて、リアルタイム(実時間)で伝送用のビットレート生成が可能となるので、大幅な時間の節約が実現される。   Therefore, according to the present embodiment as described above, it is possible to generate a bit rate for transmission in real time (real time) for most sequences in the world as compared with the two-pass encoder. Saving time.

なお、本発明の実施の形態のような1パスの符号化と、従来の2パスの符号化とを組み合わせるようにしてもよい。   Note that one-pass encoding as in the embodiment of the present invention may be combined with conventional two-pass encoding.

すなわち。符号化制御回路30が用意する符号化難易度と割当符号量の関係は、ほとんどの動画シーケンスに適用できるが、いくつかの特殊なシーケンスには対応できず、一般化されたモデルの式7を満たすことが困難な場合には、2パスの符号化、すなわち第1の符号化回路で、1シーケンス分のすべての符号化難易度diを計算した後、ビットレート演算回路では、diと使用可能なデータ総量に基づいて、所定時間毎に割り当てられる割当符号量、例えばフレーム時間毎の平均符号化レートを求め、第2の符号化回路では、第1の符号化で求めた符号量配分に応じてビットレート制御を行なうようにしてもよい。   That is. The relationship between the encoding difficulty level and the allocated code amount prepared by the encoding control circuit 30 can be applied to most moving image sequences, but cannot correspond to some special sequences. When it is difficult to satisfy the condition, after calculating all the coding difficulty levels di for one sequence by the first pass coding, that is, the first coding circuit, the bit rate arithmetic circuit can use di. Based on the total amount of data, an allocated code amount allocated every predetermined time, for example, an average encoding rate for each frame time is obtained, and the second encoding circuit responds to the code amount distribution obtained in the first encoding. Thus, bit rate control may be performed.

第2の実施の形態
ところで、上述の第1の実施の形態では、所定時間当たりの割当符号量、すなわち所定時間当たりの平均符号化レートを、マクロブロックを所定時間としてマクロブロック毎に得るようにしているが、本発明はこれに限定されるものではない。例えば、フレームを所定時間とする場合も同様である。この場合は、上記式1〜式5における、yi,Li,Ri,Vi,Miのパラメータ群を1フレーム時間を所定時間として計算する。それらパラメータ群に基づいて、各フレーム毎にその割当符号量biを上記式7により求めることができる。
Second Embodiment By the way, in the first embodiment described above, the allocated code amount per predetermined time, that is, the average coding rate per predetermined time is obtained for each macro block with the macro block as the predetermined time. However, the present invention is not limited to this. For example, the same applies when the frame is set to a predetermined time. In this case, the parameter group of yi, Li, Ri, Vi, and Mi in the above formulas 1 to 5 is calculated with one frame time as a predetermined time. Based on these parameter groups, the allocated code amount bi can be obtained for each frame by the above equation (7).

この第2の実施の形態の場合のLi,Ri,Vi,Miの計算方法は、1フレームでの全てのマクロブロックの平均値としても良いし、1フレームの中で指定された一部のマクロブロックの平均値としても良い。後者の方法は、レターボックスフォーマット、すなわち4:3の画面に16:9の画像を表示するためにフレームの上下が黒帯でマスクされているフォーマットの画像を扱う場合に有効である。この場合、画像の上下の黒帯のマスク部分を除いた中央の有効な画像部分を構成するマクロブロックについて、Li,Ri,Vi,Miを計算する。この方法では、フレームの中央の有効な画像部分についての性質を正確にとらえることができ、上記黒帯のマスク部分の計算を省略することができるので有効である。   The calculation method of Li, Ri, Vi, and Mi in the second embodiment may be an average value of all macroblocks in one frame, or a part of macros specified in one frame. It is good also as an average value of a block. The latter method is effective when dealing with an image in a letterbox format, that is, a format in which a 16: 9 image is displayed on a 4: 3 screen and the upper and lower frames are masked with black bands. In this case, Li, Ri, Vi, and Mi are calculated for macroblocks that constitute the central effective image portion excluding the upper and lower black belt mask portions of the image. This method is effective because the properties of the effective image portion at the center of the frame can be accurately grasped and the calculation of the mask portion of the black belt can be omitted.

この第2の実施の形態における第2の符号化回路40では、上述の第1の実施の形態と比べ、量子化スケール設定回路33において、マクロブロック毎の割当符号量を計算する必要がある。この場合、量子化スケール設定回路33は、供給されたフレーム毎の割当符号量biから、マクロブロック毎の割当符号量を、例えば、フレーム毎の割当符号量biを1フレーム中のマクロブロックの数で割ったものとする。送信バッファ49からのバッファフィードバック制御は、上述の第1の実施の形態と同じである。   In the second encoding circuit 40 according to the second embodiment, it is necessary to calculate the allocated code amount for each macroblock in the quantization scale setting circuit 33 as compared with the first embodiment described above. In this case, the quantization scale setting circuit 33 calculates the allocated code amount for each macroblock from the supplied allocated code amount bi for each frame, for example, the allocated code amount bi for each frame is the number of macroblocks in one frame. Divided by. Buffer feedback control from the transmission buffer 49 is the same as that in the first embodiment.

この第2の実施の形態では、割当符号量biをフレームに基づいて求めていることから、上述の第1の実施の形態に比して、すべてのbiを記憶するために必要なメモリ量を節約することが可能である。   In the second embodiment, since the allocated code amount bi is obtained based on the frame, the memory amount necessary to store all the bi is smaller than that in the first embodiment. It is possible to save.

第3の実施の形態
上述の実施の形態では、所定時間当たりの割当符号量すなわち所定時間当たりの平均符号化レートを、フレームを所定時間としてフレーム毎に得るようにしているが、本発明はこれに限定されるものではない。例えば、所謂MPEG(Moving Picture ExpertGroup)におけるGOP(Group of Picture)を所定時間としてもよい。なお、上述のMPEGは、所謂ISO(国際標準化機構)とIEC(国際電気標準会議)のJTC(Joint Technical Committee )1におけるSC(Sub Committee )29のWG(Working Group )11において検討されている動画像符号化方式の通称である。
Third Embodiment In the above-described embodiment, the allocated code amount per predetermined time, that is, the average coding rate per predetermined time is obtained for each frame with the frame as the predetermined time. It is not limited to. For example, a GOP (Group of Picture) in a so-called MPEG (Moving Picture Expert Group) may be set as the predetermined time. Note that the above-mentioned MPEG is a moving image that is being studied in the WG (Working Group) 11 of the SC (Sub Committee) 29 in the JTC (Joint Technical Committee) 1 of the so-called ISO (International Organization for Standardization) and IEC (International Electrotechnical Commission). It is a common name for image coding.

すなわち、この第3の実施の形態において、上記MPEGにおけるGOPは、少なくとも1枚の所謂Iピクチャと、複数枚のPピクチャ又はBピクチャ(非Iピクチャ)とから構成される。具体的には、例えば図12に示すように、1枚のIピクチャと、3ピクチャ周期の4枚のPピクチャと、10枚のBピクチャとから構成されるとすると、符号化制御回路30は、GOP毎に割当符号量を求める。ここで、Iピクチャとは、フィールド内若しくはフレーム内符号化される画像であり、Pピクチャとは、前方向からのみ予測可能とされ、フィールド間若しくはフレーム間符号化される画像であり、Bピクチャとは、前方向から、後方向から、および両方向から予測可能とされ、フィールド間若しくはフレーム間符号化される画像である。   That is, in the third embodiment, the MPEG GOP is composed of at least one so-called I picture and a plurality of P pictures or B pictures (non-I pictures). Specifically, for example, as shown in FIG. 12, if the encoding control circuit 30 is composed of one I picture, four P pictures in a three-picture cycle, and ten B pictures, The allocated code amount is obtained for each GOP. Here, an I picture is an image that is encoded in a field or in a frame, and a P picture is an image that can be predicted only from the forward direction and is encoded between fields or between frames. Is an image that can be predicted from the forward direction, the backward direction, and from both directions, and is encoded between fields or between frames.

そして、第1の符号化回路10において、例えば図13に示すように、GOPを構成するピクチャ数を周期としてGOP内の連続する任意の2枚のピクチャを仮にIピクチャ、Pピクチャとすると共に、量子化ステップサイズを例えば1として、これらのIピクチャ、Pピクチャの画像データに予測符号化処理、DCT変換処理、可変長符号化処理を施して、可変長符号データを生成し、この可変長符号データを符号化制御回路30に供給する。ここで、2枚のピクチャをIピクチャ、Pピクチャとするのは、絵柄の複雑さと、フレーム間の相関性を調べるためであり、Iピクチャの発生符号量から絵柄の複雑さを知ることができ、Pピクチャの発生符号量からフレーム間の相関性を知ることができる。一般的に、連続する複数のフレームは類似した画像をもつため、抽出した2枚のピクチャからでも、GOPの絵柄の傾向を見ることができる。   Then, in the first encoding circuit 10, for example, as shown in FIG. 13, any two consecutive pictures in the GOP with the number of pictures constituting the GOP as a cycle are temporarily set as an I picture and a P picture, For example, assuming that the quantization step size is 1, the image data of these I picture and P picture is subjected to predictive coding processing, DCT conversion processing, and variable length coding processing to generate variable length code data. Data is supplied to the encoding control circuit 30. Here, the reason why the two pictures are the I picture and the P picture is to check the complexity of the picture and the correlation between the frames, and the complexity of the picture can be known from the generated code amount of the I picture. The correlation between frames can be known from the generated code amount of the P picture. In general, since a plurality of consecutive frames have similar images, the tendency of the GOP pattern can be seen from two extracted pictures.

符号化制御回路30は、Iピクチャのデータ量 bitIj とPピクチャのデータ量 bitPj をGOP毎に計数すると共に、例えば下記式17に示すように、これらのデータ量 bitIj 、 bitPj と、GOPを構成するPピクチャの枚数Nとに基づいて、発生符号量GOPyj (j=0、1、2・・・)をGOP毎に求める。   The encoding control circuit 30 counts the data amount bitIj of the I picture and the data amount bitPj of the P picture for each GOP, and configures these data amounts bitIj, bitPj and GOP as shown in the following Expression 17, for example. Based on the number of P pictures N, the generated code amount GOPyj (j = 0, 1, 2,...) Is obtained for each GOP.

GOPyj = bitIj +N× bitPj ・・・式17
そして、符号化制御回路30は、このGOP毎の発生符号量GOPyj と、使用可能なデータ総量に基づいて、GOP毎に割り当てられる割当符号量を求めると共に、この割当符号量を第2の符号化回路40に供給する。
GOPyj = bitIj + N × bitPj Expression 17
Then, the encoding control circuit 30 obtains the allocated code amount allocated for each GOP based on the generated code amount GOPyj for each GOP and the total usable data amount, and the allocated code amount is second encoded. Supply to circuit 40.

具体的には、全GOP数をMとし、使用可能なデータ総量をBとし、j(j=0、1、2・・・M−1)番目のGOPの発生符号量をGOPyj とし、j番目のGOPでの輝度信号Yの平均値をLj、分散をVjとし、色度信号Crの平均値をRjとし、動きベクトル量の平均値をMjとし、それぞれ関数f 、f 、f 、f の特性から画像の絵柄の主観的印象を符号化難易度GOPdj へ反映する係数α,β,γ,θを求め、式22に示すように、それらとGOPyj の積により、符号化難易度GOPdj を求める。関数f 、f 、f 、f のそれぞれの特性は、上述した図3〜図6に示したものと同じものが適用できる。 Specifically, the total number of GOPs is M, the total usable data amount is B, the generated code amount of the j (j = 0, 1, 2,... M−1) th GOP is GOPyj, and the jth In the GOP, the average value of the luminance signal Y is Lj, the variance is Vj, the average value of the chromaticity signal Cr is Rj, the average value of the motion vector amount is Mj, and the functions f 1 , f 2 , f 3 , coefficients reflect the characteristics of f 4 the subjective impression of the pattern of the image to the coding difficulty GOPdj α j, β j, γ j, seeking theta j, as shown in equation 22, by the product thereof with GOPyj, The encoding difficulty GOPdj is obtained. As the characteristics of the functions f 1 , f 2 , f 3 and f 4 , the same characteristics as those shown in FIGS. 3 to 6 can be applied.

ビットレート演算回路32は、j番目のGOPに対する割当符号量GOPbj を下記式23に従って計算する。ここで、a,cは定数であり、1シーケンスでの上記式1に示す平均ビットレートSQBRに応じて決定される値である。   The bit rate calculation circuit 32 calculates the allocated code amount GOPbj for the j-th GOP according to the following equation (23). Here, a and c are constants, and are values determined in accordance with the average bit rate SQBR shown in Equation 1 in one sequence.

α = f(Lj) ・・・式18
β = f(Rj) ・・・式19
γ = f(Vj) ・・・式20
θ = f(Mj) ・・・式21
GOPdj = α×β×γ×θ×GOPyj ・・・式22
GOPbj = a×GOPdj + c ・・・式23
なお、上記式23のような線形の関係式を用いないで、テーブル・ルックアップで割当符号量GOPbj を求めるようにしてもよい。
α j = f 1 (Lj) Equation 18
β j = f 2 (Rj) Equation 19
γ j = f 3 (Vj) Equation 20
θ j = f 4 (Mj) Equation 21
GOPdj = α j × β j × γ j × θ j × GOPyj Equation 22
GOPbj = a × GOPdj + c (Equation 23)
Note that the allocated code amount GOPbj may be obtained by table lookup without using a linear relational expression such as Expression 23 above.

かくして、符号化制御回路30は、例えば絵柄が複雑な画像が含まれる或いはフレーム間の相関が低いGOPに対しては割当符号量GOPbj を多くし、逆に単純な絵柄の画像が含まれる或いはフレーム間の相関が高いGOPに対しては割当符号量GOPbj を少なくする。   Thus, the encoding control circuit 30 increases the allocated code amount GOPbj for, for example, a GOP having a complex picture or a low correlation between frames, and conversely a simple picture or frame. For GOPs having a high correlation between them, the allocated code amount GOPbj is reduced.

次に、第2の符号化回路40は、例えば図14に示すように、ステップST21において遅延器43を介して画像データが入力されると、ステップST22において、現在入力されている画像データがGOPの先頭ピクチャかを判断し、該当するときはステップST23に進み、該当しないときはステップST24に進む。   Next, as shown in FIG. 14, for example, when the image data is input via the delay unit 43 in step ST21, the second encoding circuit 40 determines that the currently input image data is GOP in step ST22. If it is applicable, the process proceeds to step ST23. Otherwise, the process proceeds to step ST24.

ステップST23において、第2の符号化回路40は、現在符号化の対象とされているGOPに対する割当符号量を符号化制御回路30から読み込み、ステップST24に進む。   In step ST23, the second encoding circuit 40 reads the allocated code amount for the GOP currently being encoded from the encoding control circuit 30, and proceeds to step ST24.

ステップST24において、第2の符号化回路40は、画像データに予測符号化処理、DCT変換処理を施すと共に、割当符号量に基づいた量子化ステップサイズにより係数データを量子化した後、可変長符号化し、ステップST25に進む。   In step ST24, the second encoding circuit 40 performs predictive encoding processing and DCT conversion processing on the image data, and after quantizing the coefficient data with a quantization step size based on the allocated code amount, Go to step ST25.

ここで、量子化スケール設定回路33は、供給されたGOP毎の割当符号量から、フレーム毎の割当符号量を、実際の符号化におけるピクチャタイプ(Iピクチャ、Pピクチャ、Bピクチャ)、すなわち図12に示されるピクチャタイプを考慮して設定する。具体的には、Iピクチャに対する割当符号量を多くし、Bピクチャに対する割当符号量を少なくし、Pピクチャに対する割当符号量をその中間とする。量子化スケール設定回路33の以降の処理は、上述のフレーム毎に割当符号量を求めた実施の形態と同様である。   Here, the quantization scale setting circuit 33 converts the allocated code amount for each frame from the supplied allocated code amount for each GOP to the picture type (I picture, P picture, B picture) in actual encoding, that is, 12 is set in consideration of the picture type shown in FIG. Specifically, the allocated code amount for the I picture is increased, the allocated code amount for the B picture is decreased, and the allocated code amount for the P picture is set in the middle. The subsequent processing of the quantization scale setting circuit 33 is the same as that in the embodiment in which the allocated code amount is obtained for each frame described above.

次にステップST25において、同一の画面サイズや同一の転送レートが適用される全フレーム(シーケンス)に対して符号化処理が終了したかが判断され、該当するときは終了し、該当しないときはステップST21に戻る。かくして、GOP単位で符号化レートが変わる可変レート符号化が実現され、絵柄が複雑な画像(フレーム)が連続しても、これらの画像に対して量子化ステップサイズが従来の装置のように大きくされることなく、全体を通じて均等な高画質を得ることができる。また、この実施の形態ではGOP毎の割当符号量を2つのピクチャに基づいて求めていることから、上述の実施の形態に比して高速処理が可能である。なお、GOP内の全ピクチャのデータ量に基づいて各GOPの割当符号量を求めるようにしてもよいことは言うまでもない。   Next, in step ST25, it is determined whether or not the encoding process has been completed for all frames (sequences) to which the same screen size and the same transfer rate are applied. If applicable, the process ends. Return to ST21. In this way, variable rate coding in which the coding rate is changed in units of GOP is realized, and even if images (frames) with complicated patterns are continuous, the quantization step size for these images is large as in the conventional device. Therefore, uniform image quality can be obtained throughout. Further, in this embodiment, since the allocated code amount for each GOP is obtained based on two pictures, high-speed processing is possible as compared with the above-described embodiment. Needless to say, the allocated code amount of each GOP may be obtained based on the data amount of all the pictures in the GOP.

第4の実施の形態
次に、本発明を適用した画像符号化装置の第4の実施の形態について、図15を参照しながら説明する。
Fourth Embodiment Next, a fourth embodiment of an image encoding device to which the present invention is applied will be described with reference to FIG.

この第4の実施の形態と、上記第1〜第3の実施の形態とでは、次に示すような2つの相違点がある。すなわち、第1に、図1の第1の符号化回路10がなく符号化難易度の求め方が異なっており、第2に、ビットレート演算回路32の動作が異なっている。以下に、これらの違いについて説明する。   The fourth embodiment and the first to third embodiments have the following two differences. That is, first, there is no first encoding circuit 10 in FIG. 1, and the method of obtaining the encoding difficulty is different, and secondly, the operation of the bit rate calculation circuit 32 is different. Hereinafter, these differences will be described.

この図15に示す第4の実施の形態の画像符号化装置は、入力映像信号の統計的性質を求める画像解析回路60と、該画像解析回路60からの統計データ、及び使用可能なデータ総量に基づいて所定時間毎の符号化レートを求める符号化制御回路30と、該符号化制御回路30からの符号化レートに基づいて上記所定時間毎に上記入力映像信号を符号化して符号化データを生成する符号化回路40とを備える。   The image coding apparatus according to the fourth embodiment shown in FIG. 15 has an image analysis circuit 60 that obtains statistical properties of an input video signal, statistical data from the image analysis circuit 60, and the total amount of usable data. A coding control circuit 30 for obtaining a coding rate for each predetermined time based on the coding rate, and generating the coded data by coding the input video signal for each predetermined time based on the coding rate from the coding control circuit 30 Encoding circuit 40.

画像解析回路60では、入力映像信号の統計的性質に基づく情報あるいは画像特性情報を求めており、この画像特性情報として、例えば、輝度信号Yの所定時間毎の平均値(L)を計算し、また入力画像の色度についての統計情報、例えば、色度信号Crの所定時間毎の平均値(R)を計算し、また入力画像の平坦度の統計情報、例えば、輝度信号Yの所定時間毎の分散値(V)を計算し、入力画像の動き量の統計情報、例えば、動きベクトル量の所定時間毎の平均値(M)を計算し、さらに、画像間差分情報、例えば動きベクトルの画像間予測残差の所定時間毎の絶対値和(E)を計算する。   The image analysis circuit 60 obtains information or image characteristic information based on the statistical properties of the input video signal. As this image characteristic information, for example, an average value (L) for each predetermined time of the luminance signal Y is calculated, Further, statistical information on the chromaticity of the input image, for example, an average value (R) of the chromaticity signal Cr every predetermined time is calculated, and statistical information on the flatness of the input image, for example, every predetermined time of the luminance signal Y The variance value (V) of the input image is calculated, the statistical information of the motion amount of the input image, for example, the average value (M) of the motion vector amount per predetermined time is calculated, and further, the difference information between images, for example, the motion vector image An absolute value sum (E) for each predetermined time of the inter prediction residual is calculated.

すなわち、動きベクトルの画像間予測残差としては、符号化対象マクロブロックの輝度信号Yj と、動きベクトルにより参照されるマクロブロックの輝度信号Ri の差の絶対値の和Eを求める。   That is, as the inter-picture prediction residual of the motion vector, a sum E of absolute values of differences between the luminance signal Yj of the encoding target macroblock and the luminance signal Ri of the macroblock referred to by the motion vector is obtained.

Figure 2009005417
Figure 2009005417

なお、Eについては、絶対値和の代わりに二乗和を用いてもよい。 For E, a sum of squares may be used instead of the sum of absolute values.

この画像符号化装置では、例えば図16に示すように、ステップST31において、符号化難易度(difficulty)を表す入力映像信号の統計的性質の情報である画像特性情報、ここではマクロブロックの輝度信号Yの平均値Lと分散V、そして色度信号Crの平均値R、そしてマクロブロックの動きベクトル量の平均値Mと動きベクトルの画像間予測残差の絶対値和Eを、所定時間毎、例えばマクロブロック毎に求める。なお、マクロブロックがイントラ符号化モード、いわゆるIピクチャの場合は、上記動きベクトルの画像間予測残差の絶対値和を計算するよりも、むしろマクロブロック内の平均値分離残差の絶対値和を計算することが好ましい。   In this image encoding device, for example, as shown in FIG. 16, in step ST31, image characteristic information that is statistical property information of an input video signal representing the difficulty of encoding (difficulty), here, a luminance signal of a macroblock The average value L and variance V of Y, the average value R of the chromaticity signal Cr, the average value M of the motion vector amount of the macroblock, and the absolute value sum E of the inter-picture prediction residuals of the motion vector are calculated every predetermined time, For example, it is calculated for each macro block. If the macroblock is an intra coding mode, that is, a so-called I picture, the absolute value sum of the average value separation residuals in the macroblock is calculated rather than calculating the absolute value sum of the inter-picture prediction residuals of the motion vector. Is preferably calculated.

すなわち、イントラ符号化モードのブロック内の平均値分離残差の絶対値和として、符号化対象マクロブロックの輝度信号Yi と、マクロブロックの輝度信号Yi の平均値Yavとの差の絶対値和Eを、次の式25により求める。   That is, the absolute value sum E of the difference between the luminance signal Yi of the encoding target macroblock and the average value Yav of the macroblock luminance signal Yi is used as the absolute value sum of the average value separation residuals in the block of the intra coding mode. Is obtained by the following equation 25.

Figure 2009005417
Figure 2009005417

なお、この式25のEについて、絶対値和の代わりに、二乗和、すなわち上記分散値Vを用いるようにしてもよい。 For E in Equation 25, the sum of squares, that is, the variance value V may be used instead of the absolute value sum.

次のステップST32において、ビットレート演算回路32は、マクロブロック毎の輝度信号の平均値と分散と、色度信号の平均値と、動きベクトル量の平均値と、動きベクトルの画像間予測残差又は輝度信号の平均値分離残差と、使用可能なデータ総量に基づいて、マクロブロック毎に割り当てられる割当符号量を求める。   In the next step ST32, the bit rate calculation circuit 32 calculates the average value and variance of the luminance signal for each macroblock, the average value of the chromaticity signal, the average value of the motion vector amount, and the inter-picture prediction residual of the motion vector. Alternatively, the assigned code amount assigned to each macroblock is obtained based on the average value separation residual of the luminance signal and the total usable data amount.

次のステップST33において、符号化回路40の量子化回路46は、割当符号量に基づいた量子化ステップサイズにより、DCT回路45から供給される係数データを量子化して、量子化データを生成するようになっている。   In the next step ST33, the quantization circuit 46 of the encoding circuit 40 quantizes the coefficient data supplied from the DCT circuit 45 with a quantization step size based on the assigned code amount so as to generate quantized data. It has become.

ここで、ビットレート演算回路32の具体的な動作を説明する。ビットレート演算回路32は、シーケンスの全マクロブロック数をNとし、i(i=0、1、2・・・N−1)番目のマクロブロックの輝度信号Yの平均値をLi、分散をViとし、色度信号Crの平均値をRiとし、動きベクトル量の平均値をMiとし、関数f 、f 、f 、f の特性から画像の絵柄の主観的印象を符号化難易度di へ反映する係数α ,β ,γ ,θ を求める。また、動きベクトルの画像間予測残差の絶対値和Eに基づき、関数f の特性から、そのマクロブロックの発生符号量の推定値、すなわち上記第1の実施の形態でのyiに相当するものy'i を経験的に推定する。そして、下記の式31に示すように、各係数α ,β ,γ ,θ と発生符号量の推定値y'i との積により、符号化難易度diを求めている。 Here, a specific operation of the bit rate calculation circuit 32 will be described. The bit rate calculation circuit 32 sets N as the total number of macroblocks in the sequence, Li is the average value of the luminance signal Y of the i (i = 0, 1, 2,..., N−1) th macroblock, and Vi is the variance. The average value of the chromaticity signal Cr is Ri, the average value of the motion vector amount is Mi, and the subjective impression of the picture of the image is encoded from the characteristics of the functions f 1 , f 2 , f 3 , and f 4. coefficient to reflect to di α i, β i, γ i, determine the θ i. Further, based on the absolute value sum E of the inter-picture prediction residual of the motion vector, the characteristic of the function f 6, the estimated value of the generated code amount of the macroblock, i.e. corresponding to yi in the first embodiment Things y'i are estimated empirically. Then, as shown in Equation 31 below, the encoding difficulty level di is obtained by the product of each coefficient α i , β i , γ i , θ i and the estimated value y′i of the generated code amount.

α = f(Li) ・・・式26
β = f(Ri) ・・・式27
γ = f(Vi) ・・・式28
θ = f(Mi) ・・・式29
y' = f(Ei) ・・・式30
= α×β×γ×θ×y' ・・・式31
上記関数f 、f 、f 、f の特性の具体例は、上記図3〜図6に示すものを使用できる。また、上記関数f の一例を図17に示す。すなわち、この図17は、動きベクトルの画像間予測残差に対するマクロブロック単位の発生符号量の推定値y' を示している。実験結果から経験的にEとy’とはほぼ比例する関係にあり、i番目のマクロブロックの動きベクトルの画像間予測残差Eiについての発生符号量の推定値y'i は f(Vi)となる。
α i = f 1 (Li) Equation 26
β i = f 2 (Ri) ··· formula 27
γ i = f 3 (Vi) Equation 28
θ i = f 4 (Mi) Equation 29
y ′ i = f 6 (Ei) Equation 30
d i = α i × β i × γ i × θ i × y ′ i Expression 31
As specific examples of the characteristics of the functions f 1 , f 2 , f 3 , and f 4 , those shown in FIGS. 3 to 6 can be used. Further, FIG. 17 shows an example of the function f 6. That is, FIG. 17 shows an estimated value y ′ of the generated code amount for each macroblock with respect to the inter-picture prediction residual of the motion vector. From the experimental results, E and y ′ are empirically proportional to each other, and the generated code amount estimate y′i for the inter-picture prediction residual Ei of the motion vector of the i-th macroblock is f 6 (Vi )

符号化対象マクロブロックがイントラ符号化モードの場合は、マクロブロック内の輝度信号の上記平均値分離残差の絶対値和、又は分散値(V)を用いることが好ましく、この場合には、例えば輝度信号Yの分散Viに基づき、関数f の特性から、そのマクロブロックの発生符号量の推定値y'i を推定する。 When the encoding target macroblock is in the intra coding mode, it is preferable to use the absolute value sum or variance value (V) of the average value separation residual of the luminance signal in the macroblock. In this case, for example, Based on the variance Vi of the luminance signal Y, an estimated value y′i of the generated code amount of the macroblock is estimated from the characteristic of the function f 5 .

y' = f(Vi) ・・・式32
この関数 f(Vi)の具体例を図18に示す。
この図18は、輝度信号Yの分散Vに対するマクロブロック単位の発生符号量の推定値y' を示しており、i番目のマクロブロックの輝度信号Yの分散Viについての発生符号量の推定値y'i は f(Vi)となる。
y ′ i = f 5 (Vi) Equation 32
A specific example of this function f 5 (Vi) is shown in FIG.
FIG. 18 shows an estimated value y ′ of the generated code amount for each macroblock with respect to the variance V of the luminance signal Y. The estimated value y of the generated code amount for the variance Vi of the luminance signal Y of the i-th macroblock. 'i becomes f 5 (Vi).

ビットレート演算回路32は、上記第1の実施の形態と同様に、符号化難易度diに対するi番目のマクロブロックの割当符号量biを下記式33に示すように、計算する。なお、式33のような線形の関係式を用いないで、テーブル・ルック・アップで行なうようにしてもよい。   Similarly to the first embodiment, the bit rate calculation circuit 32 calculates the allocated code amount bi of the i-th macroblock for the encoding difficulty level di as shown in the following Expression 33. Note that a linear relational expression such as Expression 33 may not be used, and the table lookup may be performed.

bi = a×di + c ・・・式33
この関係式33は、多くの動画像シーケンス、例えば多くの映画を符号化実験し、その画質を評価し、思考錯誤を通じて、経験的に求められるものであり、世の中のほとんどのシーケンスに適用可能な一般的な関係式とする。その求め方については、上記第1の実施の形態で説明した式7と同様な方法で作られる。
bi = a × di + c Expression 33
This relational expression 33 is empirically obtained through coding experiments on many moving image sequences, for example, many movies, evaluating the image quality, and thinking and error, and can be applied to most sequences in the world. It is a general relational expression. About how to obtain it, it is made by the same method as Expression 7 explained in the first embodiment.

かくして、ビットレート演算回路32は、例えば複雑な絵柄のフレームに対しては割当符号量を多くし、逆に単純な絵柄のフレームに対しては割当符号量を少なくする。   Thus, for example, the bit rate calculation circuit 32 increases the assigned code amount for a frame with a complex picture, and conversely reduces the assigned code amount for a frame with a simple picture.

符号化回路40の動作は、上記第1の実施の形態で説明した第2の符号化回路40と同じであるので、省略する。   Since the operation of the encoding circuit 40 is the same as that of the second encoding circuit 40 described in the first embodiment, a description thereof will be omitted.

なお、本発明は上述の実施の形態に限定されるものではなく、例えば上述の実施の形態おいては、変換符号化をDCTとしているが、いわゆるストラト変換、ハール変換、ウエーブレット変換等としてもよい。また、取り扱う信号は、画像信号や映像信号に限定されず、例えばオーディオ信号の符号化にも適用でき、字幕データやキャラクタデータの信号等の符号化にも適用できるものである。例えばオーディオ信号の符号化に本発明を適用する場合には、聴覚的な統計情報と、必要に応じて第1の符号化を行って得られた所定時間毎の発生符号量とにより、符号化難易度を求めるようにすればよい。   The present invention is not limited to the above-described embodiment. For example, in the above-described embodiment, the transform coding is DCT, but the so-called Strato transform, Haar transform, wavelet transform, etc. Good. The signals to be handled are not limited to image signals and video signals, and can be applied to encoding of audio signals, for example, and can also be applied to encoding of caption data, character data signals, and the like. For example, when the present invention is applied to encoding of an audio signal, encoding is performed using auditory statistical information and a generated code amount per predetermined time obtained by performing the first encoding as necessary. What is necessary is just to ask for difficulty.

以上の説明からも明らかなように、本発明の実施の形態によれば、入力信号が属する種類の一般の入力信号により予め標準化された所定時間毎の符号化難易度と割当符号量とを関係付け、入力信号の所定時間毎の符号化難易度を求め、この入力信号の所定時間毎の符号化難易度に対して上記関係付けられた上記所定時間毎の割当符号量を求め、この割当符号量に基づいて上記所定時間毎に上記入力信号を符号化して符号化データを生成しているため、信号の入力に応じて、ほぼリアルタイムで、信号の複雑さに応じた最適の割当符号量での符号化が行える。   As is clear from the above description, according to the embodiment of the present invention, the relationship between the encoding difficulty level and the allocated code amount for each predetermined time standardized in advance by a general input signal of the type to which the input signal belongs is related. And determining the encoding difficulty level of the input signal for each predetermined time, determining the allocated code amount for the predetermined time with respect to the encoding difficulty level for the predetermined time of the input signal, and determining the allocation code Since the encoded data is generated by encoding the input signal every predetermined time based on the amount, the optimal allocated code amount corresponding to the complexity of the signal is almost real time according to the input of the signal. Can be encoded.

また、上記符号化難易度を、入力信号の少なくとも一部を符号化して生成された符号化データの上記所定時間毎のデータ量に基づいて求めることにより、複雑な信号が連続しても量子化ステップサイズが極端に大きくされることなく、全体を通じて均等な高品質の符号化データを得ることができる。   Further, the encoding difficulty level is obtained based on the data amount per predetermined time of the encoded data generated by encoding at least a part of the input signal, so that even if a complex signal continues, quantization is performed. Even if the step size is not extremely increased, uniform high-quality encoded data can be obtained throughout.

また、上記入力信号が映像信号の場合に、上記符号化難易度として、入力映像信号の所定時間毎の画像特性情報に基づいて求め、このときの上記画像特性情報として、画像の輝度情報としての輝度信号の所定時間毎の平均値、色度情報としての色度信号の所定時間毎の平均値、平坦度情報としての輝度信号の分散値、画像の動き情報としてのマクロブロックの動きベクトル量の所定時間毎の平均値、画像間差分としてマクロブロックの動きベクトルの画像間予測残差の所定時間毎の総和等を用いることにより、画像特性情報により人間の視覚特性が反映された符号化レートで符号化が行える。   Further, when the input signal is a video signal, the encoding difficulty is obtained based on image characteristic information for each predetermined time of the input video signal, and the image characteristic information at this time is used as luminance information of the image. Average value of luminance signal every predetermined time, average value of chromaticity signal every predetermined time as chromaticity information, variance value of luminance signal as flatness information, macro block motion vector amount as image motion information By using the average value for each predetermined time, the sum of the inter-picture prediction residuals of the motion vector of the macroblock for each predetermined time as the inter-image difference, etc., at a coding rate in which human visual characteristics are reflected by the image characteristic information Can be encoded.

本発明の第1の実施の形態を適用した画像符号化装置の要部の回路構成を示すブロック図である。It is a block diagram which shows the circuit structure of the principal part of the image coding apparatus to which the 1st Embodiment of this invention is applied. 第1の実施の形態の画像符号化装置を構成する第1の符号化回路の動作を説明するためのフローチャートである。It is a flowchart for demonstrating operation | movement of the 1st encoding circuit which comprises the image coding apparatus of 1st Embodiment. 輝度信号Yの平均値Lと係数αの関数f の特性図である。It is a characteristic diagram of the function f 1 of the mean value L and the coefficient α of the luminance signal Y. 色度信号Crの平均値Rと係数βの関数f の特性図である。It is a characteristic diagram of the function f 2 of the mean value R and the coefficient β of the chroma signal Cr. 輝度信号Yの分散値Vと係数γの関数f の特性図である。It is a characteristic diagram of the function f 3 of the variance V and the coefficient γ of the luminance signal Y. 動きベクトル量の平均値Mと係数θの関数f の特性図である。It is a characteristic diagram of the function f 4 of the mean value M and the coefficient of the motion vector amount theta. シーケンス内での符号化難易度dのマクロブロックの出現確率h(d)を示す分布図である。It is a distribution map which shows the appearance probability h (d) of the macroblock of the encoding difficulty d in a sequence. 平均的な符号化難易度が低位、中位、高位の場合の符号化難易度dのマクロブロックの出現確率h(d)を示す分布図である。It is a distribution diagram which shows the appearance probability h (d) of the macroblock of the encoding difficulty level d in case an average encoding difficulty level is low, medium, and high. 符号化難易度dに対するマクロブロックの出現確率h(d)と、割当符号量bとを示す分布図である。It is a distribution map which shows the appearance probability h (d) of the macroblock with respect to the encoding difficulty d, and the allocation code amount b. 符号化難易度dに対し平均ビットレートSQBRを独立変数としたときの割当符号量bを示す分布図である。It is a distribution diagram which shows the allocation code amount b when making average bit rate SQBR into an independent variable with respect to the encoding difficulty d. 第1の実施の形態の画像符号化装置を構成する第2の符号化回路の動作を説明するためのフローチャートである。It is a flowchart for demonstrating operation | movement of the 2nd encoding circuit which comprises the image coding apparatus of 1st Embodiment. MPEGにおけるGOPの構成を説明するための各ピクチャを示す図である。It is a figure which shows each picture for demonstrating the structure of GOP in MPEG. GOP毎の符号化制御信号を説明するための各ピクチャを示す図である。It is a figure which shows each picture for demonstrating the encoding control signal for every GOP. 本発明の第3の実施の形態となる画像符号化装置を構成する第2の符号化回路の動作を説明するためのフローチャートである。It is a flowchart for demonstrating operation | movement of the 2nd encoding circuit which comprises the image coding apparatus used as the 3rd Embodiment of this invention. 本発明の第4の実施の形態を適用した画像符号化装置の要部の回路構成を示すブロック図である。It is a block diagram which shows the circuit structure of the principal part of the image coding apparatus to which the 4th Embodiment of this invention is applied. 該第4の実施の形態の画像符号化装置の要部の動作を説明するためのフローチャートである。It is a flowchart for demonstrating operation | movement of the principal part of the image coding apparatus of this 4th Embodiment. 動きベクトルの画像間予測残差に対するマクロブロック単位の発生符号量の推定値y'iの関数f の特性図である。It is a characteristic diagram of the function f 6 estimates y'i generated code amount of the macroblock units to the image prediction residuals of the motion vector. 輝度信号Yの分散値Vとマクロブロックの発生符号量の推定値y'iの関数f の特性図である。It is a characteristic diagram of the function f 5 estimates y'i of generated code amount of variance V macroblock of the luminance signal Y. 予測符号化の原理を説明するための画像を示す図である。It is a figure which shows the image for demonstrating the principle of predictive encoding. 動き補償予測符号化の原理を説明するための画像を示す図である。It is a figure which shows the image for demonstrating the principle of motion compensation prediction encoding. 画像符号化装置と画像復号化装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of an image coding apparatus and an image decoding apparatus. マクロブロック、スライスの構成を示す図である。It is a figure which shows the structure of a macroblock and a slice. 従来のエンコーダの回路構成の一例を示すブロック図である。It is a block diagram which shows an example of the circuit structure of the conventional encoder. 従来のデコーダの回路構成の一例を示すブロック図である。It is a block diagram which shows an example of the circuit structure of the conventional decoder.

符号の説明Explanation of symbols

10 第1の符号化回路、 14,44 予測符号化回路、 15,45 DCT回路、 16,46 量子化回路、 17,47 可変長符号化回路、 30 符号化制御回路、 31 カウンタ、 32 ビットレート演算回路、 33 量子化スケール設定回路、 40 第2の符号化回路、 43 遅延器、 60 画像解析回路、 61 フレーム内情報解析回路、 62 フレーム間情報解析回路   DESCRIPTION OF SYMBOLS 10 1st encoding circuit, 14,44 Predictive encoding circuit, 15,45 DCT circuit, 16,46 Quantization circuit, 17,47 Variable length encoding circuit, 30 encoding control circuit, 31 counter, 32 bit rate Arithmetic circuit, 33 Quantization scale setting circuit, 40 Second encoding circuit, 43 Delay device, 60 Image analysis circuit, 61 In-frame information analysis circuit, 62 Inter-frame information analysis circuit

Claims (11)

入力信号が属する種類の一般の入力信号により予め標準化された所定時間毎の符号化難易度と割当符号量とを関係付け、
入力信号の所定時間毎の符号化難易度を求め、
この入力信号の所定時間毎の符号化難易度に対して上記関係付けられた上記所定時間毎の割当符号量を求め、
この割当符号量に基づいて上記所定時間毎に上記入力信号を符号化して符号化データを生成すること
を特徴とする信号符号化方法。
Relating the encoding difficulty per predetermined time and the allocated code amount standardized in advance by a general input signal of the type to which the input signal belongs,
Obtain the encoding difficulty level of the input signal every predetermined time,
The allocated code amount for each predetermined time that is related to the encoding difficulty level for each predetermined time of the input signal is obtained,
A signal encoding method, wherein encoded data is generated by encoding the input signal every predetermined time based on the allocated code amount.
上記符号化難易度は、入力信号の少なくとも一部を符号化して生成された符号化データの上記所定時間毎のデータ量に基づいて求めること
を特徴とする請求項1記載の信号符号化方法。
2. The signal encoding method according to claim 1, wherein the encoding difficulty level is obtained based on a data amount per predetermined time of encoded data generated by encoding at least a part of an input signal.
上記入力信号は映像信号であり、
上記符号化難易度は、上記入力映像信号の所定時間毎の画像特性情報に基づいて求めること
を特徴とする請求項1記載の信号符号化方法。
The input signal is a video signal,
2. The signal encoding method according to claim 1, wherein the encoding difficulty level is obtained based on image characteristic information for each predetermined time of the input video signal.
上記画像特性情報は、画像の輝度、色度、平坦度、画像の動き、画像間差分の少なくとも1つを所定時間毎に計算して求める
ことを特徴とする請求項3記載の信号符号化方法。
4. The signal encoding method according to claim 3, wherein the image characteristic information is obtained by calculating at least one of image brightness, chromaticity, flatness, image motion, and inter-image difference every predetermined time. .
上記画像特性情報は、画像の輝度情報としての輝度信号の所定時間毎の平均値、色度情報としての色度信号の所定時間毎の平均値、平坦度情報としての輝度信号の分散値、画像の動き情報としてのマクロブロックの動きベクトル量の所定時間毎の平均値、画像間差分としてマクロブロックの動きベクトルの画像間予測残差の所定時間毎の総和の内の少なくとも1つを求める
ことを特徴とする請求項3記載の信号符号化方法。
The image characteristic information includes an average value of a luminance signal as luminance information of the image every predetermined time, an average value of the chromaticity signal as chromaticity information every predetermined time, a variance value of the luminance signal as flatness information, an image Obtaining at least one of the average value of the motion vector amount of the macroblock as the motion information for each predetermined time and the total sum of the motion vector of the macroblock for the predetermined time as the inter-image difference. 4. A signal encoding method according to claim 3, wherein:
入力信号が属する種類の一般の入力信号により予め標準化された所定時間毎の符号化難易度と割当符号量とを関係付ける符号化制御手段と、
入力信号の所定時間毎の符号化難易度を求めて上記符号化制御手段に送る符号化難易度出力手段と、
上記符号化制御手段により上記符号化難易度出力手段からの符号化難易度と関係付けられて求められた割当符号量に基づいて上記所定時間毎に上記入力信号を符号化して符号化データを生成する符号化手段とを備えること
を特徴とする信号符号化装置。
An encoding control means for relating an encoding difficulty level and an allocated code amount at predetermined time intervals that are standardized in advance by a general input signal of a type to which the input signal belongs;
An encoding difficulty output means for obtaining the encoding difficulty for each predetermined time of the input signal and sending it to the encoding control means;
Encoding data is generated by encoding the input signal every predetermined time based on the assigned code amount obtained in association with the encoding difficulty level from the encoding difficulty output unit by the encoding control unit. And a signal encoding device.
上記符号化手段は、入力信号の少なくとも一部を符号化して生成された符号化データの上記所定時間毎のデータ量に基づいて求めた符号化難易度と上記割当符号量とを関係付ける
ことを特徴とする請求項6記載の信号符号化装置。
The encoding means associates the encoding difficulty obtained based on the data amount per predetermined time of the encoded data generated by encoding at least a part of the input signal and the allocated code amount. The signal encoding apparatus according to claim 6, wherein:
上記入力信号は映像信号であり、
上記符号化制御手段は、上記符号化難易度として入力映像信号の所定時間毎の画像特性情報に基づいて求めたものを用いること
を特徴とする請求項6記載の信号符号化装置。
The input signal is a video signal,
7. The signal coding apparatus according to claim 6, wherein the coding control means uses the coding difficulty obtained based on image characteristic information for each predetermined time of the input video signal.
上記符号化制御手段は、上記画像特性情報として、画像の輝度、色度、平坦度、画像の動き、画像間差分の少なくとも1つを所定時間毎に計算して求めたものを用いること
を特徴とする請求項8記載の信号符号化装置。
The encoding control means uses, as the image characteristic information, information obtained by calculating at least one of image brightness, chromaticity, flatness, image motion, and inter-image difference every predetermined time. The signal encoding apparatus according to claim 8.
上記符号化制御手段は、上記画像特性情報として、画像の輝度情報としての輝度信号の所定時間毎の平均値、色度情報としての色度信号の所定時間毎の平均値、平坦度情報としての輝度信号の分散値、画像の動き情報としてのマクロブロックの動きベクトル量の所定時間毎の平均値、画像間差分としてマクロブロックの動きベクトルの画像間予測残差の所定時間毎の総和の内の少なくとも1つを求めたものを用いること
を特徴とする請求項8記載の信号符号化装置。
The coding control means includes, as the image characteristic information, an average value of a luminance signal as luminance information of the image every predetermined time, an average value of the chromaticity signal as chromaticity information every predetermined time, and as flatness information Of the variance value of the luminance signal, the average value of the motion vector amount of the macroblock as the motion information of the image per predetermined time, and the sum of the prediction residual between the images of the macroblock motion vector as the inter-image difference per predetermined time 9. The signal coding apparatus according to claim 8, wherein at least one obtained is used.
入力信号が属する種類の一般の入力信号により予め標準化された所定時間毎の符号化難易度と割当符号量とを関係付け、入力信号の所定時間毎の符号化難易度対して上記関係付けられた上記所定時間毎の割当符号量を求め、この割当符号量に基づいて上記所定時間毎に上記入力信号を符号化して得られた符号化データが記録されて成ること
を特徴とする信号記録媒体。
The encoding difficulty level for each predetermined time standardized by a general input signal of the type to which the input signal belongs and the allocated code amount are related, and the above-mentioned relationship is set for the encoding difficulty level for each predetermined time of the input signal. A signal recording medium comprising: recorded encoded data obtained by determining an allocated code amount for each predetermined time and encoding the input signal for each predetermined time based on the allocated code amount.
JP2008260100A 1995-05-02 2008-10-06 Encoding apparatus and method Expired - Fee Related JP4636159B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008260100A JP4636159B2 (en) 1995-05-02 2008-10-06 Encoding apparatus and method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP10886095 1995-05-02
JP2008260100A JP4636159B2 (en) 1995-05-02 2008-10-06 Encoding apparatus and method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP31141895A Division JP4223571B2 (en) 1995-05-02 1995-11-29 Image coding method and apparatus

Publications (3)

Publication Number Publication Date
JP2009005417A true JP2009005417A (en) 2009-01-08
JP2009005417A5 JP2009005417A5 (en) 2009-02-19
JP4636159B2 JP4636159B2 (en) 2011-02-23

Family

ID=40321212

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008260100A Expired - Fee Related JP4636159B2 (en) 1995-05-02 2008-10-06 Encoding apparatus and method

Country Status (1)

Country Link
JP (1) JP4636159B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8036268B2 (en) 2009-07-02 2011-10-11 Kabushiki Kaisha Toshiba Moving image encoding apparatus, moving image encoding method, and video device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0541860A (en) * 1991-08-05 1993-02-19 Oki Electric Ind Co Ltd Picture compression coder
JPH05227525A (en) * 1991-10-31 1993-09-03 Toshiba Corp Picture encoder
JPH06141298A (en) * 1992-10-28 1994-05-20 Victor Co Of Japan Ltd Variable transfer rate coder and recording medium
WO1994024822A1 (en) * 1993-04-09 1994-10-27 Sony Corporation Method and apparatus for coding image, and image recording medium
JPH06334968A (en) * 1993-05-24 1994-12-02 Victor Co Of Japan Ltd Coding recorder, coding recording method, recording medium, and reproducing device
JPH0775095A (en) * 1993-09-03 1995-03-17 Toshiba Corp Rate control circuit
JPH07203430A (en) * 1993-12-28 1995-08-04 Sharp Corp Image coding device
JPH07284097A (en) * 1994-04-07 1995-10-27 Matsushita Electric Ind Co Ltd Method and device for encoding picture
JPH07288810A (en) * 1994-04-14 1995-10-31 Matsushita Electric Ind Co Ltd Moving image coding method

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0541860A (en) * 1991-08-05 1993-02-19 Oki Electric Ind Co Ltd Picture compression coder
JPH05227525A (en) * 1991-10-31 1993-09-03 Toshiba Corp Picture encoder
JPH06141298A (en) * 1992-10-28 1994-05-20 Victor Co Of Japan Ltd Variable transfer rate coder and recording medium
WO1994024822A1 (en) * 1993-04-09 1994-10-27 Sony Corporation Method and apparatus for coding image, and image recording medium
JPH06334968A (en) * 1993-05-24 1994-12-02 Victor Co Of Japan Ltd Coding recorder, coding recording method, recording medium, and reproducing device
JPH0775095A (en) * 1993-09-03 1995-03-17 Toshiba Corp Rate control circuit
JPH07203430A (en) * 1993-12-28 1995-08-04 Sharp Corp Image coding device
JPH07284097A (en) * 1994-04-07 1995-10-27 Matsushita Electric Ind Co Ltd Method and device for encoding picture
JPH07288810A (en) * 1994-04-14 1995-10-31 Matsushita Electric Ind Co Ltd Moving image coding method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8036268B2 (en) 2009-07-02 2011-10-11 Kabushiki Kaisha Toshiba Moving image encoding apparatus, moving image encoding method, and video device

Also Published As

Publication number Publication date
JP4636159B2 (en) 2011-02-23

Similar Documents

Publication Publication Date Title
JP4223571B2 (en) Image coding method and apparatus
JP3268306B2 (en) Image coding method
JP3358620B2 (en) Image encoding method and image encoding device
US7170938B1 (en) Rate control method for video transcoding
US5473377A (en) Method for quantizing intra-block DC transform coefficients using the human visual characteristics
US7215710B2 (en) Image coding device and method of image coding
US6628713B1 (en) Method and device for data encoding and method for data transmission
JPH10164581A (en) Method and device for coding image signal and signal-recording medium
JP3707118B2 (en) Image coding method and apparatus
JPH09238366A (en) Image coder, image encoder, and coding decoding system
US7373004B2 (en) Apparatus for constant quality rate control in video compression and target bit allocator thereof
US5606372A (en) Video signal decoding apparatus capable of reducing blocking effects
JPH0879766A (en) Moving image coding method and moving image coder
US5946421A (en) Method and apparatus for compensating quantization errors of a decoded video image by using an adaptive filter
JP2003348597A (en) Device and method for encoding image
JP4636159B2 (en) Encoding apparatus and method
JP3857342B2 (en) Image encoding method and image encoding apparatus
US5614953A (en) Image signal decoding apparatus having an encoding error compensation
JPH0998421A (en) Image encoding/decoding device
KR20010011309A (en) Algorithm and Implementation Method of a Low-Complexity Video Encoder
JPH0993537A (en) Digital video signal recording and reproducing device and digital video signal coding method
JP4359273B2 (en) Coding mode selection method
JP3311312B2 (en) Encoding control method, encoding control device, and recording medium recording encoding control program
JP2002218470A (en) Method for converting image encoded data rate and device for converting image encoding rate
GB2316828A (en) Compensating quantization errors of a decoded video signal by using an adaptive filter

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20081105

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20081127

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100420

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100427

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100628

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100720

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100913

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20101026

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20101108

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

Free format text: PAYMENT UNTIL: 20131203

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20131203

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees