Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP4423968B2 - Encoder - Google Patents
[go: Go Back, main page]

JP4423968B2 - Encoder - Google Patents

Encoder Download PDF

Info

Publication number
JP4423968B2
JP4423968B2 JP2003430106A JP2003430106A JP4423968B2 JP 4423968 B2 JP4423968 B2 JP 4423968B2 JP 2003430106 A JP2003430106 A JP 2003430106A JP 2003430106 A JP2003430106 A JP 2003430106A JP 4423968 B2 JP4423968 B2 JP 4423968B2
Authority
JP
Japan
Prior art keywords
motion vector
motion
motion compensation
image data
encoding
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2003430106A
Other languages
Japanese (ja)
Other versions
JP2005191876A (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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP2003430106A priority Critical patent/JP4423968B2/en
Publication of JP2005191876A publication Critical patent/JP2005191876A/en
Application granted granted Critical
Publication of JP4423968B2 publication Critical patent/JP4423968B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Description

本発明は、例えば動画像データの動き補償を行う符号化装置に関する。 The present invention relates to line power sale marks Goka device motion compensation of the moving image data.

近年、画像データをデジタルとして取り扱い、その際、効率の高い情報の伝送、蓄積を目的とし、画像情報特有の冗長性を利用して、離散コサイン変換等の直交変換と動き補償により圧縮するMPEG(Moving Picture Experts Group)などの方式に準拠した装置が、放送局などの情報配信、及び一般家庭における情報受信の双方において普及しつつある。   In recent years, image data has been handled as digital data. At that time, MPEG (compressed by orthogonal transform such as discrete cosine transform and motion compensation is used for the purpose of efficient transmission and storage of information, and using redundancy unique to image information. A device conforming to a system such as Moving Picture Experts Group) is becoming popular in both information distribution at broadcasting stations and information reception in general households.

MPEG方式に続いて、さらなる高圧縮率を実現するJVT(Joint Video Team)と呼ばれる符号化方式が提案されている(例えば、非特許文献1参照)。
JVT方式では、MPEGと同様に、動き予測・補償処理において、動きベクトルを基にした動き予測・補償を行う。
ところで、JVT方式の符号化装置では、例えば、上記動き予測・補償処理において、複数の動き補償ブロックのサイズ、例えば16×16,16×8,8×16,8×8画素のサイズが規定され、8×8画素のサイズには8×8,8×4,4×8,4×4画素が規定されている。
上述した符号化装置では、各マクロブロックMBの動き予測・補償処理を、上記全ての種類の動き予測ブロックサイズを基に予測画像を生成し、原画像との差分が最小となる予測画像を得て動き予測ブロックサイズを最終的に採用して行っている。これにより、高い符号化効率が得られる。
トーマス・ウィーガント,ゲーリー・J・サリバン,ギスレ・ビョンテガード,アジャイ・ルスラ(Thomas Wiegand, Gary J.Sullivan, Gisle Bjontegaard, and Ajay Luthra),ビデオコーディングスタンダードの概要(Overview of the H.264/AVC Video Coding Standard),「IEEEのビデオ技術用の処理回路およびシステム」(IEEE TRANSACTIONS CIRCUITS AND SYSTEMS FOR VIDEO TECHNOLOGY),(米国),,2003年7月,
Following the MPEG method, an encoding method called JVT (Joint Video Team) that realizes a higher compression rate has been proposed (see, for example, Non-Patent Document 1).
In the JVT system, similarly to MPEG, motion prediction / compensation based on motion vectors is performed in motion prediction / compensation processing.
By the way, in the JVT encoding device, for example, in the motion prediction / compensation process, the sizes of a plurality of motion compensation blocks, for example, the sizes of 16 × 16, 16 × 8, 8 × 16, and 8 × 8 pixels are defined. 8 × 8, 8 × 4, 4 × 8, and 4 × 4 pixels are defined as the size of 8 × 8 pixels.
In the encoding apparatus described above, the motion prediction / compensation processing of each macroblock MB is performed based on all the types of motion prediction block sizes described above, and a prediction image that minimizes the difference from the original image is obtained. The motion prediction block size is finally adopted. Thereby, high encoding efficiency is obtained.
Thomas Wiegand, Gary J. Sullivan, Gisle Bjontegaard, and Ajay Luthra, Overview of the Video Coding Standard (Overview of the H.264 / AVC Video Coding Standard), "Processing Circuits and Systems for IEEE Video Technology" (IEEE TRANSACTIONS CIRCUITS AND SYSTEMS FOR VIDEO TECHNOLOGY), (USA), July 2003,

しかしながら、上述した従来の符号化装置では、動き予測・補償処理に係る演算量が膨大である。例えば、上述したように、各マクロブロックMBの動き予測・補償処理において、全ての動き予測ブロックサイズを基に上記差分を検出するため、演算量が膨大であり、回路が大規模化したり処理時間が長くなるなどの問題点がある。
また、JVT方式の符号化装置では、双方向の動き予測・補償処理を行い、いわゆるBピクチャーを生成する場合があり、さらに膨大な演算処理を行う必要がある。
However, in the conventional encoding device described above, the amount of calculation related to motion prediction / compensation processing is enormous. For example, as described above, in the motion prediction / compensation processing of each macroblock MB, the difference is detected based on all motion prediction block sizes, so that the amount of calculation is enormous, the circuit becomes large, and the processing time There is a problem such as becoming longer.
In addition, in a JVT encoding apparatus, bidirectional motion prediction / compensation processing may be performed to generate a so-called B picture, and it is necessary to perform enormous arithmetic processing.

本発明はかかる事情に鑑みてなされたものであり、その目的は、動き補償により画像を符号化する際に、従来に比べて演算量を削減することができる符号化装置を提供することにある。 The present invention has been made in view of such circumstances, and its object is to provide to encode an image by motion compensation, the marks Goka device that can be reduced the amount of calculation as compared with the conventional It is in.

記目的を達成するために、本発明の第の観点の符号化装置は、複数の異なるサイズの動き補償ブロックを単位として、動き補償の対象となる画像データと前記動き補償で参照される参照画像データとの間の差分に基づいて動きベクトルを生成する動きベクトル生成手段と、前記動き補償ブロックを単位として、前記動き補償の対象となる画像データと前記参照画像データとの間の差分絶対値和および前記動きベクトルの生成に伴って発生する発生情報量に基づいて指標データを生成する指標データ生成手段と、前記複数の動き補償ブロックのサイズ順に、前記動きベクトル生成手段を制御して前記各動き補償ブロックの動きベクトルを生成させるとともに前記指標データ生成手段を制御して前記各動き補償ブロックの指標データを生成させ、前記生成された指標データを探索して極小の指標データが検出されたとき、当該探索を中止して前記極小の指標データに対応するブロックサイズの動きベクトルを選択する制御手段と、前記制御手段が選択した動きベクトルを用いて前記動き補償の対象となる画像データの符号化を行う符号化手段とを有する。 To achieve the pre-Symbol object, a first aspect of the encoding apparatus of the present invention, the unit of motion compensation block of a plurality of different sizes, are referenced in the previous SL motion compensation image data to be motion-compensated that the motion vector generating means for generating a motion vector based on the difference between the reference image data, in units of the motion compensation block, between the image data and the previous SL reference image data to be subjected to the motion compensation Index data generating means for generating index data based on the sum of absolute differences and the amount of generated information that accompanies the generation of the motion vector, and controlling the motion vector generating means in order of the sizes of the plurality of motion compensation blocks Generating motion vectors for each motion compensation block and controlling the index data generating means to generate index data for each motion compensation block. When the index data of the minimum is detected by searching the index data said generated control means for selecting a motion vector of a block size and discontinue the search corresponding to the index data of the minimum, the control means Encoding means for encoding the image data to be subject to motion compensation using the motion vector selected by .

好適には、前記制御手段は、前記符号化手段が前記動き補償の対象となる画像データの符号化に用いる量子化パラメータが、予め前記ブロックサイズと対応させて設定されている閾値よりも大きいとき、当該閾値に対応しているブロックサイズを有する前記動き補償ブロックの指標データの探索を行わない Preferably, the control unit is configured such that a quantization parameter used by the encoding unit for encoding the image data to be subjected to motion compensation is larger than a threshold value set in advance corresponding to the block size. The index data of the motion compensation block having a block size corresponding to the threshold value is not searched .

好適には、前記動きベクトル生成手段は、前記動き補償の対象となる画像データと前記動き補償で参照される参照画像データとの間の差分絶対値和を用いて前記動きベクトルを生成し、前記制御手段は、前記動きベクトル生成手段を制御して整数ピクセル精度の動きベクトルを生成させ、前記整数ピクセル精度の動きベクトルを生成するときに用いた前記差分絶対値和が予め設定されている閾値よりも大きいとき前記探索を中止し、前記整数ピクセル精度の動きベクトルを生成するときに用いた前記差分絶対値和が前記閾値以下のとき前記動きベクトル生成手段を制御して非整数ピクセル精度の動きベクトルを生成させる Preferably, the motion vector generation unit generates the motion vector using a sum of absolute differences between image data to be subjected to motion compensation and reference image data referred to in the motion compensation, and The control means controls the motion vector generation means to generate an integer pixel precision motion vector, and the difference absolute value sum used when generating the integer pixel precision motion vector is based on a preset threshold value. If the sum of absolute differences used when generating the motion vector with integer pixel precision is less than or equal to the threshold value, the motion vector generation means is controlled to stop the search when the value is larger, and the motion vector with non-integer pixel precision Is generated .

好適には前記制御手段は、前記符号化手段が前記動き補償の対象となる画像データの符号化に用いる量子化パラメータが、予め設定された閾値よりも大きいときには一方向の動き補償による前記画像データの符号化を前記符号化手段に行わせ、前記量子化パラメータが前記閾値よりも小さいときには双方向の動き補償による前記画像データの符号化を前記符号化手段に行わせる Preferably, the control unit is configured to perform the one-way motion compensation when the quantization parameter used by the encoding unit for encoding the image data to be subjected to motion compensation is larger than a preset threshold value. Data is encoded by the encoding means, and when the quantization parameter is smaller than the threshold value, the image data is encoded by bidirectional motion compensation .

好適には、前記制御手段は、
前記画像データの解像度が予め設定されている閾値よりも低いとき小さい前記ブロックサイズの補償ブロックを選択して前記動きベクトル生成手段に動きベクトルを生成させる
Preferably, the control means includes
When the resolution of the image data is lower than a preset threshold value, the compensation block having the smaller block size is selected and the motion vector generation means generates a motion vector .

本発明によれば、動き補償により画像を符号化する際に、従来に比べて演算量を削減することができる符号化装置を提供することができる。
According to the present invention, it can be provided when encoding an image by motion compensation, the marks Goka device that can be reduced the amount of calculation as compared with the prior art.

以下、本発明の実施形態に係るJVT方式の符号化装置について説明する。   A JVT encoding apparatus according to an embodiment of the present invention will be described below.

図1は、本実施形態の通信システム1の概念図である。
図1に示すように、通信システム1は、送信側に設けられた符号化装置2と、受信側に設けられた復号装置3とを有する。
通信システム1では、送信側の符号化装置2において、離散コサイン変換やカルーネン・レーベ変換などの直交変換と動き補償によって圧縮したフレーム画像データ(ビットストリーム)を生成し、当該フレーム画像データを変調した後に、衛星放送波、ケーブルTV網、電話回線網、携帯電話回線網などの伝送媒体を介して送信する。
受信側では、受信した画像信号を復調した後に、上記変調時の直交変換の逆変換と動き補償によって伸張したフレーム画像データを生成して利用する。
なお、上記伝送媒体は、光ディスク、磁気ディスクおよび半導体メモリなどの記録媒体であってもよい。
図1に示す復号装置3は符号化装置2の符号化に対応した復号を行い、従来と同じ構成を有している
なろ、本実施形態では、符号化装置2において、動き予測・補償処理を行う場合に、予め規定された複数の異なるサイズのブロック全を用いて探索し、マクロブロックMBの動きベクトルおよび予測画像の生成を行うのではなく、設定された中止条件により探索を中止することで、演算量の削減を図る。
FIG. 1 is a conceptual diagram of a communication system 1 according to the present embodiment.
As shown in FIG. 1, the communication system 1 includes an encoding device 2 provided on the transmission side and a decoding device 3 provided on the reception side.
In the communication system 1, the encoding device 2 on the transmission side generates frame image data (bit stream) compressed by orthogonal transformation such as discrete cosine transformation and Karhunen-Labe transformation and motion compensation, and modulates the frame image data. Later, it is transmitted via a transmission medium such as a satellite broadcast wave, a cable TV network, a telephone line network, or a mobile phone line network.
On the receiving side, after demodulating the received image signal, frame image data expanded by inverse transformation of orthogonal transformation and motion compensation at the time of modulation is generated and used.
The transmission medium may be a recording medium such as an optical disk, a magnetic disk, and a semiconductor memory.
The decoding device 3 shown in FIG. 1 performs decoding corresponding to the encoding of the encoding device 2 and has the same configuration as the conventional one. In this embodiment, the encoding device 2 performs motion prediction / compensation processing. In the case of performing the search by using a plurality of blocks of different sizes defined in advance and generating the motion vector and the predicted image of the macroblock MB, the search is stopped by the set stop condition. Reduce the amount of calculation.

以下、図1に示す符号化装置2について説明する。
図2は、図1に示す符号化装置2の全体構成図である。図3は、図2に示した動き予測・補償回路39の本発明に係る機能ブロック図である。
図2に示すように、符号化装置2は、例えば、A/D変換回路22、画面並べ替え回路23、演算回路24、直交変換回路25、量子化回路26、可逆符号化回路27、バッファ28、逆量子化回路29、逆直交変換回路30、レート制御回路32、フレームメモリ34、デブロックフィルタ38、および動き予測・補償回路39を主構成要素として有する。
また、動き予測・補償回路39は、例えば図3に示すように、動きベクトル生成部391、指標データ生成部392、および制御部393を有する。
Hereinafter, the encoding device 2 shown in FIG. 1 will be described.
FIG. 2 is an overall configuration diagram of the encoding device 2 shown in FIG. FIG. 3 is a functional block diagram according to the present invention of the motion prediction / compensation circuit 39 shown in FIG.
As shown in FIG. 2, the encoding device 2 includes, for example, an A / D conversion circuit 22, a screen rearrangement circuit 23, an arithmetic circuit 24, an orthogonal transformation circuit 25, a quantization circuit 26, a lossless encoding circuit 27, and a buffer 28. , An inverse quantization circuit 29, an inverse orthogonal transform circuit 30, a rate control circuit 32, a frame memory 34, a deblock filter 38, and a motion prediction / compensation circuit 39 are included as main components.
The motion prediction / compensation circuit 39 includes a motion vector generation unit 391, an index data generation unit 392, and a control unit 393, for example, as illustrated in FIG.

動き予測・補償回路39は、本発明に係るデータ処理装置に相当する。動きベクトル生成部391は本発明に係る動きベクトル生成手段に相当し、指標データ生成部392は本発明に係る指標データ生成手段に相当し、制御部393は本発明に係る制御手段に相当する。   The motion prediction / compensation circuit 39 corresponds to the data processing apparatus according to the present invention. The motion vector generation unit 391 corresponds to the motion vector generation unit according to the present invention, the index data generation unit 392 corresponds to the index data generation unit according to the present invention, and the control unit 393 corresponds to the control unit according to the present invention.

以下、符号化装置2の構成要素について説明する。
A/D変換回路22は、入力されたアナログの輝度信号Y、色差信号Cb,Crから構成される原画像信号S10をデジタルのフレームデータS22に変換し、これを画面並べ替え回路23に出力する。
画面並べ替え回路23は、A/D変換回路22から入力したフレームデータS22を、そのピクチャタイプI,P,BからなるGOP(Group Of Pictures) 構造に応じて、符号化する順番に並べ替えたフレームデータS23を演算回路24、演算回路24、レート制御回路32および動き予測・補償回路39に出力する。
Hereinafter, components of the encoding device 2 will be described.
The A / D conversion circuit 22 converts the original image signal S10 composed of the input analog luminance signal Y and color difference signals Cb and Cr into digital frame data S22, and outputs this to the screen rearrangement circuit 23. .
The screen rearrangement circuit 23 rearranges the frame data S22 input from the A / D conversion circuit 22 in the encoding order according to the GOP (Group Of Pictures) structure including the picture types I, P, and B. The frame data S23 is output to the arithmetic circuit 24, the arithmetic circuit 24, the rate control circuit 32, and the motion prediction / compensation circuit 39.

演算回路24は、フレームデータS23内の処理対象の動き補償ブロックMCB(マクロブロックともいう)と、それに対応して動き予測・補償回路39から入力した予測画像データPIの動き補償ブロックMCBとの差分を示す画像データS24を生成し、これを直交変換回路25に出力する。
直交変換回路25は、画像データS24に離散コサイン変換やカルーネン・レーベ変換などの直交変換を施して画像データ(例えばDCT係数)S25を生成し、これを量子化回路26に出力する。
量子化回路26は、レート制御回路32から入力した量子化スケールで、画像データS25を量子化して画像データS26を生成し、これを可逆符号化回路27および逆量子化回路29に出力する。
The arithmetic circuit 24 calculates the difference between the motion compensation block MCB (also referred to as a macro block) to be processed in the frame data S23 and the motion compensation block MCB of the predicted image data PI input from the motion prediction / compensation circuit 39 corresponding thereto. Is generated and output to the orthogonal transformation circuit 25.
The orthogonal transformation circuit 25 performs orthogonal transformation such as discrete cosine transformation and Karhunen-Labe transformation on the image data S24 to generate image data (for example, DCT coefficient) S25, and outputs this to the quantization circuit 26.
The quantization circuit 26 quantizes the image data S25 with the quantization scale input from the rate control circuit 32 to generate image data S26, and outputs this to the lossless encoding circuit 27 and the inverse quantization circuit 29.

可逆符号化回路27は、画像データS26を可変長符号化あるいは算術符号化した画像データをバッファ28に格納する。
このとき、可逆符号化回路27は、インター予測符号化が行われた場合には、動き予測・補償回路39から入力した動きベクトルMVを符号化してヘッダデータに格納する。
The lossless encoding circuit 27 stores, in the buffer 28, image data obtained by variable-length encoding or arithmetic encoding of the image data S26.
At this time, when the inter prediction encoding is performed, the lossless encoding circuit 27 encodes the motion vector MV input from the motion prediction / compensation circuit 39 and stores it in the header data.

バッファ28に格納された画像データは、変調等された後に送信される。
逆量子化回路29は、他の動き補償ブロックMCBから参照される参照画像データの動き補償ブロックMCBの画像データS26を逆量子化した信号を生成し、これを逆直交変換回路30に出力する。
逆直交変換回路30は、デブロックフィルタ38から入力した画像データに、直交変換回路25における直交変換の逆変換を施して生成した画像データS30をデブロックフィルタ38を介してフレームメモリ34に書き込む。
デブロックフィルタ38は、画像データS26のブロック歪みを除去した画像データを、フレームメモリ34に出力する。
The image data stored in the buffer 28 is transmitted after being modulated or the like.
The inverse quantization circuit 29 generates a signal obtained by inversely quantizing the image data S26 of the motion compensation block MCB of the reference image data referenced from the other motion compensation block MCB, and outputs the signal to the inverse orthogonal transform circuit 30.
The inverse orthogonal transform circuit 30 writes the image data S30 generated by performing the inverse transform of the orthogonal transform in the orthogonal transform circuit 25 on the image data input from the deblock filter 38 to the frame memory 34 via the deblock filter 38.
The deblock filter 38 outputs the image data from which the block distortion of the image data S26 has been removed to the frame memory 34.

レート制御回路32は、例えば、画面並べ替え回路23から入力したフレームデータS23を基に、画像中の複雑度が高い部分は細かく量子化し、画像中の複雑度が低い部分は粗く量子化するように量子化パラメータQpを生成する。
そして、レート制御回路32は、上記生成した量子化パラメータQp、並びにバッファ28から読み出した画像データを基に量子化スケールを生成し、これを量子化回路26に出力する。
また、レート制御回路32は、上記生成した量子化パラメータQpを、動き予測・補償回路39に出力する。
For example, the rate control circuit 32 finely quantizes a portion with high complexity in the image and coarsely quantizes a portion with low complexity in the image based on the frame data S23 input from the screen rearrangement circuit 23. The quantization parameter Qp is generated.
Then, the rate control circuit 32 generates a quantization scale based on the generated quantization parameter Qp and the image data read from the buffer 28, and outputs this to the quantization circuit 26.
Further, the rate control circuit 32 outputs the generated quantization parameter Qp to the motion prediction / compensation circuit 39.

図4は、図2に示す符号化装置の動き予測・補償回路における動きベクトルの探索方法を説明するための図である。
動き予測・補償回路39は、符号化対象のフレームデータS23およびフレームメモリ34からの参照画像データREFを基に、参照画像データ内の探索範囲SRを探索して、動き予測・補償処理を行って動き補償ブロックMCBを単位として、動きベクトルMVを算出する。
FIG. 4 is a diagram for explaining a motion vector search method in the motion prediction / compensation circuit of the encoding device shown in FIG.
The motion prediction / compensation circuit 39 searches the search range SR in the reference image data based on the frame data S23 to be encoded and the reference image data REF from the frame memory 34, and performs motion prediction / compensation processing. A motion vector MV is calculated using the motion compensation block MCB as a unit.

この際、動き予測・補償回路39は、Iピクチャ、Pピクチャ、Bピクチャを符号化する。ここでIピクチャは、当該Iピクチャの情報だけから符号化し、フレーム間予測(インター予測符号化)を行わない画像データを示す。
Pピクチャは、表示順が前(過去)のIピクチャまたはPピクチャを基に予測を行って符号化される画像データを示す。
Bピクチャは、表示順が前(過去)および後(未来)のIピクチャおよびPピクチャを基に双方向予測によって符号化される画像データを示す。
At this time, the motion prediction / compensation circuit 39 encodes an I picture, a P picture, and a B picture. Here, the I picture indicates image data that is encoded only from the information of the I picture and does not perform inter-frame prediction (inter prediction encoding).
The P picture indicates image data that is encoded by performing prediction based on the previous (previous) I picture or P picture.
The B picture indicates image data encoded by bi-directional prediction based on an I picture and a P picture whose display order is the previous (past) and subsequent (future).

図5は、図2に示した動き予測・補償回路39において、採用可能な動き予測ブロックのサイズの種類を説明するための図である。
動き予測ブロック(マクロブロックMB)のブロックサイズには、例えば図5に示すように、16×16,16×8,8×16,8×8画素のサイズが規定され、また、8×8,8×4,4×8,および4×4画素のサイズが規定される。
FIG. 5 is a diagram for explaining types of motion prediction block sizes that can be adopted in the motion prediction / compensation circuit 39 shown in FIG.
As the block size of the motion prediction block (macroblock MB), for example, as shown in FIG. 5, sizes of 16 × 16, 16 × 8, 8 × 16, and 8 × 8 pixels are defined, and 8 × 8, Sizes of 8x4, 4x8, and 4x4 pixels are defined.

動き予測・補償回路39は、例えば図4に示すように、フレームデータS23内の処理対象の動き補償ブロックMCBとの差異が最も小さい動き補償ブロックMCBの位置を参照画像データREFの探索範囲SR内で特定し、これらの位置関係に対応した動きベクトルMVを算出する。
そして、動き予測・補償回路39は、後述する指標データCostを最小にする動きベクトルMV、並びにそれに対応する動き補償ブロックMCBのサイズを選択する。
また、動き予測・補償回路39は、上記選択した動きベクトルMVを基に、上記選択したサイズの動き補償ブロックMCBについての予測画像データPIを生成する。
動き予測・補償回路39は、上記選択した動きベクトルMVを可逆符号化回路27に出力し、上記生成した予測画像データPIを演算回路24に出力する。
For example, as shown in FIG. 4, the motion prediction / compensation circuit 39 determines the position of the motion compensation block MCB having the smallest difference from the motion compensation block MCB to be processed in the frame data S23 within the search range SR of the reference image data REF. And a motion vector MV corresponding to these positional relationships is calculated.
Then, the motion prediction / compensation circuit 39 selects a motion vector MV that minimizes index data Cost, which will be described later, and a size of a motion compensation block MCB corresponding to the motion vector MV.
Further, the motion prediction / compensation circuit 39 generates predicted image data PI for the motion compensation block MCB of the selected size based on the selected motion vector MV.
The motion prediction / compensation circuit 39 outputs the selected motion vector MV to the lossless encoding circuit 27, and outputs the generated predicted image data PI to the arithmetic circuit 24.

図6は、一般的な符号化装置の動き予測・補償回路の動作を説明するための図である。
一般的なMPEGやJVT等の動画符号化処理では、ブロックサイズを例えば図5に示した複数の候補の中から選ぶことができる。
このブロックの分割が細かいほど、原画に近い予測画を生成する動きベクトルMVが選択でき、低ビットレートで高画質を達成できる利点がある。しかし超低ビットレートではブロックの分割が細かい場合には、分割が増えたことによるMVの符号コストが増大し、逆に圧縮効率が悪くなるという問題点がある。
最適なブロックの分割サイズを求めるために、一般的な符号化装置では、例えば図6に示すように、動きベクトルMVを生成する際に、各ブロックサイズそれぞれについて動きベクトルを生成し、それぞれのブロックサイズで求めた中で、最もビット発生量の小さい動きベクトルMV、およびブロックサイズを選択する。
具体的には、例えば図6に示すように、ブロックサイズ16×16、16×8、8×16、8×8、8×4、4×8、4×4について整数ピクセル精度での動きベクトルMVおよび非整数ピクセル精度(例えば1/2ピクセルや1/4ピクセル精度)の動きベクトルを探索し、その求めた動きベクトルの中で、最小のビット発生量の動きベクトルMVおよびブロックサイズを選択している。
FIG. 6 is a diagram for explaining the operation of a motion prediction / compensation circuit of a general encoding device.
In a moving image encoding process such as general MPEG or JVT, the block size can be selected from a plurality of candidates shown in FIG. 5, for example.
The finer the block division is, the more advantageous it is that a motion vector MV that generates a predicted image close to the original image can be selected, and that high image quality can be achieved at a low bit rate. However, when the block is finely divided at an ultra-low bit rate, there is a problem that the code cost of the MV increases due to the increase in the division, and conversely the compression efficiency deteriorates.
In order to obtain an optimal block division size, in a general encoding device, for example, as shown in FIG. 6, when generating a motion vector MV, a motion vector is generated for each block size. The motion vector MV with the smallest bit generation amount and the block size are selected from the sizes.
Specifically, for example, as shown in FIG. 6, motion vectors with integer pixel accuracy for block sizes of 16 × 16, 16 × 8, 8 × 16, 8 × 8, 8 × 4, 4 × 8, and 4 × 4. Search for a motion vector of MV and non-integer pixel accuracy (for example, 1/2 pixel or 1/4 pixel accuracy), and select a motion vector MV and a block size with the smallest bit generation amount from the obtained motion vectors. ing.

上述した方法ではブロックサイズの種類が多くなるにしたがい、ブロックサイズの判定に要する計算量が増大し、高画質を得るために長時間のエンコードが必要となる点が問題となる。特に、JVTでは、動きベクトルMVが1/4ピクセル(Pixel )精度で指定できるが、高速化のために、まず整数ピクセルでの動きベクトルMVを求め、その後で非整数ピクセル(1/2ピクセルや1/4ピクセル)の精度で動きベクトルMVを求めなおしている。
しかし、整数ピクセル精度の段階で動きベクトルMVが、見当違いな値を算出した場合であっても、非整数ピクセル精度で動きベクトルを求めるという、無駄な演算を行っている場合もある。
In the method described above, as the number of types of block sizes increases, the amount of calculation required to determine the block size increases, and there is a problem that long-time encoding is required to obtain high image quality. In particular, in JVT, the motion vector MV can be specified with 1/4 pixel (Pixel) accuracy. However, in order to increase the speed, first, the motion vector MV for integer pixels is obtained, and then a non-integer pixel (1/2 pixel or The motion vector MV is obtained again with an accuracy of 1/4 pixel).
However, even if the motion vector MV calculates an incorrect value at the stage of integer pixel accuracy, there is a case where a wasteful calculation of obtaining the motion vector with non-integer pixel accuracy is performed.

本実施形態に係る符号化装置2は、動き予測・補償回路39が、ブロックサイズを例えば、大きいサイズから小さいサイズへ、または小さいサイズから大きいサイズへ一方向に発生ビット量を算出し、すでに計算した発生ビット量よりも、現在探索しているブロックサイズでの発生ビット量が大きいいことを検出した場合には、その時点以降のブロックサイズについての探索を中止することで演算量を削減する。   In the encoding device 2 according to the present embodiment, the motion prediction / compensation circuit 39 calculates the generated bit amount in one direction from the large size to the small size, or from the small size to the large size, for example, and already calculates When it is detected that the generated bit amount at the block size currently searched is larger than the generated bit amount, the calculation amount is reduced by stopping the search for the block size after that point.

以下、本実施形態に係る動き予測・補償回路39を図3を参照しながら詳細に説明する。
上述したように、動き予測・補償回路39は、例えば図3に示すように、動きベクトル生成部391、指標データ生成部392、および制御部393を主構成要素として有する。
Hereinafter, the motion prediction / compensation circuit 39 according to the present embodiment will be described in detail with reference to FIG.
As described above, the motion prediction / compensation circuit 39 includes, for example, a motion vector generation unit 391, an index data generation unit 392, and a control unit 393 as main components as illustrated in FIG.

動きベクトル生成部391は、複数の異なるサイズの動き補償ブロックを単位として、動き補償の対象となる画像データS23と、動き補償で参照される参照画像データREFの間の差分に基づいて動きベクトルMVを生成する。   The motion vector generation unit 391 uses a plurality of motion compensation blocks of different sizes as a unit, and a motion vector MV based on a difference between the image data S23 that is a target of motion compensation and the reference image data REF that is referred to in motion compensation. Is generated.

指標データ生成部392は、動き補償ブロックを単位として、動き補償の対象となる画像データS23と、参照画像データREFの間の差分、および動き補償に伴い発生する発生情報量に基づいて指標データを生成する。   The index data generation unit 392 uses the motion compensation block as a unit to calculate index data based on the difference between the image data S23 to be motion compensated and the reference image data REF, and the amount of generated information that accompanies the motion compensation. Generate.

指標データ生成部392は、例えば具体的には、図4に示すように、動き補償ブロックMBを用いて、画像並べ替え回路23から入力したフレームデータS23内のマクロブロックMBを単位として、フレームデータS23内の動き補償ブロックMCBと、参照画像データREFの探索範囲SR内の所定の一の動き補償ブロックMCBとの差分絶対値和を示す指標データSADを数式(1)を基に生成する。   For example, as illustrated in FIG. 4, the index data generation unit 392 specifically uses the motion compensation block MB to generate frame data in units of the macroblock MB in the frame data S23 input from the image rearrangement circuit 23. The index data SAD indicating the sum of absolute differences between the motion compensation block MCB in S23 and the predetermined one motion compensation block MCB in the search range SR of the reference image data REF is generated based on Expression (1).

Figure 0004423968
Figure 0004423968

数式(1)において、s[x,y]は、フレームデータS23の画素位置(x,y)の画素データを示す。
また、c(x−mx,y−my)は、参照画像データREF内の画素位置(x−mx,y−my)の画素データを示す。
ここで,(mx,my)によって動きベクトルMVが規定される。
数式(1)では、フレームデータS23内の処理対象の動き補償ブロックMCBを構成する全ての画素データについて、演算が行われるように、動き補償ブロックMCB内の全ての画素位置(x,y)が順に選択される。
In Equation (1), s [x, y] indicates pixel data at the pixel position (x, y) of the frame data S23.
C (x-mx, y-my) indicates pixel data at the pixel position (x-mx, y-my) in the reference image data REF.
Here, the motion vector MV is defined by (mx, my).
In Equation (1), all pixel positions (x, y) in the motion compensation block MCB are set so that the calculation is performed on all the pixel data constituting the motion compensation block MCB to be processed in the frame data S23. Selected in order.

また、指標データ生成部392は、参照画像データREFの探索範囲内の全てあるいは予め決められた一部の位置の動き補償ブロックMCBのそれぞれについて、上記指標データSADを生成する。また、この指標データは動きベクトル生成部391により参照されてもよい。参照画像データREFとフレームデータS23との位置が、動きベクトル生成部391による動きベクトルMVを規定している。   In addition, the index data generation unit 392 generates the index data SAD for each of the motion compensation blocks MCB at all or a predetermined position within the search range of the reference image data REF. The index data may be referred to by the motion vector generation unit 391. The positions of the reference image data REF and the frame data S23 define the motion vector MV by the motion vector generation unit 391.

また、指標データ生成部392は、数式(1)による指標データSADと補正データλ、動きベクトルに応じた発生情報量Rを用いて、数式(2)に示すように指標データCostを生成する。   In addition, the index data generation unit 392 generates index data Cost as shown in Expression (2) using the index data SAD according to Expression (1), the correction data λ, and the generated information amount R corresponding to the motion vector.

Figure 0004423968
Figure 0004423968

本実施形態において、補正データλは、例えばレート制御回路32から入力された量子化パラメータQpに応じて決まる値であり、指標データ生成部392はレート制御回路32から入力された量子化パラメータQpを基に補正データλを算出する。
動きベクトルに応じた発生量Rは、例えばテーブルルックアップ(Table lookup)により求められる動きベクトル差分の発生情報量である。発生情報量Rは、例えばエントロピー符号化処理、具体的にはUVLC(Universal Variable Length Code)やCABAC(Context based adaptive Binary Arithmetic Coding )により求められる。
In the present embodiment, the correction data λ is a value determined according to the quantization parameter Qp input from the rate control circuit 32, for example, and the index data generation unit 392 uses the quantization parameter Qp input from the rate control circuit 32. Based on this, the correction data λ is calculated.
The generation amount R corresponding to the motion vector is the generation information amount of the motion vector difference obtained by, for example, table lookup. The generated information amount R is obtained by, for example, entropy encoding processing, specifically, UVLC (Universal Variable Length Code) or CABAC (Context based Adaptive Binary Arithmetic Coding).

制御部393は、例えば動きベクトル生成部391および指標データ生成部392を制御し、複数の動き補償ブロックのうち大きいサイズから小さいサイズ順に、または逆順に、動きベクトルおよび指標データを探索する過程で、第1の動き補償ブロックでの第1の指標データよりも、第1の動き補償ブロックの次の第2の動き補償ブロックでの第2の指標データが大きい場合には、それ以降の動き補償ブロックに対しての探索を中止し、第1の動き補償ブロックと、第1の動き補償ブロックで動きベクトル生成部391が生成した動きベクトルを選択する。   The control unit 393 controls, for example, the motion vector generation unit 391 and the index data generation unit 392, and in the process of searching for motion vectors and index data in order from the largest size to the smallest size among the plurality of motion compensation blocks, or in the reverse order, When the second index data in the second motion compensation block next to the first motion compensation block is larger than the first index data in the first motion compensation block, the subsequent motion compensation blocks And the motion vector generated by the motion vector generation unit 391 in the first motion compensation block and the first motion compensation block is selected.

つまり制御部393は、ブロックサイズを例えば大きいものから、小さいものというように、一方向に順に探索していき、各ブロックサイズに対して動きベクトルを算出し、探索しているマクロブロックでの指標データCostを比較していき、極小となるブロックサイズを検出する。
そして制御部393は、予め規定された複数の異なる大きさのブロックサイズのマクロブロックから順に探索した場合に、今調べているブロックサイズの発生ビット量よりも、すでに探索したブロックサイズでの発生ビット量が大きい場合には、それ以上の細かいサイズ(小さいサイズ)のブロックについては探索を中止し、その発生ビット量が極小を示すブロックサイズでの動きベクトルを選択する。
これにより、全てのブロックサイズの探索を行うことなく、計算量を大きく削減することができる。
例えば、ブロックサイズが16×16、16×8、8×16、8×8の4種類がある場合のフローを説明する。
That is, the control unit 393 sequentially searches in one direction, for example, from the largest block size to the smallest block size, calculates a motion vector for each block size, and indicates the index of the macroblock being searched. The data Cost is compared, and the minimum block size is detected.
When the controller 393 sequentially searches for a plurality of macroblocks having different block sizes, the generated bits in the already searched block size are larger than the generated bit size of the block size currently examined. When the amount is large, the search is stopped for a block with a smaller size (smaller size) than that, and a motion vector with a block size at which the generated bit amount is minimal is selected.
As a result, the calculation amount can be greatly reduced without searching for all block sizes.
For example, a flow when there are four types of block sizes of 16 × 16, 16 × 8, 8 × 16, and 8 × 8 will be described.

図7は、図3に示した符号化装置の制御部393による動きベクトルの探索を説明するための図である。具体的には、図7は複数の異なるブロックサイズのブロックで、動きベクトルを生成した際の指標データCostを示す図である。横軸は各マクロブロックをブロックサイズの大きさ順に並べて示し、縦軸は各マクロブロックでの指標データCostを示す。   FIG. 7 is a diagram for explaining the search for a motion vector by the control unit 393 of the encoding device shown in FIG. Specifically, FIG. 7 is a diagram showing index data Cost when a motion vector is generated with a plurality of blocks having different block sizes. The horizontal axis shows the macroblocks arranged in the order of the block size, and the vertical axis shows the index data Cost in each macroblock.

例えば図7に示すように、横軸に4×4,4×8,8×4,8×8,8×16,16×8,16×16と、ブロックサイズの大きさ順に整列させ、例えばブロックサイズが大きいほうから小さいほうへ順に、動きベクトルMVを生成して探索を行うと、指標データCostが極小となるブロックサイズが1つだけ存在するという特徴がある。
つまり、本実施形態に係る符号化装置では、この特徴を利用して探索を行う過程で、ビット発生量の極小を検出した時点で探索を中止し、その極小でのブロックサイズと、動きベクトルとを選択することにより、計算量を削減している。
For example, as shown in FIG. 7, the horizontal axis is arranged in the order of the block size, 4 × 4, 4 × 8, 8 × 4, 8 × 8, 8 × 16, 16 × 8, 16 × 16, for example, When a search is performed by generating a motion vector MV from the largest block size to the smallest block size, there is a feature that there is only one block size at which the index data Cost is minimized.
That is, in the encoding apparatus according to the present embodiment, in the process of performing the search using this feature, the search is stopped when the minimum of the bit generation amount is detected, the block size at the minimum, the motion vector, By selecting, the amount of calculation is reduced.

具体的には、制御部393は、複数の動き補償ブロックのうち大きいサイズから小さいサイズ順に、または逆順に、動きベクトルおよび前記指標データを探索する過程で、第1の動き補償ブロックでの第1の指標データよりも、第1の動き補償ブロックの次の第2の動き補償ブロックでの第2の指標データが大きい場合には、それ以降の動き補償ブロックに対しての探索を中止し、第1の動き補償ブロックと、第1の動き補償ブロックで動きベクトル生成手段が生成した動きベクトルを選択する。
より具体的には制御部393は、例えば図7に示すように、ブロックサイズ16×16から小さいサイズに順に探索を行う過程で、ブロックサイズ8×8でのビット発生量(指標データ)よりも、ブロックサイズ8×8の次の8×4のブロックサイズでのビット発生量(指標データ)が大きい場合には、それ以降の動き補償ブロックに対しての探索を中止し、8×8のブロックと、そのブロックでの動きベクトルを選択する。
Specifically, the control unit 393 searches for the motion vector and the index data in the order from the largest size to the smallest size among the plurality of motion compensation blocks, or in the reverse order. If the second index data in the second motion compensation block next to the first motion compensation block is larger than the index data of the first motion compensation block, the search for the subsequent motion compensation block is stopped, The motion vector generated by the motion vector generation means in one motion compensation block and the first motion compensation block is selected.
More specifically, for example, as shown in FIG. 7, the control unit 393 performs a search in order from a block size of 16 × 16 to a smaller size than the bit generation amount (index data) at the block size of 8 × 8. If the bit generation amount (index data) at the next 8 × 4 block size of the block size 8 × 8 is large, the search for the subsequent motion compensation block is stopped, and the 8 × 8 block Then, the motion vector in the block is selected.

図8は、図1に示した符号化装置の動きベクトルの探索に係る動作の一具体例を説明するためのフローチャートである。
簡単な説明のため、ブロックサイズが16×16,16×8,8×16,8×8の場合を説明する。
ステップST11において、制御部393は、動きベクトル生成部391および指標データ生成部392を制御して、ブロックサイズ16×16のマクロブロックを単位として、動きベクトルMVを生成させ、発生情報量を基に指標データCost(16×16)を算出させる。ここでカッコ内はブロックサイズを示す。
FIG. 8 is a flowchart for explaining a specific example of the operation related to the motion vector search of the encoding device shown in FIG.
For simple explanation, the case where the block size is 16 × 16, 16 × 8, 8 × 16, and 8 × 8 will be described.
In step ST11, the control unit 393 controls the motion vector generation unit 391 and the index data generation unit 392 to generate a motion vector MV in units of macroblocks having a block size of 16 × 16, and based on the amount of generated information The index data Cost (16 × 16) is calculated. Here, the parenthesis indicates the block size.

ステップST12において、制御部393は、動きベクトル生成部391および指標データ生成部392を制御して、ブロックサイズ16×8のマクロブロックを単位として、動きベクトルMVを生成させ、発生情報量を基に指標データコストCost(16×8)を算出させる。   In step ST12, the control unit 393 controls the motion vector generation unit 391 and the index data generation unit 392 to generate a motion vector MV in units of macroblocks having a block size of 16 × 8, and based on the amount of generated information The index data cost Cost (16 × 8) is calculated.

ステップST13において、制御部393は、動きベクトル生成部391および指標データ生成部392を制御して、ブロックサイズ8×16のマクロブロックを単位として、動きベクトルMVを生成させ、発生情報量を基に指標データコストCost(8×16)を算出させる。   In step ST13, the control unit 393 controls the motion vector generation unit 391 and the index data generation unit 392 to generate a motion vector MV in units of macroblocks having a block size of 8 × 16, and based on the amount of generated information The index data cost Cost (8 × 16) is calculated.

ステップST14において、制御部393は、ステップST12,13で生成した指標データCost(16×8),Cost(8×16)の最小値を変数Cost2に設定する。   In step ST14, the control unit 393 sets the minimum value of the index data Cost (16 × 8) and Cost (8 × 16) generated in steps ST12 and ST13 to the variable Cost2.

ステップST15において、制御部393は、指標データCost(16×16)がCost2よりも大きいか否かを判別する。制御部393は、指標データCost(16×16)がCost2よりも大きいと判別した場合には、極小を検出していないと判別し、次のブロックサイズ(8×8)について探索を行う。
一方、ステップST15において、Cost(16×16)がCost2以下であると判別した場合には、制御部393は、ブロックサイズ8×8以降の探索を行わずに、ステップST17の処理に進む。
ステップST17において、制御部393は、演算したブロックサイズの中で、最小の指標データCostのブロックサイズおよび動きベクトルMVを選択する。
制御部393は、選択した動きベクトルMVを可逆符号化回路27に出力する。
In step ST15, the control unit 393 determines whether or not the index data Cost (16 × 16) is larger than Cost2. When it is determined that the index data Cost (16 × 16) is larger than Cost2, the control unit 393 determines that the minimum is not detected, and searches for the next block size (8 × 8).
On the other hand, if it is determined in step ST15 that Cost (16 × 16) is equal to or less than Cost2, the control unit 393 proceeds to the process of step ST17 without performing a search for a block size of 8 × 8 or later.
In step ST <b> 17, the control unit 393 selects the block size and motion vector MV of the minimum index data Cost among the calculated block sizes.
The control unit 393 outputs the selected motion vector MV to the lossless encoding circuit 27.

また、制御部393の動作は、上述した形態に限られるものではない。例えばブロックサイズ16×16〜4×4を大きい順に、または小さい順に探索を行ってもよい。   Further, the operation of the control unit 393 is not limited to the above-described form. For example, the block size 16 × 16 to 4 × 4 may be searched in order from the largest to the smallest.

以上説明したように、本実施形態では、複数の異なるサイズの動き補償ブロックを単位として、動き補償の対象となる画像データと、前記動き補償で参照される参照画像データの間の差分に基づいて動きベクトルを生成する動きベクトル生成部391と、動き補償ブロックを単位として、動き補償の対象となる画像データと、参照画像データの間の差分、および動き補償に伴い発生する発生情報量に基づいて指標データを生成する指標データ生成部392と、複数の動き補償ブロックのうち大きいサイズから小さいサイズ順に、または逆順に、動きベクトルおよび指標データを探索する過程で、第1の動き補償ブロックでの第1の指標データよりも、第1の動き補償ブロックの次の第2の動き補償ブロックでの第2の指標データが大きい場合には、それ以降の動き補償ブロックに対しての探索を中止し、第1の動き補償ブロックと、第1の動き補償ブロックで動きベクトル生成手段が生成した動きベクトルを選択する制御部393とを設けたので、画質を落とすことなく、演算量を削減することができる。
つまり、全てのブロックサイズについて探索を行うことなく、中止条件により探索を中止するので演算量を削減することができる。
As described above, in the present embodiment, a plurality of motion compensation blocks of different sizes are used as a unit, based on a difference between image data to be subjected to motion compensation and reference image data referred to in the motion compensation. Based on a motion vector generation unit 391 that generates a motion vector, a difference between image data that is a target of motion compensation and reference image data, and a generated information amount that accompanies motion compensation in units of motion compensation blocks. In the process of searching for the motion vector and the index data in the order from the largest size to the smallest size among the plurality of motion compensation blocks, or in the reverse order, the index data generation unit 392 that generates the index data, and the first motion compensation block in the first motion compensation block When the second index data in the second motion compensation block next to the first motion compensation block is larger than the index data of one Includes a first motion compensation block, and a control unit 393 that selects a motion vector generated by the motion vector generation means in the first motion compensation block. Therefore, the calculation amount can be reduced without degrading the image quality.
That is, since the search is stopped by the stop condition without searching for all the block sizes, the amount of calculation can be reduced.

第2実施形態に係る符号化装置2は、図1〜3に示した第1実施形態に係る符号化装置と略同じ構成である。第1実施形態と第2実施形態との相違点は、動き予測・補償回路39の機能が異なる点である。以下、相違点を中心に詳細に説明する。   The encoding device 2 according to the second embodiment has substantially the same configuration as the encoding device according to the first embodiment shown in FIGS. The difference between the first embodiment and the second embodiment is that the function of the motion prediction / compensation circuit 39 is different. Hereinafter, the difference will be mainly described.

図9は、本発明の第2実施形態に係る符号化装置の動作を説明するための図である。
第2実施形態に係る符号化装置2は、ブロックサイズおよび動きベクトルMVBの探索において、画像符号化時の量子化パラメータQpを考慮した中止条件を設定することで、計算量が削減する。
FIG. 9 is a diagram for explaining the operation of the encoding apparatus according to the second embodiment of the present invention.
The encoding device 2 according to the second embodiment reduces the amount of calculation by setting a stop condition in consideration of the quantization parameter Qp at the time of image encoding in the search for the block size and the motion vector MVB.

例えば具体的には、量子化パラメータQpの値が大きい場合には、規定された複数の異なるブロックサイズのうち、小さいサイズのマクロブロックMBの動きベクトルMVや参照フレームのインデックス(Ref_Idx )符号化コスト(指標データCost)が相対的に高くなり、細かいブロック(小さい)ブロックが選ばれにくい。つまり、量子化パラメータQpの値によっては、小さいブロックサイズに対して動きベクトルMVを演算するのは無駄な場合がある。   For example, specifically, when the value of the quantization parameter Qp is large, the motion vector MV of a macroblock MB having a small size or a reference frame index (Ref_Idx) coding cost among a plurality of different block sizes defined. (Index data Cost) becomes relatively high, and a small block (small) block is difficult to be selected. That is, depending on the value of the quantization parameter Qp, it may be useless to calculate the motion vector MV for a small block size.

本実施形態では、量子化パラメータQpに対する各ブロックサイズの統計データを集め、各ブロックサイズが選ばれにくくなる閾値を求める。そして、各ブロックサイズでのQpに関する閾値Qpthが、探索している量子化パラメータQpよりも大きいブロックサイズに対してのみ、そのブロックサイズの動きベクトルMVを計算する。   In the present embodiment, statistical data of each block size with respect to the quantization parameter Qp is collected, and a threshold value that makes it difficult to select each block size is obtained. Then, the motion vector MV of the block size is calculated only for the block size in which the threshold value Qpth relating to Qp in each block size is larger than the quantization parameter Qp being searched.

本実施形態に係る動き予測・補償回路39は、第1実施形態と略同様に、動きベクトル生成部391、指標データ生成部392、および制御部393を主構成要素として有する。
具体的には本実施形態に係る動きベクトル生成部391は、複数の異なるサイズの動き補償ブロックを単位として、動き補償の対象となる画像データS23と、動き補償で参照される参照画像データREFの間の差分に基づいて、動きベクトルMVを生成する。
The motion prediction / compensation circuit 39 according to the present embodiment includes a motion vector generation unit 391, an index data generation unit 392, and a control unit 393 as main components, substantially as in the first embodiment.
Specifically, the motion vector generation unit 391 according to the present embodiment uses a plurality of motion compensation blocks of different sizes as a unit, and the image data S23 that is the target of motion compensation and the reference image data REF that is referred to in motion compensation. Based on the difference between them, a motion vector MV is generated.

指標データ生成部392は、動き補償ブロックを単位として、動き補償の対象となる画像データS23と、参照画像データREFの間の差分、および動き補償に伴い発生する発生情報量に基づいて指標データCostを生成する。   The index data generation unit 392 uses the motion compensation block as a unit, the index data Cost based on the difference between the image data S23 that is the target of motion compensation and the reference image data REF, and the amount of generated information that accompanies the motion compensation. Is generated.

制御部393は、複数の異なるサイズの動き補償ブロックと量子化パラメータに関する閾値とを対応付ける対応情報TBを基に、符号化時の量子化パラメータよりも大きい閾値に対応付けられたサイズの動き補償ブロックについてのみ探索して、動きベクトル生成部391に動きベクトルを生成させる。   The control unit 393, based on the correspondence information TB associating a plurality of motion compensation blocks of different sizes with the thresholds related to the quantization parameters, has a motion compensation block of a size associated with a threshold larger than the quantization parameter at the time of encoding. The motion vector generation unit 391 is caused to generate a motion vector.

例えば図9(a)に示すように、各量子化パラメータQpに対する各ブロックサイズの統計データを生成する。
具体的には、図9(a)に示すように、ブロックサイズ(16×16)について、横軸は量子化パラメータQp、縦軸は、探索結果によりブロックサイズ16×16のマクロブロックMBが選ばれた数を示す。ブロックサイズ(16×8)についても同様に、図9(b)に示すような統計データを生成する。また、ブロックサイズ8×16,8×8,8×4,4×8,4×4についても同様な統計データを生成するが、簡単な説明のため省略する。
図9(a),(b)等に示すように、量子化パラメータQpが大きくなると、ある値で急激に選ばれる回数が少なくなるという特徴を有する。また、ブロックサイズが小さくなると、その値が小さくなる特徴を有する。
For example, as shown in FIG. 9A, statistical data of each block size for each quantization parameter Qp is generated.
Specifically, as shown in FIG. 9A, for the block size (16 × 16), the horizontal axis is a quantization parameter Qp, and the vertical axis is a macroblock MB having a block size of 16 × 16 based on the search result. Number. Similarly, statistical data as shown in FIG. 9B is generated for the block size (16 × 8). Similar statistical data is generated for block sizes of 8 × 16, 8 × 8, 8 × 4, 4 × 8, and 4 × 4, but are omitted for the sake of simplicity.
As shown in FIGS. 9A, 9B, etc., when the quantization parameter Qp is increased, the number of times of rapid selection at a certain value is reduced. Further, when the block size is reduced, the value is reduced.

上述した特徴を基に、各ブロックサイズが選ばれにくくなる量子化パラメータQpに関する閾値Qpthを設定する。
具体的には、例えば量子化パラメータQpが0からQpthまでの累積数が全体の97%程度となるように、閾値Qpthを設定する。例えば閾値Qpthは、特徴や演算量、符号化の負荷、Cost等を考慮して設定する。制御部393が統計データ生成し、生成結果を基に設定してもよいし、予め設定してもよい。
Based on the above-described features, a threshold value Qpth for the quantization parameter Qp that makes it difficult to select each block size is set.
Specifically, for example, the threshold value Qpth is set so that the cumulative number of quantization parameters Qp from 0 to Qpth is about 97% of the total. For example, the threshold value Qpth is set in consideration of features, calculation amount, encoding load, Cost, and the like. The control unit 393 may generate statistical data and set based on the generation result, or may be set in advance.

図9(c)は、ブロックサイズと、ブロックサイズそれぞれについて設定された閾値Qpthを説明するための図である。例えば図9(c)に示すように、ブロックサイズが大きいほど、量子化パラメータQpに関する閾値Qpthの値が大きくなるという特徴を有する。   FIG. 9C is a diagram for explaining the block size and the threshold value Qpth set for each block size. For example, as shown in FIG. 9C, the larger the block size, the larger the value of the threshold value Qpth relating to the quantization parameter Qp.

図10は、本発明の第2実施形態に係る符号化装置による、複数の異なるサイズの動き補償ブロックと量子化パラメータに関する閾値とを対応付ける対応情報TBを説明するための図である。
上述したように例えば閾値Qpthは、統計データを基に図10に示すように、複数の異なるサイズの動き補償ブロックと量子化パラメータに関する閾値とを対応付ける対応情報TBを生成する。
FIG. 10 is a diagram for explaining correspondence information TB associating a plurality of motion compensation blocks of different sizes with thresholds related to quantization parameters by the encoding apparatus according to the second embodiment of the present invention.
As described above, for example, the threshold value Qpth generates correspondence information TB associating a plurality of motion compensation blocks of different sizes with threshold values related to quantization parameters, as shown in FIG. 10 based on statistical data.

対応情報TBは、例えば図10に示すように、ブロックサイズ16×16,16×8,8×16,8×8,8×4,4×8,4×4それぞれに、閾値Qpth_16×16,Qpth_16×8,Qpth_8×16,Qpth_8×8,Qpth_8×4,Qpth_4×8,Qpth_4×4それぞれが対応して記憶されている。   For example, as shown in FIG. 10, the correspondence information TB includes threshold values Qpth — 16 × 16, block sizes 16 × 16, 16 × 8, 8 × 16, 8 × 8, 8 × 4, 4 × 8, and 4 × 4. Qpth_16 × 8, Qpth_8 × 16, Qpth_8 × 8, Qpth_8 × 4, Qpth_4 × 8, and Qpth_4 × 4 are stored correspondingly.

制御部393は、その対応情報TBに、符号化時の量子化パラメータQpよりも大きい閾値Qpthに対応付けられたサイズの動き補償ブロック(マクロブロックMB)についてのみ探索して、動きベクトル生成部391に動きベクトルを生成させる。
また、制御部393は、探索した動き補償ブロック(マクロブロックMB)のうち、指標データ生成部392が生成した指標データCostが最小となる動き補償ブロック(マクロブロックMB)と、その動き補償ブロック(マクロブロックMB)について動きベクトル生成部391が生成した動きベクトルMVを選択する。
The control unit 393 searches the correspondence information TB only for a motion compensation block (macroblock MB) having a size associated with a threshold Qpth larger than the quantization parameter Qp at the time of encoding, and a motion vector generation unit 391. To generate a motion vector.
Also, the control unit 393 includes a motion compensation block (macroblock MB) in which the index data Cost generated by the index data generation unit 392 is minimized among the searched motion compensation blocks (macroblock MB), and the motion compensation block ( The motion vector MV generated by the motion vector generation unit 391 for the macro block MB) is selected.

図11は、第2実施形態に係る符号化装置の動作を説明するためのフローチャートである。
本実施形態では、探索は、ブロックサイズ16×16,16×8,8×16,8×8,8×4,4×8,4×4の順に行うとする。
FIG. 11 is a flowchart for explaining the operation of the encoding apparatus according to the second embodiment.
In this embodiment, the search is performed in the order of block sizes 16 × 16, 16 × 8, 8 × 16, 8 × 8, 8 × 4, 4 × 8, and 4 × 4.

ステップST101において、制御部393は、探索過程において、レート制御回路32から入力された現在の量子化パラメータQpが、ブロックサイズ16×16の閾値Qpth_16×16以下か否かを判別する。
制御部は393は、現在の量子化パラメータQpが閾値Qpth_16×16以下であると判別すると、ブロックサイズ16×16についての探索を行う。具体的には、制御部393は、動きベクトル生成部391に、そのサイズでの動きベクトルMVを生成させ(ST102)、ステップST103の処理に進む。
In step ST101, in the search process, the control unit 393 determines whether or not the current quantization parameter Qp input from the rate control circuit 32 is equal to or smaller than a threshold Qpth_16 × 16 having a block size of 16 × 16.
When the control unit 393 determines that the current quantization parameter Qp is equal to or less than the threshold value Qpth — 16 × 16, the control unit 393 performs a search for the block size 16 × 16. Specifically, the control unit 393 causes the motion vector generation unit 391 to generate a motion vector MV at that size (ST102), and proceeds to the process of step ST103.

一方、ステップST101において、制御部393は、現在の量子化パラメータQpが閾値Qpth_16×16より大きいと判別すると、16×16のブロックサイズについての探索を行わずに、ステップST103の処理に進む。   On the other hand, when the control unit 393 determines in step ST101 that the current quantization parameter Qp is larger than the threshold value Qpth_16 × 16, the control unit 393 proceeds to the process of step ST103 without performing a search for the block size of 16 × 16.

ステップST103において、制御部393は、現在の量子化パラメータQpが閾値Qpth_16×8以下か否かを判別する。
制御部393は、現在の量子化パラメータQpが閾値Qpth_16×8以下であると判別すると、ブロックサイズ16×8についての探索を行う。具体的には、制御部393は、動きベクトル生成部391に、そのサイズでの動きベクトルMVを生成させ(ST104)、次の処理に進む。
一方、ステップST103において、制御部393は、現在の量子化パラメータQpが閾値Qpth_16×8より大きいと判別すると、16×8のブロックサイズについての探索を行わずに、次の処理に進む。
以下、ブロックサイズ8×16,8×8,8×4,4×8,4×4についても同様に行い、ステップST110において、制御部393は、探索した動き補償ブロック(マクロブロックMB)のうち、指標データ生成部392が生成した指標データCostが最小となる動き補償ブロック(マクロブロックMB)と、その動き補償ブロック(マクロブロックMB)について動きベクトル生成部391が生成した動きベクトルMVを選択する。
In step ST103, the control unit 393 determines whether or not the current quantization parameter Qp is equal to or less than a threshold value Qpth — 16 × 8.
When the control unit 393 determines that the current quantization parameter Qp is equal to or less than the threshold value Qpth — 16 × 8, the control unit 393 performs a search for a block size of 16 × 8. Specifically, the control unit 393 causes the motion vector generation unit 391 to generate a motion vector MV at that size (ST104), and proceeds to the next process.
On the other hand, when the control unit 393 determines in step ST103 that the current quantization parameter Qp is larger than the threshold value Qpth_16 × 8, the control unit 393 proceeds to the next process without performing a search for the block size of 16 × 8.
Thereafter, the same processing is performed for block sizes 8 × 16, 8 × 8, 8 × 4, 4 × 8, and 4 × 4, and in step ST110, the control unit 393 determines the motion compensation block (macroblock MB) that has been searched The motion compensation block (macroblock MB) having the smallest index data Cost generated by the index data generation unit 392 and the motion vector MV generated by the motion vector generation unit 391 for the motion compensation block (macroblock MB) are selected. .

第2実施形態に係る符号化装置の動作は、この形態に限られるものではない。例えば、制御部393は、図10に示した対応情報TBを基に、現在の符号化時の量子化パラメータQpよりも大きい閾値Qpthに対応付けられたサイズの動き補償ブロック(マクロブロックMB)についてのみ探索して、動きベクトル生成部391に動きベクトルを生成させればよい。   The operation of the encoding apparatus according to the second embodiment is not limited to this form. For example, the control unit 393 determines a motion compensation block (macroblock MB) having a size associated with a threshold Qpth that is larger than the quantization parameter Qp at the time of current encoding based on the correspondence information TB illustrated in FIG. Only the motion vector may be searched and the motion vector generation unit 391 may generate a motion vector.

以上説明したように、第2実施形態に係る符号化装置は、複数の異なるサイズの動き補償ブロックを単位として、動き補償の対象となる画像データS23と、動き補償で参照される参照画像データREFの間の差分に基づいて、動きベクトルMVを生成する動きベクトル生成部391と、動き補償ブロックを単位として、動き補償の対象となる画像データS23と、参照画像データREFの間の差分、および動き補償に伴い発生する発生情報量に基づいて指標データCostを生成する指標データ生成部392と、複数の異なるサイズの動き補償ブロックと量子化パラメータに関する閾値Qpthとを対応付ける対応情報TBを基に、符号化時の量子化パラメータQpよりも大きい閾値Qpthに対応付けられたサイズの動き補償ブロック(マクロブロックMB)についてのみ探索して、動きベクトル生成部に動きベクトルMVを生成させ、探索した動き補償ブロックのうち、指標データ生成部392が生成した指標データCostが最小となる動き補償ブロックMBと、当該動き補償ブロックMBについて動きベクトル生成部391が生成した動きベクトルMVを選択する制御部393とを設けたので、画質を劣化させることなく、従来に比べて演算量を削減することができる。   As described above, the encoding apparatus according to the second embodiment has the image data S23 to be subjected to motion compensation and the reference image data REF referred to in motion compensation in units of a plurality of motion compensation blocks having different sizes. A motion vector generation unit 391 that generates a motion vector MV based on the difference between the image data S23 that is subject to motion compensation and the difference between the reference image data REF and the motion in units of motion compensation blocks. Based on the index data generation unit 392 that generates the index data Cost based on the amount of generated information that accompanies the compensation, and the correspondence information TB that associates the motion compensation blocks of different sizes with the threshold value Qpth relating to the quantization parameter, Motion compensation block having a size associated with a threshold Qpth larger than the quantization parameter Qp at the time of conversion ( Only the black block MB), the motion vector generation unit generates a motion vector MV, and among the searched motion compensation blocks, the motion compensation block MB having the minimum index data Cost generated by the index data generation unit 392 and Since the control unit 393 that selects the motion vector MV generated by the motion vector generation unit 391 for the motion compensation block MB is provided, the amount of calculation can be reduced compared to the conventional case without degrading the image quality.

第3実施形態に係る符号化装置2は、図1〜3に示した第1実施形態に係る符号化装置と略同じ構成である。第1実施形態と第3実施形態との相違点は、動き予測・補償回路39の機能が異なる点である。
本実施形態に係る動き予測・補償回路39は、第1実施形態と略同様に、動きベクトル生成部391、指標データ生成部392、および制御部393を主構成要素として有する。以下、相違点を中心に詳細に説明する。
The encoding device 2 according to the third embodiment has substantially the same configuration as the encoding device according to the first embodiment shown in FIGS. The difference between the first embodiment and the third embodiment is that the function of the motion prediction / compensation circuit 39 is different.
The motion prediction / compensation circuit 39 according to the present embodiment includes a motion vector generation unit 391, an index data generation unit 392, and a control unit 393 as main components, substantially as in the first embodiment. Hereinafter, the difference will be mainly described.

図12は、本発明に係る第3実施形態の符号化装置の動作を説明するための図である。
第3実施形態に係る符号化装置2は、探索過程での中止条件として、各ブロックに対して、予測画像に対する差分絶対値和SADの閾値をQpに応じて設定する。例えば、各ブロックサイズの動きベクトル(MV)を求める過程で、差分絶対値和SADが閾値を超えた場合に、探索を中断することにより、計算量を削減する。
FIG. 12 is a diagram for explaining the operation of the coding apparatus according to the third embodiment of the present invention.
The encoding device 2 according to the third embodiment sets, for each block, a threshold value of the difference absolute value sum SAD for the predicted image according to Qp as a stop condition in the search process. For example, in the process of obtaining the motion vector (MV) of each block size, the calculation amount is reduced by interrupting the search when the sum of absolute differences SAD exceeds a threshold value.

本実施形態に係る符号化装置2は、例えば図12に示すように、各ブロックサイズにおいて、マクロブロックのブロックサイズとして、採用されたときの差分絶対値和SADと、採用されなかったときの差分絶対値和SADの分布を生成し、生成した分布から各ブロックサイズが最終的に、マクロブロックのブロックサイズとして採用されるときの差分絶対値和SADのとり得る許容値を算出する。
ブロックサイズそれぞれについて、この差分絶対値和SADの許容量を閾値SADthとして各量子化パラメータQpについて求めておき、動きベクトルMVでの探索過程での中止条件に用いる。
For example, as illustrated in FIG. 12, the encoding device 2 according to the present embodiment uses a difference absolute value sum SAD when adopted as a block size of a macroblock and a difference when not adopted as each block size. An absolute value sum SAD distribution is generated, and an allowable value that can be taken by the difference absolute value sum SAD when each block size is finally adopted as the block size of the macroblock is calculated from the generated distribution.
For each block size, each quantization parameter Qp is obtained with the allowable amount of the difference absolute value sum SAD as a threshold value SADth, and is used as a stop condition in the search process with the motion vector MV.

動きベクトル生成部391は、複数の異なるサイズの動き補償ブロックを単位として、動き補償の対象となる画像データS23と、動き補償で参照される参照画像データREF間の差分絶対値和SADに基づいて動きベクトルMVを生成する。   The motion vector generation unit 391 is based on a difference absolute value sum SAD between the image data S23 to be subjected to motion compensation and the reference image data REF referred to in motion compensation in units of motion compensation blocks of different sizes. A motion vector MV is generated.

指標データ生成部392は、複数の異なるサイズの動き補償ブロックを単位として、動き補償の対象となる画像データS23と、参照画像データREFの間の差分、および動き補償に伴い発生する発生情報量に基づいて指標データCostを生成する。   The index data generation unit 392 uses a plurality of motion compensation blocks of different sizes as a unit to calculate the difference between the image data S23 that is the target of motion compensation and the reference image data REF, and the amount of generated information that accompanies motion compensation. Based on this, index data Cost is generated.

制御部393は、精度の異なる第1および第2の精度で、複数の動き補償ブロックそれぞれについて動きベクトルの探索を行う際に、第1の精度で動きベクトル生成部391が生成した動きベクトルMVに対応する差分絶対値和SADが、複数の異なるサイズの動き補償ブロックそれぞれに予め設定された差分絶対値和SADに関する閾値SADthよりも大きい場合には、第2の精度についての探索を中止する。
また、制御部393は、複数のサイズの動き補償ブロックを単位として、動きベクトル生成部391が、第1および第2の精度で生成した動きベクトルの内、動き補償ブロックそれぞれに対応して指標データ生成部392が生成した指標データCostが最小となるサイズの動き補償ブロック(マクロブロック)MBおよび動きベクトルMVを選択する。
When the motion vector search is performed for each of the plurality of motion compensation blocks with the first and second accuracy having different accuracy, the control unit 393 generates the motion vector MV generated by the motion vector generation unit 391 with the first accuracy. When the corresponding difference absolute value sum SAD is larger than the threshold value SADth relating to the difference absolute value sum SAD preset for each of the motion compensation blocks of different sizes, the search for the second accuracy is stopped.
In addition, the control unit 393 sets index data corresponding to each of the motion compensation blocks among the motion vectors generated by the motion vector generation unit 391 with the first and second accuracy, with the motion compensation blocks having a plurality of sizes as a unit. A motion compensation block (macroblock) MB and a motion vector MV having a size that minimizes the index data Cost generated by the generation unit 392 are selected.

ここで、複数の異なるサイズの動き補償ブロックそれぞれに予め設定された差分絶対値和に関する閾値SADthは、符号化の際の量子化パラメータQpに応じて規定される。   Here, the threshold value SADth relating to the sum of absolute differences set in advance for each of a plurality of motion compensation blocks of different sizes is defined according to the quantization parameter Qp at the time of encoding.

図13は、本発明の第3実施形態に係る符号化装置の差分絶対値和に関する閾値SADthを説明するための図である。
制御部393は、例えば上述した図12に示すように、ブロックサイズが最終的に、マクロブロックのブロックサイズとして採用されるときの差分絶対値和SADのとり得る許容値を算出し、ブロックサイズそれぞれについて、この差分絶対値和SADの許容量を閾値SADthとして各量子化パラメータQpについて求め、例えば図13(a)〜(g)に示すように、各ブロックサイズに対して、差分絶対値和SADに関する閾値SADthが、量子化パラメータに応じて規定される。つまり対応付けられている。
FIG. 13 is a diagram for explaining a threshold value SADth relating to the sum of absolute differences of the encoding device according to the third embodiment of the present invention.
For example, as illustrated in FIG. 12 described above, the control unit 393 calculates an allowable value that the absolute difference value sum SAD can take when the block size is finally adopted as the block size of the macroblock, For each quantization parameter Qp, an allowable amount of the difference absolute value sum SAD is set as a threshold value SADth. For example, as shown in FIGS. 13A to 13G, the difference absolute value sum SAD is obtained for each block size. A threshold SADth is defined according to the quantization parameter. That is, it is associated.

具体的には、ブロックサイズ16×16,16×8,8×16,8×8,8×4,4×8,4×4それぞれについて、図13(a)〜(g)に示すように、差分絶対値和SADに関する閾値SADth_16×16,SADth_16×8,SADth_8×16,SADth_8×8,SADth_8×4,SADth_4×8,SADth_4×4それぞれが対応付けられている。   Specifically, as shown in FIGS. 13A to 13G, the block sizes of 16 × 16, 16 × 8, 8 × 16, 8 × 8, 8 × 4, 4 × 8, and 4 × 4, respectively. , Threshold values SADth — 16 × 16, SADth — 16 × 8, SADth — 8 × 16, SADth — 8 × 8, SADth — 8 × 4, SADth — 4 × 8, and SADth — 4 × 4 are associated with each other.

また、各閾値SADthは量子化パラメータQpに応じて規定されている。
具体的には、図13(a)に示すように、量子化パラメータQ1,Q2,…と、閾値SAD16×16_Q1,閾値SAD16×16_Q2,…、図13(b)に示すように、量子化パラメータQ1,Q2,…と、閾値SAD16×8_Q1,閾値SAD16×8_Q2,…、図13(c)に示すように、量子化パラメータQ1,Q2,…と、閾値SAD8×16_Q1,閾値SAD8×16_Q2,…、図13(d)に示すように、量子化パラメータQ1,Q2,…と、閾値SAD8×8_Q1,閾値SAD8×8_Q2,…、図13(e)に示すように、量子化パラメータQ1,Q2,…と、閾値SAD8×4_Q1,閾値SAD8×4_Q2,…、図13(f)に示すように、量子化パラメータQ1,Q2,…と、閾値SAD4×8_Q1,閾値SAD4×8_Q2,…、図13(g)に示すように、量子化パラメータQ1,Q2,…と、閾値SAD4×4_Q1,閾値SAD4×4_Q2,…とが関連付けられている。
制御部393は、図13(a)〜(g)に示した対応関係を基に、探索過程での中止条件を設定することで、演算量を削減する。
Each threshold SADth is defined according to the quantization parameter Qp.
Specifically, as shown in FIG. 13A, quantization parameters Q1, Q2,..., Threshold SAD16 × 16_Q1, threshold SAD16 × 16_Q2,. .., Threshold SAD16 × 8_Q1, threshold SAD16 × 8_Q2,..., Quantization parameter Q1, Q2,..., Threshold SAD8 × 16_Q1, threshold SAD8 × 16_Q2,. As shown in FIG. 13 (d), quantization parameters Q1, Q2,..., Threshold SAD8 × 8_Q1, threshold SAD8 × 8_Q2,. .., Threshold SAD8 × 4_Q1, threshold SAD8 × 4_Q2,..., Quantization parameter Q1, Q2,..., Threshold SAD4 × 8_Q1, threshold As shown in FIG. 13G, the values SAD4 × 8_Q2,... Are associated with threshold values SAD4 × 4_Q1, threshold SAD4 × 4_Q2,.
The control unit 393 reduces the amount of calculation by setting a stop condition in the search process based on the correspondence relationships illustrated in FIGS.

図14は、本発明の第3実施形態の係る符号化装置の動作を説明するための図である。
本実施形態では、制御部393は、例えばブロックサイズ16×16,16×8,8×16,8×8,8×4,4×8,4×4の順に探索を行うとする。
ステップST201において、例えば制御部393は、ブロックサイズ16×16のマクロブロックを単位として、整数ピクセル精度(第1の精度)での動きベクトルを、動きベクトル生成部391に生成させる。
ステップST202において、制御部393は、ステップST201の整数精度での動きベクトルMVを求めた段階で、差分絶対値和SADが、現在の量子化パラメータQpに対応する閾値SADth_16×16_Qpよりも大きいか否かを判別する。制御部393は、差分絶対値和SADが、現在の量子化パラメータQpに対応する閾値SADth_16×16_Qpよりも大きいと判別した場合には、探索を中止し、ステップST203の処理を行わない。また、制御部393は、その中止したブロックサイズを、最終的に選択されるブロックサイズの候補の中から除外する。
FIG. 14 is a diagram for explaining the operation of the encoding apparatus according to the third embodiment of the present invention.
In the present embodiment, the control unit 393 performs a search in the order of, for example, block size 16 × 16, 16 × 8, 8 × 16, 8 × 8, 8 × 4, 4 × 8, and 4 × 4.
In step ST201, for example, the control unit 393 causes the motion vector generation unit 391 to generate a motion vector with integer pixel accuracy (first accuracy) in units of macroblocks having a block size of 16 × 16.
In step ST202, the control unit 393 determines whether the difference absolute value sum SAD is larger than the threshold value SADth_16 × 16_Qp corresponding to the current quantization parameter Qp at the stage of obtaining the motion vector MV with integer precision in step ST201. Is determined. When it is determined that the difference absolute value sum SAD is larger than the threshold value SADth — 16 × 16_Qp corresponding to the current quantization parameter Qp, the control unit 393 stops the search and does not perform the process of step ST203. In addition, the control unit 393 excludes the canceled block size from the finally selected block size candidates.

一方、ステップST202の判別において、制御部393は、ステップST201の整数精度での動きベクトルMVを求めた段階で、差分絶対値和SADが、現在の量子化パラメータQpに対応する閾値SADth_16×16_Qp以下であると判別した場合には、制御部393は、第2ステップとして、非整数ピクセル精度(1/2ピクセル、1/4ピクセル精度等の第2の精度)での動きベクトルMVを、動きベクトル生成部391に生成させる。   On the other hand, in the determination of step ST202, the control unit 393 obtains the motion vector MV with integer precision in step ST201, and the difference absolute value sum SAD is equal to or less than the threshold value SADth_16 × 16_Qp corresponding to the current quantization parameter Qp. In the second step, the control unit 393 determines the motion vector MV with non-integer pixel accuracy (second accuracy such as 1/2 pixel or 1/4 pixel accuracy) as a motion vector. The generation unit 391 generates them.

制御部393は、他のブロックサイズについても、ステップST201〜203と同様な処理を行う(ST204)。
ステップST210において、制御部393は、非整数精度の動きベクトルMVまで求めているブロックサイズの中から、最も指標データCostが小さい動きベクトルMVおよびブロックサイズを選択する。
具体的には、制御部393は、複数のサイズの動き補償ブロックを単位として、動きベクトル生成部391が、第1および第2の精度で生成した動きベクトルの内、動き補償ブロックそれぞれに対応して指標データ生成部392が生成した指標データCostが最小となるサイズの動き補償ブロック(マクロブロック)MBおよび動きベクトルMVを選択する。
Control unit 393 performs the same process as steps ST201 to ST203 for other block sizes (ST204).
In step ST210, the control unit 393 selects the motion vector MV and block size with the smallest index data Cost from the block sizes obtained up to the motion vector MV with non-integer precision.
Specifically, the control unit 393 corresponds to each of the motion compensation blocks among the motion vectors generated by the motion vector generation unit 391 with the first and second accuracy in units of motion compensation blocks of a plurality of sizes. Then, the motion compensation block (macroblock) MB and the motion vector MV having a size that minimizes the index data Cost generated by the index data generation unit 392 are selected.

以上説明したように、本実施形態に係る符号化装置2は、複数の異なるサイズの動き補償ブロックを単位として、動き補償の対象となる画像データS23と、動き補償で参照される参照画像データREF間の差分絶対値和SADに基づいて動きベクトルMVを生成する動きベクトル生成部391と、複数の異なるサイズの動き補償ブロックを単位として、動き補償の対象となる画像データS23と、参照画像データREFの間の差分、および動き補償に伴い発生する発生情報量に基づいて指標データCostを生成する指標データ生成部392と、精度の異なる第1および第2の精度で、複数の動き補償ブロックそれぞれについて動きベクトルの探索を行う際に、第1の精度で動きベクトル生成部391が生成した動きベクトルMVに対応する差分絶対値和SADが、複数の異なるサイズの動き補償ブロックそれぞれに予め設定された差分絶対値和に関する閾値SADthよりも大きい場合には、第2の精度についての探索を中止し、複数のサイズの動き補償ブロックを単位として、動きベクトル生成部391が、第1および第2の精度で生成した動きベクトルMVの内、動き補償ブロックそれぞれに対応して指標データ生成部が生成した指標データCostが最小となるサイズの動き補償ブロックMBおよび動きベクトルMVを選択する制御部393とを設けたので、探索過程で、画質が劣化することなく、演算量を削減することができる。   As described above, the encoding apparatus 2 according to the present embodiment has the image data S23 that is the target of motion compensation and the reference image data REF that is referred to in motion compensation in units of a plurality of motion compensation blocks having different sizes. A motion vector generation unit 391 that generates a motion vector MV based on a sum of absolute differences SAD, image data S23 that is a target of motion compensation, and reference image data REF, with a plurality of motion compensation blocks having different sizes as a unit. The index data generation unit 392 that generates the index data Cost based on the difference between the two and the amount of generated information that accompanies the motion compensation, and each of the plurality of motion compensation blocks with the first and second accuracies having different accuracies When searching for a motion vector, it corresponds to the motion vector MV generated by the motion vector generation unit 391 with the first accuracy. When the difference absolute value sum SAD is larger than the threshold SADth regarding the difference absolute value sum set in advance for each of the motion compensation blocks of different sizes, the search for the second accuracy is stopped, With the motion compensation block as a unit, the index data Cost generated by the index data generation unit corresponding to each motion compensation block among the motion vectors MV generated by the motion vector generation unit 391 with the first and second accuracy is the smallest. Since the motion compensation block MB and the control unit 393 for selecting the motion vector MV are provided, the amount of calculation can be reduced without deterioration of the image quality in the search process.

また、複数の異なるサイズの動き補償ブロックそれぞれに予め設定された差分絶対値和に関する閾値は、符号化の際の量子化パラメータQpに応じて規定されるので、量子化パラメータQpに応じて中止条件を調整することで、画質に応じて演算量を軽減することができる。   In addition, since the threshold value regarding the sum of absolute differences set in advance for each of the motion compensation blocks of different sizes is defined according to the quantization parameter Qp at the time of encoding, the stop condition is determined according to the quantization parameter Qp. By adjusting, the amount of calculation can be reduced according to the image quality.

第4実施形態に係る符号化装置2は、図1〜3に示した第1実施形態に係る符号化装置と略同じ構成である。第1実施形態と第2実施形態との相違点は、動き予測・補償回路39および可逆符号化回路27の機能が異なる点である。以下、相違点を中心に詳細に説明する。   The encoding device 2 according to the fourth embodiment has substantially the same configuration as the encoding device according to the first embodiment shown in FIGS. The difference between the first embodiment and the second embodiment is that the functions of the motion prediction / compensation circuit 39 and the lossless encoding circuit 27 are different. Hereinafter, the difference will be mainly described.

本実施形態に係る符号化装置2は、ビットストリーム内にBピクチャ(B −Picture)が存在する場合に、量子化パラメータQpに応じて、B −Pictureの双方向予測モード判定時の中止条件を設けることで、画質の劣化なしに演算量を削減する。   When there is a B picture (B-Picture) in the bitstream, the encoding apparatus 2 according to the present embodiment sets a stop condition when determining the B-Picture bidirectional prediction mode according to the quantization parameter Qp. By providing, the amount of calculation is reduced without deterioration of image quality.

Bピクチャには、前方向予測、後方向予測・双方向予測・ダイレクト予測(Direct)の予測の4つのモードが規定される。
このうち、双方向予測では、動きベクトルとそれに対応する参照フレームインデックスが2つ必要であるため、他のモードよりもヘッダー部のビット量は高い。つまり量子化パラメータが大きい場合には、細かいブロックサイズが選ばれにくいのと同様に、量子化パラメータQpが大きい場合には、双方向予測が選ばれにくいという特徴を有する。
For the B picture, four modes of forward prediction, backward prediction, bidirectional prediction, and direct prediction (Direct) prediction are defined.
Of these, bi-directional prediction requires two motion vectors and two corresponding reference frame indexes, so the bit amount of the header portion is higher than in other modes. That is, when the quantization parameter is large, it is difficult to select a fine block size. Similarly, when the quantization parameter Qp is large, bidirectional prediction is difficult to select.

符号化装置2は、Bピクチャの双方向予測モードが選ばれにくい量子化パラメータQpに関する閾値を統計的に求め、閾値よりも高い量子化パラメータQpに対しては、双方向予測モードの判定自体を行わない。以下、第1実施形態との相違点を中心に詳細に説明する。
符号化手段として動きベクトル生成部391、指標データ生成部392および可逆符号化回路27は、複数の異なるサイズの動き補償ブロックを単位として、双方向の動き補償により、画像データの符号化を行う。
The encoding device 2 statistically obtains a threshold value for the quantization parameter Qp for which the B picture bi-directional prediction mode is difficult to select, and determines the bi-prediction mode itself for a quantization parameter Qp higher than the threshold value. Not performed. Hereinafter, the difference from the first embodiment will be mainly described.
The motion vector generation unit 391, the index data generation unit 392, and the lossless encoding circuit 27 as encoding means encode image data by bidirectional motion compensation in units of motion compensation blocks having different sizes.

制御部393は、上述した符号化手段による符号化の際の量子化パラメータQpが、予め設定された量子化パラメータQpに関する閾値よりも大きい場合には、一方向の動き補償により画像データの符号化を符号化手段に行わせ、量子化パラメータQpが閾値より小さい場合には、双方向の動き補償により符号化を符号化手段に行わせる。   When the quantization parameter Qp at the time of encoding by the encoding means described above is larger than a threshold value related to the preset quantization parameter Qp, the control unit 393 encodes image data by one-way motion compensation. When the quantization parameter Qp is smaller than the threshold value, the encoding unit performs encoding by bidirectional motion compensation.

上述した構成の本実施形態に係る符号化装置の動作を説明する。
まず、符号化装置2は、Bピクチャの双方向予測モード選ばれにくい量子化パラメータQpに関する閾値を統計的に求める。
符号化手段として動きベクトル生成部391および可逆符号化回路27は、複数の異なるサイズの動き補償ブロックを単位として、双方向の動き補償により、画像データの符号化を行う。
制御部393は、上述した符号化手段による符号化の際の量子化パラメータQpが、予め設定された量子化パラメータQpに関する閾値よりも大きい場合には、一方向の動き補償により画像データの符号化を符号化手段に行わせ、量子化パラメータQpが閾値より小さい場合には、双方向の動き補償により符号化を符号化手段に行わせる。
The operation of the encoding apparatus according to this embodiment having the above-described configuration will be described.
First, the encoding device 2 statistically obtains a threshold value related to the quantization parameter Qp that is difficult to select the B picture bi-directional prediction mode.
The motion vector generation unit 391 and the lossless encoding circuit 27 as encoding means encode image data by bidirectional motion compensation in units of motion compensation blocks of different sizes.
When the quantization parameter Qp at the time of encoding by the encoding means described above is larger than a threshold value related to the preset quantization parameter Qp, the control unit 393 encodes image data by one-way motion compensation. When the quantization parameter Qp is smaller than the threshold value, the encoding unit performs encoding by bidirectional motion compensation.

以上説明したように、本実施形態に係る符号化装置2は、複数の異なるサイズの動き補償ブロックを単位として、双方向の動き補償により、画像データの符号化を行う符号化手段としての動きベクトル生成部391、指標データ生成部392、および可逆符号化回路27と、符号化手段による符号化の際の量子化パラメータが、予め設定された量子化パラメータQpに関する閾値よりも大きい場合には、一方向の動き補償により画像データの符号化を符号化手段に行わせ、量子化パラメータQpが閾値より小さい場合には、双方向の動き補償により符号化を符号化手段に行わせる制御部393とを設けたので、画質を劣化させることなく、演算量を削減することができる。   As described above, the encoding apparatus 2 according to the present embodiment has a motion vector as an encoding unit that encodes image data by bidirectional motion compensation in units of motion compensation blocks of different sizes. When the quantization parameter at the time of encoding by the generating unit 391, the index data generating unit 392, the lossless encoding circuit 27, and the encoding unit is larger than a preset threshold for the quantization parameter Qp, A control unit 393 that causes the encoding unit to perform encoding of the image data by motion compensation in the direction and causes the encoding unit to perform encoding by bidirectional motion compensation when the quantization parameter Qp is smaller than the threshold value; Since it is provided, the calculation amount can be reduced without degrading the image quality.

第5実施形態に係る符号化装置2は、図1〜3に示した第1実施形態に係る符号化装置と略同じ構成である。第1実施形態と第5実施形態との相違点は、動き予測・補償回路39の機能が異なる点である。以下、相違点を中心に詳細に説明する。   The encoding device 2 according to the fifth embodiment has substantially the same configuration as the encoding device according to the first embodiment shown in FIGS. The difference between the first embodiment and the fifth embodiment is that the function of the motion prediction / compensation circuit 39 is different. Hereinafter, the difference will be mainly described.

本実施形態に係る符号化装置2は、第5実施形態では、選択されるブロックサイズには、画像サイズも関係することを利用する。
具体的には、画像データの解像度が低い場合には、小さいブロックサイズによる予測画像生成が選択される傾向があることを利用して、ブロックサイズの判定を制限することで、演算量を削減する。
In the fifth embodiment, the encoding device 2 according to the present embodiment uses the fact that the block size to be selected is also related to the image size.
Specifically, when the resolution of the image data is low, the calculation amount is reduced by limiting the determination of the block size by utilizing the tendency that the predicted image generation with a small block size is selected. .

一般的に、画像の解像度が高い場合には画像の中で1個のマクロブロックが占める割合は小さいが、解像度が低い場合には、1個のマクロブロックの占める割合が大きくなる。つまり、解像度が低い場合には、1個のマクロブロック内に異なる性質の画像が含まれやすくなる。したがって、解像度が高い場合にはブロックサイズは、細かいサイズ(小さいサイズ)が、解像度が低い場合には大きいブロックサイズが選択される。   In general, when the resolution of an image is high, the proportion of one macroblock in the image is small, but when the resolution is low, the proportion of one macroblock is large. That is, when the resolution is low, images of different properties are likely to be included in one macroblock. Therefore, when the resolution is high, a fine block size (small size) is selected, and when the resolution is low, a large block size is selected.

そこで、本実施形態に係る符号化装置2は、各ブロックサイズで、統計的に求めた量子化パラメータQpに応じた閾値に対して、解像度が低い場合には細かいサイズ(小さいサイズ)が選ばれるようにオフセットをかける。
以下、詳細に説明する。
Therefore, the encoding device 2 according to the present embodiment selects a small size (small size) when the resolution is low with respect to the threshold value corresponding to the statistically obtained quantization parameter Qp at each block size. Apply an offset.
Details will be described below.

本実施形態に係る動きベクトル生成部391は、複数の異なるサイズの動き補償ブロックを単位として、動き補償の対象となる画像データS23と、動き補償で参照される参照画像データREF間の差分絶対値和SADに基づいて動きベクトルを生成する。
制御部393は、画像データの解像度に基づいて、複数の異なるサイズの動き補償ブロックのうち、画像データの解像度が高くなるにしたがって大きなサイズの動き補償ブロックを選択し、選択したサイズの動き補償ブロックについて、動きベクトル生成部391に動きベクトルMVを生成させる制御を行う。
The motion vector generation unit 391 according to the present embodiment uses a plurality of motion compensation blocks of different sizes as a unit, and an absolute difference between the image data S23 that is the target of motion compensation and the reference image data REF that is referred to in motion compensation. A motion vector is generated based on the sum SAD.
Based on the resolution of the image data, the control unit 393 selects a motion compensation block having a larger size as the resolution of the image data increases from among a plurality of motion compensation blocks having different sizes, and the motion compensation block having the selected size. Is controlled to cause the motion vector generation unit 391 to generate a motion vector MV.

具体的には、制御部393は、画像データが第1の解像度の場合には、複数の異なるサイズの動き補償ブロックのうち、第1のサイズの動き補償ブロックを選択し、画像データが第1の解像度よりも低解像度の第2の解像度の場合には、第1のサイズよりも小さい動き補償ブロックを選択し、選択したサイズの動き補償ブロックについて、動きベクトル生成部391に動きベクトルを生成させる制御を行う。   Specifically, when the image data has the first resolution, the control unit 393 selects a motion compensation block of the first size from among a plurality of motion compensation blocks of different sizes, and the image data is the first In the case of the second resolution lower than the first resolution, a motion compensation block smaller than the first size is selected, and the motion vector generation unit 391 is caused to generate a motion vector for the motion compensation block of the selected size. Take control.

以上の構成の本実施形態に係る符号化装置2の動作を簡単に説明する。
制御部393は、画像データが第1の解像度の場合には、複数の異なるサイズの動き補償ブロックのうち、第1のサイズの動き補償ブロックを選択し、画像データが第1の解像度よりも低解像度の第2の解像度の場合には、第1のサイズよりも小さい動き補償ブロックを選択し、選択したサイズの動き補償ブロックについて、動きベクトル生成部391に動きベクトルを生成させる制御を行う。
The operation of the encoding apparatus 2 according to this embodiment having the above configuration will be briefly described.
When the image data has the first resolution, the control unit 393 selects a motion compensation block having the first size from among a plurality of motion compensation blocks having different sizes, and the image data has a lower resolution than the first resolution. In the case of the second resolution, a motion compensation block smaller than the first size is selected, and control is performed to cause the motion vector generation unit 391 to generate a motion vector for the motion compensation block of the selected size.

以上説明したように、本実施形態に係る符号化装置2は、複数の異なるサイズの動き補償ブロックを単位として、動き補償の対象となる画像データS23と、動き補償で参照される参照画像データREF間の差分絶対値和SADに基づいて動きベクトルMVを生成する動きベクトル生成部391と、画像データの解像度に基づいて、複数の異なるサイズの動き補償ブロックのうち、画像データの解像度が高くなるにしたがって大きなサイズの動き補償ブロックを選択し、選択したサイズの動き補償ブロックについて、動きベクトル生成部391に動きベクトルMVを生成させる制御を行う制御部393とを設けたので、画質を劣化させることなく計算量を削減することができる。   As described above, the encoding apparatus 2 according to the present embodiment has the image data S23 that is the target of motion compensation and the reference image data REF that is referred to in motion compensation in units of a plurality of motion compensation blocks having different sizes. The motion vector generation unit 391 that generates the motion vector MV based on the sum of absolute differences SAD between them, and the resolution of the image data among a plurality of motion compensation blocks of different sizes is increased based on the resolution of the image data. Therefore, since a motion compensation block having a large size is selected, and a control unit 393 that controls the motion vector generation unit 391 to generate a motion vector MV for the selected motion compensation block is provided, the image quality is not deteriorated. The amount of calculation can be reduced.

なお、本発明は本実施形態に限られるものではなく、任意好適な改変が可能である。
例えば、ブロックサイズは、上述したサイズに限られるものではない。ブロックサイズは任意である。
また、本発明に係る符号化装置の各実施形態は、単独に実施してもよいし、各実施形態それぞれを組み合わせてもよい。こうすることにより、より演算量を削減することができる。
Note that the present invention is not limited to this embodiment, and any suitable modification can be made.
For example, the block size is not limited to the size described above. The block size is arbitrary.
In addition, each embodiment of the encoding device according to the present invention may be implemented independently or may be combined with each other. By doing so, the amount of calculation can be further reduced.

本実施形態の通信システム1の概念図である。It is a conceptual diagram of the communication system 1 of this embodiment. 図1に示す符号化装置2の全体構成図である。It is a whole block diagram of the encoding apparatus 2 shown in FIG. 図2に示した動き予測・補償回路の本発明に係る機能ブロック図である。FIG. 3 is a functional block diagram according to the present invention of the motion prediction / compensation circuit shown in FIG. 2. 図2に示す符号化装置の動き予測・補償回路における動きベクトルの探索方法を説明するための図である。It is a figure for demonstrating the search method of the motion vector in the motion prediction / compensation circuit of the encoding apparatus shown in FIG. 図2に示した動き予測・補償回路39において、採用可能な動き予測ブロックのサイズの種類を説明するための図である。FIG. 4 is a diagram for explaining types of motion prediction block sizes that can be employed in the motion prediction / compensation circuit 39 shown in FIG. 2. 一般的な符号化装置の動き予測・補償回路の動作を説明するための図である。It is a figure for demonstrating operation | movement of the motion estimation / compensation circuit of a general encoding apparatus. 図3に示した符号化装置の制御部393による動きベクトルの探索を説明するための図である。It is a figure for demonstrating the search of the motion vector by the control part 393 of the encoding apparatus shown in FIG. 図1に示した符号化装置の動きベクトルの探索に係る動作の一具体例を説明するためのフローチャートである。6 is a flowchart for explaining a specific example of an operation related to motion vector search of the encoding device shown in FIG. 1. 本発明の第2実施形態に係る符号化装置の動作を説明するための図である。It is a figure for demonstrating operation | movement of the encoding apparatus which concerns on 2nd Embodiment of this invention. 本発明の第2実施形態に係る符号化装置による、複数の異なるサイズの動き補償ブロックと量子化パラメータに関する閾値とを対応付ける対応情報TBを説明するための図である。It is a figure for demonstrating the corresponding | compatible information TB which matches the several threshold value regarding a quantization parameter with the motion compensation block of a different size by the encoding apparatus which concerns on 2nd Embodiment of this invention. 第2実施形態に係る符号化装置の動作を説明するためのフローチャートである。It is a flowchart for demonstrating operation | movement of the encoding apparatus which concerns on 2nd Embodiment. 本発明に係る第3実施形態の符号化装置の動作を説明するための図である。It is a figure for demonstrating operation | movement of the encoding apparatus of 3rd Embodiment which concerns on this invention. 本発明の第3実施形態に係る符号化装置の差分絶対値和に関する閾値SADthを説明するための図である。It is a figure for demonstrating threshold value SADth regarding the difference absolute value sum of the encoding apparatus which concerns on 3rd Embodiment of this invention. 本発明の第3実施形態の係る符号化装置の動作を説明するための図である。It is a figure for demonstrating operation | movement of the encoding apparatus which concerns on 3rd Embodiment of this invention.

符号の説明Explanation of symbols

1…通信システム、2…符号化装置、3…復号装置、22…A/D変換回路、23…画面並べ替え回路、24…演算回路、25…直交変換回路、26…量子化回路、27…可逆符号化回路、28…バッファ、29…逆量子化回路、30…逆直交変換回路、34…フレームメモリ、32…レート制御回路、39…動き予測・補償回路、391…動きベクトル生成部、392…指標データ生成部、393…制御部。
DESCRIPTION OF SYMBOLS 1 ... Communication system, 2 ... Encoding apparatus, 3 ... Decoding apparatus, 22 ... A / D conversion circuit, 23 ... Screen rearrangement circuit, 24 ... Operation circuit, 25 ... Orthogonal transformation circuit, 26 ... Quantization circuit, 27 ... Lossless encoding circuit, 28 ... buffer, 29 ... inverse quantization circuit, 30 ... inverse orthogonal transform circuit, 34 ... frame memory, 32 ... rate control circuit, 39 ... motion prediction / compensation circuit, 391 ... motion vector generation unit, 392 ... index data generation unit, 393 ... control unit.

Claims (5)

複数の異なるサイズの動き補償ブロックを単位として、動き補償の対象となる画像データと前記動き補償で参照される参照画像データとの間の差分に基づいて動きベクトルを生成する動きベクトル生成手段と、
前記動き補償ブロックを単位として、前記動き補償の対象となる画像データと前記参照画像データとの間の差分絶対値和および前記動きベクトルの生成に伴って発生する発生情報量に基づいて指標データを生成する指標データ生成手段と、
前記複数の動き補償ブロックのサイズ順に、前記動きベクトル生成手段を制御して前記各動き補償ブロックの動きベクトルを生成させるとともに前記指標データ生成手段を制御して前記各動き補償ブロックの指標データを生成させ、
前記生成された指標データを探索して極小の指標データが検出されたとき、当該探索を中止して前記極小の指標データに対応するブロックサイズの動きベクトルを選択する
制御手段と、
前記制御手段が選択した動きベクトルを用いて前記動き補償の対象となる画像データの符号化を行う符号化手段と
を有する符号化装置。
A unit of motion compensation block of a plurality of different sizes, and the motion vector generating means for generating a motion vector based on the difference between the reference image data that is referenced in the previous SL motion compensation image data to be motion-compensated ,
A unit of the motion compensation block, the index data on the basis of the generated information quantity generated with the generation of the sum of absolute differences and the motion vector between the image data and the previous SL reference image data to be subjected to the motion compensation Index data generating means for generating
In order of the sizes of the plurality of motion compensation blocks, the motion vector generation unit is controlled to generate motion vectors of the motion compensation blocks, and the index data generation unit is controlled to generate index data of the motion compensation blocks. Let
When the generated index data is searched and minimal index data is detected, the control unit stops the search and selects a block size motion vector corresponding to the minimum index data ;
An encoding apparatus comprising: encoding means for encoding image data to be subjected to motion compensation using a motion vector selected by the control means .
前記制御手段は、
前記符号化手段が前記動き補償の対象となる画像データの符号化に用いる量子化パラメータが、予め前記ブロックサイズと対応させて設定されている閾値よりも大きいとき、当該閾値に対応しているブロックサイズを有する前記動き補償ブロックの指標データの探索を行わない
請求項1に記載の符号化装置。
The control means includes
A block corresponding to a threshold value when a quantization parameter used for encoding the image data to be subject to motion compensation is larger than a threshold value set in advance corresponding to the block size. Search for index data of the motion compensation block having the size is not performed.
The encoding device according to claim 1 .
前記動きベクトル生成手段は、
前記動き補償の対象となる画像データと前記動き補償で参照される参照画像データとの間の差分絶対値和を用いて前記動きベクトルを生成し、
前記制御手段は、
前記動きベクトル生成手段を制御して整数ピクセル精度の動きベクトルを生成させ、
前記整数ピクセル精度の動きベクトルを生成するときに用いた前記差分絶対値和が予め設定されている閾値よりも大きいとき前記探索を中止し、
前記整数ピクセル精度の動きベクトルを生成するときに用いた前記差分絶対値和が前記閾値以下のとき前記動きベクトル生成手段を制御して非整数ピクセル精度の動きベクトルを生成させる
請求項1に記載の符号化装置。
The motion vector generation means includes
Generating the motion vector using a sum of absolute differences between the image data to be subjected to motion compensation and the reference image data referenced in the motion compensation;
The control means includes
Controlling the motion vector generation means to generate an integer pixel precision motion vector;
The search is stopped when the difference absolute value sum used when generating the integer pixel precision motion vector is larger than a preset threshold,
When the sum of absolute differences used when generating the motion vector with integer pixel precision is equal to or less than the threshold, the motion vector generation means is controlled to generate a motion vector with non-integer pixel precision.
The encoding device according to claim 1 .
前記制御手段は、
前記符号化手段が前記動き補償の対象となる画像データの符号化に用いる量子化パラメータが、予め設定された閾値よりも大きいときには一方向の動き補償による前記画像データの符号化を前記符号化手段に行わせ、前記量子化パラメータが前記閾値よりも小さいときには双方向の動き補償による前記画像データの符号化を前記符号化手段に行わせる
請求項1に記載の符号化装置。
The control means includes
When the quantization parameter used by the encoding unit for encoding the image data to be subjected to motion compensation is larger than a preset threshold value, the encoding unit performs encoding of the image data by one-way motion compensation. When the quantization parameter is smaller than the threshold value, the encoding means performs encoding of the image data by bidirectional motion compensation.
The encoding device according to claim 1 .
前記制御手段は、
前記画像データの解像度が予め設定されている閾値よりも低いとき小さい前記ブロックサイズの補償ブロックを選択して前記動きベクトル生成手段に動きベクトルを生成させる
請求項1に記載の符号化装置。
The control means includes
When the resolution of the image data is lower than a preset threshold value, the compensation block having the smaller block size is selected and the motion vector generating means generates a motion vector
The encoding device according to claim 1 .
JP2003430106A 2003-12-25 2003-12-25 Encoder Expired - Fee Related JP4423968B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003430106A JP4423968B2 (en) 2003-12-25 2003-12-25 Encoder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003430106A JP4423968B2 (en) 2003-12-25 2003-12-25 Encoder

Publications (2)

Publication Number Publication Date
JP2005191876A JP2005191876A (en) 2005-07-14
JP4423968B2 true JP4423968B2 (en) 2010-03-03

Family

ID=34788576

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003430106A Expired - Fee Related JP4423968B2 (en) 2003-12-25 2003-12-25 Encoder

Country Status (1)

Country Link
JP (1) JP4423968B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5013040B2 (en) * 2005-09-29 2012-08-29 株式会社メガチップス Motion search method
JP5013041B2 (en) * 2005-09-29 2012-08-29 株式会社メガチップス Motion search method
JP5441812B2 (en) * 2010-05-12 2014-03-12 キヤノン株式会社 Video encoding apparatus and control method thereof

Also Published As

Publication number Publication date
JP2005191876A (en) 2005-07-14

Similar Documents

Publication Publication Date Title
JP6672226B2 (en) Video coding using large macro blocks
JP5944423B2 (en) Video coding using large macro blocks
JP3879741B2 (en) Image information encoding apparatus and image information encoding method
KR100950743B1 (en) Image information encoding apparatus and method, and image information decoding apparatus and method
JP2010135864A (en) Image encoding method, device, image decoding method, and device
JP2013520875A (en) Adaptive motion resolution for video coding
JP2004336369A (en) Moving picture coding apparatus, moving picture decoding apparatus, moving picture coding method, moving picture decoding method, moving picture coding program, and moving picture decoding program
JP2009089332A (en) Motion prediction method and motion prediction apparatus
JP4470431B2 (en) Data processing apparatus and method
JP2005348093A (en) Image processing apparatus, program thereof, and method thereof
JP4360093B2 (en) Image processing apparatus and encoding apparatus and methods thereof
JP4289126B2 (en) Data processing apparatus and method and encoding apparatus
KR20050074286A (en) Image encoding device, image encoding method and image encoding program
KR20070057212A (en) A recording medium on which a coding apparatus, an encoding method, a program of an encoding method, and a program of an encoding method are recorded
JP2009049969A (en) Moving picture coding apparatus and method and moving picture decoding apparatus and method
JP4423968B2 (en) Encoder
JP4349109B2 (en) Image data processing apparatus, method thereof, and encoding apparatus
JP2006025033A (en) Image processing apparatus and image processing method
JP4277793B2 (en) Image processing apparatus, encoding apparatus, and methods thereof
JP4281667B2 (en) Image encoding device
JP2005348207A (en) Encoding device and program
JP4924744B2 (en) Decoding device and method
JP4924743B2 (en) Decoding device and method
JP2005151152A (en) Data processing apparatus and method and encoding apparatus
JP2005136941A (en) Data processing apparatus and method and encoding apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20061212

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090825

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20091019

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20091130

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

Free format text: PAYMENT UNTIL: 20121218

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees