JP5328854B2 - Motion vector detection apparatus and motion vector detection method - Google Patents

Motion vector detection apparatus and motion vector detection method Download PDF

Info

Publication number
JP5328854B2
JP5328854B2 JP2011171130A JP2011171130A JP5328854B2 JP 5328854 B2 JP5328854 B2 JP 5328854B2 JP 2011171130 A JP2011171130 A JP 2011171130A JP 2011171130 A JP2011171130 A JP 2011171130A JP 5328854 B2 JP5328854 B2 JP 5328854B2
Authority
JP
Japan
Prior art keywords
motion vector
image
reference candidate
encoding target
frame
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
JP2011171130A
Other languages
Japanese (ja)
Other versions
JP2011217421A (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 JP2011171130A priority Critical patent/JP5328854B2/en
Publication of JP2011217421A publication Critical patent/JP2011217421A/en
Application granted granted Critical
Publication of JP5328854B2 publication Critical patent/JP5328854B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

A motion vector detection apparatus is configured to calculate a temporal distance between a frame to be coded and each of a plurality of reference candidate frames referred to by the frame to be coded. The motion vector detection apparatus searches for a candidate motion vector between the frame to be coded and each the plurality of reference candidate frames and detects a motion vector for the frame to be coded from the candidate motion vectors. In searching for and detecting a candidate motion vector, the motion vector detection apparatus changes an amount of the calculation performed during the detection of a candidate motion vector according to the calculated temporal distance between the frame to be coded and the reference candidate frame, and a coding type of the reference candidate frame.

Description

本発明は、動きベクトル検出装置及び動きベクトル検出方法に関し、特に、画面間の動きベクトルを検出するために用いて好適なものである。   The present invention relates to a motion vector detection device and a motion vector detection method, and is particularly suitable for use in detecting a motion vector between screens.

近年、マルチメディアに関連する情報のデジタル化が急進している。これに伴い、映像情報の高画質化への要求が高まっている。例えば、従来の720×480画素のSD(Standard Definition)から、1920×1080画素のHD(High Definition)に放送メディアが移行されつつある。しかしながら、このような映像情報の高画質化への要求は、同時にデジタルデータの増大化を引き起こす。従って、従来技術の性能を上回る圧縮符号化技術及び復号化技術が要求されている。   In recent years, the digitization of information related to multimedia has been rapidly progressing. Along with this, there is an increasing demand for higher image quality of video information. For example, broadcasting media is being transferred from a conventional SD (Standard Definition) of 720 × 480 pixels to an HD (High Definition) of 1920 × 1080 pixels. However, such a demand for higher image quality of video information simultaneously causes an increase in digital data. Therefore, there is a demand for compression encoding technology and decoding technology that exceed the performance of the prior art.

これらの要求に対し、ITU−T SG16や、ISO/IEC JTC1/SC29/WG11の活動で、ピクチャ間の相関性を利用するピクチャ間予測を用いた符号化方式の標準化作業が進められている。このような符号化方式の中で、現状、最も高能率で符号化できるといわれる符号化方式として、H.264/MPEG−4 PART10(AVC)がある。以下の説明では、この符号化方式をH.264と称する。   In response to these requirements, standardization of an encoding scheme using inter-picture prediction using correlation between pictures is being promoted by activities of ITU-T SG16 and ISO / IEC JTC1 / SC29 / WG11. Among such encoding schemes, as an encoding scheme that is said to be capable of encoding with the highest efficiency, H.264 is currently available. H.264 / MPEG-4 PART10 (AVC). In the following description, this encoding method is referred to as H.264. H.264.

H.264では、画面間の動きベクトルを検出するための参照画像を比較的自由に選べるようになった。更に、H.264では、マクロブロック単位或いはそれ以下の単位まで符号化対象の画像を分割して動きベクトルを検出することにより、従来よりも細かい単位で動きベクトルを検出できるようになった。これによって、発生する符号量をより低減させることができるようになった。   H. In H.264, reference images for detecting motion vectors between screens can be selected relatively freely. Further, H.C. In H.264, it is possible to detect a motion vector in a smaller unit than in the prior art by detecting a motion vector by dividing an image to be encoded into units of a macroblock or less. As a result, the amount of generated code can be further reduced.

H.264を用いた技術として、特許文献1には、複数のフレームメモリを有し、符号化対象の画像を符号化する場合に参照する画像を、前記複数のフレームメモリ内に格納された複数の画像から選択する構成が開示されている。   H. As a technique using H.264, Patent Document 1 has a plurality of frame memories, and a plurality of images stored in the plurality of frame memories are referred to when an image to be encoded is encoded. A configuration to select from is disclosed.

MPEG−1、MPEG−2、MPEG−4等の従来の符号化方式は、動きの予測を行う場合の機能として、過去の画像から未来の画像を予測する順方向予測の機能と、未来の画像から過去の画像を予測する逆方向予測の機能とを有している。ここで、未来の画像から過去の画像を予測するとは、符号化をスキップした画像を現在の画像から予測することである。なお、以下の説明では、MPEG−1、MPEG−2、MPEG−4等の従来の符号化方式を、MPEG符号化方式と総称する。   Conventional encoding schemes such as MPEG-1, MPEG-2, and MPEG-4 have a forward prediction function for predicting a future image from a past image and a future image as a function for motion prediction. And a backward prediction function for predicting past images. Here, to predict a past image from a future image is to predict an image skipped from encoding from the current image. In the following description, conventional encoding methods such as MPEG-1, MPEG-2, and MPEG-4 are collectively referred to as MPEG encoding methods.

符号化対象となる画像と時間的に近傍に位置する画像ほど、多くの場合、画像間の相関性が高いと考えられる。そこで、MPEG符号化方式における順方向予測及び逆方向予測では、通常、符号化対象となる画像の近傍に位置するIピクチャ又はPピクチャを参照画像として用いる。   In many cases, the correlation between images is considered to be higher as the image is closer to the encoding target in time. Therefore, in forward prediction and backward prediction in the MPEG encoding method, an I picture or P picture located in the vicinity of an image to be encoded is usually used as a reference image.

しかしながら、MPEG符号化方式のコーデック(符号化/復号化器)を搭載するビデオカメラでは、動画像の撮影時にパン・チルト等のカメラの動きが速い場合や、カットチェンジ直後の画像のように画像間の変化が急激な場合がある。このような場合には、時間的に近傍な画像であっても画像間の相関性が低くなる。従って、動き補償予測の利点が活用できないという問題があった。   However, in a video camera equipped with a codec (encoder / decoder) of the MPEG encoding method, when a moving image is shot, the camera moves quickly such as pan / tilt, or an image just like an image immediately after a cut change. The change between them may be abrupt. In such a case, even if the images are temporally close, the correlation between the images is low. Therefore, there is a problem that the advantage of motion compensation prediction cannot be utilized.

この問題を改善できると目される技術がH.264で採用された予測方式である。H.264では、近傍の画像のみならず、時間的に離れた位置の画像に対しても予測符号化を行い、近傍の画像よりも符号化効率の向上が見込まれるのであれば、離れた位置の画像を参照画像として利用することができる。   A technology that is expected to improve this problem is H.264. This is a prediction method adopted in H.264. H. In H.264, predictive coding is performed not only on neighboring images but also on images at positions that are separated in time, and if improvement in coding efficiency is expected over neighboring images, images at separated positions are used. Can be used as a reference image.

特開2005−184694号公報JP 2005-184694 A

前述したように、H.264では、動画像を撮影したカメラの動きが速い場合や、カットチェンジが発生した場合でも、入力された画像と、既に符号化された画像との誤差が最小となる画像を自由に参照画像として選択できる。これにより、動き補償予測の精度を高めることが可能である。   As described above, H.P. In H.264, even when the motion of the camera that captured the moving image is fast or when a cut change occurs, an image that minimizes the error between the input image and the already encoded image can be freely used as a reference image. You can choose. Thereby, it is possible to improve the precision of motion compensation prediction.

しかしながら、既に符号化された画像の全てに対して、入力画像との誤差が最小となる画像を選択する演算を行うと、参照候補となる画像の数に比例して演算量が増大し、符号化に時間がかかるという問題がある。   However, if an operation that selects an image that minimizes the error from the input image is performed on all the already encoded images, the amount of calculation increases in proportion to the number of reference candidate images. There is a problem that it takes time.

また、ビデオカメラ等のモバイル機器の場合には、演算負荷が増大すると、駆動するバッテリーの消費量が増大する。従って、撮影できる時間が短くなってしまうという問題がある。   In the case of a mobile device such as a video camera, when the calculation load increases, the consumption of the battery to be driven increases. Therefore, there is a problem that the time that can be taken is shortened.

本発明は、このような問題点に鑑みてなされたものであり、動きベクトルの検出精度を向上させつつ、当該動きベクトルを検出する際の演算量の増大を抑制することを目的とする。   The present invention has been made in view of such problems, and an object of the present invention is to suppress an increase in the amount of calculation when detecting the motion vector while improving the detection accuracy of the motion vector.

上記の目的を達成するために、本発明に係る動きベクトル検出装置は、画面間の動きベクトルを検出する動きベクトル検出装置であって、符号化対象画像と、前記符号化対象画像によって参照される参照画像の候補である複数の候補画像のそれぞれとの間の時間的な距離を演算する演算手段と、前記符号化対象画像と、前記複数の候補画像のそれぞれとの間で動きベクトルを探索し、探索した結果に基づいて動きベクトルを検出する動きベクトル検出手段とを有し、前記符号化対象画像と、前記複数の候補画像のそれぞれとの間で動きベクトルを探索する際に、前記動きベクトル検出手段は、前記演算手段が演算した各候補画像に対する時間的な距離と前記各候補画像のピーク信号対雑音比(PSNR)の値とに応じて実行する演算の量を変更することを特徴とする。 In order to achieve the above object, a motion vector detection device according to the present invention is a motion vector detection device that detects a motion vector between screens, and is referred to by an encoding target image and the encoding target image. A calculation unit that calculates a temporal distance between each of a plurality of candidate images that are reference image candidates, and a motion vector is searched between the encoding target image and each of the plurality of candidate images. A motion vector detecting means for detecting a motion vector based on the search result, and when searching for a motion vector between the encoding target image and each of the plurality of candidate images, the motion vector detecting means, varying the amount of operation of said operation means is performed in response to the value of the peak signal to noise ratio of the temporal distance between the respective candidate images for each candidate image computed (PSNR) Characterized in that it.

また、本発明に係る動きベクトル検出方法は、画面間の動きベクトルを検出する動きベクトル検出方法であって、符号化対象画像と、前記符号化対象画像によって参照される参照画像の候補である複数の候補画像のそれぞれとの間の時間的な距離を演算する演算工程と、前記符号化対象画像と、前記複数の候補画像のそれぞれとの間で動きベクトルを探索し、探索した結果に基づいて動きベクトルを検出する動きベクトル検出工程とを有し、前記符号化対象画像と、前記複数の候補画像のそれぞれとの間で動きベクトルを探索する際に、前記動きベクトル検出工程で実行する演算の量が、前記演算工程で演算された各候補画像に対する時間的な距離と前記各候補画像のピーク信号対雑音比(PSNR)の値とに応じて変更されることを特徴とする。 The motion vector detection method according to the present invention is a motion vector detection method for detecting a motion vector between screens, and includes a plurality of encoding target images and reference image candidates referred to by the encoding target image. A calculation step of calculating a temporal distance between each of the candidate images, a motion vector between the encoding target image and each of the plurality of candidate images, and based on the search result A motion vector detection step for detecting a motion vector, and when performing a motion vector search between the encoding target image and each of the plurality of candidate images, an operation executed in the motion vector detection step amount, and characterized in that it is changed according to the value of the peak signal to noise ratio of the temporal distance between the respective candidate images for each candidate image calculated by said calculation step (PSNR) That.

本発明によれば、動きベクトルの検出精度を向上させつつ、動きベクトルを検出する際の演算量の増大を抑制することができる。   ADVANTAGE OF THE INVENTION According to this invention, the increase in the amount of calculations at the time of detecting a motion vector can be suppressed, improving the detection accuracy of a motion vector.

本発明の第1の実施形態に係るビデオカメラ装置の構成を示すブロック図である。It is a block diagram which shows the structure of the video camera apparatus which concerns on the 1st Embodiment of this invention. 本発明の第1の実施形態に係る信号処理部の構成を示すブロック図である。It is a block diagram which shows the structure of the signal processing part which concerns on the 1st Embodiment of this invention. 本発明の第1の実施形態に係る動きベクトル検出器の構成を示すブロック図である。It is a block diagram which shows the structure of the motion vector detector which concerns on the 1st Embodiment of this invention. 本発明の第1の実施形態に係る符号化対象フレームと参照候補フレームとの関係の一例を示した図である。It is the figure which showed an example of the relationship between the encoding object frame and reference candidate frame which concern on the 1st Embodiment of this invention. 本発明の第1の実施形態に係る動きベクトル検出器の動作の一例について説明するフローチャートである。It is a flowchart explaining an example of operation | movement of the motion vector detector which concerns on the 1st Embodiment of this invention. 本発明の第2の実施形態に係る動きベクトル検出器の構成を示すブロック図である。It is a block diagram which shows the structure of the motion vector detector which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施形態に係る動きベクトル検出器の動作の一例について説明するフローチャートである。It is a flowchart explaining an example of operation | movement of the motion vector detector which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施形態に係る縮小画像の一例を示す図である。It is a figure which shows an example of the reduced image which concerns on the 2nd Embodiment of this invention. 本発明の第3の実施形態に係る動きベクトル検出器の構成を示すブロック図である。It is a block diagram which shows the structure of the motion vector detector which concerns on the 3rd Embodiment of this invention. 本発明の第3の実施形態に係る動きベクトル検出器の動作の一例について説明するフローチャートである。It is a flowchart explaining an example of operation | movement of the motion vector detector which concerns on the 3rd Embodiment of this invention. 本発明の第3の実施形態に係る符号化対象フレームと参照候補フレームとの関係の一例を示した図である。It is the figure which showed an example of the relationship between the encoding object frame and reference candidate frame which concern on the 3rd Embodiment of this invention. 本発明の第4の実施形態に係る信号処理部の構成を示すブロック図である。It is a block diagram which shows the structure of the signal processing part which concerns on the 4th Embodiment of this invention. 本発明の第4の実施形態に係る動きベクトル検出器の構成を示すブロック図である。It is a block diagram which shows the structure of the motion vector detector which concerns on the 4th Embodiment of this invention. 本発明の第4の実施形態に係る動きベクトル検出器の動作の一例について説明するフローチャートである。It is a flowchart explaining an example of operation | movement of the motion vector detector which concerns on the 4th Embodiment of this invention.

(第1の実施形態)
以下に、図面を参照しながら、本発明の第1の実施形態について説明する。
(First embodiment)
Hereinafter, a first embodiment of the present invention will be described with reference to the drawings.

図1は、本実施形態におけるビデオカメラ装置10の構成の一例を示す図である。なお、本実施形態では、H.264で符号化を行うビデオカメラ装置10を例に挙げて説明を行う。   FIG. 1 is a diagram illustrating an example of a configuration of a video camera device 10 according to the present embodiment. In the present embodiment, H.264. The video camera apparatus 10 that performs encoding by H.264 will be described as an example.

図1において、撮像部11は、例えば、レンズ等で構成される光学系、光電変換素子、A/D変換回路等を用いてデジタルの撮像画像データを生成し、生成した撮像画像データを不図示の画像メモリに格納する。信号処理部12は、表示や記録等を行うための所望の形式となるように、画像メモリから読み出された撮像画像データに対して、種々の信号処理や変換を行う。信号処理部12の詳細については、図2を用いて後述する。   In FIG. 1, the imaging unit 11 generates digital captured image data using, for example, an optical system including a lens, a photoelectric conversion element, an A / D conversion circuit, and the like, and the generated captured image data is not illustrated. Stored in the image memory. The signal processing unit 12 performs various signal processing and conversion on the captured image data read from the image memory so as to have a desired format for display and recording. Details of the signal processing unit 12 will be described later with reference to FIG.

記録部13は、画像データ等を記録媒体に記録したり、記録媒体から画像データ等を読み出したりするためのものである。記録媒体としては、例えば半導体メモリを用いることができる。   The recording unit 13 is for recording image data or the like on a recording medium, or reading image data or the like from the recording medium. For example, a semiconductor memory can be used as the recording medium.

システム制御部14は、ビデオカメラ装置10全体の制御及び各種演算を行うためのものである。このシステム制御部14は、例えば、CPU、ROM、及びRAMを備え、CPUがROMに記憶されているプログラムを、RAMを用いて実行することにより、ビデオカメラ装置10全体の制御及び各種演算を行う。   The system control unit 14 is for performing control of the entire video camera device 10 and various calculations. The system control unit 14 includes, for example, a CPU, a ROM, and a RAM. The CPU executes a program stored in the ROM using the RAM, thereby performing control of the entire video camera device 10 and various calculations. .

表示部15は、信号処理部12で処理された信号や、システム制御部14で演算された信号を入力し、入力した信号に基づく画像をLCD(Liquid Crystal Display)等の表示装置に表示する。   The display unit 15 receives a signal processed by the signal processing unit 12 or a signal calculated by the system control unit 14 and displays an image based on the input signal on a display device such as an LCD (Liquid Crystal Display).

操作部16は、ビデオカメラ装置10の電源をオン・オフするためのメインスイッチや、撮影(記録)の開始・終了を指示するためのスイッチ等、ユーザがビデオカメラ装置10に対する動作指示を行うための各種のスイッチを有する。   The operation unit 16 is for a user to give an operation instruction to the video camera device 10 such as a main switch for turning on / off the power of the video camera device 10 and a switch for instructing start / end of shooting (recording). With various switches.

なお、信号処理部12、記録部13、システム制御部14、表示部15、及び操作部16間の信号の入出力は、バス17を介して行われる。   Note that signal input / output among the signal processing unit 12, the recording unit 13, the system control unit 14, the display unit 15, and the operation unit 16 is performed via the bus 17.

図2は、本実施形態に係る信号処理部12の構成を示すブロック図である。なお、以下の説明では符号化対象画像や、予測に用いられる参照画像(参照候補画像)を、それぞれフレーム画像(単にフレームと称す)を例にして説明する。そして、画面間、すなわちフレーム間の動きベクトルを検出する例について説明する。   FIG. 2 is a block diagram illustrating a configuration of the signal processing unit 12 according to the present embodiment. In the following description, an encoding target image and a reference image (reference candidate image) used for prediction will be described using frame images (simply referred to as frames) as examples. An example of detecting a motion vector between screens, that is, between frames will be described.

図2において、セレクタ12aは、フレーム内符号化/フレーム間符号化の各符号化モードに応じて、撮像部11内の画像メモリから読み出された撮像画像データの出力先を選択する。イントラ予測器12bは、撮像画像データをセレクタ12aから入力し、入力した撮像画像データに対して、H.264符号化方式によるイントラ予測処理を実行する。   In FIG. 2, the selector 12 a selects the output destination of the captured image data read from the image memory in the imaging unit 11 in accordance with each encoding mode of intraframe encoding / interframe encoding. The intra predictor 12b receives the captured image data from the selector 12a, and outputs H.264 to the input captured image data. An intra prediction process using the H.264 encoding method is executed.

減算器12cは、セレクタ12aより出力された撮像画像データから、動き補償器12lより出力された予測画像データを減算して、動き予測誤差データを算出する。変換器12dは、減算器12cやイントラ予測器12bから出力されたデータに対して直交変換を施し、この直交変換により得られる直交変換係数を量子化器12eへ出力する。量子化器12eは、直交変換係数を量子化し、量子化した全ての直交変換係数をスキャン処理器12fと逆量子化器12hとに出力する。   The subtractor 12c subtracts the predicted image data output from the motion compensator 121 from the captured image data output from the selector 12a to calculate motion prediction error data. The converter 12d performs orthogonal transform on the data output from the subtractor 12c and the intra predictor 12b, and outputs the orthogonal transform coefficient obtained by the orthogonal transform to the quantizer 12e. The quantizer 12e quantizes the orthogonal transform coefficients and outputs all quantized orthogonal transform coefficients to the scan processor 12f and the inverse quantizer 12h.

スキャン処理器12fは、符号化モードに応じて、量子化された直交変換係数に対してジグザグスキャン等のスキャン処理を行う。エントロピー符号化器12gは、スキャン処理器12fからの出力をエントロピー符号化し、エントロピー符号化されたデータ(符号化データ)をバス・インタフェース(I/F)12nに出力する。バスI/F12nに出力された符号化データは、バス17を介して記録部13に供給され、記録部13によって記録される。なお、記録部13によって記録された符号化データを、更にハードディスクや光ディスク等の記録媒体に移動して記録する構成にしても良い。   The scan processor 12f performs a scan process such as a zigzag scan on the quantized orthogonal transform coefficient in accordance with the encoding mode. The entropy encoder 12g entropy-encodes the output from the scan processor 12f, and outputs the entropy-encoded data (encoded data) to the bus interface (I / F) 12n. The encoded data output to the bus I / F 12n is supplied to the recording unit 13 via the bus 17 and is recorded by the recording unit 13. The encoded data recorded by the recording unit 13 may be further moved to a recording medium such as a hard disk or an optical disk for recording.

逆量子化器12hは、量子化された直交変換係数を量子化器12eから入力して、逆量子化する。逆変換器12iは、逆量子化器12hで逆量子化された直交変換係数を逆直交変換し、減算器12cで得られた動き予測誤差データを復号化する。加算器12jは、逆変換器12iから出力された予測誤差データと、動き補償器12lから出力された予測画像データとを加算して、復元画像(ローカルデコード画像)を生成する。生成された復元画像のデータはバスI/F12nに出力される。バスI/F12nに出力されたデータは、参照画像データとして、記録部13に設けられたフレームメモリに、フレーム単位で記録される。なお、以下の説明では、記録部13に設けられたフレームメモリに記録された参照画像データを、必要に応じて参照候補フレームと称する。   The inverse quantizer 12h receives the quantized orthogonal transform coefficient from the quantizer 12e and performs inverse quantization. The inverse transformer 12i performs inverse orthogonal transform on the orthogonal transform coefficient inversely quantized by the inverse quantizer 12h, and decodes motion prediction error data obtained by the subtractor 12c. The adder 12j adds the prediction error data output from the inverse converter 12i and the predicted image data output from the motion compensator 121 to generate a restored image (local decoded image). The generated restored image data is output to the bus I / F 12n. The data output to the bus I / F 12n is recorded in the frame unit in the frame memory provided in the recording unit 13 as reference image data. In the following description, reference image data recorded in a frame memory provided in the recording unit 13 is referred to as a reference candidate frame as necessary.

動きベクトル検出器12kは、符号化対象フレームと、複数の参照候補フレームとに基づいて、最適な動きベクトルを演算する。本実施形態の動きベクトル検出器12kは、システム制御部14からバスI/F12nを介して、符号化対象となる符号化対象フレームの番号と、参照候補フレームの番号とを入力し、入力した番号を用いて探索精度を決定する。なお、動きベクトル検出器12kの詳細については、図3等を用いて後述する。   The motion vector detector 12k calculates an optimal motion vector based on the encoding target frame and the plurality of reference candidate frames. The motion vector detector 12k of this embodiment inputs the number of the encoding target frame to be encoded and the number of the reference candidate frame from the system control unit 14 via the bus I / F 12n, and the input number Is used to determine the search accuracy. Details of the motion vector detector 12k will be described later with reference to FIG.

動き補償器12lは、動きベクトル検出器12kで演算された動きベクトルと、予測誤差の最も小さい参照候補フレームとを用いて、予測画像データを生成する。動き符号化器12mは、動きベクトル検出器12kで演算された動きベクトルを符号化してバスI/F12nに出力する。バスI/F12nに出力された符号化された動きベクトルは、前記符号化データと関連付けて記録部13に記録される。   The motion compensator 121 generates predicted image data using the motion vector calculated by the motion vector detector 12k and the reference candidate frame having the smallest prediction error. The motion encoder 12m encodes the motion vector calculated by the motion vector detector 12k and outputs the encoded motion vector to the bus I / F 12n. The encoded motion vector output to the bus I / F 12n is recorded in the recording unit 13 in association with the encoded data.

なお、本実施形態では、過去のフレームを参照する順方向予測、過去と未来のフレームを参照する双方向予測、及び未来のフレームを参照する逆方向予測の何れの方式も用いることができる。また、図2に示したもの以外の装置が、信号処理部12に設けられていてもよい。   In the present embodiment, any of forward prediction referring to past frames, bidirectional prediction referring to past and future frames, and backward prediction referring to future frames can be used. Further, a device other than that shown in FIG. 2 may be provided in the signal processing unit 12.

次に、動きベクトル検出器12kの詳細について説明する。図3は、本実施形態に係る動きベクトル検出器12kの構成を示すブロック図である。図3の動きベクトル検出器12kは、H.264又はそれに関連する符号化方式の符号化装置に適用して好適なものであり、またそのような符号化装置はビデオカメラ装置等に用いて好適なものである。   Next, details of the motion vector detector 12k will be described. FIG. 3 is a block diagram showing the configuration of the motion vector detector 12k according to this embodiment. The motion vector detector 12k in FIG. The present invention is suitable for application to an encoding device of H.264 or a related encoding method, and such an encoding device is suitable for use in a video camera device or the like.

図3において、動きベクトル検出器12kは、符号化対象フレーム保存部100と、参照候補フレーム保存部101と、探索精度決定部102と、動きベクトル演算部103とを備えて構成されている。   In FIG. 3, the motion vector detector 12k includes an encoding target frame storage unit 100, a reference candidate frame storage unit 101, a search accuracy determination unit 102, and a motion vector calculation unit 103.

符号化対象フレーム保存部100には、動きベクトルの探索で用いられるフレームであって、これから符号化しようとしている符号化対象フレーム300が保存される。参照候補フレーム保存部101には、複数の参照候補フレーム301が保存される。   The encoding target frame storage unit 100 stores the encoding target frame 300 that is used for motion vector search and is about to be encoded. A plurality of reference candidate frames 301 are stored in the reference candidate frame storage unit 101.

図4は、符号化対象フレームと参照候補フレームとの関係の一例を概念的に示した図である。   FIG. 4 is a diagram conceptually illustrating an example of the relationship between the encoding target frame and the reference candidate frame.

図4の例では、符号化対象フレーム300に対する参照フレームの候補として、3枚の選択可能な参照候補フレーム301a〜301cがある。フレーム番号で言うと、参照候補フレーム番号303が「0」〜「2」、符号化対象フレーム番号302が「3」の場合を一例として示している。また、図4に示す3t、2t、tは、それぞれ符号化対象フレーム300から、参照候補フレーム301a、301b、301cまでの時間的な距離(時間間隔)を表している。   In the example of FIG. 4, there are three selectable reference candidate frames 301 a to 301 c as reference frame candidates for the encoding target frame 300. In terms of frame numbers, a case where the reference candidate frame number 303 is “0” to “2” and the encoding target frame number 302 is “3” is shown as an example. In addition, 3t, 2t, and t shown in FIG. 4 represent temporal distances (time intervals) from the encoding target frame 300 to the reference candidate frames 301a, 301b, and 301c, respectively.

図5は、本実施形態に係る動きベクトル検出器12kの動作の一例について説明するフローチャートである。図5のフローチャートを参照しながら、図3に示す動きベクトル検出器12kの動作の一例について説明する。   FIG. 5 is a flowchart for explaining an example of the operation of the motion vector detector 12k according to the present embodiment. An example of the operation of the motion vector detector 12k shown in FIG. 3 will be described with reference to the flowchart of FIG.

探索精度決定部102は、システム制御部14から、バスI/F12nを介して、符号化対象フレーム番号302と、参照候補フレーム番号303とが指定されるまで待機する(ステップS101)。   The search accuracy determination unit 102 waits until the encoding target frame number 302 and the reference candidate frame number 303 are specified from the system control unit 14 via the bus I / F 12n (step S101).

ステップS101において、符号化対象フレーム番号302と、参照候補フレーム番号303とが指定されると、探索精度決定部102は、符号化対象フレーム300と、参照候補フレーム301a〜301cとの間の時間的な距離を演算する(ステップS102)。   In step S101, when the encoding target frame number 302 and the reference candidate frame number 303 are designated, the search accuracy determination unit 102 determines the temporal relationship between the encoding target frame 300 and the reference candidate frames 301a to 301c. A simple distance is calculated (step S102).

そして、探索精度決定部102は、符号化対象フレーム300と参照候補フレーム301a〜301cとの間の時間的な距離に応じて、動きベクトルの探索精度を変化させる(ステップS103)。   Then, the search accuracy determination unit 102 changes the motion vector search accuracy according to the temporal distance between the encoding target frame 300 and the reference candidate frames 301a to 301c (step S103).

具体的に、図4に示した例の場合、参照候補フレーム番号303が「2」の参照候補フレーム301cと、符号化対象フレーム番号302が「3」の符号化対象フレーム300との間の時間的な距離は「t」と短いので、最適な動きベクトルが見つかる確率が大きい。従って、探索精度決定部102は、例えば、縦方向、横方向共に、1画素精度の詳細な探索を行うように動きベクトル演算部103に指示を出す。   Specifically, in the example shown in FIG. 4, the time between the reference candidate frame 301c whose reference candidate frame number 303 is “2” and the encoding target frame 300 whose encoding target frame number 302 is “3”. Since the typical distance is as short as “t”, there is a high probability that an optimal motion vector will be found. Therefore, the search accuracy determination unit 102 instructs the motion vector calculation unit 103 to perform a detailed search with one pixel accuracy in both the vertical direction and the horizontal direction, for example.

一方、参照候補フレーム番号303が「0」の参照候補フレーム301aと、符号化対象フレーム番号302が「3」の符号化対象フレーム300との間の時間的な距離は「3t」であり遠く離れている。このため、参照候補フレーム301aで最適な動きベクトルが見つかる確率は、参照候補フレーム301cで最適な動きベクトルが見つかる確率よりも低いと考えられる。従って、探索精度決定部102は、例えば、縦方向、横方向共に、1画素飛びの精度の粗い探索を行うように動きベクトル演算部103に指示を出す。また、探索精度決定部102は、例えば、参照候補フレーム301cのときと探索範囲を同じにするように動きベクトル演算部103に指示を出す。   On the other hand, the temporal distance between the reference candidate frame 301a whose reference candidate frame number 303 is “0” and the encoding target frame 300 whose encoding target frame number 302 is “3” is “3t”, which is far away. ing. For this reason, it is considered that the probability that an optimal motion vector is found in the reference candidate frame 301a is lower than the probability that an optimal motion vector is found in the reference candidate frame 301c. Therefore, for example, the search accuracy determination unit 102 instructs the motion vector calculation unit 103 to perform a coarse search with one pixel skip in both the vertical and horizontal directions. In addition, the search accuracy determination unit 102 instructs the motion vector calculation unit 103 so that the search range is the same as that of the reference candidate frame 301c, for example.

このように参照候補フレーム301aで動きベクトルを探索する場合には、参照候補フレーム301cで動きベクトルを探索する場合と、動きベクトルの探索範囲を同じにする。更に、動きベクトルの探索精度を縦方向、横方向共に、参照候補フレーム301cで動きベクトルを探索する場合の1/2にする。このため、参照候補フレーム301aで動きベクトルを探索した場合には、参照候補フレーム301cで動きベクトルを探索する場合に比べ、演算量を1/4に削減することが出来る。   In this way, when searching for a motion vector in the reference candidate frame 301a, the search range of the motion vector is made the same as in the case of searching for a motion vector in the reference candidate frame 301c. Furthermore, the motion vector search accuracy is halved in both the vertical and horizontal directions when searching for a motion vector in the reference candidate frame 301c. For this reason, when a motion vector is searched for in the reference candidate frame 301a, the amount of calculation can be reduced to ¼ compared to a case where a motion vector is searched for in the reference candidate frame 301c.

また、参照候補フレーム番号303が「1」の参照候補フレーム301bと、符号化対象フレーム番号302が「3」の符号化対象フレーム300との間の時間的な距離は「2t」である。このように、参照候補フレーム301bと符号化対象フレーム300との間の時間的な距離は、参照候補フレーム301aと符号化対象フレーム300との間ほどでは無いがやや離れている。このため、参照候補フレーム301bで最適な動きベクトルが見つかる確率は、参照候補フレーム301aで最適な動きベクトルが見つかる確率よりも高いが、参照候補フレーム301cで最適な動きベクトルが見つかる確率よりも低いと考えられる。   The temporal distance between the reference candidate frame 301b with the reference candidate frame number 303 of “1” and the encoding target frame 300 with the encoding target frame number 302 of “3” is “2t”. As described above, the temporal distance between the reference candidate frame 301b and the encoding target frame 300 is slightly different from that between the reference candidate frame 301a and the encoding target frame 300. Therefore, the probability that the optimal motion vector is found in the reference candidate frame 301b is higher than the probability that the optimal motion vector is found in the reference candidate frame 301a, but is lower than the probability that the optimal motion vector is found in the reference candidate frame 301c. Conceivable.

そこで、探索精度決定部102は、例えば、縦方向の探索精度を1画素毎とし、横方向の探索精度を1画素飛びとするように動きベクトル演算部103に指示を出す。また、探索精度決定部102は、例えば、参照候補フレーム301cのときと探索範囲を同じにするように動きベクトル演算部103に指示を出す。   Therefore, the search accuracy determination unit 102 instructs the motion vector calculation unit 103 to set the search accuracy in the vertical direction for each pixel and the search accuracy in the horizontal direction to skip one pixel, for example. In addition, the search accuracy determination unit 102 instructs the motion vector calculation unit 103 so that the search range is the same as that of the reference candidate frame 301c, for example.

このように参照候補フレーム301bを探索する場合には、参照候補フレーム301cを探索する場合と、動きベクトルの探索範囲と縦方向の探索精度とを同じにすると共に、横方向の探索精度を、参照候補フレーム301cを探索する場合の1/2にする。このため、参照候補フレーム301bで動きベクトルを探索した場合には、参照候補フレーム301cで探索を行った場合に比べ、演算量を1/2に削減することが出来る。   Thus, when searching for the reference candidate frame 301b, the search range of the motion vector and the vertical search accuracy are made the same as when searching for the reference candidate frame 301c, and the horizontal search accuracy is referred to. The candidate frame 301c is halved when searching. For this reason, when the motion vector is searched for in the reference candidate frame 301b, the amount of calculation can be reduced to ½ compared to the case where the search is performed in the reference candidate frame 301c.

以上のようにして、動きベクトルの探索精度が探索精度決定部102により決定されると、動きベクトル演算部103は、動きベクトル304を決定する(ステップS104)。具体的に動きベクトル演算部103は、符号化対象フレーム保存部100に保存されている符号化対象フレーム300に含まれる各マクロブロックに対し、参照候補フレーム保存部101に保存された参照候補フレーム301内で探索を行い、動きベクトルを推定する。ここで、例えば、N×N(Nは自然数)サイズのマクロブロックの動きベクトルを、マクロブロックよりも±P画素だけ広い範囲で探索するとすると(pは自然数)、探索範囲は以下の(1)式で表される。
探索範囲=(N+2p)×(N+2p) ・・・(1)
動きベクトル演算部103は、動きベクトルの候補になり得る(2p+1)2個の位置で相関係数を計算した後、最大相関度を示す位置を動きベクトルとして決定する。
When the motion vector search accuracy is determined by the search accuracy determination unit 102 as described above, the motion vector calculation unit 103 determines the motion vector 304 (step S104). Specifically, the motion vector calculation unit 103 performs a reference candidate frame 301 stored in the reference candidate frame storage unit 101 for each macroblock included in the encoding target frame 300 stored in the encoding target frame storage unit 100. Search and estimate the motion vector. Here, for example, if a motion vector of a macroblock having a size of N × N (N is a natural number) is searched in a range wider by ± P pixels than the macroblock (p is a natural number), the search range is (1) It is expressed by a formula.
Search range = (N + 2p) × (N + 2p) (1)
The motion vector calculation unit 103 calculates a correlation coefficient at (2p + 1) two positions that can be motion vector candidates, and then determines a position indicating the maximum correlation degree as a motion vector.

最大相関度を有する動きベクトルを推定するために、動きベクトル演算部103は、例えば、MSE(Mean Square Error)、MAE(Mean Absolute Error)、又はMAD(Mean Absolute Difference)等の評価関数を用いる。例えば、MSEは以下の(2)式で表され、MAEは以下の(3)式で表される。   In order to estimate the motion vector having the maximum degree of correlation, the motion vector calculation unit 103 uses an evaluation function such as MSE (Mean Square Error), MAE (Mean Absolute Error), or MAD (Mean Absolute Difference). For example, MSE is represented by the following formula (2), and MAE is represented by the following formula (3).

ここで、Srefは、参照フレームを示し、Scur,kは、動きベクトルが探索されている現在のフレームにおけるk番目のマクロブロックを示す。(i,j)は、動きベクトルが探索されている現在のフレームのk番目のマクロブロックにおける参照フレームの空間的な位置を示す。   Here, Sref indicates a reference frame, and Scur, k indicates the k-th macroblock in the current frame for which a motion vector is searched. (I, j) indicates the spatial position of the reference frame in the kth macroblock of the current frame for which a motion vector is being searched.

また、X及びYは、動きベクトル探索範囲の水平画素数及び垂直画素数である。g及びhは、探索精度決定部102からの指示された横方向の探索精度及び縦方向の探索精度を示す係数(何画素毎に演算を行うかを示す係数)である。   X and Y are the number of horizontal pixels and the number of vertical pixels in the motion vector search range. g and h are coefficients indicating the horizontal search accuracy and the vertical search accuracy specified by the search accuracy determination unit 102 (coefficients indicating how many pixels are calculated).

また、x、yは、それぞれ以下の(4)式、(5)式で表される。
x=g×u ・・・(4)
y=h×v ・・・(5)
更にx、y、g、hは、以下の(6)式〜(9)式を満たす自然数である。
0≦x≦X ・・・(6)
1≦g≦X ・・・(7)
0≦y≦Y ・・・(8)
1≦h≦Y ・・・(9)
また、U、Vは、それぞれ以下の(10)式、(11)式で表される。
U=X−|i| ・・・(10)
V=Y−|j| ・・・(11)
(2)式や(3)式で表される評価関数は、画素の差に基づいたものである。従って、動きベクトル演算部103は、最も小さいMAE値やMSE値を有する場合(LRV値となる場合)の動きベクトルを、現在のマクロブロックにおける最終的な動きベクトルとして選定する。なお、図3に示したもの以外の機能が、動きベクトル検出器12kに設けられていてもよい。
X and y are represented by the following formulas (4) and (5), respectively.
x = g × u (4)
y = h × v (5)
Furthermore, x, y, g, and h are natural numbers that satisfy the following expressions (6) to (9).
0 ≦ x ≦ X (6)
1 ≦ g ≦ X (7)
0 ≦ y ≦ Y (8)
1 ≦ h ≦ Y (9)
U and V are expressed by the following formulas (10) and (11), respectively.
U = X− | i | (10)
V = Y− | j | (11)
The evaluation functions represented by the formulas (2) and (3) are based on pixel differences. Accordingly, the motion vector calculation unit 103 selects a motion vector having the smallest MAE value or MSE value (when it becomes an LRV value) as a final motion vector in the current macroblock. It should be noted that functions other than those shown in FIG. 3 may be provided in the motion vector detector 12k.

以上のように本実施形態では、符号化対象フレーム300と、参照候補フレーム301a〜301cとの時間的な距離に応じて、動きベクトルの探索精度を変化させるようにした。例えば、符号化対象フレーム300と、参照候補フレーム301cとの間の時間的な距離は「t」であり短いので、最適な動きベクトルが見つかる確率が高い。従って、探索精度決定部102は、例えば、縦横共に、1画素精度の詳細な探索を行う。一方、符号化対象フレーム300と、参照候補フレーム301aとの間の時間的な距離は「3t」であり遠く離れているので、最適な動きベクトルが見つかる確率が低い。従って、探索精度決定部102は、例えば参照候補フレーム301cのときと探索範囲を同じにし、且つ、縦横共に、1画素飛びの精度の粗い探索を行う。   As described above, in this embodiment, the motion vector search accuracy is changed according to the temporal distance between the encoding target frame 300 and the reference candidate frames 301a to 301c. For example, since the temporal distance between the encoding target frame 300 and the reference candidate frame 301c is “t”, which is short, the probability that an optimal motion vector is found is high. Therefore, the search accuracy determination unit 102 performs a detailed search with 1 pixel accuracy in both vertical and horizontal directions, for example. On the other hand, since the temporal distance between the encoding target frame 300 and the reference candidate frame 301a is “3t”, which is far away, the probability of finding an optimal motion vector is low. Therefore, for example, the search accuracy determination unit 102 performs the search with the same search range as that of the reference candidate frame 301c and with a high accuracy of skipping one pixel both vertically and horizontally.

以上のように、時間的に離れた画像に対して符号化を行う際に、最適な動きベクトルが見つかる確率に応じて、動きベクトルの探索精度を変化させる。従って、時間的に離れた画像についても動きベクトルの探索範囲とすることで、動きベクトルの検出精度を向上させられるとともに、且つ、動きベクトルの探索精度を変化させることによって、動きベクトルを検出する際の演算量を削減できる。これにより、例えば、駆動するバッテリーの消費量が増大して撮影時間が短くなってしまうことを可及的に防止することができる。   As described above, when encoding an image separated in time, the motion vector search accuracy is changed according to the probability of finding the optimal motion vector. Therefore, the motion vector search range can be improved even for images that are separated in time, and the motion vector detection accuracy can be improved, and the motion vector search accuracy can be changed to detect a motion vector. The amount of computation can be reduced. Thereby, for example, it is possible to prevent as much as possible that the consumption of the battery to be driven increases and the photographing time is shortened.

なお、本実施形態では、時間的な距離に応じて、探索精度がそれぞれ、縦方向、横方向共に1画素とした場合と、縦方向、横方向共に1画素飛びにした場合と、縦方向を1画素、横方向を1画素飛びにした場合とを例に挙げて示した。しかしながら、探索精度はこれらに限定されない。例えば、縦方向、横方向共に2画素飛びにする等してもよい。また、本実施形態では、参照候補フレームの数が3枚の場合を例に挙げて説明したが、参照候補フレームの数はこれに限定されない。例えば、参照候補フレームの数を増やしてもよい。参照候補フレームの数を増やした場合には、探索精度を更に段階的に変化させることも可能である。   In the present embodiment, the search accuracy is set to one pixel in both the vertical direction and the horizontal direction, the case where the vertical direction and the horizontal direction are skipped by one pixel, and the vertical direction according to the temporal distance. The case where one pixel and the horizontal direction are skipped by one pixel is shown as an example. However, the search accuracy is not limited to these. For example, two pixels may be skipped in both the vertical direction and the horizontal direction. In the present embodiment, the case where the number of reference candidate frames is three has been described as an example, but the number of reference candidate frames is not limited to this. For example, the number of reference candidate frames may be increased. When the number of reference candidate frames is increased, the search accuracy can be further changed stepwise.

(第2の実施形態)
次に、本発明の第2の実施形態について説明する。前述した第1の実施形態では、符号化対象フレーム300と、参照候補フレーム301a〜301cとの時間的な距離に応じて、動きベクトルの探索精度を変化させるようにした。これに対して、本実施形態では、符号化対象フレーム300と、参照候補フレーム301a〜301cとの時間的な距離に応じて、符号化対象フレーム300と、参照候補フレーム301a〜301cの縮小率を変化させるようにした。このように、本実施形態と第1の実施形態とは、符号化対象フレーム300と、参照候補フレーム301a〜301cとを用いた処理の方法が主として異なる。従って、以下の説明において第1の実施形態と同一の部分については、図1〜図5に付した符号と同一の符号を付す等して詳細な説明を省略する。
(Second Embodiment)
Next, a second embodiment of the present invention will be described. In the first embodiment described above, the motion vector search accuracy is changed according to the temporal distance between the encoding target frame 300 and the reference candidate frames 301a to 301c. On the other hand, in the present embodiment, the reduction ratios of the encoding target frame 300 and the reference candidate frames 301a to 301c are set according to the temporal distance between the encoding target frame 300 and the reference candidate frames 301a to 301c. I changed it. As described above, the present embodiment and the first embodiment are mainly different in the processing method using the encoding target frame 300 and the reference candidate frames 301a to 301c. Therefore, in the following description, the same parts as those of the first embodiment are denoted by the same reference numerals as those shown in FIGS.

図6は、本実施形態に係る動きベクトル検出器12kの構成の一例を示すブロック図である。図7は、本実施形態に係る動きベクトル検出器12kの動作の一例について説明するフローチャートである。図4及び図7を参照しながら、図6に示す動きベクトル検出器12kの動作について説明する。   FIG. 6 is a block diagram showing an example of the configuration of the motion vector detector 12k according to this embodiment. FIG. 7 is a flowchart for explaining an example of the operation of the motion vector detector 12k according to this embodiment. The operation of the motion vector detector 12k shown in FIG. 6 will be described with reference to FIGS.

縮小率決定部402は、システム制御部14から、バスI/F12nを介して、符号化対象フレーム番号302と、参照候補フレーム番号303とが指定されるまで待機する(ステップS401)。ステップS401において、符号化対象フレーム番号302と、参照候補フレーム番号303とが指定されると、縮小率決定部402は、符号化対象フレーム300と、参照候補フレーム301a〜301cとの間の時間的な距離を演算する(ステップS402)。   The reduction rate determination unit 402 waits until the encoding target frame number 302 and the reference candidate frame number 303 are specified from the system control unit 14 via the bus I / F 12n (step S401). In step S401, when the encoding target frame number 302 and the reference candidate frame number 303 are designated, the reduction rate determination unit 402 determines the temporal relationship between the encoding target frame 300 and the reference candidate frames 301a to 301c. A simple distance is calculated (step S402).

そして、縮小率決定部402は、符号化対象フレーム300と参照候補フレーム301a〜301cとの間の時間的な距離に応じて、符号化対象フレーム300の画像と、参照候補フレーム301a〜301cの画像の縮小率を決定する(ステップS403)。   Then, the reduction rate determination unit 402 determines the image of the encoding target frame 300 and the images of the reference candidate frames 301a to 301c according to the temporal distance between the encoding target frame 300 and the reference candidate frames 301a to 301c. The reduction ratio is determined (step S403).

縮小率決定部402は、符号化対象フレーム300と参照候補フレーム301a〜301cとの間の時間的な距離が短いほど縮小率を小さくし、符号化対象フレーム300と参照候補フレーム301a〜301cとの間の時間的な距離が長いほど縮小率を大きくする。   The reduction rate determination unit 402 decreases the reduction rate as the temporal distance between the encoding target frame 300 and the reference candidate frames 301a to 301c is shorter, and the encoding target frame 300 and the reference candidate frames 301a to 301c are reduced. The reduction ratio is increased as the time distance between them is longer.

具体的に、図4に示した例の場合、参照候補フレーム番号303が「2」の参照候補フレーム301cと、符号化対象フレーム番号302が「3」の符号化対象フレーム300との間の時間的な距離は「t」と短いので、最適な動きベクトルが見つかる確率が大きい。従って、縮小率決定部402は、画像の縮小を行わずに、符号化対象フレーム300の画像と参照候補フレーム301a〜301cの画像とをそのまま用いて動きベクトルの探索を行うように動きベクトル演算部407に指示を出す。   Specifically, in the example shown in FIG. 4, the time between the reference candidate frame 301c whose reference candidate frame number 303 is “2” and the encoding target frame 300 whose encoding target frame number 302 is “3”. Since the typical distance is as short as “t”, there is a high probability that an optimal motion vector will be found. Therefore, the reduction rate determination unit 402 does not reduce the image, but uses the image of the encoding target frame 300 and the images of the reference candidate frames 301a to 301c as they are to search for a motion vector. Instruct 407.

一方、参照候補フレーム番号303が「0」の参照候補フレーム301aと、符号化対象フレーム番号302が「3」の符号化対象フレーム300との間の時間的な距離は「3t」であり遠く離れている。このため、参照候補フレーム301aで最適な動きベクトルが見つかる確率は、参照候補フレーム301cで最適な動きベクトルが見つかる確率よりも低いと考えられる。従って、縮小率決定部402は、例えば、符号化対象フレーム300の画像と参照候補フレーム301a〜301cの画像とを、それぞれ縦方向、横方向共に1/2倍に縮小するように縮小フレーム作成部404に指示を出す。縮小フレーム作成部404は、画像縮小手段である。   On the other hand, the temporal distance between the reference candidate frame 301a whose reference candidate frame number 303 is “0” and the encoding target frame 300 whose encoding target frame number 302 is “3” is “3t”, which is far away. ing. For this reason, it is considered that the probability that an optimal motion vector is found in the reference candidate frame 301a is lower than the probability that an optimal motion vector is found in the reference candidate frame 301c. Therefore, the reduction rate determination unit 402, for example, a reduced frame creation unit so as to reduce the image of the encoding target frame 300 and the images of the reference candidate frames 301a to 301c by 1/2 times in both the vertical direction and the horizontal direction. An instruction is issued to 404. The reduced frame creating unit 404 is image reducing means.

また、縮小率決定部402は、例えば、参照候補フレーム301cのときと探索範囲を同じにするように動きベクトル演算部407に指示を出す。従って、縦方向及び横方向の画素数が共に1/2倍になる。このため、参照候補フレーム301aで動きベクトルを探索する場合には、参照候補フレーム301cで動きベクトルを探索する場合に比べ、演算量を1/4に削減することが出来る。   In addition, the reduction rate determination unit 402 instructs the motion vector calculation unit 407 so that the search range is the same as that of the reference candidate frame 301c, for example. Accordingly, the number of pixels in the vertical direction and the horizontal direction are both halved. Therefore, when searching for a motion vector in the reference candidate frame 301a, the amount of calculation can be reduced to ¼ compared to searching for a motion vector in the reference candidate frame 301c.

また、参照候補フレーム番号303が「1」の参照候補フレーム301bと、符号化対象フレーム番号302が「3」の符号化対象フレーム300との間の時間的な距離は「2t」である。このように、参照候補フレーム301bと符号化対象フレーム300との間の時間的な距離は、参照候補フレーム301aと符号化対象フレーム300との間ほどでは無いがやや離れている。このため、参照候補フレーム301bで最適な動きベクトルが見つかる確率は、参照候補フレーム301aで最適な動きベクトルが見つかる確率よりも高いが、参照候補フレーム301cで最適な動きベクトルが見つかる確率よりも低いと考えられる。   The temporal distance between the reference candidate frame 301b with the reference candidate frame number 303 of “1” and the encoding target frame 300 with the encoding target frame number 302 of “3” is “2t”. As described above, the temporal distance between the reference candidate frame 301b and the encoding target frame 300 is slightly different from that between the reference candidate frame 301a and the encoding target frame 300. Therefore, the probability that the optimal motion vector is found in the reference candidate frame 301b is higher than the probability that the optimal motion vector is found in the reference candidate frame 301a, but is lower than the probability that the optimal motion vector is found in the reference candidate frame 301c. Conceivable.

そこで、縮小率決定部402は、例えば、符号化対象フレーム300の画像と参照候補フレーム301a〜301cの画像とを、縦方向では縮小せず、横方向では1/2倍に縮小するように縮小フレーム作成部404に指示を出す。また、縮小率決定部402は、例えば、参照候補フレーム301cのときと探索範囲を同じにするように動きベクトル演算部407に指示を出す。従って、横方向の画素数が1/2倍になる。このため、参照候補フレーム301bで動きベクトルを探索した場合には、参照候補フレーム301cで動きベクトルを探索した場合に比べ、演算量を1/2に削減することが出来る。   Therefore, for example, the reduction rate determination unit 402 reduces the image of the encoding target frame 300 and the images of the reference candidate frames 301a to 301c so that the image is not reduced in the vertical direction but reduced to 1/2 times in the horizontal direction. An instruction is issued to the frame creation unit 404. In addition, the reduction rate determination unit 402 instructs the motion vector calculation unit 407 so that the search range is the same as that of the reference candidate frame 301c, for example. Therefore, the number of pixels in the horizontal direction is halved. For this reason, when a motion vector is searched for in the reference candidate frame 301b, the amount of calculation can be reduced to ½ compared to a case where a motion vector is searched for in the reference candidate frame 301c.

以上のようにして、符号化対象フレーム300の画像と、参照候補フレーム301a〜301cの画像の縮小率が決定されると、ステップS404に進む。そして、縮小フレーム作成部404は、縮小率決定部402によって決定された縮小率に従い、符号化対象フレーム300の画像と、参照候補フレーム301a〜301cの各画像を縮小処理して、複数の縮小画像を生成する(ステップS404)。   As described above, when the reduction ratios of the image of the encoding target frame 300 and the reference candidate frames 301a to 301c are determined, the process proceeds to step S404. Then, the reduced frame creation unit 404 performs a reduction process on the image of the encoding target frame 300 and each of the reference candidate frames 301a to 301c according to the reduction rate determined by the reduction rate determination unit 402, and a plurality of reduced images. Is generated (step S404).

図8は、本実施形態に係る符号化対象フレーム300の縮小画像と、参照候補フレーム301a〜301cの縮小画像の一例を示す図である。   FIG. 8 is a diagram illustrating an example of a reduced image of the encoding target frame 300 and reduced images of the reference candidate frames 301a to 301c according to the present embodiment.

例えば、図8に示す原画像801を、縦横共に1/2倍に縮小して縮小画像802aを生成する場合には、隣接する縦・横各々の2画素の画素値を足して4で割ることで縮小画像802aを生成する。例えば、縮小画像802aにおける画素A’は、原画像801の画素A、B、E、Fの画素値を足して4で割る((A+B+E+F)/4)ことで生成することが出来る。また、縮小画像802aにおける画素B’は、原画像801の画素C、D、G、Hの画素値を足して4で割る((C+D+G+H)/4)ことで生成することが出来る。   For example, when the reduced image 802a is generated by reducing the original image 801 shown in FIG. 8 by a factor of 1/2 both vertically and horizontally, the pixel values of two adjacent vertical and horizontal pixels are added and divided by 4. A reduced image 802a is generated. For example, the pixel A ′ in the reduced image 802 a can be generated by adding the pixel values of the pixels A, B, E, and F of the original image 801 and dividing the result by 4 ((A + B + E + F) / 4). In addition, the pixel B ′ in the reduced image 802 a can be generated by adding the pixel values of the pixels C, D, G, and H of the original image 801 and dividing the result by 4 ((C + D + G + H) / 4).

一方、図8に示す原画像801を、横方向だけ1/2倍に縮小して縮小画像802bを生成する場合には、横方向に隣接する2画素の画素値を足して2で割ることで縮小画像802bを生成する。例えば、縮小画像802bにおける画素A”は、原画像801の画素A、Bの画素値を足して2で割る((A+B)/2)ことで生成することが出来る。また、縮小画像802bにおける画素B”は、原画像801の画素C、Dの画素値を足して2で割る((C+D)/2)ことで生成することが出来る。   On the other hand, when the reduced image 802b is generated by reducing the original image 801 shown in FIG. 8 by ½ times in the horizontal direction, the pixel values of two pixels adjacent in the horizontal direction are added and divided by two. A reduced image 802b is generated. For example, the pixel A ″ in the reduced image 802b can be generated by adding the pixel values of the pixels A and B in the original image 801 and dividing by 2 ((A + B) / 2). Also, the pixel in the reduced image 802b. B ″ can be generated by adding the pixel values of the pixels C and D of the original image 801 and dividing by 2 ((C + D) / 2).

以上のようにして、縮小フレーム作成部404によって、符号化対象フレーム300の縮小画像と、参照候補フレーム301a〜301cの縮小画像とが作成されると、符号化対象フレーム300の縮小画像は、縮小符号化対象フレーム保存部405に保存される。更に、参照候補フレーム301a〜301cの縮小画像は、縮小参照候補フレーム保存部406に保存される。   As described above, when the reduced frame creation unit 404 creates the reduced image of the encoding target frame 300 and the reduced images of the reference candidate frames 301a to 301c, the reduced image of the encoding target frame 300 is reduced. It is stored in the encoding target frame storage unit 405. Further, the reduced images of the reference candidate frames 301a to 301c are stored in the reduced reference candidate frame storage unit 406.

次に、動きベクトル演算部407は、動きベクトル408を決定する(ステップS405)。ここで、動きベクトル演算部407は、画像の縮小を行わないことが縮小率決定部402から指示された場合には、縮小画像を用いずに、第1の実施形態の動きベクトル演算部103と同じ動作を行う。   Next, the motion vector calculation unit 407 determines a motion vector 408 (step S405). Here, when the reduction rate determination unit 402 instructs the motion vector calculation unit 407 not to reduce the image, the motion vector calculation unit 407 uses the motion vector calculation unit 103 of the first embodiment without using the reduced image. Perform the same operation.

一方、画像の縮小を行うことが縮小率決定部402から指示された場合、動きベクトル演算部407は、まず、縮小符号化対象フレーム保存部405から、符号化対象フレーム300の縮小画像のマクロブロックを読み出す。次に、動きベクトル演算部407は、読み出したマクロブロックに対し、縮小参照候補フレーム保存部406から読み出した参照候補フレーム301a〜301cの縮小画像の範囲内で動きベクトルの探索を行い、その結果に基づいて動きベクトルを推定する。なお、最大相関度を有する動きベクトルを推定する方法は第1の実施形態で説明した方法と同じである。   On the other hand, when the reduction ratio determining unit 402 instructs to reduce the image, the motion vector calculation unit 407 first receives a macroblock of the reduced image of the encoding target frame 300 from the reduction encoding target frame storage unit 405. Is read. Next, the motion vector calculation unit 407 searches for the motion vector within the range of the reduced images of the reference candidate frames 301a to 301c read from the reduced reference candidate frame storage unit 406 for the read macroblock. Based on this, a motion vector is estimated. The method for estimating the motion vector having the maximum correlation is the same as the method described in the first embodiment.

なお、図6に示した以外の機能が、動きベクトル検出器に設けられていてもよい。   It should be noted that functions other than those shown in FIG. 6 may be provided in the motion vector detector.

以上のように本実施形態では、符号化対象フレーム300と、参照候補フレーム301a〜301cとの時間的な距離に応じて、符号化対象フレーム300の縮小率と、参照候補フレーム301a〜301cの縮小率とを変化させるようにした。例えば、符号化対象フレーム300と、参照候補フレーム301cとの間の時間的な距離は「t」であり短いので、符号化対象フレーム300の画像と、参照候補フレーム301cの画像とを縮小しない。一方、符号化対象フレーム300と、参照候補フレーム301aとの間の時間的な距離は「3t」であり遠く離れているので、最適な動きベクトルが見つかる確率が低い。従って、符号化対象フレーム300の画像と、参照候補フレーム301cの画像とを縦横共に1/2倍に縮小した縮小画像を生成し、生成した縮小画像を用いて動きベクトルを決定する。   As described above, in the present embodiment, the reduction rate of the encoding target frame 300 and the reduction of the reference candidate frames 301a to 301c according to the temporal distance between the encoding target frame 300 and the reference candidate frames 301a to 301c. The rate was changed. For example, since the temporal distance between the encoding target frame 300 and the reference candidate frame 301c is “t”, which is short, the image of the encoding target frame 300 and the image of the reference candidate frame 301c are not reduced. On the other hand, since the temporal distance between the encoding target frame 300 and the reference candidate frame 301a is “3t”, which is far away, the probability of finding an optimal motion vector is low. Therefore, a reduced image is generated by reducing the image of the encoding target frame 300 and the image of the reference candidate frame 301c by a factor of 1/2 both vertically and horizontally, and a motion vector is determined using the generated reduced image.

以上のように、時間的に離れた画像に対して符号化を行う際に、最適な動きベクトルが見つかる確率に応じて、符号化対象フレーム300の縮小率と、参照候補フレーム301a〜301cの縮小率とを変化させる。従って、第1の実施形態と同様に、動きベクトルの検出精度を向上させられるとともに、動きベクトルを検出する際の演算量の増大とを可及的に防止することができる。これにより、例えば、駆動するバッテリーの消費量が増大して撮影時間が短くなってしまうことを可及的に防止することができる。   As described above, when encoding an image that is temporally separated, the reduction rate of the encoding target frame 300 and the reduction of the reference candidate frames 301a to 301c are determined according to the probability of finding the optimal motion vector. Change the rate. Therefore, as in the first embodiment, the accuracy of motion vector detection can be improved, and an increase in the amount of computation when detecting a motion vector can be prevented as much as possible. Thereby, for example, it is possible to prevent as much as possible that the consumption of the battery to be driven increases and the photographing time is shortened.

なお、本実施形態では、時間的な距離に応じて、符号化対象フレーム300の画像と、参照候補フレーム301a〜301cの画像とを、縦横共に1/2倍に縮小する場合と、縦を縮小せずに横方向のみを1/2倍に縮小する場合を例に挙げて示した。しかしながら、符号化対象フレーム300の画像の縮小率と、参照候補フレーム301a〜301cの画像の縮小率とは、これに限定されない。例えば、符号化対象フレーム300の画像と、参照候補フレーム301a〜301cの画像とを、縦横共に1/3倍或いは1/4倍に縮小する等してもよい。また、本実施形態でも、参照候補フレームの数が3枚の場合を例に挙げて説明したが、参照候補フレームの数はこれに限定されない。例えば、参照候補フレームの数を増やしてもよい。参照候補フレームの数を増やした場合には、縮小率を更に段階的に変化させることも可能である。   In the present embodiment, the image of the encoding target frame 300 and the images of the reference candidate frames 301a to 301c are reduced to 1/2 times both vertically and horizontally according to the temporal distance, and the image is reduced vertically. An example in which only the horizontal direction is reduced by a factor of 1/2 is shown as an example. However, the image reduction ratio of the encoding target frame 300 and the image reduction ratios of the reference candidate frames 301a to 301c are not limited to this. For example, the image of the encoding target frame 300 and the images of the reference candidate frames 301a to 301c may be reduced to 1/3 times or 1/4 times both vertically and horizontally. In the present embodiment, the case where the number of reference candidate frames is three has been described as an example, but the number of reference candidate frames is not limited to this. For example, the number of reference candidate frames may be increased. When the number of reference candidate frames is increased, the reduction ratio can be further changed in stages.

(第3の実施形態)
次に、本発明の第3の実施形態について説明する。前述した第1の実施形態では、符号化対象フレーム300と、参照候補フレーム301a〜301cとの時間的な距離のみに応じて、動きベクトルの探索精度を変化させるようにした。それに対して、本実施形態では、第1の実施形態と同様の構成を有するが、符号化対象フレーム300と、参照候補フレーム301a〜301cとの時間的な距離に加え、参照候補フレームの符号化タイプに応じて、動きベクトルの探索精度を変化させる。従って、以下の説明において第1の実施形態と異なる動作を行う探索精度決定部102以外の部分については、図1〜図5に付した符号と同一の符号を付す等して詳細な説明を省略する。なお、H.264等の符号化方式では、ピクチャよりも小さい、1つ以上のマクロブロックから成るスライス単位での符号化が可能なので、前記符号化タイプを“ピクチャタイプ”以外に、“スライスタイプ”と置き換えて解釈しても良い。なお、以下ではスライスタイプを例に説明する。
(Third embodiment)
Next, a third embodiment of the present invention will be described. In the first embodiment described above, the motion vector search accuracy is changed only in accordance with the temporal distance between the encoding target frame 300 and the reference candidate frames 301a to 301c. On the other hand, the present embodiment has the same configuration as that of the first embodiment, but in addition to the temporal distance between the encoding target frame 300 and the reference candidate frames 301a to 301c, the encoding of the reference candidate frame is performed. The motion vector search accuracy is changed according to the type. Accordingly, in the following description, portions other than the search accuracy determination unit 102 that performs an operation different from that of the first embodiment are denoted by the same reference numerals as in FIGS. To do. H. In an encoding method such as H.264, encoding in units of slices composed of one or more macroblocks smaller than a picture is possible. Therefore, the encoding type is replaced with “slice type” in addition to “picture type”. May be interpreted. Hereinafter, a slice type will be described as an example.

図9は、本実施形態に係る動きベクトル検出器12kの構成の一例を示すブロック図である。図10は、本実施形態に係る動きベクトル検出器12kの動作の一例について説明するフローチャートである。図10を参照しながら、図9に示す動きベクトル検出器12kの動作について説明する。   FIG. 9 is a block diagram showing an example of the configuration of the motion vector detector 12k according to this embodiment. FIG. 10 is a flowchart for explaining an example of the operation of the motion vector detector 12k according to the present embodiment. The operation of the motion vector detector 12k shown in FIG. 9 will be described with reference to FIG.

探索精度決定部102は、システム制御部14から、バスI/F12nを介して、符号化対象フレーム番号302、参照候補フレーム番号303、及び参照候補フレームのスライスタイプ901が指定されるまで待機する(ステップS1001)。   The search accuracy determination unit 102 waits until the encoding target frame number 302, the reference candidate frame number 303, and the slice type 901 of the reference candidate frame are specified from the system control unit 14 via the bus I / F 12n ( Step S1001).

ステップS1001において、符号化対象フレーム番号302、参照候補フレーム番号303、及び参照候補フレームのスライスタイプ901が指定される。すると、探索精度決定部102は、符号化対象フレーム300と、参照候補フレーム301との間の時間的な距離tdを演算する(ステップS1002)。探索精度決定部102は、演算されたtdに基づいて、第1の実施形態と同様に、符号化対象フレーム300と、参照候補フレーム301との時間的な距離に応じて探索精度を段階的に変化させる。さらに探索精度決定部102は、参照候補フレームのスライスタイプ901に応じて探索精度を変化させる。   In step S1001, the encoding target frame number 302, the reference candidate frame number 303, and the slice type 901 of the reference candidate frame are designated. Then, the search accuracy determination unit 102 calculates a temporal distance td between the encoding target frame 300 and the reference candidate frame 301 (step S1002). Based on the calculated td, the search accuracy determination unit 102 increases the search accuracy in steps according to the temporal distance between the encoding target frame 300 and the reference candidate frame 301, as in the first embodiment. Change. Further, the search accuracy determination unit 102 changes the search accuracy according to the slice type 901 of the reference candidate frame.

すなわち、探索精度決定部102は、参照候補フレームのスライスタイプ901がIスライスかどうかを判定する(ステップS1003)。参照候補フレームスライスタイプ901がIスライスであった場合(ステップS1003でYES)には、探索精度決定部102は、tdから2tを引く処理を行う(ステップS1004)。   In other words, the search accuracy determination unit 102 determines whether the slice type 901 of the reference candidate frame is an I slice (step S1003). If the reference candidate frame slice type 901 is an I slice (YES in step S1003), the search accuracy determination unit 102 performs a process of subtracting 2t from td (step S1004).

Iスライスは一般的に割り当てられる符号量が多く、画質の良い参照候補フレームである可能性が高い。そこで、探索精度決定部102は、Iスライスならば、時間的な距離が離れている場合であっても、このように2tを引くことで探索精度が高くなるようにする。参照候補フレームのスライスタイプ901がIスライスでない場合(ステップS1003でNO)には、ステップS1005へ進む。   An I slice generally has a large amount of code to be assigned, and is likely to be a reference candidate frame with good image quality. Therefore, the search accuracy determination unit 102 increases the search accuracy by subtracting 2t in this way, even if the temporal distance is long for an I slice. If the slice type 901 of the reference candidate frame is not an I slice (NO in step S1003), the process proceeds to step S1005.

続いて、探索精度決定部102は、参照候補フレームのスライスタイプ901がPスライスかどうかを判定する(ステップS1005)。参照候補フレームスライスタイプ901がPスライスであった場合(ステップS1005でYES)には、探索精度決定部102は、tdからtを引く処理を行う(ステップS1006)。PスライスはIスライスと比べると画質が劣るが、Bスライスよりは画質が良い場合が多い。そこで、探索精度決定部102は、Pスライスならば、時間的な距離が離れている場合であっても、Iスライスほど探索精度を高めないが、Bスライスよりは探索精度を高めるように、tを引くことで探索精度が高くなるようにする。   Subsequently, the search accuracy determination unit 102 determines whether or not the slice type 901 of the reference candidate frame is a P slice (step S1005). If the reference candidate frame slice type 901 is a P slice (YES in step S1005), the search accuracy determination unit 102 performs a process of subtracting t from td (step S1006). Although the image quality of the P slice is inferior to that of the I slice, the image quality is often better than that of the B slice. Therefore, the search accuracy determination unit 102 does not increase the search accuracy as much as the I slice, even if the temporal distance is long if it is a P slice, but increases the search accuracy over the B slice. The search accuracy is increased by subtracting.

参照候補フレームのスライスタイプがPスライスでない場合(ステップS1005でNO)には、ステップS1007へ進む。すなわち、参照候補フレームスライスタイプ901がI,P以外のBスライスであった場合には、探索精度決定部102は、探索精度を高めるような重み付け処理は行わずに、フレーム間の時間的な距離に応じてのみ探索精度を決定する。   If the slice type of the reference candidate frame is not a P slice (NO in step S1005), the process proceeds to step S1007. That is, when the reference candidate frame slice type 901 is a B slice other than I and P, the search accuracy determination unit 102 does not perform a weighting process that increases the search accuracy, and the temporal distance between frames. The search accuracy is determined only according to.

なお、従来のMPEGにおいてはH.264のBスライスとほぼ等価となるBピクチャは参照フレームに設定することが出来ないが、H.264においてはBスライスも参照フレームに設定することが可能であるため、参照候補フレームに加えることが可能である。   In the conventional MPEG, H.264 is used. A B picture that is almost equivalent to the H.264 B slice cannot be set as a reference frame. In H.264, B slices can also be set as reference frames, and therefore can be added to reference candidate frames.

以上のようにして求めたtdに応じて、探索精度決定部102は、動きベクトルの探索精度を変化させる(ステップS1007)。   In accordance with td obtained as described above, the search accuracy determination unit 102 changes the motion vector search accuracy (step S1007).

図11は、本実施形態に係る符号化対象フレームと参照候補フレームとの関係の一例を示した図である。図11に示した例の場合、符号化対象フレーム番号302が「3」の符号化対象フレーム300に対する、参照候補フレーム番号303が「2」の参照候補フレーム301cとの時間的な距離tdは「t」である。また、参照候補フレーム番号303が「1」の参照候補フレーム301bとの時間的な距離tdは「2t」である。また、参照候補フレーム番号303が「0」の参照候補フレーム301aとの時間的な距離tdは「3t」である。   FIG. 11 is a diagram illustrating an example of the relationship between the encoding target frame and the reference candidate frame according to the present embodiment. In the case of the example illustrated in FIG. 11, the temporal distance td between the encoding target frame 300 whose encoding target frame number 302 is “3” and the reference candidate frame 301 c whose reference candidate frame number 303 is “2” is “ t ”. Further, the temporal distance td from the reference candidate frame 301b whose reference candidate frame number 303 is “1” is “2t”. Further, the temporal distance td from the reference candidate frame 301a having the reference candidate frame number 303 of “0” is “3t”.

しかしながら参照候補フレーム301aはIスライスであるので2tを減じてtd=tと変更され、また参照候補フレーム301bはPスライスであるのでtを減じてtd=tと変更される。従って、図11に示した例の場合、参照候補フレーム301a、参照候補フレーム301b、及び参照候補フレーム301cのいずれも、td=tとなる。   However, since the reference candidate frame 301a is an I slice, 2t is subtracted and changed to td = t, and since the reference candidate frame 301b is a P slice, t is subtracted and changed to td = t. Therefore, in the example illustrated in FIG. 11, all of the reference candidate frame 301a, the reference candidate frame 301b, and the reference candidate frame 301c are td = t.

すなわち、本実施形態では、第1の実施形態の効果に加えて、参照候補フレームがIスライスならば、時間的にかなり離れたフレームであっても探索精度を直前のフレームと同等に高くすることができる。また参照候補フレームがPスライスならば、少々時間的に離れたフレームであっても探索精度を直前のフレームと同等に高くすることができる。なお、その際、探索回数の総数は第1の実施形態と変わらないようにする。   That is, in this embodiment, in addition to the effects of the first embodiment, if the reference candidate frame is an I slice, the search accuracy is made as high as that of the immediately preceding frame even if the frame is considerably separated in time. Can do. If the reference candidate frame is a P slice, the search accuracy can be made as high as that of the immediately preceding frame even if the reference candidate frame is a little apart in time. At that time, the total number of searches is made the same as in the first embodiment.

動きベクトルの探索精度が探索精度決定部102により決定されると、動きベクトル演算部103は、動きベクトル304を決定する(ステップS1008)。なお、動きベクトルを求める具体的な処理は第1の実施形態と同様のため説明を省略する。   When the search accuracy of the motion vector is determined by the search accuracy determination unit 102, the motion vector calculation unit 103 determines the motion vector 304 (step S1008). Note that the specific processing for obtaining the motion vector is the same as that in the first embodiment, and a description thereof will be omitted.

以上のように本実施形態では、符号化対象フレーム300と、参照候補フレーム301(301a〜301c)との時間的な距離に加え、参照候補フレーム301a〜301cのスライスタイプ901も考慮する。そして、最適な動きベクトルが見つかる確率に応じて、動きベクトルの探索精度を変化させる。   As described above, in the present embodiment, the slice type 901 of the reference candidate frames 301a to 301c is considered in addition to the temporal distance between the encoding target frame 300 and the reference candidate frames 301 (301a to 301c). Then, the motion vector search accuracy is changed according to the probability of finding the optimal motion vector.

従って、時間的に離れた画像についても動きベクトルの探索範囲とすることで、動きベクトルの検出精度を向上させられるとともに、且つ、動きベクトルの探索精度を変化させることによって、動きベクトルを検出する際の演算量を削減できる。さらに、参照候補フレームのスライスタイプ(ピクチャタイプ)を考慮することにより、動きベクトルの探索精度をより高めることができる。これにより、例えば、駆動するバッテリーの消費量が増大して撮影時間が短くなってしまうことを可及的に防止することができる。   Therefore, the motion vector search range can be improved even for images that are separated in time, and the motion vector detection accuracy can be improved, and the motion vector search accuracy can be changed to detect a motion vector. The amount of computation can be reduced. Furthermore, by considering the slice type (picture type) of the reference candidate frame, the motion vector search accuracy can be further improved. Thereby, for example, it is possible to prevent as much as possible that the consumption of the battery to be driven increases and the photographing time is shortened.

なお、本実施形態では、tdから減ずる値としてIスライスならば「2t」、Pスライスならば「t」を減じたが、これらの値は一例であって、数値が限定されるものではない。例えば、Iスライス時に「t」、Pスライス時に「0.5t」を減ずるように設定しても良い。   In this embodiment, “2t” is subtracted from td as a value to be subtracted from td, and “t” is subtracted from P slice. However, these values are merely examples, and the numerical values are not limited. For example, “t” may be set to be decreased at the time of I slice, and “0.5 t” may be decreased at the time of P slice.

また、本実施形態では、動きベクトルの探索精度を変化させたが、第2の実施形態のように符号化対象フレーム300の縮小率と、参照候補フレーム301a〜301cの縮小率を、参照候補フレームのスライスタイプ(ピクチャタイプ)に応じて変化させても良い。   In this embodiment, the search accuracy of the motion vector is changed. However, as in the second embodiment, the reduction rate of the encoding target frame 300 and the reduction rates of the reference candidate frames 301a to 301c are set as reference candidate frames. It may be changed according to the slice type (picture type).

(第4の実施形態)
次に、本発明の第4の実施形態について説明する。前述した第1の実施形態では、符号化対象フレーム300と、参照候補フレーム301a〜301cとの時間的な距離のみに応じて、動きベクトルの探索精度を変化させるようにした。それに対して、本実施形態では第1の実施形態と同様の構成を有するが、信号処理部12内にピーク信号対雑音比(PSNR:peak signal−to−noise ratio)演算部12oを有する。そして、符号化対象フレーム300と、参照候補フレーム301a〜301cとの時間的な距離に加え、参照候補フレームのPSNRに応じて、動きベクトルの探索精度を変化させる。従って、以下の説明において第1の実施形態と異なる動作を行う探索精度決定部102およびPSNR演算部12o以外の部分については、図1〜図5に付した符号と同一の符号を付す等して詳細な説明を省略する。
(Fourth embodiment)
Next, a fourth embodiment of the present invention will be described. In the first embodiment described above, the motion vector search accuracy is changed only in accordance with the temporal distance between the encoding target frame 300 and the reference candidate frames 301a to 301c. In contrast, the present embodiment has the same configuration as that of the first embodiment, but includes a peak signal-to-noise ratio (PSNR) calculation unit 12o in the signal processing unit 12. Then, in addition to the temporal distance between the encoding target frame 300 and the reference candidate frames 301a to 301c, the motion vector search accuracy is changed according to the PSNR of the reference candidate frame. Accordingly, in the following description, parts other than the search accuracy determination unit 102 and the PSNR calculation unit 12o that perform operations different from those of the first embodiment are denoted by the same reference numerals as those shown in FIGS. Detailed description is omitted.

図12は、本実施形態に係る信号処理部12の構成の一例を示すブロック図である。本実施形態では、信号処理部12のうち、第1の実施形態と構成の異なるPSNR演算部12oの動作についてのみ説明し、第1の実施形態と同じ動作を行う他の構成要素の説明については省略する。   FIG. 12 is a block diagram illustrating an example of the configuration of the signal processing unit 12 according to the present embodiment. In the present embodiment, only the operation of the PSNR calculation unit 12o having a configuration different from that of the first embodiment will be described in the signal processing unit 12, and the description of other components that perform the same operation as the first embodiment will be given. Omitted.

図12においてPSNR演算部12oは、撮像部11から入来する符号化前の画像データと、加算器12jから入来する復元画像データとを比較し、画像の劣化具合の指標となるピーク信号対雑音比(PSNR)の値を、以下の(12)式より算出する。   In FIG. 12, the PSNR calculation unit 12o compares the unencoded image data coming from the image pickup unit 11 with the restored image data coming from the adder 12j, and compares a pair of peak signals that serve as an index of image degradation. The value of the noise ratio (PSNR) is calculated from the following equation (12).

ここで、NおよびMはそれぞれ画像の縦と横の画素数を表す。また、p(i,j)は符号化前の画像データにおける位置(i,j)の画素値を表し、p’(i,j)は復元画像データにおける位置(i,j)の画素値を表す。Tは、画像の階調数−1(8ビット/ピクセル画像ではT=255)を表す。   Here, N and M represent the number of vertical and horizontal pixels of the image, respectively. P (i, j) represents the pixel value at the position (i, j) in the image data before encoding, and p ′ (i, j) represents the pixel value at the position (i, j) in the restored image data. Represent. T represents the number of gradations of an image minus 1 (T = 255 for an 8-bit / pixel image).

PSNR演算部12oによって求められたPSNRの値は、図12における動きベクトル検出器12kに送信され、動きベクトルの探索精度を変化させるために使用される。   The PSNR value obtained by the PSNR calculation unit 12o is transmitted to the motion vector detector 12k in FIG. 12, and is used to change the motion vector search accuracy.

図13は、本実施形態に係る動きベクトル検出器12kの構成を示すブロック図である。また、図14は、本実施形態に係る動きベクトル検出器12kの動作の一例について説明するフローチャートである。図14を参照しながら、図13に示す動きベクトル検出器12kの動作について説明する。   FIG. 13 is a block diagram showing the configuration of the motion vector detector 12k according to this embodiment. FIG. 14 is a flowchart illustrating an example of the operation of the motion vector detector 12k according to this embodiment. The operation of the motion vector detector 12k shown in FIG. 13 will be described with reference to FIG.

探索精度決定部102は、システム制御部14から、バスI/F12nを介して、符号化対象フレーム番号302、参照候補フレーム番号303、及び参照候補フレームのPSNRの値1301が指定されるまで待機する(ステップS1401)。   The search accuracy determination unit 102 waits until the encoding target frame number 302, the reference candidate frame number 303, and the PSNR value 1301 of the reference candidate frame are specified from the system control unit 14 via the bus I / F 12n. (Step S1401).

ステップS1401において、符号化対象フレーム番号302、参照候補フレーム番号303、及び参照候補フレームのPSNR1301が指定される。すると、探索精度決定部102は、符号化対象フレーム300と、参照候補フレーム301との間の時間的な距離tdを演算する(ステップS1402)。探索精度決定部102は、演算されたtdに基づいて、第1の実施形態と同様に、符号化対象フレーム300と、参照候補フレーム301との時間的な距離に応じて探索精度を段階的に変化させる。さらに、探索精度決定部102は、参照候補フレームのPSNR1301に応じて探索精度を変化させる。   In step S1401, the encoding target frame number 302, the reference candidate frame number 303, and the PSNR 1301 of the reference candidate frame are designated. Then, the search accuracy determination unit 102 calculates a temporal distance td between the encoding target frame 300 and the reference candidate frame 301 (step S1402). Based on the calculated td, the search accuracy determination unit 102 increases the search accuracy in steps according to the temporal distance between the encoding target frame 300 and the reference candidate frame 301, as in the first embodiment. Change. Further, the search accuracy determination unit 102 changes the search accuracy according to the PSNR 1301 of the reference candidate frame.

すなわち、探索精度決定部102は、参照候補フレームのPSNR1301が所定の閾値Th1よりも大きいかどうかを判定する(ステップS1403)。参照候補フレームのPSNR1301が所定の閾値Th1より大きい場合、すなわちPSNR>Th1を満たす場合(ステップS1403でYES)には、探索精度決定部102は、tdからtを引く処理を行う(ステップS1404)。   That is, the search accuracy determination unit 102 determines whether or not the PSNR 1301 of the reference candidate frame is larger than the predetermined threshold Th1 (step S1403). When the PSNR 1301 of the reference candidate frame is larger than the predetermined threshold Th1, that is, when PSNR> Th1 is satisfied (YES in step S1403), the search accuracy determination unit 102 performs a process of subtracting t from td (step S1404).

一般的にPSNRが高い場合には参照候補フレームの劣化が少なく、参照フレームとして適切である可能性が高い。そこで、探索精度決定部102は、PSNR>Th1を満たすならば、フレーム間の時間的な距離が離れている場合であっても、このようにtを引くことで探索精度が高くなるようにする。   In general, when the PSNR is high, there is little deterioration of the reference candidate frame, and there is a high possibility that it is suitable as a reference frame. Therefore, if PSNR> Th1 is satisfied, the search accuracy determination unit 102 increases the search accuracy by subtracting t in this way even when the temporal distance between frames is long. .

前記閾値Th1は、例えばSD(Standard Definition)で画質の実用レベルと言われる30(dB)等の固定値に設定できる。もしほとんどの復元画像のPSNRが30(dB)に満たない場合を考慮するならば、復元画像のPSNRの平均値を随時更新しながら求める可変閾値として用いても良い。参照候補フレームのPSNR1301が、PSNR>Th1を満たさない場合(ステップS1403でNO)には、ステップS1405へ進む。   The threshold value Th1 can be set to a fixed value such as 30 (dB), which is said to be a practical image quality level in SD (Standard Definition), for example. If the case where the PSNR of most restored images is less than 30 (dB) is taken into consideration, the average value of the PSNR of the restored images may be used as a variable threshold obtained while being updated as needed. If the PSNR 1301 of the reference candidate frame does not satisfy PSNR> Th1 (NO in step S1403), the process proceeds to step S1405.

続いて、探索精度決定部102は、参照候補フレームのPSNR1301が所定の閾値Th2(但し、Th2<Th1)よりも小さいかどうかを判定する(ステップS1405)。参照候補フレームのPSNR1301が所定の閾値Th2より小さい場合、すなわちPSNR<Th2を満たす場合(ステップS1405でYES)には、探索精度決定部102は、tdにtを加える処理を行う(ステップS1406)。閾値Th2の設定については、閾値Th1のときと同様である。   Subsequently, the search accuracy determination unit 102 determines whether the PSNR 1301 of the reference candidate frame is smaller than a predetermined threshold Th2 (where Th2 <Th1) (step S1405). When the PSNR 1301 of the reference candidate frame is smaller than the predetermined threshold Th2, that is, when PSNR <Th2 is satisfied (YES in step S1405), the search accuracy determination unit 102 performs a process of adding t to td (step S1406). The setting of the threshold Th2 is the same as that for the threshold Th1.

一般的にPSNRが低い場合には参照候補フレームの劣化が大きく、参照フレームとして不適切である可能性が高い。そこで、探索精度決定部102は、PSNR<Th2を満たすならば、フレーム間の時間的な距離が近い場合であっても、このようにtを加えることで探索精度が低くなるようにする。   In general, when the PSNR is low, the deterioration of the reference candidate frame is large, and it is highly possible that the reference frame is inappropriate. Therefore, if PSNR <Th2 is satisfied, the search accuracy determination unit 102 decreases the search accuracy by adding t in this way even when the temporal distance between frames is short.

参照候補フレームのPSNR1301が、PSNR<Th2を満たさない場合(ステップS1405でNO)には、ステップS1407へ進む。すなわち、PSNRが高くも低くもない中間状態にある場合には、探索精度決定部102は、フレーム間の時間的な距離に応じてのみ探索精度を決定する。   If the PSNR 1301 of the reference candidate frame does not satisfy PSNR <Th2 (NO in step S1405), the process proceeds to step S1407. That is, when the PSNR is in an intermediate state that is neither high nor low, the search accuracy determination unit 102 determines the search accuracy only according to the temporal distance between frames.

以上のようにして求めたtdに応じて、探索精度決定部102は、動きベクトルの探索精度を変化させる(ステップS1407)。   In accordance with td obtained as described above, the search accuracy determination unit 102 changes the motion vector search accuracy (step S1407).

このように、本実施形態では、第1の実施形態の効果に加えて、参照候補フレームのPSNRが大きい値ならば、時間的に離れたフレームであっても探索精度を高くすることができる。また参照候補フレームのPSNRが小さい値ならば、時間的に近いフレームであっても探索精度を低くすることができる。   Thus, in this embodiment, in addition to the effects of the first embodiment, if the PSNR of the reference candidate frame is a large value, the search accuracy can be increased even for frames that are separated in time. If the PSNR of the reference candidate frame is a small value, the search accuracy can be lowered even for frames that are close in time.

動きベクトルの探索精度が探索精度決定部102により決定されると、動きベクトル演算部103は、動きベクトル304を決定する(ステップS1408)。なお、動きベクトルを求める具体的な処理は第1の実施形態と同様のため説明を省略する。   When the search accuracy of the motion vector is determined by the search accuracy determination unit 102, the motion vector calculation unit 103 determines the motion vector 304 (step S1408). Note that the specific processing for obtaining the motion vector is the same as that in the first embodiment, and a description thereof will be omitted.

以上のように本実施形態では、符号化対象フレーム300と、参照候補フレーム301(301a〜301c)との時間的な距離に加え、参照候補フレーム301a〜301cのPSNR値1301も考慮する。そして、最適な動きベクトルが見つかる確率に応じて、動きベクトルの探索精度を変化させる。   As described above, in the present embodiment, in addition to the temporal distance between the encoding target frame 300 and the reference candidate frames 301 (301a to 301c), the PSNR value 1301 of the reference candidate frames 301a to 301c is also considered. Then, the motion vector search accuracy is changed according to the probability of finding the optimal motion vector.

従って、時間的に離れた画像についても動きベクトルの探索範囲とすることで、動きベクトルの検出精度を向上させられるとともに、且つ、動きベクトルの探索精度を変化させることによって、動きベクトルを検出する際の演算量を削減できる。さらに、参照候補フレームのPSNR値を考慮することにより、動きベクトルの探索精度をより高め、かつ、より効率的に演算を削減することができる。これにより、例えば、駆動するバッテリーの消費量が増大して撮影時間が短くなってしまうことを可及的に防止することができる。   Therefore, the motion vector search range can be improved even for images that are separated in time, and the motion vector detection accuracy can be improved, and the motion vector search accuracy can be changed to detect a motion vector. The amount of computation can be reduced. Furthermore, by considering the PSNR value of the reference candidate frame, the motion vector search accuracy can be further improved and the calculation can be reduced more efficiently. Thereby, for example, it is possible to prevent as much as possible that the consumption of the battery to be driven increases and the photographing time is shortened.

なお、本実施形態では、PSNRが高い場合にtdから減ずる値として「t」を減じたが、これらの値は一例であって数値が限定されるものではない。例えば、「0.5t」を減ずるように設定しても良い。   In the present embodiment, “t” is subtracted as a value to be subtracted from td when the PSNR is high. However, these values are merely examples and the numerical values are not limited. For example, you may set so that "0.5t" may be reduced.

さらに、本実施形態ではPSNR値に応じてtdに補正をかけて、探索精度を決定(変更)したが、別の方法として、tdに応じてPSNR値自体に補正をかけてもよい。この場合には、補正後のPSNRによって探索精度を決定しても良い。   Furthermore, in the present embodiment, td is corrected according to the PSNR value and the search accuracy is determined (changed), but as another method, the PSNR value itself may be corrected according to td. In this case, the search accuracy may be determined based on the corrected PSNR.

つまり、tdが大きく、参照候補フレームまでの時間的距離が大きい場合には、探索精度決定部102は、PSNRから大きな値を引くような補正をかける。また、tdが小さく、参照候補フレームまでの時間的距離が小さい場合には、探索精度決定部102は、PSNRに補正をかけない等を行う。そして、探索精度決定部102は、補正後のPSNRが大きいときは、探索精度を高くし、小さいときは探索精度を低くするように決定する。   That is, when td is large and the temporal distance to the reference candidate frame is large, the search accuracy determination unit 102 performs correction so as to subtract a large value from the PSNR. When td is small and the temporal distance to the reference candidate frame is small, the search accuracy determination unit 102 performs, for example, no correction on the PSNR. Then, the search accuracy determination unit 102 determines to increase the search accuracy when the corrected PSNR is large and to decrease the search accuracy when the PSNR after correction is small.

また、本実施形態では、動きベクトルの探索精度を変化させたが、第2の実施形態のように、符号化対象フレーム300の画像の縮小率と、参照候補フレーム301a〜301cの画像の縮小率を、参照候補フレームのPSNRに応じて変化させても良い。   In the present embodiment, the search accuracy of the motion vector is changed. However, as in the second embodiment, the image reduction rate of the encoding target frame 300 and the image reduction rates of the reference candidate frames 301a to 301c. May be changed according to the PSNR of the reference candidate frame.

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

また、この場合、前記ソフトウェアのプログラムコード自体が前述した実施形態の機能を実現することになる。また、そのプログラムコード自体、及びそのプログラムコードをコンピュータに供給するための手段、例えば、かかるプログラムコードを格納した記録媒体は本発明を構成する。かかるプログラムコードを記憶する記録媒体としては、例えばフレキシブルディスク、ハードディスク、光ディスク、光磁気ディスク、CD−ROM、磁気テープ、不揮発性のメモリカード、ROM等を用いることができる。   In this case, the program code of the software itself realizes the functions of the above-described embodiment. The program code itself and means for supplying the program code to a computer, for example, a recording medium storing the program code constitute 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.

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

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

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

なお、前述した各実施形態は、何れも本発明を実施するにあたっての具体化の例を示したものに過ぎず、これらによって本発明の技術的範囲が限定的に解釈されてはならないものである。すなわち、本発明はその技術思想、またはその主要な特徴から逸脱することなく、様々な形で実施することができる。   Note that each of the above-described embodiments is merely a specific example for carrying out the present invention, and the technical scope of the present invention should not be construed as being limited thereto. . That is, the present invention can be implemented in various forms without departing from the technical idea or the main features thereof.

11 撮像部
12 信号処理部
13 記録部
14 システム制御部
15 表示部
16 操作部
17 バス
12k 動きベクトル検出器
100 符号化対象フレーム保存部
101 参照候補フレーム保存部
102 探索精度決定部
103 動きベクトル演算部
300 符号化対象フレーム
301 参照候補フレーム
302 符号化対象フレーム番号
303 参照候補フレーム番号
304 動きベクトル
402 縮小率決定部
404 縮小フレーム作成部
405 縮小符号化対象フレーム保存部
406 縮小参照候補フレーム保存部
407 動きベクトル演算部
408 動きベクトル
901 参照候補フレーム
1301 参照候補フレームのPSNR
DESCRIPTION OF SYMBOLS 11 Image pick-up part 12 Signal processing part 13 Recording part 14 System control part 15 Display part 16 Operation part 17 Bus 12k Motion vector detector 100 Encoding object frame preservation | save part 101 Reference candidate frame preservation | save part 102 Search accuracy determination part 103 Motion vector calculation part 300 encoding target frame 301 reference candidate frame 302 encoding target frame number 303 reference candidate frame number 304 motion vector 402 reduction rate determination unit 404 reduced frame creation unit 405 reduced encoding target frame storage unit 406 reduced reference candidate frame storage unit 407 motion Vector calculation unit 408 motion vector 901 reference candidate frame 1301 PSNR of reference candidate frame

Claims (7)

画面間の動きベクトルを検出する動きベクトル検出装置であって、
符号化対象画像と、前記符号化対象画像によって参照される参照画像の候補である複数の候補画像のそれぞれとの間の時間的な距離を演算する演算手段と、
前記符号化対象画像と、前記複数の候補画像のそれぞれとの間で動きベクトルを探索し、探索した結果に基づいて動きベクトルを検出する動きベクトル検出手段とを有し、
前記符号化対象画像と、前記複数の候補画像のそれぞれとの間で動きベクトルを探索する際に、前記動きベクトル検出手段は、前記演算手段が演算した各候補画像に対する時間的な距離と前記各候補画像のピーク信号対雑音比(PSNR)の値とに応じて実行する演算の量を変更することを特徴とする動きベクトル検出装置。
A motion vector detection device for detecting a motion vector between screens,
A computing means for computing a temporal distance between the encoding target image and each of a plurality of candidate images that are candidates for a reference image referred to by the encoding target image;
A motion vector detecting means for searching for a motion vector between the encoding target image and each of the plurality of candidate images, and detecting a motion vector based on the search result;
When searching for a motion vector between the encoding target image and each of the plurality of candidate images, the motion vector detection means includes a temporal distance to each candidate image calculated by the calculation means, A motion vector detection apparatus characterized in that the amount of calculation to be executed is changed according to a peak signal-to-noise ratio (PSNR) value of a candidate image.
前記符号化対象画像と、前記複数の候補画像のそれぞれとの間における動きベクトルの探索精度を、前記演算手段により演算された前記各候補画像に対する時間的な距離と前記各候補画像のPSNRの値とに応じて決定する決定手段をさらに有し、
前記動きベクトル検出手段は、前記符号化対象画像と前記複数の候補画像のそれぞれとの間における動きベクトルの探索を、前記決定手段により決定された探索精度で実行することを特徴とする請求項1に記載の動きベクトル検出装置。
The motion vector search accuracy between the encoding target image and each of the plurality of candidate images is determined by calculating the temporal distance with respect to each candidate image calculated by the calculation means and the PSNR value of each candidate image. And determining means for determining according to
2. The motion vector detection unit performs a motion vector search between the encoding target image and each of the plurality of candidate images with a search accuracy determined by the determination unit. The motion vector detection device described in 1.
前記決定手段は、前記演算手段により演算された前記各候補画像に対する時間的な距離が短いほど、前記動きベクトルの探索精度を高くし、前記演算手段により演算された前記各候補画像に対する時間的な距離が長いほど、前記動きベクトルの探索精度を低くすることを特徴とする請求項2に記載の動きベクトル検出装置。   The determination means increases the search accuracy of the motion vector as the temporal distance to each candidate image calculated by the calculation means is shorter, and the temporal determination for each candidate image calculated by the calculation means The motion vector detection apparatus according to claim 2, wherein the search accuracy of the motion vector is lowered as the distance is longer. 前記決定手段は、前記候補画像のPSNRの値が所定の閾値Th1よりも大きいときは、前記動きベクトルの探索精度を高くすることを特徴とする請求項3に記載の動きベクトル検出装置。 4. The motion vector detection apparatus according to claim 3, wherein the determination unit increases the search accuracy of the motion vector when the PSNR value of the candidate image is larger than a predetermined threshold Th1 . 前記決定手段は、前記候補画像のPSNRの値が所定の閾値Th2よりも小さいときは、前記動きベクトルの探索精度を低くすることを特徴とする請求項3に記載の動きベクトル検出装置。4. The motion vector detection device according to claim 3, wherein the determination unit reduces the search accuracy of the motion vector when the PSNR value of the candidate image is smaller than a predetermined threshold Th2. 前記決定手段は、前記候補画像のPSNRの値が所定の閾値Th1よりも大きいときは、前記動きベクトルの探索精度を高くし、前記候補画像のPSNRの値が所定の閾値Th2よりも小さいときは、前記動きベクトルの探索精度を低くすることを特徴とする請求項3に記載の動きベクトル検出装置。The determination means increases the search accuracy of the motion vector when the PSNR value of the candidate image is larger than a predetermined threshold Th1, and when the PSNR value of the candidate image is smaller than the predetermined threshold Th2. The motion vector detection apparatus according to claim 3, wherein search accuracy of the motion vector is lowered. 画面間の動きベクトルを検出する動きベクトル検出方法であって、A motion vector detection method for detecting a motion vector between screens,
符号化対象画像と、前記符号化対象画像によって参照される参照画像の候補である複数の候補画像のそれぞれとの間の時間的な距離を演算する演算工程と、A calculation step of calculating a temporal distance between the encoding target image and each of a plurality of candidate images that are candidates for the reference image referred to by the encoding target image;
前記符号化対象画像と、前記複数の候補画像のそれぞれとの間で動きベクトルを探索し、探索した結果に基づいて動きベクトルを検出する動きベクトル検出工程とを有し、A motion vector detection step of searching for a motion vector between the encoding target image and each of the plurality of candidate images, and detecting a motion vector based on the search result;
前記符号化対象画像と、前記複数の候補画像のそれぞれとの間で動きベクトルを探索する際に、前記動きベクトル検出工程で実行する演算の量が、前記演算工程で演算された各候補画像に対する時間的な距離と前記各候補画像のピーク信号対雑音比(PSNR)の値とに応じて変更されることを特徴とする動きベクトル検出方法。When searching for a motion vector between the encoding target image and each of the plurality of candidate images, the amount of calculation executed in the motion vector detection step is for each candidate image calculated in the calculation step. A motion vector detection method, wherein the method is changed according to a temporal distance and a peak signal-to-noise ratio (PSNR) value of each candidate image.
JP2011171130A 2006-08-08 2011-08-04 Motion vector detection apparatus and motion vector detection method Expired - Fee Related JP5328854B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011171130A JP5328854B2 (en) 2006-08-08 2011-08-04 Motion vector detection apparatus and motion vector detection method

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2006215966 2006-08-08
JP2006215966 2006-08-08
JP2011171130A JP5328854B2 (en) 2006-08-08 2011-08-04 Motion vector detection apparatus and motion vector detection method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2007167461A Division JP4804423B2 (en) 2006-08-08 2007-06-26 Motion vector detection apparatus and motion vector detection method

Publications (2)

Publication Number Publication Date
JP2011217421A JP2011217421A (en) 2011-10-27
JP5328854B2 true JP5328854B2 (en) 2013-10-30

Family

ID=39085873

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011171130A Expired - Fee Related JP5328854B2 (en) 2006-08-08 2011-08-04 Motion vector detection apparatus and motion vector detection method

Country Status (2)

Country Link
JP (1) JP5328854B2 (en)
CN (1) CN100576919C (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101686393B (en) * 2008-09-28 2012-10-17 华为技术有限公司 Fast-motion searching method and fast-motion searching device applied to template matching
GB2487200A (en) 2011-01-12 2012-07-18 Canon Kk Video encoding and decoding with improved error resilience
CN102651814B (en) * 2011-02-25 2015-11-25 华为技术有限公司 Video encoding/decoding method, coding method and terminal
GB2491589B (en) 2011-06-06 2015-12-16 Canon Kk Method and device for encoding a sequence of images and method and device for decoding a sequence of image
EP2725800A4 (en) * 2011-06-27 2015-02-18 Samsung Electronics Co Ltd Method and apparatus for encoding motion information, and method and apparatus for decoding same
KR102083012B1 (en) * 2011-06-28 2020-02-28 엘지전자 주식회사 Method for setting motion vector list and apparatus using same
BR122015001004B1 (en) * 2011-06-30 2022-07-26 Sony Corporation IMAGE PROCESSING DEVICE AND METHOD
US8942288B2 (en) * 2011-11-02 2015-01-27 Tagivan Ii Llc Moving picture coding method, moving picture coding apparatus, moving picture decoding method, and moving picture decoding apparatus
KR20130050403A (en) * 2011-11-07 2013-05-16 오수미 Method for generating rrconstructed block in inter prediction mode
EP3965425A3 (en) * 2011-12-23 2022-06-08 Electronics And Telecommunications Research Institute Method and apparatus for setting reference picture index of temporal merging candidate
KR101313525B1 (en) * 2012-02-22 2013-10-14 (주)베라시스 Method and system for improving performance of intelligent surveill system using psnr
JP6336341B2 (en) * 2014-06-24 2018-06-06 キヤノン株式会社 Imaging apparatus, control method therefor, program, and storage medium
KR102559063B1 (en) 2017-02-24 2023-07-24 주식회사 케이티 Method and apparatus for processing a video signal
CN107483949A (en) * 2017-07-26 2017-12-15 千目聚云数码科技(上海)有限公司 Increase the method and system of SVAC SVC practicality

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR960010198B1 (en) * 1993-07-21 1996-07-26 배순훈 Motion estimation apparatus and method for moving image encoder
US6614846B1 (en) * 1996-12-06 2003-09-02 Matsushita Electric Industrial Co., Ltd. Method and apparatus for transmitting, encoding and decoding video signal and recording/reproducing method of optical disc
JP2000308064A (en) * 1999-04-22 2000-11-02 Mitsubishi Electric Corp Motion vector detecting device
JP2003143609A (en) * 2001-08-21 2003-05-16 Canon Inc Image processing apparatus, image processing method, recording medium, and program
JP2003230150A (en) * 2002-02-06 2003-08-15 Nippon Telegr & Teleph Corp <Ntt> Method for coding dynamic image, program thereof, and recording medium recording this program
JP4591657B2 (en) * 2003-12-22 2010-12-01 キヤノン株式会社 Moving picture encoding apparatus, control method therefor, and program
JP2006074474A (en) * 2004-09-02 2006-03-16 Toshiba Corp Moving image encoder, encoding method, and encoding program
JP2006295528A (en) * 2005-04-11 2006-10-26 Pioneer Electronic Corp Image signal processing method

Also Published As

Publication number Publication date
CN100576919C (en) 2009-12-30
CN101123728A (en) 2008-02-13
JP2011217421A (en) 2011-10-27

Similar Documents

Publication Publication Date Title
JP5328854B2 (en) Motion vector detection apparatus and motion vector detection method
JP4804423B2 (en) Motion vector detection apparatus and motion vector detection method
RU2310231C2 (en) Space-time prediction for bi-directional predictable (b) images and method for prediction of movement vector to compensate movement of multiple images by means of a standard
US8472525B2 (en) Method and apparatus for encoding/decoding motion vector
US8428136B2 (en) Dynamic image encoding method and device and program using the same
JP5173409B2 (en) Encoding device and moving image recording system provided with encoding device
JP4527677B2 (en) Moving picture coding method, moving picture coding apparatus, moving picture coding program
JP2007067731A (en) Coding method
US8514935B2 (en) Image coding apparatus, image coding method, integrated circuit, and camera
JP6149707B2 (en) Moving picture coding apparatus, moving picture coding method, moving picture coding program, and moving picture photographing apparatus
KR20070057212A (en) Encoder, encoding method, program of encoding method and recording medium wherein program of encoding method is recorded
JP2008227670A (en) Image coding device
US20120008685A1 (en) Image coding device and image coding method
US20070171977A1 (en) Moving picture coding method and moving picture coding device
WO2012098845A1 (en) Image encoding method, image encoding device, image decoding method, and image decoding device
JP2010063092A (en) Image coding apparatus, image coding method, image coding integrated circuit and camera
JP5441812B2 (en) Video encoding apparatus and control method thereof
US20080063065A1 (en) Fast Motion Estimation for Multiple Reference Pictures
JP2007228560A (en) Moving picture coding method and moving picture coding device
JP2005303994A (en) Moving image coding device
JP5322956B2 (en) Image coding apparatus and image coding method
JP4561701B2 (en) Video encoding device
JP2008099175A (en) Video coder, and video coding method
JP6016484B2 (en) Encoder
JP2008028882A (en) Moving image encoding apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110804

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130617

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130723

LAPS Cancellation because of no payment of annual fees