JP5598199B2 - Video encoding device - Google Patents

Video encoding device Download PDF

Info

Publication number
JP5598199B2
JP5598199B2 JP2010208184A JP2010208184A JP5598199B2 JP 5598199 B2 JP5598199 B2 JP 5598199B2 JP 2010208184 A JP2010208184 A JP 2010208184A JP 2010208184 A JP2010208184 A JP 2010208184A JP 5598199 B2 JP5598199 B2 JP 5598199B2
Authority
JP
Japan
Prior art keywords
prediction
unit
image
prediction process
motion
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2010208184A
Other languages
Japanese (ja)
Other versions
JP2012065176A (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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2010208184A priority Critical patent/JP5598199B2/en
Publication of JP2012065176A publication Critical patent/JP2012065176A/en
Application granted granted Critical
Publication of JP5598199B2 publication Critical patent/JP5598199B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Description

本願開示は、一般に動画像符号化装置に関し、詳しくは予測符号化を用いた動画像符号化装置に関する。   The present disclosure generally relates to a moving image encoding apparatus, and more particularly to a moving image encoding apparatus using predictive encoding.

動画データのフレーム間及びフレーム内の差分値に基づいてデータを圧縮し符号化する画像符号化技術が様々な分野で利用されている。ここでフレームとは、動画データを構成する時間軸上に並べられた一連の静止画像の各画像のことである。差分値に基づいてデータサイズを圧縮し符号化する画像符号化技術としてはH.264やMPEG(Moving Picture Experts Group)などがある。画像を圧縮符号化して動画データのデータサイズを小さくすることにより、限られた記憶容量を有する記憶媒体に、長時間で高画質の動画データを記憶させることができる。動画圧縮の機能を有する画像符号化装置は、例えばハンディカメラ等にも実装されている。   An image encoding technique for compressing and encoding data based on a difference value between and within frames of moving image data is used in various fields. Here, the frame is each image of a series of still images arranged on the time axis constituting the moving image data. As an image encoding technique for compressing and encoding the data size based on the difference value, H.264 is available. H.264 and MPEG (Moving Picture Experts Group). By compressing and encoding an image to reduce the data size of moving image data, high-quality moving image data can be stored in a storage medium having a limited storage capacity for a long time. An image encoding device having a moving image compression function is also mounted in, for example, a handy camera.

動画データを構成する各フレームは、それぞれが16×16画素のブロックである複数のマクロブロックからなる。フレーム間のインター予測処理においては、着目マクロブロックのフレームに隣接するフレームの画素情報に基づいて予測画素データを生成し、この予測画素データと着目マクロブロックの画素データとの差分を求めることにより画像予測を行なう。この際、予測誤差が最小になるように隣接フレームの画素情報を選択する動きベクトル検出処理が行なわれる。またフレーム内のイントラ予測処理においては、1つのフレーム内において着目マクロブロックに隣接する隣接画素情報に基づいて予測画素データを生成し、この予測画素データと着目マクロブロックの画素データとの差分を求めることにより画像予測を行なう。更に、フレーム間のインター予測の特別なケースとしてスキップモードが存在する。このスキップモードでは、予測誤差が最小になる動きベクトルを検出するのではなく、着目ブロックの周囲のブロックの情報から動きベクトルを予測し、この予測動きベクトルが示す位置にある隣接フレーム内のブロックが着目ブロックに等しいとして扱う。符号化後の情報には、着目ブロックがスキップモードであることを示す情報のみが含まれ、誤差の符号化情報や動きベクトルの情報は含まれない。   Each frame constituting the moving image data is composed of a plurality of macro blocks each of which is a block of 16 × 16 pixels. In inter prediction processing between frames, predicted pixel data is generated based on pixel information of a frame adjacent to the frame of the target macroblock, and an image is obtained by obtaining a difference between the predicted pixel data and the pixel data of the target macroblock. Make a prediction. At this time, motion vector detection processing for selecting pixel information of adjacent frames so as to minimize the prediction error is performed. Also, in intra prediction processing within a frame, prediction pixel data is generated based on neighboring pixel information adjacent to the target macroblock in one frame, and a difference between this prediction pixel data and pixel data of the target macroblock is obtained. Thus, image prediction is performed. Furthermore, a skip mode exists as a special case of inter prediction between frames. In this skip mode, instead of detecting a motion vector that minimizes the prediction error, a motion vector is predicted from information about blocks around the block of interest, and a block in an adjacent frame at the position indicated by the predicted motion vector is detected. Treat as equal to the block of interest. The encoded information includes only information indicating that the block of interest is in the skip mode, and does not include error encoding information or motion vector information.

より詳細には、インター予測処理には、16×16画素、16×8画素、8×16画素、8×8画素、8×4画素、4×8画素、及び4×4画素の7種類の異なる大きさのブロックを用いる7種類の予測モードが規定されている。またイントラ予測処理には、合計で22種類の予測モードが規定されている。具体的には、4×4画素のブロックに対して異なる予測方向を用いた9種類の予測モード、8×8画素のブロックに対して異なる予測方向を用いた9種類の予測モード、16×16画素のブロックに対して異なる予測方向を用いた4種類の予測モードが規定されている。またPピクチャに対してスキップモードが規定されている。   More specifically, the inter prediction process includes seven types of 16 × 16 pixels, 16 × 8 pixels, 8 × 16 pixels, 8 × 8 pixels, 8 × 4 pixels, 4 × 8 pixels, and 4 × 4 pixels. Seven types of prediction modes using different size blocks are defined. In addition, a total of 22 types of prediction modes are defined in the intra prediction process. Specifically, nine types of prediction modes using different prediction directions for a 4 × 4 pixel block, nine types of prediction modes using different prediction directions for an 8 × 8 pixel block, 16 × 16 Four types of prediction modes using different prediction directions are defined for a block of pixels. A skip mode is defined for P pictures.

H.264では、圧縮率を向上するために、マクロブロック毎に最適な予測モードを適用する。具体的には、上記の全ての予測モードのコストを求め、コストが一番小さい予測モードを、着目マクロブロックのベスト予測モードとして用いる。最初に、例えばインター予測処理の7種類の各予測モードのコストを計算し、ベストインター予測モードを決定する。次に、例えばイントラ予測処理の22種類の各予測モードのコストを計算し、ベストイントラ予測モードを判定する。最後に、例えばスキップモードのコストを計算する。着目マクロブロックの総合的なベスト予測モードとしては、ベストインター予測モードのコスト、ベストイントラ予測モードのコスト、及びスキップモードのコストを比較し、コストが最小の予測モードを選択する。   H. In H.264, an optimal prediction mode is applied to each macroblock in order to improve the compression rate. Specifically, the costs of all the prediction modes described above are obtained, and the prediction mode with the lowest cost is used as the best prediction mode for the macroblock of interest. First, for example, the cost of each of seven types of prediction modes of the inter prediction process is calculated, and the best inter prediction mode is determined. Next, for example, the cost of each of the 22 types of prediction modes of the intra prediction process is calculated, and the best intra prediction mode is determined. Finally, for example, the cost of the skip mode is calculated. As the overall best prediction mode of the target macroblock, the cost of the best inter prediction mode, the cost of the best intra prediction mode, and the cost of the skip mode are compared, and the prediction mode with the lowest cost is selected.

動き予測はインター予測のコア技術である。動き予測においては、着目マクロブロックと隣接フレームの探索範囲内にあるマクロブロックとの画素値の差分絶対値和等をコストとして計算すると共に、これらマクロブロック間の位置差分を動きベクトルとして計算する。コストが最小となる探索範囲内にあるマクロブロックの位置を求め、この位置に対応する動きベクトルをベスト動きベクトルとする。1つのマクロブロックには256画素(16×16)が含まれるので、1つの探索位置に対して少なくとも256回の差分計算が実行される。M×N画素の探索範囲に対し、M×N×256回の差分計算を行うので、莫大な演算量となる。   Motion prediction is the core technology of inter prediction. In motion prediction, a sum of absolute differences of pixel values between a macroblock of interest and a macroblock within the search range of an adjacent frame is calculated as a cost, and a position difference between these macroblocks is calculated as a motion vector. The position of the macro block within the search range that minimizes the cost is obtained, and the motion vector corresponding to this position is set as the best motion vector. Since one macroblock includes 256 pixels (16 × 16), at least 256 difference calculations are executed for one search position. Since the difference calculation is performed M × N × 256 times for the search range of M × N pixels, the calculation amount is enormous.

動き予測における演算量を削減するために、動き予測の計算を階層的に実行する階層動き予測技術が用いられる。階層動き予測の処理プロセスは、縮小画動き予測処理と同倍画動き予測処理との2つの処理を含む。縮小画動き予測処理では、着目マクロブロックと隣接ピクチャとを共に1/Pのサイズに縮小する。サイズがM×N/Pの探索範囲において、初期動きベクトルPME_MVと初期差分値コストPME_COSTとを求める。次の同倍画動き予測処理では、縮小していないマクロブロックと隣接ピクチャとを用い、初期動きベクトルPME_MVを探索中心として設定した小さい探索範囲R×S(R<<M、S<<N)内で、最終の動きベクトルと差分コストとを求める。縮小画動き予測処理における探索では、マクロブロックと探索範囲とを共に1/Pに縮小してあるので、演算量は従来の1/Pになる。同倍画動き予測処理では、縮小していない画像を用いるが、探索範囲が大幅に小さくなっているので、演算量が大幅に少なくなる。この階層動き予測技術は、高画質を維持しながらも演算量を大幅に削減できるので、高速な動き予測方法としてよく使われる。 In order to reduce the amount of calculation in motion prediction, a hierarchical motion prediction technique that performs motion prediction calculation hierarchically is used. The processing process of hierarchical motion prediction includes two processes of a reduced image motion prediction process and a same-size image motion prediction process. In the reduced image motion prediction process, the macroblock of interest and the adjacent picture are both reduced to a 1 / P size. In the search range of size M × N / P, an initial motion vector PME_MV and an initial differential value cost PME_COST are obtained. In the next same-size image motion prediction process, a small search range R × S (R << M, S << N) using an unreduced macroblock and an adjacent picture and setting an initial motion vector PME_MV as a search center. The final motion vector and the difference cost are obtained. The search in the reduced image motion prediction processing, since the search range and the macro block are together reduced to 1 / P, the calculation amount becomes conventional 1 / P 2. In the same-size image motion prediction process, an unreduced image is used, but the amount of calculation is greatly reduced because the search range is greatly reduced. This hierarchical motion prediction technique is often used as a high-speed motion prediction method because it can greatly reduce the amount of computation while maintaining high image quality.

しかしながら、階層動き予測技術においても、全ての予測モードのコストを求め、コストが最小の予測モードをマクロブロックのベスト予測モードとして選択している。合計で30(=7+22+1)種類の予測モードの計算には、莫大な量の演算が実行されることになり、演算のための回路面積と消費電力とが肥大化する。   However, even in the hierarchical motion prediction technique, the cost of all prediction modes is obtained, and the prediction mode with the lowest cost is selected as the best prediction mode of the macroblock. In the calculation of 30 (= 7 + 22 + 1) types of prediction modes in total, an enormous amount of computation is executed, and the circuit area and power consumption for computation are enlarged.

Joint Video Team of ITU-Tand ISO/IEC JTC 1, “Draft ITU-T Recommendation and Final Draft International Standardof Joint Video Specification (ITU-T Rec. H.264 | ISO/IEC 14496-10 AVC),”document JVT-G050r1, May 2003; technical corrigendum 1 documents JVT-K050r1(non-integrated form) and JVT-K051r1 (integrated form), March 2004; andFidelity Range Extensions documents JVT-L047 (non-integrated form) and JVT-L050(integrated form), July 2004Joint Video Team of ITU-Tand ISO / IEC JTC 1, “Draft ITU-T Recommendation and Final Draft International Standard of Joint Video Specification (ITU-T Rec. H.264 | ISO / IEC 14496-10 AVC),” document JVT- G050r1, May 2003; technical corrigendum 1 documents JVT-K050r1 (non-integrated form) and JVT-K051r1 (integrated form), March 2004; and Fidelity Range Extensions documents JVT-L047 (non-integrated form) and JVT-L050 (integrated form ), July 2004

以上を鑑みると、ベスト予測モード選択のための演算量を削減した動画像符号化装置が望まれる。   In view of the above, there is a demand for a video encoding apparatus that reduces the amount of calculation for selecting the best prediction mode.

動画像符号化装置は、縮小画画像に基づいて動き予測を行なう縮小画動き予測部と、前記縮小画動き予測部による動き予測の結果に基づいてスキップモード予測処理、インター予測処理、及びイントラ予測処理の何れか1つの予測処理を選択する予測処理選択部と、前記選択された1つの予測処理を縮小されていない画像に対して実行する予測部とを含み、前記予測処理選択部は、前記縮小画動き予測部による動き予測により得られた初期動きベクトル及び初期コストに基づいて、着目矩形画像領域に隣接する矩形画像領域の動きベクトルから予測される予測動きベクトルと前記初期動きベクトルとの差分絶対値を求め、前記差分絶対値と複数の第1の閾値とを比較するとともに前記初期コストと複数の第2の閾値とを比較する比較処理を実行し、前記比較処理の結果に基づいてスキップモード予測処理、インター予測処理、及びイントラ予測処理の何れか1つを選択するThe moving image encoding apparatus includes a reduced image motion prediction unit that performs motion prediction based on a reduced image, and a skip mode prediction process, an inter prediction process, and an intra prediction based on a motion prediction result by the reduced image motion prediction unit. a prediction processing selection unit for selecting any one of the prediction processing of the processing, saw including a prediction unit to be executed for the selected one prediction process is not reduced image, the prediction processing selection unit, Based on the initial motion vector and the initial cost obtained by the motion prediction by the reduced image motion prediction unit, the predicted motion vector predicted from the motion vector of the rectangular image region adjacent to the target rectangular image region and the initial motion vector An absolute difference value is obtained, a comparison process for comparing the absolute difference value with a plurality of first threshold values and comparing the initial cost with a plurality of second threshold values is performed. And, skip mode prediction processing, the inter prediction operation, and selects one of the intra prediction process based on the results of the comparison process.

少なくとも1つの実施例によれば、縮小画動き予測部による動き予測の結果に基づいてスキップモード予測処理、インター予測処理、及びイントラ予測処理の何れか1つの予測処理を選択するので、ベスト予測モード選択のための演算量を削減することができる。   According to at least one embodiment, since one of the skip mode prediction processing, inter prediction processing, and intra prediction processing is selected based on the result of motion prediction by the reduced image motion prediction unit, the best prediction mode The amount of computation for selection can be reduced.

動画像符号化装置の構成の一例を示すブロック図である。It is a block diagram which shows an example of a structure of a moving image encoder. スキップモードを説明するための図である。It is a figure for demonstrating skip mode. 縮小画動き予測、予測処理選択動作、及びマクロブロックの予測処理動作の流れを示すフローチャートである。It is a flowchart which shows the flow of a reduction image motion prediction, prediction process selection operation | movement, and the prediction process operation | movement of a macroblock. 差分絶対値と初期ベストコストとの組み合わせに対して何れのモードが選択されるのかを視覚的に表わした図である。It is the figure which expressed visually which mode is chosen to the combination of a difference absolute value and an initial best cost. 各閾値と動画圧縮率との関係を示す図である。It is a figure which shows the relationship between each threshold value and a moving image compression rate. 図1の動画像符号化装置により得られる画質を従来技術との比較において示す図である。It is a figure which shows the image quality obtained by the moving image encoder of FIG. 1 in comparison with a prior art. 図1の動画像符号化装置を適用した動画像符号化システムの構成の一例を示す図である。It is a figure which shows an example of a structure of the moving image encoding system to which the moving image encoding device of FIG. 1 is applied.

以下に、本発明の実施例を添付の図面を用いて詳細に説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings.

図1は、動画像符号化装置の構成の一例を示すブロック図である。図1において、各ボックスで示される各機能ブロックと他の機能ブロックとの境界は、基本的には機能的な境界を示すものであり、物理的な位置の分離、電気的な信号の分離、制御論理的な分離等に対応するとは限らない。ハードウェアの場合、各機能ブロックは、他のブロックと物理的にある程度分離された1つのハードウェアモジュールであってもよいし、或いは他のブロックと物理的に一体となったハードウェアモジュール中の1つの機能を示したものであってもよい。ソフトウェアの場合、各機能ブロックは、他のブロックと論理的にある程度分離された1つのソフトウェアモジュールであってもよいし、或いは他のブロックと論理的に一体となったソフトモジュール中の1つの機能を示したものであってもよい。   FIG. 1 is a block diagram illustrating an example of a configuration of a video encoding device. In FIG. 1, the boundary between each functional block shown in each box and another functional block basically indicates a functional boundary, and separation of physical position, separation of electrical signals, It does not necessarily correspond to control logical separation or the like. In the case of hardware, each functional block may be one hardware module physically separated from other blocks to some extent, or in a hardware module physically integrated with other blocks. One function may be shown. In the case of software, each functional block may be one software module logically separated from other blocks to some extent, or one function in a software module logically integrated with another block. May be shown.

図1に示す動画像符号化装置1は、入力された動画データを圧縮し符号化する。動画像符号化装置1は、縮小画動き予測部2、予測処理選択部3、スキップモード予測部4、インター予測部5、イントラ予測部6、及び選択部7を含む。動画像符号化装置1は更に、DCT変換部8、量子化部9、可変長符号部10、逆量子化部11、逆DCT変換部12、フィルタ部13、減算部14、及び加算部15を有する。ここでDCTとは離散コサイン変換(Discrete Cosine Transform)であり、離散信号を周波数領域の信号に変換する処理である。   A moving image encoding apparatus 1 shown in FIG. 1 compresses and encodes input moving image data. The moving image encoding apparatus 1 includes a reduced image motion prediction unit 2, a prediction process selection unit 3, a skip mode prediction unit 4, an inter prediction unit 5, an intra prediction unit 6, and a selection unit 7. The moving image encoding apparatus 1 further includes a DCT conversion unit 8, a quantization unit 9, a variable length encoding unit 10, an inverse quantization unit 11, an inverse DCT conversion unit 12, a filter unit 13, a subtraction unit 14, and an addition unit 15. Have. Here, DCT is a Discrete Cosine Transform, which is a process of converting a discrete signal into a frequency domain signal.

画像符号化装置1の入力は、原画像データ20及び参照画像データ21である。動画像符号化装置1の出力は符号化したストリーム23及びローカルデコード画像22である。ローカルデコード画像22は、あるフレームの符号化処理により生成された符号を復号化することにより再構成した画像であり、次のフレームを符号化処理する際に参照画像として用いられる。   The input of the image encoding device 1 is original image data 20 and reference image data 21. The output of the moving image encoding apparatus 1 is an encoded stream 23 and a local decoded image 22. The local decoded image 22 is an image reconstructed by decoding a code generated by encoding a certain frame, and is used as a reference image when the next frame is encoded.

縮小画動き予測部2は、縮小画画像に基づいて動き予測を行なう。詳しくは、縮小画動き予測部2は、まず、原画の入力画像20と参照画像21とをサイズ縮小する縮小処理を実行する。この縮小処理は、元の画像の画素を所定数毎に間引くことにより実行してよいし、また空間フィルタや時間フィルタをかけた後に画素を間引くことにより実行してもよい。縮小処理の縮小倍数は特に限定されない。また横方向の縮小率と縦方向の縮小率とは同一であってもよいし、異なっていてもよい。次に、縮小画動き予測部2は、縮小後の予測対象ブロック(縮小後の着目矩形領域)に対し、その前方、後方、或いはその両方のフレームの縮小後参照画像を用いて動き予測を行なう。具体的には、縮小画動き予測部2は、動きベクトルが示す位置にある参照画像中の画像ブロックと予測対象ブロックとの間の誤差(例えば画素毎の差分の絶対値和)を複数の動きベクトルに対して求め、この誤差が最小となる最適な動きベクトルを検出する。この最適な動きベクトル(初期ベスト動きベクトル)に対応する参照画像中の位置の画像ブロックと予測対象ブロックとの誤差(例えば画素毎の差分の絶対値和)が初期ベストコストである。このようにして、縮小画動き予測部2からは、初期ベスト動きベクトル及び初期ベストコストが出力される。   The reduced image motion prediction unit 2 performs motion prediction based on the reduced image. Specifically, the reduced image motion prediction unit 2 first executes a reduction process for reducing the size of the input image 20 and the reference image 21 of the original image. This reduction processing may be executed by thinning out pixels of the original image by a predetermined number, or may be executed by thinning out pixels after applying a spatial filter or a time filter. The reduction multiple of the reduction process is not particularly limited. Further, the reduction ratio in the horizontal direction and the reduction ratio in the vertical direction may be the same or different. Next, the reduced image motion prediction unit 2 performs motion prediction on the prediction target block after reduction (the target rectangular area after reduction) using the reduced reference images of the front, rear, or both frames thereof. . Specifically, the reduced image motion prediction unit 2 converts an error (for example, the sum of absolute values of differences for each pixel) between the image block in the reference image at the position indicated by the motion vector and the prediction target block into a plurality of motions. An optimum motion vector that minimizes this error is detected for the vector. An error between the image block at the position in the reference image corresponding to this optimal motion vector (initial best motion vector) and the prediction target block (for example, the sum of absolute values of differences for each pixel) is the initial best cost. Thus, the reduced image motion prediction unit 2 outputs the initial best motion vector and the initial best cost.

予測処理選択部3は、縮小画動き予測部2による動き予測の結果に基づいてスキップモード予測処理、インター予測処理、及びイントラ予測処理の何れか1つの予測処理を選択する。具体的には、予測処理選択部3は、縮小画動き予測部2による動き予測により得られた初期ベスト動きベクトル及び初期ベストコストに基づいて、予測対象ブロックに適用する1つの予測処理を選択する。予測処理選択部3は、例えばスイッチSW1を切り換えることにより、スキップモード予測部4、インター予測部5、及びイントラ予測部6のうちの選択された予測処理に対応する予測部を動作させる。この予測部が、選択された1つの予測処理を縮小されていない画像に対して実行する。   The prediction process selection unit 3 selects any one of the skip mode prediction process, the inter prediction process, and the intra prediction process based on the motion prediction result by the reduced image motion prediction unit 2. Specifically, the prediction process selection unit 3 selects one prediction process to be applied to the prediction target block based on the initial best motion vector and the initial best cost obtained by the motion prediction by the reduced image motion prediction unit 2. . The prediction process selection unit 3 operates a prediction unit corresponding to the selected prediction process among the skip mode prediction unit 4, the inter prediction unit 5, and the intra prediction unit 6, for example, by switching the switch SW1. The prediction unit executes one selected prediction process on an unreduced image.

予測処理選択部3によりスキップモード予測処理が選択されると、スキップモード予測部4が、入力画像20と参照画像21とに基づいて、スキップモードでの予測処理を実行する。スキップモードでは、予測誤差が最小になる動きベクトルを検出するのではなく、着目ブロックの周囲のブロックの情報から動きベクトルを予測し、この予測動きベクトルが示す位置にある隣接フレーム内のブロックが着目ブロックに等しいとして扱う。符号化後の情報には、着目ブロックがスキップモードであることを示す情報のみが含まれ、誤差の符号化情報や動きベクトルの情報は含まれない。一般にスキップモードは、画像中で変化がない静止部分や、纏まった領域が一様に運動する単純な動きを示す部分等に適用される。   When the skip mode prediction process is selected by the prediction process selection unit 3, the skip mode prediction unit 4 executes the prediction process in the skip mode based on the input image 20 and the reference image 21. In skip mode, instead of detecting a motion vector that minimizes the prediction error, a motion vector is predicted from information about blocks around the target block, and the block in the adjacent frame at the position indicated by the predicted motion vector is focused. Treat as equal to block. The encoded information includes only information indicating that the block of interest is in the skip mode, and does not include error encoding information or motion vector information. In general, the skip mode is applied to a stationary portion where there is no change in the image, a portion showing a simple movement in which a grouped region moves uniformly, or the like.

図2は、スキップモードを説明するための図である。符号化対象フレームNにおいて、着目マクロブロック31が予測対象ブロック即ち符号化対象ブロックである。この着目マクロブロック31の予測動きベクトル(MVP)35は、基本的に、着目マクロブロック31の左隣接のマクロブロック32、上隣接のマクロブロック33、及び右上隣接のマクロブロック34のそれぞれの動きベクトルから求められる。この予測動きベクトルを求める方法はH.264に規定されている。スキップモードでは、上記求めた予測動きベクトルが示す画面位置にある1つ前のフレームN−1のマクロブロック36が、フレームNの着目マクロブロック31に等しいものとして扱う。即ち、復号化側では、当該マクロブロック31がスキップモードであることを検出すると、予測動きベクトルが示す直前のフレームN−1のマクロブロック36をコピーして当該マクロブロック31とする。   FIG. 2 is a diagram for explaining the skip mode. In the encoding target frame N, the target macroblock 31 is a prediction target block, that is, an encoding target block. The predicted motion vector (MVP) 35 of the target macroblock 31 is basically the respective motion vectors of the left adjacent macroblock 32, the upper adjacent macroblock 33, and the upper right adjacent macroblock 34 of the target macroblock 31. It is requested from. The method of obtaining this predicted motion vector is described in H.264. In the skip mode, the macroblock 36 of the previous frame N-1 at the screen position indicated by the calculated motion vector predictor is treated as being equal to the macroblock 31 of interest of the frame N. That is, on the decoding side, when it is detected that the macroblock 31 is in the skip mode, the macroblock 36 of the immediately preceding frame N-1 indicated by the predicted motion vector is copied and made the macroblock 31.

図1に戻り、予測処理選択部2によりインター予測処理が選択されると、インター予測部5が、入力画像20と参照画像21とに基づいて、複数のインター予測モードのうちから最適なインター予測モードを選択して実行する。これにより、入力画像20の予測対象ブロックに対し、その前方、後方、或いはその両方のフレームの参照画像21から最も類似したブロックが抜き出され又は生成されて予測画像となる。具体的には、インター予測部5は、動きベクトルが示す位置にある参照画像21中の画像ブロックと予測対象ブロックとの間の誤差(例えば画素毎の差分の絶対値和)を複数の動きベクトルに対して求め、この誤差が最小となる最適な動きベクトルを検出する。この最適な動きベクトルに対応する参照画像21中の位置の画像ブロックと予測対象ブロックとの誤差(例えば画素毎の差分の絶対値和)がベストコストである。インター予測部5は、インター予測処理の複数の予測モードの各々に対して最適な動きベクトルとベストコストとを求め、ベストコストが最小となる予測モードを選択する。この選択された予測モードにおける最適な動きベクトルと予測画像とが、インター予測部5から出力される。なおインター予測部5は、最適な動きベクトルを探索する際に、参照画像21中の探索領域を、縮小画動き予測部2が求めた初期ベスト動きベクトルに応じた位置に設定してよい。これにより探索領域の大きさを狭め、効率的な動きベクトル探索を実現し、演算量を削減することができる。   Returning to FIG. 1, when the inter prediction process is selected by the prediction process selection unit 2, the inter prediction unit 5 selects the optimal inter prediction from among a plurality of inter prediction modes based on the input image 20 and the reference image 21. Select a mode and execute. Thereby, with respect to the prediction target block of the input image 20, the most similar block is extracted or generated from the reference image 21 of the front, rear, or both of the frames, and becomes a predicted image. Specifically, the inter prediction unit 5 calculates an error (for example, the sum of absolute values of differences for each pixel) between the image block in the reference image 21 at the position indicated by the motion vector and the prediction target block, as a plurality of motion vectors. And an optimal motion vector that minimizes this error is detected. An error (for example, the sum of absolute values of differences for each pixel) between the image block at the position in the reference image 21 corresponding to the optimal motion vector and the prediction target block is the best cost. The inter prediction unit 5 obtains the optimal motion vector and the best cost for each of the plurality of prediction modes of the inter prediction process, and selects the prediction mode that minimizes the best cost. The optimal motion vector and predicted image in the selected prediction mode are output from the inter prediction unit 5. The inter prediction unit 5 may set the search region in the reference image 21 at a position corresponding to the initial best motion vector obtained by the reduced image motion prediction unit 2 when searching for an optimal motion vector. As a result, the size of the search area can be narrowed, an efficient motion vector search can be realized, and the amount of calculation can be reduced.

また予測処理選択部2によりイントラ予測処理が選択されると、イントラ予測部6が、入力画像20と符号化済みの隣接ブロックの画素27とに基づいて、複数のイントラ予測モードのうちから最適なイントラ予測モードを選択して実行する。具体的には、イントラ予測部6は、入力画像20の予測対象ブロックに対し、それに隣接するブロックの画素27の値に基づいて予測画像を生成する。この際、異なるブロックサイズ及び異なる予測方向に対応して複数種類のイントラ予測モードが存在する。イントラ予測部6は、複数の予測モードの各々に対して予測画像を生成し、生成した予測画像と予測対象ブロックとの誤差(例えば画素毎の差分の絶対値和)が最小となる予測モードを選択する。この選択された予測モードにおける予測画像が、イントラ予測部6から出力される。   Further, when the intra prediction process is selected by the prediction process selection unit 2, the intra prediction unit 6 selects the optimum one of the plurality of intra prediction modes based on the input image 20 and the encoded pixel 27 of the adjacent block. Select and execute the intra prediction mode. Specifically, the intra prediction unit 6 generates a prediction image for the prediction target block of the input image 20 based on the value of the pixel 27 of the block adjacent thereto. At this time, there are a plurality of types of intra prediction modes corresponding to different block sizes and different prediction directions. The intra prediction unit 6 generates a prediction image for each of a plurality of prediction modes, and selects a prediction mode in which an error between the generated prediction image and a prediction target block (for example, an absolute value sum of differences for each pixel) is minimized. select. A prediction image in the selected prediction mode is output from the intra prediction unit 6.

選択部7は、予測処理選択部3による選択結果に応じてスイッチSW2を切り換えることにより、スキップモード予測部4、インター予測部5、及びイントラ予測部6のうち選択された1つの予測処理の予測部の出力を受け取り、予測画像24を出力する。この予測画像24は、スキップ予測処理、インター予測処理、又はイントラ予測処理において隣接フレームのマクロブロックあるいは同一フレームの隣接マクロブロックに基づいて生成された画像である。なおスキップモードが選択された場合には、予測画像24を出力することなく、可変長符号部10が生成するストリーム23に当該予測対象ブロックがスキップモードであることを示す情報を含める等の適切な処理を実行するように動画像符号化装置1が動作してもよい。   The selection unit 7 switches the switch SW <b> 2 according to the selection result by the prediction process selection unit 3, thereby predicting one prediction process selected from the skip mode prediction unit 4, the inter prediction unit 5, and the intra prediction unit 6. The output of the part is received and the prediction image 24 is output. The predicted image 24 is an image generated based on a macroblock of an adjacent frame or an adjacent macroblock of the same frame in skip prediction processing, inter prediction processing, or intra prediction processing. When the skip mode is selected, appropriate information such as including information indicating that the prediction target block is in the skip mode is included in the stream 23 generated by the variable length coding unit 10 without outputting the predicted image 24. The video encoding device 1 may operate so as to execute the processing.

差分器14は、入力画像20とその予測結果である予測画像24との差分を計算し、その差分値を予測誤差25として出力する。DCT変換部8は、離散コサイン変換を実行することにより、予測誤差25を周波数領域のデータであるDCT係数に変換する。量子化部9は、DCT係数を量子化ステップで除算して整数値に丸める処理を実行することにより、DCT係数を量子化する。可変長符号部10は、量子化後のDCT係数値のうち、出現頻度の高い情報を短い符号で表現し、出現頻度の低い情報を長い符号で表現することにより、全体として出力ビット数を減らす処理を行い、符号化データ23を出力する。   The differentiator 14 calculates the difference between the input image 20 and the prediction image 24 that is the prediction result, and outputs the difference value as a prediction error 25. The DCT transform unit 8 transforms the prediction error 25 into DCT coefficients that are frequency domain data by executing discrete cosine transform. The quantization unit 9 quantizes the DCT coefficient by executing a process of dividing the DCT coefficient by a quantization step and rounding it to an integer value. The variable-length code unit 10 reduces the number of output bits as a whole by expressing information with high appearance frequency with short codes and expressing information with low appearance frequency with long codes among the quantized DCT coefficient values. Processing is performed and encoded data 23 is output.

逆量子化部11は、量子化部9により量子化された予測誤差を逆量子化する。逆量子化した予測誤差は、逆DCT変換部12により逆変換され、DCT係数値に変換される前の予測誤差26が復元される。加算部15はスキップモード予測部4、インター予測部5、又はイントラ予測部6により生成された予測画像24と復元された予測誤差26とを加算し、画像27を再構成する。再構成された画像27は、フィルタ部13に入力される。フィルタ部13は、デブロッキング・フィルタとも呼ばれ、再構成画像27のブロック境界に現れるブロックひずみを減少させる処理を行ない、処理後の画像をローカルデコード画像22として出力する。ローカルデコード画像22は、外部のメモリに格納され、次のフレームを処理する時にスキップモード予測部4又はインター予測部5によるフレーム間予測処理のための参照画像として用いられる。   The inverse quantization unit 11 inversely quantizes the prediction error quantized by the quantization unit 9. The inversely quantized prediction error is inversely converted by the inverse DCT conversion unit 12 to restore the prediction error 26 before being converted into DCT coefficient values. The adding unit 15 adds the prediction image 24 generated by the skip mode prediction unit 4, the inter prediction unit 5, or the intra prediction unit 6 and the restored prediction error 26 to reconstruct the image 27. The reconstructed image 27 is input to the filter unit 13. The filter unit 13 is also called a deblocking filter, performs a process of reducing block distortion appearing at the block boundary of the reconstructed image 27, and outputs the processed image as a local decoded image 22. The local decoded image 22 is stored in an external memory, and is used as a reference image for inter-frame prediction processing by the skip mode prediction unit 4 or the inter prediction unit 5 when the next frame is processed.

図3は、縮小画動き予測、予測処理選択動作、及びマクロブロックの予測処理動作の流れを示すフローチャートである。ステップS1で、縮小画動き予測部2が、縮小画を用いて動き予測を実行する。この動き予測の結果として、初期ベスト動きベクトルPME_MVと初期ベストコストPME_COSTとが求められる。   FIG. 3 is a flowchart showing the flow of reduced image motion prediction, prediction process selection operation, and macroblock prediction process operation. In step S1, the reduced image motion prediction unit 2 executes motion prediction using the reduced image. As a result of this motion prediction, an initial best motion vector PME_MV and an initial best cost PME_COST are obtained.

次のステップS2及びステップS3で、予測処理選択部3が、スキップモード予測処理、インター予測処理、及びイントラ予測処理の何れか1つを選択する。具体的には、予測処理選択部3は、まず、着目マクロブロックに隣接するマクロブロックの動きベクトルから予測動きベクトルMVPを求める。これは、図2を用いて説明した予測動きベクトルMVPを求める処理と同様である。予測処理選択部3は、次に、予測動きベクトルMVPと初期ベスト動きベクトルPME_MVとの差分絶対値PME_MVD(=|PME_MV−MVP|)を求める。予測処理選択部3は、更に、前記差分絶対値PME_MVDと複数の第1の閾値とを比較するとともに初期ベストコストPME_COSTと複数の第2の閾値とを比較する比較処理を実行し、前記比較処理の結果に基づいて1つの予測処理を選択する。   In the next step S2 and step S3, the prediction process selection unit 3 selects any one of the skip mode prediction process, the inter prediction process, and the intra prediction process. Specifically, the prediction process selection unit 3 first obtains a predicted motion vector MVP from the motion vector of a macroblock adjacent to the target macroblock. This is the same as the process for obtaining the predicted motion vector MVP described with reference to FIG. Next, the prediction process selection unit 3 obtains an absolute difference value PME_MVD (= | PME_MV−MVP |) between the predicted motion vector MVP and the initial best motion vector PME_MV. The prediction process selection unit 3 further performs a comparison process that compares the absolute difference value PME_MVD with a plurality of first threshold values and compares an initial best cost PME_COST with a plurality of second threshold values, and performs the comparison process. One prediction process is selected based on the result.

具体的には、ステップS2で、差分絶対値PME_MVDと初期ベストコストPME_COSTとが以下の式(1)の条件1を満たすか否かを判断する。   Specifically, in step S2, it is determined whether or not the absolute difference value PME_MVD and the initial best cost PME_COST satisfy the condition 1 of the following equation (1).

PME_MVD≦α1 & PME_COST≦β1 ・・・(1)
ここでα1及びβ1は、適宜設定された閾値であり、「&」はAND論理を示す。上記の式(1)の条件1を満たす場合には、ベクトルの差分絶対値が十分に小さく、且つ、初期ベストコストが十分に小さい。ベクトルの差分絶対値が十分に小さいということは、初期ベスト動きベクトルと周囲の隣接ブロックから求めた予測動きベクトルとの差が十分に小さいということである。即ち、当該マクロブロックが、周囲のマクロブロックと共に纏まった領域として一様に運動又は静止している可能性が高いことになる。この場合、スキップモードが適している状況である可能性がある。また、初期ベスト動きベクトルと予測動きベクトルとの差が十分に小さいということは更に、予測動きベクトルMVPが十分信頼できるものであり、予測動きベクトルMVPに基づいて予測するスキップモードが適していることになる。また更に、初期ベストコストが十分に小さいので、着目ブロックが参照画像に等しいそのままの画像であるとして扱うスキップモードが適していることになる。従って、ベクトルの差分絶対値が十分に小さく、且つ、初期ベストコストが十分に小さい場合には、スキップモードを予測モードとして選択する。
PME_MVD ≦ α1 & PME_COST ≦ β1 (1)
Here, α1 and β1 are appropriately set threshold values, and “&” indicates AND logic. When the condition 1 of the above formula (1) is satisfied, the absolute value of the vector difference is sufficiently small, and the initial best cost is sufficiently small. That the absolute value of the vector difference is sufficiently small means that the difference between the initial best motion vector and the predicted motion vector obtained from surrounding neighboring blocks is sufficiently small. That is, there is a high possibility that the macroblock is uniformly moving or stationary as a region gathered together with surrounding macroblocks. In this case, there is a possibility that the skip mode is suitable. In addition, the difference between the initial best motion vector and the predicted motion vector being sufficiently small means that the predicted motion vector MVP is sufficiently reliable, and the skip mode for predicting based on the predicted motion vector MVP is suitable. become. Furthermore, since the initial best cost is sufficiently small, a skip mode that treats the target block as an intact image equal to the reference image is suitable. Therefore, when the absolute difference value of the vector is sufficiently small and the initial best cost is sufficiently small, the skip mode is selected as the prediction mode.

このようにステップS2で式(1)の条件1を満たす場合には、スキップモードを選択するとして、ステップS4に進む。ステップS4では、スキップモードでのベストコストを求める。即ち、スキップモードでの予測処理を実行する。その後ステップS8で、着目マクロブロックのベスト・モードの結果(この場合はスキップモードの結果)を予測結果として出力する。   As described above, when the condition 1 of the expression (1) is satisfied in step S2, the skip mode is selected and the process proceeds to step S4. In step S4, the best cost in the skip mode is obtained. That is, the prediction process in the skip mode is executed. Thereafter, in step S8, the best mode result (in this case, the skip mode result) of the macro block of interest is output as a prediction result.

ステップS2でスキップモードが選択されなかった場合、次にステップS3で、差分絶対値PME_MVDと初期ベストコストPME_COSTとが以下の式(2)の条件2を満たすか否かを判断する。   If the skip mode is not selected in step S2, it is next determined in step S3 whether or not the absolute difference value PME_MVD and the initial best cost PME_COST satisfy the condition 2 of the following equation (2).

(PME_MVD≦α2 & PME_COST≦β3) OR (PME_COST≦β2 & PME_MVD≦α3)
・・・(2)
ここでα2、α3、β2、及びβ3は、適宜設定された閾値であり、「&」はAND論理を示し、「OR」はOR論理を示す。α1<α2<α3であり、β1<β2<β3である。上記の式(2)の条件2を満たす場合には、ベクトルの差分絶対値が小さく(≦α2)且つ初期ベストコストがそれ程大きくはない(≦β3)、又は、初期ベストコストが小さく(≦β2)且つベクトルの差分絶対値がそれ程大きくはない(≦α3)。
(PME_MVD ≦ α2 & PME_COST ≦ β3) OR (PME_COST ≦ β2 & PME_MVD ≦ α3)
... (2)
Here, α2, α3, β2, and β3 are appropriately set thresholds, “&” indicates AND logic, and “OR” indicates OR logic. α1 <α2 <α3 and β1 <β2 <β3. When the condition 2 of the above equation (2) is satisfied, the absolute value of the vector difference is small (≦ α2) and the initial best cost is not so large (≦ β3), or the initial best cost is small (≦ β2). ) And the absolute value of the vector difference is not so large (≦ α3).

ベクトルの差分絶対値が小さい(≦α2)ということは、初期ベスト動きベクトルと周囲の隣接ブロックから求めた予測動きベクトルとの差が小さいということである。即ち、当該マクロブロックが、周囲のマクロブロックと共に纏まった領域として一様に運動又は静止している可能性が高いことになる。この場合、初期ベストコストがα1よりも大きい(ステップS2でスキップモードが選択されていない)ので、スキップモードのように着目ブロックが参照画像に等しいそのままの画像であるとして扱うことはできない。しかしながら初期ベストコストがそれ程大きくはない(≦β3)ので、動き予測が十分に信頼できるものであり、着目ブロックと参照画像との誤差を符号化するインター予測が適していると判断する。   The small absolute value of the vector (≦ α2) means that the difference between the initial best motion vector and the predicted motion vector obtained from surrounding neighboring blocks is small. That is, there is a high possibility that the macroblock is uniformly moving or stationary as a region gathered together with surrounding macroblocks. In this case, since the initial best cost is larger than α1 (the skip mode is not selected in step S2), the block of interest cannot be treated as the same image as the reference image as in the skip mode. However, since the initial best cost is not so high (≦ β3), it is determined that the motion prediction is sufficiently reliable, and inter prediction that encodes the error between the block of interest and the reference image is suitable.

また初期ベストコストが小さい(≦β2)ということは、初期ベスト動きベクトルに基づく動き予測が信頼できるということである。この場合、ベクトルの差分絶対値がα1よりも大きい(ステップS2でスキップモードが選択されていない)ので、予測動きベクトルMVPにそれ程信頼性がなく、スキップモードのように予測動きベクトルMVPに基づいて予測することは適切でない。しかしながらベクトルの差分絶対値がそれ程大きくはない(≦α3)ので、初期ベストコストが偶然に低い状況なのではなく、検出した初期ベスト動きベクトルが十分に信頼できるものであると考えられる。従って、探索範囲から最適な動きベクトルを検出して予測をするインター予測が適していると判断する。   The small initial best cost (≦ β2) means that the motion prediction based on the initial best motion vector is reliable. In this case, since the absolute difference value of the vector is larger than α1 (the skip mode is not selected in step S2), the predicted motion vector MVP is not so reliable, and based on the predicted motion vector MVP as in the skip mode. It is not appropriate to predict. However, since the absolute difference value of the vector is not so large (≦ α3), it is considered that the detected initial best motion vector is sufficiently reliable, not the situation where the initial best cost is accidentally low. Therefore, it is determined that inter prediction in which an optimal motion vector is detected from the search range and prediction is performed is suitable.

このようにステップS3で式(2)の条件2を満たす場合には、インター予測処理を選択するとして、ステップS6に進む。ステップS6では、縮小されていない入力画像及び参照画像を用いて動き予測処理を実行する。次にステップS7で、複数のインター予測モードのうちのベストコストを求める。即ち、インター予測のうちのベストな予測モードを決定する。その後ステップS8で、着目マクロブロックのベスト・モードの結果(この場合はベストインター予測モードの結果)を予測結果として出力する。   As described above, when the condition 2 of the expression (2) is satisfied in step S3, the inter prediction process is selected, and the process proceeds to step S6. In step S6, a motion prediction process is executed using the unreduced input image and reference image. Next, in step S7, the best cost among a plurality of inter prediction modes is obtained. That is, the best prediction mode of inter prediction is determined. Thereafter, in step S8, the best mode result (in this case, the best inter prediction mode result) of the macroblock of interest is output as a prediction result.

ステップS3で式(2)の条件2を満たさない場合には、着目マクロブロックに対しては動き予測が適していないと判断して、イントラ予測処理を選択する。この場合、ステップS5で、複数のイントラ予測モードのうちのベストコストを求める。即ち、イントラ予測のうちのベストな予測モードを決定する。その後ステップS8で、着目マクロブロックのベスト・モードの結果(この場合はベストイントラ予測モードの結果)を予測結果として出力する。   When the condition 2 of Expression (2) is not satisfied in step S3, it is determined that motion prediction is not suitable for the macro block of interest, and the intra prediction process is selected. In this case, in step S5, the best cost among a plurality of intra prediction modes is obtained. That is, the best prediction mode of intra prediction is determined. Thereafter, in step S8, the result of the best mode of the macroblock of interest (in this case, the result of the best intra prediction mode) is output as the prediction result.

図4は、差分絶対値と初期ベストコストとの組み合わせに対して何れのモードが選択されるのかを視覚的に表わした図である。図4には、横軸に差分絶対値PME_MVDをとり縦軸に初期ベストコストPME_COSTをとった平面が示されている。この平面上において、領域40の内部の点に対応する差分絶対値と初期ベストコストとの組み合わせに対しては、スキップモードが選択される。また領域40の外であり且つ領域41の内部の点に対応する差分絶対値と初期ベストコストとの組み合わせに対しては、インター予測モードが選択される。更に領域41の外の点に対応する差分絶対値と初期ベストコストとの組み合わせに対しては、イントラ予測モードが選択される。図4に示される例のように、例えば、α1を2、α2を6、α3を16、β1をQP、β2を4×QP、β3を8×QPに設定してよい。ここでα1乃至α3の単位は画素であってよい。この例では、β1乃至β3は、動画圧縮率QPの関数となっている。同様に、α1乃至α3についても、動画圧縮率QPの関数としてよい。   FIG. 4 is a diagram visually representing which mode is selected for the combination of the absolute difference value and the initial best cost. FIG. 4 shows a plane in which the horizontal axis represents the difference absolute value PME_MVD and the vertical axis represents the initial best cost PME_COST. On this plane, the skip mode is selected for the combination of the absolute difference value corresponding to the point inside the region 40 and the initial best cost. Further, the inter prediction mode is selected for the combination of the absolute difference value corresponding to the points outside the region 40 and inside the region 41 and the initial best cost. Further, the intra prediction mode is selected for the combination of the absolute difference value corresponding to the point outside the region 41 and the initial best cost. As shown in FIG. 4, for example, α1 may be set to 2, α2 to 6, α3 to 16, β1 to QP, β2 to 4 × QP, and β3 to 8 × QP. Here, the unit of α1 to α3 may be a pixel. In this example, β1 to β3 are functions of the moving image compression rate QP. Similarly, α1 to α3 may be a function of the moving image compression rate QP.

図5は、各閾値と動画圧縮率との関係を示す図である。図5の横軸は動画圧縮率QPを示し、縦軸は閾値α1乃至α3及びβ1乃至β3の値を示す。H.264では直交変換デ得られた係数に対して、量子ステップで除算した結果を整数値に丸める量子化処理が行なわれる。この量子化ステップの大きさを調整することにより、符号化したビット数を増減することができる。量子化ステップが小さい場合は、量子化誤差が小さく、復号画像の画質が高くなるが、符号化データの圧縮率が低い。逆に、量子化ステップが大きい場合は、量子化誤差が大きく、復号画像の画質が低いが、符号化データの圧縮率が高い。H.264では、量子化ステップの値は量子化パラメータQP(Quantization Parameter)から導出する。量子化パラメータQPが大きくなると、量子化ステップが大きくなり、量子化誤差が大きくなり、動画圧縮率が高くなる。図5の横軸は動画圧縮率として量子化パラメータQPの値をとっている。   FIG. 5 is a diagram illustrating the relationship between each threshold value and the moving image compression rate. The horizontal axis of FIG. 5 indicates the moving image compression rate QP, and the vertical axis indicates the values of the thresholds α1 to α3 and β1 to β3. H. In H.264, the coefficient obtained by orthogonal transformation is subjected to quantization processing for rounding the result obtained by dividing by a quantum step to an integer value. The number of encoded bits can be increased or decreased by adjusting the size of the quantization step. When the quantization step is small, the quantization error is small and the quality of the decoded image is high, but the compression rate of the encoded data is low. Conversely, when the quantization step is large, the quantization error is large and the quality of the decoded image is low, but the compression rate of the encoded data is high. H. In H.264, the value of the quantization step is derived from a quantization parameter QP (Quantization Parameter). As the quantization parameter QP increases, the quantization step increases, the quantization error increases, and the moving image compression rate increases. The horizontal axis of FIG. 5 takes the value of the quantization parameter QP as the moving image compression rate.

一般に、スキップモードが最も圧縮率が高く、インター予測処理が次に圧縮率が高く、イントラ予測処理が最も圧縮率が低い。従って、動画圧縮率QPが大きい場合には、イントラ予測処理よりも、インター予測処理を選択するのが好ましく、更に、インター予測処理よりもスキップモード予測処理を選択するのが好ましい。従って、図5に示すように、動画圧縮率QPが大きくなるにつれて、閾値α2、α3、β2、β3が大きくなるように設定し、イントラ予測処理を選択するよりもインター予測処理を選択する割合が増加するように設定する。また動画圧縮率QPが大きくなるにつれて、閾値α1及びβ1が大きくなるように設定し、インター予測処理を選択するよりもスキップモードを選択する割合が増加するように設定する。このように、量子化部による量子化の誤差に応じて各閾値を変化させることで、適切な符号化を実現することができる。   In general, skip mode has the highest compression rate, inter prediction processing has the next highest compression rate, and intra prediction processing has the lowest compression rate. Therefore, when the moving picture compression rate QP is large, it is preferable to select the inter prediction process rather than the intra prediction process, and it is more preferable to select the skip mode prediction process than the inter prediction process. Therefore, as shown in FIG. 5, the thresholds α2, α3, β2, and β3 are set so as to increase as the video compression ratio QP increases, and the ratio of selecting the inter prediction process is higher than selecting the intra prediction process. Set to increase. Further, the threshold values α1 and β1 are set to increase as the moving image compression rate QP increases, and the ratio for selecting the skip mode is set to increase rather than selecting the inter prediction process. In this way, appropriate encoding can be realized by changing each threshold value according to the quantization error by the quantization unit.

図6は、図1の動画像符号化装置により得られる画質を従来技術との比較において示す図である。入力動画像シーケンスとしてHDTV_Parkjoyを用いた場合に、各復号量ビットレート(Mbps)に対して、復号画像の画質PSNR(ピーク信号対雑音比)がデシベル単位で示されている。特性曲線61が、図3に示す動画像符号化方法により得られた画像の画質を示し、特性曲線62が、全予測モードを計算してベスト予測モードを特定する従来の動画像符号化方法により得られた画像の画質を示す。図6に示されるように、図3の動画像符号化方法を用いた場合、同一の復号量ビットレートにおいて従来の動画像符号化方法に比較して約0.2dB程度しか画質が低下しておらず、実質的には略同程度の画質が得られていると言える。   FIG. 6 is a diagram showing the image quality obtained by the moving picture coding apparatus of FIG. 1 in comparison with the prior art. When HDTV_Parkjoy is used as the input moving image sequence, the image quality PSNR (peak signal-to-noise ratio) of the decoded image is shown in decibels for each decoding amount bit rate (Mbps). A characteristic curve 61 shows the image quality of the image obtained by the moving picture coding method shown in FIG. 3, and a characteristic curve 62 is calculated by a conventional moving picture coding method that calculates all prediction modes and identifies the best prediction mode. The image quality of the obtained image is shown. As shown in FIG. 6, when the moving picture encoding method of FIG. 3 is used, the image quality is reduced by about 0.2 dB compared to the conventional moving picture encoding method at the same decoding amount bit rate. In other words, it can be said that substantially the same image quality is obtained.

図7は、図1の動画像符号化装置を適用した動画像処理システムの構成の一例を示す図である。図7に示す動画像処理システム71は、例えばデジタルカメラ或いはビデオレコーダであり、レンズ72、CCD又はCMOSのセンサ73、CPU又はDSPであるマイクロプロセッサ74、及びH.264に準拠したコーデック75を含む。動画像処理システム71は、内部メモリとして内蔵されるか或いは外部メモリとして取り外し可能なメモリ76と、外部メモリとして取り外し可能なメディア77とを備えている。   FIG. 7 is a diagram illustrating an example of a configuration of a moving image processing system to which the moving image encoding apparatus of FIG. 1 is applied. A moving image processing system 71 shown in FIG. 7 is, for example, a digital camera or a video recorder, and includes a lens 72, a CCD or CMOS sensor 73, a microprocessor 74 that is a CPU or DSP, H.264-compliant codec 75 is included. The moving image processing system 71 includes a memory 76 that is built in as an internal memory or removable as an external memory, and a medium 77 that is removable as an external memory.

撮像対象からの入力光は、レンズ72を介してセンサ73に入射される。センサ73は画像を1枚ずつ生成し、生成された画像がコーデック75に順次入力される。コーデック75は、図1に示した動画像符号化装置を含むものであり、図3に示す動画像符号化方法により、順次入力される画像からなる動画像データを符号化して圧縮する。コーデック75が生成した符号化後のストリームは、外部メディア77に保存される。する。CPU或いはDSPであるマイクロプロセッサ74は、動画像処理システム71の全体の動作を制御する。コーデック75は、動画を圧縮する際にメモリ76をバッファメモリとして使用する。   Input light from the imaging target enters the sensor 73 through the lens 72. The sensor 73 generates images one by one, and the generated images are sequentially input to the codec 75. The codec 75 includes the moving image encoding apparatus shown in FIG. 1, and encodes and compresses moving image data composed of sequentially input images by the moving image encoding method shown in FIG. The encoded stream generated by the codec 75 is stored in the external medium 77. To do. A microprocessor 74, which is a CPU or DSP, controls the overall operation of the moving image processing system 71. The codec 75 uses the memory 76 as a buffer memory when compressing a moving image.

以上、本発明を実施例に基づいて説明したが、本発明は上記実施例に限定されるものではなく、特許請求の範囲に記載の範囲内で様々な変形が可能である。   As mentioned above, although this invention was demonstrated based on the Example, this invention is not limited to the said Example, A various deformation | transformation is possible within the range as described in a claim.

なお本願発明は以下の内容を含むものである。
(付記1)
縮小画画像に基づいて動き予測を行なう縮小画動き予測部と、
前記縮小画動き予測部による動き予測の結果に基づいてスキップモード予測処理、インター予測処理、及びイントラ予測処理の何れか1つの予測処理を選択する予測処理選択部と、
前記選択された1つの予測処理を縮小されていない画像に対して実行する予測部と
を含むことを特徴とする動画像符号化装置。
(付記2)
前記予測部は、
前記予測処理選択部によりスキップモード予測処理が選択されると、スキップモードでの予測処理を実行するスキップ予測部と、
前記予測処理選択部によりインター予測処理が選択されると、複数のインター予測モードのうちから最適なインター予測モードを選択して実行するインター予測部と、
前記予測処理選択部によりイントラ予測処理が選択されると、複数のイントラ予測モードのうちから最適なイントラ予測モードを選択して実行するイントラ予測部と
を含むことを特徴とする付記1記載の動画像符号化装置。
(付記3)
前記予測処理選択部は、前記縮小画動き予測部による動き予測により得られた初期動きベクトル及び初期コストに基づいてスキップモード予測処理、インター予測処理、及びイントラ予測処理の何れか1つを選択することを特徴とする付記1又は2記載の動画像符号化装置。
(付記4)
前記予測処理選択部は、着目矩形画像領域に隣接する矩形画像領域の動きベクトルから予測される予測動きベクトルと前記初期動きベクトルとの差分絶対値を求め、前記差分絶対値と複数の第1の閾値とを比較するとともに前記初期コストと複数の第2の閾値とを比較する比較処理を実行し、前記比較処理の結果に基づいてスキップモード予測処理、インター予測処理、及びイントラ予測処理の何れか1つを選択することを特徴とする付記3記載の動画像符号化装置。
(付記5)
前記予測部が前記1つの予測処理を実行することにより得られた画像の予測誤差を係数に変換する変換部と、
前記変換部により得られた前記係数を量子化する量子化部と、
前記量子化部により得られた量子化後の前記係数を符号化する符号化部と
を更に含み、前記量子化部による量子化の誤差に応じて前記複数の第1の閾値及び前記複数の第2の閾値を変化させることを特徴とする付記4記載の動画像符号化装置。
(付記6)
縮小画画像に基づいて動き予測を行ない、
前記動き予測の結果に基づいてスキップモード予測処理、インター予測処理、及びイントラ予測処理の何れか1つの予測処理を選択し、
前記選択された1つの予測処理を縮小されていない画像に対して実行する
各段階を含むことを特徴とする動画像符号化方法。
(付記7)
前記選択された1つの予測処理を縮小されていない画像に対して実行する段階は、
スキップモード予測処理が選択されると、スキップモードでの予測処理を実行し、
インター予測処理が選択されると、複数のインター予測モードのうちから最適なインター予測モードを選択して実行し、
イントラ予測処理が選択されると、複数のイントラ予測モードのうちから最適なイントラ予測モードを選択して実行する
各段階を含むことを特徴とする付記6記載の動画像符号化方法。
(付記8)
前記1つの予測処理を選択する段階は、前記動き予測により得られた初期動きベクトル及び初期コストに基づいてスキップモード予測処理、インター予測処理、及びイントラ予測処理の何れか1つを選択することを特徴とする付記6又はや記載の動画像符号化方法。
(付記9)
前記1つの予測処理を選択する段階は、
着目矩形画像領域に隣接する矩形画像領域の動きベクトルから予測される予測動きベクトルと前記初期動きベクトルとの差分絶対値を求め、
前記差分絶対値と複数の第1の閾値とを比較するとともに前記初期コストと複数の第2の閾値とを比較する比較処理を実行し、
前記比較処理の結果に基づいてスキップモード予測処理、インター予測処理、及びイントラ予測処理の何れか1つを選択する
各段階を含むことを特徴とする付記8記載の動画像符号化方法。
(付記10)
前記1つの予測処理を実行することにより得られた画像の予測誤差を係数に変換し、
前記係数を量子化し、
量子化後の前記係数を符号化する
各段階を更に含み、前記量子化の誤差に応じて前記複数の第1の閾値及び前記複数の第2の閾値を変化させることを特徴とする付記9記載の動画像符号化装置。
(付記11)
動画像を撮像する撮像素子と、
前記動画像を符号化する符号化器と
を含み、前記符号化器は、
前記動画像を縮小して得られる縮小画画像に基づいて動き予測を行なう縮小画動き予測部と、
前記縮小画動き予測部による動き予測の結果に基づいてスキップモード予測処理、インター予測処理、及びイントラ予測処理の何れか1つの予測処理を選択する予測処理選択部と、
前記選択された1つの予測処理を縮小されていない画像に対して実行する予測部と
を含むことを特徴とする動画像処理システム。
The present invention includes the following contents.
(Appendix 1)
A reduced image motion prediction unit that performs motion prediction based on the reduced image,
A prediction process selection unit that selects any one of skip mode prediction process, inter prediction process, and intra prediction process based on the result of motion prediction by the reduced image motion prediction unit;
And a prediction unit that executes the selected one prediction process on an unreduced image.
(Appendix 2)
The prediction unit
When a skip mode prediction process is selected by the prediction process selection unit, a skip prediction unit that executes a prediction process in the skip mode;
When an inter prediction process is selected by the prediction process selection unit, an inter prediction unit that selects and executes an optimal inter prediction mode from among a plurality of inter prediction modes;
And an intra prediction unit that selects and executes an optimal intra prediction mode from among a plurality of intra prediction modes when an intra prediction process is selected by the prediction process selection unit. Image encoding device.
(Appendix 3)
The prediction process selection unit selects any one of a skip mode prediction process, an inter prediction process, and an intra prediction process based on an initial motion vector and an initial cost obtained by motion prediction by the reduced image motion prediction unit. The moving picture coding apparatus according to Supplementary Note 1 or 2, characterized in that.
(Appendix 4)
The prediction processing selection unit obtains an absolute value of a difference between a predicted motion vector predicted from a motion vector of a rectangular image area adjacent to the target rectangular image area and the initial motion vector, and the difference absolute value and a plurality of first values A comparison process for comparing the initial cost with a plurality of second threshold values is performed, and a skip mode prediction process, an inter prediction process, and an intra prediction process are performed based on a result of the comparison process. The moving picture coding apparatus according to supplementary note 3, wherein one is selected.
(Appendix 5)
A conversion unit that converts a prediction error of an image obtained by the prediction unit executing the one prediction process into a coefficient;
A quantization unit that quantizes the coefficients obtained by the conversion unit;
An encoding unit that encodes the quantized coefficient obtained by the quantization unit, and the plurality of first threshold values and the plurality of first values according to an error in quantization by the quantization unit The moving picture encoding apparatus according to appendix 4, wherein the threshold value of 2 is changed.
(Appendix 6)
Perform motion prediction based on the reduced image,
Based on the result of the motion prediction, any one of the skip mode prediction process, the inter prediction process, and the intra prediction process is selected,
A moving picture coding method comprising: performing each of the selected prediction processes on an unreduced image.
(Appendix 7)
Performing the selected one prediction process on an unreduced image;
When the skip mode prediction process is selected, the skip mode prediction process is executed,
When the inter prediction process is selected, the optimum inter prediction mode is selected from a plurality of inter prediction modes and executed.
7. The moving picture encoding method according to appendix 6, further comprising: selecting and executing an optimal intra prediction mode from among a plurality of intra prediction modes when an intra prediction process is selected.
(Appendix 8)
The step of selecting the one prediction process includes selecting one of a skip mode prediction process, an inter prediction process, and an intra prediction process based on an initial motion vector and an initial cost obtained by the motion prediction. The moving image encoding method according to supplementary note 6 or slightly described.
(Appendix 9)
The step of selecting the one prediction process includes:
Obtaining a difference absolute value between a predicted motion vector predicted from a motion vector of a rectangular image region adjacent to the rectangular image region of interest and the initial motion vector;
A comparison process for comparing the absolute difference value with a plurality of first threshold values and comparing the initial cost with a plurality of second threshold values;
9. The moving picture encoding method according to appendix 8, further comprising selecting each one of a skip mode prediction process, an inter prediction process, and an intra prediction process based on the result of the comparison process.
(Appendix 10)
Converting a prediction error of an image obtained by executing the one prediction process into a coefficient;
Quantize the coefficients,
The supplementary note 9, further comprising: encoding each of the coefficients after quantization, wherein the plurality of first threshold values and the plurality of second threshold values are changed in accordance with the quantization error. Video encoding device.
(Appendix 11)
An image sensor for capturing a moving image;
An encoder that encodes the moving image, and the encoder includes:
A reduced image motion prediction unit that performs motion prediction based on a reduced image obtained by reducing the moving image;
A prediction process selection unit that selects any one of skip mode prediction process, inter prediction process, and intra prediction process based on the result of motion prediction by the reduced image motion prediction unit;
A moving image processing system, comprising: a prediction unit that executes the selected one prediction process on an unreduced image.

1 動画像符号化装置
2 縮小画動き予測部
3 予測処理選択部
4 スキップモード予測部
5 インター予測部
6 イントラ予測部
7 選択部
8 DCT変換部
9 量子化部
10 可変長符号部
11 逆量子化部
12 逆DCT変換部
13 フィルタ部
14 減算部
15 加算部
DESCRIPTION OF SYMBOLS 1 Moving image encoder 2 Reduced image motion prediction part 3 Prediction process selection part 4 Skip mode prediction part 5 Inter prediction part 6 Intra prediction part 7 Selection part 8 DCT conversion part 9 Quantization part 10 Variable length encoding part 11 Inverse quantization Unit 12 inverse DCT conversion unit 13 filter unit 14 subtraction unit 15 addition unit

Claims (3)

縮小画画像に基づいて動き予測を行なう縮小画動き予測部と、
前記縮小画動き予測部による動き予測の結果に基づいてスキップモード予測処理、インター予測処理、及びイントラ予測処理の何れか1つの予測処理を選択する予測処理選択部と、
前記選択された1つの予測処理を縮小されていない画像に対して実行する予測部と
を含み、
前記予測処理選択部は、前記縮小画動き予測部による動き予測により得られた初期動きベクトル及び初期コストに基づいて、着目矩形画像領域に隣接する矩形画像領域の動きベクトルから予測される予測動きベクトルと前記初期動きベクトルとの差分絶対値を求め、前記差分絶対値と複数の第1の閾値とを比較するとともに前記初期コストと複数の第2の閾値とを比較する比較処理を実行し、前記比較処理の結果に基づいてスキップモード予測処理、インター予測処理、及びイントラ予測処理の何れか1つを選択する
ことを特徴とする動画像符号化装置。
A reduced image motion prediction unit that performs motion prediction based on the reduced image,
A prediction process selection unit that selects any one of skip mode prediction process, inter prediction process, and intra prediction process based on the result of motion prediction by the reduced image motion prediction unit;
Look including a prediction unit to be executed for image which is not reduced one prediction processing said selected
The prediction processing selection unit is a prediction motion vector predicted from a motion vector of a rectangular image region adjacent to the target rectangular image region based on an initial motion vector and an initial cost obtained by motion prediction by the reduced image motion prediction unit. And calculating the absolute difference between the initial motion vector and comparing the absolute difference with a plurality of first threshold values and comparing the initial cost with a plurality of second threshold values, A moving picture encoding apparatus , wherein one of a skip mode prediction process, an inter prediction process, and an intra prediction process is selected based on a result of the comparison process .
前記予測部は、
前記予測処理選択部によりスキップモード予測処理が選択されると、スキップモードでの予測処理を実行するスキップ予測部と、
前記予測処理選択部によりインター予測処理が選択されると、複数のインター予測モードのうちから最適なインター予測モードを選択して実行するインター予測部と、
前記予測処理選択部によりイントラ予測処理が選択されると、複数のイントラ予測モードのうちから最適なイントラ予測モードを選択して実行するイントラ予測部と
を含むことを特徴とする請求項1記載の動画像符号化装置。
The prediction unit
When a skip mode prediction process is selected by the prediction process selection unit, a skip prediction unit that executes a prediction process in the skip mode;
When an inter prediction process is selected by the prediction process selection unit, an inter prediction unit that selects and executes an optimal inter prediction mode from among a plurality of inter prediction modes;
The intra prediction unit that selects and executes an optimal intra prediction mode from among a plurality of intra prediction modes when an intra prediction process is selected by the prediction process selection unit. Video encoding device.
前記予測部が前記1つの予測処理を実行することにより得られた画像の予測誤差を係数に変換する変換部と、
前記変換部により得られた前記係数を量子化する量子化部と、
前記量子化部により得られた量子化後の前記係数を符号化する符号化部と
を更に含み、前記量子化部による量子化の誤差に応じて前記複数の第1の閾値及び前記複数の第2の閾値を変化させることを特徴とする請求項記載の動画像符号化装置。
A conversion unit that converts a prediction error of an image obtained by the prediction unit executing the one prediction process into a coefficient;
A quantization unit that quantizes the coefficients obtained by the conversion unit;
An encoding unit that encodes the quantized coefficient obtained by the quantization unit, and the plurality of first threshold values and the plurality of first values according to an error in quantization by the quantization unit moving picture encoding apparatus according to claim 1, wherein the changing the second threshold value.
JP2010208184A 2010-09-16 2010-09-16 Video encoding device Expired - Fee Related JP5598199B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010208184A JP5598199B2 (en) 2010-09-16 2010-09-16 Video encoding device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010208184A JP5598199B2 (en) 2010-09-16 2010-09-16 Video encoding device

Publications (2)

Publication Number Publication Date
JP2012065176A JP2012065176A (en) 2012-03-29
JP5598199B2 true JP5598199B2 (en) 2014-10-01

Family

ID=46060427

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010208184A Expired - Fee Related JP5598199B2 (en) 2010-09-16 2010-09-16 Video encoding device

Country Status (1)

Country Link
JP (1) JP5598199B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014241579A (en) 2013-05-13 2014-12-25 株式会社東芝 Video compression device
GB201405649D0 (en) * 2014-03-28 2014-05-14 Sony Corp Data encoding and decoding
EP3220642B1 (en) * 2016-03-15 2018-03-07 Axis AB Method, apparatus and system for encoding a video stream by defining areas within a second image frame with image data common to a first image frame

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1042300A (en) * 1996-07-25 1998-02-13 Sanyo Electric Co Ltd Motion vector detection device
JP3242362B2 (en) * 1998-04-13 2001-12-25 日本電信電話株式会社 Video encoding device and recording medium recording video encoding program
JP2000261809A (en) * 1999-03-05 2000-09-22 Kdd Corp Image coder coping with feature of picture
JP2004179906A (en) * 2002-11-26 2004-06-24 Matsushita Electric Ind Co Ltd Device and method for motion vector detection
JP4383367B2 (en) * 2005-02-24 2009-12-16 三洋電機株式会社 Motion vector detection device
JP2008301270A (en) * 2007-05-31 2008-12-11 Canon Inc Moving image encoding device and moving image encoding method
JP4357560B2 (en) * 2007-12-27 2009-11-04 株式会社東芝 Moving picture coding apparatus, moving picture coding method, and moving picture coding program
JP2010074496A (en) * 2008-09-18 2010-04-02 Fujitsu Ltd Motion vector detection processing apparatus
JP5171658B2 (en) * 2009-01-15 2013-03-27 キヤノン株式会社 Image encoding device

Also Published As

Publication number Publication date
JP2012065176A (en) 2012-03-29

Similar Documents

Publication Publication Date Title
US9930355B2 (en) Optimized image decoding device and method for a predictive encoded BIT stream
JP5289440B2 (en) Image encoding device, image decoding device, image encoding method, and image decoding method
RU2680194C1 (en) Image encoding device, image decoding device, image encoding method and image decoding method
US20120076203A1 (en) Video encoding device, video decoding device, video encoding method, and video decoding method
KR20170059040A (en) Optimal mode decision unit of video encoder and video encoding method using the optimal mode decision
WO2011121894A1 (en) Image encoding device, image decoding device, image encoding method, and image decoding method
JP2008228305A (en) Video processing system and device having encoding and decoding mode, and method for use with them
KR20170045013A (en) Apparatus and method for encoding data
US20070133689A1 (en) Low-cost motion estimation apparatus and method thereof
KR102555224B1 (en) Apparatus and method for encoding and decoding to image of ultra high definition resoutltion
JP2013115583A (en) Moving image encoder, control method of the same, and program
US8767830B2 (en) Neighbor management module for use in video encoding and methods for use therewith
JP5598199B2 (en) Video encoding device
US10142625B2 (en) Neighbor management for use in entropy encoding and methods for use therewith
JP2008141407A (en) Device and method for converting coding system
JP4561701B2 (en) Video encoding device
KR20180041833A (en) Video coding method and apparatus using most probable mode list of intra
JP6181242B2 (en) Image decoding method
JP5951915B2 (en) Image decoding method
JP5946980B1 (en) Image decoding method
JP5911982B2 (en) Image decoding method
JP2009153227A (en) Image processing apparatus and image pickup apparatus using the same
JP2012120086A (en) Video encoder

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130702

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140303

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140318

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140516

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140728

R150 Certificate of patent or registration of utility model

Ref document number: 5598199

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees