JP2009005417A - Signal encoding method, signal encoding apparatus and signal recording medium - Google Patents
Signal encoding method, signal encoding apparatus and signal recording medium Download PDFInfo
- 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
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
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に示す時刻t1 、t2 、t3 、・・・において動画を構成する各画像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
そして、前処理回路71は、入力映像信号VDを輝度信号と色差信号に分離し、A/D変換回路72a、72bは、輝度信号、色差信号をそれぞれ8ビツトからなる輝度データ、色差データに変換し、フレームメモリ群73は、これらの輝度データ、色差データを記憶する。
The preprocessing
フォーマット変換回路74は、フレームメモリ群73に記憶されている画像データ(輝度データ、色差データ)を、ブロックフォーマットに従って読み出し、エンコーダ75は、この読みだされた画像データを所定の高能率符号化により符号化して、ビットストリームを出力する。
The
そして、このビットストリームは、伝送路や、光ディスク、磁気ディスク、磁気テープ等の画像記録媒体からなる伝送メディア90を介して、画像復号化装置80に供給される。
The bit stream is supplied to the
この画像復号化装置80は、上述の図21に示すように、上記エンコーダ75に対応したデコーダ81と、該デコーダ81で再生された画像データを、フレームフォーマットに変換するフォーマット変換回路82と、該フォーマット変換回路82からの画像データを記憶するフレームメモリ群83と、該フレームメモリ群83から読み出された輝度データ、色差データをアナログ信号に変換するD/A変換回路84a、84bと、該D/A変換回路84a、84bからの輝度信号、色差信号を混合して出力映像信号を生成する後処理回路85とを備える。
As shown in FIG. 21, the
そして、デコーダ81は、エンコーダ75の高能率符号化に対応した復号化によりビットストリームを復号化して、ブロックフォーマットの画像データを再生し、フォーマット変換回路82は、この画像データをフレームフォーマットに変換してフレームメモリ群83に記憶する。
The
D/A変換回路84a、84bは、フレームメモリ群83から読み出された輝度データ、色差データをそれぞれ輝度信号、色差信号に変換し、後処理回路81は、これらの輝度信号、色差信号を混合して出力映像信号を生成する。
The D /
具体的には、前処理回路71及びA/D変換回路72a、72bは、上述したように輝度信号及び色差信号をディジタル信号に変換すると共に、色差信号に対しては上下左右方向に画素数が輝度信号の1/2となるようにデータ量を削減した後、時間軸多重化し、得られる輝度データと色差データをフレームメモリ群73に供給する。
Specifically, the
そして、フレームメモリ群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
エンコーダ75は、図23に示すように、動きベクトル検出回路101を備え、この動きベクトル検出回路101は、ブロックフォーマットで供給される画像データの動きベクトルをマクロブロック単位で検出する。すなわち、動きベクトル検出回路101は、フレームメモリ群102に記憶された前方原画像及び/又は後方原画像を用いて、現在の参照画像の動きベクトルをマクロブロック単位で検出する。ここで、動きベクトルの検出は、マクロブロック単位でのフレーム間差分の絶対値和が最小になるものを、その動きベクトルとする。そして、検出された動きベクトルは動き補償回路113等に供給され、マクロブロック単位でのフレーム間差分の絶対値和はフレーム内/前方/後方/両方向予測判定回路103に供給される。
As shown in FIG. 23, the
このフレーム内/前方/後方/両方向予測判定回路103は、この値をもとに、参照ブロックの予測モードを決定し、決定した予測モードに基づいて、マクロブロック単位でフレーム内/前方/後方/両方向予測の切り換えを行うように予測符号化回路104を制御する。そして、予測符号化回路104は、加算回路104a、104b、104c及び切換スイッチ104dを備え、フレーム内符号化モードのときは入力画像データそのものを、前方/後方/両方向予測モードのときはそれぞれの予測画像に対する入力画像データの画素毎の差分(以下差分データという)を選択し、選択したデータをDCT回路105に供給する。
Based on this value, the intra-frame / forward / backward / bidirectional
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
量子化回路106は、マクロブロック又はスライス毎に定まる量子化ステップサイズ(量子化スケール)を用いて係数データを量子化し、得られる量子化データを可変長符号化(VLC:Variable Length Code)回路107及び逆量子化回路108に供給する。ところで、この量子化に用いる量子化ステップサイズは、後述する送信バッファメモリ109のバッファ残量をフィードバックすることによって、送信バッファメモリ109が破綻しない値に決定され、この量子化ステップサイズも、可変長符号化回路107及び逆量子化回路108に供給される。
The
可変長符号化回路107は、量子化データを、量子化ステップサイズ、予測モード、動きベクトルと共に可変長符号化し、伝送データとして送信バッファメモリ109に供給する。
The variable
送信バッファメモリ109は、伝送データを一旦記憶した後、一定のビットレートで読み出すことにより、伝送データを平滑化してビットストリームとして出力すると共に、メモリに残留している残留データ量に応じてマクロブロック単位の量子化制御信号を量子化回路106にフィードバックして量子化ステップサイズを制御する。これにより送信バッファメモリ109は、ビットストリームとして発生されるデータ量を調整し、メモリ内に適正な残量(オーバーフロー又はアンダーフローを生じさせないようなデータ量)のデータを維持する。例えば、送信バッファメモリ109のデータ残量が許容上限にまで増量すると、送信バッファメモリ109は、量子化制御信号によつて量子化回路106の量子化ステップサイズを大きくすることにより、量子化データのデータ量を低下させる。一方、送信バッファメモリ109のデータ残量が許容下限まで減量すると、送信バッファメモリ109は、量子化制御信号によつて量子化回路106の量子化ステップサイズを小さくすることにより、量子化データのデータ量を増大させる。
The
このようにして、バッファメモリ109から出力されるビットストリームは一定のビットレートで、上述したように伝送路や、光ディスク、磁気ディスク、磁気テープ等の画像記録媒体からなる伝送メディア90を介して、画像復号化装置80に供給される。
In this way, the bit stream output from the
一方、逆量子化回路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
IDCT回路110は、係数データをIDCT変換して、フレーム内符号化モードでは入力画像データに対応する画像データを再生し、前方/後方/両方向予測モードでは予測符号化回路104の出力に対応する差分データを再生して、加算回路111に供給する。
The
この加算回路111には、前方/後方/両方向予測モードのとき、後述する動き補償回路113から動き補償された予測画像データが供給されており、この動き補償された予測画像データと差分データを加算することにより、入力画像データに対応する画像データを再生する。
In the forward / backward / bidirectional prediction mode, the
そして、このようにして再生された画像データは、フレームメモリ112に記憶される。すなわち、逆量子化回路108〜加算回路111は、局所復号化回路を構成し、予測モードに基づいて、量子化回路106から出力される量子化データを局所復号化し、得られる復号画像を前方予測画像もしくは後方予測画像としてフレームメモリ112に書き込む。フレームメモリ112は、複数のフレームメモリからなり、フレームメモリのバンク切り換えが行われ、符号化する画像に応じて、単一のフレームが、前方予測画像データとして出力されたり、後方予測画像データとして出力される。また、両方向予測の場合は、前方予測画像データと後方予測画像データが例えば平均化されて出力される。これらの予測画像データは、後述するデコーダ81で再生される画像と全く同一の画像であり、次の処理画像はこの予測画像をもとに前方/後方/両方向予測符号化が行われる。
The image data reproduced in this way is stored in the
すなわち、フレームメモリ112から読み出された画像データは動き補償回路113に供給され、この動き補償回路113は、動きベクトルに基づいて、予測画像データに動き補償を施し、動き補償された予測画像データを予測符号化回路104及び加算回路111に供給する。
次に、デコーダ81について図24を参照しながら説明する。
That is, the image data read from the
Next, the
この図24に示すデコーダ81には、上記図21の伝送メディア90を介してビットストリームが入力される。このビットストリームは、受信バッファ201を介して可変長復号化(IVLC)回路202に入力される。可変長復号化回路202は、ビットストリームから量子化データ、動きベクトル、予測モード、量子化ステップサイズ等を再生する。これらの量子化データと量子化ステップサイズは逆量子化回路203に供給され、動きベクトルは動き補償回路207に供給され、予測モードは加算回路205に供給される。
The bit stream is input to the
逆量子化回路203〜加算回路205の動作は、上記図23に示すエンコーダ75の局所復号化回路と同様であり、フレームメモリ群206、動き補償回路207の動作はそれぞれエンコーダ75のフレームメモリ112、動き補償回路113と同じであり、量子化データ、動きベクトル、予測モード、量子化ステップサイズをもとに復号化が行われる。この結果、加算回路205から再生画像データが出力され、この再生画像データは、上記図21のフォーマット変換回路82に送られる。
The operations of the inverse quantization circuit 203 to the
従来技術として、特許文献1、2が知られている。
以上のように、従来の装置では、エンコーダ75で発生するビットストリームの符号化ビットレートは伝送メディア90の転送レートにあわせて一定とされ、この制限のもとでデータ発生量、すなわちエンコーダ75における量子化回路106の量子化ステップサイズが制御されていた。換言すると、例えば絵柄が複雑な画像が連続するときは、量子化ステップサイズを大きくしてデータ発生量を抑圧し、逆に単純な絵柄が連続するときは、量子化ステップサイズを小さくしてデータ発生量を増加させることにより、バッファメモリ109のオーバーフロー又はアンダーフローを生じさせないようにして固定レートを保持するようになっていた。
As described above, in the conventional apparatus, the encoding bit rate of the bit stream generated by the
したがって、従来の装置では複雑な画像が連続するときは、量子化ステップサイズが大きくされ、画質が劣化し、単純な画像が連続するときは、量子化ステップサイズが小さくされ、全体を通じて均等な画質を得ることができなかった。 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
上記画像解析回路60は、上述の図1に示すように、フレーム内情報解析回路61とフレーム間情報解析回路62からなる。フレーム内情報解析回路61では、入力画像の画像特性情報として、例えば、輝度,色度,平坦度の統計情報を計算し、フレーム間情報解析回路62では、入力画像の画像特性情報として、例えば、動画像の動き量の統計情報を計算する。
The
上記画像特性情報の具体例を挙げると、入力画像の輝度についての統計情報としては、例えば、輝度信号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
また、上記第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
この画像符号化装置では、第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
ここで、上記第1の実施の形態の画像符号化装置を構成する第1の符号化回路10の動作の具体例について、図2のフローチャートを参照しながら説明する。
Here, a specific example of the operation of the
すなわち、図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
次のステップ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
ステップST3において、第2の符号化回路40の量子化回路46は、割当符号量に基づいた量子化ステップサイズにより、DCT回路45から供給される係数データを量子化して、量子化データを生成するようになっている。
In step ST3, the
このような第1の符号化回路10の動作について、図1を参照しながらより具体的に説明する。
The operation of the
入力された画像データは、フレームメモリ群12に一旦記憶される。そして、フレームメモリ群12からは、従来の技術で述べたようにブロックフォーマットに従って読み出される。
The input image data is temporarily stored in the
動きベクトル検出回路11は、フレームメモリ群12から必要な画像データを上述のマクロブロック単位で読みだし、動きベクトルを検出する。すなわち、動きベクトル検出回路11は、フレームメモリ群12に記憶されている前方原画像及び/又は後方原画像を用いて、現在の参照画像の動きベクトルをマクロブロック単位で検出する。ここで、動きベクトルの検出は、例えばマクロブロック単位でのフレーム間差分の絶対値和が最小になるものを、その動きベクトルとする。そして、検出された動きベクトルは動き補償回路23、53等に供給され、マクロブロック単位でのフレーム間差分の絶対値和はフレーム内/前方/後方/両方向予測判定回路13に供給される。
The motion vector detection circuit 11 reads necessary image data from the
フレーム内/前方/後方/両方向予測判定回路13は、この値をもとに、参照ブロックの予測モードを決定し、決定した予測モードに基づいて、ブロック単位でフレーム内/前方/後方/両方向予測の切り換えを行うように予測符号化回路14を制御する。
The intra-frame / forward / backward / bidirectional
予測符号化回路14は、上述の図1に示すように、加算回路14a、14b、14c及び切換スイッチ14dを備え、フレーム内符号化モードのときは入力画像データそのものを、前方/後方/両方向予測モードのときはそれぞれの予測画像に対する入力画像データの画素毎の差分(以下差分データという)を選択し、選択したデータをDCT回路15に供給する。
As shown in FIG. 1 described above, the
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
量子化回路16は、一定の量子化ステップサイズ、例えば量子化ステップサイズを1として、DCT回路15から供給される係数データを量子化し、得られる量子化データを可変長符号化回路17及び逆量子化回路18に供給する。
The
可変長符号化回路17は、量子化データを、量子化ステップサイズ、予測モード、動きベクトル等と共に可変長符号化し、得られる可変長符号データを第1のビットストリームとして符号化制御回路30に供給する。
The variable
符号化制御回路30は、上述の図1に示すように、上記可変長符号化回路17から可変長符号データの所定時間毎のデータ量を計数するカウンタ31と、該カウンタ31からのデータ量及び使用可能なデータ総量に基づいて所定時間当たりの割当符号量を求めるビットレート演算回路32とを備える。そして、カウンタ31は、第1のビットストリームのデータ量を所定時間毎、例えばマクロブロック毎に計数して、発生符号量をマクロブロック毎に求め、この発生符号量をビットレート演算回路32に供給する。
As shown in FIG. 1 described above, the
ビットレート演算回路32は、このマクロブロック毎の発生符号量と、マクロブロックの輝度信号Yの平均値(L)と分散(V)と、マクロブロックの色度信号Crの平均値(R)と、マクロブロックの動きベクトル量の平均値(M)と、使用可能なデータ総量に基づいて、マクロブロック毎に割り当てられる割当符号量すなわちマクロブロック時間毎の平均符号化レートを求めると共に、この割当符号量を第2の符号化回路40の量子化スケール設定回路33に供給する。
The bit
具体的には、ビットレート演算回路32は、先ず次の式1に示すように、符号化する1シーケンスの時間SQTと、使用可能なデータ総量Bとに基づいて、そのシーケンスの平均ビットレートSQBRを計算する。
Specifically, the bit
SQBR = B/SQT ・・・ 式1
ここで、上記1シーケンスとは、例えば映画や番組の1本分のように、1つの画像記録媒体に記録される全フレームを想定しており、この他、記録媒体を分割して用いるときには各分割領域毎に記録される全フレームを1シーケンスとしてもよい。
SQBR = B /
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とし、それぞれ関数f1 、f2 、f3 、f4 の特性から画像の絵柄の主観的印象を符号化難易度di へ反映する係数αi ,βi ,γi ,θi を求め、式6に示すように、これらの係数とyiの積により、符号化難易度diを求めている。
The bit
αi = f1(Li) ・・・式2
βi = f2(Ri) ・・・式3
γi = f3(Vi) ・・・式4
θi = f4(Mi) ・・・式5
di = αi×βi×γi×θi×yi ・・・式6
ここで、関数f1 、f2 、f3 、f4 の特性の具体例について、図3〜図6を参照しながら説明する。
α i = f 1 (Li)
β i = f 2 (Ri)
γ i = f 3 (Vi)
θ i = f 4 (Mi)
d i = α i × β i × γ i × θ i × y i
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に対する係数αを表す関数f1 の特性を示す。この図3の横軸のLは、0が黒であり、MAXが最も明るい値である。一般に、人間の目は、暗い画像では、符号化ノイズをわかりやすい。ただし、あるレベル以下の暗さでは、暗すぎて符号化ノイズを知覚できなくなる。この特徴に基づいて、L=0付近では、α=1とし、最も劣化を知覚しやすいLのレベルで、αはピークをもち、それ以上のLでは、徐々にαを小さくする。αが1以上の場合、符号化難易度dを増大させ、逆にαが1以下の場合、符号化難易度dを減少させる。なお、i番目のマクロブロックについての輝度信号Yの平均値はLiであり、このi番目のマクロブロックについての係数αi は f1(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と係数βの関数f2 の特性を示す。図4の横軸のRは、0がグレーであり、MAXが最も赤い値である。一般に、人間の目は赤の劣化をわかりやすい特徴がある。この特徴に基づいて、Rが大きい値ほどβを1以上の大きな値とし、符号化難易度dを増大させる。なお、i番目のマクロブロックについての色度信号Crの平均値はRiであり、このi番目のマクロブロックについての係数βi は f2(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と係数γの関数f3 の特性を示す。図5の横軸のVは、0が完全に平坦であり、MAXが最も絵柄が乱雑である。一般に、人間の目は、絵柄の平坦部分で、符号化ノイズがわかりやすく、逆に、絵柄が乱雑な部分では、劣化はわかりにくい。この特徴に基づいて、Vが大きい値ほどγを1以下の小さな値とし、符号化難易度dを減少させる。i番目のマクロブロックについての輝度信号Yの分散値はViであり、このi番目のマクロブロックについての係数γi は f3(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
図6に、動きベクトル量の平均値Mと係数θの関数f4 の特性を示す。図6の横軸のMは、0が静止している場合で、MAXが最も動きが大きい(速い)。一般に、人間の目は、画像の動きが大きい(速い)と、目が動きについていけず、画像の劣化がわかりにくい。この特徴に基づいて、Mが大きい値ほどθを1以下の小さな値とし、符号化難易度dを減少させる。なお、マクロブロックがイントラ符号化される時は、θ=1とする。i番目のマクロブロックについての動きベクトル量の平均値はMiで、このi番目のマクロブロックについての係数θi は f4(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
このように求めた係数α,β,γ,θを、発生符号量yと乗算することで、符号化難易度dを求める。なお、i番目のマクロブロックについては、それぞれ係数αi ,βi ,γi ,θ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
ビットレート演算回路32は、i番目のマクロブロックに対する割当符号量をbi として、この割当符号量bi を下記式7に従って計算する。ここでa,cは定数であり、1シーケンスの上記平均ビットレートSQBRに応じて決定される値である。
The bit
bi = a×di + c ・・・式7
なお、上記式7のような線形の関係式を用いないで、テーブル・ルックアップで割当符号量bi を求めるようにしてもよい。
bi = a × di +
Note that the allocated code amount bi may be obtained by table lookup without using a linear relational expression such as
次に、上記関係式7について説明する。
Next, the
式7は、多くの動画像シーケンス、例えば多くの映画を符号化実験し、その画質を評価し、思考錯誤を通じて、経験的に求められる。一般に、1シーケンスでのdiの分布は、図7に示すような形となる。
この図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.
この場合、平均的な符号化難易度が最も高い映画の分布曲線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
具体的に説明すると、映画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.
このとき、以下のような関係になる。
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
多くの動画像シーケンスを符号化実験することによって求めたモデルとなる、あるいは基準となる典型的なシーケンス(例えば映画)の符号化難易度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
また、シーケンスでの平均ビットレート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
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
一方、逆量子化回路18は、量子化回路16から供給される量子化データを、量子化ステップサイズを1として逆量子化して、DCT回路15の出力に対応した係数データ(量子化歪みが加算されている)を再生し、この係数データをIDCT回路20に供給する。
On the other hand, the inverse quantization circuit 18 inversely quantizes the quantization data supplied from the
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
加算回路21には、前方/後方/両方向予測モードのとき、動き補償回路23から動き補償された予測画像データが供給されており、この予測画像データとIDCT回路20から供給される差分データを加算することにより、入力画像データに対応した画像データを再生する。
In the forward / backward / bidirectional prediction mode, the
そして、このようにして再生された画像データは、フレームメモリ22に予測画像データとして記憶される。すなわち、逆量子化回路18〜加算回路21は、局所復号化回路を構成し、予測モードに基づいて、量子化回路16から出力される量子化データを局所復号化し、得られる復号画像を前方予測画像もしくは後方予測画像としてフレームメモリ22に書き込む。フレームメモリ22は、複数のフレームメモリからなり、フレームメモリのバンク切り替えが行われ、符号化する画像に応じて、例えば単一のフレームが、前方予測画像データとして出力されたり、後方予測画像データとして出力される。また、前方/後方/両方向予測の場合は、前方予測画像データと後方予測画像データが例えば平均化されて出力される。これらの予測画像データは、後述する画像復号化装置で再生される画像データと全く同一の画像データであり、次の処理画像はこの予測画像をもとに前方/後方/両方向予測符号化が行われる。
The image data reproduced in this way is stored in the
次に、第2の符号化回路40の動作について説明する。なお、第2の符号化回路40を構成する量子化スケール設定回路33、遅延器43、量子化回路46、送信バッファメモリ49以外の回路は、上述した第1の符号化回路10を構成する回路と同じ動作を行うので、説明を省略する。
Next, the operation of the
遅延器43は、入力画像データを、例えば符号化制御回路30から符号化制御信号が出力されるまでの時間遅延する。この遅延器43の遅延時間としては、従来の2パス方式の場合には1シーケンス以上の時間が必要であったが、この実施の形態の場合には、ビットレートの切換単位時間、例えば後述する1GOP(グループオブピクチャ)の時間程度とすればよい。そして、予測符号化回路44、DCT回路45において、遅延された入力画像データにフレーム内/前方/後方/両方向予測判定回路13から供給される予測モードに従った予測符号化処理、DCT変換処理が施され、係数データが生成される。
The
量子化スケール設定回路33は、送信バッファ49からのバッファフィードバックから検出される、あるマクロブロックにおいて発生した発生符号量と、このマクロブロック毎の割当符号量の比較を行う。
The quantization
量子化スケール設定回路33は、第2の符号化での各マクロブロックの発生符号量を設定された各マクロブロックの割当符号量に近付けるため、当該マクロブロックにおける発生符号量がマクロブロック毎の割当符号量より大きい場合、次のマクロブロックの発生符号量を抑えるために次のマクロブロックの量子化ステップサイズを大きく設定し、当該マクロブロックにおける発生符号量がマクロブロック毎の割当符号量より小さい場合は、発生符号量を多くするために次のマクロブロックの量子化ステップサイズを小さくする。なお上記の説明では、マクロブロック毎に割当符号量と発生符号化量を近付けるように制御したが、この他、スライス毎に、フレーム毎に、あるいは後述するようにGOP(グループオブピクチャ)毎に制御を行わせるようにしてもよい。
The quantization
さらに、量子化スケール設定回路33は、送信バッファ49からのバッファフィードバックが、送信バッファ49のオーバーフローが近いことを示す場合、上記の割当符号量と発生符号量との比較結果によらず、量子化ステップサイズを大きくしてオーバーフローを抑制し、また、送信バッファからのバッファフィードバックが、送信バッファ49のアンダーフローが近いことを示す場合、上記の割当符号量と発生符号量との比較結果によらず、量子化ステップサイズを小さくしてアンダーフローを抑制するようにしてもよい。
Further, when the buffer feedback from the
なお、上記の説明では、マクロブロック毎に発生符号量と割当符号量とを比較して、マクロブロック毎に量子化ステップサイズを切り換えるようにしたが、スライス毎、フレーム毎、あるいは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
量子化回路46は、上述した量子化スケール設定回路33から供給される量子化ステップサイズにより、DCT回路45から供給される係数データを量子化して、量子化データを生成する。
The
そして、可変長符号化回路47は、量子化回路46から供給される量子化データを、量子化スケール設定回路33からの量子化ステップサイズ、フレーム内/前方/後方/両方向予測判定回路13からの予測モード、動きベクトル検出回路11からの動きベクトル等と共に可変長符号化し、得られる可変長符号データを第2のビットストリームとして送信バッファメモリ49に供給する。
Then, the variable
ここで、図11は、この画像符号化装置の第2の符号化回路40の動作を概略的に示すフローチャートである。
Here, FIG. 11 is a flowchart schematically showing the operation of the
この図11に示すように、ステップST11において、遅延器43を介して画像データが入力されると、ステップST12において、量子化スケール設定回路33は、現在符号化の対象とされているフレームに対する割当符号量を符号化制御回路30から読み込み、ステップST13に進む。
As shown in FIG. 11, when image data is input via the
ステップST13において、予測符号化回路44〜可変長符号化回路47は、画像データに予測符号化処理、DCT変換処理を施すと共に、マクロブロックの割当符号量に基づいた量子化ステップサイズにより係数データを量子化した後、可変長符号化し、ステップST14に進む。
In step ST13, the
ステップ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
送信バッファメモリ49は、必要に応じて設ければよいが、設けた場合には、送信バッファメモリ49は、可変長符号データを一旦記憶した後、一定のビットレートで読み出すことにより、可変長符号データを平滑化してビットストリームとして出力する。そして、送信バッファメモリ49から出力されたビットストリームは、例えば符号化されたオーディオ信号、同期信号等と多重化され、更にエラー訂正用のコードが付加され、伝送あるいは記録に適した所定の変調が加えられた後、例えば伝送路を介して画像復号化装置に伝送されたり、上述の図1に示すように、光ディスク、磁気ディスク、磁気テープ等からなる画像記録媒体55に記録される。すなわち、第2の符号化回路40において、例えば予め複雑な画像に対しては割当符号量bi を多くして、単純な画像に対しては割当符号量bi を少なくして可変レート符号化を行っていることから、従来の装置のように絵柄が複雑な画像に対して極端な画質劣化をさけるために全体を通じて高いレートの固定レートを適用する必要がなく、画像記録媒体55の記録時間を長くすることができる。
The
送信バッファメモリ49を設けない場合、あるいは小容量のメモリを設ける場合には、可変ビットレートで出力ビットストリームが画像記録媒体55に供給されることになるが、記録レートを可変制御でき最高記録レートが出力ビットストリームの最高ビットレート以上の記録装置を用いることにより、画像記録媒体55の全記録容量あるいは上記使用可能なデータ総量Bをオーバーフローすることがない範囲で、1シーケンスの映像信号を記録することができ、画像記録媒体55の全記録容量を、複雑な画像には多く、単純な画像には少なく割り当てて、全体として良好な画質が得られるように、媒体容量の最適の有効利用を図ることができる。
When the
以上説明した本発明の実施の形態からも明らかなように、第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
ここで、上記画像の明るさとしては、例えば、輝度信号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
このように、人間の視覚特性が反映された符号化を行うことにより、絵柄によって符号化画質の主観的印象が悪い場合、例えば、画像の暗い部分や、赤い部分や、平坦な部分等でも、符号化ノイズ(ブロックノイズ、モスキートノイズ)が目立つことを未然に回避できる。 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
このため失敗するケースを減らすために、符号化制御回路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
以上説明したような本発明に係る実施の形態の信号符号化方法あるいは装置は、いわゆる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
第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
この第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
この第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
そして、第1の符号化回路10において、例えば図13に示すように、GOPを構成するピクチャ数を周期としてGOP内の連続する任意の2枚のピクチャを仮にIピクチャ、Pピクチャとすると共に、量子化ステップサイズを例えば1として、これらのIピクチャ、Pピクチャの画像データに予測符号化処理、DCT変換処理、可変長符号化処理を施して、可変長符号データを生成し、この可変長符号データを符号化制御回路30に供給する。ここで、2枚のピクチャをIピクチャ、Pピクチャとするのは、絵柄の複雑さと、フレーム間の相関性を調べるためであり、Iピクチャの発生符号量から絵柄の複雑さを知ることができ、Pピクチャの発生符号量からフレーム間の相関性を知ることができる。一般的に、連続する複数のフレームは類似した画像をもつため、抽出した2枚のピクチャからでも、GOPの絵柄の傾向を見ることができる。
Then, in the
符号化制御回路30は、Iピクチャのデータ量 bitIj とPピクチャのデータ量 bitPj をGOP毎に計数すると共に、例えば下記式17に示すように、これらのデータ量 bitIj 、 bitPj と、GOPを構成するPピクチャの枚数Nとに基づいて、発生符号量GOPyj (j=0、1、2・・・)をGOP毎に求める。
The
GOPyj = bitIj +N× bitPj ・・・式17
そして、符号化制御回路30は、このGOP毎の発生符号量GOPyj と、使用可能なデータ総量に基づいて、GOP毎に割り当てられる割当符号量を求めると共に、この割当符号量を第2の符号化回路40に供給する。
GOPyj = bitIj + N ×
Then, the
具体的には、全GOP数をMとし、使用可能なデータ総量をBとし、j(j=0、1、2・・・M−1)番目のGOPの発生符号量をGOPyj とし、j番目のGOPでの輝度信号Yの平均値をLj、分散をVjとし、色度信号Crの平均値をRjとし、動きベクトル量の平均値をMjとし、それぞれ関数f1 、f2 、f3 、f4 の特性から画像の絵柄の主観的印象を符号化難易度GOPdj へ反映する係数αj,βj,γj,θjを求め、式22に示すように、それらとGOPyj の積により、符号化難易度GOPdj を求める。関数f1 、f2 、f3 、f4 のそれぞれの特性は、上述した図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
ビットレート演算回路32は、j番目のGOPに対する割当符号量GOPbj を下記式23に従って計算する。ここで、a,cは定数であり、1シーケンスでの上記式1に示す平均ビットレートSQBRに応じて決定される値である。
The bit
αj = f1(Lj) ・・・式18
βj = f2(Rj) ・・・式19
γj = f3(Vj) ・・・式20
θj = f4(Mj) ・・・式21
GOPdj = αj×βj×γj×θj×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)
GOPdj = α j × β j × γ j × θ j × GOPyj
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
かくして、符号化制御回路30は、例えば絵柄が複雑な画像が含まれる或いはフレーム間の相関が低いGOPに対しては割当符号量GOPbj を多くし、逆に単純な絵柄の画像が含まれる或いはフレーム間の相関が高いGOPに対しては割当符号量GOPbj を少なくする。
Thus, the
次に、第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
ステップST23において、第2の符号化回路40は、現在符号化の対象とされているGOPに対する割当符号量を符号化制御回路30から読み込み、ステップST24に進む。
In step ST23, the
ステップST24において、第2の符号化回路40は、画像データに予測符号化処理、DCT変換処理を施すと共に、割当符号量に基づいた量子化ステップサイズにより係数データを量子化した後、可変長符号化し、ステップST25に進む。
In step ST24, the
ここで、量子化スケール設定回路33は、供給されたGOP毎の割当符号量から、フレーム毎の割当符号量を、実際の符号化におけるピクチャタイプ(Iピクチャ、Pピクチャ、Bピクチャ)、すなわち図12に示されるピクチャタイプを考慮して設定する。具体的には、Iピクチャに対する割当符号量を多くし、Bピクチャに対する割当符号量を少なくし、Pピクチャに対する割当符号量をその中間とする。量子化スケール設定回路33の以降の処理は、上述のフレーム毎に割当符号量を求めた実施の形態と同様である。
Here, the quantization
次にステップ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
この図15に示す第4の実施の形態の画像符号化装置は、入力映像信号の統計的性質を求める画像解析回路60と、該画像解析回路60からの統計データ、及び使用可能なデータ総量に基づいて所定時間毎の符号化レートを求める符号化制御回路30と、該符号化制御回路30からの符号化レートに基づいて上記所定時間毎に上記入力映像信号を符号化して符号化データを生成する符号化回路40とを備える。
The image coding apparatus according to the fourth embodiment shown in FIG. 15 has an
画像解析回路60では、入力映像信号の統計的性質に基づく情報あるいは画像特性情報を求めており、この画像特性情報として、例えば、輝度信号Yの所定時間毎の平均値(L)を計算し、また入力画像の色度についての統計情報、例えば、色度信号Crの所定時間毎の平均値(R)を計算し、また入力画像の平坦度の統計情報、例えば、輝度信号Yの所定時間毎の分散値(V)を計算し、入力画像の動き量の統計情報、例えば、動きベクトル量の所定時間毎の平均値(M)を計算し、さらに、画像間差分情報、例えば動きベクトルの画像間予測残差の所定時間毎の絶対値和(E)を計算する。
The
すなわち、動きベクトルの画像間予測残差としては、符号化対象マクロブロックの輝度信号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.
なお、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.
なお、この式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
次のステップST33において、符号化回路40の量子化回路46は、割当符号量に基づいた量子化ステップサイズにより、DCT回路45から供給される係数データを量子化して、量子化データを生成するようになっている。
In the next step ST33, the
ここで、ビットレート演算回路32の具体的な動作を説明する。ビットレート演算回路32は、シーケンスの全マクロブロック数をNとし、i(i=0、1、2・・・N−1)番目のマクロブロックの輝度信号Yの平均値をLi、分散をViとし、色度信号Crの平均値をRiとし、動きベクトル量の平均値をMiとし、関数f1 、f2 、f3 、f4 の特性から画像の絵柄の主観的印象を符号化難易度di へ反映する係数αi ,βi ,γi ,θi を求める。また、動きベクトルの画像間予測残差の絶対値和Eに基づき、関数f6 の特性から、そのマクロブロックの発生符号量の推定値、すなわち上記第1の実施の形態でのyiに相当するものy'i を経験的に推定する。そして、下記の式31に示すように、各係数αi ,βi ,γi ,θi と発生符号量の推定値y'i との積により、符号化難易度diを求めている。
Here, a specific operation of the bit
αi = f1(Li) ・・・式26
βi = f2(Ri) ・・・式27
γi = f3(Vi) ・・・式28
θi = f4(Mi) ・・・式29
y'i = f6(Ei) ・・・式30
di = αi×βi×γi×θi×y'i ・・・式31
上記関数f1 、f2 、f3 、f4 の特性の具体例は、上記図3〜図6に示すものを使用できる。また、上記関数f6 の一例を図17に示す。すなわち、この図17は、動きベクトルの画像間予測残差に対するマクロブロック単位の発生符号量の推定値y' を示している。実験結果から経験的にEとy’とはほぼ比例する関係にあり、i番目のマクロブロックの動きベクトルの画像間予測残差Eiについての発生符号量の推定値y'i は f6(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)
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に基づき、関数f5 の特性から、そのマクロブロックの発生符号量の推定値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'i = f5(Vi) ・・・式32
この関数 f5(Vi)の具体例を図18に示す。
この図18は、輝度信号Yの分散Vに対するマクロブロック単位の発生符号量の推定値y' を示しており、i番目のマクロブロックの輝度信号Yの分散Viについての発生符号量の推定値y'i は f5(Vi)となる。
y ′ i = f 5 (Vi)
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
bi = a×di + c ・・・式33
この関係式33は、多くの動画像シーケンス、例えば多くの映画を符号化実験し、その画質を評価し、思考錯誤を通じて、経験的に求められるものであり、世の中のほとんどのシーケンスに適用可能な一般的な関係式とする。その求め方については、上記第1の実施の形態で説明した式7と同様な方法で作られる。
bi = a × di +
This
かくして、ビットレート演算回路32は、例えば複雑な絵柄のフレームに対しては割当符号量を多くし、逆に単純な絵柄のフレームに対しては割当符号量を少なくする。
Thus, for example, the bit
符号化回路40の動作は、上記第1の実施の形態で説明した第2の符号化回路40と同じであるので、省略する。
Since the operation of the
なお、本発明は上述の実施の形態に限定されるものではなく、例えば上述の実施の形態おいては、変換符号化を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.
10 第1の符号化回路、 14,44 予測符号化回路、 15,45 DCT回路、 16,46 量子化回路、 17,47 可変長符号化回路、 30 符号化制御回路、 31 カウンタ、 32 ビットレート演算回路、 33 量子化スケール設定回路、 40 第2の符号化回路、 43 遅延器、 60 画像解析回路、 61 フレーム内情報解析回路、 62 フレーム間情報解析回路
DESCRIPTION OF
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.
ことを特徴とする請求項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. .
ことを特徴とする請求項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.
を特徴とする請求項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.
を特徴とする請求項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.
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)
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)
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 |
-
2008
- 2008-10-06 JP JP2008260100A patent/JP4636159B2/en not_active Expired - Fee Related
Patent Citations (9)
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)
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 |