JP6612721B2 - Predictive image generation method, predictive image generation apparatus, and computer program - Google Patents

Predictive image generation method, predictive image generation apparatus, and computer program Download PDF

Info

Publication number
JP6612721B2
JP6612721B2 JP2016235392A JP2016235392A JP6612721B2 JP 6612721 B2 JP6612721 B2 JP 6612721B2 JP 2016235392 A JP2016235392 A JP 2016235392A JP 2016235392 A JP2016235392 A JP 2016235392A JP 6612721 B2 JP6612721 B2 JP 6612721B2
Authority
JP
Japan
Prior art keywords
block
prediction
processing unit
search range
motion vector
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.)
Active
Application number
JP2016235392A
Other languages
Japanese (ja)
Other versions
JP2018093374A (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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2016235392A priority Critical patent/JP6612721B2/en
Publication of JP2018093374A publication Critical patent/JP2018093374A/en
Application granted granted Critical
Publication of JP6612721B2 publication Critical patent/JP6612721B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Description

本発明は、予測画像生成方法、予測画像生成装置及びコンピュータプログラムに関する。   The present invention relates to a predicted image generation method, a predicted image generation apparatus, and a computer program.

動画像符号化における重要な要素技術の一つとして、動き補償フレーム間予測(以下、MC(Motion Compensation)予測ともいう) がある。動き補償フレーム間予測は、異なる画面間で予測を実行する面間予測を伴う動画符号化方式であり、すでに復号されたフレームを参照して、予測誤差エネルギーを最小にするように動きベクトルと残差信号を求める。この残差信号に対して直交変換と量子化を施し、さらに、エントロピー符号化を行うことにより、符号化データを生成する。この方式において、符号化効率を高めるためには予測誤差エネルギーの低減が不可欠であり、高精度の予測方式が要求される。   One of important elemental techniques in moving picture coding is motion compensation interframe prediction (hereinafter also referred to as MC (Motion Compensation) prediction). Motion-compensated interframe prediction is a moving picture coding method with inter-frame prediction that performs prediction between different screens, and refers to a frame that has already been decoded, and motion vectors and residuals are minimized so as to minimize prediction error energy. Find the difference signal. The residual signal is subjected to orthogonal transformation and quantization, and further entropy encoded to generate encoded data. In this method, in order to increase the coding efficiency, it is essential to reduce the prediction error energy, and a highly accurate prediction method is required.

MC予測では、次式(1)で示される符号化対象画像フレームf(p)をいくつかの領域に分割する。 In MC prediction, an encoding target image frame f t (p) represented by the following equation (1) is divided into several regions.

Figure 0006612721
Figure 0006612721

分割した領域ごとに動き補償(MC)を用いた次式(2)で示されるようなフレーム間予測が行われる。   Inter-frame prediction as shown by the following equation (2) using motion compensation (MC) is performed for each divided region.

Figure 0006612721
Figure 0006612721

式(2)において、領域Bは、第i番目の領域であり、ベクトルvは、次式(3)を満たす動きベクトルである。 In the equation (2), the region B i is the i-th region, and the vector v i is a motion vector that satisfies the following equation (3).

Figure 0006612721
Figure 0006612721

式(3)において領域Rは、領域Bに対応する探索領域であり、r(v)(ただし、vはベクトル)は、動きベクトルvの符号量の推定値である。例えば、r(v)として、r(v)=|v|が適用される。式(3)において、次式(4)の部分は、次に続く値を最小化するベクトルvを求めることを意味する。 Region R in the formula (3), a search region corresponding to the region B i, r (v) (Here, v is a vector) is an estimate of the amount of codes of the motion vectors v. For example, r (v) = | v | is applied as r (v). In equation (3), the part of the following equation (4) means obtaining a vector v that minimizes the next value.

Figure 0006612721
Figure 0006612721

式(3)においては、符号化対象画像フレームと動きベクトルが適用された1フレーム前の符号化対象画像フレームの予測誤差の絶対値和(SAD:Sum of Absolute Difference)と動きベクトルの符号量の推定値の加重和を最小化するベクトルvが動きベクトルvとして求められることになる。 In Equation (3), the sum of absolute values (SAD: Sum of Absolute Difference) of the prediction error and the amount of code of the motion vector of the encoding target image frame and the previous encoding target image frame to which the motion vector is applied. vector v that minimizes the weighted sum of the estimated value will be is determined as a motion vector v i.

前述の通り、MC予測は、領域を分割したブロックを単位とした予測処理であり、MC予測の対象とするブロックを、MC予測ブロックといい、MC予測ブロックごとに動きベクトルが検出されて対応付けられる。しかしながら、MC予測ブロック内の画素それぞれの動きベクトルは、必ずしも同一になるとは限らないため誤差が発生する。この誤差を、MC予測誤差という。MC予測ブロックサイズを小さく設定することにより、MC予測誤差を低減させることはできるが、MC予測ブロックサイズを縮小させることは、付加情報を増加させることになる。このように、MC予測誤差の低減とMC予測における付加情報の低減は、トレードオフの関係にある。   As described above, MC prediction is prediction processing in units of blocks obtained by dividing an area, and a block to be subjected to MC prediction is called an MC prediction block, and a motion vector is detected and associated for each MC prediction block. It is done. However, an error occurs because the motion vectors of the pixels in the MC prediction block are not necessarily the same. This error is called MC prediction error. Although the MC prediction error can be reduced by setting the MC predicted block size small, reducing the MC predicted block size increases the additional information. Thus, the reduction of MC prediction error and the reduction of additional information in MC prediction are in a trade-off relationship.

これに対して、付加情報なしで画素ごとのオプティカルフロー(以下、OF(Optical Flowともいう))をデコーダ側で算出し、算出したオプティカルフローに基づき、MC予測ブロック内の動きベクトルを補正する処理が提案されている。例えば、FRAUC(Frame rate up-conversion mode)におけるBIO(Bi-directional optical flow)などの補正手法がある(例えば、非特許文献1参照)。   On the other hand, an optical flow for each pixel (hereinafter also referred to as OF (Optical Flow)) is calculated on the decoder side without additional information, and the motion vector in the MC prediction block is corrected based on the calculated optical flow. Has been proposed. For example, there is a correction method such as BIO (Bi-directional optical flow) in FRAUC (Frame rate up-conversion mode) (for example, see Non-Patent Document 1).

この補正を式で示すと、動きベクトルをvとした場合、画素pに対して動きベクトルvを適用することを示す次式(5)が、当該補正により次式(6)となる。   When this correction is expressed by an equation, when the motion vector is v, the following equation (5) indicating that the motion vector v is applied to the pixel p becomes the following equation (6) by the correction.

Figure 0006612721
Figure 0006612721

Figure 0006612721
Figure 0006612721

この処理をOF補正といい、ベクトルδ(p)が算出したオプティカルフローであり、以下、OF補正ベクトルという。OF補正により、MC予測の予測信号は、次式(7)で示されることになる。   This process is called OF correction, which is an optical flow calculated by the vector δ (p), and is hereinafter referred to as an OF correction vector. By the OF correction, the prediction signal for MC prediction is expressed by the following equation (7).

Figure 0006612721
Figure 0006612721

このとき、OF補正ベクトルδ(p)は、次式(8)によって求められる。   At this time, the OF correction vector δ (p) is obtained by the following equation (8).

Figure 0006612721
Figure 0006612721

式(8)において、領域Ωは、補正ベクトルδの探索範囲であり、予め固定領域として与えられる。領域Ψは、補正ベクトルδの探索対象となるpを含むブロックであり、予め固定サイズのブロックとして与えられる。また、式(8)に示すように、OF補正ベクトルδ(p)は、符号化対象画像フレームf(p)の前後のフレームを補正したft+1(p+δ)とft−1(p+δ)とにより求められる。 In Expression (8), the region Ω is a search range for the correction vector δ, and is given as a fixed region in advance. The region Ψ is a block including p that is a search target of the correction vector δ, and is given as a fixed-size block in advance. Further, as shown in Expression (8), the OF correction vector δ (p) is obtained by correcting f t + 1 (p + δ) and f t−1 (p + δ) obtained by correcting the frames before and after the encoding target image frame f t (p). It is calculated by.

“Further improvements to HMKTA-1.0”,VCEG-AZ07, ITU - Telecommunications Standardization Sector, STUDY GROUP 16 Question 6, Video Coding Experts Group (VCEG), June 2015.“Further improvements to HMKTA-1.0”, VCEG-AZ07, ITU-Telecommunications Standardization Sector, STUDY GROUP 16 Question 6, Video Coding Experts Group (VCEG), June 2015.

しかしながら、上記の手法では、エンコーダのみならず、デコーダにおいても演算量が増加するため、計算機リソースの限られた映像端末装置ではリアルタイム再生に対応することができないという問題があった。   However, in the above method, since the amount of calculation increases not only in the encoder but also in the decoder, there is a problem that the video terminal device with limited computer resources cannot support real-time reproduction.

上記事情に鑑み、本発明は、演算量を低減することができる技術の提供を目的としている。   In view of the above circumstances, an object of the present invention is to provide a technique capable of reducing the amount of calculation.

本発明の一態様は、動画像データにおける符号化対象画像フレームを分割したブロック単位に動き補償フレーム間予測を行う予測画像生成方法であって、前記符号化対象画像フレームのブロックと、当該ブロックに対応する参照画像フレームのブロックとに基づいて、前記ブロックごとに動きベクトルを検出する予測処理ステップと、前記ブロックに含まれる画素ごとのオプティカルフローを検出する際に、前記ブロックの中央から前記画素までの距離に応じて変化する探索範囲から、検出対象の前記画素に対応する前記探索範囲を選択するクラス別探索範囲設定ステップと、選択される前記探索範囲に基づいて前記画素ごとのオプティカルフローを算出し、算出した前記オプティカルフローを前記画素ごとのオプティカルフロー補正ベクトルとするオプティカルフロー補正ベクトル算出処理ステップと、前記画素ごとの前記オプティカルフロー補正ベクトルにより補正した前記動きベクトルに基づいて、予測画像ブロックを生成するオプティカルフロー補正画像生成処理ステップと、を有する予測画像生成方法である。   One aspect of the present invention is a prediction image generation method that performs motion compensation inter-frame prediction in units of blocks obtained by dividing an encoding target image frame in moving image data, the block of the encoding target image frame, and the block A prediction processing step of detecting a motion vector for each block based on a block of a corresponding reference image frame, and when detecting an optical flow for each pixel included in the block, from the center of the block to the pixel A search range setting step by class for selecting the search range corresponding to the pixel to be detected from a search range that changes according to the distance of the object, and an optical flow for each pixel is calculated based on the selected search range The calculated optical flow is converted into an optical flow correction vector for each pixel. Predictive image generation comprising: an optical flow correction vector calculation processing step, and an optical flow correction image generation processing step of generating a prediction image block based on the motion vector corrected by the optical flow correction vector for each pixel Is the method.

本発明の一態様は、上記の予測画像生成方法であって、前記探索範囲は、前記オプティカルフローの検出対象の前記画素が、前記ブロックの中央から離れるにしたがって、前記探索範囲が広がるように予め定められている。   One aspect of the present invention is the predicted image generation method described above, wherein the search range is preliminarily set so that the search range is expanded as the pixel to be detected by the optical flow moves away from the center of the block. It has been established.

本発明の一態様は、上記の予測画像生成方法であって、前記予測処理ステップにおいて、前記ブロックの中央からの距離に応じて減少する重み付けを行って前記動きベクトルを検出する。   One aspect of the present invention is the above-described prediction image generation method, wherein the motion vector is detected by performing weighting that decreases in accordance with a distance from the center of the block in the prediction processing step.

本発明の一態様は、上記の予測画像生成方法であって、全ての前記画素に対して同一の前記探索範囲を選択する探索範囲設定ステップと、前記ブロックの前記動きベクトルと、当該ブロックの周辺のブロックの前記動きベクトルとが揃っているか否かを判定する動きベクトル判定ステップと、を更に有し、前記クラス別探索範囲設定ステップにおいて、前記動きベクトル判定ステップで前記ブロックの前記動きベクトルと、当該ブロックの周辺のブロックの動きベクトルとが揃っていると判定した場合、前記ブロックの中央から前記画素までの距離に応じて変化する探索範囲から、前記画素に対応する前記探索範囲を選択し、前記探索範囲設定ステップにおいて、前記動きベクトル判定ステップで前記ブロックの前記動きベクトルと、当該ブロックの周辺のブロックの動きベクトルとが揃っていないと判定した場合、前記同一の探索範囲を選択する。   One aspect of the present invention is the predicted image generation method described above, wherein a search range setting step for selecting the same search range for all the pixels, the motion vector of the block, and the periphery of the block A motion vector determination step for determining whether or not the motion vectors of the block are aligned, and in the class-specific search range setting step, the motion vector of the block in the motion vector determination step; When it is determined that the motion vectors of the blocks around the block are aligned, the search range corresponding to the pixel is selected from the search range that changes according to the distance from the center of the block to the pixel, In the search range setting step, the motion vector determination step includes the motion vector of the block and the block. Tsu If click of a motion vector of a neighboring block is determined not to have all, selecting the same search range.

本発明の一態様は、動画像データにおける符号化対象画像フレームを分割したブロック単位に動き補償フレーム間予測を行う予測画像生成装置であって、前記符号化対象画像フレームのブロックと、当該ブロックに対応する参照画像フレームのブロックとに基づいて、前記ブロックごとに動きベクトルを検出する予測処理部と、前記ブロックに含まれる画素ごとのオプティカルフローを検出する際に、前記ブロックの中央から前記画素までの距離に応じて変化する探索範囲から、検出対象の前記画素に対応する前記探索範囲を選択するクラス別探索範囲設定部と、選択される前記探索範囲に基づいて前記画素ごとのオプティカルフローを算出し、算出した前記オプティカルフローを前記画素ごとのオプティカルフロー補正ベクトルとするオプティカルフロー補正ベクトル算出処理部と、前記画素ごとの前記オプティカルフロー補正ベクトルにより補正した前記動きベクトルに基づいて、予測画像ブロックを生成するオプティカルフロー補正画像生成処理部と、を備える予測画像生成装置である。   One aspect of the present invention is a prediction image generation apparatus that performs motion compensation inter-frame prediction in units of blocks obtained by dividing an encoding target image frame in moving image data, the block of the encoding target image frame, and the block A prediction processing unit that detects a motion vector for each block based on a block of a corresponding reference image frame; and when detecting an optical flow for each pixel included in the block, from the center of the block to the pixel The search range setting unit for selecting the search range corresponding to the pixel to be detected from the search range that changes according to the distance, and the optical flow for each pixel based on the selected search range An optical flow correction vector for each pixel is used as the calculated optical flow. A prediction image generation apparatus comprising: an optical flow correction vector calculation processing unit; and an optical flow correction image generation processing unit that generates a prediction image block based on the motion vector corrected by the optical flow correction vector for each pixel. .

本発明の一態様は、上記の予測画像生成方法をコンピュータに実行させるためのコンピュータプログラムである。   One aspect of the present invention is a computer program for causing a computer to execute the predicted image generation method.

この発明によれば、演算量を低減することが可能となる。   According to the present invention, the amount of calculation can be reduced.

本発明の第1実施形態における動画像符号化装置の構成を示す図である。It is a figure which shows the structure of the moving image encoder in 1st Embodiment of this invention. 本発明の第1実施形態におけるインター予測処理部の構成を示す図である。It is a figure which shows the structure of the inter prediction process part in 1st Embodiment of this invention. 第1実施形態のインター予測処理部による処理を示すフローチャートである。It is a flowchart which shows the process by the inter prediction process part of 1st Embodiment. 本発明の第2実施形態におけるインター予測処理部の構成を示す図である。It is a figure which shows the structure of the inter prediction process part in 2nd Embodiment of this invention. 第2実施形態のインター予測処理部による処理を示すフローチャートである。It is a flowchart which shows the process by the inter prediction process part of 2nd Embodiment. 本発明の第3実施形態におけるインター予測処理部の構成を示す図である。It is a figure which shows the structure of the inter prediction process part in 3rd Embodiment of this invention. 第3実施形態のインター予測処理部による処理を示すフローチャートである。It is a flowchart which shows the process by the inter prediction process part of 3rd Embodiment. 本発明の一実施形態における動画像復号装置の構成を示す図であるIt is a figure which shows the structure of the moving image decoding apparatus in one Embodiment of this invention. 動画像復号装置200のインター予測処理部210の構成を示す図である。It is a figure which shows the structure of the inter prediction process part 210 of the moving image decoding apparatus 200. FIG. 動画像復号装置200のインター予測処理部210bの構成を示す図である。It is a figure which shows the structure of the inter prediction process part 210b of the moving image decoding apparatus 200. FIG. 動画像復号装置200のインター予測処理部210cの構成を示す図である。It is a figure which shows the structure of the inter prediction process part 210c of the moving image decoding apparatus 200. FIG.

(第1実施形態)
以下、本発明の各実施形態について図面を参照して説明する。図1は、本発明の第1実施形態による動画像符号化装置100の構成を示すブロック図である。動画像符号化装置100は、例えば、HEVC(High Efficiency Video Coding)と呼ばれるH.265や、H.264等の符号化方式においてエンコーダとして適用される装置である。
(First embodiment)
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing a configuration of a moving picture coding apparatus 100 according to the first embodiment of the present invention. The moving image encoding apparatus 100 is, for example, an H.264 called High Efficiency Video Coding (HEVC). H.265, H. It is an apparatus applied as an encoder in an encoding method such as H.264.

図1において、動画像符号化装置100は、予測残差生成部102、変換処理部103、量子化処理部104、逆量子化処理部105、逆変換処理部106、復号信号生成部107、インループフィルタ処理部108、イントラ予測処理部109、インター予測処理部110、フレームメモリ111、イントラ予測情報記憶部112、インター予測情報記憶部113、スイッチ114、エントロピー符号化処理部115を備える。   In FIG. 1, the moving image encoding apparatus 100 includes a prediction residual generation unit 102, a transformation processing unit 103, a quantization processing unit 104, an inverse quantization processing unit 105, an inverse transformation processing unit 106, a decoded signal generation unit 107, A loop filter processing unit 108, an intra prediction processing unit 109, an inter prediction processing unit 110, a frame memory 111, an intra prediction information storage unit 112, an inter prediction information storage unit 113, a switch 114, and an entropy encoding processing unit 115 are provided.

動画像符号化装置100は、符号化対象の映像信号を入力信号として取り込み、入力映像信号に含まれる動画像データの各々のフレームを符号化し、符号化したビットストリームデータを符号化ストリームデータとして出力する。   The moving image encoding apparatus 100 takes an encoding target video signal as an input signal, encodes each frame of moving image data included in the input video signal, and outputs the encoded bit stream data as encoded stream data. To do.

動画像符号化装置100において、入力映像信号に含まれる符号化対象の動画像データの各々のフレームが予測残差生成部102、インター予測処理部110に入力される。なお、以下の説明において、符号化対象の動画像データを、符号化対象画像データといい、符号化対象画像データの個々のフレームを、符号化対象画像フレームといい、更に、符号化対象画像フレームが分割された個々のブロックを、符号化対象画像ブロックという。   In the video encoding device 100, each frame of video data to be encoded included in the input video signal is input to the prediction residual generation unit 102 and the inter prediction processing unit 110. In the following description, the moving image data to be encoded is referred to as encoding target image data, each frame of the encoding target image data is referred to as an encoding target image frame, and further, the encoding target image frame. Each block into which is divided is called an encoding target image block.

予測残差生成部102は、入力されたフレームごとに、内部に備える加算器により、入力映像信号と、イントラ予測処理部109、またはインター予測処理部110が出力する予測信号との差分を算出し、当該差分を予測残差信号として出力する。なお、以下の説明において、予測信号を、適用される構成に応じて、予測画像データ、予測画像フレーム、予測画像ブロックという。   The prediction residual generation unit 102 calculates the difference between the input video signal and the prediction signal output from the intra prediction processing unit 109 or the inter prediction processing unit 110 by an adder provided therein for each input frame. The difference is output as a prediction residual signal. In the following description, the prediction signal is referred to as prediction image data, a prediction image frame, and a prediction image block depending on the configuration to be applied.

変換処理部103は、予測残差信号に対して離散コサイン変換(DCT(Discrete Cosine Transform))の直交変換を行い、直交変換により得られた変換係数を出力する。量子化処理部104は、変換係数を量子化し、量子化した変換係数をエントロピー符号化処理部115と逆量子化処理部105とに出力する。エントロピー符号化処理部115は、量子化された変化係数をエントロピー符号化し、符号化ストリームデータを出力する。また、エントロピー符号化処理部115は、イントラ予測情報記憶部112に記憶されているイントラ予測に関する情報や、インター予測情報記憶部113に記憶されているインター予測に関する情報を読み出し、エントロピー符号化して符号化ストリームデータとして出力する。   The transform processing unit 103 performs an orthogonal transform of a discrete cosine transform (DCT (Discrete Cosine Transform)) on the prediction residual signal and outputs a transform coefficient obtained by the orthogonal transform. The quantization processing unit 104 quantizes the transform coefficient and outputs the quantized transform coefficient to the entropy coding processing unit 115 and the inverse quantization processing unit 105. The entropy encoding processing unit 115 performs entropy encoding on the quantized change coefficient and outputs encoded stream data. Further, the entropy encoding processing unit 115 reads out information related to intra prediction stored in the intra prediction information storage unit 112 and information related to inter prediction stored in the inter prediction information storage unit 113, and performs entropy encoding and encoding. Output as stream data.

逆量子化処理部105は、量子化された変換係数を逆量子化して変換係数に戻して出力する。逆変換処理部106は、逆量子化処理部105が出力する変換係数を逆直交変換して、予測残差復号信号を出力する。復号信号生成部107は、イントラ予測処理部109、またはインター予測処理部110が出力する予測信号と、逆変換処理部106が出力する予測残差復号信号とを内部に備える加算器により加算する。また、復号信号生成部107は、当該加算により、符号化対象画像ブロックに対応する復号画像ブロックを生成して出力する。インループフィルタ処理部108は、復号信号生成部107が出力する復号画像ブロックに対して符号化歪を低減するフィルタリング処理を行い、フィルタリング処理後の復号画像ブロックをフレームメモリ111に書き込んで記憶させる。   The inverse quantization processing unit 105 performs inverse quantization on the quantized transform coefficient, returns it to the transform coefficient, and outputs it. The inverse transform processing unit 106 performs inverse orthogonal transform on the transform coefficient output from the inverse quantization processing unit 105, and outputs a prediction residual decoded signal. The decoded signal generation unit 107 adds the prediction signal output from the intra prediction processing unit 109 or the inter prediction processing unit 110 and the prediction residual decoded signal output from the inverse transform processing unit 106 using an adder provided therein. Also, the decoded signal generation unit 107 generates and outputs a decoded image block corresponding to the encoding target image block by the addition. The in-loop filter processing unit 108 performs a filtering process for reducing the coding distortion on the decoded image block output from the decoded signal generation unit 107, and writes the decoded image block after the filtering process into the frame memory 111 for storage.

イントラ予測処理部109は、フレームメモリ111に記憶されているフレームに含まれるブロックごとに、予め定められる予測モードにしたがって、イントラ予測、すなわちフレーム内での予測を行い、予測信号を出力する。また、イントラ予測処理部109は、設定した予測モード等のイントラ予測に関する情報をイントラ予測情報記憶部112に書き込んで記憶させる。   The intra prediction processing unit 109 performs intra prediction, that is, prediction within a frame, according to a predetermined prediction mode for each block included in the frame stored in the frame memory 111, and outputs a prediction signal. Further, the intra prediction processing unit 109 writes and stores information related to intra prediction such as the set prediction mode in the intra prediction information storage unit 112.

インター予測処理部110は、入力された符号化対象画像フレームの1つ前のフレームft−1(p)を参照画像フレームとしてフレームメモリ111から読み出す。インター予測処理部110は、入力された符号化対象画像フレームの符号化対象画像ブロックと、参照画像フレームにおける当該符号化対象画像ブロックに対応するブロックとに基づいて、インター予測、すなわちフレーム間予測を行い、予測信号を出力する。また、インター予測処理部110は、ブロックごとに動きベクトルを検出し、検出した動きベクトルによる動き補償を適用したフレーム間予測処理を行う。また、インター予測処理部110は、検出した動きベクトル、及び後述する動きベクトルを補正するOF補正ベクトル等のインター予測に関する情報をインター予測情報記憶部113に書き込んで記憶させる。 The inter prediction processing unit 110 reads, from the frame memory 111, the frame f t−1 (p) immediately before the input encoding target image frame as a reference image frame. The inter prediction processing unit 110 performs inter prediction, that is, inter-frame prediction, based on the encoding target image block of the input encoding target image frame and the block corresponding to the encoding target image block in the reference image frame. And output a prediction signal. In addition, the inter prediction processing unit 110 detects a motion vector for each block, and performs inter-frame prediction processing to which motion compensation using the detected motion vector is applied. Also, the inter prediction processing unit 110 writes and stores information related to inter prediction such as a detected motion vector and an OF correction vector for correcting a motion vector described later in the inter prediction information storage unit 113.

スイッチ114は、予測残差生成部102及び復号信号生成部107が、イントラ予測処理部109かインター予測処理部110のいずれか一方に接続されるように切り替える。スイッチ114が、予測残差生成部102及び復号信号生成部107と、インター予測処理部110とを接続している場合、インター予測処理部110が動き補償フレーム間予測処理により生成した予測信号が予測残差生成部102に供給される。予測残差生成部102は、動き補償フレーム間予測が行われた予測信号を、符号化対象画像ブロックから減算して上記の予測残差信号を生成する。これにより、動画像符号化装置100において、動き補償が行われたフレーム間予測を適用した符号化が行われる。   The switch 114 switches so that the prediction residual generation unit 102 and the decoded signal generation unit 107 are connected to either the intra prediction processing unit 109 or the inter prediction processing unit 110. When the switch 114 connects the prediction residual generation unit 102, the decoded signal generation unit 107, and the inter prediction processing unit 110, the prediction signal generated by the inter prediction processing unit 110 through the motion compensation inter-frame prediction processing is predicted. It is supplied to the residual generation unit 102. The prediction residual generation unit 102 generates the prediction residual signal by subtracting the prediction signal on which the motion compensation interframe prediction has been performed from the encoding target image block. Thereby, in the moving image encoding device 100, the encoding which applied the inter-frame prediction in which motion compensation was performed is performed.

(第1実施形態のインター予測処理部の構成)
図2は、上述した動画像符号化装置100のインター予測処理部110の内部構成を示すブロック図である。インター予測処理部110は、動きベクトル探索処理部10、予測画像ブロック生成処理部11、距離算出部12、クラス別探索範囲設定部13、クラス分類閾値記憶部14、OF補正ベクトル算出処理部15、OF補正画像生成処理部16を備える。
(Configuration of the inter prediction processing unit of the first embodiment)
FIG. 2 is a block diagram illustrating an internal configuration of the inter prediction processing unit 110 of the above-described video encoding device 100. The inter prediction processing unit 110 includes a motion vector search processing unit 10, a predicted image block generation processing unit 11, a distance calculation unit 12, a class-specific search range setting unit 13, a class classification threshold storage unit 14, an OF correction vector calculation processing unit 15, An OF correction image generation processing unit 16 is provided.

インター予測処理部110は、MC予測ブロック、すなわち動き補償予測が行われたブロック内のMC予測誤差の偏在性に着目した以下の適応処理を行う。MC予測ブロック内のMC予測誤差の偏在性とは、MC予測ブロック内のMC予測誤差が、ブロックの中央付近から離れるにしたがい、増加する傾向を有する性質のことである。この性質を利用して、OF補正を行う際のオプティカルフローを算出する際に、MC予測ブロック内の画素の位置に適応した処理をインター予測処理部110が行う。   The inter prediction processing unit 110 performs the following adaptive processing focusing on the uneven distribution of MC prediction errors in the MC prediction block, that is, the block on which motion compensation prediction has been performed. The uneven distribution of MC prediction errors in the MC prediction block is a property that the MC prediction error in the MC prediction block has a tendency to increase as the distance from the center of the block increases. Using this property, the inter prediction processing unit 110 performs processing adapted to the position of the pixel in the MC prediction block when calculating the optical flow for performing OF correction.

例えば、第i番目のMC予測ブロックB内の中央位置の座標値をμとする。座標値μから補正処理の対象画素位置pまでの距離d(p,μ)に基づき、対象画素位置pのオプティカルフローの探索範囲を設定する。具体的には、d(p,μ)の値域をC個のクラスに分類し、クラスごとに探索範囲Ω(c=0,・・・,C−1)を次式(9)のように定める。なお、以下の説明において、Ω(c=0,・・・,C−1)をクラス別探索範囲という。 For example, the coordinate value of the center position in the i-th MC prediction block B i is μ i . Based on the distance d (p, μ i ) from the coordinate value μ i to the correction target pixel position p, an optical flow search range of the target pixel position p is set. Specifically, the range of d (p, μ i ) is classified into C classes, and the search range Ω c (c = 0,..., C−1) is expressed by the following equation (9) for each class. Determine as follows. In the following description, Ω c (c = 0,..., C−1) is referred to as a class-specific search range.

Figure 0006612721
Figure 0006612721

式(9)において、|Ω|をクラス別探索範囲Ω内の画素数を表す数式とした場合、次式(10)の関係が成立するように、式(9)に示すクラス別探索範囲Ωを定める。なお、クラス別探索範囲Ωが、縦n画素、横m画素の矩形領域の場合、|Ω|は、=n×mとなる。 In equation (9), when | Ω c | is an equation representing the number of pixels in the class-specific search range Ω c , the class-specific search shown in equation (9) is established so that the relationship of the following equation (10) holds. Define the range Ω c . When the class-specific search range Ω c is a rectangular region of vertical n pixels and horizontal m pixels, | Ω c | is = n × m.

Figure 0006612721
Figure 0006612721

上記したクラス別探索範囲Ω、クラス数C、及びクラス分類閾値θc(c=0,・・・,C−1)は、予め定められる情報である。また、上記した距離d()は、2つの座標値p=(p,p)、q=(q,q)の間において、次式(11)に示す長さを示す。 The class-specific search range Ω c , the number of classes C, and the class classification threshold θc (c = 0,..., C−1) are predetermined information. Further, the distance d () described above indicates a length represented by the following expression (11) between two coordinate values p = (p x , p y ) and q = (q x , q y ).

Figure 0006612721
Figure 0006612721

上記の式(10)は、MC予測ブロックの中央付近では、オプティカルフローの探索範囲が最も狭く、MC予測ブロックの外縁に近づくほど、オプティカルフローの探索範囲が広くなることを意味している。例えば、C=2として、探索範囲Ωを空集合とすると、MC予測ブロックの外縁部の画素のみに対して、OF補正を適用し、それ以外の画素については、OF補正を省略することになる。 The above equation (10) means that the optical flow search range is the narrowest near the center of the MC prediction block, and the optical flow search range becomes wider as the outer edge of the MC prediction block is approached. For example, if C = 2 and the search range Ω 0 is an empty set, OF correction is applied only to the pixels at the outer edge of the MC prediction block, and OF correction is omitted for other pixels. Become.

符号化対象画像フレームからOF補正の参照画像フレームへの距離が異なる場合、例えば、式(8)のように符号化対象画像フレームの直前と直後、つまりt−1と、t+1の参照画像フレーム以外のフレームを用いる場合、OF補正に適用されるオプティカルフローの算出は、次式(12)のように一般化して表すことができる。なお、式(12)において、lは、未来方向の参照画像フレームを指定するパラメータであり、lは、過去方向の参照画像フレームを指定するパラメータである。 When the distance from the encoding target image frame to the reference image frame for OF correction is different, for example, just before and immediately after the encoding target image frame, that is, other than the t−1 and t + 1 reference image frames as shown in Expression (8) In the case of using this frame, the calculation of the optical flow applied to the OF correction can be generalized as shown in the following equation (12). In the equation (12), l f is a parameter that specifies the future direction of the reference image frame, l b is a parameter that specifies the past direction of the reference image frame.

Figure 0006612721
Figure 0006612721

以下、図2を参照しつつ、インター予測処理部110の構成について説明する。インター予測処理部110において、動きベクトル探索処理部10は、符号化対象画像フレームと、フレームメモリ111に記憶されている参照画像フレームとを入力し、動きベクトルを検出する。例えば、動きベクトル探索処理部10は、フレームメモリ111から、符号化対象画像フレームにおいてMC予測を行うブロックに対応する参照画像ブロックを読み出す。すなわち、動きベクトル探索処理部10は、取り込んだ符号化対象画像フレームの1つ前のフレームft−1(p)を参照画像フレームとし、当該参照画像フレームにおいて、MC予測を行うブロックに対応する領域を参照画像ブロックとして読み出す。動きベクトル探索処理部10は、符号化対象画像フレームのMC予測ブロックと、当該ブロックに対応する参照画像ブロックとに基づいて、MC予測処理を行い、MC予測ブロックに最も類似した参照画像フレーム内の領域を探索することによってブロックごとに動きベクトルを検出する。ここで、MC予測を行うブロックに対応する参照画像フレームのブロックとは、MC予測を行うブロックの画素pに対して動きベクトルvを適用することで式(2)を満たす関係となる参照画像フレームの画素を含むブロックである。このようなブロックを、例えば、マッチングにより検出して、参照画像フレームにおけるMC予測を行うブロックに対応する参照画像ブロックとして読み出し、MC予測を行うブロックと、参照画像ブロックとの座標情報から動きベクトルを検出する。 Hereinafter, the configuration of the inter prediction processing unit 110 will be described with reference to FIG. In the inter prediction processing unit 110, the motion vector search processing unit 10 receives an encoding target image frame and a reference image frame stored in the frame memory 111, and detects a motion vector. For example, the motion vector search processing unit 10 reads from the frame memory 111 a reference image block corresponding to a block that performs MC prediction in the encoding target image frame. That is, the motion vector search processing unit 10 uses the frame f t−1 (p) immediately before the captured encoding target image frame as a reference image frame, and corresponds to a block for performing MC prediction in the reference image frame. Read the region as a reference image block. The motion vector search processing unit 10 performs MC prediction processing based on the MC prediction block of the encoding target image frame and the reference image block corresponding to the block, and in the reference image frame most similar to the MC prediction block. A motion vector is detected for each block by searching the area. Here, the block of the reference image frame corresponding to the block for MC prediction reference image as a relationship that satisfies the equation (2) by applying the motion vectors v i for a pixel p of block for MC prediction It is a block including the pixels of the frame. For example, such a block is detected by matching and read as a reference image block corresponding to a block for performing MC prediction in the reference image frame, and a motion vector is obtained from coordinate information of the block for performing MC prediction and the reference image block. To detect.

動きベクトル探索処理部10は、検出した動きベクトルをインター予測情報記憶部113及び予測画像ブロック生成処理部11に出力する。予測画像ブロック生成処理部11は、動きベクトルに基づいて予測画像ブロックを生成する予測処理部である。予測画像ブロック生成処理部11は、MC予測が行われたブロック、すなわちMC予測ブロックを示す情報を距離算出部12に出力する。また、予測画像ブロック生成処理部11は、生成した予測画像ブロックをOF補正画像生成処理部16に出力する。   The motion vector search processing unit 10 outputs the detected motion vector to the inter prediction information storage unit 113 and the predicted image block generation processing unit 11. The predicted image block generation processing unit 11 is a prediction processing unit that generates a predicted image block based on a motion vector. The predicted image block generation processing unit 11 outputs information indicating a block on which MC prediction has been performed, that is, an MC predicted block, to the distance calculation unit 12. Further, the predicted image block generation processing unit 11 outputs the generated predicted image block to the OF corrected image generation processing unit 16.

距離算出部12は、予測画像ブロック生成処理部11が出力するMC予測ブロックを示す情報からMC予測が行われたブロックの中央座標値μを検出する。また、距離算出部12は、検出した中央座標値μと、当該ブロック内でのOF補正処理の対象となる画素pの座標値とに基づいて、距離d(p,μ)を算出し、算出した距離d(p,μ)をクラス別探索範囲設定部13に出力する。 The distance calculation unit 12 detects the central coordinate value μ i of the block on which the MC prediction has been performed from the information indicating the MC prediction block output from the prediction image block generation processing unit 11. Further, the distance calculation unit 12 calculates the distance d (p, μ i ) based on the detected central coordinate value μ i and the coordinate value of the pixel p targeted for the OF correction processing in the block. The calculated distance d (p, μ i ) is output to the class-specific search range setting unit 13.

クラス分類閾値記憶部14は、式(9)によって定められるクラス別探索範囲Ω(c=0,・・・,C−1)と、クラス分類閾値θ(c=0,・・・,C−1)とが関係付けられたクラス別探索範囲を示す情報を予め記憶する。クラス別探索範囲設定部13は、クラス分類閾値記憶部14から、クラス別探索範囲を示す情報を読み出し、距離算出部12が出力する距離d(p,μ)に該当する探索範囲を、クラス分類閾値θにしたがってクラス別探索範囲Ωから選択する。また、クラス別探索範囲設定部13は、選択した探索範囲をOF補正ベクトル算出処理部15に出力する。 The class classification threshold storage unit 14 includes a class-specific search range Ω c (c = 0,..., C−1) determined by the equation (9) and a class classification threshold θ c (c = 0,. Information indicating the class-specific search range associated with C-1) is stored in advance. The class-specific search range setting unit 13 reads information indicating the class-specific search range from the class classification threshold storage unit 14, and selects a search range corresponding to the distance d (p, μ i ) output by the distance calculation unit 12 as a class. A search range by class Ω c is selected according to the classification threshold θ c . The class-specific search range setting unit 13 outputs the selected search range to the OF correction vector calculation processing unit 15.

OF補正ベクトル算出処理部15は、動画像符号化装置100のフレームメモリ111から符号化対象画像フレームf(p)の前後のフレームを参照画像フレームとして読み出す。また、OF補正ベクトル算出処理部15は、読み出した参照画像フレームと、クラス別探索範囲設定部13が出力する探索範囲とに基づいて、オプティカルフローを算出し、算出したオプティカルフローをOF補正ベクトルδ(p)とする。また、OF補正ベクトル算出処理部15は、算出したOF補正ベクトルδ(p)をOF補正画像生成処理部16に出力する。 The OF correction vector calculation processing unit 15 reads frames before and after the encoding target image frame f t (p) from the frame memory 111 of the moving image encoding device 100 as reference image frames. Further, the OF correction vector calculation processing unit 15 calculates an optical flow based on the read reference image frame and the search range output by the class-specific search range setting unit 13, and calculates the calculated optical flow as an OF correction vector δ. (P). Further, the OF correction vector calculation processing unit 15 outputs the calculated OF correction vector δ (p) to the OF correction image generation processing unit 16.

OF補正画像生成処理部16は、予測画像ブロック生成処理部11が出力した予測画像ブロックと、OF補正ベクトル算出処理部15が出力したOF補正ベクトルδ(p)とに基づいて、OF補正を施した予測画像ブロックを生成する。また、OF補正画像生成処理部16は、OF補正後の予測画像ブロックを予測残差生成部102と、復号信号生成部107とに出力する。また、OF補正画像生成処理部16は、OF補正ベクトルδ(p)をインター予測情報記憶部113に書き込んで記憶させる。   The OF corrected image generation processing unit 16 performs OF correction based on the predicted image block output from the predicted image block generation processing unit 11 and the OF correction vector δ (p) output from the OF correction vector calculation processing unit 15. The predicted image block is generated. Further, the OF corrected image generation processing unit 16 outputs the predicted image block after the OF correction to the prediction residual generation unit 102 and the decoded signal generation unit 107. Further, the OF correction image generation processing unit 16 writes the OF correction vector δ (p) in the inter prediction information storage unit 113 and stores it.

(第1実施形態のインター予測処理部による処理)
次に、第1実施形態のインター予測処理部110による処理について説明する。図3は、インター予測処理部110による処理の流れを示すフローチャートである。動画像符号化装置100の製作者等の操作を受けて、インター予測処理部110のクラス分類閾値記憶部14に、クラス別探索範囲Ω(c=0,・・・,C−1)と、クラス分類閾値θ(c=0,・・・,C−1)とが関係付けられたクラス別探索範囲を示す情報が予め書き込まれて設定される(ステップSa1)。ステップSa2〜ステップSa6の処理が、符号化対象画像フレームの全てのMC予測ブロックに対して繰り返し行われる(ループLa1s〜La1e)。
(Processing by the inter prediction processing unit of the first embodiment)
Next, processing by the inter prediction processing unit 110 of the first embodiment will be described. FIG. 3 is a flowchart showing a flow of processing by the inter prediction processing unit 110. In response to the operation of the producer of the moving image coding apparatus 100, the class classification threshold storage unit 14 of the inter prediction processing unit 110 stores the class-specific search range Ω c (c = 0,..., C−1). , Information indicating the search range by class associated with the class classification threshold θ c (c = 0,..., C−1) is written and set in advance (step Sa1). The processing of step Sa2 to step Sa6 is repeatedly performed for all MC prediction blocks of the encoding target image frame (loops La1s to La1e).

動きベクトル探索処理部10は、符号化対象画像フレームを取り込む。動きベクトル探索処理部10は、取り込んだ符号化対象画像フレームの1つ前のフレームft−1を参照画像フレームとし、当該参照画像フレームにおいて、MC予測を行うブロックに対応する領域を参照画像ブロックとしてフレームメモリ111から読み出す。動きベクトル探索処理部10は、MC予測ブロックと、当該ブロックに対応する参照画像ブロックとに基づいて、MC予測処理を行って、動きベクトルを検出する。動きベクトル探索処理部10bは、検出した動きベクトルを予測画像ブロック生成処理部11及びインター予測情報記憶部113に出力する。予測画像ブロック生成処理部11は、検出された動きベクトルに基づいて予測画像ブロックを生成する。予測画像ブロック生成処理部11は、MC予測ブロックを示す情報を距離算出部12に出力する。予測画像ブロック生成処理部11は、生成した予測画像ブロックをOF補正画像生成処理部16に出力する(ステップSa2)。 The motion vector search processing unit 10 captures an encoding target image frame. The motion vector search processing unit 10 uses the frame ft-1 immediately before the fetched encoding target image frame as a reference image frame, and in the reference image frame, a region corresponding to a block on which MC prediction is performed is a reference image block. Is read from the frame memory 111. The motion vector search processing unit 10 performs MC prediction processing based on the MC prediction block and the reference image block corresponding to the block to detect a motion vector. The motion vector search processing unit 10b outputs the detected motion vector to the predicted image block generation processing unit 11 and the inter prediction information storage unit 113. The predicted image block generation processing unit 11 generates a predicted image block based on the detected motion vector. The predicted image block generation processing unit 11 outputs information indicating the MC predicted block to the distance calculation unit 12. The predicted image block generation processing unit 11 outputs the generated predicted image block to the OF corrected image generation processing unit 16 (step Sa2).

ステップSa3〜ステップSa5の処理が、MC予測ブロック内の全ての画素に対して繰り返し行われる(ループLa2s〜La2e)。距離算出部12は、MC予測ブロックを示す情報からMC予測が行われたブロックの中央座標値μを検出する。ここで、MC予測ブロックを示す情報とは、当該MC予測ブロックの符号化対象画像フレームにおける位置を示す情報であってもよいし、当該MC予測ブロックの中央座標値μ自体であってもよい。MC予測ブロックを示す情報が、中央座標値μの場合、距離算出部12は、予測画像ブロック生成処理部11が出力する値をそのまま用いる。これに対して、MC予測ブロックを示す情報が、符号化対象画像フレームにおける当該MC予測ブロックの位置を示す情報の場合、距離算出部12は、予測画像ブロック生成処理部11が符号化対象画像フレームを取り込んだ際に、予測画像ブロック生成処理部11から事前に与えられている符号化対象画像フレームの座標位置に関する情報等から当該MC予測ブロックの中央座標値μを算出する。 The processing of step Sa3 to step Sa5 is repeated for all the pixels in the MC prediction block (loops La2s to La2e). The distance calculation unit 12 detects the central coordinate value μ i of the block on which MC prediction has been performed from the information indicating the MC prediction block. Here, the information indicating the MC prediction block may be information indicating the position of the MC prediction block in the encoding target image frame, or may be the central coordinate value μ i of the MC prediction block itself. . When the information indicating the MC prediction block is the central coordinate value μ i , the distance calculation unit 12 uses the value output from the prediction image block generation processing unit 11 as it is. On the other hand, when the information indicating the MC prediction block is information indicating the position of the MC prediction block in the encoding target image frame, the distance calculation unit 12 causes the prediction image block generation processing unit 11 to execute the encoding target image frame. The central coordinate value μ i of the MC prediction block is calculated from information relating to the coordinate position of the encoding target image frame given in advance from the prediction image block generation processing unit 11.

距離算出部12は、MC予測ブロックの中央座標値μと、当該ブロック内でのOF補正処理の対象となる画素pの座標値とに基づいて、式(11)により距離d(p,μ)を算出する。距離算出部12は、算出した距離d(p,μ)をクラス別探索範囲設定部13に出力する(ステップSa3)。 Based on the central coordinate value μ i of the MC prediction block and the coordinate value of the pixel p targeted for the OF correction processing in the block, the distance calculation unit 12 calculates the distance d (p, μ i ) is calculated. The distance calculation unit 12 outputs the calculated distance d (p, μ i ) to the class-specific search range setting unit 13 (step Sa3).

クラス別探索範囲設定部13は、クラス分類閾値記憶部14からクラス別探索範囲Ω(c=0,・・・,C−1)と、クラス分類閾値θ(c=0,・・・,C−1)とが関係付けられたクラス別探索範囲を示す情報を読み出す。クラス別探索範囲設定部13は、読み出したクラス別探索範囲を示す情報に基づいて、距離算出部12が出力する距離d(p,μ)に該当する探索範囲を、クラス分類閾値θにしたがってクラス別探索範囲Ωから選択する。クラス別探索範囲設定部13は、選択した探索範囲をOF補正ベクトル算出処理部15に出力する(ステップSa4)。 The class-specific search range setting unit 13 stores the class-specific search range Ω c (c = 0,..., C−1) and the class classification threshold θ c (c = 0,. , C-1) is read out, the information indicating the class-specific search range is read out. The class-specific search range setting unit 13 sets the search range corresponding to the distance d (p, μ i ) output by the distance calculation unit 12 as the class classification threshold θ c based on the read information indicating the class-specific search range. thus selected from the class-specific search range Omega c. The class-specific search range setting unit 13 outputs the selected search range to the OF correction vector calculation processing unit 15 (step Sa4).

OF補正ベクトル算出処理部15は、動画像符号化装置100のフレームメモリ111から、式(12)にしたがって、符号化対象画像フレームf(p)の前後のフレーム、すなわち時刻t+lと、時刻t−lにおけるフレームを参照画像フレームとして読み出す。OF補正ベクトル算出処理部15は、読み出した2つの参照画像フレームと、クラス別探索範囲設定部13が出力する探索範囲とに基づいて、式(12)により、OF補正ベクトルδ(p)を求める。すなわち、OF補正ベクトル算出処理部15は、参照画像フレームにおける当該探索範囲を対象として画素ごとのオプティカルフローを算出し、算出したオプティカルフローをOF補正ベクトルδ(p)とする。また、OF補正ベクトル算出処理部15は、算出したOF補正ベクトルδ(p)をOF補正画像生成処理部16に出力する(ステップSa5)。 The OF correction vector calculation processing unit 15 transmits the frames before and after the encoding target image frame f t (p) from the frame memory 111 of the moving image encoding apparatus 100, that is, the time t + l f and the time The frame at t-l b is read as a reference image frame. The OF correction vector calculation processing unit 15 obtains the OF correction vector δ (p) by Expression (12) based on the read two reference image frames and the search range output by the class-specific search range setting unit 13. . That is, the OF correction vector calculation processing unit 15 calculates an optical flow for each pixel for the search range in the reference image frame, and sets the calculated optical flow as the OF correction vector δ (p). Further, the OF correction vector calculation processing unit 15 outputs the calculated OF correction vector δ (p) to the OF correction image generation processing unit 16 (step Sa5).

OF補正画像生成処理部16は、予測画像ブロック生成処理部11が出力した予測画像ブロックと、インター予測情報記憶部113に記憶されている動きベクトルと、OF補正ベクトル算出処理部15が出力したOF補正ベクトルδ(p)に基づいて、式(7)による画素ごとのOF補正を施した予測画像ブロックを生成する。OF補正画像生成処理部16は、OF補正後の予測画像ブロックを予測残差生成部102と、復号信号生成部107とに出力する。OF補正画像生成処理部16は、動きベクトルと、OF補正ベクトルδ(p)とをインター予測情報記憶部113に書き込んで記憶させる(ステップSa6)。   The OF corrected image generation processing unit 16 includes the predicted image block output from the predicted image block generation processing unit 11, the motion vector stored in the inter prediction information storage unit 113, and the OF output from the OF correction vector calculation processing unit 15. Based on the correction vector δ (p), a predicted image block subjected to OF correction for each pixel according to Expression (7) is generated. The OF corrected image generation processing unit 16 outputs the predicted image block after the OF correction to the prediction residual generation unit 102 and the decoded signal generation unit 107. The OF corrected image generation processing unit 16 writes and stores the motion vector and the OF correction vector δ (p) in the inter prediction information storage unit 113 (step Sa6).

上記の第1実施形態の構成により、インター予測処理部110の予測画像ブロック生成処理部11は、符号化対象画像フレームのMC予測ブロックと、当該ブロックに対応する参照画像ブロックとに基づいて、動きベクトルを検出し、検出した動きベクトルに基づいて予測画像ブロックを生成する。距離算出部12は、MC予測ブロックの中央座標値と、OF補正の処理対象とする画素の距離を算出する。クラス別探索範囲設定部13は、MC予測ブロックの外縁に近づくほどオプティカルフローの探索範囲が広くなるように予め定められたクラス別探索範囲Ωと、クラス分類閾値θとが関係付けられたクラス別探索範囲を示す情報をクラス分類閾値記憶部14から読み出す。クラス別探索範囲設定部13は、距離算出部12が算出した距離と、クラス分類閾値θとに基づいて、クラス別探索範囲Ωの中から当該距離に該当する探索範囲を選択する。OF補正ベクトル算出処理部15は、選択された探索範囲からオプティカルフローを算出し、算出したオプティカルフローをOF補正ベクトルとしてOF補正画像生成処理部16に出力する。OF補正画像生成処理部16は、算出されたOF補正ベクトルを、予測画像ブロック生成処理部11が出力する予測画像ブロックと動きベクトルとに適用し、OF補正した予測画像ブロックを生成する。
これにより、MC予測ブロックの補正対象の画素の位置に応じたオプティカルフローの探索範囲を選択することができる。補正対象の画素の位置が、MC予測ブロックの中央付近から離れるにしたがって探索範囲が広くなるようにすることで、MC予測ブロックの中央付近の画素については、探索範囲を狭くすることができる。探索範囲を狭くすることにより、オプティカルフローの算出に要する演算量を削減することができる。また、補正対象の画素の位置が、MC予測ブロックの外縁部に近づくにつれて、探索範囲が広くなるため、精度を下げることなく、オプティカルフローを算出することができる。したがって、上記の第1実施形態の構成により、符号化効率の低下を抑えながら、OF補正にかかる演算量を削減することが可能となる。
With the configuration of the first embodiment, the prediction image block generation processing unit 11 of the inter prediction processing unit 110 performs motion based on the MC prediction block of the encoding target image frame and the reference image block corresponding to the block. A vector is detected, and a predicted image block is generated based on the detected motion vector. The distance calculation unit 12 calculates the central coordinate value of the MC prediction block and the distance between the pixels to be processed for OF correction. The class-specific search range setting unit 13 associates the class-specific search range Ω c and the class classification threshold θ c so that the optical flow search range becomes wider as the outer edge of the MC prediction block is approached. Information indicating the search range for each class is read from the class classification threshold storage unit 14. The class-specific search range setting unit 13 selects a search range corresponding to the distance from the class-specific search range Ω c based on the distance calculated by the distance calculation unit 12 and the class classification threshold θ c . The OF correction vector calculation processing unit 15 calculates an optical flow from the selected search range, and outputs the calculated optical flow to the OF correction image generation processing unit 16 as an OF correction vector. The OF corrected image generation processing unit 16 applies the calculated OF correction vector to the predicted image block and the motion vector output from the predicted image block generation processing unit 11, and generates an OF corrected predicted image block.
Thereby, the search range of the optical flow according to the position of the correction target pixel of the MC prediction block can be selected. By making the search range wider as the position of the pixel to be corrected moves away from the vicinity of the center of the MC prediction block, the search range can be narrowed for pixels near the center of the MC prediction block. By narrowing the search range, it is possible to reduce the amount of calculation required for calculating the optical flow. Further, since the search range becomes wider as the position of the pixel to be corrected approaches the outer edge of the MC prediction block, the optical flow can be calculated without reducing accuracy. Therefore, with the configuration of the first embodiment described above, it is possible to reduce the amount of calculation required for OF correction while suppressing a decrease in encoding efficiency.

(第2実施形態)
図4は、本発明の第2実施形態によるインター予測処理部110bの構成を示す図である。インター予測処理部110bは、図1に示す動画像符号化装置100において、第1実施形態のインター予測処理部110に替えて適用される機能部である。以下、第1実施形態のインター予測処理部110と同一の構成については、同一の符号を付し、異なる構成について説明する。インター予測処理部110bは、動きベクトル探索処理部10b、予測画像ブロック生成処理部11、重み係数記憶部21、距離算出部12、クラス別探索範囲設定部13、クラス分類閾値記憶部14、OF補正ベクトル算出処理部15、OF補正画像生成処理部16を備える。
(Second Embodiment)
FIG. 4 is a diagram illustrating a configuration of the inter prediction processing unit 110b according to the second embodiment of the present invention. The inter prediction processing unit 110b is a functional unit applied in place of the inter prediction processing unit 110 of the first embodiment in the video encoding device 100 illustrated in FIG. Hereinafter, the same components as those of the inter prediction processing unit 110 of the first embodiment are denoted by the same reference numerals, and different configurations will be described. The inter prediction processing unit 110b includes a motion vector search processing unit 10b, a predicted image block generation processing unit 11, a weight coefficient storage unit 21, a distance calculation unit 12, a class-specific search range setting unit 13, a class classification threshold storage unit 14, and an OF correction. A vector calculation processing unit 15 and an OF correction image generation processing unit 16 are provided.

第1実施形態によるインター予測処理部110では、MC予測ブロックの中央付近から離れるにつれて、MC予測誤差が増加する傾向があることを前提としていたが、映像信号の特性によっては、当該前提が明確に成立しない場合も想定される。そのため、第2実施形態によるインター予測処理部110bでは、MC予測ブロックの中央付近から離れるにつれて減少する重みを乗じて、次式(13)に示すように動きベクトルの検出を行う。   In the inter prediction processing unit 110 according to the first embodiment, it is assumed that the MC prediction error tends to increase as the distance from the center of the MC prediction block increases. However, depending on the characteristics of the video signal, the assumption may be clearly defined. The case where it does not hold is also assumed. Therefore, the inter prediction processing unit 110b according to the second embodiment multiplies a weight that decreases as the distance from the center of the MC prediction block increases, and detects a motion vector as shown in the following equation (13).

Figure 0006612721
Figure 0006612721

式(13)において、c(B)は、MC予測ブロックBの中央の座標値であり、W(p−c(B))は、MC予測ブロックの中央位置からの距離に応じて減少するように設定された重み係数である。重み係数として、例えば、次式(14)で示されるようなガウス関数を用いることができる。 In Expression (13), c (B i ) is a coordinate value at the center of the MC prediction block B i , and W (pc (B i )) is according to the distance from the center position of the MC prediction block. The weighting factor is set to decrease. As the weighting coefficient, for example, a Gaussian function represented by the following equation (14) can be used.

Figure 0006612721
Figure 0006612721

式(14)においてσは、重みの減少量を定めるパラメータである。また、式(13)において、次式(15)の部分は、画素pと中央の座標値c(B)とのユークリッド距離である。式(13)に示す重み付けにより、MC予測ブロックの中央付近のMC予測誤差が低減することになる。このように動きベクトルを検出することで、第1実施形態において前提としていたMC予測誤差の性質が明確になる。 In equation (14), σ is a parameter that determines the amount of weight reduction. Further, in Expression (13), the portion of the following Expression (15) is the Euclidean distance between the pixel p and the central coordinate value c (B i ). With the weighting shown in Equation (13), the MC prediction error near the center of the MC prediction block is reduced. By detecting the motion vector in this way, the nature of the MC prediction error assumed in the first embodiment becomes clear.

Figure 0006612721
Figure 0006612721

以下、インター予測処理部110bの内部構成について説明する。インター予測処理部110bにおいて、重み係数記憶部21には、予め式(14)に基づいて算出された重み係数W(p−c(B))が、動画像符号化装置100の製作者等の操作を受けて書き込まれる。すなわち、重み係数記憶部21は、画素pごとの重み係数を予め記憶する。
動きベクトル探索処理部10bは、符号化対象画像フレームと、重み係数記憶部21に記憶されている重み係数とに基づいて、動きベクトルを検出する。
Hereinafter, an internal configuration of the inter prediction processing unit 110b will be described. In the inter prediction processing unit 110b, the weighting factor storage unit 21 stores the weighting factor W (pc (B i )) calculated based on the equation (14) in advance, such as the producer of the moving picture coding apparatus 100, and the like. Written in response to the operation. That is, the weight coefficient storage unit 21 stores a weight coefficient for each pixel p in advance.
The motion vector search processing unit 10b detects a motion vector based on the encoding target image frame and the weighting factor stored in the weighting factor storage unit 21.

(第2実施形態のインター予測処理部による処理)
図5は、インター予測処理部110bによる処理の流れを示すフローチャートである。図5のフローチャートにおいて、ステップSb1,Sb3,Sb4,Sb5,Sb6による処理は、図3のステップSa1,Sa3,Sa4,Sa5,Sa6の処理と同一の処理である。また、ループ処理Lb1s〜Lb1eは、ループ処理La1s〜La1eと同じく符号化対象画像フレームの全てのMC予測ブロックを対象として繰り返す処理であり、ループ処理Lb2s〜Lb2eは、ループ処理La2s〜La2eと同じくMC予測ブロック内の全ての画素を対象として繰り返す処理である。以下、第1実施形態と異なる処理について説明する。
(Processing by the inter prediction processing unit of the second embodiment)
FIG. 5 is a flowchart showing the flow of processing by the inter prediction processing unit 110b. In the flowchart of FIG. 5, the processing by steps Sb1, Sb3, Sb4, Sb5, and Sb6 is the same processing as the processing of steps Sa1, Sa3, Sa4, Sa5, and Sa6 in FIG. Further, the loop processes Lb1s to Lb1e are processes that are repeated for all the MC prediction blocks of the encoding target image frame in the same manner as the loop processes La1s to La1e, and the loop processes Lb2s to Lb2e are the same as the loop processes La2s to La2e. This process is repeated for all the pixels in the prediction block. Hereinafter, processing different from that of the first embodiment will be described.

動きベクトル探索処理部10bは、重み係数記憶部21から重み係数を読み出す(ステップSb2−1)。動きベクトル探索処理部10bは、符号化対象画像フレームを取り込む。動きベクトル探索処理部10bは、取り込んだ符号化対象画像フレームの1つ前のフレームft−1(p)を参照画像フレームとし、参照画像フレームにおいて、MC予測を行うブロックに対応する領域を参照画像ブロックとしてフレームメモリ111から読み出す。 The motion vector search processing unit 10b reads the weighting factor from the weighting factor storage unit 21 (step Sb2-1). The motion vector search processing unit 10b captures an encoding target image frame. The motion vector search processing unit 10b uses the frame f t-1 (p) immediately before the fetched encoding target image frame as a reference image frame, and refers to an area corresponding to a block for performing MC prediction in the reference image frame. Read out from the frame memory 111 as an image block.

動きベクトル探索処理部10bは、符号化対象画像フレームのMC予測ブロックと、当該ブロックに対応する参照画像ブロックと、重み係数記憶部21から読み出した重み係数とに基づいて、式(13)に基づいて、MC予測処理を行い、動きベクトルを検出する。動きベクトル探索処理部10bは、検出した動きベクトルを予測画像ブロック生成処理部11及びインター予測情報記憶部113に出力する。予測画像ブロック生成処理部11は、重み付きの動きベクトルを用いて予測画像ブロックを生成する。予測画像ブロック生成処理部11は、MC予測ブロックを示す情報を距離算出部12に出力する。予測画像ブロック生成処理部11は、生成した予測画像ブロックをOF補正画像生成処理部16に出力する(ステップSb2−2)。   The motion vector search processing unit 10b is based on Expression (13) based on the MC prediction block of the encoding target image frame, the reference image block corresponding to the block, and the weighting coefficient read from the weighting coefficient storage unit 21. Then, MC prediction processing is performed to detect a motion vector. The motion vector search processing unit 10b outputs the detected motion vector to the predicted image block generation processing unit 11 and the inter prediction information storage unit 113. The predicted image block generation processing unit 11 generates a predicted image block using a weighted motion vector. The predicted image block generation processing unit 11 outputs information indicating the MC predicted block to the distance calculation unit 12. The predicted image block generation processing unit 11 outputs the generated predicted image block to the OF corrected image generation processing unit 16 (Step Sb2-2).

上記の第2実施形態の構成により、動きベクトル探索処理部10bが、重み係数記憶部21に記憶されている重み係数、すなわちMC予測ブロックの中央位置から離れるにつれて減少する重みを乗じて動きベクトルを検出する。そのため、MC予測ブロック内のMC予測誤差の偏在性、すなわちMC予測ブロック内のMC予測誤差が、ブロックの中央付近から離れるにしたがい、増加する傾向を有する性質が明確になる。この条件下で、クラス別探索範囲設定部13が、補正対象の画素がMC予測ブロックの外縁に近づくほどオプティカルフローの探索範囲が広くなるような探索範囲を選択し、OF補正ベクトル算出処理部15が、選択された探索範囲からオプティカルフローを算出する処理を行う。これにより、より高い精度で、符号化効率の低下を抑えながら、OF補正にかかる演算量を削減することが可能となる。   With the configuration of the second embodiment described above, the motion vector search processing unit 10b multiplies the motion vector by multiplying the weighting factor stored in the weighting factor storage unit 21, that is, the weight that decreases with increasing distance from the center position of the MC prediction block. To detect. Therefore, the ubiquity of the MC prediction error in the MC prediction block, that is, the property that the MC prediction error in the MC prediction block tends to increase as the distance from the center of the block increases becomes clear. Under this condition, the class-specific search range setting unit 13 selects a search range in which the optical flow search range becomes wider as the correction target pixel approaches the outer edge of the MC prediction block, and the OF correction vector calculation processing unit 15 However, the optical flow is calculated from the selected search range. As a result, it is possible to reduce the amount of calculation required for OF correction while suppressing a decrease in encoding efficiency with higher accuracy.

(第3実施形態)
図6は、本発明の第3実施形態によるインター予測処理部110cの内部構成を示すブロック図である。インター予測処理部110cは、図1に示す動画像符号化装置100において、第1実施形態のインター予測処理部110に替えて適用される機能部である。第1実施形態のインター予測処理部110と同一の構成については、同一の符号を付し、以下、異なる構成について説明する。インター予測処理部110cは、動きベクトル探索処理部10、予測画像ブロック生成処理部11c、動きベクトル判定部22、スイッチ23、距離算出部12、クラス別探索範囲設定部13、クラス分類閾値記憶部14、探索範囲設定部24、OF補正ベクトル算出処理部15c、OF補正画像生成処理部16を備える。
(Third embodiment)
FIG. 6 is a block diagram illustrating an internal configuration of the inter prediction processing unit 110c according to the third embodiment of the present invention. The inter prediction processing unit 110c is a functional unit applied in place of the inter prediction processing unit 110 of the first embodiment in the video encoding device 100 illustrated in FIG. The same configurations as those of the inter prediction processing unit 110 of the first embodiment are denoted by the same reference numerals, and different configurations will be described below. The inter prediction processing unit 110c includes a motion vector search processing unit 10, a predicted image block generation processing unit 11c, a motion vector determination unit 22, a switch 23, a distance calculation unit 12, a class-specific search range setting unit 13, and a class classification threshold storage unit 14. A search range setting unit 24, an OF correction vector calculation processing unit 15c, and an OF correction image generation processing unit 16.

第1実施形態によるインター予測処理部110では、MC予測ブロックの中央付近から離れるにつれて、MC予測誤差が増加する傾向があることを前提としていたが、映像信号の特性によっては、当該前提が明確に成立しない場合も想定される。そのため、第3実施形態によるインター予測処理部110cでは、対象としているMC予測ブロックの動きベクトルが周辺ブロックの動きベクトルと揃っていれば、当該前提が成り立つものとして、第1実施形態のインター予測処理部110による処理を行う。一方、対象としているMC予測ブロックの動きベクトルが周辺ブロックの動きベクトルと揃っていない場合、当該前提が成り立たないものとして、OF補正に用いるオプティカルフローの探索範囲を、MC予測ブロック内の位置によらず固定して探索を行う。   In the inter prediction processing unit 110 according to the first embodiment, it is assumed that the MC prediction error tends to increase as the distance from the center of the MC prediction block increases. However, depending on the characteristics of the video signal, the assumption may be clearly defined. The case where it does not hold is also assumed. Therefore, in the inter prediction processing unit 110c according to the third embodiment, if the motion vector of the target MC prediction block is aligned with the motion vectors of the neighboring blocks, the assumption is satisfied, and the inter prediction processing according to the first embodiment Processing by the unit 110 is performed. On the other hand, when the motion vector of the target MC prediction block is not aligned with the motion vectors of the neighboring blocks, the assumption is not satisfied, and the search range of the optical flow used for the OF correction is determined based on the position in the MC prediction block. Do a fixed search.

対象のMC予測ブロックの動きベクトルが周辺ブロックの動きベクトルと揃っていることを評価する尺度としては、例えば、次式(16)に示す動きベクトルの乖離度を適用することができる。式(16)の乖離度が、予め定められる閾値未満の場合、当該MC予測ブロックの動きベクトルが周辺ブロックの動きベクトルと揃っているとみなし、逆に、予め定められる閾値以上の場合、当該MC予測ブロックの動きベクトルが周辺ブロックの動きベクトルと揃っていないとみなす。なお、式(16)において、ベクトルvは、処理対象のMC予測ブロックの動きベクトルであり、ベクトルvは、処理対象のMC予測ブロックの周辺ブロックの動きベクトルである。Nは、周辺ブロックのインデックスの集合を示しており、例えば、処理対象のMC予測ブロックの上下左右に隣接する4つのブロックを周辺ブロックとする。また、式(16)に示すように、動きベクトルが揃っているか否かは、ベクトルの大きさと方向の両方の面において揃っているか否かに基づいており、MC予測ブロックの動きベクトルと、周辺ブロックのベクトルが、同一方向で同一の大きさの場合、乖離度は最小となる。 As a scale for evaluating that the motion vector of the target MC prediction block is aligned with the motion vectors of the neighboring blocks, for example, the motion vector divergence shown in the following equation (16) can be applied. When the degree of divergence in the equation (16) is less than a predetermined threshold, it is considered that the motion vector of the MC prediction block is aligned with the motion vectors of the neighboring blocks. It is assumed that the motion vectors of the prediction block are not aligned with the motion vectors of the surrounding blocks. In the equation (16), the vector v i, a motion vector of MC prediction block to be processed, the vector v n, a motion vector of neighboring blocks of MC prediction block to be processed. N indicates a set of peripheral block indexes. For example, four blocks adjacent to the processing target MC prediction block in the vertical and horizontal directions are set as peripheral blocks. Also, as shown in Expression (16), whether or not the motion vectors are aligned is based on whether or not the motion vectors are aligned in both planes of the vector magnitude and direction, and the motion vector of the MC prediction block When the block vectors have the same magnitude in the same direction, the divergence degree is minimized.

Figure 0006612721
Figure 0006612721

以下、インター予測処理部110cの内部構成について説明する。インター予測処理部110cにおいて、予測画像ブロック生成処理部11cは、検出された動きベクトルと、MC予測ブロックを示す情報とを動きベクトル判定部22に出力する。また、予測画像ブロック生成処理部11cは、生成した予測画像ブロックをOF補正画像生成処理部16に出力する。   Hereinafter, an internal configuration of the inter prediction processing unit 110c will be described. In the inter prediction processing unit 110c, the prediction image block generation processing unit 11c outputs the detected motion vector and information indicating the MC prediction block to the motion vector determination unit 22. Also, the predicted image block generation processing unit 11 c outputs the generated predicted image block to the OF corrected image generation processing unit 16.

動きベクトル判定部22は、予測画像ブロック生成処理部11cが出力するMC予測ブロックを示す情報に基づいて、当該MC予測ブロックの上下左右に隣接する4つの周辺ブロックの動きベクトルをインター予測情報記憶部113から読み出す。また、動きベクトル判定部22は、予測画像ブロック生成処理部11cが出力するMC予測ブロックの動きベクトルと、インター予測情報記憶部113から読み出した周辺ブロックの動きベクトルとから動きベクトルの乖離度を算出する。また、動きベクトル判定部22は、算出した乖離度が、予め定められる閾値未満であるか否かを判定し、判定結果に基づいて、スイッチ23の接続先を距離算出部12にするか、または、探索範囲設定部24にするかを選択する。また、動きベクトル判定部22は、スイッチ23の接続先にMC予測ブロックを示す情報を出力する。スイッチ23は、動きベクトル判定部22からの指示情報を受けて、当該指示情報に示される接続先と、動きベクトル判定部22とを接続する。   Based on the information indicating the MC prediction block output from the prediction image block generation processing unit 11c, the motion vector determination unit 22 uses the inter prediction information storage unit for the motion vectors of the four neighboring blocks adjacent to the MC prediction block in the vertical and horizontal directions. Read from 113. Further, the motion vector determination unit 22 calculates the degree of motion vector divergence from the motion vector of the MC prediction block output from the prediction image block generation processing unit 11c and the motion vector of the peripheral block read from the inter prediction information storage unit 113. To do. Further, the motion vector determination unit 22 determines whether or not the calculated divergence degree is less than a predetermined threshold, and based on the determination result, the connection destination of the switch 23 is the distance calculation unit 12 or The search range setting unit 24 is selected. In addition, the motion vector determination unit 22 outputs information indicating the MC prediction block to the connection destination of the switch 23. The switch 23 receives the instruction information from the motion vector determination unit 22 and connects the connection destination indicated by the instruction information to the motion vector determination unit 22.

探索範囲設定部24は、動きベクトル判定部22が出力するMC予測ブロックを示す情報を受けて、当該MC予測ブロック内の全ての画素に共通した探索範囲であって予め定められる規定の探索範囲をOF補正ベクトル算出処理部15cに出力する。つまり、当該探索範囲は、画素の位置によらず、固定の大きさの領域である。   The search range setting unit 24 receives information indicating the MC prediction block output from the motion vector determination unit 22 and sets a predetermined search range that is a search range common to all pixels in the MC prediction block. It outputs to OF correction vector calculation process part 15c. That is, the search range is an area having a fixed size regardless of the position of the pixel.

OF補正ベクトル算出処理部15cは、動画像符号化装置100のフレームメモリ111から符号化対象画像フレームf(p)の前後のフレームを参照画像フレームとして読み出す。また、OF補正ベクトル算出処理部15は、読み出した参照画像フレームと、クラス別探索範囲設定部13、または探索範囲設定部24が出力する探索範囲とに基づいて、OF補正ベクトルδ(p)を求める。また、OF補正ベクトル算出処理部15は、算出したOF補正ベクトルδ(p)をOF補正画像生成処理部16に出力する。 The OF correction vector calculation processing unit 15c reads out frames before and after the encoding target image frame f t (p) from the frame memory 111 of the moving image encoding device 100 as reference image frames. Further, the OF correction vector calculation processing unit 15 calculates the OF correction vector δ (p) based on the read reference image frame and the search range output by the class-specific search range setting unit 13 or the search range setting unit 24. Ask. Further, the OF correction vector calculation processing unit 15 outputs the calculated OF correction vector δ (p) to the OF correction image generation processing unit 16.

(第3実施形態のインター予測処理部による処理)
図7は、インター予測処理部110cによる処理の流れを示すフローチャートである。図7のフローチャートにおいて、ステップSc1,Sc3,Sc4による処理は、図3のステップSa1,Sa3,Sa4の処理と同一の処理であり、ステップSc5の処理は、OF補正ベクトル算出処理部15cが、第1実施形態のOF補正ベクトル算出処理部15と同様に、クラス別探索範囲設定部13が出力する探索範囲を受けてステップSa5と同一の処理を行う。ループ処理Lc1s〜Lc1eは、ループ処理La1s〜La1eと同じく符号化対象画像フレームの全てのMC予測ブロックを対象として繰り返す処理であり、ループ処理Lc2s〜Lc2eは、ループ処理La2s〜La2eと同じくMC予測ブロック内の全ての画素を対象として繰り返す処理である。以下、第1実施形態と異なる処理について説明する。
(Processing by the inter prediction processing unit of the third embodiment)
FIG. 7 is a flowchart showing a flow of processing by the inter prediction processing unit 110c. In the flowchart of FIG. 7, the processes in steps Sc1, Sc3, and Sc4 are the same as the processes in steps Sa1, Sa3, and Sa4 in FIG. 3, and the process in step Sc5 is performed by the OF correction vector calculation processing unit 15c. Similar to the OF correction vector calculation processing unit 15 of the first embodiment, the search range output by the class-specific search range setting unit 13 is received and the same processing as step Sa5 is performed. The loop processes Lc1s to Lc1e are processes that are repeated for all the MC prediction blocks of the encoding target image frame in the same way as the loop processes La1s to La1e, and the loop processes Lc2s to Lc2e are the MC prediction blocks similar to the loop processes La2s to La2e. This process is repeated for all the pixels. Hereinafter, processing different from that of the first embodiment will be described.

動きベクトル探索処理部10は、符号化対象画像フレームを取り込む。動きベクトル探索処理部10は、取り込んだ符号化対象画像フレームの1つ前のフレームft−1を参照画像フレームとし、当該参照画像フレームにおいて、MC予測を行うブロックに対応する領域を参照画像ブロックとしてフレームメモリ111から読み出す。 The motion vector search processing unit 10 captures an encoding target image frame. The motion vector search processing unit 10 uses the frame ft-1 immediately before the fetched encoding target image frame as a reference image frame, and in the reference image frame, a region corresponding to a block on which MC prediction is performed is a reference image block. Is read from the frame memory 111.

動きベクトル探索処理部10は、符号化対象画像フレームのMC予測ブロックと、当該ブロックに対応する参照画像ブロックとに基づいて、MC予測処理を行って、動きベクトルを検出し、検出した動きベクトルを予測画像ブロック生成処理部11c及びインター予測情報記憶部113に出力する。予測画像ブロック生成処理部11cは、動きベクトルを用いて予測画像ブロックを生成する。予測画像ブロック生成処理部11cは、検出された動きベクトルと、MC予測ブロックを示す情報とを動きベクトル判定部22に出力する。予測画像ブロック生成処理部11cは、生成した予測画像ブロックをOF補正画像生成処理部16に出力する(ステップSc2a)。   The motion vector search processing unit 10 performs MC prediction processing based on the MC prediction block of the encoding target image frame and the reference image block corresponding to the block, detects a motion vector, and detects the detected motion vector. The prediction image block generation processing unit 11 c and the inter prediction information storage unit 113 are output. The predicted image block generation processing unit 11c generates a predicted image block using the motion vector. The predicted image block generation processing unit 11 c outputs the detected motion vector and information indicating the MC predicted block to the motion vector determination unit 22. The predicted image block generation processing unit 11c outputs the generated predicted image block to the OF corrected image generation processing unit 16 (Step Sc2a).

動きベクトル判定部22は、予測画像ブロック生成処理部11cが出力するMC予測ブロックを示す情報に基づいて、当該MC予測ブロックの上下左右に隣接する4つの周辺ブロックの動きベクトルをインター予測情報記憶部113から読み出す(ステップSc2b)。動きベクトル判定部22は、予測画像ブロック生成処理部11cが出力するMC予測ブロックの動きベクトルと、インター予測情報記憶部113から読み出した周辺ブロックの動きベクトルとに基づいて、式(16)により動きベクトルの乖離度を算出する。動きベクトル判定部22は、算出した乖離度が、予め定められる閾値未満であるか否かを判定する(ステップSc2c)。   Based on the information indicating the MC prediction block output from the prediction image block generation processing unit 11c, the motion vector determination unit 22 uses the inter prediction information storage unit for the motion vectors of the four neighboring blocks adjacent to the MC prediction block in the vertical and horizontal directions. Read from 113 (step Sc2b). Based on the motion vector of the MC prediction block output from the prediction image block generation processing unit 11c and the motion vector of the peripheral block read from the inter prediction information storage unit 113, the motion vector determination unit 22 performs motion according to Expression (16). Calculate the degree of vector divergence. The motion vector determination unit 22 determines whether or not the calculated degree of divergence is less than a predetermined threshold value (step Sc2c).

動きベクトル判定部22は、算出した乖離度が、予め定められる閾値未満であると判定した場合、予測画像ブロック生成処理部11cが出力するMC予測ブロックの動きベクトルが、周辺ブロックの動きベクトルに揃っているとみなし、スイッチ23を距離算出部12に接続する指示情報を出力する。スイッチ23は、当該指示情報を受けて、動きベクトル判定部22と、距離算出部12とを接続する。その後、ループLc2s〜Lc2eの処理が行われる。一方、動きベクトル判定部22は、算出した乖離度が、予め定められる閾値以上であると判定した場合、予測画像ブロック生成処理部11cが出力するMC予測ブロックの動きベクトルが、周辺ブロックの動きベクトルに揃っていないとみなし、スイッチ23を探索範囲設定部24に接続する指示情報を出力する。スイッチ23は、当該指示情報を受けて、動きベクトル判定部22と、探索範囲設定部24とを接続する。その後、ステップSc10及びステップSc11の処理が、MC予測ブロック内の全ての画素を対象として繰り返し行われる。   When the motion vector determination unit 22 determines that the calculated degree of divergence is less than a predetermined threshold value, the motion vector of the MC prediction block output from the prediction image block generation processing unit 11c is aligned with the motion vector of the peripheral block. The instruction information for connecting the switch 23 to the distance calculation unit 12 is output. The switch 23 receives the instruction information and connects the motion vector determination unit 22 and the distance calculation unit 12. Thereafter, the loops Lc2s to Lc2e are processed. On the other hand, when the motion vector determination unit 22 determines that the calculated degree of divergence is greater than or equal to a predetermined threshold, the motion vector of the MC prediction block output from the prediction image block generation processing unit 11c is the motion vector of the surrounding block. The instruction information for connecting the switch 23 to the search range setting unit 24 is output. The switch 23 receives the instruction information and connects the motion vector determination unit 22 and the search range setting unit 24. Then, the process of step Sc10 and step Sc11 is repeatedly performed for all the pixels in the MC prediction block.

探索範囲設定部24は、動きベクトル判定部22が出力するMC予測ブロックを示す情報を受けて、当該MC予測ブロック内の全ての画素に共通した探索範囲であって予め定められる規定の探索範囲をOF補正ベクトル算出処理部15cに出力する(ステップSc10)。OF補正ベクトル算出処理部15cは、動画像符号化装置100のフレームメモリ111から符号化対象画像フレームf(p)の前後のフレームを参照画像フレームとして読み出す。OF補正ベクトル算出処理部15cは、読み出した参照画像フレームと、探索範囲設定部24が出力する探索範囲とに基づいて、OF補正ベクトルδ(p)を求める。また、OF補正ベクトル算出処理部15は、算出したOF補正ベクトルδ(p)をOF補正画像生成処理部16に出力する(ステップSc11)。 The search range setting unit 24 receives information indicating the MC prediction block output from the motion vector determination unit 22 and sets a predetermined search range that is a search range common to all pixels in the MC prediction block. The result is output to the OF correction vector calculation processing unit 15c (step Sc10). The OF correction vector calculation processing unit 15c reads out frames before and after the encoding target image frame f t (p) from the frame memory 111 of the moving image encoding device 100 as reference image frames. The OF correction vector calculation processing unit 15c calculates the OF correction vector δ (p) based on the read reference image frame and the search range output by the search range setting unit 24. Further, the OF correction vector calculation processing unit 15 outputs the calculated OF correction vector δ (p) to the OF correction image generation processing unit 16 (step Sc11).

OF補正画像生成処理部16は、予測画像ブロック生成処理部11が出力した予測画像ブロック及び動きベクトルと、OF補正ベクトル算出処理部15cが出力したOF補正ベクトルδ(p)とに基づいて、式(7)により、OF補正を施した予測画像ブロックを生成する。OF補正画像生成処理部16は、OF補正後の予測画像ブロックを予測残差生成部102と、復号信号生成部107とに出力する。OF補正画像生成処理部16は、動きベクトルと、OF補正ベクトルδ(p)とをインター予測情報記憶部113に書き込んで記憶させる(ステップSc15)。   The OF corrected image generation processing unit 16 is based on the predicted image block and motion vector output from the predicted image block generation processing unit 11 and the OF correction vector δ (p) output from the OF correction vector calculation processing unit 15c. According to (7), a predicted image block subjected to OF correction is generated. The OF corrected image generation processing unit 16 outputs the predicted image block after the OF correction to the prediction residual generation unit 102 and the decoded signal generation unit 107. The OF corrected image generation processing unit 16 writes and stores the motion vector and the OF correction vector δ (p) in the inter prediction information storage unit 113 (step Sc15).

上記の第3実施形態の構成により、予測画像ブロック生成処理部11cが検出したMC予測ブロックの動きベクトルが、当該MC予測ブロックの周辺ブロックの動きベクトルに揃っているか否かを動きベクトル判定部22が判定する。動きベクトル判定部22が、動きベクトルが揃っていると判定した場合、MC予測ブロックの中央付近から離れるにつれて、MC予測誤差が増加する傾向が現れているものとみなし、画素の位置によって探索範囲を変化させてオプティカルフローの算出を行う。一方、動きベクトル判定部22が、動きベクトルが揃っていないと判定した場合、画素の位置に依存しない固定の広さの探索範囲によって、オプティカルフローの算出を行う。これにより、MC予測ブロックの中央付近から離れるにつれて、MC予測誤差が増加する傾向が現れているとみなせる状態と、みなせない状態とに応じて、オプティカルフローの算出処理を選択することができる。当該傾向が現れていない場合に、画素の位置によって探索範囲を変化させてオプティカルフローの算出処理を行っても演算量の削減を行うことできず、むしろ、距離算出部12による距離の算出処理や、クラス別探索範囲設定部13おける閾値判定の処理のために処理量が増加する可能性もある。上記のように選択的に処理を行うことで、このような処理量の増加を抑えつつ、符号化効率の低下を抑えながら、OF補正にかかる演算量を削減することが可能となる。   With the configuration of the third embodiment, the motion vector determination unit 22 determines whether or not the motion vectors of the MC prediction block detected by the prediction image block generation processing unit 11c are aligned with the motion vectors of the peripheral blocks of the MC prediction block. Judgment. If the motion vector determination unit 22 determines that the motion vectors are aligned, it is assumed that the tendency of the MC prediction error to increase as the distance from the center of the MC prediction block increases, and the search range is determined by the pixel position. The optical flow is calculated by changing. On the other hand, when the motion vector determination unit 22 determines that the motion vectors are not aligned, the optical flow is calculated based on a fixed search range that does not depend on the pixel position. Thereby, the calculation process of the optical flow can be selected according to the state in which the tendency of increasing the MC prediction error appears as it moves away from the vicinity of the center of the MC prediction block and the state in which it cannot be considered. When the tendency does not appear, even if the optical flow calculation process is performed by changing the search range depending on the pixel position, the calculation amount cannot be reduced. Rather, the distance calculation process by the distance calculation unit 12 or There is also a possibility that the processing amount increases due to the threshold determination process in the class-specific search range setting unit 13. By selectively performing processing as described above, it is possible to reduce the amount of calculation required for OF correction while suppressing an increase in processing amount and suppressing a decrease in encoding efficiency.

(動画像復号装置)
図8は、図1の動画像符号化装置100が出力する符号化ストリームデータを受信して映像信号を復号する動画像復号装置200の構成を示すブロック図である。動画像復号装置200は、例えば、HEVCやH.264等の符号化方式においてデコーダとして適用される装置である。
(Video decoding device)
FIG. 8 is a block diagram illustrating a configuration of a moving picture decoding apparatus 200 that receives encoded stream data output from the moving picture encoding apparatus 100 of FIG. 1 and decodes a video signal. The video decoding device 200 is, for example, HEVC or H.264. It is an apparatus applied as a decoder in an encoding method such as H.264.

動画像復号装置200は、逆量子化処理部205、逆変換処理部206、復号信号生成部207、インループフィルタ処理部208、フレームメモリ211、イントラ予測処理部209、インター予測処理部210、イントラ予測情報記憶部212、インター予測情報記憶部213、スイッチ214及びエントロピー復号処理部215を備える。   The moving picture decoding apparatus 200 includes an inverse quantization processing unit 205, an inverse transformation processing unit 206, a decoded signal generation unit 207, an in-loop filter processing unit 208, a frame memory 211, an intra prediction processing unit 209, an inter prediction processing unit 210, an intra A prediction information storage unit 212, an inter prediction information storage unit 213, a switch 214, and an entropy decoding processing unit 215 are provided.

動画像復号装置200において、エントロピー復号処理部215は、動画像符号化装置100のエントロピー符号化処理部115が出力する符号化ストリームデータを取り込み、符号化ストリームデータに含まれているイントラ予測に関する情報をエントロピー復号して、イントラ予測情報記憶部212に書き込んで記憶させる。また、エントロピー復号処理部215は、符号化ストリームデータに含まれている動きベクトルやOF補正ベクトル等のインター予測に関する情報をエントロピー復号して、インター予測情報記憶部213に書き込んで記憶させる。また、エントロピー復号処理部215は、符号化ストリームデータに含まれている復号対象ブロックの量子化されている変換係数をエントロピー復号する。   In the video decoding device 200, the entropy decoding processing unit 215 takes in the encoded stream data output from the entropy encoding processing unit 115 of the video encoding device 100, and information related to intra prediction included in the encoded stream data. Is entropy-decoded and written and stored in the intra prediction information storage unit 212. The entropy decoding processing unit 215 entropy-decodes information related to inter prediction such as motion vectors and OF correction vectors included in the encoded stream data, and writes and stores the information in the inter prediction information storage unit 213. The entropy decoding processing unit 215 entropy-decodes the quantized transform coefficient of the decoding target block included in the encoded stream data.

逆量子化処理部205は、エントロピー復号処理部215が出力する量子化されている変換係数を逆量子化して、復号変換係数を出力する。逆変換処理部206は、逆量子化処理部205が出力する復号変換係数を逆直交変換し、予測残差復号信号を出力する。復号信号生成部207は、イントラ予測処理部209、またはインター予測処理部210が出力する予測信号と、逆量子化処理部205が出力する予測残差復号信号とを、内部に備える加算器により加算し、復号画像ブロックを生成する。インループフィルタ処理部208は、復号信号生成部207が出力する復号画像ブロックに対して符号化歪を低減するフィルタリング処理を行い、フィルタリング処理後の復号画像ブロックをフレームメモリ211に書き込んで記憶させる。   The inverse quantization processing unit 205 performs inverse quantization on the quantized transform coefficient output from the entropy decoding processing unit 215 and outputs a decoded transform coefficient. The inverse transform processing unit 206 performs inverse orthogonal transform on the decoded transform coefficient output from the inverse quantization processing unit 205, and outputs a prediction residual decoded signal. The decoded signal generation unit 207 adds the prediction signal output from the intra prediction processing unit 209 or the inter prediction processing unit 210 and the prediction residual decoded signal output from the inverse quantization processing unit 205 using an adder provided therein. Then, a decoded image block is generated. The in-loop filter processing unit 208 performs a filtering process for reducing the coding distortion on the decoded image block output from the decoded signal generation unit 207, and writes the decoded image block after the filtering process in the frame memory 211 for storage.

イントラ予測処理部209は、フレームメモリ211に記憶されているフィルタリング処理後の復号画像ブロックを読み出す。また、イントラ予測処理部209は、イントラ予測情報記憶部212に記憶されている予測モード等の情報に基づいて、読み出した復号画像ブロックから予測画像ブロック、すなわち予測信号を生成して出力する。   The intra prediction processing unit 209 reads the decoded image block after the filtering process stored in the frame memory 211. Further, the intra prediction processing unit 209 generates and outputs a prediction image block, that is, a prediction signal, from the read decoded image block based on information such as a prediction mode stored in the intra prediction information storage unit 212.

インター予測処理部210は、フレームメモリ211に記憶されているフィルタリング処理後の復号画像ブロックを読み込む。また、インター予測処理部110は、インター予測情報記憶部213に記憶されている動きベクトル、OF補正ベクトル等の情報に基づいて、復号画像ブロックから予測画像ブロック、すなわち予測信号を生成して出力する。   The inter prediction processing unit 210 reads the decoded image block after filtering processing stored in the frame memory 211. Further, the inter prediction processing unit 110 generates and outputs a prediction image block, that is, a prediction signal, from the decoded image block based on information such as a motion vector and an OF correction vector stored in the inter prediction information storage unit 213. .

スイッチ214は、復号信号生成部207と、イントラ予測処理部209とを接続するか、復号信号生成部207と、インター予測処理部210とを接続するかを切り替えることにより、適用する予測信号を切り替える。   The switch 214 switches the prediction signal to be applied by switching between connecting the decoded signal generation unit 207 and the intra prediction processing unit 209 or connecting the decoded signal generation unit 207 and the inter prediction processing unit 210. .

(第1から第3実施形態のインター予測部の動画像復号装置200への適用)
第1実施形態のインター予測部の構成を動画像復号装置200へ適用した場合の構成を図9に示す。
図9は、動画像復号装置200のインター予測処理部210の内部構成を示すブロック図である。インター予測処理部210は、予測画像ブロック生成処理部31、距離算出部32、クラス別探索範囲設定部33、クラス分類閾値記憶部34、OF補正ベクトル算出処理部35、OF補正画像生成処理部36を備える。
予測画像ブロック生成処理部31は、インター予測情報記憶部213に記憶されている動きベクトルと、フレームメモリ211に記憶されている参照画像フレームとに基づいて、動きベクトルが指定する参照画像フレーム内の領域を予測画像ブロックとしてフレームメモリ211から読み出す。予測画像ブロック生成処理部31、距離算出部32、クラス別探索範囲設定部33、クラス分類閾値記憶部34、OF補正ベクトル算出処理部35及びOF補正画像生成処理部36は、動画像符号化装置100のインター予測処理部110が備える同名の機能部と同様の処理を行う。
(Application of the inter prediction unit of the first to third embodiments to the video decoding device 200)
FIG. 9 shows a configuration when the configuration of the inter prediction unit according to the first embodiment is applied to the video decoding device 200.
FIG. 9 is a block diagram illustrating an internal configuration of the inter prediction processing unit 210 of the video decoding device 200. The inter prediction processing unit 210 includes a prediction image block generation processing unit 31, a distance calculation unit 32, a class-specific search range setting unit 33, a class classification threshold storage unit 34, an OF correction vector calculation processing unit 35, and an OF correction image generation processing unit 36. Is provided.
The predicted image block generation processing unit 31 is based on the motion vector stored in the inter prediction information storage unit 213 and the reference image frame stored in the frame memory 211. The area is read from the frame memory 211 as a predicted image block. The predicted image block generation processing unit 31, the distance calculation unit 32, the class-specific search range setting unit 33, the class classification threshold storage unit 34, the OF correction vector calculation processing unit 35, and the OF correction image generation processing unit 36 are a moving image encoding device. The same processing as that of the functional unit having the same name included in the 100 inter prediction processing units 110 is performed.

第2実施形態のインター予測部の構成を動画像復号装置200へ適用した場合の構成を図10に示す。
図10は、動画像復号装置200のインター予測処理部210bの内部構成を示すブロック図である。インター予測処理部210bは、予測画像ブロック生成処理部31b、距離算出部32、クラス別探索範囲設定部33、クラス分類閾値記憶部34、OF補正ベクトル算出処理部35、OF補正画像生成処理部36を備える。
予測画像ブロック生成処理部31bは、インター予測情報記憶部213に記憶されている重み付きの動きベクトルと、フレームメモリ211に記憶されている参照画像フレームとに基づいて、動きベクトルが指定する参照画像フレーム内の領域を予測画像ブロックとしてフレームメモリ211から読み出す。予測画像ブロック生成処理部31b、距離算出部32、クラス別探索範囲設定部33、クラス分類閾値記憶部34、OF補正ベクトル算出処理部35及びOF補正画像生成処理部36は、動画像符号化装置100のインター予測処理部110bが備える同名の機能部と同様の処理を行う。
FIG. 10 shows a configuration when the configuration of the inter prediction unit according to the second embodiment is applied to the video decoding device 200.
FIG. 10 is a block diagram illustrating an internal configuration of the inter prediction processing unit 210b of the video decoding device 200. The inter prediction processing unit 210b includes a prediction image block generation processing unit 31b, a distance calculation unit 32, a class-specific search range setting unit 33, a class classification threshold storage unit 34, an OF correction vector calculation processing unit 35, and an OF correction image generation processing unit 36. Is provided.
The predicted image block generation processing unit 31 b uses the weighted motion vector stored in the inter prediction information storage unit 213 and the reference image specified by the motion vector based on the reference image frame stored in the frame memory 211. A region in the frame is read from the frame memory 211 as a predicted image block. The predicted image block generation processing unit 31b, the distance calculation unit 32, the class-specific search range setting unit 33, the class classification threshold storage unit 34, the OF correction vector calculation processing unit 35, and the OF correction image generation processing unit 36 are a moving image encoding device. Processing similar to that of the functional unit having the same name included in the 100 inter prediction processing units 110b is performed.

第3実施形態のインター予測部の構成を動画像復号装置200へ適用した場合の構成を図10に示す。
図11は、動画像復号装置200のインター予測処理部210cの内部構成を示すブロック図である。インター予測処理部210cは、予測画像ブロック生成処理部31c、動きベクトル判定部42、スイッチ43、距離算出部32、クラス別探索範囲設定部33、クラス分類閾値記憶部34、探索範囲設定部44、OF補正ベクトル算出処理部35c、OF補正画像生成処理部36を備える。
予測画像ブロック生成処理部31cは、インター予測情報記憶部213に記憶されている動きベクトルと、フレームメモリ211に記憶されている参照画像フレームとに基づいて、動きベクトルが指定する参照画像フレーム内の領域を予測画像ブロックとしてフレームメモリ211から読み出す。予測画像ブロック生成処理部31c、距離算出部32、クラス別探索範囲設定部33、クラス分類閾値記憶部34、OF補正ベクトル算出処理部35及びOF補正画像生成処理部36は、動画像符号化装置100のインター予測処理部110cが備える同名の機能部と同様の処理を行う。
FIG. 10 shows a configuration when the configuration of the inter prediction unit of the third embodiment is applied to the video decoding device 200.
FIG. 11 is a block diagram illustrating an internal configuration of the inter prediction processing unit 210c of the video decoding device 200. The inter prediction processing unit 210c includes a predicted image block generation processing unit 31c, a motion vector determination unit 42, a switch 43, a distance calculation unit 32, a class-specific search range setting unit 33, a class classification threshold storage unit 34, a search range setting unit 44, An OF correction vector calculation processing unit 35c and an OF correction image generation processing unit 36 are provided.
The predicted image block generation processing unit 31c is based on the motion vector stored in the inter prediction information storage unit 213 and the reference image frame stored in the frame memory 211. The area is read from the frame memory 211 as a predicted image block. The predicted image block generation processing unit 31c, the distance calculation unit 32, the class-specific search range setting unit 33, the class classification threshold storage unit 34, the OF correction vector calculation processing unit 35, and the OF correction image generation processing unit 36 are a moving image encoding device. The same processing as that of the functional unit having the same name included in the 100 inter prediction processing units 110c is performed.

なお、上記の第1から第3実施形態において、クラス分類閾値記憶部14には、式(9)によって定められるクラス別探索範囲Ω(c=0,・・・,C−1)と、クラス分類閾値θ(c=0,・・・,C−1)とが関係付けられたクラス別探索範囲を示す情報が予め記憶されるとしているが、本発明の構成は、当該実施の形態に限られない。例えば、処理が開始されるごとに、クラス別探索範囲を示す情報を外部のメモリ等から読み出すようにしておくようにしてもよい。そのようにすることで、メモリ等の情報を書き換えるだけで容易にクラス別探索範囲Ωやクラス分類閾値θを変更することができる。 In the first to third embodiments described above, the class classification threshold value storage unit 14 includes a class-specific search range Ω c (c = 0,..., C−1) defined by the equation (9), and Information indicating the class-specific search range associated with the class classification threshold θ c (c = 0,..., C−1) is stored in advance. Not limited to. For example, information indicating the search range for each class may be read from an external memory or the like each time processing is started. By doing so, the class-specific search range Ω c and the class classification threshold θ c can be easily changed simply by rewriting information in the memory or the like.

また、上記の第1から第3実施形態において、式(2)に示すようにMC予測処理は、1つ前のフレームを対象として動きベクトルを算出するようにしているが、前後のフレーム、すなわち未来と過去のフレームを用いて動きベクトルを算出する双方向のMC予測処理であってもよい。   In the first to third embodiments, the MC prediction process calculates the motion vector for the previous frame as shown in the equation (2). Bidirectional MC prediction processing for calculating a motion vector using future and past frames may be used.

また、上記の第1から第3実施形態において、式(12)に示すように符号化対象画像フレームの前後の参照画像フレームを用いてオプティカルフロー、すなわちOF補正ベクトルを算出するようにしているが、オプティカルフローを算出する手法であればどのような手法を用いてもよく、符号化対象画像フレームと過去の参照画像フレームから算出してもよいし、符号化対象画像フレームと未来の参照画像フレームから算出するようにしてもよい。   In the first to third embodiments, the optical flow, that is, the OF correction vector is calculated using the reference image frames before and after the encoding target image frame as shown in Expression (12). Any method may be used as long as the optical flow is calculated, and may be calculated from the encoding target image frame and the past reference image frame, or the encoding target image frame and the future reference image frame. You may make it calculate from.

また、上記の第3実施形態において、周辺ブロックは、MC予測ブロックの上下左右に隣接する4つのブロックを周辺ブロックとしているが、右上、右下、左上、左下を加えた8ブロックを周辺ブロックにするようにしてもよい。   In the third embodiment, the neighboring blocks are four blocks that are adjacent to the MC prediction block in the upper, lower, left, and right directions, but the upper right, lower right, upper left, and lower left are added to the peripheral blocks. You may make it do.

また、上記の第3実施形態において、対象のMC予測ブロックの動きベクトルが周辺ブロックの動きベクトルと揃っていることを評価する尺度として、次式(16)に示す動きベクトルの乖離度を用いているが、本発明の構成は、当該実施の形態に限られない。例えば、ベクトルの方向のみをみて方向の一致度合いに基づいて揃っているか否かを判定するようにしてもよい。   Moreover, in said 3rd Embodiment, using the divergence degree of the motion vector shown in following Formula (16) as a scale for evaluating that the motion vector of the target MC prediction block is aligned with the motion vectors of the surrounding blocks. However, the configuration of the present invention is not limited to the embodiment. For example, it may be determined whether only the direction of the vector is observed or not based on the degree of coincidence of the directions.

また、上記の第3実施形態の動きベクトル探索処理部10として、第2実施形態の動きベクトル探索処理部10bを適用してもよい。また、予測画像ブロック生成処理部11cに加えて、動きベクトル探索処理部10bを備えておき、動きベクトル判定部22による判定の結果、距離算出部12に接続することが選択された場合に、動きベクトル探索処理部10bに重み付けされた動きベクトルを検出させるようにしてもよい。   Further, the motion vector search processing unit 10b of the second embodiment may be applied as the motion vector search processing unit 10 of the third embodiment. In addition to the predicted image block generation processing unit 11c, a motion vector search processing unit 10b is provided, and when it is selected as a result of determination by the motion vector determination unit 22 to connect to the distance calculation unit 12, You may make it make the vector search process part 10b detect the weighted motion vector.

また、上記の第3実施形態の動きベクトル判定部22は、算出した乖離度が、予め定められる閾値未満であるか否かに基づいて、判定を行っているが、本発明の構成は、当該実施の形態に限られず、閾値以下であるか否かに基づいて判定を行ってもよい。すなわち、上記の実施形態における値の比較は一例であり、例えば、式(9)における≦が、<であってもよい。   In addition, the motion vector determination unit 22 of the third embodiment performs the determination based on whether or not the calculated divergence degree is less than a predetermined threshold value. The determination is not limited to the embodiment, and the determination may be made based on whether or not it is equal to or less than a threshold value. That is, the comparison of the values in the above embodiment is an example. For example, ≦ in formula (9) may be <.

上述した各実施形態における動画像符号化装置100、動画像復号装置200、インター予測処理部110,110b,110c、210,210b,210cとなる予測画像生成装置をコンピュータで実現するようにしてもよい。その場合、この機能を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することによって実現してもよい。なお、ここでいう「コンピュータシステム」とは、OSや周辺機器等のハードウェアを含むものとする。また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD−ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムを送信する場合の通信線のように、短時間の間、動的にプログラムを保持するもの、その場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリのように、一定時間プログラムを保持しているものも含んでもよい。また上記プログラムは、前述した機能の一部を実現するためのものであってもよく、さらに前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるものであってもよく、FPGA(Field Programmable Gate Array)等のプログラマブルロジックデバイスを用いて実現されるものであってもよい。   The prediction image generation device that is the moving image encoding device 100, the moving image decoding device 200, and the inter prediction processing units 110, 110b, 110c, 210, 210b, and 210c in the above-described embodiments may be realized by a computer. . In that case, a program for realizing this function may be recorded on a computer-readable recording medium, and the program recorded on this recording medium may be read into a computer system and executed. Here, the “computer system” includes an OS and hardware such as peripheral devices. The “computer-readable recording medium” refers to a storage device such as a flexible medium, a magneto-optical disk, a portable medium such as a ROM and a CD-ROM, and a hard disk incorporated in a computer system. Furthermore, the “computer-readable recording medium” dynamically holds a program for a short time, like a communication line when transmitting a program via a network such as the Internet or a communication line such as a telephone line. In this case, a volatile memory inside a computer system serving as a server or a client in that case may be included and a program held for a certain period of time. Further, the program may be a program for realizing a part of the above-described functions, and may be a program capable of realizing the functions described above in combination with a program already recorded in a computer system. You may implement | achieve using programmable logic devices, such as FPGA (Field Programmable Gate Array).

以上、この発明の実施形態について図面を参照して詳述してきたが、具体的な構成はこの実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の設計等も含まれる。   The embodiment of the present invention has been described in detail with reference to the drawings. However, the specific configuration is not limited to this embodiment, and includes designs and the like that do not depart from the gist of the present invention.

10…動きベクトル探索処理部, 11…予測画像ブロック生成処理部, 12…距離算出部, 13…クラス別探索範囲設定部, 14…クラス分類閾値記憶部, 15…OF補正ベクトル算出処理部, 16…OF補正画像生成処理部, 110…インター予測処理部 DESCRIPTION OF SYMBOLS 10 ... Motion vector search process part, 11 ... Predictive image block generation process part, 12 ... Distance calculation part, 13 ... Search range setting part according to class, 14 ... Class classification threshold value memory | storage part, 15 ... OF correction vector calculation process part, 16 ... OF correction image generation processing unit, 110 ... Inter prediction processing unit

Claims (6)

動画像データにおける符号化対象画像フレームを分割したブロック単位に動き補償フレーム間予測を行う予測画像生成方法であって、
前記符号化対象画像フレームのブロックと、当該ブロックに対応する参照画像フレームのブロックとに基づいて、前記ブロックごとに動きベクトルを検出する予測処理ステップと、
前記ブロックに含まれる画素ごとのオプティカルフローを検出する際に、前記ブロックの中央から前記画素までの距離に応じて変化する探索範囲から、検出対象の前記画素に対応する前記探索範囲を選択するクラス別探索範囲設定ステップと、
選択される前記探索範囲に基づいて前記画素ごとのオプティカルフローを算出し、算出した前記オプティカルフローを前記画素ごとのオプティカルフロー補正ベクトルとするオプティカルフロー補正ベクトル算出処理ステップと、
前記画素ごとの前記オプティカルフロー補正ベクトルにより補正した前記動きベクトルに基づいて、予測画像ブロックを生成するオプティカルフロー補正画像生成処理ステップと、
を有する予測画像生成方法。
A prediction image generation method for performing motion compensation inter-frame prediction for each block obtained by dividing an encoding target image frame in moving image data,
A prediction processing step of detecting a motion vector for each block based on a block of the encoding target image frame and a block of a reference image frame corresponding to the block;
A class for selecting the search range corresponding to the pixel to be detected from the search range that changes according to the distance from the center of the block to the pixel when detecting an optical flow for each pixel included in the block. Another search range setting step;
An optical flow correction vector calculation processing step of calculating an optical flow for each pixel based on the selected search range, and using the calculated optical flow as an optical flow correction vector for each pixel;
An optical flow correction image generation processing step of generating a predicted image block based on the motion vector corrected by the optical flow correction vector for each pixel;
A predicted image generation method comprising:
前記探索範囲は、前記オプティカルフローの検出対象の前記画素が、前記ブロックの中央から離れるにしたがって、前記探索範囲が広がるように予め定められている、請求項1に記載の予測画像生成方法。   The predicted image generation method according to claim 1, wherein the search range is determined in advance such that the search range expands as the pixel to be detected by the optical flow moves away from the center of the block. 前記予測処理ステップにおいて、前記ブロックの中央からの距離に応じて減少する重み付けを行って前記動きベクトルを検出する、請求項1又は2に記載の予測画像生成方法。   The predicted image generation method according to claim 1, wherein in the prediction processing step, the motion vector is detected by performing weighting that decreases in accordance with a distance from a center of the block. 全ての前記画素に対して同一の前記探索範囲を選択する探索範囲設定ステップと、
前記ブロックの前記動きベクトルと、当該ブロックの周辺のブロックの前記動きベクトルとが揃っているか否かを判定する動きベクトル判定ステップと、
を更に有し、
前記クラス別探索範囲設定ステップにおいて、前記動きベクトル判定ステップで前記ブロックの前記動きベクトルと、当該ブロックの周辺のブロックの動きベクトルとが揃っていると判定した場合、前記ブロックの中央から前記画素までの距離に応じて変化する探索範囲から、前記画素に対応する前記探索範囲を選択し、
前記探索範囲設定ステップにおいて、前記動きベクトル判定ステップで前記ブロックの前記動きベクトルと、当該ブロックの周辺のブロックの動きベクトルとが揃っていないと判定した場合、前記同一の探索範囲を選択する、請求項1から3のいずれか一項に記載の予測画像生成方法。
A search range setting step for selecting the same search range for all the pixels;
A motion vector determination step of determining whether or not the motion vector of the block and the motion vectors of blocks around the block are aligned;
Further comprising
In the class-specific search range setting step, when it is determined in the motion vector determination step that the motion vector of the block and the motion vectors of blocks around the block are aligned, from the center of the block to the pixel The search range corresponding to the pixel is selected from the search range that changes according to the distance of
In the search range setting step, when it is determined in the motion vector determination step that the motion vector of the block and a motion vector of a block around the block are not aligned, the same search range is selected. Item 4. The predicted image generation method according to any one of Items 1 to 3.
動画像データにおける符号化対象画像フレームを分割したブロック単位に動き補償フレーム間予測を行う予測画像生成装置であって、
前記符号化対象画像フレームのブロックと、当該ブロックに対応する参照画像フレームのブロックとに基づいて、前記ブロックごとに動きベクトルを検出する予測処理部と、
前記ブロックに含まれる画素ごとのオプティカルフローを検出する際に、前記ブロックの中央から前記画素までの距離に応じて変化する探索範囲から、検出対象の前記画素に対応する前記探索範囲を選択するクラス別探索範囲設定部と、
選択される前記探索範囲に基づいて前記画素ごとのオプティカルフローを算出し、算出した前記オプティカルフローを前記画素ごとのオプティカルフロー補正ベクトルとするオプティカルフロー補正ベクトル算出処理部と、
前記画素ごとの前記オプティカルフロー補正ベクトルにより補正した前記動きベクトルに基づいて、予測画像ブロックを生成するオプティカルフロー補正画像生成処理部と、
を備える予測画像生成装置。
A prediction image generation apparatus that performs motion compensation inter-frame prediction in units of blocks obtained by dividing an encoding target image frame in moving image data,
A prediction processing unit that detects a motion vector for each block based on the block of the encoding target image frame and the block of the reference image frame corresponding to the block;
A class for selecting the search range corresponding to the pixel to be detected from the search range that changes according to the distance from the center of the block to the pixel when detecting an optical flow for each pixel included in the block. Another search range setting section;
An optical flow correction vector calculation processing unit that calculates an optical flow for each pixel based on the selected search range, and uses the calculated optical flow as an optical flow correction vector for each pixel;
An optical flow correction image generation processing unit that generates a predicted image block based on the motion vector corrected by the optical flow correction vector for each pixel;
A predicted image generation apparatus comprising:
請求項1から4のいずれか一項に記載の予測画像生成方法をコンピュータに実行させるためのコンピュータプログラム。   A computer program for causing a computer to execute the predicted image generation method according to any one of claims 1 to 4.
JP2016235392A 2016-12-02 2016-12-02 Predictive image generation method, predictive image generation apparatus, and computer program Active JP6612721B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016235392A JP6612721B2 (en) 2016-12-02 2016-12-02 Predictive image generation method, predictive image generation apparatus, and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016235392A JP6612721B2 (en) 2016-12-02 2016-12-02 Predictive image generation method, predictive image generation apparatus, and computer program

Publications (2)

Publication Number Publication Date
JP2018093374A JP2018093374A (en) 2018-06-14
JP6612721B2 true JP6612721B2 (en) 2019-11-27

Family

ID=62566522

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016235392A Active JP6612721B2 (en) 2016-12-02 2016-12-02 Predictive image generation method, predictive image generation apparatus, and computer program

Country Status (1)

Country Link
JP (1) JP6612721B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111405277B (en) * 2019-01-02 2022-08-09 华为技术有限公司 Inter-frame prediction method and device and corresponding encoder and decoder
CN111898573A (en) * 2020-08-05 2020-11-06 上海眼控科技股份有限公司 Image prediction method, computer device, and storage medium
CN111935487B (en) * 2020-08-12 2022-08-12 北京广慧金通教育科技有限公司 Image compression method and system based on video stream detection
CN113382248B (en) * 2021-04-20 2022-09-06 浙江大华技术股份有限公司 Interframe prediction value correction method, encoder and computer-readable storage medium

Also Published As

Publication number Publication date
JP2018093374A (en) 2018-06-14

Similar Documents

Publication Publication Date Title
JP5277257B2 (en) Video decoding method and video encoding method
RU2761511C2 (en) Window of limited memory access for clarifying motion vector
JP6612721B2 (en) Predictive image generation method, predictive image generation apparatus, and computer program
KR20110027480A (en) Motion vector coding method and apparatus and video coding method and apparatus by using same
JP2008259174A (en) Computer-implemented method for mapping motion vectors, transcoder for mapping motion vectors and decoder for mapping motion vectors
JP5613319B2 (en) Video encoding apparatus, video encoding method, and video encoding program
JP2914448B2 (en) Motion vector prediction encoding method and motion vector decoding method, prediction encoding device and decoding device, and recording medium recording motion vector prediction encoding program and decoding program
KR20140062519A (en) Video coding method and device, video decoding method and device, and programs
JP5702820B2 (en) Prediction mode determination method, video encoding apparatus, and prediction mode determination program
JP6259272B2 (en) Video encoding apparatus and video encoding program
JP5951144B2 (en) Image encoding device
JP5439162B2 (en) Moving picture encoding apparatus and moving picture decoding apparatus
KR20140124442A (en) Method for encoding and decoding video using intra prediction, and apparatus thereof
WO1998059496A1 (en) Moving vector predictive coding method and moving vector decoding method, predictive coding device and decoding device, and storage medium stored with moving vector predictive coding program and moving vector decoding program
EP2359601B1 (en) Image prediction method and system
KR20210156256A (en) Method for intra-prediction, and apparatus thereof
KR102217225B1 (en) Method for intra-prediction, and apparatus thereof
JP6696889B2 (en) IMAGE ENCODING DEVICE, IMAGE ENCODING METHOD, AND COMPUTER PROGRAM
JP6016488B2 (en) Video compression format conversion apparatus, video compression format conversion method, and program
JP2016187134A (en) Prediction mode determination method and prediction mode determination program
JP2006254347A (en) Image encoding device
JP6694086B2 (en) Video coding device, video decoding device, video coding method, video decoding method, and program
JP2015070488A (en) Encoder, decoder, coding method and decoding method for moving image, and program
JP6849781B2 (en) Image coding device, image coding method and computer program
JP2012120108A (en) Interpolation image generating apparatus and program, and moving image decoding device and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20181205

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20191018

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20191031

R150 Certificate of patent or registration of utility model

Ref document number: 6612721

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150