JP4393341B2 - Moving picture coding apparatus and moving picture coding method - Google Patents

Moving picture coding apparatus and moving picture coding method Download PDF

Info

Publication number
JP4393341B2
JP4393341B2 JP2004304738A JP2004304738A JP4393341B2 JP 4393341 B2 JP4393341 B2 JP 4393341B2 JP 2004304738 A JP2004304738 A JP 2004304738A JP 2004304738 A JP2004304738 A JP 2004304738A JP 4393341 B2 JP4393341 B2 JP 4393341B2
Authority
JP
Japan
Prior art keywords
frame data
sharpness
frame
encoded
encoding
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.)
Expired - Fee Related
Application number
JP2004304738A
Other languages
Japanese (ja)
Other versions
JP2006121224A (en
JP2006121224A5 (en
Inventor
充 前田
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 JP2004304738A priority Critical patent/JP4393341B2/en
Publication of JP2006121224A publication Critical patent/JP2006121224A/en
Publication of JP2006121224A5 publication Critical patent/JP2006121224A5/ja
Application granted granted Critical
Publication of JP4393341B2 publication Critical patent/JP4393341B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Description

本発明は動画像符号化装置及び動画像符号化方法に関し、特に、動画像中の複数のフレームデータを参照して、符号化対象のフレームデータに対する動き補償を実行し、前記動画像を符号化するために用いて好適な技術に関する。   The present invention relates to a moving image encoding apparatus and a moving image encoding method, and in particular, refers to a plurality of frame data in a moving image, performs motion compensation on the frame data to be encoded, and encodes the moving image. The present invention relates to a technique suitable for use.

従来、新しい動画像の符号化方式として、H.264符号化方式が注目されている。本符号化方式は、ITU−TとISOが共同で開発した符号化方式である。   Conventionally, the H.264 encoding method has attracted attention as a new moving image encoding method. This encoding method is an encoding method jointly developed by ITU-T and ISO.

この新しい符号化方式の特徴は、従来のMPEG−1、2、4符号化方式と異なり、4×4整数変換を用い、イントラ予測も複数用意されている。また、ループ内フィルタが用いられ、動き補償も7種類のサブブロックで行われている。また、その動き補償の画素精度もMPEG−4符号化方式と同様に、1/4画素精度の動き補償を行うことができる。更に、エントロピー符号化としてユニバーサル可変長符号化やコンテキスト適応可変長符号化が用いられている。   Unlike the conventional MPEG-1, 2, and 4 encoding schemes, this new encoding scheme uses 4 × 4 integer conversion and a plurality of intra predictions are prepared. In addition, an in-loop filter is used, and motion compensation is performed in seven types of sub-blocks. Also, the motion compensation pixel accuracy can be compensated for the ¼ pixel accuracy similarly to the MPEG-4 encoding method. Furthermore, universal variable length coding and context adaptive variable length coding are used as entropy coding.

さらに大きな特徴として、MPEG−1、2、4符号化方式では、符号化対象のフレームの前後2枚の参照画像(フレーム)を用いて動き補償を行っていたが、より多くの参照画像を用いることが可能になっている。ビットストリームの先頭のヘッダに含まれるnum_ref_frames符号は、最大16の値をとることができる。   Furthermore, in the MPEG-1, 2, 4 encoding method, motion compensation is performed using two reference images (frames) before and after the frame to be encoded, but more reference images are used. It is possible. The num_ref_frames code included in the head header of the bitstream can take a maximum of 16 values.

すなわち、動き補償において、符号化対象フレームの前後16枚のフレームを参照画像として参照することが可能である。符号化対象となるマクロブロックは、前述のとおり、最大16フレームの画像に対して、7種類のサブブロックについて1/4画素精度で予測誤差を算出し、予測誤差が最小になるマクロブロックを選択することで符号化効率を大幅に改善することが可能となる。   That is, in motion compensation, 16 frames before and after the encoding target frame can be referred to as a reference image. As described above, for the macroblock to be encoded, the prediction error is calculated with 1/4 pixel accuracy for seven types of sub-blocks for an image of up to 16 frames, and the macroblock that minimizes the prediction error is selected. By doing so, it becomes possible to greatly improve the coding efficiency.

ここで、H.264符号化方式の従来の動画像符号化装置の構成について、図11を用いて説明する。
図11は、従来の動画像符号化装置の構成例を示すブロック図である。
動画像符号化装置には、画像データがマクロブロック単位で入力される。セレクタ1000は、イントラ符号化するか否かを切り替え、イントラ符号化の場合はイントラ予測器1001に画像データが入力される。イントラ予測器1001では、9つのモードで予測を行い、予測誤差を算出する。
Here, H. The configuration of a conventional video encoding apparatus using the H.264 encoding method will be described with reference to FIG.
FIG. 11 is a block diagram illustrating a configuration example of a conventional moving image encoding apparatus.
Image data is input in units of macroblocks to the moving image encoding apparatus. The selector 1000 switches whether to perform intra coding. In the case of intra coding, image data is input to the intra predictor 1001. The intra predictor 1001 performs prediction in nine modes and calculates a prediction error.

一方、イントラ符号化以外の場合は、差分器1002に入力され、予測画像との差分を算出して、予測誤差とする。   On the other hand, in cases other than intra coding, the difference is input to the differentiator 1002, and the difference from the predicted image is calculated as a prediction error.

変換/量子化器1003は、算出された予測誤差を4×4画素ブロックの整数変換を実行し、得られる係数を量子化する。量子化結果である量子化係数は、エントロピー符号化器1004で可変長符号化されて出力器1014に出力される。同時に、量子化結果は逆量子化/逆変換器1005に入力され、予測誤差を復元し、加算器1006で予測画像に加算する。その結果は、復号画像として、フレームメモリ1007〜1010に適宜格納される。   The transformer / quantizer 1003 performs integer transformation of the 4 × 4 pixel block on the calculated prediction error, and quantizes the obtained coefficient. The quantization coefficient that is the quantization result is variable-length encoded by the entropy encoder 1004 and output to the output unit 1014. At the same time, the quantization result is input to the inverse quantization / inverse transformer 1005 to restore the prediction error, and the adder 1006 adds it to the predicted image. The result is appropriately stored in the frame memories 1007 to 1010 as a decoded image.

動き推定器1011は、フレームメモリ1007〜1010に格納された復号画像と入力画像を比較し、各サブブロック単位で1/4画素精度で動きベクトルを算出する。動きベクトルと選択したフレーム番号は、動き補償器1012に入力され、該当するフレームメモリから参照画像を読み込み、予測誤差の最も小さい参照画像を選択して予測画像として差分器1002に出力する。   The motion estimator 1011 compares the decoded image stored in the frame memories 1007 to 1010 with the input image, and calculates a motion vector with a 1/4 pixel accuracy for each subblock. The motion vector and the selected frame number are input to the motion compensator 1012, read the reference image from the corresponding frame memory, select the reference image with the smallest prediction error, and output it to the differencer 1002 as the predicted image.

また、動きベクトルと選択されたフレーム番号は、動き符号化器1013に入力されて符号化され、出力器1014に出力される。出力器1014は、符号化データを書式に従って整形して出力する(例えば、非特許文献1、非特許文献2を参照)。   The motion vector and the selected frame number are input to the motion encoder 1013, encoded, and output to the output unit 1014. The output device 1014 shapes and outputs the encoded data according to the format (see, for example, Non-Patent Document 1 and Non-Patent Document 2).

一方、動画像の撮影などで使用されるカムコーダにおいては、自動で焦点を合わせるオートフォーカス機能が搭載されている。特許文献1に記載の「テレビレンズのフォーカス操作装置」では、その請求項1で被写体の先鋭度を示す焦点評価値を求める評価値算出手段で算出された評価値が最大になるフォーカスポジションを求めてモータを制御してフォーカスを操作するテレビレンズが開示されている。   On the other hand, camcorders used for shooting moving images are equipped with an autofocus function for automatically focusing. In the “TV lens focus operating device” described in Patent Document 1, the focus position at which the evaluation value calculated by the evaluation value calculating means for determining the focus evaluation value indicating the sharpness of the subject is maximized is obtained. A television lens that controls the motor to operate the focus is disclosed.

「Overview of the H.264/AVC video Coding Standard」(IEEE TRANSACTIONS ON CIRCUITS AND SYSTEMS FOR VIDEO TECHNOLOGY,JULY 2003)"Overview of the H.264 / AVC video Coding Standard" (IEEE TRANSACTIONS ON CIRCUITS AND SYSTEMS FOR VIDEO TECHNOLOGY, JULY 2003) 「もたつくMPEG−4を尻目にH.264がいざ発進」(日経エレクトロニクス 2003.7.7号 pp.65〜74)"H.264 is in the midst of stiff MPEG-4" (Nikkei Electronics 2003.7.7 pp. 65-74) 特開平11−103409号公報JP-A-11-103409

しかしながら、上述のH.264符号化方式のように、複数のフレームを参照する符号化方式では、動き補償を実行するために動きベクトルの探索を実行するが、その計算量は参照画像の枚数が増えるにつれて膨大な計算量が必要になるという課題が生じていた。   However, the above-mentioned H.P. In an encoding method that refers to a plurality of frames, such as the H.264 encoding method, a motion vector search is performed in order to perform motion compensation. The amount of calculation increases as the number of reference images increases. There was a problem that it was necessary.

本発明は上記の課題に鑑みてなされたものであり、動画像符号化に使用する参照フレームを好適に選択することができるようにして、動きベクトル探索を効率良く行うことができるようにすることを目的とする。   The present invention has been made in view of the above-described problems, and enables a motion vector search to be efficiently performed by suitably selecting a reference frame to be used for video encoding. With the goal.

本発明の動画像符号化装置は、動画像中の複数のフレームデータを参照して、符号化対象のフレームデータに対する動き補償を実行し、前記動画像を符号化する動画像符号化装置であって、フレームデータを入力する入力手段と、前記入力手段によって入力されたフレームデータから先鋭度を検出する先鋭度検出手段と、前記先鋭度検出手段によって検出された先鋭度が高い上位所定フレーム数のフレームデータを、前記符号化対象のフレームデータを符号化する場合に参照する参照フレームデータとして、前記入力手段によって入力されたフレームデータの中から選択する選択手段と、前記選択手段によって選択された参照フレームデータと、前記符号化対象のフレームデータとに基づいて動き補償を行う動き補償手段と、
前記動き補償手段により行われた動き補償の結果を用いて、前記符号化対象のフレームデータを符号化する符号化手段と、前記符号化手段で符号化されたフレームデータを出力する出力手段とを有することを特徴とする。
The moving image encoding apparatus of the present invention is a moving image encoding apparatus that performs motion compensation on frame data to be encoded with reference to a plurality of frame data in a moving image, and encodes the moving image. Te, input means for inputting frame data, and the sharpness detecting means for detecting the sharpness from the frame data inputted by said input means, has been sharpness is higher the higher predetermined number of frames detected by said sharpness detecting means Referring to the frame data, as reference frame data to be referred to when coding the frame data of the encoding target, and selecting means for selecting from among the frame data inputted by said input means, which is selected by said selection means Motion compensation means for performing motion compensation based on frame data and the frame data to be encoded;
Using the result of motion compensation performed by the motion compensation means, encoding means for encoding the frame data to be encoded, and output means for outputting the frame data encoded by the encoding means It is characterized by having.

本発明の動画像符号化方法は、動画像中の複数のフレームデータを参照して、符号化対象のフレームデータに対する動き補償を実行し、前記動画像を符号化する動画像符号化方法であって、フレームデータを入力する入力工程と、前記入力工程によって入力されたフレームデータから先鋭度を検出する先鋭度検出工程と、前記先鋭度検出工程によって検出された先鋭度が高い上位所定数のフレームデータを、前記符号化対象のフレームデータを符号化する場合に参照する参照フレームデータとして前記入力工程によって入力されたフレームデータの中から選択する選択工程と、前記選択工程によって選択された参照フレームデータと、前記符号化対象のフレームデータとに基づいて動き補償を行う動き補償工程と、前記動き補償工程により行われた動き補償の結果を用いて、前記符号化対象のフレームデータを符号化する符号化工程と、前記符号化工程で符号化されたフレームデータを出力する出力工程とを有することを特徴とする。 The moving image encoding method of the present invention is a moving image encoding method that performs motion compensation on frame data to be encoded with reference to a plurality of frame data in a moving image, and encodes the moving image. An input step for inputting frame data, a sharpness detection step for detecting a sharpness from the frame data input by the input step, and a predetermined number of frames having a high sharpness detected by the sharpness detection step. data, a selection step of selecting the frame data of the encoding target from among the frame data inputted by said input step as reference frame data to be referred to when coding, the reference frame data selected by said selecting step And a motion compensation step for performing motion compensation based on the frame data to be encoded, and the motion compensation step. A coding step for coding the frame data to be coded using the motion compensation result, and an output step for outputting the frame data coded in the coding step. .

本発明のプログラムは、動画像中の複数のフレームデータを参照して、符号化対象のフレームデータに対する動き補償を実行し、前記動画像を符号化する動画像符号化方法をコンピュータに実行させるプログラムであって、フレームデータを入力する入力工程と、
前記入力工程によって入力されたフレームデータから先鋭度を検出する先鋭度検出工程と、前記先鋭度検出工程によって検出された先鋭度が高い上位所定フレーム数のフレームデータを、前記符号化対象のフレームデータを符号化する場合に参照する参照フレームデータとして、前記入力手段によって入力されたフレームデータの中から選択する選択工程と、前記選択工程によって選択された格納媒体に格納されている参照フレームデータと、前記符号化対象のフレームデータとに基づいて動き補償を行う動き補償工程と、前記動き補償工程により行われた動き補償の結果を用いて、前記符号化対象のフレームデータを符号化する符号化工程と、前記符号化工程で符号化されたフレームデータを出力する出力工程とをコンピュータに実行させることを特徴とする。
The program of the present invention refers to a plurality of frame data in a moving image, executes motion compensation for the frame data to be encoded, and causes a computer to execute a moving image encoding method for encoding the moving image. An input process for inputting frame data;
A sharpness detection step of detecting a sharpness from the frame data inputted by the input step, the frame data of the sharpness detecting step number predetermined upper frame is higher sharpness detected by the encoding target frame data As a reference frame data to be referred to when encoding, a selection step for selecting from among the frame data input by the input means, reference frame data stored in the storage medium selected by the selection step, A motion compensation step for performing motion compensation based on the frame data to be encoded, and an encoding step for encoding the frame data to be encoded using a result of motion compensation performed by the motion compensation step. And causing the computer to execute an output step of outputting the frame data encoded in the encoding step It is characterized in.

本発明の記録媒体は、前記に記載のプログラムを記録したことを特徴とする。 The recording medium of the present invention is characterized by recording the program described above.

本発明によれば、先鋭度を指標にして参照フレームの選択を行うようにしたので、少ないフレーム数を参照するだけで、高画質な符号化を行うことが可能になる。   According to the present invention, since the reference frame is selected using the sharpness as an index, it is possible to perform high-quality encoding only by referring to a small number of frames.

(第1の実施の形態)
以下、本発明の第1の実施の形態を、図面を用いて詳細に説明する。
図1は本発明の第1の実施の形態に係る動画像符号化装置の構成例を示すブロック図である。なお、第1の実施の形態では、動画像符号化装置が使用する符号化方式として、H.264符号化方式を例にとって説明するが、これに限定されない。また、説明を容易にするため、過去のフレームを参照する前方向予測を例にしている。また、説明を容易にするため、参照フレーム数を最大16フレームとして説明するが、これに限定されない。
(First embodiment)
Hereinafter, a first embodiment of the present invention will be described in detail with reference to the drawings.
FIG. 1 is a block diagram showing a configuration example of a moving picture coding apparatus according to the first embodiment of the present invention. In the first embodiment, H.264 is used as the encoding method used by the video encoding apparatus. The H.264 encoding method will be described as an example, but the present invention is not limited to this. Further, for ease of explanation, forward prediction with reference to a past frame is taken as an example. For ease of explanation, the maximum number of reference frames is 16, but the present invention is not limited to this.

図1において、1はセレクタであり、フレーム内符号化/フレーム間符号化の符号化モードに応じて、出力を選択する。2はH.264符号化方式によるイントラ予測を実行するイントラ予測器であり、3は動き予測誤差を算出する差分器である。4は整数型直交変換を実行し、得られる係数を量子化する変換/量子化器である。6は量子化係数を逆量子化し、整数型逆直交変換を実行する逆量子化/逆変換器である。   In FIG. 1, reference numeral 1 denotes a selector, which selects an output according to an encoding mode of intraframe encoding / interframe encoding. 2 is H. An intra predictor that performs intra prediction using the H.264 encoding method, and 3 is a subtractor that calculates a motion prediction error. Reference numeral 4 denotes a transform / quantizer that performs integer orthogonal transform and quantizes the obtained coefficient. Reference numeral 6 denotes an inverse quantization / inverse transformer that inversely quantizes the quantized coefficient and executes integer-type inverse orthogonal transform.

5は変換/量子化器4の量子化結果を符号化するエントロピー符号化器である。16は出力器であり、生成された符号をH.264符号化方式の書式に従って整形して出力する。7は加算器であり、逆量子化/逆変換器6より得られた予測誤差と予測値(予測画像)を加算する。   Reference numeral 5 denotes an entropy encoder that encodes the quantization result of the transformer / quantizer 4. 16 is an output device, and the generated code is converted to H.264. The data is formatted according to the H.264 encoding format and output. Reference numeral 7 denotes an adder that adds the prediction error and the prediction value (prediction image) obtained from the inverse quantization / inverse converter 6.

8_1〜8_16はフレームメモリであり、局所復号された画像データをフレーム単位で格納する。9は入出力を制御するセレクタである。
10は動き推定器であり、入力画像と復号画像に基づいて、最適な動きベクトルを該当するフレームから抽出する。13は動き補償器であり、動き推定器10で算出された動きベクトルと該当するフレーム情報から予測画像を生成する。14は動き符号化器であり、算出された動きベクトルと該当するフレーム情報に基づいて、動きの情報を符号化する。
Reference numerals 8_1 to 8_16 denote frame memories, which store locally decoded image data in units of frames. A selector 9 controls input / output.
Reference numeral 10 denotes a motion estimator, which extracts an optimal motion vector from a corresponding frame based on an input image and a decoded image. A motion compensator 13 generates a predicted image from the motion vector calculated by the motion estimator 10 and corresponding frame information. A motion encoder 14 encodes motion information based on the calculated motion vector and the corresponding frame information.

11は入力された画像データの先鋭度を検出する先鋭度検出器であり、12は参照フレームを決定し参照情報として出力する参照フレーム決定器である。15は参照情報を符号化する参照情報符号化器である。   Reference numeral 11 denotes a sharpness detector that detects the sharpness of the input image data, and reference numeral 12 denotes a reference frame determiner that determines a reference frame and outputs it as reference information. Reference numeral 15 denotes a reference information encoder that encodes reference information.

なお、図1の動画像符号化装置は、更に、当該装置全体を制御するCPU、装置を制御するための各種制御プログラムを記憶するROM、各種制御を実行するための各種データの作業領域及び一時待避領域として機能するRAMを有している。   1 further includes a CPU that controls the entire apparatus, a ROM that stores various control programs for controlling the apparatus, a work area for various data for executing various controls, and a temporary storage area. The RAM functions as a save area.

次に、図1の動画像符号化装置の動画像符号化動作について、以下に説明する。
符号化に先立ち、参照に用いることができるフレーム数等を含むヘッダ情報をエントロピー符号化器5が生成し、出力器16から出力する。
Next, the moving picture coding operation of the moving picture coding apparatus in FIG. 1 will be described below.
Prior to encoding, the entropy encoder 5 generates header information including the number of frames that can be used for reference, and outputs the header information from the output unit 16.

画像データは、フレーム単位で入力され、セレクタ1に入力される。セレクタ1では、一定間隔でフレーム内符号化を実行し、それ以外はフレーム間符号化を実行するように、その選択動作が制御される。   The image data is input in units of frames and input to the selector 1. The selector 1 controls the selection operation so that intra-frame encoding is performed at regular intervals and inter-frame encoding is performed at other times.

最初に、先頭の第1フレームに対してフレーム内符号化を実行する場合について説明する。
入力されたフレームデータは、マクロブロック単位でイントラ予測器2に入力され、イントラ予測器2において、ブロック毎にイントラ予測を実行する。その予測結果は、変換/量子化器4に入力され、変換/量子化器4において整数型直交変換を実行し、得られる係数を量子化する。その量子化結果である量子化係数は、エントロピー符号化器5と逆量子化/逆変換器6に入力される。
First, a case where intra-frame coding is performed on the first first frame will be described.
The input frame data is input to the intra predictor 2 in units of macroblocks, and the intra predictor 2 executes intra prediction for each block. The prediction result is input to the transformer / quantizer 4, the integer / orthogonal transformation is executed in the transformer / quantizer 4, and the obtained coefficient is quantized. The quantization coefficient which is the quantization result is input to the entropy encoder 5 and the inverse quantization / inverse transformer 6.

エントロピー符号化器5は、入力された量子化結果をエントロピー符号化し、符号化データは出力器16に入力される。逆量子化/逆変換器6では、入力された量子化結果から復号画像を得て、加算器7に入力する。フレーム内符号化では、予測画像はないので、予測値「0」を加算する。   The entropy encoder 5 performs entropy encoding on the input quantization result, and the encoded data is input to the output unit 16. The inverse quantization / inverse transformer 6 obtains a decoded image from the inputted quantization result and inputs it to the adder 7. In intra-frame coding, since there is no predicted image, a predicted value “0” is added.

一方、先鋭度検出器11は画像データから先鋭度を検出する。先鋭度は画像のエッジの強度によって表されるエッジの強度に関しては画像の1次微分をとってもかまわない。説明のために、画素x(i、j)に対して1次微分値Δx(i、j)は、
Δx(i、j)=4x(i、j)−x(i−1、j)−x(i、j−1)−x(i+1、j)−x(i、j+1)・・・(1)
であり、Δx(i、j)の絶対値が閾値以上のデータの総和を閾値以上であったがその数で割ったものを先鋭度Ek(kはフレームの番号)と定義する。
On the other hand, the sharpness detector 11 detects the sharpness from the image data. The sharpness may be the first derivative of the image with respect to the edge strength represented by the edge strength of the image. For the sake of explanation, the primary differential value Δx (i, j) for the pixel x (i, j) is
Δx (i, j) = 4x (i, j) −x (i−1, j) −x (i, j−1) −x (i + 1, j) −x (i, j + 1) (1)
The sum of the data whose absolute value of Δx (i, j) is equal to or greater than the threshold value is equal to or greater than the threshold value but is divided by the number is defined as the sharpness Ek (k is the frame number).

算出された先鋭度Ekは参照フレーム決定器12に入力される。
図2に、参照フレーム決定器12の詳細なブロック図を示す。図2において、100は入力された先鋭度Ekを一旦蓄積しておく先鋭度バッファであり、101_1〜101_16は先鋭度Ekを格納しておく先鋭度メモリであり、それぞれ、図1のフレームメモリ8_1〜8_16に対応する。
The calculated sharpness Ek is input to the reference frame determiner 12.
FIG. 2 shows a detailed block diagram of the reference frame determiner 12. In FIG. 2, 100 is a sharpness buffer for temporarily storing the input sharpness Ek, 101_1 to 101_16 are sharpness memories for storing the sharpness Ek, and each of them is a frame memory 8_1 in FIG. Corresponds to ~ 8_16.

102は先鋭度比較器であり、先鋭度メモリ101_1〜101_16に格納されている先鋭度Ekを比較し、上位N個を選択し、該当するフレーム番号を決定したり、先鋭度Ekが最小のものを選択したりする。決定されたフレーム番号は先鋭度選択フレーム情報メモリ105に格納される。103はフレームカウンタであり、1フレームを処理するごとに1ずつ内容を増加させる。   Reference numeral 102 denotes a sharpness comparator, which compares the sharpness Ek stored in the sharpness memories 101_1 to 101_16, selects the top N, determines the corresponding frame number, and has the smallest sharpness Ek. Or select. The determined frame number is stored in the sharpness selection frame information memory 105. Reference numeral 103 denotes a frame counter, which increases the content by one every time one frame is processed.

104は、時間的に近傍のフレームの番号を格納しておく時間選択フレーム情報メモリである。105は先鋭度Ekに基づいて選択されたフレームの番号を格納しておく先鋭度選択フレーム情報メモリである。106は先鋭度メモリ制御器であり、先鋭度メモリ101_1〜101_16を制御する。   Reference numeral 104 denotes a time selection frame information memory that stores the numbers of neighboring frames in terms of time. Reference numeral 105 denotes a sharpness selection frame information memory for storing the number of the frame selected based on the sharpness Ek. A sharpness memory controller 106 controls the sharpness memories 101_1 to 101_16.

入力された先鋭度Ekは先鋭度バッファ100に蓄積される。
先鋭度メモリ制御器106は、先鋭度メモリ101_1〜101_16にデータが格納されていないものがあれば、該当する先鋭度メモリに先鋭度バッファ100の内容を格納する。先鋭度メモリ101_1〜101_16の全てにデータが格納されている場合は、格納する先鋭度メモリを選択する。フレームカウンタ103はこの時、kの値を出力している。
The input sharpness Ek is stored in the sharpness buffer 100.
The sharpness memory controller 106 stores the content of the sharpness buffer 100 in the corresponding sharpness memory if there is no data stored in the sharpness memories 101_1 to 101_16. When data is stored in all of the sharpness memories 101_1 to 101_16, the sharpness memory to be stored is selected. At this time, the frame counter 103 outputs the value of k.

時間選択フレーム情報メモリ104は値kから、(k−1)番のフレーム、(k―2)番のフレームと、(k―3)番のフレームを選択するように、(k−1)、(k−2)、(k−3)を格納する。該当するフレームが存在しない場合は存在するもののみを蓄積する。   The time selection frame information memory 104 selects (k−1) number frame, (k−2) number frame, and (k−3) number frame from the value k. (K-2) and (k-3) are stored. If there is no corresponding frame, only those that exist are stored.

その後、先鋭度比較器102は先鋭度メモリ101_1〜101_16のうち、k番のフレーム、および、時間選択フレーム情報メモリ104に格納された(k−1)番のフレーム、(k−2)番のフレーム、(k−3)番のフレームを除いたフレームの先鋭度Ekを先鋭度メモリ101_1〜101_16から読み出し、その最小のものを選択し、その番号を先鋭度メモリ制御器106に入力する。   After that, the sharpness comparator 102 stores the kth frame and the (k-1) th frame stored in the time selection frame information memory 104 in the sharpness memories 101_1 to 101_16. The sharpness Ek of the frame, excluding the (k-3) th frame, is read from the sharpness memories 101_1 to 101_16, the smallest one is selected, and the number is input to the sharpness memory controller 106.

先鋭度メモリ制御器106は、選択された先鋭度Ekに対応するフレーム番号を決定し、先鋭度メモリ101_1〜101_16の内、対応するフレームの先鋭度メモリに先鋭度バッファ100の内容を格納する。先鋭度メモリ制御器106の出力はフレームメモリ8_1〜8_16にも入力される。   The sharpness memory controller 106 determines the frame number corresponding to the selected sharpness Ek, and stores the contents of the sharpness buffer 100 in the sharpness memory of the corresponding frame among the sharpness memories 101_1 to 101_16. The output of the sharpness memory controller 106 is also input to the frame memories 8_1 to 8_16.

図1に戻り、時間的に長い参照フレームを更新するので、参照情報を参照情報符号化器15はH.264符号化方式の書式に従って、参照フレームの更新情報符号化する。加算器7から出力された復号画像データは、図2の先鋭度メモリ制御器106からの出力に基づき、フレームメモリ8_1〜8_16のいずれかに格納される。   Returning to FIG. 1, since the reference frame that is long in time is updated, the reference information encoder 15 converts the reference information into the H.264 format. The reference frame update information is encoded according to the H.264 encoding format. The decoded image data output from the adder 7 is stored in one of the frame memories 8_1 to 8_16 based on the output from the sharpness memory controller 106 in FIG.

続いて、後続の第2フレーム以降のフレームに対してフレーム間符号化を実行する場合について説明する。
先鋭度検出器11は、画像データから先鋭度Ekを検出する。算出された先鋭度Ekは参照フレーム決定器12に入力される。参照フレーム決定器12は、参照するフレームを5フレーム選択する場合を例に取るが選択されるフレーム数はこれに限定されない。
Subsequently, a case where interframe coding is performed on the subsequent frames after the second frame will be described.
The sharpness detector 11 detects the sharpness Ek from the image data. The calculated sharpness Ek is input to the reference frame determiner 12. The reference frame determiner 12 takes as an example a case where five frames to be referenced are selected, but the number of frames to be selected is not limited to this.

図2に移り、入力された先鋭度Ekは先鋭度バッファ100に蓄積される。
フレームカウンタ103はこの時、kのカウント値を出力している。時間選択フレーム情報メモリ104はカウント値kから、(k−1)番のフレーム、(k―2)番のフレームと、(k―3)番のフレームを選択するように、(k−1)、(k−2)、(k−3)を格納する。該当するフレームが存在しない場合は存在するもののみを蓄積する。
Turning to FIG. 2, the input sharpness Ek is stored in the sharpness buffer 100.
At this time, the frame counter 103 outputs a count value of k. The time selection frame information memory 104 selects (k−1) th frame, (k−1) th frame, (k−2) th frame, and (k−3) th frame from the count value k. , (K-2), (k-3) are stored. If there is no corresponding frame, only those that exist are stored.

その後、先鋭度比較器102は先鋭度メモリ101_1〜101_16のうち、k番のフレーム、及び時間選択フレーム情報メモリ104に格納された(k−1)番のフレーム、(k−2)番のフレーム、(k−3)番のフレームを除いたフレームの先鋭度Ekを先鋭度メモリ101_1〜101_16から読み出し、先鋭度Ekの高いものから2つと最小のものを選択する。先鋭度Ekの高いものは該当する番号を先鋭度選択フレーム情報メモリ105に格納される。   After that, the sharpness comparator 102 includes the kth frame, the (k-1) th frame, and the (k-2) th frame stored in the time selection frame information memory 104 in the sharpness memories 101_1 to 101_16. , The sharpness Ek of the frames excluding the (k-3) th frame is read from the sharpness memories 101_1 to 101_16, and the smallest one with the highest sharpness Ek is selected. For those with high sharpness Ek, the corresponding number is stored in the sharpness selection frame information memory 105.

最小のものの番号は、先鋭度メモリ制御器106に入力される。先鋭度メモリ制御器106は選択された先鋭度Ekに対応するフレーム番号を決定し、先鋭度メモリ101_1〜101_16の内、対応するフレームの先鋭度メモリに先鋭度バッファ100の内容を格納する。先鋭度メモリ制御器106の出力はフレームメモリ8_1〜8_16にも入力される。   The smallest number is input to the sharpness memory controller 106. The sharpness memory controller 106 determines a frame number corresponding to the selected sharpness Ek, and stores the contents of the sharpness buffer 100 in the sharpness memory of the corresponding frame among the sharpness memories 101_1 to 101_16. The output of the sharpness memory controller 106 is also input to the frame memories 8_1 to 8_16.

図1に戻り、セレクタ9は、図2の時間選択フレーム情報メモリ104と先鋭度選択フレーム情報メモリ105に格納された番号に該当する選択されたフレームメモリの内容を読み出し、動き推定器10に入力する。動き推定器10は、これらのフレームメモリの内容と入力画像データから、動きベクトルを算出し、動き補償器13で予測画像を生成し、差分器3に入力する。セレクタ1は出力に差分器3を選択する。   Returning to FIG. 1, the selector 9 reads the contents of the selected frame memory corresponding to the numbers stored in the time selection frame information memory 104 and the sharpness selection frame information memory 105 of FIG. 2 and inputs them to the motion estimator 10. To do. The motion estimator 10 calculates a motion vector from the contents of these frame memories and the input image data, generates a predicted image by the motion compensator 13, and inputs it to the differencer 3. The selector 1 selects the differentiator 3 as an output.

差分器3は予測誤差を算出し、その算出結果は変換/量子化器4に入力され、整数型直交変換を実行し、得られる係数を量子化する。その量子化結果である量子化係数は、エントロピー符号化器5と逆量子化/逆変換器6に入力される。また、動き推定器10で算出された動きベクトルは動き符号化器14で符号化され、符号化データは出力器16に入力される。   The subtractor 3 calculates a prediction error, and the calculation result is input to the transformer / quantizer 4 to perform integer orthogonal transformation and quantize the obtained coefficient. The quantization coefficient which is the quantization result is input to the entropy encoder 5 and the inverse quantization / inverse transformer 6. The motion vector calculated by the motion estimator 10 is encoded by the motion encoder 14, and the encoded data is input to the output unit 16.

エントロピー符号化器5では、入力された量子化結果をエントロピー符号化し、符号化データは出力器16に入力される。
逆量子化/逆変換器6では、入力された量子化結果から予測誤差を得て、加算器7に入力する。予測誤差に動き補償器13からの予測画像(予測値)を加算する。加算器7から出力された復号画像データは、図2の先鋭度メモリ制御器106からの出力に基づき、フレームメモリに格納される。
In the entropy encoder 5, the input quantization result is entropy encoded, and the encoded data is input to the output unit 16.
The inverse quantization / inverse transformer 6 obtains a prediction error from the input quantization result and inputs it to the adder 7. The prediction image (prediction value) from the motion compensator 13 is added to the prediction error. The decoded image data output from the adder 7 is stored in the frame memory based on the output from the sharpness memory controller 106 in FIG.

次に、第1の実施の形態の動画像符号化装置における動画像符号化処理の処理手順について、図3のフローチャートを用いて説明する。
まず、ステップS1にて、ヘッダ情報を生成して出力する。次に、ステップS2にて、全てのフレームの符号化が終了したか否かを判定する。この判定の結果、符号化が終了している場合(ステップS2でYES)、処理を終了する。一方、符号化が終了していない場合(ステップS2でNO)には、ステップS3に進む。
Next, the processing procedure of the moving image encoding process in the moving image encoding device of the first embodiment will be described with reference to the flowchart of FIG.
First, in step S1, header information is generated and output. Next, in step S2, it is determined whether or not all frames have been encoded. If the result of this determination is that encoding is complete (YES in step S2), the processing is terminated. On the other hand, if the encoding has not ended (NO in step S2), the process proceeds to step S3.

ステップS3においては、符号化対象のフレームデータを入力する。次に、ステップS4にて、フレームデータから先鋭度Ekを算出する。その後、ステップS5に進み、時間的に近傍のM(この場合は、「3」)フレームを参照フレームとして選択する。   In step S3, frame data to be encoded is input. Next, in step S4, the sharpness Ek is calculated from the frame data. Thereafter, the process proceeds to step S5, and a temporally neighboring M (in this case, “3”) frame is selected as a reference frame.

次に、ステップS6に進み、上記選択したMフレームを除いたフレームで、先鋭度Ekの高いNフレームを参照フレーム(この場合は、「2」)として選択する。
次に、ステップS7にて、フレーム内符号化の場合は、フレーム内のデータを用いて符号化する。また、フレーム間符号化の場合は、上記の参照フレームを参照して、フレームデータを符号化する。
Next, the process proceeds to step S6, and N frames with high sharpness Ek are selected as reference frames (in this case, “2”) from the frames excluding the selected M frames.
Next, in step S7, in the case of intra-frame encoding, encoding is performed using data in the frame. In the case of inter-frame encoding, frame data is encoded with reference to the reference frame.

次に、ステップS8にて、先鋭度Ekの最も低いフレームを選択する。
次に、ステップS9にて、符号化データから復号画像を再生し、前記ステップS8で選択されたフレームを削除して格納する。先鋭度Ekも同様に格納される。その後、次のフレームを処理するために、ステップS2に戻る。
Next, in step S8, the frame with the lowest sharpness Ek is selected.
Next, in step S9, a decoded image is reproduced from the encoded data, and the frame selected in step S8 is deleted and stored. The sharpness Ek is also stored in the same manner. Thereafter, the processing returns to step S2 in order to process the next frame.

以上説明したように、第1の実施の形態によれば、先鋭度Ekが高いことにより、重要な情報が多く含まれていると思われるフレームを参照するようにしたので、動き補償を効率よく行うことができる。これにより、符号化効率の向上と画質の向上を図ることができる。   As described above, according to the first embodiment, since the sharpness Ek is high, a frame that seems to contain a lot of important information is referred to, so that motion compensation is efficiently performed. It can be carried out. Thereby, it is possible to improve the encoding efficiency and the image quality.

なお、第1の実施の形態においては、参照フレーム数を最大5フレームとしたが、これに限定されず、フレームメモリを必要数揃えることで、その他の枚数の参照にも対応できることは明らかである。また、蓄積しておく最大のフレーム数を16としたが、これに限定されない。   In the first embodiment, the maximum number of reference frames is five. However, the number of reference frames is not limited to this, and it is apparent that other frames can be referred to by arranging the necessary number of frame memories. . Further, although the maximum number of frames to be stored is 16, it is not limited to this.

また、第1の実施の形態においては、時間的に近傍のフレーム数や先鋭度Ekで選択されるフレーム数はこれに限定されない。さらに、これらのフレーム数を可変にしても構わない。   Further, in the first embodiment, the number of frames that are temporally adjacent and the number of frames that are selected based on the sharpness Ek are not limited to this. Furthermore, the number of frames may be variable.

また、第1の実施の形態においては、前方向予測のみを例にとって説明したが、後方向予測や両方向予測を用いた場合も、フレームメモリを必要数揃えることで対応できることは明らかである。また、第1の実施の形態の動画像符号化装置の各種構成要素の一部または全部の機能を、ソフトウェアで記述し、CPU等の演算装置によって処理を実行する構成としても勿論構わない。   In the first embodiment, only forward prediction has been described as an example. However, even when backward prediction or bi-directional prediction is used, it is obvious that it can be handled by arranging the necessary number of frame memories. Of course, a part or all of the functions of the various constituent elements of the moving picture encoding apparatus according to the first embodiment may be described in software, and the processing may be executed by an arithmetic unit such as a CPU.

(第2の実施の形態)
図4は、本発明の第2の実施の形態に係る動画像符号化装置の構成を示すブロック図である。なお、第2の実施の形態では、動画像符号化装置として、カムコーダを例に挙げて説明する。
(Second Embodiment)
FIG. 4 is a block diagram showing a configuration of a moving picture coding apparatus according to the second embodiment of the present invention. In the second embodiment, a camcorder will be described as an example of a video encoding device.

図4において、401は撮像部であり、ピント調節が可能なレンズ等で構成される光学部と、光電変換によって画像のアナログ電気信号を生成する電子回路部とにより構成されている。402は画像データの先鋭度Ekを検出する先鋭度検出器である。また、403は合焦度判定器であり、先鋭度Ekからピントの合っている度合いを判定し、ピントの制御のための信号を生成する。404は合焦度判定器403の出力に基づいて、ピントを調節するためのレンズのピント調節器である。ピント調節器404はレンズの位置を調整するモータ等で構成されている。   In FIG. 4, reference numeral 401 denotes an image pickup unit, which includes an optical unit composed of a lens and the like that can be adjusted in focus, and an electronic circuit unit that generates an analog electrical signal of an image by photoelectric conversion. A sharpness detector 402 detects the sharpness Ek of the image data. Reference numeral 403 denotes an in-focus level determination unit, which determines the degree of focus from the sharpness Ek and generates a signal for controlling the focus. Reference numeral 404 denotes a lens focus adjuster for adjusting the focus based on the output of the in-focus level determination unit 403. The focus adjuster 404 includes a motor that adjusts the position of the lens.

405はアナログ電気信号をデジタル信号に変換するA/D変換器であり、406はデジタル信号を記憶するフレームメモリである。407は先鋭度検出器402の出力に基づいて、参照するフレームを選択する参照フレーム決定器である。なお、本実施の形態においては説明を容易にするために、参照フレーム数を最大5フレームとして説明するが、これに限定されない。   Reference numeral 405 denotes an A / D converter that converts an analog electric signal into a digital signal, and reference numeral 406 denotes a frame memory that stores the digital signal. Reference numeral 407 denotes a reference frame determiner that selects a frame to be referenced based on the output of the sharpness detector 402. In the present embodiment, for ease of explanation, the number of reference frames is described as a maximum of 5 frames, but the present invention is not limited to this.

409は復号画像を格納するフレームメモリ群であり、408はそれを制御するフレームメモリ制御器である。410は参照フレーム決定器407の出力に応じて、フレームメモリ群409の復号画像を参照して動き補償を行う動き補償器であり、411は符号化する符号化器である。符号化方式はH.264符号化方式を例にとって説明するが、これに限定されない。   Reference numeral 409 denotes a frame memory group for storing the decoded image, and reference numeral 408 denotes a frame memory controller for controlling the frame memory group. Reference numeral 410 denotes a motion compensator that performs motion compensation by referring to the decoded image of the frame memory group 409 according to the output of the reference frame determiner 407, and reference numeral 411 denotes an encoder that performs encoding. The encoding method is H.264. The H.264 encoding method will be described as an example, but the present invention is not limited to this.

412は記録メディア413に符号化データを記録するための記録器である。413は符号化データを記録する記録メディアである。414は参照のための復号画像を生成する復号器である。   Reference numeral 412 denotes a recorder for recording the encoded data on the recording medium 413. Reference numeral 413 denotes a recording medium for recording encoded data. Reference numeral 414 denotes a decoder that generates a decoded image for reference.

撮像部401による撮影フレームのアナログ電気信号はA/D変換器405と先鋭度検出器402に入力される。先鋭度検出器402はアナログ信号に高域通過フィルタ(HPF)を施し、その値をデジタル化し、1フレーム分加算する。   An analog electrical signal of a shooting frame from the imaging unit 401 is input to an A / D converter 405 and a sharpness detector 402. The sharpness detector 402 applies a high-pass filter (HPF) to the analog signal, digitizes the value, and adds one frame.

加算された値は、合焦度判定器403に入力される。合焦度判定器403は求められた先鋭度Ekが最大値になるようにピント調節器404に信号を出力する。合焦度の判定に関しては従来技術を用いても構わない。例えば、前述の特許文献1に記載の判定を用いても構わない。ピント調節器404は入力された信号に従って、モータを駆動してレンズの位置を調節する。   The added value is input to the focus degree determination unit 403. The focus degree determination unit 403 outputs a signal to the focus adjustment unit 404 so that the calculated sharpness Ek becomes the maximum value. Conventional techniques may be used for determining the in-focus level. For example, the determination described in Patent Document 1 may be used. The focus adjuster 404 adjusts the position of the lens by driving a motor in accordance with the input signal.

先鋭度Ekは参照フレーム決定器407にも入力される。参照フレーム決定器407では図1の参照フレーム決定器12と同様に、先鋭度Ekから参照するフレームを決定する。フレームメモリ制御器408はフレームメモリ群409から該当するフレームデータを読み出し可能にする。   The sharpness Ek is also input to the reference frame determiner 407. The reference frame determiner 407 determines a frame to be referred to from the sharpness Ek, similarly to the reference frame determiner 12 of FIG. The frame memory controller 408 enables the corresponding frame data to be read from the frame memory group 409.

一方、A/D変換器405に入力されたアナログ電気信号はデジタル化され、フレームメモリ406に格納される。動き補償器410は参照フレーム決定器407で決定されたフレームをフレームメモリ群409から入力し、第1の実施の形態と同様にフレームメモリ406の内容と参照フレームを比較して、動き補償を行い、予測誤差や入力画像のデータを出力する。符号化器411はこれらのデータをフレーム内符号化及びフレーム間符号化を行い、符号化データを生成する。符号化データは記録器412を介して記録メディア413に記録される。   On the other hand, the analog electrical signal input to the A / D converter 405 is digitized and stored in the frame memory 406. The motion compensator 410 receives the frame determined by the reference frame determiner 407 from the frame memory group 409, compares the contents of the frame memory 406 with the reference frame, and performs motion compensation as in the first embodiment. , Output prediction error and input image data. The encoder 411 performs intra-frame encoding and inter-frame encoding on these data to generate encoded data. The encoded data is recorded on the recording medium 413 via the recorder 412.

復号器414は生成された符号化データを復号して、復号画像を生成し、参照フレーム決定器407が指示するフレームのデータが入っているフレームメモリ群409内のメモリにフレームメモリ制御器408の指示に従って、格納する。   The decoder 414 decodes the generated encoded data to generate a decoded image, and the memory of the frame memory group 409 containing the frame data indicated by the reference frame determiner 407 stores the frame memory controller 408. Store according to instructions.

次に、第2の実施の形態の動画像符号化装置の動画像符号化処理の処理フローについて、図5を用いて説明する。
図5は本発明の第2の実施の形態に係る動画像符号化装置における動画像符号化処理を示すフローチャートである。なお、図5において、第1の実施の形態の図3と同様の機能を果たす部分に関しては同じステップ番号を付与し、説明を省略する。
Next, the processing flow of the moving image encoding process of the moving image encoding device according to the second embodiment will be described with reference to FIG.
FIG. 5 is a flowchart showing a moving picture coding process in the moving picture coding apparatus according to the second embodiment of the present invention. In FIG. 5, the same step numbers are assigned to portions that perform the same functions as those in FIG. 3 of the first embodiment, and the description thereof is omitted.

第1の実施の形態と同様に、ステップS1〜ステップS2の処理後、ステップS500にて、フレームデータを撮像する。次に、ステップS4の処理後、ステップS501にて、先鋭度Ekに基づいて焦点の調節を行う。   Similar to the first embodiment, after the processing of step S1 to step S2, frame data is imaged in step S500. Next, after the process of step S4, in step S501, the focus is adjusted based on the sharpness Ek.

その後、ステップS7にて、フレーム内符号化の場合は、フレーム内のデータを用いて、フレーム間符号化の場合は、時間的に近傍のMフレームと先鋭度Ekに基づいて選択されたNフレームを参照して、フレームデータを符号化する。   Thereafter, in step S7, in the case of intra-frame coding, data in the frame is used, and in the case of inter-frame coding, N frames selected based on the temporally neighboring M frames and the sharpness Ek. The frame data is encoded with reference to FIG.

次に、ステップS502にて、符号化データを記録メディア413に記録する。
次に、ステップS503にて、前のフレームの先鋭度Ekと比較して先鋭度Ekが向上していれば、ステップS506に進み、そうでなければ、ステップS504に進む。ステップS504においては、時間的に選択されているMフレームのうち、最も時間が経過しているフレームを選択する。次に、ステップS505にて、符号化データを復号して、生成したフレームデータをステップS504で選択されたフレームに格納する。
In step S502, the encoded data is recorded on the recording medium 413.
Next, in step S503, if the sharpness Ek is improved as compared with the sharpness Ek of the previous frame, the process proceeds to step S506, and if not, the process proceeds to step S504. In step S504, the frame with the most elapsed time is selected from the M frames selected in terms of time. In step S505, the encoded data is decoded, and the generated frame data is stored in the frame selected in step S504.

一方、ステップS503の判定の結果、ステップS506に進んだ場合には、「Mフレーム」前まで遡って先鋭度Ekが単調増加か否かを判定する。この判定の結果、単調増加であれば、ステップS507に進み、そうでなければ、ステップS508に進む。   On the other hand, as a result of the determination in step S503, if the process proceeds to step S506, it is determined whether or not the sharpness Ek is monotonously increased by going back to “M frame”. If the result of this determination is a monotonous increase, the process proceeds to step S507; otherwise, the process proceeds to step S508.

ステップS507においては、先鋭度Ekに基づいて決められたNフレームの参照フレームから「(M+1)フレーム」前のフレームを外す。これは、先鋭度Ekが単調増加しているので、「(M+1)フレーム」前のフレームがNフレームに含まれているので、これを除去対象とするのである。また、ステップS508に進んだ場合には、先鋭度Ekに基づいて決められたNフレームの参照フレームの中で最も先鋭度Ekの低いフレームを外す。   In step S507, the frame before “(M + 1) frames” is removed from the reference frames of N frames determined based on the sharpness Ek. This is because the sharpness Ek monotonously increases, and the frame before “(M + 1) frames” is included in the N frame, and is therefore targeted for removal. If the process proceeds to step S508, the frame with the lowest sharpness Ek is removed from the N frames of reference frames determined based on the sharpness Ek.

次に、ステップS509にて、入力したフレームの復号画像のフレームデータを、ステップS507またはステップS508で除外されたフレームの代わりとすることを選択する。   Next, in step S509, it is selected to use the frame data of the decoded image of the input frame as a substitute for the frame excluded in step S507 or step S508.

次に、ステップS510にて、符号化データを復号して、生成したフレームデータをステップS509で決定されたフレームに格納する。その後、次のフレームを処理するためにステップS2に戻る。   Next, in step S510, the encoded data is decoded, and the generated frame data is stored in the frame determined in step S509. Thereafter, the process returns to step S2 to process the next frame.

以上説明したように、第2の実施の形態によれば、ピント調節の機能と併用することで、ピントが合ったフレームを参照することにより、先鋭度Ekが高い、重要な情報が多く含まれていると思われるフレームを用いて動き補償を行うことができ、動き補償を効率よく行うことができる。特に、本実施の形態においては、ピントを調節している最中に、ピントが合いにくい画像において、ピント調節中に先鋭度Ekの高い画像を参照画像とするようにしたので、ピントが合ったときにピンぼけの画像から参照するのではなく、先鋭度Ekの高い画像を参照することができるので、ピントの合った画像の先頭から動き補償を行うことができる。   As described above, according to the second embodiment, by using together with the focus adjustment function, by referring to the frame in focus, a lot of important information with high sharpness Ek is included. Therefore, motion compensation can be performed using a frame that seems to be present, and motion compensation can be performed efficiently. In particular, in the present embodiment, an image with a high sharpness Ek is used as a reference image during focus adjustment for an image that is difficult to focus during the focus adjustment. Since it is possible to refer to an image with a high sharpness Ek instead of referencing from the out-of-focus image sometimes, motion compensation can be performed from the top of the focused image.

なお、第2の実施の形態においては、先鋭度Ekの検出をアナログ電気信号に対するHPFで求めた高周波成分の和としたが、これに限定されず、デジタル信号に対するHPF演算や、直交変換を行ったときの高周波成分でも対応できることは明らかである。
また、第2の実施の形態の動画像符号化装置の各種構成要素の一部または全部の機能を、ソフトウェアで記述し、CPU等の演算装置によって処理を実行する構成としても勿論構わない。
In the second embodiment, the sharpness Ek is detected as the sum of high-frequency components obtained by HPF for an analog electric signal. However, the present invention is not limited to this, and HPF calculation or orthogonal transformation is performed for a digital signal. It is clear that high frequency components can be dealt with.
Of course, a part or all of the functions of the various components of the moving picture coding apparatus according to the second embodiment may be described in software, and the process may be executed by an arithmetic device such as a CPU.

また、第2の実施形態においては、先鋭度Ekに基づいて参照フレームを決定したが、図6のように、別な方式で合焦度を測定して、これを参照フレーム決定器での先鋭度として入力しても構わない。   In the second embodiment, the reference frame is determined based on the sharpness Ek. However, as shown in FIG. 6, the degree of focus is measured by another method, and this is sharpened by the reference frame determiner. You may enter it as a degree.

図6において、420は被写体との距離を測定する距離測定器であり、超音波等で距離を測定する。421はピント調節器であり、焦点距離をも出力する。422は合焦度判定器であり、距離測定器420の距離とピント調節器421の焦点距離を比較し、その差Dから、1/Dを合焦度Fとする。この値Dが十分に小さい場合に合焦度が大きいと判定する。423は参照フレーム決定器であり、合焦度Fを先鋭度Ekの変わりとして参照フレームを決定する。   In FIG. 6, reference numeral 420 denotes a distance measuring device that measures the distance to the subject, and measures the distance using ultrasonic waves or the like. Reference numeral 421 denotes a focus adjuster that outputs a focal length. Reference numeral 422 denotes an in-focus degree determiner, which compares the distance of the distance measuring device 420 with the focal length of the focus adjuster 421 and sets 1 / D as the in-focus degree F from the difference D. When this value D is sufficiently small, it is determined that the degree of focus is large. Reference numeral 423 denotes a reference frame determiner, which determines a reference frame with the focus degree F as a change of the sharpness degree Ek.

これにより、ピントを調節している最中に、ピントが合いにくい画像において、ピントが合ったときにピンぼけの画像から参照するのではなく、ピントの合った画像の先頭から動き補償を行うことができる。   This makes it possible to perform motion compensation from the beginning of the in-focus image instead of referring to the out-of-focus image when the image is in focus when adjusting the focus. it can.

また、第2の実施の形態としてカムコーダを例にとったがこれに限定されず、記録器412の代わりに通信インターフェースを、記録メディア413の代わりに通信回線を用いることで、動画像伝送装置としても勿論構わない。   Further, although the camcorder is taken as an example as the second embodiment, the present invention is not limited to this. By using a communication interface instead of the recording device 412 and a communication line instead of the recording medium 413, a moving image transmission apparatus is provided. Of course.

(第3の実施の形態)
図7は、本発明の第3の実施の形態に係る動画像符号化装置の構成を示すブロック図である。図7において、300は装置全体の制御、及び種々の処理を行う中央演算装置(CPU)、301は本装置の制御に必要なオペレーティングシステム(OS)、ソフトウェア、演算に必要な記憶領域を提供するメモリである。302は動画像符号化装置を構成する各種構成要素を相互に接続し、データ及び制御信号を転送するバスである。
(Third embodiment)
FIG. 7 is a block diagram showing a configuration of a moving picture encoding apparatus according to the third embodiment of the present invention. In FIG. 7, 300 is a central processing unit (CPU) that controls the entire apparatus and performs various processes, and 301 provides an operating system (OS), software, and a storage area that are necessary for the operation. It is memory. Reference numeral 302 denotes a bus that interconnects various components constituting the moving image encoding apparatus and transfers data and control signals.

303は装置の起動、各種条件の設定、再生の指示を行うための端末である。304はソフトウェアを蓄積する記憶装置である。305は符号化ストリームを蓄積する記憶装置である。記憶装置304及び記憶装置305は、動画像符号化装置から切り離して移動できる可搬性記憶媒体で構成することもできる。   A terminal 303 is used to start the apparatus, set various conditions, and issue a playback instruction. A storage device 304 stores software. A storage device 305 stores the encoded stream. The storage device 304 and the storage device 305 can also be configured by a portable storage medium that can be moved separately from the moving image encoding device.

306は動画像を1フレームずつ撮影できるカメラ(撮像部)である。307は画像を表示するモニタであり、309は通信回路であり、LAN、公衆回線、無線回線、放送電波等で構成されている。308は通信回路309を介してストリームを送受信する通信インターフェース(I/F)である。   Reference numeral 306 denotes a camera (imaging unit) that can capture a moving image frame by frame. Reference numeral 307 denotes a monitor for displaying an image, and reference numeral 309 denotes a communication circuit, which includes a LAN, a public line, a wireless line, a broadcast wave, and the like. A communication interface (I / F) 308 transmits and receives a stream via the communication circuit 309.

メモリ301には装置全体を制御し、各種ソフトウェアを動作させるためのOSや動作させるソフトウェアが格納され、これに加えて、画像データを格納する画像エリア、生成した符号化データを格納する符号エリア、各種演算や符号化の際のパラメータ等を格納するワーキングエリアが存在する。   The memory 301 controls the entire apparatus and stores an OS for operating various software and software to be operated. In addition, an image area for storing image data, a code area for storing generated encoded data, There is a working area for storing parameters for various operations and encoding.

このような構成において、カメラ306から撮影した動画像を符号化し、通信回線309を介してその外部端末に送信する処理について説明する。ここでは、符号化方式としてH.264符号化方式を例にとって説明するが、これに限定されず、2フレーム以上の複数フレームを参照して符号化する符号化方式であれば、どのような符号化方式でも構わない。また、説明を容易にするために、符号化対象のフレームとして前5フレームを参照することとするが、これに限定されない。   In such a configuration, a process of encoding a moving image taken from the camera 306 and transmitting it to the external terminal via the communication line 309 will be described. Here, H.264 is used as the encoding method. The H.264 encoding method will be described as an example, but the present invention is not limited to this, and any encoding method may be used as long as encoding is performed by referring to a plurality of frames of two or more frames. For ease of explanation, the previous five frames are referred to as encoding target frames, but the present invention is not limited to this.

処理に先立ち、端末303から装置全体に対して起動が指示され、各構成要素が初期化される。これにより、記憶装置304に格納されているソフトウェアが、バス302を介してメモリ301に展開され、ソフトウェアが起動される。   Prior to processing, activation is instructed from the terminal 303 to the entire apparatus, and each component is initialized. As a result, the software stored in the storage device 304 is expanded in the memory 301 via the bus 302, and the software is activated.

ここで、メモリ301のデータ構成について、図10を用いて説明する。図10は、本発明の第3の実施の形態に係るメモリのデータ構成を示す図である。
図10に示すように、メモリ301には、装置全体を制御し、各種ソフトウェアを動作させるためのOS301a、H.264符号化方式を実行する動画像符号化ソフトウェア301b、動画像符号化ソフトウェア301bで参照するフレームを決定する参照フレーム決定ソフトウェア301c、通信を制御する通信ソフトウェア301dが格納される。また、画像データを記憶する画像エリア301e、符号化データを記憶する符号エリア301f、ワーキングエリア301gが構成されている。
Here, the data configuration of the memory 301 will be described with reference to FIG. FIG. 10 is a diagram showing a data configuration of a memory according to the third embodiment of the present invention.
As shown in FIG. 10, the memory 301 includes an OS 301 a, H.264, and the like for controlling the entire apparatus and operating various software. The video encoding software 301b that executes the H.264 encoding method, the reference frame determination software 301c that determines a frame to be referenced by the video encoding software 301b, and the communication software 301d that controls communication are stored. Further, an image area 301e for storing image data, a code area 301f for storing encoded data, and a working area 301g are configured.

このような構成において、CPU300による動画像符号化装置の制御手順について、図8を用いて説明する。
図8は、本実施の形態に係る動画像符号化装置が実行する処理を示すフローチャートである。
In such a configuration, a control procedure of the moving image encoding apparatus by the CPU 300 will be described with reference to FIG.
FIG. 8 is a flowchart showing processing executed by the video encoding apparatus according to the present embodiment.

ステップS700にて、通信ソフトウェアを起動し、通信回線309を介して符号化データを出力するための準備を実行する。通信ソフトウェアは、符号エリアに符号化データが格納されたら、通信インターフェース308を介して通信回線309に送出し、送出後、符号エリアの該当する領域をクリアする。以後、特に、符号エリアの符号化データの送信については言及しない。   In step S700, the communication software is activated and preparations for outputting encoded data via the communication line 309 are executed. When the encoded data is stored in the code area, the communication software transmits it to the communication line 309 via the communication interface 308, and clears the corresponding area of the code area after transmission. Hereinafter, transmission of encoded data in the code area will not be particularly mentioned.

次に、ステップS701にて、参照フレーム決定ソフトウェアを起動し、各部の初期化を実行し、動画像の撮影を開始する。この時、フレームのカウンタの変数Gを0クリアする。   Next, in step S701, the reference frame determination software is activated, each unit is initialized, and moving image shooting is started. At this time, the frame counter variable G is cleared to zero.

次に、第1の実施の形態と同様に、ステップS1〜S4にて、ヘッダ情報を生成し、メモリ301上の符号エリア301fに格納する。ステップS3にて、符号化対象のフレームデータを入力し、メモリ301上の画像エリア301eに格納する。ステップS4にて、フレームデータから先鋭度Ekを算出しメモリ301上のワーキングエリア301gにフレーム単位で格納する。続いて、ステップS702に進み、参照フレーム決定ソフトウェアを動作させる。   Next, as in the first embodiment, header information is generated and stored in the code area 301f on the memory 301 in steps S1 to S4. In step S3, the frame data to be encoded is input and stored in the image area 301e on the memory 301. In step S4, the sharpness Ek is calculated from the frame data and stored in the working area 301g on the memory 301 in units of frames. In step S702, the reference frame determination software is operated.

次に、ステップS702の参照フレーム選択処理の詳細について、図9を用いて説明する。
図9は本発明の第3の実施の形態に係るステップS702の処理の詳細を示すフローチャートである。
まず、ステップS801にて、図8のステップS4で算出した先鋭度Ekと第1の先鋭度閾値Tと比較し、第1の先鋭度閾値Tよりも大きければステップS802に進み、そうでなければステップS805に進む。
Next, details of the reference frame selection process in step S702 will be described with reference to FIG.
FIG. 9 is a flowchart showing details of the process in step S702 according to the third embodiment of the present invention.
First, in step S801, the sharpness Ek calculated in step S4 of FIG. 8 is compared with the first sharpness threshold T, and if greater than the first sharpness threshold T, the process proceeds to step S802, otherwise The process proceeds to step S805.

次に、ステップS802にて、先鋭度Ekと第2の先鋭度閾値Zを比較する。第2の先鋭度閾値Zは第1の先鋭度閾値Tに比べて十分の大きく、砂嵐状のノイズのようなものから抽出された先鋭度Ekをこの値とする。第2の先鋭度閾値Zよりも大きければステップS805に進む。そうでなければステップS803に進む。   Next, in step S802, the sharpness Ek is compared with the second sharpness threshold Z. The second sharpness threshold Z is sufficiently larger than the first sharpness threshold T, and this value is the sharpness Ek extracted from something like sandstorm noise. If it is larger than the second sharpness threshold Z, the process proceeds to step S805. Otherwise, the process proceeds to step S803.

ステップS803にて、第1の先鋭度閾値T以上の参照フレームとの類似度Riを算出する。ここでは、説明のために各画素値について(1)式で求めた先鋭度Ekを平均値で2値化した画像同士で動き補償を行って、生じた予測誤差を求めるものとするが、これに限定されない。類似度Riは各画素値の差分絶対値和や動き補償をしたときの予測誤差の和でも比較できる。   In step S803, a similarity Ri with a reference frame equal to or greater than the first sharpness threshold T is calculated. Here, for the purpose of explanation, motion compensation is performed between images obtained by binarizing the sharpness Ek obtained by Equation (1) for each pixel value with an average value, and the resulting prediction error is obtained. It is not limited to. Similarity Ri can also be compared with the sum of absolute differences of pixel values and the sum of prediction errors when motion compensation is performed.

ステップS804にて、類似度Riを第3の閾値ρと比較し、第3の閾値ρよりも大きければステップS805に進み、そうでなければステップS810に進む。
次に、ステップS805にて、フレームカウンタGと閾値Gmaxを比較する。閾値Gmaxよりも小さければステップS806に進む。そうでなければステップS808に進む。
In step S804, the similarity Ri is compared with the third threshold ρ. If the similarity Ri is larger than the third threshold ρ, the process proceeds to step S805, and if not, the process proceeds to step S810.
In step S805, the frame counter G is compared with the threshold value Gmax. If it is smaller than the threshold value Gmax, the process proceeds to step S806. Otherwise, the process proceeds to step S808.

次に、ステップS806にて、フレームカウンタGに1を加算する。その後、ステップS807にて、時間近傍の参照フレーム(Mフレーム)の中で最も古いものを除去候補として選択して、図1のステップS5に進む。   In step S806, 1 is added to the frame counter G. Thereafter, in step S807, the oldest reference frame (M frame) near the time is selected as a removal candidate, and the process proceeds to step S5 in FIG.

次に、ステップS808にて、先鋭度Ekで選択された参照フレーム(Nフレーム)の中でメモリ301上のワーキングエリア301gに格納されている先鋭度Ekが最も低いものを除去候補として選択する。   Next, in step S808, the reference frame (N frame) selected with the sharpness Ek and having the lowest sharpness Ek stored in the working area 301g on the memory 301 is selected as a removal candidate.

次に、ステップS809にて、先鋭度Ekによって選択される「フレーム数N」を1つ減じた「N'」を求め、時間的に近傍の「フレーム数M」を1つ増した「M'」を求め、フレームカウンタGを「0」にリセットして、図8のステップS5に進む。   Next, in step S809, “N ′” obtained by subtracting “the number N of frames” selected by the sharpness Ek by one is obtained, and “M ′” obtained by increasing the “number of frames M” in the vicinity by one by one. ”, The frame counter G is reset to“ 0 ”, and the process proceeds to step S5 in FIG.

次に、ステップS810にて、先鋭度Ekによって選択されるフレーム数Nがその最大値Nmaxより小さいか否かを判定し、小さければステップS811に進み、そうでなければステップS813に進む。Nmaxは例えば最大参照フレーム数から2を引いた値とすることができる。本実施の形態の場合はこの例に拠ればNmaxは3である。   Next, in step S810, it is determined whether or not the number N of frames selected by the sharpness Ek is smaller than the maximum value Nmax. If smaller, the process proceeds to step S811, and if not, the process proceeds to step S813. Nmax may be a value obtained by subtracting 2 from the maximum number of reference frames, for example. In the present embodiment, Nmax is 3 according to this example.

次に、ステップS811にて、時間近傍の参照フレーム(Mフレーム)の中でメモリ301上の最も古いものを除去候補として選択する。
次に、ステップS812にて、先鋭度Ekによって選択される「フレーム数N」を1つ増した「N'」を求め、時間的に近傍の「フレーム数M」を1つ減じた「M'」を求める。次に、ステップS813にて、先鋭度Ekで選択された参照フレーム(Nフレーム)の中でメモリ301上のワーキングエリア301gに格納されている先鋭度Ekが最も低いものを除去候補として選択する。
Next, in step S811, the oldest frame on the memory 301 among the reference frames (M frames) near the time is selected as a removal candidate.
Next, in step S812, “N ′” obtained by increasing the “number of frames N” selected by the sharpness Ek by one is obtained, and “M ′” obtained by subtracting the “frame number M” nearby in time from one. " In step S813, the reference frame (N frame) selected with the sharpness Ek having the lowest sharpness Ek stored in the working area 301g on the memory 301 is selected as a candidate for removal.

その後、ステップS814にて、フレームカウンタGを「0」にリセットして、図8のステップS5に進む。そして、前述した第1の実施の形態と同様にステップS5〜S7にて、参照フレームを選択して符号化する。   Thereafter, in step S814, the frame counter G is reset to “0”, and the process proceeds to step S5 in FIG. Then, in the same manner as in the first embodiment described above, reference frames are selected and encoded in steps S5 to S7.

その後、ステップS703にて、符号化データから復号画像を再生し、ステップS702で選択された除去候補のフレームを削除して格納する。先鋭度Ekも同様に格納される。また、「フレーム数N'」、「フレーム数M'」の値が求められていれば、その値を新しい「フレーム数N」、「フレーム数M」とする。その後、次のフレームを処理するために、ステップS2に戻る。   Thereafter, in step S703, the decoded image is reproduced from the encoded data, and the removal candidate frame selected in step S702 is deleted and stored. The sharpness Ek is also stored in the same manner. If the values of “frame number N ′” and “frame number M ′” are obtained, the values are set as new “frame number N” and “frame number M”. Thereafter, the processing returns to step S2 in order to process the next frame.

以上説明したように、第3の実施の形態によれば、先鋭度Ekが高い、重要な情報が多く含まれていると思われるフレームを参照することにより、動き補償を効率よく行うことができる。さらに、先鋭度Ekに従って参照フレーム内の時間近傍のフレーム数と先鋭度Ekによって選択されるフレーム数を可変にすることにより、最適なフレームを参照することが可能になる。さらに、先鋭度Ekが高いが重要でないフレームデータを参照フレームから外すことによって、重要なフレームデータを参照できるようにすることができる。   As described above, according to the third embodiment, motion compensation can be efficiently performed by referring to a frame that has a high sharpness Ek and is considered to contain a lot of important information. . Furthermore, by making the number of frames near the time in the reference frame and the number of frames selected by the sharpness Ek variable according to the sharpness Ek, it becomes possible to refer to the optimum frame. Furthermore, it is possible to refer to important frame data by removing frame data with high sharpness Ek but not important from the reference frame.

なお、第3の実施の形態においては、参照フレームを、符号化対象のフレームの前5フレームとしたが、これに限定されず、参照フレームを格納するための画像エリアを必要量確保することでその他の枚数の参照にも対応できることは明らかである。なお、第3の実施の形態においては、先鋭度Ekによる参照フレーム数の最大値を設けたが、これに限定されず、設けなくても構わない。また、時間近傍のフレーム数については最大値を設けていないが、これも限定されず、例えばMmaxを定義してこれを超えないように制限することも可能である。   In the third embodiment, the reference frames are five frames before the encoding target frame. However, the present invention is not limited to this, and by securing a necessary amount of image area for storing the reference frames. It is clear that other numbers of references can be handled. In the third embodiment, the maximum value of the number of reference frames based on the sharpness Ek is provided. However, the present invention is not limited to this and may be omitted. Moreover, although the maximum value is not provided for the number of frames in the vicinity of time, this is not limited. For example, it is possible to define Mmax so as not to exceed this.

さらに、第3の実施の形態では符号エリア301f内の符号化データを、通信インターフェース308を介して通信回線309に送信する例について説明したが、符号化データを記憶装置305に格納してもよい。   Furthermore, in the third embodiment, the example in which the encoded data in the code area 301f is transmitted to the communication line 309 via the communication interface 308 has been described. However, the encoded data may be stored in the storage device 305. .

また、入力画像もカメラからの撮影画像に限定されず、記憶装置305に格納されている動画像データを用いることも可能である。さらには、シーンチェンジ等を検出した場合、その参照フレーム数N、Mをリセットすることも可能である。   Further, the input image is not limited to a captured image from the camera, and moving image data stored in the storage device 305 can be used. Further, when a scene change or the like is detected, the reference frame numbers N and M can be reset.

(本発明に係る他の実施の形態)
上述した本発明の実施の形態における動画像符号化装置を構成する各手段、並びに動画像符号化方法の各ステップは、コンピュータのRAMやROMなどに記憶されたプログラムが動作することによって実現できる。このプログラム及び上記プログラムを記録したコンピュータ読み取り可能な記憶媒体は本発明に含まれる。
(Another embodiment according to the present invention)
Each means constituting the moving picture coding apparatus and each step of the moving picture coding method in the embodiment of the present invention described above can be realized by operating a program stored in a RAM or ROM of a computer. This program and a computer-readable storage medium storing the program are included in the present invention.

また、本発明は、例えば、システム、装置、方法、プログラムもしくは記憶媒体等としての実施の形態も可能である。具体的には、複数の機器から構成されるシステムに適用してもよいし、また、一つの機器からなる装置に適用してもよい。   In addition, the present invention can be embodied as a system, apparatus, method, program, storage medium, or the like. Specifically, the present invention may be applied to a system composed of a plurality of devices, or may be applied to an apparatus composed of a single device.

なお、本発明は、前述した実施の形態の機能を実現するソフトウェアのプログラム(実施の形態では図3、図5、図8及び図9に示すフローチャートに対応したプログラム)を、システムあるいは装置に直接あるいは遠隔から供給し、そのシステムあるいは装置のコンピュータが該供給されたプログラムコードを読み出して実行することによっても達成される場合を含む。   In the present invention, a software program (in the embodiment, a program corresponding to the flowcharts shown in FIGS. 3, 5, 8, and 9) that realizes the functions of the above-described embodiments is directly transferred to the system or apparatus. Alternatively, it may be achieved by supplying from a remote location and the computer of the system or apparatus reads and executes the supplied program code.

したがって、本発明の機能処理をコンピュータで実現するために、該コンピュータにインストールされるプログラムコード自体も本発明を実現するものである。つまり、本発明は、本発明の機能処理を実現するためのコンピュータプログラム自体も含まれる。   Accordingly, since the functions of the present invention are implemented by computer, the program code installed in the computer also implements the present invention. In other words, the present invention includes a computer program itself for realizing the functional processing of the present invention.

その場合、プログラムの機能を有していれば、オブジェクトコード、インタプリター(interpreter)により実行されるプログラム、OSに供給するスクリプトデータ等の形態であってもよい。プログラムを供給するための記録媒体としては、例えば、フロッピー(登録商標)ディスク、ハードディスク、光ディスク、光磁気ディスク、MO、CD−ROM、CD−R、CD−RW、磁気テープ、不揮発性のメモリカード、ROM、DVD(DVD−ROM,DVD−R)などがある。   In that case, as long as it has the function of a program, it may be in the form of an object code, a program executed by an interpreter, script data supplied to the OS, or the like. As a recording medium for supplying the program, for example, floppy (registered trademark) disk, hard disk, optical disk, magneto-optical disk, MO, CD-ROM, CD-R, CD-RW, magnetic tape, nonvolatile memory card ROM, DVD (DVD-ROM, DVD-R) and the like.

その他、プログラムの供給方法としては、クライアントコンピュータのブラウザを用いてインターネットのホームページに接続し、該ホームページから本発明のコンピュータプログラムそのもの、もしくは圧縮され自動インストール機能を含むファイルをハードディスク等の記録媒体にダウンロードすることによっても供給できる。また、本発明のプログラムを構成するプログラムコードを複数のファイルに分割し、それぞれのファイルを異なるホームページからダウンロードすることによっても実現可能である。つまり、本発明の機能処理をコンピュータで実現するためのプログラムファイルを複数のユーザに対してダウンロードさせるWWWサーバも、本発明に含まれるものである。   As another program supply method, a client computer browser is used to connect to an Internet homepage, and the computer program of the present invention itself or a compressed file including an automatic installation function is downloaded from the homepage to a recording medium such as a hard disk. Can also be supplied. It can also be realized by dividing the program code constituting the program of the present invention into a plurality of files and downloading each file from a different homepage. That is, a WWW server that allows a plurality of users to download a program file for realizing the functional processing of the present invention on a computer is also included in the present invention.

また、本発明のプログラムを暗号化してCD−ROM等の記憶媒体に格納してユーザに配布し、所定の条件をクリアしたユーザに対し、インターネットを介してホームページから暗号化を解く鍵情報をダウンロードさせ、その鍵情報を使用することにより暗号化されたプログラムを実行してコンピュータにインストールさせて実現することも可能である。   In addition, the program of the present invention is encrypted, stored in a storage medium such as a CD-ROM, distributed to users, and key information for decryption is downloaded from a homepage via the Internet to users who have cleared predetermined conditions. It is also possible to execute the encrypted program by using the key information and install the program on a computer.

また、コンピュータが、読み出したプログラムを実行することによって、前述した実施の形態の機能が実現される他、そのプログラムの指示に基づき、コンピュータ上で稼動しているOSなどが、実際の処理の一部または全部を行い、その処理によっても前述した実施の形態の機能が実現され得る。   In addition to the functions of the above-described embodiments being realized by the computer executing the read program, the OS running on the computer based on the instructions of the program is used for the actual processing. The functions of the above-described embodiment can be realized by performing some or all of the processes.

さらに、記録媒体から読み出されたプログラムが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書き込まれた後、そのプログラムの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行い、その処理によっても前述した実施の形態の機能が実現される。   Furthermore, after the program read from the recording medium is written in a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer, the function expansion board or The CPU or the like provided in the function expansion unit performs part or all of the actual processing, and the functions of the above-described embodiments are realized by the processing.

本発明の第1の実施の形態を示し、本発明に係る動画像符号化装置の構成を示すブロック図である。BRIEF DESCRIPTION OF THE DRAWINGS It is the block diagram which shows the 1st Embodiment of this invention and shows the structure of the moving image encoder which concerns on this invention. 本発明の第1の実施の形態を示し、参照フレーム決定器の詳細な構成例を示すブロック図である。FIG. 3 is a block diagram illustrating a detailed configuration example of a reference frame determiner according to the first embodiment of this invention. 本発明の第1の実施の形態を示し、動画像符号化動作例を示すフローチャートである。It is a flowchart which shows the 1st Embodiment of this invention and shows the example of a moving image encoding operation | movement. 本発明の第2の実施の形態を示し、本発明にかかる動画像符号化装置の構成例を示すブロック図である。It is a block diagram which shows the 2nd Embodiment of this invention and shows the structural example of the moving image encoder concerning this invention. 本発明の第2の実施の形態を示し、動画像符号化動作例を示すフローチャートである。It is a flowchart which shows the 2nd Embodiment of this invention and shows an example of a moving image encoding operation | movement. 本発明の第2の実施の形態を示し、本発明にかかる動画像符号化装置の別な構成例を示すブロック図である。It is the block diagram which shows the 2nd Embodiment of this invention and shows another structural example of the moving image encoder concerning this invention. 本発明の第3の実施の形態を示し、本発明にかかる動画像符号化装置の構成例を示すブロック図である。It is a block diagram which shows the 3rd Embodiment of this invention and shows the structural example of the moving image encoder concerning this invention. 本発明の第3の実施の形態を示し、動画像符号化動作例を示すフローチャートである。It is a flowchart which shows the 3rd Embodiment of this invention and shows the example of a moving image encoding operation | movement. 本発明の第3の実施の形態を示し、参照フレームの決定動作例を示すフローチャートである。It is a flowchart which shows the 3rd Embodiment of this invention and shows the example of determination operation | movement of a reference frame. 本発明の第3の実施の形態を示し、メモリのデータ構成を示す図である。It is a figure which shows the 3rd Embodiment of this invention and shows the data structure of memory. 従来例を示し、動画像符号化装置の構成例を示すブロック図である。It is a block diagram which shows a prior art example and shows the structural example of a moving image encoder.

符号の説明Explanation of symbols

1、9 セレクタ
2 イントラ予測器
3 差分器
4 変換/量子化器
5 エントロピー符号化器
6 逆量子化/逆変換器
7 加算器
8_1〜8_16 フレームメモリ
10 動き推定器
11 先鋭度検出器
12 参照フレーム決定器
13 動き補償器
14 動き符号化器
15 参照情報符号化器
16 出力器
DESCRIPTION OF SYMBOLS 1, 9 Selector 2 Intra predictor 3 Difference machine 4 Transformer / quantizer 5 Entropy encoder 6 Inverse quantizer / inverse transformer 7 Adder 8_1-8_16 Frame memory 10 Motion estimator 11 Sharpness detector 12 Reference frame Determiner 13 motion compensator 14 motion encoder 15 reference information encoder 16 output unit

Claims (8)

動画像中の複数のフレームデータを参照して、符号化対象のフレームデータに対する動き補償を実行し、前記動画像を符号化する動画像符号化装置であって、
フレームデータを入力する入力手段と、
前記入力手段によって入力されたフレームデータから先鋭度を検出する先鋭度検出手段と、
前記先鋭度検出手段によって検出された先鋭度が高い上位所定フレーム数のフレームデータを、前記符号化対象のフレームデータを符号化する場合に参照する参照フレームデータとして、前記入力手段によって入力されたフレームデータの中から選択する選択手段と、
前記選択手段によって選択された参照フレームデータと、前記符号化対象のフレームデータとに基づいて動き補償を行う動き補償手段と、
前記動き補償手段により行われた動き補償の結果を用いて、前記符号化対象のフレームデータを符号化する符号化手段と、
前記符号化手段で符号化されたフレームデータを出力する出力手段とを有することを特徴とする動画像符号化装置。
A moving image encoding apparatus that performs motion compensation on frame data to be encoded with reference to a plurality of frame data in a moving image, and encodes the moving image,
Input means for inputting frame data;
Sharpness detection means for detecting sharpness from the frame data input by the input means;
Frames input by the input unit as reference frame data to be referred to when the frame data of the upper predetermined number of frames with high sharpness detected by the sharpness detection unit is encoded when the frame data to be encoded is encoded A selection means for selecting from the data ;
Motion compensation means for performing motion compensation based on the reference frame data selected by the selection means and the frame data to be encoded;
Encoding means for encoding the frame data to be encoded using the result of motion compensation performed by the motion compensation means;
A moving picture coding apparatus comprising: output means for outputting the frame data coded by the coding means.
前記入力手段は更に、被写体を撮像する撮像手段を有し、前記先鋭度検出手段がピントの合焦度を検出する合焦度検出手段を有することを特徴とする請求項1に記載の動画像符号化装置。   The moving image according to claim 1, wherein the input unit further includes an imaging unit that images a subject, and the sharpness detection unit includes a focus degree detection unit that detects a focus degree. Encoding device. 前記選択手段は、前記先鋭度検出手段によって検出された先鋭度が高い上位所定フレーム数のフレームデータと、前記符号化対象のフレームデータと時間近傍にある所定フレーム数のフレームデータとを参照フレームデータとして選択することを特徴とする請求項1または2に記載の動画像符号化装置。 The selection means uses the frame data of the upper predetermined number of frames with high sharpness detected by the sharpness detection means, the frame data to be encoded and the frame data of the predetermined number of frames near the time as reference frame data. selecting as a moving image encoding apparatus according to claim 1 or 2, characterized in. 動画像中の複数のフレームデータを参照して、符号化対象のフレームデータに対する動き補償を実行し、前記動画像を符号化する動画像符号化方法であって、
フレームデータを入力する入力工程と、
前記入力工程によって入力されたフレームデータから先鋭度を検出する先鋭度検出工程と、
前記先鋭度検出工程によって検出された先鋭度が高い上位所定数のフレームデータを、前記符号化対象のフレームデータを符号化する場合に参照する参照フレームデータとして前記入力工程によって入力されたフレームデータの中から選択する選択工程と、
前記選択工程によって選択された参照フレームデータと、前記符号化対象のフレームデータとに基づいて動き補償を行う動き補償工程と、
前記動き補償工程により行われた動き補償の結果を用いて、前記符号化対象のフレームデータを符号化する符号化工程と、
前記符号化工程で符号化されたフレームデータを出力する出力工程とを有することを特徴とする動画像符号化方法。
A moving image encoding method that performs motion compensation on frame data to be encoded with reference to a plurality of frame data in a moving image, and encodes the moving image,
An input process for inputting frame data;
A sharpness detection step of detecting the sharpness from the frame data input by the input step;
Frame data predetermined number of top high been sharpness detected by said sharpness detecting step, the frame data inputted by said input step as reference frame data to be referred to when coding the frame data of the encoding target A selection process to select from,
A motion compensation step for performing motion compensation based on the reference frame data selected by the selection step and the frame data to be encoded;
An encoding step of encoding the frame data to be encoded using a result of motion compensation performed by the motion compensation step;
A moving image encoding method comprising: an output step of outputting the frame data encoded in the encoding step.
前記入力工程は更に、被写体を撮像する撮像工程を有し、前記先鋭度検出工程がピントの合焦度を検出する合焦度検出工程を有することを特徴とする請求項4に記載の動画像符号化方法。   5. The moving image according to claim 4, wherein the input step further includes an imaging step of imaging a subject, and the sharpness detection step includes a focus degree detection step of detecting a focus degree of focus. Encoding method. 前記選択工程は、前記先鋭度検出工程によって検出された先鋭度が高い上位所定フレーム数のフレームデータと、前記符号化対象のフレームデータと時間近傍にある所定フレーム数のフレームデータとを参照フレームデータとして選択することを特徴とする請求項4または5に記載の動画像符号化方法。 In the selection step, frame data of a higher predetermined number of frames having a high degree of sharpness detected by the sharpness detection step, frame data to be encoded and frame data of a predetermined number of frames in the vicinity of time are referred to as reference frame data video encoding method according to claim 4 or 5, characterized in that selected as. 動画像中の複数のフレームデータを参照して、符号化対象のフレームデータに対する動き補償を実行し、前記動画像を符号化する動画像符号化方法をコンピュータに実行させるプログラムであって、
フレームデータを入力する入力工程と、
前記入力工程によって入力されたフレームデータから先鋭度を検出する先鋭度検出工程と、
前記先鋭度検出工程によって検出された先鋭度が高い上位所定フレーム数のフレームデータを、前記符号化対象のフレームデータを符号化する場合に参照する参照フレームデータとして、前記入力手段によって入力されたフレームデータの中から選択する選択工程と、
前記選択工程によって選択された格納媒体に格納されている参照フレームデータと、前記符号化対象のフレームデータとに基づいて動き補償を行う動き補償工程と、
前記動き補償工程により行われた動き補償の結果を用いて、前記符号化対象のフレームデータを符号化する符号化工程と、
前記符号化工程で符号化されたフレームデータを出力する出力工程とをコンピュータに実行させることを特徴とするプログラム。
A program for referring to a plurality of frame data in a moving image, executing motion compensation for the frame data to be encoded, and causing a computer to execute a moving image encoding method for encoding the moving image,
An input process for inputting frame data;
A sharpness detection step of detecting a sharpness from the frame data inputted by said input step,
Frames input by the input means as reference frame data to be referred to when the frame data of the upper predetermined number of frames with high sharpness detected by the sharpness detection step is encoded when encoding the frame data to be encoded A selection process to select from the data ;
A motion compensation step for performing motion compensation based on the reference frame data stored in the storage medium selected by the selection step and the frame data to be encoded;
An encoding step of encoding the frame data to be encoded using a result of motion compensation performed by the motion compensation step;
A program causing a computer to execute an output step of outputting frame data encoded in the encoding step.
請求項7に記載のプログラムを記録したことを特徴とするコンピュータ読み取り可能な記録媒体。   A computer-readable recording medium, wherein the program according to claim 7 is recorded.
JP2004304738A 2004-10-19 2004-10-19 Moving picture coding apparatus and moving picture coding method Expired - Fee Related JP4393341B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004304738A JP4393341B2 (en) 2004-10-19 2004-10-19 Moving picture coding apparatus and moving picture coding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004304738A JP4393341B2 (en) 2004-10-19 2004-10-19 Moving picture coding apparatus and moving picture coding method

Publications (3)

Publication Number Publication Date
JP2006121224A JP2006121224A (en) 2006-05-11
JP2006121224A5 JP2006121224A5 (en) 2007-11-29
JP4393341B2 true JP4393341B2 (en) 2010-01-06

Family

ID=36538724

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004304738A Expired - Fee Related JP4393341B2 (en) 2004-10-19 2004-10-19 Moving picture coding apparatus and moving picture coding method

Country Status (1)

Country Link
JP (1) JP4393341B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110292997A1 (en) * 2009-11-06 2011-12-01 Qualcomm Incorporated Control of video encoding based on image capture parameters
US8837576B2 (en) 2009-11-06 2014-09-16 Qualcomm Incorporated Camera parameter-assisted video encoding
US10178406B2 (en) * 2009-11-06 2019-01-08 Qualcomm Incorporated Control of video encoding based on one or more video capture parameters
WO2012096176A1 (en) * 2011-01-12 2012-07-19 Panasonic Corporation Methods and apparatuses for encoding and decoding video using multiple reference pictures
WO2012108181A1 (en) 2011-02-08 2012-08-16 Panasonic Corporation Methods and apparatuses for encoding and decoding video using multiple reference pictures

Also Published As

Publication number Publication date
JP2006121224A (en) 2006-05-11

Similar Documents

Publication Publication Date Title
JP4591657B2 (en) Moving picture encoding apparatus, control method therefor, and program
JP4842945B2 (en) Panorama motion estimation and compensation
WO2004008775A1 (en) Moving picture encoding method and decoding method
JP2010016454A (en) Image encoding apparatus and method, image decoding apparatus and method, and program
KR20150009578A (en) Motion sensor assisted rate control for video encoding
JP2005203905A (en) Apparatus, method and program for image coding
JP2007134755A (en) Moving picture encoder and image recording and reproducing device
JP3893350B2 (en) Encoded data conversion apparatus and method
JP4393341B2 (en) Moving picture coding apparatus and moving picture coding method
JP4898415B2 (en) Moving picture coding apparatus and moving picture coding method
JP2011091772A (en) Image encoder
US20070127571A1 (en) Image processing apparatus and method
JP2009027693A (en) Moving image compression coding equipment
JP2008141354A (en) Image coding apparatus and imaging apparatus
JP4971817B2 (en) Image encoding device
JP2004180345A (en) Photographed image recording apparatus
JP4564856B2 (en) Image encoding apparatus and imaging apparatus
JP2009049513A (en) Moving picture encoding device and moving picture encoding method
JP4854580B2 (en) Image processing device
JP5247210B2 (en) Moving picture coding apparatus and moving picture coding method
JP7431549B2 (en) Encoding device, imaging device, control method, and program
JP4765961B2 (en) Digital video recording device
JP2007228096A (en) Digital moving picture recording apparatus and digital moving picture recording method
JP3188081B2 (en) Image encoding method and image encoding device
JP4850683B2 (en) Video signal processing apparatus, video signal processing method, program, and storage medium

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20071016

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20071016

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090609

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090714

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090911

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: 20091006

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: 20091013

R150 Certificate of patent or registration of utility model

Ref document number: 4393341

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20121023

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20131023

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees