JP2006157083A - Image coding apparatus, image coding method, and computer program - Google Patents

Image coding apparatus, image coding method, and computer program Download PDF

Info

Publication number
JP2006157083A
JP2006157083A JP2004339934A JP2004339934A JP2006157083A JP 2006157083 A JP2006157083 A JP 2006157083A JP 2004339934 A JP2004339934 A JP 2004339934A JP 2004339934 A JP2004339934 A JP 2004339934A JP 2006157083 A JP2006157083 A JP 2006157083A
Authority
JP
Japan
Prior art keywords
image data
moving image
coefficient
encoding
preprocessing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2004339934A
Other languages
Japanese (ja)
Inventor
Tadashi Ohira
正 大平
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2004339934A priority Critical patent/JP2006157083A/en
Publication of JP2006157083A publication Critical patent/JP2006157083A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To obtain an image with high quality by efficiently coding a moving image. <P>SOLUTION: A coefficient calculation unit 10 calculates a filter coefficient kq from a quantization scale QP obtained by a coding amount control unit 9, calculates a filter coefficient kb from a decoder buffer pointer DBP in a buffer 8, and selects a filter coefficient ke from the calculated coefficient kq or kb which is greater. A coefficient calculation unit 3 obtains a filter coefficient ka from a feature quantity measured by a feature quantity measurement unit 1. A filter control unit 4 obtains a filter control variable k on the basis of a result of comparing the filter coefficients ke with ka. A filter 5 places a band limit on a video signal by using the filter control variable. The filter 5 just before the encoding places the band limit on the video signal in this way to easily and properly control a produced code amount while preventing degradation of visual image quality. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、画像符号化装置、画像符号化方法、及びコンピュータプログラムに関し、特に、動画像を符号化するために用いて好適なものである。   The present invention relates to an image encoding device, an image encoding method, and a computer program, and is particularly suitable for use in encoding a moving image.

従来、画像の符号化方式として、フレーム内符号化方式であるMotion JPEGやDigital Video等の符号化方式や、フレーム間予測符号化を用いたH.261、H.263、MPEG−1、MPEG−2等の符号化方式が知られている。これらの符号化方式は、ISO(International Organization for Standardization:国際標準化機構)やITU(International Telecommunication Union:国際電気通信連合)によって国際標準化されている。フレーム内符号化方式は、フレーム単位で独立に符号化を行うものであり、フレームの管理がしやすいため、動画像の編集や特殊再生が必要な装置に最適である。また、フレーム間予測符号化方式は、フレーム間での画像データの差分に基づくフレーム間予測を用いるため、符号化効率が高いという特徴を持っている。   Conventionally, as an image encoding method, an intra-frame encoding method such as Motion JPEG or Digital Video, or H.264 using inter-frame predictive encoding is used. 261, H.H. Coding schemes such as H.263, MPEG-1 and MPEG-2 are known. These encoding methods are internationally standardized by ISO (International Organization for Standardization) and ITU (International Telecommunication Union). The intra-frame coding method performs coding independently for each frame, and is easy to manage the frames, so that it is most suitable for an apparatus that requires editing of moving images and special reproduction. In addition, the inter-frame predictive coding method has a feature that coding efficiency is high because inter-frame prediction based on a difference in image data between frames is used.

MPEG−2で符号化を行う従来の動画像符号化装置の構成の一例を図16に、その動画像符号化装置で符号化された符号化ピクチャの構造の一例を図17に示す。MPEGで符号化された符号化ピクチャの構造は、図17に示すように、予測方法の異なる3種類のピクチャの組み合わせによって構成される。これら3種類のピクチャは、それぞれIピクチャ(フレーム内符号化)、Pピクチャ(順方向予測符号化)、Bピクチャ(双方向予測符号化)と呼ばれる。   FIG. 16 shows an example of the configuration of a conventional moving picture encoding apparatus that performs encoding using MPEG-2, and FIG. 17 shows an example of the structure of a coded picture encoded by the moving picture encoding apparatus. As shown in FIG. 17, the structure of an encoded picture encoded by MPEG is configured by a combination of three types of pictures having different prediction methods. These three types of pictures are called an I picture (intraframe coding), a P picture (forward prediction coding), and a B picture (bidirectional prediction coding), respectively.

また、これらのピクチャを複数組み合わせたものをGroup of Picture(以降GOPと称す)と呼ぶ。このGOPは、Iピクチャを1枚だけ含むため、編集の単位となる場合が多い。これらの予測モードは、図16に示されるように、モード判定器105からの制御信号によりスイッチ101、108にて切り替えられる。Iピクチャでは符号化画像そのものに対してDCT器102でDCT(Discrete Cosine Transform;離散コサイン変換)が実行される。一方、Pピクチャ及びBピクチャでは、さらに動き補償器109による動き補償予測の誤差信号に対して、DCT器102でDCTが実行される。   A combination of a plurality of these pictures is called a group of picture (hereinafter referred to as GOP). Since this GOP includes only one I picture, it is often an editing unit. These prediction modes are switched by the switches 101 and 108 by a control signal from the mode determiner 105 as shown in FIG. In the I picture, DCT (Discrete Cosine Transform) is performed by the DCT unit 102 on the encoded image itself. On the other hand, in the P picture and the B picture, the DCT is performed by the DCT unit 102 on the error signal of the motion compensation prediction by the motion compensator 109.

DCT器102で得られたDCT係数に対する量子化が、レート制御器100からの出力に基づく制御に従って、量子化器103によってなされた後に、動きベクトル等のその他の付加情報と共に可変長符号化が可変長符号化器104でなされ、符号列が「ビットストリーム」として出力される。この際、可変長符号化器104からの符号量に応じてレート制御器100で量子化スケールが制御される。一方、量子化器103の出力係数は、逆量子化器106、逆DCT器107に供給され、局部復号されてブロック毎にフレームメモリ(FM)110に貯えられる。
尚、前記GOPの構造において、IピクチャとPピクチャとの間隔をM、GOP内のフレーム数をNと称して表す。図17に示した例では、M=3,N=15となる。
After the quantization of the DCT coefficient obtained by the DCT unit 102 is performed by the quantizer 103 according to the control based on the output from the rate controller 100, the variable length coding is variable together with other additional information such as a motion vector. This is performed by the long encoder 104, and the code string is output as a “bit stream”. At this time, the quantization scale is controlled by the rate controller 100 according to the code amount from the variable length encoder 104. On the other hand, the output coefficient of the quantizer 103 is supplied to an inverse quantizer 106 and an inverse DCT unit 107, and is locally decoded and stored in a frame memory (FM) 110 for each block.
In the GOP structure, the interval between the I picture and the P picture is represented by M, and the number of frames in the GOP is represented by N. In the example shown in FIG. 17, M = 3 and N = 15.

MPEG−2は可変長符号化を行うため、単位時間当りの発生符号量は一定ではない。そこで、量子化器103での量子化の際の量子化スケールをマクロブロック単位に適宜変更することにより、所望のビットレートに制御することが可能になっている。MPEG−2 Test Model 5(非特許文献1を参照、以下、TM5と略称する)のステップ3には、各マクロブロックの分散値を元に量子化スケールを変動させる方法が記述されている。   Since MPEG-2 performs variable length coding, the amount of generated code per unit time is not constant. Therefore, it is possible to control to a desired bit rate by appropriately changing the quantization scale at the time of quantization in the quantizer 103 in units of macroblocks. Step 3 of MPEG-2 Test Model 5 (refer to Non-Patent Document 1, hereinafter abbreviated as TM5) describes a method of changing the quantization scale based on the dispersion value of each macroblock.

ここで、量子化時の量子化スケールを大きくすることで圧縮率を上げることができる。しかし、量子化スケールを大きくすると、高周波成分の量子化誤差が増加し、ブロック歪みや、モスキート歪みと呼ばれる符号化歪みが発生し、画像品質が著しく低下する。また、前記フレーム間符号化方式では、フレーム間予測を用いているため、空間方向の高周波成分と時間方向の動き量との双方に依存して符号化が行われる。よって高周波成分のない単純な画像であっても動きが激しい場合は、予測誤差に高周波成分を多く含むため、符号化歪みが多く発生する。   Here, the compression rate can be increased by increasing the quantization scale at the time of quantization. However, when the quantization scale is increased, the quantization error of the high frequency component increases, coding distortion called block distortion or mosquito distortion occurs, and the image quality significantly decreases. Further, since the interframe coding method uses interframe prediction, the coding is performed depending on both the high frequency component in the spatial direction and the amount of motion in the temporal direction. Therefore, even if a simple image having no high-frequency component moves rapidly, a large amount of high-frequency component is included in the prediction error, so that much coding distortion occurs.

このような動画像符号化の基本構成に加え、入力画像に予め帯域制限フィルタを施し、視覚的に目立たない高周波成分を除去して符号量を削減することで、復号画像の主観的な画像品質を向上させることが一般的に行われる。このとき、帯域制限フィルタの特性は、圧縮率に応じて設定され、高い圧縮率の場合には狭帯域に、低い圧縮率の場合には広帯域に設定されていた。さらに、符号化出力である発生符号量に応じて、前記帯域制限フィルタを制御するという方法が知られている。
尚、その他のMPEG等の詳細内容については、ISO/IECによる国際標準の文書に委ねることとする。
In addition to this basic structure of video coding, the input image is preliminarily subjected to a band limiting filter to remove visually inconspicuous high frequency components and reduce the amount of code, thereby reducing the subjective image quality of the decoded image. It is generally performed to improve. At this time, the characteristics of the band limiting filter are set according to the compression rate, and are set to a narrow band when the compression rate is high, and to a wide band when the compression rate is low. Furthermore, a method is known in which the band limiting filter is controlled according to the amount of generated code that is an encoded output.
Other detailed contents such as MPEG will be entrusted to international standard documents by ISO / IEC.

MPEG-2 Test Model, Document ISO/IEC JTC1 SC29 WG11/93-400, Test Model Editing Committee, April 1993.MPEG-2 Test Model, Document ISO / IEC JTC1 SC29 WG11 / 93-400, Test Model Editing Committee, April 1993.

しかしながら、前記従来の技術では、発生符号量が多い場合、フィルタにより著しく帯域が制限され、高周波成分のみでなく低周波成分の画像情報まで削除される場合が生じる。低周波成分は視覚に与える影響が大きいため、これを削除すると著しく視覚的画像品質が低下してしまう。   However, in the conventional technique, when the generated code amount is large, the band is remarkably limited by the filter, and not only high-frequency components but also low-frequency component image information may be deleted. Since the low-frequency component has a great influence on the visual sense, if it is deleted, the visual image quality is significantly deteriorated.

また、動画像の高周波成分が少なくても動き量の大きいシーケンスを持つ動画像を符号化する場合、発生符号量が増加し、帯域制限フィルタが高周波成分を除去する方向に作用してしまう。このため、動き部分においての高周波成分のみならず動き量の少ない静止部分でも高周波成分が除去されてしまい、人間の視覚上の解像度が高くなる静止部分の解像度が悪くなる。したがって、再生画像の全体的な画像品質評価を大きく低下させてしまう。さらに、これと同時に、帯域制限フィルタのカットオフ周波数が変動すると、静止部分の解像度が変動するため、画像全体をみた場合、結果として不自然な画像となってしまう。   In addition, when a moving image having a sequence with a large amount of motion is encoded even if the high-frequency component of the moving image is small, the generated code amount increases, and the band limiting filter acts in a direction to remove the high-frequency component. For this reason, not only the high-frequency component in the moving part but also the stationary part with a small amount of motion is removed, and the resolution of the still part where the human visual resolution is high is deteriorated. Therefore, the overall image quality evaluation of the reproduced image is greatly reduced. At the same time, if the cut-off frequency of the band limiting filter fluctuates, the resolution of the still portion fluctuates, so that when the entire image is viewed, the result is an unnatural image.

以上のように、従来の技術では、符号量を効率的に抑制しながら高い画像品質を達成することができなかった。
本発明は、前述の問題点に鑑みてなされたものであり、動画像を効率よく符号化して、高い品質の画像を得ることができるようにすることを目的とする。
As described above, the conventional technique cannot achieve high image quality while efficiently suppressing the code amount.
The present invention has been made in view of the above-described problems, and an object thereof is to efficiently encode a moving image so as to obtain a high-quality image.

本発明の画像符号化装置は、入力された動画像データを前処理する前処理手段と、前記前処理手段により前処理された動画像データを符号化する符号化手段と、前記符号化手段により符号化された動画像データを蓄積する蓄積手段と、前記入力された動画像データの特徴量を用いて、前処理制御用の第1の係数を生成する第1の係数生成手段と、前記符号化手段により動画像データが符号化される際に使用された制御パラメータと、前記蓄積手段により蓄積された動画像データの発生符号量とを用いて、前処理制御用の第2の係数を生成する第2の係数生成手段とを有し、前記前処理手段は、前記第1の係数及び前記第2の係数に応じて、前記入力された動画像データを前処理し、前記符号化手段は、前記入力された動画像データの特徴量と、前記蓄積手段に蓄積されている動画像データの発生符号量とに基づいて、前記前処理手段により前処理された動画像データを符号化することを特徴とする。   An image encoding apparatus according to the present invention includes a preprocessing unit that preprocesses input moving image data, an encoding unit that encodes moving image data preprocessed by the preprocessing unit, and the encoding unit. Storage means for storing encoded moving image data, first coefficient generating means for generating a first coefficient for preprocessing control using the feature amount of the input moving image data, and the code A second coefficient for preprocessing control is generated using the control parameter used when the moving image data is encoded by the converting unit and the generated code amount of the moving image data stored by the storing unit. Second coefficient generating means for pre-processing the input moving image data in accordance with the first coefficient and the second coefficient, and the encoding means , The feature amount of the input moving image data and It said storage means based on the generated code amount of the moving image data stored in, characterized by coding a moving picture data which has been preprocessed by the preprocessing means.

本発明の画像符号化方法は、入力された動画像データを前処理する前処理ステップと、前記前処理ステップにより前処理された動画像データを符号化する符号化ステップと、前記符号化ステップにより符号化された動画像データを蓄積する蓄積ステップと、前記入力された動画像データの特徴量を用いて、前処理制御用の第1の係数を生成する第1の係数生成ステップと、前記符号化ステップにより動画像データが符号化される際に使用された制御パラメータと、前記蓄積ステップにより蓄積された動画像データの発生符号量とを用いて、前処理制御用の第2の係数を生成する第2の係数生成ステップとを有し、前記前処理ステップは、前記第1の係数及び前記第2の係数に応じて、前記入力された動画像データを前処理し、前記符号化ステップは、前記入力された動画像データの特徴量と、前記バッファステップに蓄積されている動画像データの発生符号量とに基づいて、前記前処理ステップにより前処理された動画像データを符号化することを特徴とする。   The image encoding method of the present invention includes a preprocessing step for preprocessing input moving image data, an encoding step for encoding moving image data preprocessed by the preprocessing step, and the encoding step. An accumulation step of accumulating the encoded moving image data; a first coefficient generation step of generating a first coefficient for preprocessing control using the feature amount of the input moving image data; A second coefficient for preprocessing control is generated using the control parameter used when the moving image data is encoded by the converting step and the generated code amount of the moving image data stored by the storing step A second coefficient generation step, wherein the preprocessing step preprocesses the input moving image data according to the first coefficient and the second coefficient, and performs the encoding step. Encoding the moving image data preprocessed by the preprocessing step based on the feature amount of the input moving image data and the generated code amount of the moving image data stored in the buffer step. It is characterized by doing.

本発明のコンピュータプログラムは、入力された動画像データを前処理する前処理ステップと、前記前処理ステップにより前処理された動画像データを符号化する符号化ステップと、前記符号化ステップにより符号化された動画像データを蓄積する蓄積ステップと、前記入力された動画像データの特徴量を用いて、前処理制御用の第1の係数を生成する第1の係数生成ステップと、前記符号化ステップにより動画像データが符号化される際に使用された制御パラメータと、前記蓄積ステップにより蓄積された動画像データの発生符号量とを用いて、前処理制御用の第2の係数を生成する第2の係数生成ステップとを有し、前記前処理ステップは、前記第1の係数及び前記第2の係数に応じて、前記入力された動画像データを前処理し、前記符号化ステップは、前記入力された動画像データの特徴量と、前記バッファステップに蓄積されている動画像データの発生符号量とに基づいて、前記前処理ステップにより前処理された動画像データを符号化することを特徴とする。   The computer program of the present invention includes a preprocessing step for preprocessing input video data, an encoding step for encoding video data preprocessed by the preprocessing step, and encoding by the encoding step. An accumulation step for accumulating the moving image data, a first coefficient generation step for generating a first coefficient for preprocessing control using a feature amount of the input moving image data, and the encoding step The second coefficient for generating the second preprocessing control coefficient is generated by using the control parameter used when the moving image data is encoded by the above and the generated code amount of the moving image data accumulated by the accumulation step. The coefficient generation step, and the preprocessing step preprocesses the input moving image data according to the first coefficient and the second coefficient, and The encoding step encodes the moving image data preprocessed by the preprocessing step based on the feature amount of the input moving image data and the generated code amount of the moving image data accumulated in the buffer step. It is characterized by becoming.

本発明によれば、入力された動画像データの特徴量を用いて生成した前処理制御用の第1の係数と、前記動画像データの符号化の際に使用した制御パラメータと、符号化した動画像データの発生符号量とを用いて生成した前処理制御用の第2の係数とに応じて、前記入力された動画像データを前処理し、前処理した動画像データを符号化することにより、前処理と符号量制御とを連動動作させて、視覚的に画像の品質が低下することを防止しつつ、発生符号量を好適に制御することができるようにすることが、簡便に行えるようにする。   According to the present invention, the first coefficient for preprocessing control generated using the feature amount of the input moving image data, the control parameter used in encoding the moving image data, and the encoded Pre-processing the input moving image data according to the second coefficient for preprocessing control generated using the generated code amount of the moving image data, and encoding the preprocessed moving image data Accordingly, it is possible to easily control the generated code amount while interlocking the preprocessing and the code amount control to prevent the image quality from being visually deteriorated. Like that.

(第1の実施形態)
次に、図面を参照しながら、本発明の第1の実施形態について説明する。
図1は、本実施形態の画像符号化装置の構成の一例を示すブロック図である。尚、本実施形態の画像符号化装置では、制御の最小単位をマクロブロックとする。
図1において、1は、入力画像の特徴量としてマクロブロック毎の分散を測定する特徴量測定器である。2は、特徴量測定器1からの特徴量を蓄積する特徴量メモリである。本実施形態では、1フレーム分の特徴量を蓄積するものとする。
(First embodiment)
Next, a first embodiment of the present invention will be described with reference to the drawings.
FIG. 1 is a block diagram illustrating an example of a configuration of an image encoding device according to the present embodiment. In the image coding apparatus according to the present embodiment, the minimum control unit is a macro block.
In FIG. 1, reference numeral 1 denotes a feature amount measuring device that measures a variance for each macroblock as a feature amount of an input image. Reference numeral 2 denotes a feature amount memory that accumulates feature amounts from the feature amount measuring device 1. In the present embodiment, it is assumed that a feature amount for one frame is accumulated.

3は、前記蓄積された特徴量から、フィルタの係数を算出するフィルタ係数算出器である。4は、フィルタの制御値を決定するフィルタ制御器である。
5は、符号化の前に実行されるフィルタである。本実施形態では、フィルタ5は、3画素×3ラインの2次元フィルタである。フィルタ5は、以下の(1式)に示すように、変数kによる帯域を設定する低域通過型フィルタである。変数kの最小値を2とし、値が増加するとフィルタの強度は低下し、制限する帯域は狭くなる。
A filter coefficient calculator 3 calculates a filter coefficient from the accumulated feature amount. Reference numeral 4 denotes a filter controller that determines a control value of the filter.
Reference numeral 5 denotes a filter executed before encoding. In the present embodiment, the filter 5 is a two-dimensional filter of 3 pixels × 3 lines. The filter 5 is a low-pass filter that sets a band based on a variable k, as shown in the following (formula 1). When the minimum value of the variable k is 2, and the value increases, the strength of the filter decreases and the band to be limited becomes narrow.

Figure 2006157083
Figure 2006157083

6は、フィルタ5から出力された画像信号を蓄積するフレームメモリである。本実施形態では、特徴量メモリ2と同様に、1フレーム分の画像信号を格納するものとする。7は、フレームメモリ6に蓄積された画像信号を符号化する符号化器である。
8は、符号化器7から出力されたストリームを蓄積するエンコーダ出力のバッファである。バッファ8は、符号化器7から出力されたストリームに基づくフレーム毎の発生符号量と、デコーダバッファを想定したバッファポインタを出力する。デコーダバッファポインタは、バッファサイズからエンコーダバッファポインタを差し引いた値とする。
Reference numeral 6 denotes a frame memory for accumulating the image signal output from the filter 5. In the present embodiment, similarly to the feature amount memory 2, an image signal for one frame is stored. Reference numeral 7 denotes an encoder that encodes an image signal stored in the frame memory 6.
Reference numeral 8 denotes an encoder output buffer for accumulating the stream output from the encoder 7. The buffer 8 outputs a generated code amount for each frame based on the stream output from the encoder 7 and a buffer pointer assuming a decoder buffer. The decoder buffer pointer is a value obtained by subtracting the encoder buffer pointer from the buffer size.

9は、特徴量メモリ2に格納されている特徴量と、バッファ8に格納されている発生符号量とから、符号化器7を制御する符号量制御器である。10は、符号化器7へ出力された制御パラメータとバッファ8から出力されたデコーダバッファポインタから、フィルタ5の係数を算出するフィルタ係数算出器である。本実施形態では、前記制御パラメータを量子化スケールとする。11は、フィルタ係数算出器10から出力された係数を蓄積する係数メモリである。本実施形態では、特徴量メモリ2と同様に、1フレーム分の係数を蓄積するものとする。   A code amount controller 9 controls the encoder 7 from the feature amount stored in the feature amount memory 2 and the generated code amount stored in the buffer 8. A filter coefficient calculator 10 calculates the coefficient of the filter 5 from the control parameter output to the encoder 7 and the decoder buffer pointer output from the buffer 8. In this embodiment, the control parameter is a quantization scale. Reference numeral 11 denotes a coefficient memory that accumulates the coefficients output from the filter coefficient calculator 10. In the present embodiment, as in the feature amount memory 2, one frame of coefficients is accumulated.

次に、以上のような構成を有する本実施形態の画像符号化装置の動作について説明する。
本実施形態での処理は、大きく2つに分類される。先頭のフレーム(以下、先頭フレームと略称する)の処理と、それ以外のフレームの処理である。先頭フレームでの処理は、符号化前に1フレーム分のフィルタ処理を実行した画像を用意するまでを実行される。一方、それ以外の定常時の処理は、前記フィルタの施されたフレームを符号化する処理と、さらに次の符号化対象となるフレームに対してフィルタを施す処理とを行う。
Next, the operation of the image coding apparatus of the present embodiment having the above configuration will be described.
Processing in this embodiment is roughly classified into two. This is processing of the first frame (hereinafter abbreviated as the first frame) and processing of other frames. The process for the first frame is executed until an image that has been subjected to filter processing for one frame is prepared before encoding. On the other hand, the other normal processing includes a process of encoding the frame subjected to the filter and a process of applying a filter to a frame to be encoded next.

次に、先頭フレームのフィルタ処理を行う際の画像符号化装置の動作の一例について、図2のフローチャートを参照して説明する。
まず、ビデオ信号は特徴量測定器1へ入力され、特徴量測定器1は、1フレーム分の特徴量を算出する(ステップS10)。本実施形態では、特徴量測定器1は、特徴量をマクロブロック毎に算出する。ここで、特徴量測定器1が算出する特徴量をactと称す。特徴量actは、マクロブロック内の輝度信号における4ブロックの分散値における最小値に1を加えた値とする。計算式を以下の(2式)に示す。
Next, an example of the operation of the image coding apparatus when performing the filtering process for the first frame will be described with reference to the flowchart of FIG.
First, the video signal is input to the feature amount measuring device 1, and the feature amount measuring device 1 calculates a feature amount for one frame (step S10). In the present embodiment, the feature quantity measuring device 1 calculates a feature quantity for each macroblock. Here, the feature amount calculated by the feature amount measuring device 1 is referred to as act. The feature value act is a value obtained by adding 1 to the minimum value of the variance values of the four blocks in the luminance signal in the macroblock. The calculation formula is shown in the following (Formula 2).

Figure 2006157083
Figure 2006157083

ここで、Pjは、ブロック内の輝度画素値である。P_avgは、ブロック内の輝度画素値の平均値である。MIN_block0to3は、4ブロックの分散値から最小値を選択することを示す。   Here, Pj is a luminance pixel value in the block. P_avg is an average value of the luminance pixel values in the block. MIN_block0to3 indicates that the minimum value is selected from the dispersion values of four blocks.

次に、前記算出した特徴量actを、特徴量メモリ2へ1フレーム分蓄積する(ステップS11)。このとき、特徴量actのフレーム内の平均値avg_actを算出し、特徴量メモリ2へ格納する。
次に、フィルタ係数算出器3にて前記蓄積された特徴量からマクロブロック毎にフィルタ係数kaを算出する(ステップS12)。
図3に、特徴量actとフィルタ係数kaとの関係の一例をグラフ化して示す。図3において、グラフ内のactAは、特徴量actの最小値であり、曲線が漸近する値となる。本実施形態では初期値を0する。
特徴量actがactA以上となった場合、フィルタ係数Kaが減少する。
次に、前記フィルタ係数kaを用いて、先頭フレームに対しフィルタを実行し、フレームメモリ6へ蓄積する(ステップS13)。
Next, the calculated feature quantity act is stored in the feature quantity memory 2 for one frame (step S11). At this time, an average value avg_act in the frame of the feature amount act is calculated and stored in the feature amount memory 2.
Next, the filter coefficient calculator 3 calculates a filter coefficient ka for each macroblock from the accumulated feature amount (step S12).
FIG. 3 is a graph showing an example of the relationship between the feature amount act and the filter coefficient ka. In FIG. 3, actA in the graph is the minimum value of the feature quantity act, and is a value that the curve is asymptotic. In this embodiment, the initial value is zero.
When the feature amount act is greater than or equal to actA, the filter coefficient Ka decreases.
Next, a filter is executed on the first frame using the filter coefficient ka and stored in the frame memory 6 (step S13).

次に、定常時の符号化処理を行う際の画像符号化装置の動作の一例について、図4のフローチャートを参照して説明する。動画像の符号化では1フレームの処理単位である本処理を繰り返すことになる。
まず、符号量制御器9では、バッファ8からの発生符号量に基づいて、TM5に準じ、量子化スケールmquantを算出する。次に、この量子化スケールmquantに対し、前記蓄積された特徴量メモリ2内のフレーム毎の特徴量act、及び特徴量actのフレーム内の平均値avg_actを算出し、以下の(3式)及び(4式)により重み付けする。
Next, an example of the operation of the image encoding device when performing encoding processing in a steady state will be described with reference to the flowchart of FIG. When encoding a moving image, this processing, which is a processing unit of one frame, is repeated.
First, the code amount controller 9 calculates a quantization scale mquant according to TM5 based on the generated code amount from the buffer 8. Next, for this quantization scale mquant, the feature value act for each frame in the feature value memory 2 accumulated and the average value avg_act in the frame of the feature value act are calculated, and the following (Equation 3) and Weighting is performed according to (Expression 4).

QP=mquant×w ・・・(3式)
w=(avg_act−act)/avg_act ・・・(4式)
以上の処理により最終的な量子化スケール(符号量制御値)QPを算出し、符号化器7を制御する(ステップS31)。
次に、符号化器7においてフレームメモリ6に蓄積されたフレームを符号化する(ステップS32)。
次に、量子化スケールQPと、バッファ8からのバッファポインタとに基づいて、フィルタ係数keを算出する(ステップS33)。本実施形態では、量子化スケールQPとバッファポインタとのそれぞれからフィルタ係数を求め、両者の一方を選択して最終的なフィルタ係数keとしている。
次に、フィルタ係数keを係数メモリ11へ蓄積する(ステップS34)。
QP = mquant × w (3 formulas)
w = (avg_act-act) / avg_act (4 formulas)
The final quantization scale (code amount control value) QP is calculated by the above processing, and the encoder 7 is controlled (step S31).
Next, the encoder 7 encodes the frame stored in the frame memory 6 (step S32).
Next, the filter coefficient ke is calculated based on the quantization scale QP and the buffer pointer from the buffer 8 (step S33). In this embodiment, a filter coefficient is obtained from each of the quantization scale QP and the buffer pointer, and one of the two is selected as the final filter coefficient ke.
Next, the filter coefficient ke is stored in the coefficient memory 11 (step S34).

前記フィルタ係数keを求める際の画像符号化装置の動作(ステップS33の動作)の一例を、図5のフローチャートを参照して説明する。
まず、量子化スケールQPからフィルタ係数kqを算出する(ステップS40)。図6に、量子化スケールQPとフィルタ係数kqとの関係の一例をグラフ化して示す。図6において、グラフ内のQPAは、フィルタ強度が最低のときの量子化スケールQPの値であり、曲線が漸近する値である。
本実施形態では、量子化スケールQPの値が、このQPA以上となった場合に、フィルタ係数kqが減少する。
An example of the operation of the image encoding device (operation of step S33) when obtaining the filter coefficient ke will be described with reference to the flowchart of FIG.
First, the filter coefficient kq is calculated from the quantization scale QP (step S40). FIG. 6 is a graph showing an example of the relationship between the quantization scale QP and the filter coefficient kq. In FIG. 6, QPA in the graph is the value of the quantization scale QP when the filter strength is the lowest, and is a value that the curve is asymptotic.
In the present embodiment, the filter coefficient kq decreases when the value of the quantization scale QP is equal to or greater than this QPA.

次に、前記デコーダバッファポインタDBPからフィルタ係数kbを算出する(ステップS41)。図7に、デコーダバッファポインタDBPとフィルタ係数kbとの関係の一例をグラフ化して示す。図7において、グラフ内のDBは、バッファサイズであり、曲線が漸近する値はDB/2とする。
デコーダバッファのアンダーフローを防止するため、デコーダバッファポインタDBPがバッファサイズの1/2以下となった場合に、フィルタ係数kbが減少する。
Next, the filter coefficient kb is calculated from the decoder buffer pointer DBP (step S41). FIG. 7 is a graph showing an example of the relationship between the decoder buffer pointer DBP and the filter coefficient kb. In FIG. 7, DB in the graph is the buffer size, and the value that the curve is asymptotic is DB / 2.
In order to prevent underflow of the decoder buffer, the filter coefficient kb decreases when the decoder buffer pointer DBP becomes ½ or less of the buffer size.

次に、算出したフィルタ係数kq、kbを比較し、大きな方の値をフィルタ係数算出器10におけるフィルタ係数keとする(ステップS42、S43、S44)。フィルタ係数keは係数メモリ11へ蓄積される。   Next, the calculated filter coefficients kq and kb are compared, and the larger value is set as the filter coefficient ke in the filter coefficient calculator 10 (steps S42, S43, and S44). The filter coefficient ke is stored in the coefficient memory 11.

次に、定常時のフィルタ処理(定常フレームフィルタ処理)を行う際の画像符号化装置の動作の一例について、図8のフローチャートを参照して説明する。動画像の符号化では1フレームの処理単位で本処理を繰り返すことになる。尚、図8において、ステップS10〜S13は、前述した図2のステップS10〜S13と同等である。
ステップS12において、特徴量から求めたフィルタ係数kaと、係数メモリ11内に蓄積されたフィルタ係数keとに基づいて、フィルタ制御値kを算出する(ステップS30)。
Next, an example of the operation of the image coding apparatus when performing the filtering process (stationary frame filter process) at the normal time will be described with reference to the flowchart of FIG. In encoding a moving image, this processing is repeated for each frame processing unit. In FIG. 8, steps S10 to S13 are equivalent to steps S10 to S13 of FIG.
In step S12, a filter control value k is calculated based on the filter coefficient ka obtained from the feature quantity and the filter coefficient ke stored in the coefficient memory 11 (step S30).

次に、フィルタ制御器4における処理の一例を、図9のフローチャートを参照して説明する。尚、図9において、ステップS12は、前述した図2のステップS12と同等である。
ステップS12でフィルタ係数kaが算出されると、係数メモリ11から、蓄積されたフィルタ係数keを入力する(ステップS51)。
Next, an example of processing in the filter controller 4 will be described with reference to the flowchart of FIG. In FIG. 9, step S12 is equivalent to step S12 of FIG.
When the filter coefficient ka is calculated in step S12, the accumulated filter coefficient ke is input from the coefficient memory 11 (step S51).

次に、フィルタ係数kaがフィルタ係数keよりも大きいか否かを判断し、大きい場合にはフィルタ係数kaをフィルタ制御値kとする。一方、フィルタ係数kaがフィルタ係数keよりも大きくない場合にはフィルタ係数keをフィルタ制御値kとする(ステップS52〜S54)。
なお、フィルタ係数ke、kaからフィルタ制御値kを、以下の(5式)により算出するようにしてもよい。
k=(XA×ka+XE×Ke)/(XA+XE) ・・・(5式)
ここで、XAは、フィルタ係数kaの重み付け定数であり、XEは、フィルタ係数keの重み付け定数である。
Next, it is determined whether or not the filter coefficient ka is larger than the filter coefficient ke. If it is larger, the filter coefficient ka is set as the filter control value k. On the other hand, when the filter coefficient ka is not larger than the filter coefficient ke, the filter coefficient ke is set as the filter control value k (steps S52 to S54).
Note that the filter control value k may be calculated from the filter coefficients ke and ka by the following (formula 5).
k = (XA × ka + XE × Ke) / (XA + XE) (Formula 5)
Here, XA is a weighting constant for the filter coefficient ka, and XE is a weighting constant for the filter coefficient ke.

以上のように、本実施形態では、動画像の特徴量を測定し、バッファポインタ、及び符号量制御からの量子化スケールQPに基づいて求めたフィルタ係数keと、特徴量から求めたフィルタ係数kaとを用いて、フィルタ制御値kを求め、求めたフィルタ制御値kに基づいて、符号化直前のフィルタ5により、ビデオ信号の帯域制限を行うようにしたので、視覚的画像品質の低下を防止しつつ、発生符号量を容易に且つ好適に制御することができる。   As described above, in the present embodiment, the feature quantity of the moving image is measured, the filter coefficient ke obtained based on the quantization scale QP from the buffer pointer and the code quantity control, and the filter coefficient ka obtained from the feature quantity. Is used to obtain the filter control value k, and based on the obtained filter control value k, the band of the video signal is limited by the filter 5 immediately before encoding, thereby preventing deterioration of visual image quality. However, the generated code amount can be easily and suitably controlled.

(第2の実施形態)
次に、本発明の第2の実施形態を説明する。尚、本実施形態の説明において、前述した第1の実施形態と同一の部分については、図1〜図9に付した符号と同一の符号を付すなどして詳細な説明を省略する。
(Second Embodiment)
Next, a second embodiment of the present invention will be described. In the description of the present embodiment, the same parts as those in the first embodiment described above are denoted by the same reference numerals as those in FIGS.

前述した第1の実施形態では、特徴量メモリ2が1フレーム分の特徴量を蓄積し、フレームメモリ6が1フレーム分の画像信号を格納し、係数メモリ11が1フレーム分の係数を蓄積するようにした。これに対し、本実施形態では、特徴量メモリ2がMフレーム分の特徴量を蓄積し、フレームメモリ6がMフレーム分の画像信号を格納し、係数メモリ11がMフレーム分の係数を蓄積するようにしている。このように、前述した第1の実施形態では、フィルタ処理、蓄積処理、及び符号化処理を1フレームごとに行うようにしたが、本実施形態では、これらの処理をMフレームごとに行うようにしている。   In the first embodiment described above, the feature amount memory 2 stores the feature amount for one frame, the frame memory 6 stores the image signal for one frame, and the coefficient memory 11 stores the coefficient for one frame. I did it. In contrast, in the present embodiment, the feature amount memory 2 accumulates feature amounts for M frames, the frame memory 6 stores image signals for M frames, and the coefficient memory 11 accumulates coefficients for M frames. I am doing so. As described above, in the first embodiment, the filter process, the accumulation process, and the encoding process are performed for each frame. However, in the present embodiment, these processes are performed for each M frame. ing.

本実施形態の画像符号化装置の構成は、図1に示した第1の実施形態の画像符号化装置と同じであるが、前述したように、特徴量メモリ2はMフレーム分の特徴量を蓄積し、フレームメモリ6はMフレーム分の画像信号を格納し、係数メモリ11はMフレーム分の係数を蓄積する。   The configuration of the image encoding device of the present embodiment is the same as that of the image encoding device of the first embodiment shown in FIG. 1, but as described above, the feature amount memory 2 stores the feature amounts for M frames. The frame memory 6 stores image signals for M frames, and the coefficient memory 11 stores coefficients for M frames.

次に、本実施形態の画像符号化装置の動作について説明する。
本実施形態での処理は、大きく2つに分類される。先頭からMフレームまでの処理と(以下、先頭Mフレームと略称する)、それ以外のフレームの処理である。先頭Mフレームでの処理は、符号化前にMフレーム分のフィルタ処理を実行した画像を用意するまで実行される。一方、それ以外の定常時の処理は、前記フィルタの施されたフレームを符号化する処理と、さらに次の符号化対象となるフレームに対しフィルタを施す処理とを行う。ここで、MフレームとはMPEGのオーダリング単位であり、Bピクチャを扱うエンコーダで必須のメモリ領域分と等しい。
Next, the operation of the image coding apparatus according to this embodiment will be described.
Processing in this embodiment is roughly classified into two. The process from the top to the M frame (hereinafter abbreviated as the top M frame) and the other frames. The process for the first M frame is executed until an image that has been subjected to filter processing for M frames is prepared before encoding. On the other hand, the other normal processing includes processing for encoding the frame subjected to the filter and processing for filtering the frame to be encoded next. Here, the M frame is an MPEG ordering unit and is equal to the memory area essential for an encoder that handles B pictures.

先頭Mフレームのフィルタ処理を行う際の画像符号化装置の動作は、Mフレーム分の動作を行う他は、前述した図2のフローチャートと同じである。すなわち、ステップS10において、特徴量測定器1は、ビデオ信号のMフレーム分の特徴量actをマクロブロック毎に算出する。特徴量actの計算式は、前述した(2式)の通りである。   The operation of the image encoding apparatus when performing the filtering process for the top M frame is the same as that of the flowchart of FIG. 2 described above except that the operation for M frames is performed. That is, in step S10, the feature quantity measuring device 1 calculates a feature quantity act for M frames of the video signal for each macroblock. The calculation formula of the feature amount act is as described above (Formula 2).

次に、ステップS11において、前記算出した特徴量actを、特徴量メモリ2へMフレーム分蓄積する。このとき、特徴量actのフレーム内の平均値avg_actを算出し、特徴量メモリ2へ格納する。
次に、ステップS12において、前記蓄積されたマクロブロック毎の特徴量actから、Mフレームの同一位置のマクロブロックにおける特徴量の平均値actm(以下、Mフレーム平均特徴量と称する)を算出し、さらにこのMフレーム平均特徴量actmからフィルタ係数kaを算出する。
Next, in step S <b> 11, the calculated feature quantity act is stored in the feature quantity memory 2 for M frames. At this time, an average value avg_act in the frame of the feature amount act is calculated and stored in the feature amount memory 2.
Next, in step S12, an average value actm (hereinafter referred to as an M frame average feature amount) of the feature amount in the macro block at the same position in the M frame is calculated from the accumulated feature amount act for each macro block. Further, a filter coefficient ka is calculated from the M frame average feature value actm.

前記Mフレーム平均特徴量actmと、フィルタ係数kaとの関係は、図3に示したのと同じになる。Mフレーム平均特徴量actmの値がactA以上となった場合、フィルタ係数kaが減少し、フィルタ強度が増加する。
次に、ステップS13において、前記フィルタ係数kaを用いて、先頭Mフレームに対しフィルタを実行し、フレームメモリへ蓄積する。
The relationship between the M frame average feature value actm and the filter coefficient ka is the same as that shown in FIG. When the value of the M frame average feature value actm is greater than or equal to actA, the filter coefficient ka decreases and the filter strength increases.
Next, in step S13, using the filter coefficient ka, a filter is executed on the first M frames and stored in the frame memory.

定常時の符号化処理を行う際の画像符号化装置の動作は、Mフレーム分の動作を行う他は、前述した図4のフローチャートと同じである。すなわち、ステップS31において、符号量制御器9は、量子化スケールmquantを算出し、算出した量子化スケールmquantに対し、前記蓄積された特徴量メモリ2内のフレーム毎の特徴量act、及び特徴量actのフレーム内の平均値avg_actを算出し、前記(3式)及び(4式)により重み付けする。以上の処理により最終的な量子化スケール(符号量制御値)QPを算出し、符号化器7を制御する。   The operation of the image encoding apparatus when performing the regular encoding process is the same as the flowchart of FIG. 4 described above except that the operation for M frames is performed. That is, in step S31, the code amount controller 9 calculates the quantization scale mquant, and the accumulated feature amount act for each frame in the feature amount memory 2 and the feature amount for the calculated quantization scale mquant. The average value avg_act in the frame of act is calculated, and weighted according to the above (Expression 3) and (Expression 4). The final quantization scale (code amount control value) QP is calculated by the above processing, and the encoder 7 is controlled.

次に、ステップS32において、符号化器7は、フレームメモリ6に蓄積されたフレームを符号化し、ステップS33において、量子化スケールQPと、バッファ8からのバッファポインタとに基づいて、フィルタ係数keを算出し、ステップS34において、フィルタ係数keを係数メモリ11へ蓄積する。尚、本実施形態では、量子化スケールQPとバッファポインタとのそれぞれからフィルタ係数を求め、両者の一方を選択して最終的なフィルタ係数keとしている。   Next, in step S32, the encoder 7 encodes the frame stored in the frame memory 6, and in step S33, the filter coefficient ke is calculated based on the quantization scale QP and the buffer pointer from the buffer 8. In step S34, the filter coefficient ke is stored in the coefficient memory 11. In the present embodiment, the filter coefficient is obtained from each of the quantization scale QP and the buffer pointer, and one of the two is selected as the final filter coefficient ke.

また、フィルタ係数keを求める際の画像符号化装置の動作は、前述した図5のフローチャートの通りである。
定常時のフィルタ処理を行う際の画像符号化装置の動作は、Mフレーム分の動作を行う他は、前述した図8のフローチャートと同様である。すなわち、ステップS10において、Mフレーム分の特徴量を入力し、ステップS11において、それらMフレーム分の特徴量を蓄積し、ステップS12において、それらMフレーム分の特徴量から、マクロブロック毎のフィルタ係数Kaの平均値を求める。
Further, the operation of the image coding apparatus when obtaining the filter coefficient ke is as shown in the flowchart of FIG.
The operation of the image encoding device when performing the regular filter processing is the same as that of the flowchart of FIG. 8 described above except that the operation for M frames is performed. That is, in step S10, feature values for M frames are input, feature values for these M frames are accumulated in step S11, and filter coefficients for each macroblock are calculated from the feature values for these M frames in step S12. The average value of Ka is obtained.

そして、ステップS30において、求めたフィルタ係数kaの平均値とフィルタ係数keとに基づいてフィルタ制御値kを算出し、ステップS13において、算出したフィルタ制御値kを用いてフィルタ処理を実行し、フィルタ処理を実行したビデオ信号をフレームメモリ6へ蓄積する。   In step S30, a filter control value k is calculated based on the obtained average value of the filter coefficients ka and the filter coefficient ke. In step S13, filter processing is executed using the calculated filter control value k. The processed video signal is stored in the frame memory 6.

さらに、フィルタ制御器4における処理は、Mフレーム分の動作を行う他は、前述した図9のフローチャートと同様である。すなわち、ステップS12において、Mフレーム分の特徴量から、マクロブロック毎のフィルタ係数Kaの平均値を算出し、ステップS51において、係数メモリ11から、蓄積されたフィルタ係数keを入力する。このとき、フィルタ係数keから、Mフレームの同一位置のマクロブロックにおけるフィルタ係数keの平均値kem(以下、Mフレーム平均フィルタ係数)を算出する。
次に、Mフレーム平均フィルタ係数kemと、フィルタ係数kaの平均値とを用いて、フィルタ制御値kを算出する(ステップS52〜S54)。尚、このとき、前述した(5式)を用いてフィルタ制御値kを算出するようにしてもよい。
Further, the processing in the filter controller 4 is the same as the flowchart of FIG. 9 described above except that the operation for M frames is performed. That is, in step S12, the average value of the filter coefficient Ka for each macroblock is calculated from the feature amounts for M frames, and the accumulated filter coefficient ke is input from the coefficient memory 11 in step S51. At this time, an average value kem (hereinafter referred to as M frame average filter coefficient) of the filter coefficient ke in the macroblock at the same position in the M frame is calculated from the filter coefficient ke.
Next, the filter control value k is calculated using the M frame average filter coefficient kem and the average value of the filter coefficient ka (steps S52 to S54). At this time, the filter control value k may be calculated using the above-described (Formula 5).

以上のように、本実施形態では、メモリ内に蓄積された複数フレームに対し、同一強度のフィルタを施すようにしたので、前述した第1の実施形態の効果に加え、画像の急激な帯域制限の変化を防止することができ、視覚的画像品質の低下をより確実に防止することができる。
また、メモリの調停により、フィルタ処理と符号化処理を分けて動作できるため、2つの処理の並列動作が可能となる。
As described above, in the present embodiment, the filters having the same strength are applied to a plurality of frames stored in the memory. Therefore, in addition to the effect of the first embodiment described above, a sharp band limitation of an image is performed. Can be prevented, and deterioration of visual image quality can be more reliably prevented.
Further, since the filtering process and the encoding process can be performed separately by the arbitration of the memory, the two processes can be operated in parallel.

(第3の実施形態)
次に、本発明の第3の実施形態を説明する。尚、本実施形態の説明において、前述した第1の実施形態と同一の部分については、図1〜図9に付した符号と同一の符号を付すなどして詳細な説明を省略する。
(Third embodiment)
Next, a third embodiment of the present invention will be described. In the description of the present embodiment, the same parts as those in the first embodiment described above are denoted by the same reference numerals as those in FIGS.

図10は、本実施形態の画像符号化装置の構成の一例を示すブロック図である。尚、本実施形態の画像符号化装置においても、制御の最小単位をマクロブロックとする。
図10において、21は、入力画像の特徴量としてマクロブロック毎の特徴量を測定する特徴量測定器である。本実施形態では、マクロブロック毎の分散と画素間差分の最大値を測定する。22は、特徴量測定器11からの特徴量を蓄積する特徴量メモリである。本実施形態ではMフレーム分の特徴量を蓄積するものとする。
FIG. 10 is a block diagram illustrating an example of the configuration of the image encoding device according to the present embodiment. In the image coding apparatus of this embodiment, the minimum control unit is a macro block.
In FIG. 10, reference numeral 21 denotes a feature amount measuring device that measures a feature amount for each macroblock as a feature amount of an input image. In the present embodiment, the maximum value of the variance and inter-pixel difference for each macroblock is measured. Reference numeral 22 denotes a feature amount memory that accumulates feature amounts from the feature amount measuring device 11. In the present embodiment, feature amounts for M frames are accumulated.

23は、前記蓄積された特徴量から、フィルタの係数を算出するフィルタ係数算出器である。24は、エッジを保護し且つ平滑化するεフィルタである。本実施形態で使用するεフィルタ24は、以下の(6式)及び(7式)で示されるフィルタ処理を行う。   A filter coefficient calculator 23 calculates a filter coefficient from the accumulated feature amount. Reference numeral 24 denotes an ε filter that protects and smoothes edges. The ε filter 24 used in the present embodiment performs filter processing represented by the following (formula 6) and (formula 7).

Figure 2006157083
Figure 2006157083

この(6式)及び(7式)で示されるフィルタ処理では、中心画素f(x,y)と、その近傍画素f(x+i,y+j)との差分値を計算し、その絶対値がεよりも大きい場合は、その近傍の画素の値を中心画素の値に置き換えて平滑化処理を行う(x,y=−M,・・・,0,1,・・・,M)。その結果、εフィルタ4の出力g(x,y)では、エッジ成分を保護し、小振幅の高調波であるノイズを平滑化して抑制することができる。尚、εフィルタについての詳細は、「原島博ほか"ε−分離非線形ディジタルフィルタとその応用"電子情報通信学会 昭57−論146〔A−36〕 昭和57年4月」に記載されている。   In the filter processing represented by (Expression 6) and (Expression 7), the difference value between the central pixel f (x, y) and its neighboring pixel f (x + i, y + j) is calculated, and the absolute value thereof is calculated. If the value is larger than ε, smoothing processing is performed by replacing the value of the neighboring pixel with the value of the central pixel (x, y = −M,..., 0, 1,..., M). . As a result, in the output g (x, y) of the ε filter 4, the edge component can be protected and noise that is a harmonic having a small amplitude can be smoothed and suppressed. Details of the ε filter are described in “Hiroshima Hara et al.,“ Ε-Separation Nonlinear Digital Filter and Its Applications ”, IEICE 57-146 [A-36] April 1982”.

25は、εフィルタ4におけるフィルタ処理の結果を格納するフレームメモリである。
26は、水平、垂直双方の2次元帯域制限フィルタである。本実施形態で使用する2次元帯域制限フィルタ26は、前記(1式)で示されるものであり、3画素×3ラインの2次元フィルタである。以降、この2次元帯域制限フィルタをkフィルタと称す。
A frame memory 25 stores the result of the filter processing in the ε filter 4.
Reference numeral 26 denotes a horizontal and vertical two-dimensional band limiting filter. The two-dimensional band limiting filter 26 used in the present embodiment is represented by the above (1), and is a two-dimensional filter of 3 pixels × 3 lines. Hereinafter, this two-dimensional band limiting filter is referred to as a k filter.

27は、kフィルタ26におけるフィルタ処理の結果を格納するフレームメモリである。本実施形態では、特徴量メモリ2と同様に、Mフレーム分の画像信号を格納するものとする。28は、フレームメモリ27に蓄積された画像信号を符号化する符号化器である。
29は、符号化器28から出力されたストリームを蓄積するエンコーダ出力のバッファである。バッファ29は、符号化器28から出力されたストリームに基づくフレーム毎の発生符号量と、デコーダバッファを想定したデコーダバッファポインタを出力する。デコーダバッファポインタは、バッファサイズからエンコーダバッファポインタを差し引いた値とする。
A frame memory 27 stores the result of the filter processing in the k filter 26. In the present embodiment, similarly to the feature amount memory 2, image signals for M frames are stored. Reference numeral 28 denotes an encoder that encodes an image signal stored in the frame memory 27.
Reference numeral 29 denotes an encoder output buffer for accumulating the stream output from the encoder 28. The buffer 29 outputs a generated code amount for each frame based on the stream output from the encoder 28 and a decoder buffer pointer assuming a decoder buffer. The decoder buffer pointer is a value obtained by subtracting the encoder buffer pointer from the buffer size.

30は、バッファ29から出力された発生符号量に基づいて、符号化器8を制御する符号量制御器である。31は、前記符号化器8からの制御パラメータとバッファ9から出力されたデコーダバッファポインタから、εフィルタ24及びkフィルタ26の係数を算出するフィルタ係数算出器である。本実施形態では、前記制御パラメータを量子化スケールとする。   Reference numeral 30 denotes a code amount controller for controlling the encoder 8 based on the generated code amount output from the buffer 29. A filter coefficient calculator 31 calculates the coefficients of the ε filter 24 and the k filter 26 from the control parameter from the encoder 8 and the decoder buffer pointer output from the buffer 9. In this embodiment, the control parameter is a quantization scale.

32は、フィルタ係数算出器31で算出された係数を蓄積する係数メモリである。本実施形態では、特徴量メモリ22と同様に、Mフレーム分の係数を蓄積するものとする。33は、kフィルタ26の制御を行うkフィルタ制御器である。34は、εフィルタ24の制御を行うεフィルタ制御器である。   A coefficient memory 32 stores the coefficients calculated by the filter coefficient calculator 31. In the present embodiment, as in the feature amount memory 22, coefficients for M frames are accumulated. Reference numeral 33 denotes a k filter controller that controls the k filter 26. Reference numeral 34 denotes an ε filter controller that controls the ε filter 24.

次に、以上のような構成を有する本実施形態の画像符号化装置の動作について説明する。
本実施形態での処理は、大きく2つに分類される。先頭Mフレームの処理と、それ以外のフレームの処理である。先頭Mフレームでの処理は、符号化前にMフレーム分のフィルタ処理を実行した画像を用意するまでを実行される。一方、それ以外の定常時の処理は、前記フィルタの施されたフレームを符号化する処理と、さらに次の符号化対象となるフレームに対してフィルタを施す処理とを行う。ここで、MフレームとはMPEGのオーダリング単位であり、Bピクチャを扱うエンコーダで必須のメモリ領域分と等しい。
Next, the operation of the image coding apparatus of the present embodiment having the above configuration will be described.
Processing in this embodiment is roughly classified into two. This is processing of the first M frame and processing of other frames. The processing for the first M frame is executed until an image that has been subjected to filter processing for M frames is prepared before encoding. On the other hand, the other normal processing includes a process of encoding the frame subjected to the filter and a process of applying a filter to a frame to be encoded next. Here, the M frame is an MPEG ordering unit and is equal to the memory area essential for an encoder that handles B pictures.

次に、先頭Mフレームのフィルタ処理(先頭フレームフィルタ処理)を行う際の画像符号化装置の動作の一例について、図11のフローチャートを参照して説明する。
まず、ビデオ信号は特徴量測定器21へ入力され、特徴量測定器21は、マクロブロック内の隣接する画素間差分の最大値mdをマクロブロック毎に算出する(ステップS110)。ここで、マクロブロック内の隣接する画素間差分の最大値mdは、マクロブロック内の輝度信号(=16画素×16ライン)を対象として得られる値である。この画素間差分の最大値mdの計算式を以下の(8式)に示す。
Next, an example of the operation of the image coding apparatus when performing the filtering process of the leading M frame (leading frame filtering process) will be described with reference to the flowchart of FIG.
First, the video signal is input to the feature amount measuring device 21, and the feature amount measuring device 21 calculates the maximum value md of the difference between adjacent pixels in the macroblock for each macroblock (step S110). Here, the maximum value md of the difference between adjacent pixels in the macroblock is a value obtained for the luminance signal (= 16 pixels × 16 lines) in the macroblock. The calculation formula of the maximum value md of the inter-pixel difference is shown in the following (Equation 8).

md=MAX_i0_15_j0_14(abs(p(i+1,j)−p(i,j))) ・・・(8式)
ここで、iは、マクロブロック内水平画素位置である。jは、マクロブロック内垂直ライン位置である。p(i,j)は、マクロブロック内画素(座標(i,j))である。absは、絶対値であることを示す。MAX_i0_15_j0_14は、i=0〜14,j=0〜15における最大値を選択することを示す。
md = MAX_i0_15_j0_14 (abs (p (i + 1, j) -p (i, j))) (Expression 8)
Here, i is the horizontal pixel position in the macroblock. j is the vertical line position in the macroblock. p (i, j) is a pixel in the macroblock (coordinates (i, j)). abs indicates an absolute value. MAX_i0_15_j0_14 indicates that the maximum value in i = 0 to 14, j = 0 to 15 is selected.

次に、前記算出した画素間差分の最大値mdを、特徴量メモリ22へMフレーム分蓄積する(ステップS111)。
次に、εフィルタ制御器34は、画素間差分の最大値mdから、Mフレームの同一位置のマクロブロックにおける平均値mdmを算出し、さらにこの平均値mdmからフィルタ制御値εを算出する(ステップS112)。本実施形態では、以下の(9式)の変換式とによりフィルタ制御値εを算出するものとする。
ε=mdm/2 ・・・(9式)
Next, the calculated maximum value md of the inter-pixel difference is stored in the feature amount memory 22 for M frames (step S111).
Next, the ε filter controller 34 calculates the average value mdm in the macroblock at the same position in the M frame from the maximum value md of the inter-pixel difference, and further calculates the filter control value ε from the average value mdm (step). S112). In the present embodiment, it is assumed that the filter control value ε is calculated by the following conversion formula (formula 9).
ε = mdm / 2 (9 formulas)

εフィルタ24は、フィルタ制御値εを用いて、入力されたビデオ信号(入力画像)に対してフィルタ処理を実行する。εフィルタ24でフィルタ処理が実行された出力画像は、フレームメモリ25へ蓄積される。尚、先頭Mフレームにおいては、kフィルタ26によるフィルタ処理を実行せず、フレームメモリ25内の出力画像は、フレームメモリ27へ蓄積される(ステップS113)。   The ε filter 24 performs filter processing on the input video signal (input image) using the filter control value ε. The output image that has been filtered by the ε filter 24 is stored in the frame memory 25. In the first M frame, the filter process by the k filter 26 is not executed, and the output image in the frame memory 25 is accumulated in the frame memory 27 (step S113).

定常時の符号化処理を行う際の画像符号化装置の動作は、前述した第2の実施形態と同じである(図4を参照)。すなわち、ステップS31において、符号量制御器30は、バッファ29からの発生符号量から量子化スケールQPを算出し、符号化器28を制御する。
次に、ステップS32において、符号化器28は、フレームメモリ27に蓄積されたフレームを符号化し、ステップS33において、係数算出器31は、バッファ29からのバッファポインタと符号量制御器30からの量子化スケールQPとに基づいて、フィルタ係数keを算出し、ステップS34において、フィルタ係数keを係数メモリ32へ蓄積する。尚、動画像の符号化ではMフレームの処理単位で本処理を繰り返すことになる。
The operation of the image coding apparatus when performing a regular coding process is the same as that of the second embodiment described above (see FIG. 4). That is, in step S 31, the code amount controller 30 calculates the quantization scale QP from the generated code amount from the buffer 29 and controls the encoder 28.
Next, in step S32, the encoder 28 encodes the frame stored in the frame memory 27. In step S33, the coefficient calculator 31 receives the buffer pointer from the buffer 29 and the quantum amount from the code amount controller 30. The filter coefficient ke is calculated based on the quantization scale QP, and the filter coefficient ke is stored in the coefficient memory 32 in step S34. Note that in the encoding of moving images, this processing is repeated for each processing unit of M frames.

また、フィルタ係数keを求める際の画像符号化装置の動作は、前述した図5のフローチャートの通りである。   Further, the operation of the image coding apparatus when obtaining the filter coefficient ke is as shown in the flowchart of FIG.

次に、定常時のフィルタ処理(定常フレームフィルタ処理)を行う際の画像符号化装置の動作の一例について、図12のフローチャートを参照して説明する。尚、動画像の符号化ではMフレームの処理単位で本処理を繰り返すことになる。尚、図12において、ステップS12は、前述した図2などと同等である。   Next, an example of the operation of the image coding apparatus when performing the filtering process (stationary frame filter process) at the normal time will be described with reference to the flowchart of FIG. Note that in the encoding of moving images, this processing is repeated for each processing unit of M frames. In FIG. 12, step S12 is equivalent to FIG.

まず、ビデオ信号は特徴量測定器21へ入力され、特徴量測定器21は、マクロブロック毎の分散と画素間差分の最大値を算出する(ステップS120)。画素間差分の最大値mdに関しての処理は前述した通りであるので詳細な説明を省略し、ここでは、もう一つの特徴量である分散値を得るまでの動作について説明する。   First, the video signal is input to the feature amount measuring device 21, and the feature amount measuring device 21 calculates the maximum value of the variance and inter-pixel difference for each macroblock (step S120). Since the processing regarding the maximum value md of the inter-pixel difference is as described above, a detailed description thereof will be omitted, and here, an operation until obtaining a variance value which is another feature amount will be described.

本実施形態では、特徴量測定器21において、分散値をマクロブロック毎に算出する。算出したマクロブロック毎の分散値をactと称す。この分散値actは、マクロブロック内の輝度信号における4ブロックの分散値における最小値に1を加えた値とする。この分散値actの計算式は、前記(2式)に示した通りである。   In the present embodiment, the feature value measuring device 21 calculates a variance value for each macroblock. The calculated variance value for each macroblock is referred to as act. The variance value act is a value obtained by adding 1 to the minimum value of the variance values of four blocks in the luminance signal in the macroblock. The calculation formula of the dispersion value act is as shown in the above (Formula 2).

次に、前記算出した分散値actを、前記画素間差分の最大値mdと同時に、特徴量メモリ22へMフレーム分蓄積する(ステップS121)。
次に、前述したステップS12の通り、εフィルタ制御器34は、前記画素間差分の最大値mdを、εフィルタ24におけるフィルタ制御値(閾値)εに変換し、このフィルタ制御値εを用いて、εフィルタ24は、入力画像に対してフィルタ処理を実行し、フレームメモリ25へ蓄積する(ステップS122)。
Next, the calculated variance value act is stored in the feature amount memory 22 for M frames simultaneously with the maximum value md of the inter-pixel difference (step S121).
Next, as described in step S12, the ε filter controller 34 converts the maximum value md of the inter-pixel difference into a filter control value (threshold value) ε in the ε filter 24, and uses this filter control value ε. The ε filter 24 performs a filtering process on the input image and accumulates it in the frame memory 25 (step S122).

次に、kフィルタ制御器33は、特徴量メモリ22内に蓄積されたマクロブロック毎の分散値actと、前記蓄積された係数メモリ32内のフィルタ係数keとに基づいてフィルタ制御値kを算出する(ステップS123)。
次に、前記算出されたフィルタ制御値kを用いて、kフィルタ6は、フレームメモリ25に蓄積された画像信号に対してフィルタ処理を実行し、フレームメモリ27へ蓄積する(ステップS124)。
Next, the k filter controller 33 calculates a filter control value k based on the variance value act for each macroblock accumulated in the feature amount memory 22 and the accumulated filter coefficient ke in the coefficient memory 32. (Step S123).
Next, using the calculated filter control value k, the k filter 6 performs filter processing on the image signal accumulated in the frame memory 25 and accumulates it in the frame memory 27 (step S124).

ここで、εフィルタ制御器34における処理の一例を、図13のフローチャートを参照して説明する。
まず、係数メモリ12からフィルタ係数keを入力する(ステップS130)。次に、フィルタ係数keと予め定められた値KEとを比較し(ステップS131)、フィルタ係数keが予め定められた値KEよりも小さければ、εフィルタ24をオフ(OFF)とする(ステップS132)。一方、フィルタ係数keが予め定められた値KE以上であれば、前述したステップS12の処理を実行してフィルタ制御値εを算出し、εフィルタ24をオン(ON)とする(ステップS133)。
Here, an example of processing in the ε filter controller 34 will be described with reference to the flowchart of FIG. 13.
First, the filter coefficient ke is input from the coefficient memory 12 (step S130). Next, the filter coefficient ke is compared with a predetermined value KE (step S131). If the filter coefficient ke is smaller than the predetermined value KE, the ε filter 24 is turned off (step S132). ). On the other hand, if the filter coefficient ke is equal to or greater than a predetermined value KE, the process of step S12 described above is executed to calculate the filter control value ε, and the ε filter 24 is turned on (step S133).

次に、kフィルタ制御器33における処理の一例を、図14のフローチャートを参照して説明する。
まず、特徴量メモリ22内に蓄積されたマクロブロック毎の分散値actから、Mフレームの同一位置のマクロブロックにおける平均値actm(以下、Mフレーム平均分散と称す)を算出し、フィルタ係数kaを算出する(ステップS140)。
前記Mフレーム平均分散actmと、フィルタ係数kaとの関係は、図3に示したのと同じになる。グラフ内のactAは、Mフレーム平均分散actmの最小値であり、曲線が漸近する値となる。本実施形態では初期値を0する。また、Mフレーム平均分散actmがactA以上となった場合、フィルタ係数kaが減少し、フィルタ強度が増加する。
Next, an example of processing in the k filter controller 33 will be described with reference to the flowchart of FIG.
First, an average value actm (hereinafter referred to as M frame average variance) in a macroblock at the same position in M frames is calculated from the variance value act for each macroblock stored in the feature amount memory 22, and a filter coefficient ka is calculated. Calculate (step S140).
The relationship between the M frame average variance actm and the filter coefficient ka is the same as that shown in FIG. ActA in the graph is the minimum value of the M frame average variance actm, and is a value that the curve is asymptotic. In this embodiment, the initial value is zero. When the M frame average variance actm is greater than or equal to actA, the filter coefficient ka decreases and the filter strength increases.

次に、係数メモリ32から蓄積されたフィルタ係数keを入力する(ステップS141)。このとき、フィルタ係数keから、Mフレームの同一位置におけるマクロブロックの平均値kem(Mフレーム平均フィルタ係数)を算出する。
次に、係数メモリ32から得たMフレーム平均フィルタ係数kemと、係数算出器23から得たフィルタ係数kaとを用いて、フィルタ制御値kを、前記(7式)により算出する(ステップS142)。
Next, the filter coefficient ke accumulated from the coefficient memory 32 is input (step S141). At this time, the average value kem (M frame average filter coefficient) of the macroblock at the same position in the M frame is calculated from the filter coefficient ke.
Next, using the M frame average filter coefficient kem obtained from the coefficient memory 32 and the filter coefficient ka obtained from the coefficient calculator 23, the filter control value k is calculated according to the above (Equation 7) (step S142). .

以上のように、本実施形態では、符号化直前のフィルタを2種類設け、それぞれを同時に制御することにより、1つのフィルタにて平坦部のノイズを除去し、もう一方で帯域制限を行うようにしたので、前述した第1及び第2の実施形態における効果に加え、視覚的画像品質の低下をより確実に防止しつつ、発生符号量をより好適に制御することができる。   As described above, in this embodiment, two types of filters immediately before encoding are provided, and by controlling each of them simultaneously, noise in the flat portion is removed by one filter, and band limitation is performed on the other side. Therefore, in addition to the effects in the first and second embodiments described above, it is possible to more suitably control the amount of generated code while more surely preventing deterioration in visual image quality.

なお、前述した各実施形態では、画像特徴量として、ブロック内の分散値を元に、(6式)を用いて分散値actを求めるようにしたが、発生符号量を想定できるこれ以外の式で、画像特徴量を求めても構わない。
また、帯域制限フィルタとして、(3式)に示すような2次元kフィルタを用いたが、別の形式のフィルタでも構わない。その際、フィルタの帯域を制御する係数が複数になるとするなら、本実施形態のkに対し、複数の係数の組み合わせを定めた表を用意しそれを使用すればよい。
In each of the above-described embodiments, the variance value act is obtained using (Equation 6) as the image feature amount based on the variance value in the block. However, other equations that can assume the generated code amount are used. Thus, the image feature amount may be obtained.
In addition, a two-dimensional k filter as shown in (Expression 3) is used as the band limiting filter, but another type of filter may be used. At this time, if there are a plurality of coefficients for controlling the band of the filter, a table in which a combination of a plurality of coefficients is defined for k in this embodiment may be prepared and used.

さらに、バッファポインタからフィルタ係数を求める際に、フィルタの効果はバッファサイズの1/2以下としたが、それ以外の値でもかまわない。
また、フィルタ係数を算出する際の関係式は、本実施形態で説明した式以外の式でも構わない。実装上さらに簡単にするため単純な比例式を用いても構わない。
さらに、フィルタを切り替える周期をマクロブロック単位としたが、これ以外の単位で切り替えても構わない。
さらに、第3の実施の形態においては、処理の簡易化のため、2種類のフィルタのどちらかを固定的に扱うようにしても構わない。たとえば、εフィルタのフィルタ係数(閾値)εを固定値としても構わない。
Further, when the filter coefficient is obtained from the buffer pointer, the effect of the filter is set to ½ or less of the buffer size, but other values may be used.
Further, the relational expression for calculating the filter coefficient may be an expression other than the expression described in the present embodiment. A simple proportional expression may be used for easier implementation.
Furthermore, although the cycle for switching the filters is set to the macroblock unit, the switching may be performed in units other than this.
Furthermore, in the third embodiment, either one of the two types of filters may be fixedly handled in order to simplify the processing. For example, the filter coefficient (threshold value) ε of the ε filter may be a fixed value.

(第4の実施形態)
前述した第1〜第3の実施形態における画像符号化装置は、図15に示すようなコンピュータを用いて実現することができる。
図15において、1000はコンピュータ全体の制御、及び種々の処理を行う中央演算装置(CPU)、1001は本コンピュータの制御に必要なオペレーティングシステム(OS)、ソフトウエア、データ、演算に必要な記憶領域を提供するメモリである。また、このメモリ1001は、CPU1000が各種の処理を行う際のワークエリアとしても用いられる。
(Fourth embodiment)
The image encoding apparatus in the first to third embodiments described above can be realized using a computer as shown in FIG.
In FIG. 15, reference numeral 1000 denotes a central processing unit (CPU) that controls the entire computer and performs various processes. Reference numeral 1001 denotes an operating system (OS), software, data, and storage area necessary for control of the computer. Is a memory that provides The memory 1001 is also used as a work area when the CPU 1000 performs various processes.

1002は、種々の装置をつなぎ、データ、制御信号をやりとりするバスである。1003は、各種のソフトウエアを蓄積する記憶装置(記録メディア)である。1004は、動画像データを蓄積する記憶装置(記録メディア)である。1005は、画像やコンピュータからのシステムメッセージなどを表示するモニタである。
1007は、通信回路1008に符号化データを送信する通信インターフェースであり、装置外部のLAN、公衆回線、無線回線、放送電波等と接続されている。1006は、コンピュータを起動したり、ビットレート等の各種条件を設定したりするための端末である。
A bus 1002 connects various devices and exchanges data and control signals. Reference numeral 1003 denotes a storage device (recording medium) that stores various types of software. Reference numeral 1004 denotes a storage device (recording medium) that accumulates moving image data. Reference numeral 1005 denotes a monitor that displays images and system messages from the computer.
A communication interface 1007 transmits encoded data to the communication circuit 1008, and is connected to a LAN, a public line, a wireless line, a broadcast wave, and the like outside the apparatus. Reference numeral 1006 denotes a terminal for starting up the computer and setting various conditions such as a bit rate.

なお、メモリ1001には、コンピュータ全体を制御し、各種ソフトウエアを動作させるためのOSや、動作させるソフトウエアを格納し、画像データを符号化のために読み込むエリア、一時的に符号データを格納する符号エリア、各種演算のパラメータ等を格納しておくワーキングエリアが存在する。   The memory 1001 stores an OS for controlling the entire computer and operating various software and software to be operated, an area for reading image data for encoding, and temporarily stores code data. There is a working area for storing a code area to be used, parameters for various operations, and the like.

このような構成のコンピュータにおいて、処理に先立ち、ユーザの端末1006の操作に基づいて、記憶装置1004に蓄積されている動画像データから符号化する動画像データを選択し、コンピュータの起動が指示される。そうすると、記憶装置1003に格納されているソフトウエアがバス1002を介してメモリ1001に展開され、ソフトウエアが起動される。   In the computer having such a configuration, prior to processing, based on the operation of the terminal 1006 by the user, the moving image data to be encoded is selected from the moving image data stored in the storage device 1004 and the computer is instructed to start. The Then, the software stored in the storage device 1003 is expanded in the memory 1001 via the bus 1002, and the software is activated.

そして、CPU1000による記憶装置1004に格納されている動画像データの符号化動作は、図4、5、8、9及び図11〜14に示したフローチャートに従ったプログラムコード(前述のソフトウエア)が実行されることになる。
このように、本実施形態におけるコンピュータは、第1〜第3の実施形態における画像符号化装置を実現する装置として機能する。
Then, the encoding operation of the moving image data stored in the storage device 1004 by the CPU 1000 is performed by the program code (the above-mentioned software) according to the flowcharts shown in FIGS. 4, 5, 8, and 9 and FIGS. Will be executed.
As described above, the computer according to the present embodiment functions as a device that implements the image coding device according to the first to third embodiments.

(本発明の他の実施形態)
上述した実施形態の機能を実現するべく各種のデバイスを動作させるように、該各種デバイスと接続された装置あるいはシステム内のコンピュータに対し、前記実施形態の機能を実現するためのソフトウエアのプログラムコードを供給し、そのシステムあるいは装置のコンピュータ(CPUあるいはMPU)に格納されたプログラムに従って前記各種デバイスを動作させることによって実施したものも、本発明の範疇に含まれる。
(Other embodiments of the present invention)
Software program code for realizing the functions of the above-described embodiment for a computer in an apparatus or a system connected to the various devices so as to operate the various devices to realize the functions of the above-described embodiments. Are implemented by operating the various devices in accordance with a program stored in a computer (CPU or MPU) of the system or apparatus.

また、この場合、前記ソフトウエアのプログラムコード自体が上述した実施形態の機能を実現することになり、そのプログラムコード自体、及びそのプログラムコードをコンピュータに供給するための手段、例えば、かかるプログラムコードを格納した記録媒体は本発明を構成する。かかるプログラムコードを記憶する記録媒体としては、例えばフレキシブルディスク、ハードディスク、光ディスク、光磁気ディスク、CD−ROM、磁気テープ、不揮発性のメモリカード、ROM等を用いることができる。   In this case, the program code of the software itself realizes the functions of the above-described embodiments, and the program code itself and means for supplying the program code to the computer, for example, the program code The stored recording medium constitutes the present invention. As a recording medium for storing the program code, for example, a flexible disk, a hard disk, an optical disk, a magneto-optical disk, a CD-ROM, a magnetic tape, a nonvolatile memory card, a ROM, or the like can be used.

また、コンピュータが供給されたプログラムコードを実行することにより、上述の実施形態の機能が実現されるだけでなく、そのプログラムコードがコンピュータにおいて稼働しているOS(オペレーティングシステム)あるいは他のアプリケーションソフト等と共同して上述の実施形態の機能が実現される場合にもかかるプログラムコードは本発明の実施形態に含まれることは言うまでもない。   Further, by executing the program code supplied by the computer, not only the functions of the above-described embodiments are realized, but also the OS (operating system) or other application software in which the program code is running on the computer, etc. It goes without saying that the program code is also included in the embodiment of the present invention even when the functions of the above-described embodiment are realized in cooperation with the embodiment.

さらに、供給されたプログラムコードがコンピュータの機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに格納された後、そのプログラムコードの指示に基づいてその機能拡張ボードや機能拡張ユニットに備わるCPU等が実際の処理の一部または全部を行い、その処理によって上述した実施形態の機能が実現される場合にも本発明に含まれることは言うまでもない。   Further, after the supplied program code is stored in the memory provided in the function expansion board of the computer or the function expansion unit connected to the computer, the CPU provided in the function expansion board or function expansion unit based on the instruction of the program code Needless to say, the present invention also includes a case where the functions of the above-described embodiment are realized by performing part or all of the actual processing.

本発明の第1の実施形態を示し、画像符号化装置の構成の一例を示すブロック図である。1 is a block diagram illustrating an example of a configuration of an image encoding device according to a first embodiment of this invention. FIG. 本発明の第1の実施形態を示し、先頭フレームのフィルタ処理を行う際の画像符号化装置の動作の一例を説明するフローチャートである。5 is a flowchart illustrating an example of an operation of the image encoding device when performing the filtering process of the first frame according to the first embodiment of this invention. 本発明の第1の実施形態を示し、特徴量とフィルタ係数との関係の一例をグラフ化して示した図である。It is the figure which showed the 1st Embodiment of this invention and graphed and showed an example of the relationship between a feature-value and a filter coefficient. 本発明の第1の実施形態を示し、定常時の符号化処理を行う際の画像符号化装置の動作の一例を説明するフローチャートである。It is a flowchart which shows the 1st Embodiment of this invention and demonstrates an example of operation | movement of the image coding apparatus at the time of performing the encoding process at the time of steady state. 本発明の第1の実施形態を示し、フィルタ係数を求める際の画像符号化装置の動作の一例を説明するフローチャートである。It is a flowchart which shows the 1st Embodiment of this invention and demonstrates an example of operation | movement of the image coding apparatus at the time of calculating | requiring a filter coefficient. 本発明の第1の実施形態を示し、量子化スケールとフィルタ係数との関係の一例をグラフ化して示した図である。It is the figure which showed the 1st Embodiment of this invention and graphed and showed an example of the relationship between a quantization scale and a filter coefficient. 本発明の第1の実施形態を示し、バッファポインタとフィルタ係数との関係の一例をグラフ化して示した図である。It is the figure which showed the 1st Embodiment of this invention and graphed and showed an example of the relationship between a buffer pointer and a filter coefficient. 本発明の第1の実施形態を示し、定常時のフィルタ処理を行う際の画像符号化装置の動作の一例を説明するフローチャートである。5 is a flowchart illustrating an example of an operation of the image encoding device when performing a filtering process in a steady state according to the first embodiment of this invention. 本発明の第1の実施形態を示し、フィルタ制御器における処理の一例を説明するフローチャートである。It is a flowchart which shows the 1st Embodiment of this invention and demonstrates an example in the process in a filter controller. 本発明の第3の実施形態を示し、画像符号化装置の構成の一例を示すブロック図である。It is a block diagram which shows the 3rd Embodiment of this invention and shows an example of a structure of an image coding apparatus. 本発明の第3の実施形態を示し、先頭Mフレームのフィルタ処理を行う際の画像符号化装置の動作の一例を説明するフローチャートである。10 is a flowchart illustrating an example of the operation of the image encoding device when performing the filtering process for the first M frames according to the third embodiment of this invention. 本発明の第3の実施形態を示し、定常時のフィルタ処理を行う際の画像符号化装置の動作の一例を説明するフローチャートである。It is a flowchart which shows the 3rd Embodiment of this invention and demonstrates an example of operation | movement of the image coding apparatus at the time of performing the filter process at the time of steady state. 本発明の第3の実施形態を示し、εフィルタ制御器における処理の一例を説明するフローチャートである。It is a flowchart which shows the 3rd Embodiment of this invention and demonstrates an example in the process in an epsilon filter controller. 本発明の第3の実施形態を示し、kフィルタ制御器における処理の一例を説明するフローチャートである。It is a flowchart which shows the 3rd Embodiment of this invention and demonstrates an example of the process in a k filter controller. 本発明の第4の実施形態を示し、画像符号化装置を実現するコンピュータシステムの構成の一例を示したブロック図である。It is the block diagram which showed the 4th Embodiment of this invention and showed an example of the structure of the computer system which implement | achieves an image coding apparatus. 従来の技術を示し、従来の動画像符号化装置の構成の一例を示したブロック図である。It is the block diagram which showed the prior art and showed an example of the structure of the conventional moving image encoder. 従来の技術を示し、符号化されたピクチャの構造の一例を示した図である。It is the figure which showed the prior art and showed an example of the structure of the encoded picture.

符号の説明Explanation of symbols

1、21 特徴量測定器
2、22 特徴量メモリ
3、10、23、31 係数算出器
4 フィルタ制御器
5 フィルタ
6、25、27 フレームメモリ
7、28 符号化器
8、29 バッファ
9、30 符号量制御器
11、32 係数メモリ
24 εフィルタ
26 kフィルタ
33 kフィルタ制御器
34 εフィルタ制御器
1000 CPU
1001 メモリ
1002 バス
1003、1004 記憶装置(記録メディア)
1005 モニタ
1006 端末
1007 通信I/F
1, 21 Feature amount measuring device 2, 22 Feature amount memory 3, 10, 23, 31 Coefficient calculator 4 Filter controller 5 Filter 6, 25, 27 Frame memory 7, 28 Encoder 8, 29 Buffer 9, 30 Code Quantity controller 11, 32 Coefficient memory 24 ε filter 26 k filter 33 k filter controller 34 ε filter controller 1000 CPU
1001 Memory 1002 Bus 1003, 1004 Storage device (recording medium)
1005 Monitor 1006 Terminal 1007 Communication I / F

Claims (11)

入力された動画像データを前処理する前処理手段と、
前記前処理手段により前処理された動画像データを符号化する符号化手段と、
前記符号化手段により符号化された動画像データを蓄積する蓄積手段と、
前記入力された動画像データの特徴量を用いて、前処理制御用の第1の係数を生成する第1の係数生成手段と、
前記符号化手段により動画像データが符号化される際に使用された制御パラメータと、前記蓄積手段により蓄積された動画像データの発生符号量とを用いて、前処理制御用の第2の係数を生成する第2の係数生成手段とを有し、
前記前処理手段は、前記第1の係数及び前記第2の係数に応じて、前記入力された動画像データを前処理し、
前記符号化手段は、前記入力された動画像データの特徴量と、前記蓄積手段に蓄積されている動画像データの発生符号量とに基づいて、前記前処理手段により前処理された動画像データを符号化することを特徴とする画像符号化装置。
Preprocessing means for preprocessing input video data;
Encoding means for encoding moving image data preprocessed by the preprocessing means;
Storage means for storing moving image data encoded by the encoding means;
First coefficient generation means for generating a first coefficient for preprocessing control using the feature amount of the input moving image data;
A second coefficient for preprocessing control using the control parameter used when the moving image data is encoded by the encoding unit and the generated code amount of the moving image data stored by the storage unit Second coefficient generation means for generating
The preprocessing means preprocesses the input moving image data according to the first coefficient and the second coefficient,
The encoding means is the moving image data preprocessed by the preprocessing means based on the feature amount of the input moving image data and the generated code amount of the moving image data stored in the storage means. An image encoding apparatus that encodes
前記入力された動画像データの特徴量を領域毎に測定する特徴量測定手段を有することを特徴とする請求項1に記載の画像符号化装置。   The image coding apparatus according to claim 1, further comprising a feature amount measuring unit that measures the feature amount of the input moving image data for each region. 前記特徴量測定手段は、前記入力された動画像データを、前記符号化手段により符号化される単位と同等の領域で分割し、その分割した領域毎に、前記入力された動画像データの分散値を測定することを特徴とする請求項2に記載の画像符号化装置。   The feature amount measuring unit divides the input moving image data in an area equivalent to a unit encoded by the encoding unit, and distributes the input moving image data for each of the divided regions. The image coding apparatus according to claim 2, wherein a value is measured. 前記符号化手段は、前記蓄積手段に蓄積されている動画像データの発生符号量に基づいて、量子化スケールを算出し、算出した量子化スケールを、前記入力された動画像データの特徴量を用いて重み付けし、重み付けした量子化スケールを前記制御パラメータとして、前記前処理された動画像データを符号化することを特徴とする請求項1〜3の何れか1項に記載の画像符号化装置。   The encoding unit calculates a quantization scale based on a generated code amount of the moving image data stored in the storage unit, and calculates the calculated quantization scale as a feature amount of the input moving image data. 4. The image encoding device according to claim 1, wherein the pre-processed moving image data is encoded using the weighted quantization scale as the control parameter. 5. . 前記第2の係数生成手段は、前記制御パラメータとしての量子化スケールに基づく係数と、前記蓄積手段により蓄積された動画像データの発生符号量に基づく係数とをそれぞれ生成し、生成した2つの係数を比較し、比較した結果に基づいて、前記第2の係数を求めることを特徴とする請求項1〜4の何れか1項に記載の画像符号化装置。   The second coefficient generation unit generates a coefficient based on a quantization scale as the control parameter and a coefficient based on a generated code amount of moving image data accumulated by the accumulation unit, and generates the generated two coefficients. The image coding apparatus according to claim 1, wherein the second coefficient is obtained based on the comparison result. 前記入力された動画像データの複数フレーム分の特徴量を蓄積する特徴量蓄積手段と、
前記前処理手段により前処理された複数フレーム分の動画像データを蓄積する画像蓄積手段と、
前記第2の係数算出手段により算出された複数フレーム分の第2の係数を蓄積する第2の係数蓄積手段とを有することを特徴とする請求項1〜5の何れか1項に記載の画像符号化装置。
Feature quantity storage means for storing feature quantities for a plurality of frames of the input moving image data;
Image storage means for storing moving image data for a plurality of frames preprocessed by the preprocessing means;
6. The image according to claim 1, further comprising a second coefficient accumulation unit that accumulates second coefficients for a plurality of frames calculated by the second coefficient calculation unit. Encoding device.
前記前処理手段は、前記入力された動画像データの特徴量に基づいて、前記入力された動画像データのエッジを保護するとともに前記入力された動画像データを平滑化する第1の前処理手段と、
前記第1の係数生成手段により生成された第1の係数と、前記第2の係数生成手段により生成された第2の係数とに基づいて、前記入力された動画像データの帯域制限を行う第2の前処理手段とを有することを特徴とする請求項1〜6の何れか1項に記載の画像符号化装置。
The preprocessing means is a first preprocessing means for protecting edges of the input moving image data and smoothing the input moving image data based on a feature amount of the input moving image data. When,
Based on the first coefficient generated by the first coefficient generation means and the second coefficient generated by the second coefficient generation means, a band limitation of the input moving image data is performed. The image coding apparatus according to claim 1, further comprising: two preprocessing units.
前記特徴量測定手段は、前記入力された動画像データを、前記符号化手段により符号化される単位と同等の領域で分割し、その分割した領域毎に、前記入力された動画像データの分散値を測定する分散値測定手段と、
前記入力された動画像データの隣接する画素間の差分値を、前記分割した領域毎に測定する差分値測定手段とを有することを特徴とする請求項7に記載の画像符号化装置。
The feature amount measuring unit divides the input moving image data in an area equivalent to a unit encoded by the encoding unit, and distributes the input moving image data for each of the divided regions. A dispersion value measuring means for measuring a value;
8. The image encoding apparatus according to claim 7, further comprising difference value measuring means for measuring a difference value between adjacent pixels of the input moving image data for each of the divided areas.
前記第1の前処理手段は、前記入力された動画像データの平坦部のみを平滑化し、
前記第2の前処理手段は、前記入力された動画像データの空間周波数を2次元空間で帯域制限することを特徴とする請求項7又は8に記載の画像符号化装置。
The first preprocessing means smoothes only a flat portion of the input moving image data,
The image coding apparatus according to claim 7 or 8, wherein the second preprocessing means band-limits the spatial frequency of the input moving image data in a two-dimensional space.
入力された動画像データを前処理する前処理ステップと、
前記前処理ステップにより前処理された動画像データを符号化する符号化ステップと、
前記符号化ステップにより符号化された動画像データを蓄積する蓄積ステップと、
前記入力された動画像データの特徴量を用いて、前処理制御用の第1の係数を生成する第1の係数生成ステップと、
前記符号化ステップにより動画像データが符号化される際に使用された制御パラメータと、前記蓄積ステップにより蓄積された動画像データの発生符号量とを用いて、前処理制御用の第2の係数を生成する第2の係数生成ステップとを有し、
前記前処理ステップは、前記第1の係数及び前記第2の係数に応じて、前記入力された動画像データを前処理し、
前記符号化ステップは、前記入力された動画像データの特徴量と、前記バッファステップに蓄積されている動画像データの発生符号量とに基づいて、前記前処理ステップにより前処理された動画像データを符号化することを特徴とする画像符号化方法。
A preprocessing step for preprocessing input video data;
An encoding step for encoding the moving image data preprocessed by the preprocessing step;
An accumulation step for accumulating moving image data encoded by the encoding step;
A first coefficient generation step of generating a first coefficient for preprocessing control using the feature amount of the input moving image data;
A second coefficient for preprocessing control using the control parameter used when moving image data is encoded by the encoding step and the generated code amount of the moving image data accumulated by the accumulation step A second coefficient generation step for generating
The preprocessing step preprocesses the input moving image data according to the first coefficient and the second coefficient,
In the encoding step, the moving image data preprocessed by the preprocessing step based on the feature amount of the input moving image data and the generated code amount of the moving image data stored in the buffer step An image encoding method characterized by encoding.
入力された動画像データを前処理する前処理ステップと、
前記前処理ステップにより前処理された動画像データを符号化する符号化ステップと、
前記符号化ステップにより符号化された動画像データを蓄積する蓄積ステップと、
前記入力された動画像データの特徴量を用いて、前処理制御用の第1の係数を生成する第1の係数生成ステップと、
前記符号化ステップにより動画像データが符号化される際に使用された制御パラメータと、前記蓄積ステップにより蓄積された動画像データの発生符号量とを用いて、前処理制御用の第2の係数を生成する第2の係数生成ステップとをコンピュータに実行させ、
前記前処理ステップは、前記第1の係数及び前記第2の係数に応じて、前記入力された動画像データを前処理し、
前記符号化ステップは、前記入力された動画像データの特徴量と、前記バッファステップに蓄積されている動画像データの発生符号量とに基づいて、前記前処理ステップにより前処理された動画像データを符号化することを特徴とするコンピュータプログラム。
A preprocessing step for preprocessing input video data;
An encoding step for encoding the moving image data preprocessed by the preprocessing step;
An accumulation step for accumulating moving image data encoded by the encoding step;
A first coefficient generation step of generating a first coefficient for preprocessing control using the feature amount of the input moving image data;
A second coefficient for preprocessing control using the control parameter used when moving image data is encoded by the encoding step and the generated code amount of the moving image data accumulated by the accumulation step Causing the computer to execute a second coefficient generation step of generating
The preprocessing step preprocesses the input moving image data according to the first coefficient and the second coefficient,
In the encoding step, the moving image data preprocessed by the preprocessing step based on the feature amount of the input moving image data and the generated code amount of the moving image data stored in the buffer step The computer program characterized by encoding.
JP2004339934A 2004-11-25 2004-11-25 Image coding apparatus, image coding method, and computer program Pending JP2006157083A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004339934A JP2006157083A (en) 2004-11-25 2004-11-25 Image coding apparatus, image coding method, and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004339934A JP2006157083A (en) 2004-11-25 2004-11-25 Image coding apparatus, image coding method, and computer program

Publications (1)

Publication Number Publication Date
JP2006157083A true JP2006157083A (en) 2006-06-15

Family

ID=36634892

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004339934A Pending JP2006157083A (en) 2004-11-25 2004-11-25 Image coding apparatus, image coding method, and computer program

Country Status (1)

Country Link
JP (1) JP2006157083A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8649431B2 (en) 2008-03-04 2014-02-11 Samsung Electronics Co., Ltd. Method and apparatus for encoding and decoding image by using filtered prediction block
KR20160056692A (en) * 2014-11-12 2016-05-20 삼성전자주식회사 Method and apparatus for encoding image using preprocessing

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8649431B2 (en) 2008-03-04 2014-02-11 Samsung Electronics Co., Ltd. Method and apparatus for encoding and decoding image by using filtered prediction block
KR20160056692A (en) * 2014-11-12 2016-05-20 삼성전자주식회사 Method and apparatus for encoding image using preprocessing
KR101631950B1 (en) * 2014-11-12 2016-06-20 삼성전자주식회사 Method and apparatus for encoding image using preprocessing

Similar Documents

Publication Publication Date Title
JP5174958B2 (en) Method and system for simultaneous optimization of video coder and decoder
JPH04196976A (en) Image encoding device
KR20010043395A (en) Method and apparatus for reducing breathing artifacts in compressed video
JP2006211152A (en) Device and method for coding image and decoding image, and programs for coding and decoding image
JP2008503177A (en) Method for color difference deblocking
JP4254147B2 (en) Image information encoding method and apparatus, program, and recording medium
JP3508916B2 (en) Moving image variable bit rate encoding method and apparatus
JP4736619B2 (en) Image processing apparatus and image processing method
JP5362723B2 (en) Compressed image noise removal device and playback device
JP2006279272A (en) Moving picture coder and coding control method thereof
JP4492777B2 (en) Video encoding device
JP4784618B2 (en) Moving picture encoding apparatus, moving picture decoding apparatus, moving picture encoding program, and moving picture decoding program
JP2006157083A (en) Image coding apparatus, image coding method, and computer program
JP2006157084A (en) Image coding apparatus, image coding method, and computer program
JP2005303555A (en) Moving image encoding apparatus and its method
JPH09149417A (en) Dynamic image signal decoder
JPH09200769A (en) Inter-motion compensation frame encoding system
JP4228739B2 (en) Encoding apparatus, encoding method, program, and recording medium
JP2004072143A (en) Encoder and encoding method, program, and recording medium
JP2007020216A (en) Encoding apparatus, encoding method, filtering apparatus and filtering method
JP2005020771A (en) Device and method for decoding dynamic image
JP2006166104A (en) Moving picture encoder, method thereof, program thereof, and storage medium thereof
JP2006166103A (en) Moving picture encoder, method thereof, program thereof, and storage medium thereof
JP2008153802A (en) Moving picture encoding device and moving picture encoding program
JPH10285589A (en) Image encoding device and method and computer readable recording medium recording program for image encoding control