JP4095664B2 - Video encoding device - Google Patents

Video encoding device Download PDF

Info

Publication number
JP4095664B2
JP4095664B2 JP2007198211A JP2007198211A JP4095664B2 JP 4095664 B2 JP4095664 B2 JP 4095664B2 JP 2007198211 A JP2007198211 A JP 2007198211A JP 2007198211 A JP2007198211 A JP 2007198211A JP 4095664 B2 JP4095664 B2 JP 4095664B2
Authority
JP
Japan
Prior art keywords
macroblock
row
pixels
rows
pipeline
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
JP2007198211A
Other languages
Japanese (ja)
Other versions
JP2007312427A (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.)
Minami Toshihiro
Original Assignee
Minami Toshihiro
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 Minami Toshihiro filed Critical Minami Toshihiro
Priority to JP2007198211A priority Critical patent/JP4095664B2/en
Publication of JP2007312427A publication Critical patent/JP2007312427A/en
Application granted granted Critical
Publication of JP4095664B2 publication Critical patent/JP4095664B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Description

本発明は、動画像のデータ量を圧縮・削減するための動画像符号化装置に関するものである。 The present invention relates to a moving image encoding apparatus for compressing and reducing the amount of moving image data.

動画像には、720Pのようにフレームで構成されるものと、1080iのようにフィールドで構成されるものがあるが、本発明はフレームで構成されるものに適用してもフィールドで構成されるものに適用してもその目的を達成でき、同様の作用・効果を生じる。そこで、以下では、動画像を構成する1枚の画像を示すためにピクチャという用語を用いる。ピクチャはフレームとフィールドの両方を表すものとする。   Some moving images are composed of frames such as 720P and others are composed of fields such as 1080i, but the present invention is composed of fields even when applied to those composed of frames. Even if it is applied to things, the purpose can be achieved, and similar actions and effects are produced. Therefore, in the following, the term “picture” is used to indicate one image constituting a moving image. A picture shall represent both a frame and a field.

MPEG−2やH.264(MPEG−4 AVCとも呼ばれる)、VC−1等の動画像符号化方式では、画面を16画素×16画素や8画素×8画素等のマクロブロック(以下、MBという。)に分割し、MB単位で動き検出、動き補償、DCTまたは整数変換等の周波数変換、量子化、可変長符号化等を行う。これらの動画像符号化方式では、符号化効率を向上させるために、符号化済みの周辺MBの結果をフィードバックし、符号化中のMB(以下、現MBという。)の処理内容を決める適応処理が行われる。   MPEG-2 and H.264 In a moving image coding system such as H.264 (also referred to as MPEG-4 AVC) or VC-1, the screen is divided into macroblocks (hereinafter referred to as MB) of 16 pixels × 16 pixels or 8 pixels × 8 pixels. Motion detection, motion compensation, frequency conversion such as DCT or integer conversion, quantization, variable length coding, and the like are performed in MB units. In these moving image encoding systems, in order to improve the encoding efficiency, the result of the encoded peripheral MB is fed back, and adaptive processing for determining the processing content of the MB being encoded (hereinafter referred to as the current MB). Is done.

図24はMPEG−2の符号化器のブロック図を示す。MPEG−2では発生符号量が局所的に変動することを防ぐために、個々のMBの量子化パラメータを変更することによって発生符号量を制御する。これをレート制御92という。レート制御92では、可変長符号化91の結果発生した符号化済みMBの符号量に応じて現MBの量子化パラメータを変更する。例えば、左隣接MBの発生符号量が大きい場合、現MBの量子化パラメータを大きくし、現MBの発生符号量を減少させる。 FIG. 24 shows a block diagram of an MPEG-2 encoder. In MPEG-2, in order to prevent the generated code amount from fluctuating locally, the generated code amount is controlled by changing the quantization parameter of each MB. This is called rate control 92. In the rate control 92, the quantization parameter of the current MB is changed according to the code amount of the encoded MB generated as a result of the variable length encoding 91. For example, when the generated code amount of the left adjacent MB is large, the quantization parameter of the current MB is increased and the generated code amount of the current MB is decreased.

図25はH.264の符号化器のブロック図を示す。H.264はMPEG−2に比べて2倍程度の効率で動画像を圧縮できる。この高い圧縮効率を実現するために、H.264では、動き補償100における参照ピクチャ数の増加、可変ブロックサイズ動き補償や4画素×4画素単位の周波数変換(以下、整数変換93という。)が採用されると共に、レート制御103に加えて以下の3つの適応処理が新たに導入された。ここで、可変ブロックサイズ動き補償とは、MBを8画素×16画素、8画素×8画素、4画素×4画素等のサブブロック(以下、SBという。)に分割し、SBごとに動き補償を行うことをいう。以下では、単にブロックというときには、MBとSBの両方を意味するものとする。 FIG. 2 shows a block diagram of an H.264 encoder. H. H.264 can compress moving images with twice the efficiency of MPEG-2. In order to achieve this high compression efficiency, H.264 employs an increase in the number of reference pictures in motion compensation 100, variable block size motion compensation, and frequency conversion in units of 4 pixels × 4 pixels (hereinafter referred to as integer conversion 93), and in addition to rate control 103, The three adaptive processes are newly introduced. Here, variable block size motion compensation means that MB is divided into sub-blocks (hereinafter referred to as SB) such as 8 pixels × 16 pixels, 8 pixels × 8 pixels, 4 pixels × 4 pixels, etc., and motion compensation is performed for each SB. To do. Hereinafter, when simply referring to a block, both MB and SB are meant.

(1)予測誤差の符号量だけではなく、参照ピクチャの符号量と動きベクトルの符号量を考慮し、それらの合計符号量が最小となる参照ピクチャ、動きベクトル、およびブロックの組み合わせを選択する。動きベクトルについては、左隣接ブロック、上隣接ブロック、および右上隣接ブロックの動きベクトルから予測される予測動きベクトル(以下、PMVという。)を求め、PMVと現ブロックの動きベクトルの差分を符号化する。また、左隣接ブロック、上隣接ブロック、および右上隣接ブロックの動きベクトルは、空間ダイレクトモードの動きベクトルを求めるときにも参照される。 (1) Considering not only the code amount of a prediction error but also the code amount of a reference picture and the code amount of a motion vector, a combination of a reference picture, a motion vector, and a block that minimizes the total code amount thereof is selected. For the motion vector, a predicted motion vector (hereinafter referred to as PMV) predicted from the motion vectors of the left adjacent block, the upper adjacent block, and the upper right adjacent block is obtained, and the difference between the motion vector of the PMV and the current block is encoded. . In addition, the motion vectors of the left adjacent block, the upper adjacent block, and the upper right adjacent block are also referred to when obtaining the motion vector in the spatial direct mode.

(2)隣接MBの再生画素から予測値を作成し、イントラ予測97を行う。輝度信号については4画素×4画素SB(以下、4×4SBという。)のイントラ予測モードと16×16画素ブロックのイントラ予測モードがある。輝度信号の4×4SBのイントラ予測モードでは、左隣接4×4SB、上隣接4×4SB、および右上隣接4×4SBの再生画素から現4×4SBのイントラ予測値を作成し、このイントラ予測値と現4×4SBの画素の差分を符号化する。この差分画素を整数変換・量子化・逆量子化・逆整数変換し、その結果にイントラ予測値を加算することにより再生画素が作成される。16×16画素ブロックのイントラ予測モードでは左隣接MBと上隣接MBの再生画素から現16×16画素ブロックのイントラ予測値を作成し、このイントラ予測値と現16×16画素ブロックの画素の差分を符号化する。 (2) A prediction value is created from the reproduced pixels of the adjacent MB, and intra prediction 97 is performed. As for the luminance signal, there are an intra prediction mode of 4 pixels × 4 pixels SB (hereinafter referred to as 4 × 4 SB) and an intra prediction mode of 16 × 16 pixel blocks. In the 4 × 4SB intra prediction mode of the luminance signal, an intra prediction value of the current 4 × 4SB is generated from the reproduction pixels of the left adjacent 4 × 4SB, the upper adjacent 4 × 4SB, and the upper right adjacent 4 × 4SB, and this intra predicted value And the difference between the current 4 × 4 SB pixels. The difference pixel is subjected to integer transformation / quantization / inverse quantization / inverse integer transformation, and an intra prediction value is added to the result, thereby generating a reproduction pixel. In the 16 × 16 pixel block intra prediction mode, an intra prediction value of the current 16 × 16 pixel block is created from the reproduction pixels of the left adjacent MB and the upper adjacent MB, and the difference between the intra prediction value and the pixel of the current 16 × 16 pixel block is created. Is encoded.

(3)4画素×4画素ブロックの境界にデブロッキングフィルタ98をかけ、ブロックノイズを除去する。 (3) A deblocking filter 98 is applied to the boundary of the 4 pixel × 4 pixel block to remove block noise.

一方、ハードウェアの動画像符号化装置では、回路の稼働率を上げるためにMB単位のパイプライン(本特許請求の範囲および明細書では、マクロブロックパイプラインまたはMBパイプラインという。)が採用されるのが一般的である(例えば、非特許文献1のpp.126-128、図3参照)。また、ハードウェアの動画像符号化装置では、通常横方向のMBの並び(以下MB行という)内では左端MBから右端MBに向かって符号化される。そして、1つのMB行に含まれる右端のMBの符号化が終了すると、次にその下のMB行に属するMBが左端MBから右端MBに向かって符号化される。これがピクチャの最も上のMB行からピクチャの最も下のMB行まで繰り返される。図26は、従来のH.264の符号化器のMBパイプラインにおいて、MBがMBパイプラインの各ステージを流れていく様子を示したものである。n−1、n、およびn+1はあるMB行中の左からそれぞれn−1番目、n番目、n+1番目のMBを表す。また、MBサイクルとは、MBパイプラインの各ステージで1個のMBが処理されるために要する時間の単位をいい、各ステージでは1MBサイクルで1個のMBが処理される。 On the other hand, a hardware moving image encoding apparatus employs a pipeline in MB units (referred to as a macroblock pipeline or an MB pipeline in the claims and the specification) in order to increase the operation rate of a circuit. (For example, see Non-Patent Document 1, pp. 126-128, FIG. 3). Further, in a hardware moving image encoding apparatus, encoding is generally performed from the left end MB toward the right end MB in a horizontal MB array (hereinafter referred to as MB row). When the encoding of the rightmost MB included in one MB row is completed, the MBs belonging to the lower MB row are encoded from the left end MB toward the right end MB. This is repeated from the top MB row of the picture to the bottom MB row of the picture. FIG. In the MB pipeline of the H.264 encoder, the manner in which the MB flows through each stage of the MB pipeline is shown. n-1, n, and n + 1 represent the (n-1) th, nth, and n + 1th MBs from the left in a certain MB row, respectively. The MB cycle is a unit of time required for processing one MB in each stage of the MB pipeline. In each stage, one MB is processed in one MB cycle.

図26では、ステージ0で1MBサイクルかけて外部メモリから1個のMBの符号化に必要なデータを読み出す。ステージ1で1MBサイクルかけて1個のMBについて粗い精度の動き検出を行う。ステージ2で1MBサイクルかけてステージ1で検出された粗い精度の候補動きベクトルの周囲の狭い範囲で詳細な動き検出を行うと共に、イントラ予測を行う。ステージ3では1MBサイクルかけて1個のMBについて整数変換、量子化、逆量子化、および逆整数変換を行う。ステージ4では1MBサイクルかけて1個のMBについて可変長符号化と動き補償を行う。そして、ステージ5で1MBサイクルかけて1個のMBについてレート制御とデブロッキングフィルタを行い、ステージ6で1MBサイクルかけて1個のMB分の再生画素やビットストリームを外部メモリに書き込む。MBサイクルを1000サイクルと仮定すると、MBパイプラインを行わない場合には1個のMBの符号化処理に7000サイクルかかるのに対し、図26のMBパイプラインでは1000サイクルごとに1つのMBの符号化が終了する。 In FIG. 26 , data necessary for encoding one MB is read from the external memory over 1 MB cycle in stage 0. Stage 1 performs coarse motion detection for one MB over 1 MB cycle. Detailed motion detection is performed in a narrow range around the coarse motion candidate motion vector detected in stage 1 over 1 MB cycle in stage 2 and intra prediction is performed. In stage 3, integer conversion, quantization, inverse quantization, and inverse integer conversion are performed on one MB over 1 MB cycle. In stage 4, variable length coding and motion compensation are performed for one MB over one MB cycle. Then, stage 1 performs rate control and deblocking filtering on one MB over 1 MB cycle, and stage 6 writes a reproduction pixel or bit stream for one MB over 1 MB cycle to the external memory. Assuming that the MB cycle is 1000 cycles, the encoding process for one MB takes 7000 cycles when the MB pipeline is not performed, whereas in the MB pipeline of FIG. 26 , one MB code is generated every 1000 cycles. The conversion ends.

しかし、このMBパイプラインで左隣接MBの処理結果に応じた適応処理を行うためには、以下の4点の課題がある。   However, in order to perform adaptive processing according to the processing result of the left adjacent MB in this MB pipeline, there are the following four problems.

(1)図26に示すように、n−1番目のMBについてレート制御が終了したとき、既にn+1番目のMBまで量子化が終了している。従って、n−1番目のMBの発生符号量に応じて量子化パラメータを変更できるのは、n+2番目以降のMBである。すなわち、2MB分レート制御が遅れる。 (1) As shown in FIG. 26 , when the rate control is finished for the (n-1) th MB, the quantization is already finished up to the (n + 1) th MB. Therefore, the quantization parameter can be changed according to the generated code amount of the (n−1) th MB for the (n + 2) th and subsequent MBs. That is, 2 MB rate control is delayed.

(2)図26では動き検出をMBパイプライン2段で実行し、ステージ2で高精度の動きベクトル検出と同時にイントラ予測を実行している。高精度の動きベクトルが決定し、かつイントラ予測かインター予測かが決まらなければ正確なPMVは算出できないが、n−1番目のMBについて高精度の動きベクトルとイントラ予測かインター予測かが決まったときにはn番目のMBについてステージ1における粗い精度の動きベクトル検出は終了している。このため、図26のMBパイプラインでは、左隣接MBについては荒い精度の動きベクトル検出結果しか考慮して動きベクトルを選択することはできず、左隣接MBにおける高精度の動きベクトルおよびイントラ予測/インター予測判定結果を考慮して動きベクトルを選択することができない。加えて、H.264ではMBを分割した8画素×16画素、8画素×8画素、4画素×4画素等のSBでも動きベクトルの符号量を考慮して動きベクトル検出を行うことが望ましいが、図26のMBパイプラインでは左隣接SB、上隣接SB、および右上隣接SBの動きベクトルの符号量を考慮して動きベクトル検出を行うことは困難である。 (2) In FIG. 26 , motion detection is executed in two stages of the MB pipeline, and intra prediction is executed simultaneously with high-precision motion vector detection in stage 2. An accurate PMV cannot be calculated unless a high-precision motion vector is determined and intra prediction or inter prediction is determined, but a high-precision motion vector and intra prediction or inter prediction are determined for the (n-1) th MB. Sometimes the motion vector detection with coarse accuracy in the stage 1 is finished for the nth MB. For this reason, in the MB pipeline of FIG. 26 , it is possible to select a motion vector in consideration of only a rough motion vector detection result for the left adjacent MB, and a high-precision motion vector and intra prediction / A motion vector cannot be selected in consideration of the inter prediction determination result. In addition, H.C. 8 pixels × 16 pixels obtained by dividing the MB at 264, 8 pixels × 8 pixels, 4 it is desirable to perform the motion vector detection in consideration of the amount of codes of the motion vectors even SB pixels × 4 pixels or the like, MB in FIG. 26 In a pipeline, it is difficult to perform motion vector detection in consideration of the code amounts of the motion vectors of the left adjacent SB, the upper adjacent SB, and the upper right adjacent SB.

(3)16画素×16画素ブロックイントラ予測モードは、左隣接16画素×16画素ブロックと上隣接16画素×16画素ブロックの画素値と現ブロックの画素値を評価して決定される。ここで、評価に使用する隣接16画素×16画素ブロックの画素は再生画素であることが望ましい。再生画素は、イントラ予測やインター予測で得られた予測誤差を整数変換、量子化、逆量子化および逆整数変換し、予測値を加算することにより求められる。しかし、図26のMBパイプラインではステージ3でn−1番目のMBの整数変換等が終わり、ステージ4の動き補償でn−1番目のMBの再生画素が作成されたときには、ステージ2におけるn番目のMBのイントラ予測は終了している。このため、n番目のMBについて16画素×16画素ブロックイントラ予測の予測モード判定を行うときには、その左に隣接したn−1番目のMBの再生画素を使用することはできない。このため、左に隣接したn−1番目の16画素×16画素ブロックの予測モード判定については再生画素ではなく、符号化中の現ピクチャの画素を使用せざるを得ない。同様に、H.264における4画素×4画素ブロックイントラ予測モードでは左隣接、上隣接、右上隣接の4画素×4画素ブロックの再生画素を使用して予測モードを決定することが望ましいが、図26のMBパイプラインでは不可能であり、次善の手段として符号化中の現ピクチャの画素を使用せざるを得ない。このため、図26のMBパイプラインにより決定されるイントラ予測モードは準最適なものとなる。 (3) The 16 pixel × 16 pixel block intra prediction mode is determined by evaluating the pixel value of the left adjacent 16 pixel × 16 pixel block and the upper adjacent 16 pixel × 16 pixel block and the pixel value of the current block. Here, it is desirable that the pixels of the adjacent 16 pixel × 16 pixel block used for evaluation are reproduction pixels. The reproduced pixel is obtained by performing integer conversion, quantization, inverse quantization, and inverse integer conversion on a prediction error obtained by intra prediction or inter prediction, and adding a prediction value. However, in the MB pipeline of FIG. 26 , when the integer conversion of the (n−1) th MB is completed in stage 3 and the reproduction pixel of the (n−1) th MB is created by the motion compensation in stage 4, the n in the stage 2 The intra prediction of the second MB has been completed. For this reason, when the prediction mode determination of 16 pixel × 16 pixel block intra prediction is performed for the nth MB, the reproduction pixel of the (n−1) th MB adjacent to the left cannot be used. For this reason, in the prediction mode determination of the (n−1) th 16-pixel × 16-pixel block adjacent to the left, the pixel of the current picture being encoded must be used instead of the reproduction pixel. Similarly, H.M. In the 4 pixel × 4 pixel block intra prediction mode in H.264, it is desirable to determine the prediction mode using the reproduction pixels of the 4 pixels × 4 pixel block adjacent to the left side, the upper side, and the upper right side, but the MB pipeline of FIG. In this case, it is impossible to use the pixels of the current picture being encoded as a suboptimal measure. For this reason, the intra prediction mode determined by the MB pipeline of FIG. 26 is suboptimal.

(4)イントラ予測値は、符号化装置と復号装置で同一のものを使用しなければならないため、再生画素から作成せざるを得ない。一方、PピクチャとBピクチャでは、左に隣接したn−1番目のMBがインター予測モードと判定された場合には、動き補償が終わるまで再生画素が得られない。しかし、図26のMBパイプラインでは、n−1番目のMBについてのステージ4における再生画素の生成と、n番目のMBについてのステージ3における整数変換等は同時に実行される。このため、PピクチャとBピクチャでは、n−1番目のMBの再生画素を用いて予測値を作成し、n番目のMBの整数変換等を行うことは困難である。 (4) Since the same intra prediction value must be used in the encoding device and the decoding device, it must be generated from the reproduced pixels. On the other hand, in the P picture and the B picture, when the n−1th MB adjacent to the left is determined to be in the inter prediction mode, a reproduced pixel cannot be obtained until the motion compensation is completed. However, in the MB pipeline of FIG. 26 , the reproduction pixel generation in stage 4 for the (n-1) th MB and the integer conversion in stage 3 for the nth MB are executed simultaneously. For this reason, in the P picture and the B picture, it is difficult to create a prediction value using the reproduction pixel of the (n-1) th MB and perform integer conversion of the nth MB.

また、ピクチャのデータ量は膨大であるため、一般にピクチャは動画像符号化装置の外部のメモリに記憶される。図27は、従来の動画像符号化装置の構成を示すブロック図である(例えば、非特許文献2のp2009、図3参照)。動きベクトル検出器106は、内部メモリ104と動き検出回路105で構成される。従来の動きベクトル検出器106では動きベクトルが存在する可能性がある領域(以下、参照領域という。)を動きベクトル検出器106の外部メモリ4から動きベクトル検出器106の内部メモリ104にコピーし、内部メモリ104内の画素に対して動きベクトルを検出するための演算が行われる。図28は、隣接する2つのMB107、108の参照領域109、110の例を示す。MB108の参照領域110はMB107の参照領域109と大部分重なっており、重なっていない領域の幅はMBの横方向の画素数と一致する。参照領域110は参照領域109より右方向にMBの横方向の画素数分ずれているだけである。以下では、このずれている領域を更新領域111と呼ぶ。従来の動きベクトル検出器106はこの性質を利用して外部メモリ4と動きベクトル検出器106の内部メモリ104間の画素転送量を削減する。外部メモリ4から内部メモリ104へは更新領域111のみ転送し、MB108の動き検出を開始するとき、参照領域の原点を参照領域109の(0,0)から参照領域110の(0,0)’に付け替える。このように、更新領域111のみ読み込んで参照領域を更新することにより外部メモリ4から内部メモリ104への転送量を削減していた。すなわち、従来は参照領域の横方向の重なりを利用して外部メモリ4と内部メモリ104の間の画素転送量を削減していた。これにより、従来の1チップMPEG−2コーデックLSIは、200MHzで動作する32ビット幅のDDR−SDRAMを2個外付けすることで1080iの動画像を符号化することが可能となった(例えば、非特許文献3のpp.12-13参照)。 Also, since the amount of picture data is enormous, the picture is generally stored in a memory external to the moving picture coding apparatus. FIG. 27 is a block diagram showing a configuration of a conventional video encoding device (see, for example, p2009 of Non-Patent Document 2 and FIG. 3). The motion vector detector 106 includes an internal memory 104 and a motion detection circuit 105. In the conventional motion vector detector 106, a region where a motion vector may exist (hereinafter referred to as a reference region) is copied from the external memory 4 of the motion vector detector 106 to the internal memory 104 of the motion vector detector 106, An operation for detecting a motion vector is performed on the pixels in the internal memory 104. FIG. 28 shows an example of reference areas 109 and 110 of two adjacent MBs 107 and 108. The reference area 110 of the MB 108 substantially overlaps the reference area 109 of the MB 107, and the width of the non-overlapping area matches the number of pixels in the horizontal direction of the MB. The reference area 110 is only shifted from the reference area 109 to the right by the number of pixels in the horizontal direction of MB. Hereinafter, this shifted area is referred to as an update area 111. The conventional motion vector detector 106 uses this property to reduce the pixel transfer amount between the external memory 4 and the internal memory 104 of the motion vector detector 106. When only the update area 111 is transferred from the external memory 4 to the internal memory 104 and motion detection of the MB 108 is started, the origin of the reference area is changed from (0, 0) of the reference area 109 to (0, 0) ′ of the reference area 110. Replace with. As described above, the transfer amount from the external memory 4 to the internal memory 104 is reduced by reading only the update area 111 and updating the reference area. That is, conventionally, the amount of pixel transfer between the external memory 4 and the internal memory 104 has been reduced by utilizing the horizontal overlap of the reference areas. As a result, the conventional one-chip MPEG-2 codec LSI can encode a 1080i moving image by attaching two 32-bit DDR-SDRAMs operating at 200 MHz (for example, (See Non-Patent Document 3, pp.12-13).

しかし、DCI(Digital Cinema Initiative)の定めたデジタルシネマ規格による1ピクチャの大きさは4096画素×2160画素であり、1080i(1920画素×1080画素)の4倍の画素数を有する。また、1080iの3倍を超える画素数のピクチャを1080iの2倍のレート(60枚/秒)で出力するCMOSセンサが開発されている(例えば、非特許文献4のsesion 27.1参照)。最新の技術を用いれば、デジタルシネマクラスの動画像を出力するビデオカメラも実現できると予測されるところ、従来の技術を用いたのでは動画像符号化LSIに256ビット幅の入力端子を設けるか、または外部メモリを800MHz程度の速度で動作させることが必要となるという問題がある。
渡辺浩巳,茶木英明,”H.264とMPEG-4に両対応 携帯機器向けコーデック・コアを開発 VGAの動画を36mAで符号化”,日経エレクトロニクス,2004年9月27日号,no.883,pp123-133. 南俊宏,長沼次郎,“テレスコピック探索に適した動きベクトル検出器構成法の提案”,信学論(D−2),vol.J87-D-2,no.11,pp.2007-2024,Nov.2004. 長沼次郎,岩崎裕江,新田高庸,中村健,吉留健,小倉充雄,中島靖之,田代豊,大西隆之,池田充郎,遠藤真,八島由幸,“1チップHDTV MPEG-2 CODEC LSI構成技術――VASA”,NTT技術ジャーナル,vol.15,No.9,pp.12-15,2003年9月. S. Yoshihara, M.Kikuchi, Y. Ito, Y. Inada, S. Kuramochi, H.Wakabayashi, M. Okano, K. Koseki, H. Kuriyama, J. Inutsuka, A. Tajima,T. Nakajima, Y.Kudoh, F. Koga, Y. Kasagi,S. Watanabe, T. Nomoto, “A 1/1.8-inch 6.4MPixel 60frames/s CMOS Image Sensorwith Seamless Mode Change”, ISSCC2006, session 27.1, Feb. 2006.
However, the size of one picture according to the digital cinema standard defined by DCI (Digital Cinema Initiative) is 4096 pixels × 2160 pixels, which is four times as many as 1080i (1920 pixels × 1080 pixels). In addition, a CMOS sensor has been developed that outputs a picture having a number of pixels exceeding three times that of 1080i at a rate twice that of 1080i (60 pictures / second) (for example, see section 27.1 of Non-Patent Document 4). If the latest technology is used, it is predicted that a video camera that outputs a moving image of a digital cinema class can be realized. If the conventional technology is used, is a moving image encoding LSI provided with a 256-bit width input terminal? There is a problem that it is necessary to operate the external memory at a speed of about 800 MHz .
Hiroaki Watanabe, Hideaki Chaki, "Developed codec core for both H.264 and MPEG-4, encoded VGA video with 36mA", Nikkei Electronics, September 27, 2004, no.883, pp123-133. Toshihiro Minami and Jiro Naganuma, “Proposal of Motion Vector Detector Configuration Suitable for Telescopic Search”, Theory of Science (D-2), vol.J87-D-2, no.11, pp.2007-2024, Nov .2004. Jiro Naganuma, Hiroe Iwasaki, Takahiro Nitta, Ken Nakamura, Ken Yoshidome, Mitsuo Ogura, Yasuyuki Nakajima, Yutaka Tashiro, Takayuki Onishi, Mitsuro Ikeda, Makoto Endo, Yoshiyuki Yashima, “One-chip HDTV MPEG-2 CODEC LSI Configuration Technology— VASA ", NTT Technical Journal, vol.15, No.9, pp.12-15, September 2003. S. Yoshihara, M. Kikuchi, Y. Ito, Y. Inada, S. Kuramochi, H. Wakabayashi, M. Okano, K. Koseki, H. Kuriyama, J. Inutsuka, A. Tajima, T. Nakajima, Y. Kudoh, F. Koga, Y. Kasagi, S. Watanabe, T. Nomoto, “A 1 / 1.8-inch 6.4MPixel 60frames / s CMOS Image Sensor with Seamless Mode Change”, ISSCC2006, session 27.1, Feb. 2006.

MBパイプラインで左隣接MBの処理結果に応じた適応処理を行う。Adaptive processing is performed according to the processing result of the left adjacent MB in the MB pipeline.

また、外部メモリと参照領域用メモリの間の画素転送量を大幅に削減する。In addition, the amount of pixel transfer between the external memory and the reference area memory is greatly reduced.

本発明の動画像符号化装置は、ピクチャの左端から右端まで横方向に連続して並んだマクロブロックの集まりであるマクロブロック行の中では、左端のマクロブロックから符号化を開始し、右に隣接したマクロブロックを順番に符号化する動画像符号化であって、
動画像符号化の処理が少なくとも2つの処理に分割され、当該分割された処理を行うステージが少なくとも2ステージ含まれ、当該ステージの中に動き検出を行うステージが含まれるマクロブロックパイプラインを含み、
縦方向に連続する少なくとも2行であって、ピクチャ全体に含まれる前記マクロブロック行の総行数よりも少ない行数の前記マクロブロック行をひとまとまりとして選択し、
前記ひとまとまりのマクロブロック行の中の最も上のマクロブロック行に含まれるマクロブロックを前記マクロブロックパイプラインに投入し、
前記ひとまとまりのマクロブロック行の中の上から2行目のマクロブロック行に含まれるマクロブロックから最も下のマクロブロック行に含まれるマクロブロックまで順番に、各マクロブロック行の上に隣接したマクロブロック行に含まれる直前投入マクロブロックが前記マクロブロックパイプラインに投入された後に、当該各マクロブロック行に含まれ、当該直前投入マクロブロックより左に位置し、かつ当該直前投入マクロブロックが右上隣接マクロブロックではないマクロブロックを、前記マクロブロックパイプラインに投入する
動画像符号化部と、
前記ひとまとまりのマクロブロック行の中の最も上のマクロブロック行から最も下のマクロブロック行までの各マクロブロック行に含まれ、連続して前記マクロブロックパイプラインに投入される、前記ひとまとまりのマクロブロック行の行数と同じ数の動き検出の対象である各マクロブロックについて動きベクトルを検出するとき参照される参照領域であって、1ピクチャの総画素数より少ない画素数の当該参照領域に含まれる全画素を記憶し、
前記参照領域の右側に位置し、横方向の画素数がマクロブロックの横方向の画素数に応じた画素数である更新領域が外部のメモリから転送され、前記動き検出の対象である各マクロブロックについて動き検出を終了し、前記動き検出の対象である各マクロブロックの右隣接マクロブロックについて新たに動き検出を行うとき前記参照領域が更新される
参照領域用メモリと
を有する。
The moving image encoding apparatus of the present invention starts encoding from the leftmost macroblock in the macroblock row that is a collection of macroblocks arranged in the horizontal direction from the left end to the right end of the picture, A video encoding unit that sequentially encodes adjacent macroblocks;
The video encoding process is divided into at least two processes, including at least two stages for performing the divided processes, including a macroblock pipeline including a stage for motion detection in the stages,
Selecting the macroblock rows as a group with at least two rows that are continuous in the vertical direction and having a number of rows smaller than the total number of the macroblock rows included in the entire picture;
Injecting the macroblock included in the top macroblock row in the group of macroblock rows into the macroblock pipeline;
Macros adjacent on each macroblock row in order from the macroblock included in the second macroblock row from the top to the macroblock included in the bottommost macroblock row in the group of macroblock rows. After the previous input macroblock included in the block row is input to the macroblock pipeline, it is included in each macroblock row and is located to the left of the previous input macroblock, and the previous input macroblock is adjacent to the upper right. A video encoding unit that inputs macroblocks that are not macroblocks into the macroblock pipeline;
The batch of macroblocks that are included in each macroblock row from the top macroblock row to the bottom macroblock row in the batch of macroblock rows and that are successively entered into the macroblock pipeline. A reference area that is referred to when detecting a motion vector for each macroblock that is subject to motion detection for the same number of lines as the number of macroblock lines, and the reference area has a smaller number of pixels than the total number of pixels in one picture. Memorize all included pixels,
Each macroblock which is located on the right side of the reference area and has an update area whose number of pixels in the horizontal direction is the number of pixels corresponding to the number of pixels in the horizontal direction of the macroblock is transferred from an external memory and is the target of motion detection for Exit motion detection, and a memory reference region in which the reference area is updated when performing a new motion detection for the right neighboring macroblocks of the macroblock in the motion detection target.

また、本発明の動画像符号化装置は、動画像符号化の処理が少なくとも2つの処理に分割され、当該分割された処理を行うステージが少なくとも2ステージ含まれ、当該ステージの中に動き検出を行うステージが含まれるマクロブロックパイプラインと、
ピクチャの左端から右端まで横方向に連続して並んだマクロブロックの集まりであるマクロブロック行を、縦方向に連続する少なくとも2行であって、ピクチャ全体に含まれる前記マクロブロック行の総行数よりも少ない行数をひとまとまりとして選択し、当該ひとまとまりのマクロブロック行の中の最も上のマクロブロック行に含まれるマクロブロックについては、左下隣接マクロブロックがまだ選択されていないマクロブロックを選択し、かつ、当該ひとまとまりのマクロブロック行の中の最も上以外のマクロブロック行に含まれるマクロブロックについては、右上隣接マクロブロックが既に選択されているマクロブロックを選択することによって、当該ひとまとまりのマクロブロック行に含まれるマクロブロックを1マクロブロック行当たり1個選択するマクロブロック選択部と、
前記マクロブロック選択部によって選択された個々のマクロブロックについて、前記ひとまとまりのマクロブロック行の中の最も上のマクロブロック行に含まれるマクロブロックから、最も下のマクロブロック行に含まれるマクロブロックまで順番に、個々のマクロブロックを符号化するために必要なデータを前記マクロブロックパイプラインに設定し、当該マクロブロックを前記マクロブロックパイプラインに投入する符号化データ設定部と
を含み、
前記符号化データ設定部によって前記ひとまとまりのマクロブロック行の中の最も下のマクロブロック行に含まれるマクロブロックを符号化するために必要な前記データが前記マクロブロックパイプラインに設定されると、前記マクロブロック選択部が前記選択されている個々のマクロブロックごとにその右隣接マクロブロックを新たに選択する
動画像符号化部と、
前記ひとまとまりのマクロブロック行の中の最も上のマクロブロック行から最も下のマクロブロック行までの各マクロブロック行に含まれ、連続して前記マクロブロックパイプラインに投入される、前記ひとまとまりのマクロブロック行の行数と同じ数の動き検出の対象である各マクロブロックについて動きベクトルを検出するとき参照される参照領域であって、1ピクチャの総画素数より少ない画素数の当該参照領域に含まれる全画素を記憶し、
前記参照領域の右側に位置し、横方向の画素数がマクロブロックの横方向の画素数に応じた画素数である更新領域が外部のメモリから転送され、前記動き検出の対象である各マクロブロックについて動き検出を終了し、前記動き検出の対象である各マクロブロックの右隣接マクロブロックについて新たに動き検出を行うとき前記参照領域が更新される
参照領域用メモリと
を有する。
In the moving image encoding apparatus of the present invention, the moving image encoding process is divided into at least two processes, and at least two stages for performing the divided processes are included, and motion detection is performed in the stages. A macroblock pipeline containing the stage to perform,
The total number of macroblock rows included in the entire picture, which is a macroblock row that is a group of macroblocks arranged in a row in the horizontal direction from the left end to the right end of the picture, and is at least two rows continuous in the vertical direction. Select a smaller number of lines as a group, and for the macroblocks included in the uppermost macroblock line in the group of macroblock lines, select the macroblock for which the lower left adjacent macroblock has not yet been selected For a macroblock included in a macroblock row other than the topmost macroblock row in the group, select the macroblock in which the upper right adjacent macroblock has already been selected to select the macroblock. A macroblock included in one macroblock line is one macroblock line Macroblock selecting unit or selecting one,
For each macroblock selected by the macroblock selector, from the macroblock included in the top macroblock row to the macroblock included in the bottom macroblock row in the group of macroblock rows And sequentially setting data necessary for encoding each macroblock in the macroblock pipeline, and including an encoded data setting unit that inputs the macroblock into the macroblock pipeline,
When the encoded data setting unit sets the data necessary for encoding the macroblock included in the lowest macroblock row in the group of macroblock rows, in the macroblock pipeline, A moving picture encoding unit for the macroblock selection unit to newly select the right adjacent macroblock for each selected macroblock;
The batch of macroblocks that are included in each macroblock row from the top macroblock row to the bottom macroblock row in the batch of macroblock rows and that are successively entered into the macroblock pipeline. A reference area that is referred to when detecting a motion vector for each macroblock that is subject to motion detection for the same number of lines as the number of macroblock lines, and the reference area has a smaller number of pixels than the total number of pixels in one picture. Memorize all included pixels,
Each macroblock which is located on the right side of the reference area and has an update area whose number of pixels in the horizontal direction is the number of pixels corresponding to the number of pixels in the horizontal direction of the macroblock is transferred from an external memory and is the target of motion detection for Exit motion detection, and a memory reference region in which the reference area is updated when performing a new motion detection for the right neighboring macroblocks of the macroblock in the motion detection target.

また、本発明の動画像符号化装置は、動画像符号化の処理が少なくとも2つの処理に分割され、当該分割された処理を行うステージが少なくとも2ステージ含まれ、当該ステージの中に動き検出を行うステージが含まれるマクロブロックパイプラインと、
ピクチャの左端から右端まで横方向に連続して並んだマクロブロックの集まりであるマクロブロック行を、縦方向に連続する少なくとも2行であって、ピクチャ全体に含まれる当該マクロブロック行の総行数よりも少ない行数をひとまとまりとして選択し、当該ひとまとまりのマクロブロック行の中の最も上のマクロブロック行に含まれるマクロブロックについては、左下隣接マクロブロックがまだ選択されていないマクロブロックを選択し、かつ、当該ひとまとまりのマクロブロック行の中の最も上以外のマクロブロック行に含まれるマクロブロックについては、右上隣接マクロブロックが既に選択されているマクロブロックを選択することによって、当該ひとまとまりのマクロブロック行に含まれるマクロブロックを1マクロブロック行当たり1個選択する第1の手段と、
前記第1の手段によって選択された個々のマクロブロックを、前記ひとまとまりのマクロブロック行の中の最も上のマクロブロック行に含まれるマクロブロックから、最も下のマクロブロック行に含まれるマクロブロックまで順番に、前記マクロブロックパイプラインに投入する第2の手段と
を含み、
前記第2の手段によって前記ひとまとまりのマクロブロック行の中の最も下のマクロブロック行に含まれるマクロブロックが前記マクロブロックパイプラインに投入されると、前記第1の手段が前記選択されている個々のマクロブロックごとにその右隣接マクロブロックを新たに選択する
動画像符号化部と、
前記ひとまとまりのマクロブロック行の中の最も上のマクロブロック行から最も下のマクロブロック行までの各マクロブロック行に含まれ、連続して前記マクロブロックパイプラインに投入される、前記ひとまとまりのマクロブロック行の行数と同じ数の動き検出の対象である各マクロブロックについて動きベクトルを検出するとき参照される参照領域であって、1ピクチャの総画素数より少ない画素数の当該参照領域に含まれる全画素を記憶し、
前記参照領域の右側に位置し、横方向の画素数がマクロブロックの横方向の画素数に応じた画素数である更新領域が外部のメモリから転送され、前記動き検出の対象である各マクロブロックについて動き検出を終了し、前記動き検出の対象である各マクロブロックの右隣接マクロブロックについて新たに動き検出を行うとき前記参照領域が更新される
参照領域用メモリと
を有する。
In the moving image encoding apparatus of the present invention, the moving image encoding process is divided into at least two processes, and at least two stages for performing the divided processes are included, and motion detection is performed in the stages. A macroblock pipeline containing the stage to perform,
The total number of macroblock rows included in the entire picture, which are at least two macroblock rows that are a collection of macroblocks arranged in a row in the horizontal direction from the left end to the right end of the picture, and that are continuous in the vertical direction. Select a smaller number of lines as a group, and for the macroblocks included in the uppermost macroblock line in the group of macroblock lines, select the macroblock for which the lower left adjacent macroblock has not yet been selected For a macroblock included in a macroblock row other than the topmost macroblock row in the group, select the macroblock in which the upper right adjacent macroblock has already been selected to select the macroblock. A macroblock included in one macroblock line is one macroblock line First means for one selected or,
The individual macroblocks selected by the first means are changed from the macroblock included in the uppermost macroblock row to the macroblock included in the lowermost macroblock row in the group of macroblock rows. A second means for injecting into the macroblock pipeline in turn,
When the macroblock included in the lowest macroblock row in the group of macroblock rows is input to the macroblock pipeline by the second means, the first means is selected. A video encoding unit that newly selects the right adjacent macroblock for each macroblock;
The batch of macroblocks that are included in each macroblock row from the top macroblock row to the bottom macroblock row in the batch of macroblock rows and that are successively entered into the macroblock pipeline. A reference area that is referred to when detecting a motion vector for each macroblock that is subject to motion detection for the same number of lines as the number of macroblock lines, and the reference area has a smaller number of pixels than the total number of pixels in one picture. Memorize all included pixels,
Each macroblock which is located on the right side of the reference area and has an update area whose number of pixels in the horizontal direction is the number of pixels corresponding to the number of pixels in the horizontal direction of the macroblock is transferred from an external memory and is the target of motion detection for Exit motion detection, and a memory reference region in which the reference area is updated when performing a new motion detection for the right neighboring macroblocks of the macroblock in the motion detection target.

好ましくは、本発明の動画像符号化装置は、ピクチャの最も上の前記ひとまとまりのマクロブロック行から符号化を開始し、下に隣接した前記ひとまとまりのマクロブロック行を順番に符号化する。 Preferably, the moving picture coding apparatus according to the present invention starts coding from the uppermost group of macroblock rows of a picture, and sequentially encodes the lowermost group of macroblock rows adjacent to each other.

以上のように、本発明によれば、MBパイプラインで左隣接MBの処理結果に応じた適応処理を行うことができる。 As described above, according to the present invention, adaptive processing according to the processing result of the left adjacent MB can be performed in the MB pipeline .

また、外部メモリと参照領域用メモリの間の画素転送量を大幅に削減することができる。In addition, the amount of pixel transfer between the external memory and the reference area memory can be greatly reduced.

本発明では、縦に連続する複数のMB行をひとまとまりとして、これらひとまとまりのMB行から、1つのMB行当たり1個のMBを選択し、これら選択された複数のMBを1個のMBパイプラインに連続して投入する。   In the present invention, a plurality of MB rows that are vertically continuous are grouped, one MB is selected per MB row from the group of MB rows, and the selected plurality of MBs are one MB. Put continuously into the pipeline.

以下、本発明の実施の形態に係る動画像符号化装置を図面に基づいて説明する。 Hereinafter, a moving picture coding apparatus according to an embodiment of the present invention will be described with reference to the drawings.

(第1の実施形態)
図1はMBパイプラインに連続して投入されるMBの例を示した説明図である。図1のピクチャはa行からl行までの12のMB行からなり、各MB行は0番目から15番目までの16個のMBで構成される。図1のピクチャでは、最初にa−MB行、b−MB行、c−MB行、d−MB行に含まれるMBが1個のMBパイプラインで符号化され、次にe−MB行、f−MB行、g−MB行、h−MB行に含まれるMBが1個のMBパイプラインで符号化され、最後にi−MB行、j−MB行、k−MB行、l−MB行に含まれるMBが1個のMBパイプラインで符号化される。図1中のe行10列、f行8列、g行6列、h行4列のMBは1個のMBパイプラインに連続して投入されるMBの一例である。f行8列のMBはe行10列のMBから左方向に1MB離れている。同様にg行6列のMBはf行8列のMBから左方向に1MB離れており、h行4列のMBはg行6列のMBから左方向に1MB離れている。これらの4つのMBは相互に左隣接、上隣接、または右上隣接のいずれの隣接関係にもない。以下では、複数のブロックが相互に左隣接、上隣接、または右上隣接のいずれの隣接関係にもないことを、これらのブロックは隣接関係にないという。
(First embodiment)
FIG. 1 is an explanatory diagram showing an example of MBs continuously input into the MB pipeline. The picture in FIG. 1 is composed of 12 MB rows from a row to l row, and each MB row is composed of 16 MBs from 0th to 15th. In the picture of FIG. 1, first, MBs included in the a-MB row, b-MB row, c-MB row, and d-MB row are encoded by one MB pipeline, and then the e-MB row, MBs included in the f-MB line, the g-MB line, and the h-MB line are encoded by one MB pipeline, and finally the i-MB line, the j-MB line, the k-MB line, and the l-MB. MB included in a row is encoded by one MB pipeline. The MB of e row 10 column, f row 8 column, g row 6 column, and h row 4 column in FIG. 1 is an example of an MB that is continuously input to one MB pipeline. The MB of f row and 8 columns is 1 MB away from the MB of e row and 10 columns in the left direction. Similarly, the MB of g row 6 column is 1 MB away from the MB of f row 8 column leftward, and the MB of h row 4 column is 1 MB away from the MB of g row 6 column leftward. These four MBs are not adjacent to each other in any of the left neighbor, top neighbor, or top right neighbor. In the following, it is said that these blocks are not adjacent to each other when the plurality of blocks are not adjacent to each other in the left adjacent, the upper adjacent, or the upper right adjacent.

図2は本発明が適用される動画像符号化装置のブロック図を示す。MB選択回路2は、図1に示すように、e−MB行、f−MB行、g−MB行、h−MB行をひとまとまりとし、e−MB行に属するMBについては、左下隣接MBがまだ選択されていないMBを選択し、かつ、f−MB行、g−MB行、およびh−MB行に属するMBについては、右上隣接MBが既に選択されているMBを選択することによって、e行10列、f行8列、g行6列、h行4列のMBを選択する。符号化データ設定回路3は、e行10列、f行8列、g行6列、h行4列のMBの順番で、各MBを符号化するために必要なデータをMBパイプライン1に設定する。MBを符号化するために必要なデータがMBパイプライン1に設定されると、そのMBはMBパイプライン1に投入される。h行4列のMBを符号化するために必要なデータがMBパイプライン1に設定され、h行4列のMBがMBパイプライン1に投入されると、MB選択回路2は、e行11列、f行9列、g行7列、h行5列のMBを新たに選択する。   FIG. 2 shows a block diagram of a moving picture coding apparatus to which the present invention is applied. As shown in FIG. 1, the MB selection circuit 2 collects the e-MB row, the f-MB row, the g-MB row, and the h-MB row, and the MBs belonging to the e-MB row By selecting an MB that has not yet been selected and, for MBs belonging to f-MB, g-MB, and h-MB rows, by selecting an MB for which the upper right neighboring MB has already been selected, The MB of e row 10 column, f row 8 column, g row 6 column, h row 4 column is selected. The encoded data setting circuit 3 sends data necessary for encoding each MB to the MB pipeline 1 in the order of MB of e row 10 column, f row 8 column, g row 6 column, h row 4 column. Set. When data necessary for encoding an MB is set in the MB pipeline 1, the MB is input to the MB pipeline 1. When the data necessary for encoding the MB of h rows and 4 columns is set in the MB pipeline 1 and the MB of h rows and 4 columns is input to the MB pipeline 1, the MB selection circuit 2 A new MB of column, f row 9 column, g row 7 column, h row 5 column is selected.

図3は本発明が適用される動画像符号化方法の処理のフローチャートを示す。e−MB行、f−MB行、g−MB行、h−MB行をひとまとまりとし、e−MB行に属するMBについては、左下隣接MBがまだ選択されていないMBを選択し、かつ、f−MB行、g−MB行、およびh−MB行に属するMBについては、右上隣接MBが既に選択されているMBを選択することによって、e行10列、f行8列、g行6列、h行4列のMBを選択する(ステップS1)。次に、e行10列、f行8列、g行6列、h行4列のMBの順番で、各MBを符号化するために必要なデータをMBパイプライン1に設定し、順次MBパイプラインに投入する(ステップS2、ステップS3)。MBを符号化するために必要なデータがMBパイプライン1に設定されると、そのMBはMBパイプライン1に投入される。h行4列のMBを符号化するために必要なデータがMBパイプライン1に設定され、h行4列のMBがMBパイプライン1に投入されると、ステップS1に戻り(ステップS4)、e行11列、f行9列、g行7列、h行5列のMBを新たに選択する(ステップS1)。   FIG. 3 shows a flowchart of the process of the moving picture encoding method to which the present invention is applied. e-MB line, f-MB line, g-MB line, and h-MB line are grouped, and for MBs belonging to the e-MB line, an MB for which the lower left neighboring MB is not yet selected is selected; and For MBs belonging to the f-MB row, the g-MB row, and the h-MB row, by selecting the MB for which the upper right adjacent MB has already been selected, the e row 10 column, the f row 8 column, the g row 6 An MB with 4 columns and h rows is selected (step S1). Next, data necessary for encoding each MB is set in the MB pipeline 1 in the order of MB of e row 10 column, f row 8 column, g row 6 column, h row 4 column, Input into the pipeline (steps S2 and S3). When data necessary for encoding an MB is set in the MB pipeline 1, the MB is input to the MB pipeline 1. When the data necessary for encoding the MB of h rows and 4 columns is set in the MB pipeline 1 and the MB of h rows and 4 columns is input to the MB pipeline 1, the process returns to step S1 (step S4). MBs of e row 11 column, f row 9 column, g row 7 column, h row 5 column are newly selected (step S1).

これら4個のMBを1個のMBパイプライン1に連続して投入したときに、各MBがMBパイプライン1の各ステージを流れていく様子を図4に示す。ステージ0からステージ6の各処理内容は図26のものと同じである。また、図1のピクチャを構成する各MBがMBパイプライン1に投入され、ステージ0の処理が開始されるMBサイクル番号を図5に示す。図4に示すように、e行10列、f行8列、g行6列、h行4列の4個のMBは、MBサイクル番号がそれぞれ104、105、106、107のとき順番にステージ0に投入され、MBサイクル番号がそれぞれ110、111、112、113のとき順番にステージ6に達して符号化が終了する。このように、ひとまとまりの4つのMB行の中で、最も上のMB行に属するMB、上から2番目のMB行に属するMB、上から3番目のMB行に属するMB、上から4番目のMB行に属するMBの順番にMBパイプライン1に投入され、続いてそれらの右隣接MBが同様の順番でMBパイプライン1に投入される。 FIG. 4 shows a state in which each MB flows through each stage of the MB pipeline 1 when these four MBs are continuously input to one MB pipeline 1. Each processing contents of stage 6 from the stage 0 are the same as those in FIG. 26. FIG. 5 shows MB cycle numbers at which the MBs constituting the picture of FIG. 1 are input to the MB pipeline 1 and the stage 0 process is started. As shown in FIG. 4, four MBs of e row 10 column, f row 8 column, g row 6 column, h row 4 column are staged in order when the MB cycle numbers are 104, 105, 106, and 107, respectively. When the MB cycle numbers are 110, 111, 112, and 113, respectively, the stage 6 is reached in order and the encoding is completed. Thus, among a group of four MB rows, the MB belonging to the uppermost MB row, the MB belonging to the second MB row from the top, the MB belonging to the third MB row from the top, the fourth from the top The MBs that belong to the MB row are input to the MB pipeline 1 in the order of MBs, and then the right adjacent MBs are input to the MB pipeline 1 in the same order.

本発明によれば、本実施形態のようにひとまとまりとして符号化するMB行の数が4のとき、左隣接MBの処理結果を3ステージ分フィードバックし、現MBの処理に反映できる。このため、図4中に矢印で示すように、例えば、f行7列のMBの高精度の動き検出結果とイントラ予測結果をf行8列のMBの粗い精度の動き検出に反映できる。このように、従来の技術と異なり、左に隣接したMBの高精度の動き検出結果とイントラ予測結果を考慮して現MBの動きベクトルを選択することができる。また、同様に矢印で示すように、f行7列のMBの動き補償の結果をf行8列のMBのイントラ予測に反映できる。従って、従来の技術と異なり、左に隣接したMBの動き補償により求められた再生画素を用いて現MBのイントラ予測を行うことができる。更に、f行7列のMBのレート制御結果をf行8列のMBの量子化に反映できる。このように、左に隣接したMBのレート制御結果に応じて現MBの量子化パラメータを修正することができる。   According to the present invention, when the number of MB rows to be encoded as a group is four as in this embodiment, the processing result of the left adjacent MB can be fed back by three stages and reflected in the processing of the current MB. Therefore, as indicated by an arrow in FIG. 4, for example, the high-precision motion detection result and the intra prediction result of the f-row 7-column MB can be reflected in the coarse-precision motion detection of the f-row 8-column MB. Thus, unlike the conventional technique, the motion vector of the current MB can be selected in consideration of the high-precision motion detection result and intra prediction result of the MB adjacent to the left. Similarly, as indicated by an arrow, the result of motion compensation of the MB of f rows and 7 columns can be reflected in the intra prediction of MBs of f rows and 8 columns. Therefore, unlike the conventional technique, intra prediction of the current MB can be performed using the reconstructed pixel obtained by motion compensation of the MB adjacent to the left. Further, the rate control result of the MB of f rows and 7 columns can be reflected in the quantization of MBs of f rows and 8 columns. In this way, the quantization parameter of the current MB can be corrected according to the rate control result of the MB adjacent to the left.

ここで、本実施形態では下に隣接したMB行に含まれるMBが上のMB行中のMBから左方向に1MB離れている場合を示したが、1MB以上離れていれば良く、例えば2MB離れていても本発明の目的を達成することができ、同様の作用・効果を生じる。また、縦に連続する4つのMB行をひとまとまりとして、これら4つのMB行から、1つのMB行当たり1個のMBを選択し、これら選択された4個のMBを1個のMBパイプラインに連続して投入する例を示したが、ひとまとまりのMB行の数は2以上であれば良く、例えば縦に連続する8つのMB行をひとまとまりとして、これら8つのMB行から、1つのMB行当たり1個のMBを選択し、これら選択された8個のMBを1個のMBパイプラインに連続して投入しても本発明の目的を達成することができ、同様の作用・効果を生じる。ただし、ひとまとまりのMB行の数が2のときは、左隣接MBの処理結果を1ステージ分しか現MBの処理にフィードバックできないため、図4のステージ構成では左隣接MBの動き補償とレート制御の結果をそれぞれ現MBのイントラ予測と整数変換・量子化・逆量子化・逆整数変換にフィードバックできない。ひとまとまりのMB行の数が2のときは、図4に示したものとステージ構成を変更する必要がある。   Here, in the present embodiment, the case where the MB included in the MB row adjacent to the lower side is 1 MB away from the MB in the upper MB row in the left direction is shown. However, the object of the present invention can be achieved, and the same action and effect are produced. Also, taking four MB rows that are vertically continuous as one group, one MB per MB row is selected from these four MB rows, and these four MBs are selected as one MB pipeline. However, it is sufficient that the number of MB lines in a group is two or more. For example, eight MB lines that are vertically continuous are grouped, and one of these eight MB lines is used as one group. Even if one MB is selected per MB row, and the selected 8 MBs are continuously input to one MB pipeline, the object of the present invention can be achieved, and similar operations and effects can be achieved. Produce. However, when the number of MB rows in a group is 2, the processing result of the left adjacent MB can be fed back to the current MB processing for only one stage. Therefore, in the stage configuration of FIG. Cannot be fed back to the current MB intra prediction and integer transform / quantization / inverse quantization / inverse integer transform. When the number of MB lines in a group is 2, it is necessary to change the stage configuration from that shown in FIG.

(第2の実施形態)
図6は8画素×8画素の4つのSB(以下、8×8SBという。)に分割されたMBを示す。本実施形態では、4つの8×8SBについて動きベクトルのコストと予測誤差のコストの和が最小となる動きベクトルを検出する例について示す。一般に、PMVと動きベクトルの距離が遠いほど動きベクトルのコストは高いと評価される。このため、各8×8SBについて動き検出を始める前に、その8×8SBのPMVが決まっていなければならない。そして、例えば、左隣接8×8SB、上隣接8×8SB、右上隣接8×8SBの動きベクトルに基づいてPMVを決めるとすると、図6中の0、1、2、3の番号を付された順番に8×8SBごとの動きベクトルを検出しなければならないことになる。ただし、3番の8×8SBの動きベクトル検出時に右上隣接8×8SBの動きベクトルは存在しないため、3番の8×8SBのPMVは1番と2番の8×8SBの動きベクトルMV1とMV2に基づいて決められる。
(Second Embodiment)
FIG. 6 shows an MB divided into four SBs of 8 pixels × 8 pixels (hereinafter referred to as 8 × 8SB). In the present embodiment, an example in which a motion vector that minimizes the sum of the cost of the motion vector and the cost of the prediction error is detected for four 8 × 8 SBs will be described. Generally, it is estimated that the cost of a motion vector is higher as the distance between the PMV and the motion vector is longer. Therefore, before starting motion detection for each 8 × 8 SB, the 8 × 8 SB PMV must be determined. For example, if PMV is determined based on the motion vector of the left adjacent 8 × 8SB, the upper adjacent 8 × 8SB, and the upper right adjacent 8 × 8SB, the numbers 0, 1, 2, and 3 in FIG. The motion vector for each 8 × 8 SB must be detected in order. However, since the 8 × 8SB motion vector adjacent to the upper right side does not exist when the third 8 × 8SB motion vector is detected, the third 8 × 8SB PMV is the first and second 8 × 8SB motion vectors MV1 and MV2. It is decided based on.

図7はMBパイプラインに連続して投入されるMBの例を示した説明図である。図7のピクチャはa行から始まっており、r行の下方にもMB行が存在する。また、16列以降にもMBが存在する。本実施形態ではi−MB行、j−MB行、k−MB行、l−MB行、m−MB行、n−MB行、o−MB行、p−MB行をひとまとまりとして、これらひとまとまりのMB行から、i行15列、j行13列、k行11列、l行9列、m行7列、n行5列、o行3列、p行1列のMBを選択し、これら選択された8つのMBを1個のMBパイプラインに連続して投入する例を示す。   FIG. 7 is an explanatory diagram showing an example of MBs continuously input into the MB pipeline. The picture in FIG. 7 starts from the a line, and there is an MB line below the r line. There are also MBs after the 16th column. In this embodiment, the i-MB line, j-MB line, k-MB line, l-MB line, m-MB line, n-MB line, o-MB line, and p-MB line are taken as a group. Select MB of i rows, 15 columns, j rows, 13 columns, k rows, 11 columns, l rows, 9 columns, m rows, 7 columns, n rows, 5 columns, o rows, 3 columns, and p rows, 1 column from a set of MB rows. An example is shown in which these eight selected MBs are continuously input into one MB pipeline.

図8は8×8SBごとの動きベクトルを検出するために、8つのMB行に含まれるMBを1個のMBパイプラインに連続して投入したとき、各MBが各ステージを流れていく様子を示す。図9は本発明が適用される動きベクトル検出回路12のブロック図を示す。外部メモリ4には単画素精度の画像が記憶されている。ステージ0で外部メモリ4から画像を読み出す。その画像を2画素精度画像作成回路5で縮小して2画素精度の画像を作成し、2画素精度メモリ6に書き込む。ステージ1で2画素精度メモリ6から画像を読み出しながら、2画素精度動き検出回路7により2画素精度の候補動きベクトルを検出する。そして、ステージ2で候補ベクトルの周辺の領域を外部メモリ4から読み出して、単画素精度メモリ8に書き込む。ここで、一般に外部の大容量メモリは低速であるため、外部メモリ4から単画素精度メモリ8に転送するために1ステージ割り当てている。単画素精度メモリ8から2画素精度候補ベクトルの周辺の領域を読み出しながら、ステージ3で単画素精度動き検出回路9により動きベクトルを検出する。その後、ステージ4で単画素精度メモリ8から単画素精度画素を読み出して、1/4画素精度画像作成回路10で1/4画素精度の画像を作成しながら1/4画素精度動きベクトル検出回路11を用いて1/4画素精度動きベクトル検出を行う。単画素精度メモリ8からは単画素精度動き検出回路9と1/4画素精度画像作成回路10に単画素精度画像を供給することになるため、単画素精度メモリ8はダブルバッファ構成や2リード以上可能な多ポートメモリとする必要がある。なお、図8ではステージ4で単画素精度動きベクトルの周囲を直接探索して1/4画素精度動きベクトルを検出するとしたが、ステージ4で半画素精度動きベクトルを検出した後、ステージ5で半画素精度動きベクトルの周囲を探索して1/4画素精度動きベクトルを検出しても良い。また、ステージ3で単画素精度動きベクトル検出と半画素精度動きベクトル検出を行い、ステージ4で1/4画素精度動きベクトル検出を行っても良い。   FIG. 8 shows how each MB flows through each stage when MBs included in 8 MB rows are continuously input to one MB pipeline in order to detect a motion vector every 8 × 8 SB. Show. FIG. 9 shows a block diagram of a motion vector detection circuit 12 to which the present invention is applied. The external memory 4 stores an image with single pixel accuracy. At stage 0, an image is read from the external memory 4. The image is reduced by the two-pixel precision image creation circuit 5 to create a two-pixel precision image and written in the two-pixel precision memory 6. While reading an image from the two-pixel accuracy memory 6 at stage 1, the two-pixel accuracy motion detection circuit 7 detects a candidate motion vector with two-pixel accuracy. Then, in stage 2, the area around the candidate vector is read from the external memory 4 and written to the single pixel precision memory 8. Here, since an external large-capacity memory is generally low-speed, one stage is allocated for transfer from the external memory 4 to the single pixel precision memory 8. While reading the area around the two-pixel accuracy candidate vector from the single-pixel accuracy memory 8, the motion vector is detected by the single-pixel accuracy motion detection circuit 9 in the stage 3. Thereafter, the single pixel precision pixel is read from the single pixel precision memory 8 at the stage 4, and the quarter pixel precision motion vector detection circuit 11 is created while creating the quarter pixel precision image by the quarter pixel precision image creation circuit 10. Is used to perform 1/4 pixel precision motion vector detection. Since the single pixel accuracy memory 8 supplies a single pixel accuracy image to the single pixel accuracy motion detection circuit 9 and the ¼ pixel accuracy image creation circuit 10, the single pixel accuracy memory 8 has a double buffer configuration or more than two reads. It must be possible multi-port memory. In FIG. 8, the surrounding of the single-pixel accuracy motion vector is directly searched at stage 4 to detect the 1 / 4-pixel accuracy motion vector. However, after detecting the half-pixel accuracy motion vector at stage 4, A ¼ pixel accuracy motion vector may be detected by searching around the pixel accuracy motion vector. Alternatively, single-pixel precision motion vector detection and half-pixel precision motion vector detection may be performed in stage 3, and quarter-pixel precision motion vector detection may be performed in stage 4.

ステージ1〜ステージ5ではMBサイクルを4つのSBサイクルに分割し、各SBサイクルで8×8SBごとの処理を行う。ここで、SBサイクルとは、1個のSBが処理されるために要する時間の単位をいい、SBごとの処理を行うとき、MBサイクルはSBサイクルに分割される。以下では、MBサイクルがSBサイクルに分割され、SBごとの処理を行うステージ群をSBパイプライン(またはサブブロックパイプライン)と呼ぶ。図8中のステージ1〜ステージ5がSBパイプラインである。図10はSBパイプラインの詳細な動作を示す。−0、−1、−2、−3はそれぞれ図6中の0、1、2、3の番号を付された8×8SBを意味する。例えば、i15−2はi行15列のMBに含まれる2番目の8×8SBを表す。図10では、ステージ5に空ステージを挿入し、例えばi15−0SBについてステージ4で検出された1/4画素精度動きベクトルをi15−1SBのステージ1における2画素精度動きベクトルのコスト計算に反映できるようにしている。このように、MBサイクルをSB数に等しい数のSBサイクルに分割したときは、(SB数+1)段のパイプラインとすることにより、同一のMB内における前の8×8SBの処理結果を次の8×8SBに反映させることができる。   In stages 1 to 5, the MB cycle is divided into four SB cycles, and each 8 × 8 SB process is performed in each SB cycle. Here, the SB cycle means a unit of time required for processing one SB, and when performing processing for each SB, the MB cycle is divided into SB cycles. Hereinafter, the stage group in which the MB cycle is divided into SB cycles and processing for each SB is performed is referred to as an SB pipeline (or sub-block pipeline). Stages 1 to 5 in FIG. 8 are SB pipelines. FIG. 10 shows the detailed operation of the SB pipeline. −0, −1, −2 and −3 mean 8 × 8SB numbered 0, 1, 2, 3 in FIG. For example, i15-2 represents the second 8 × 8SB included in the MB of i rows and 15 columns. In FIG. 10, an empty stage is inserted into the stage 5, and for example, a ¼ pixel precision motion vector detected in the stage 4 for i15-0SB can be reflected in the cost calculation of the 2-pixel precision motion vector in the stage 1 of i15-1SB. I am doing so. As described above, when the MB cycle is divided into the number of SB cycles equal to the number of SBs, the processing result of the previous 8 × 8 SB in the same MB is obtained by setting a pipeline of (SB number + 1) stages. Of 8 × 8SB.

なお、ステージ1〜ステージ5において8×8SBごとの動きベクトル検出回路と並列に動作するMBごとの動きベクトル検出回路を設けることが可能である。また、ステージ3〜5において、ステージ1において検出された8×8SBごとの候補ベクトルの周辺領域で8×8SBごとの動きベクトル検出と並列にMBごと、16画素×8画素SBごと、8画素×16画素SBごとの動きベクトルを検出することも可能である。   In stage 1 to stage 5, it is possible to provide a motion vector detection circuit for each MB that operates in parallel with a motion vector detection circuit for each 8 × 8 SB. Further, in stages 3 to 5, in the peripheral region of the candidate vectors for each 8 × 8SB detected in stage 1, motion vector detection for each 8 × 8SB is performed in parallel with the motion vector detection for each 8 × 8SB, for each 16 × 8 pixels, for each 8 × It is also possible to detect a motion vector for every 16 pixels SB.

ステージ0〜5において動きベクトルが検出された後は、ステージ6で16×16イントラ予測モード、4×4イントラ予測モード、インター予測モード等の中から符号化効率の最も良くなる予測モードが選択される。ステージ7では整数変換、量子化、逆量子化、および逆整数変換が行われる。ステージ8では可変長符号化と動き補償が行われる。ステージ9ではレート制御とデブロッキングフィルタ処理が行われ、ステージ10では再生画素や符号化ビットストリームが外部メモリ4に書き込まれる。   After motion vectors are detected in stages 0 to 5, a prediction mode with the highest coding efficiency is selected from 16 × 16 intra prediction mode, 4 × 4 intra prediction mode, inter prediction mode, and the like in stage 6. The In stage 7, integer transformation, quantization, inverse quantization, and inverse integer transformation are performed. In stage 8, variable length coding and motion compensation are performed. In stage 9, rate control and deblocking filter processing are performed. In stage 10, the reproduced pixels and the encoded bit stream are written in the external memory 4.

(第3の実施形態)
本実施形態では、1/4画素精度動き検出回路11を2個設け、ステージ3とステージ4を結合して、1個の8×8SBの1/4画素精度動き検出を2SBサイクルかけて行う例を示す。ステージ3とステージ4以外は、第2の実施形態のMBパイプラインと同一のステージ構成である。図11はSBパイプラインの詳細な動作を示し、図12はこの動作を実現するための動き検出回路13のブロック図を示す。2つの1/4画素精度動き検出回路11を1SBサイクルずらして動作させることにより、個々の8×8SBの1/4画素精度動き検出を2SBサイクルかけて行うことができる。
(Third embodiment)
In this embodiment, two 1/4 pixel precision motion detection circuits 11 are provided, and the stage 3 and the stage 4 are combined to perform one 8 × 8SB 1/4 pixel precision motion detection over 2SB cycles. Indicates. Except for stage 3 and stage 4, the stage configuration is the same as that of the MB pipeline of the second embodiment. FIG. 11 shows the detailed operation of the SB pipeline, and FIG. 12 shows a block diagram of the motion detection circuit 13 for realizing this operation. By operating the two quarter-pixel precision motion detection circuits 11 with a shift of 1 SB cycle, individual 8 × 8 SB quarter-pixel precision motion detection can be performed over 2 SB cycles.

(第4の実施形態)
本実施形態では、H.264における4画素×4画素イントラ予測(以下、4×4イントラ予測という。)に本発明を適用する例ついて説明する。図13は16個の4画素×4画素SB(以下、4×4SBという。)に分割されたMBを示す。4×4SBは図13中に付した0〜15の順番で符号化され、ビットストリームに変換される。例えば、3番の4×4SBについて4×4イントラ予測を行うときには、1番の4×4SBにおける下端4行の画素と2番の4×4SBの右端4列の画素が参照される。また、14番の4×4SBについて4×4イントラ予測を行うときには、12番と13番の4×4SBにおける下端の4行の画素と11番の4×4SBにおける右端4列の画素が参照される。これら隣接4×4SBに属する画素は再生画素を用いることが望ましい。
(Fourth embodiment)
In this embodiment, H.264 is used. An example in which the present invention is applied to 4 pixel × 4 pixel intra prediction (hereinafter referred to as 4 × 4 intra prediction) in H.264 will be described. FIG. 13 shows an MB divided into 16 4 pixels × 4 pixels SB (hereinafter referred to as 4 × 4 SB). 4 × 4SB is encoded in the order of 0 to 15 in FIG. 13 and converted into a bit stream. For example, when 4 × 4 intra prediction is performed for the third 4 × 4SB, the pixels in the lowermost 4 rows of the first 4 × 4SB and the pixels in the fourth rightmost 4 columns of the second 4 × 4SB are referred to. In addition, when performing 4 × 4 intra prediction for the 14th 4 × 4SB, the pixels at the bottom four rows in the 12th and thirteenth 4 × 4SB and the pixels at the rightmost four columns in the 11th 4 × 4SB are referred to. The As the pixels belonging to these adjacent 4 × 4 SBs, it is desirable to use reproduction pixels.

図14は、4×4イントラ予測のために、8つのMB行に含まれるMBを1個のMBパイプラインに連続して投入したとき、各MBが各ステージを流れていく様子を示す。ステージ4で隣接4×4SBの再生画素を用いて4×4イントラ予測を行い、ステージ5で予測誤差に対して整数変換・量子化・逆整数変換・逆量子化を行ってイントラ予測値を加算し、再生画素を生成する。ステージ4の4×4イントラ予測回路とステージ5の整数変換・量子化・逆整数変換・逆量子化回路は、第2の実施形態または第3の実施形態で示したステージ1〜ステージ5の動き検出回路と並列に動作する。   FIG. 14 shows a state where each MB flows through each stage when MBs included in eight MB rows are continuously input to one MB pipeline for 4 × 4 intra prediction. Stage 4 performs 4 × 4 intra prediction using adjacent 4 × 4 SB reconstructed pixels, and stage 5 performs integer transformation, quantization, inverse integer transformation, and inverse quantization on the prediction error, and adds the intra prediction value Then, a reproduction pixel is generated. The 4 × 4 intra prediction circuit of stage 4 and the integer transform / quantization / inverse integer transform / inverse quantization circuit of stage 5 are the movements of stage 1 to stage 5 shown in the second embodiment or the third embodiment. Operates in parallel with the detection circuit.

本実施形態では、ステージ4と5においてMBサイクルを16のSBサイクルに分割する。このため、SBパイプラインのステージ数に比べてSBの数が多く、(SB数+1)段のSBパイプラインとすると、空ステージが増加し、効率が悪い。図15はSBパイプラインの詳細な動作を示す。−0、−1、−2、……、−15はそれぞれ図13中の0、1、2、……、15の番号を付された4×4SBを意味する。例えば、i15−8はi行15列のMBに含まれる8番目の4×4SBを表す。図15に示すように、本実施形態では、2つのMBに含まれる4×4SBを交互に処理することにより、1つのMBを2MBサイクル、すなわち32SBサイクルかけて処理する。1つのMBに属する4×4SBを4×4イントラ予測しているとき、同時に別のMBに属する4×4SBを整数変換・量子化・逆整数変換・逆量子化する。MBサイクルごとに1つのMBの処理を開始し、別のMBの処理を終えるように動作させ、MBパイプラインの他ステージと整合を取る。ただし、このように動作させると、図15に示すように、ステージ4の4×4イントラ予測において、2MBサイクルごとに1SBサイクル、すなわち1/16MBサイクルだけMBサイクルとずれが発生する。そのため、図15では、ステージ3の有効期間を15/16MBサイクルとし、ステージ4における1/16MBサイクルのずれを吸収している。なお、ステージ3の処理が重く、無効期間を設けることができないときは、ステージ6の有効期間を15/16MBサイクルとし、1/16MBサイクルのずれを吸収しても良い。このように動作させることにより、4×4イントラ予測回路と整数変換・量子化・逆整数変換・逆量子化を行う回路に空を生じることなく、左隣接、上隣接、右上隣接の4×4SBに属する画素について再生画素を用いて4×4イントラ予測を行うことができる。   In this embodiment, the MB cycle is divided into 16 SB cycles in stages 4 and 5. For this reason, if the number of SBs is larger than the number of stages in the SB pipeline, and the number of SB pipelines is (SB number + 1), the number of empty stages increases, resulting in poor efficiency. FIG. 15 shows the detailed operation of the SB pipeline. −0, −1, −2,..., -15 means 4 × 4SB numbered 0, 1, 2,. For example, i15-8 represents the 8th 4 × 4SB included in the MB of i rows and 15 columns. As shown in FIG. 15, in this embodiment, by processing 4 × 4 SB included in two MBs alternately, one MB is processed over 2 MB cycles, that is, 32 SB cycles. When 4 × 4 SB belonging to one MB is subjected to 4 × 4 intra prediction, 4 × 4 SB belonging to another MB is simultaneously subjected to integer transform / quantization / inverse integer transform / inverse quantization. The processing of one MB is started every MB cycle, and the processing of another MB is finished, and matching with the other stages of the MB pipeline is performed. However, when operated in this way, as shown in FIG. 15, in the 4 × 4 intra prediction of stage 4, a deviation from the MB cycle occurs by 1 SB cycle, that is, 1/16 MB cycle every 2 MB cycles. Therefore, in FIG. 15, the effective period of stage 3 is set to 15/16 MB cycle, and the shift of 1/16 MB cycle in stage 4 is absorbed. When the stage 3 process is heavy and an invalid period cannot be provided, the valid period of the stage 6 may be set to 15/16 MB cycle, and the shift of 1/16 MB cycle may be absorbed. By operating in this way, the 4 × 4 intra prediction circuit and the 4 × 4 SB of the left adjacent, the upper adjacent, and the upper right adjacent are generated without generating a sky in the circuits that perform integer transform / quantization / inverse integer transform / inverse quantization. 4 × 4 intra prediction can be performed using the reconstructed pixels for the pixels belonging to.

なお、SBパイプラインの前または後のステージの有効期間を短縮するのではなく、SBパイプラインの前または後に空ステージを挿入することによって、MBパイプラインのずれを吸収することもできる。   It should be noted that the MB pipeline shift can be absorbed by inserting an empty stage before or after the SB pipeline, instead of shortening the effective period of the stage before or after the SB pipeline.

本実施形態では、図14に矢印で示すように、左隣接MBのレート制御結果を4×4イントラ予測に付随して行う量子化に反映することができる。   In the present embodiment, as indicated by arrows in FIG. 14, the rate control result of the left adjacent MB can be reflected in quantization performed in association with 4 × 4 intra prediction.

また、輝度信号の16画素×16画素イントラ予測や4:2:0フォーマットのときの色差信号の8画素×8画素イントラ予測はMBごとに処理される。このため、左隣接MBと上隣接MBに属する画素を参照できれば良い。この場合、ステージ8の動き補償で得られる再生画素を参照できるため、4×4イントラ予測のようにステージ5で整数変換・量子化・逆整数変換・逆量子化を行う必要はない。なお、ステージ6のイントラ・インター判定で4×4イントラ予測モードが選択された場合には、ステージ5の整数変換・量子化・逆整数変換・逆量子化で得られた再生画素を保存しておく構成としても、ステージ7で再度整数変換・量子化・逆整数変換・逆量子化を行う構成としても良い。   Further, 16 pixel × 16 pixel intra prediction of the luminance signal and 8 pixel × 8 pixel intra prediction of the color difference signal in the 4: 2: 0 format are processed for each MB. For this reason, it is only necessary to refer to pixels belonging to the left adjacent MB and the upper adjacent MB. In this case, since the reconstructed pixel obtained by the motion compensation in stage 8 can be referred to, there is no need to perform integer transformation / quantization / inverse integer transformation / inverse quantization in stage 5 as in 4 × 4 intra prediction. When the 4 × 4 intra prediction mode is selected in the intra / inter determination in stage 6, the reproduced pixels obtained by the integer transform, quantization, inverse integer transform, and inverse quantization in stage 5 are stored. Alternatively, the stage 7 may be configured to perform integer transformation / quantization / inverse integer transformation / inverse quantization again in the stage 7.

なお、4×4イントラ予測のモード判定を入力された画素によって行うことにすれば、ステージ5の整数変換・量子化・逆整数変換・逆量子化は省略することができる。ただし、再生画素を用いてモード判定した場合に比べ、画質は劣化する。   If the mode determination of 4 × 4 intra prediction is performed by the input pixels, the integer transformation / quantization / inverse integer transformation / inverse quantization in stage 5 can be omitted. However, the image quality is deteriorated as compared with the case where the mode is determined using the reproduction pixels.

(第5の実施形態)
本実施形態では、第2の実施形態〜第4の実施形態とほぼ同一のステージ構成のMBパイプラインにおいて、図7におけるi−MB行、j−MB行、k−MB行、l−MB行をひとまとまりとして、これらひとまとまりのMB行から、i行15列、j行13列、k行11列、l行9列等のMBを選択し、これら選択された4個のMBを1個のMBパイプラインに連続して投入する例を示す。第2の実施形態〜第4の実施形態では8つのMB行をひとまとまりとして処理するため、各左隣接MBの処理結果を7ステージ分現MBの処理にフィードバックできるが、本実施形態では3ステージ分しかフィードバックできない。このため、左隣接MBの処理結果を現MBの処理に反映するとき、第2の実施形態〜第4の実施形態に比べて制限が生じる。
(Fifth embodiment)
In the present embodiment, in the MB pipeline having substantially the same stage configuration as the second to fourth embodiments, the i-MB row, j-MB row, k-MB row, and l-MB row in FIG. Are selected, and MBs such as i rows 15 columns, j rows 13 columns, k rows 11 columns, l rows 9 columns, etc. are selected from these MB rows, and one of these four selected MBs is selected. An example of continuously charging to the MB pipeline is shown. In the second to fourth embodiments, since 8 MB rows are processed as a group, the processing result of each left adjacent MB can be fed back to the processing of 7 stages of MB. In this embodiment, 3 stages I can only give feedback. For this reason, when the processing result of the left adjacent MB is reflected in the processing of the current MB, there is a restriction compared to the second to fourth embodiments.

8×8SBごとの動きベクトルを検出するために、4つのMB行に含まれるMBを1個のMBパイプラインに連続して投入したとき、各MBがMBパイプラインの各ステージを流れていく様子を図16に示す。この場合、例えば、ステージ5でj行12列のMBのイントラ・インター判定が終了したとき、同時にステージ1においてj行13列のMBの2画素精度動き検出も終了する。このため、左隣接MBのイントラ・インター判定結果を現MBの2画素精度動き検出に反映できないという制限がある。ただし、図16中に矢印で示すように、左隣接MBのイントラ・インター判定結果はステージ2以降に反映できる。また、左上隣接MB、上隣接MB、右上隣接MB、左方向に1つ離れたMB等についてステージ5で確定したイントラ・インター判定結果はステージ1の2画素精度動き検出に反映できる。そこで、ステージ1においては、左上隣接MB、上隣接MB、右上隣接MB、左方向に1つ離れたMB等の動きベクトルを参照して仮のPMVを作成し、4つの8×8SB全てが共通にこの仮のPMVを参照して2画素精度動き検出を行う。そして、ステージ2ではステージ1で検出された2画素精度の候補動きベクトルの周辺領域を単画素精度メモリ8に設定し、ステージ3で真のPMVを作成し、ステージ3とステージ4で真のPMVを参照して単画素精度動き検出と1/4画素精度動き検出を行う。   When MBs included in four MB rows are continuously input to one MB pipeline in order to detect a motion vector for each 8 × 8 SB, each MB flows through each stage of the MB pipeline. Is shown in FIG. In this case, for example, when the intra / inter determination of the MB of j rows and 12 columns ends in stage 5, the 2-pixel precision motion detection of the MB of j rows and 13 columns ends simultaneously in stage 1. For this reason, there is a limitation that the intra / inter determination result of the left adjacent MB cannot be reflected in the two-pixel precision motion detection of the current MB. However, as indicated by arrows in FIG. 16, the intra / inter determination result of the left adjacent MB can be reflected in the stage 2 and subsequent stages. Also, the intra / inter determination result determined in stage 5 for the upper left adjacent MB, the upper adjacent MB, the upper right adjacent MB, the MB one left in the left direction, and the like can be reflected in the two-pixel accuracy motion detection in stage 1. Therefore, in stage 1, a temporary PMV is created with reference to motion vectors such as the upper left adjacent MB, the upper adjacent MB, the upper right adjacent MB, and the MB separated by one in the left direction, and all four 8 × 8 SBs are common. The two-pixel precision motion detection is performed with reference to the temporary PMV. In stage 2, the peripheral area of the candidate motion vector of 2-pixel accuracy detected in stage 1 is set in the single-pixel accuracy memory 8, a true PMV is created in stage 3, and a true PMV is created in stage 3 and stage 4. The single-pixel precision motion detection and the quarter-pixel precision motion detection are performed with reference to FIG.

図17はステージ3と4におけるSBパイプラインの詳細な動作を示す。ステージ3の単画素精度動き検出とステージ4の1/4画素精度動き検出では、2つのMBに含まれる8×8SBを交互に処理することにより、1つのMBを2MBサイクル、すなわち8SBサイクルかけて処理する。1個のMBに属する8×8SBについて単画素精度動き検出を行っているとき、同時に別のMBに属する8×8SBについて1/4画素精度動き検出を行う。MBサイクルごとに1個のMBの処理を開始し、別のMBの処理を終えるように動作させ、MBパイプラインの他ステージと整合を取る。そして、ステージ2の有効期間を3/4MBサイクルとし、ステージ4における1/4MBサイクルのずれを吸収する。この方法によれば、1つのMB内に含まれる4個の8×8SBについて0番から3番までシリアルに処理することができる。このため、単画素精度動き検出と1/4画素精度動き検出では隣接8×8SBの動きベクトルを考慮した真のPMVに基づいて動き検出を行うことができる。   FIG. 17 shows the detailed operation of the SB pipeline in stages 3 and 4. In single-pixel precision motion detection of stage 3 and quarter-pixel precision motion detection of stage 4, by processing 8 × 8SB included in two MBs alternately, one MB takes 2 MB cycles, that is, 8SB cycles. Process. When single pixel precision motion detection is performed for 8 × 8SB belonging to one MB, ¼ pixel precision motion detection is simultaneously performed for 8 × 8SB belonging to another MB. The processing of one MB is started for each MB cycle, and the processing is performed so as to finish the processing of another MB, so as to be consistent with the other stages of the MB pipeline. Then, the effective period of stage 2 is set to 3/4 MB cycle, and the shift of 1/4 MB cycle in stage 4 is absorbed. According to this method, four 8 × 8 SBs included in one MB can be serially processed from No. 0 to No. 3. For this reason, in the single-pixel precision motion detection and the quarter-pixel precision motion detection, it is possible to perform motion detection based on a true PMV in consideration of the adjacent 8 × 8 SB motion vector.

ただし、本実施形態では、空間ダイレクトアドレスの評価が別途必要となる。ステージ1で仮のPMVに基づいて2画素精度動き検出が行われ、ステージ2ではステージ1で検出された候補動きベクトルの周辺領域が単画素精度メモリ8に設定される。ステージ1の仮のPMVとステージ3の真のPMVが異なる場合、ステージ3と4で動き検出する領域に空間ダイレクトアドレスに対応する位置のMBや8×8SB等が含まれない。そこで、ステージ3およびステージ4と並列に空間ダイレクトアドレスに対応する位置のMBや8×8SBのコストを評価する処理を行う必要がある。   However, in this embodiment, evaluation of the spatial direct address is required separately. In stage 1, 2-pixel precision motion detection is performed based on the temporary PMV, and in stage 2, the peripheral area of the candidate motion vector detected in stage 1 is set in the single-pixel precision memory 8. When the temporary PMV of stage 1 and the true PMV of stage 3 are different, the motion detection areas in stages 3 and 4 do not include MB or 8 × 8 SB at the position corresponding to the spatial direct address. Therefore, it is necessary to perform processing for evaluating the MB of the position corresponding to the spatial direct address and the cost of 8 × 8 SB in parallel with stage 3 and stage 4.

4×4イントラ予測のために、4つのMB行に含まれるMBを1個のMBパイプラインに連続して投入したとき、各MBがMBパイプラインの各ステージを流れていく様子を図18に示す。また、図19はステージ3と4におけるSBパイプラインの詳細な動作を示す。ステージ4の4×4イントラ予測とステージ5の整数変換・量子化・逆量子化・逆整数変換では、第4の実施形態のSBパイプラインと同様の処理を行う。   FIG. 18 shows how each MB flows through each stage of the MB pipeline when MBs included in four MB rows are continuously input to one MB pipeline for 4 × 4 intra prediction. Show. FIG. 19 shows the detailed operation of the SB pipeline in stages 3 and 4. In the 4 × 4 intra prediction in stage 4 and the integer transform / quantization / inverse quantization / inverse integer transform in stage 5, the same processing as in the SB pipeline of the fourth embodiment is performed.

ただし、本実施形態では左隣接MBの処理結果を3ステージ分しか現MBの処理にフィードバックできないため、動き補償をステージ7で行うと左隣接MBの再生画素を用いて4×4イントラ予測を行うことができない。そこで、動き補償をステージ6で行なわなければならないという制限がある。また、左隣接MBのステージ8のレート制御結果を反映できるのはステージ5以降であって、ステージ4の量子化には反映できない。しかし、ステージ7の可変長符号化によって大量のビットが発生し、ステージ8で量子化パラメータを大きくするというレート制御を行う必要が生じる場合がある。この場合には、ステージ5のイントラ・インター判定において4×4イントラ予測モードを選択しないようにするか、または4×4イントラ予測モードが選択されたときはステージ6で新しい量子化パラメータを用いて整数変換・量子化・逆量子化・逆整数変換をやり直す必要がある。   However, in this embodiment, the processing result of the left adjacent MB can be fed back to the current MB processing only for three stages. Therefore, when motion compensation is performed in stage 7, 4 × 4 intra prediction is performed using the reproduced pixels of the left adjacent MB. I can't. Therefore, there is a limitation that motion compensation must be performed at stage 6. The rate control result of stage 8 of the left adjacent MB can be reflected after stage 5 and cannot be reflected in the quantization of stage 4. However, there are cases where a large amount of bits are generated by variable length coding in stage 7 and it is necessary to perform rate control to increase the quantization parameter in stage 8. In this case, the 4 × 4 intra prediction mode is not selected in the intra / inter determination of stage 5, or when the 4 × 4 intra prediction mode is selected, the new quantization parameter is used in stage 6 It is necessary to redo integer conversion, quantization, inverse quantization, and inverse integer conversion.

上記第1の実施形態〜第5の実施形態で示したように、本発明では、縦に連続する複数のMB行をひとまとまりとして、これらひとまとまりのMB行から、1つのMB行当たり1個のMBを選択し、これら選択された複数のMBを1個のMBパイプラインに連続して投入する。これらのMBは狭い画像領域にあるため、下に隣接したMB行に属するMBの符号化が終了するまで、そのMBの上隣接MBと右上隣接MBの再生画素や動きベクトル等を画像符号化装置内に保持することにしてもその保持に要する記憶回路の規模は小さい。この記憶回路を設けることにより、これら複数のMB行の一番上のMB行に含まれるMBを除いて、現MBの符号化のために上隣接MBと右上隣接MBの再生画素や動きベクトル等を供給するという問題を解消することができる。   As shown in the first to fifth embodiments, in the present invention, a plurality of MB rows that are vertically continuous are grouped and one per MB row is selected from the group of MB rows. MBs are selected, and the selected MBs are continuously input to one MB pipeline. Since these MBs are in a narrow image area, the image encoding device is used to display the reproduction pixels, motion vectors, and the like of the upper adjacent MB and the upper right adjacent MB until the encoding of the MBs belonging to the adjacent MB row below ends. Even if it is held inside, the scale of the memory circuit required for the holding is small. By providing this memory circuit, except for the MB included in the uppermost MB row of the plurality of MB rows, reproduced pixels, motion vectors, etc. of the upper adjacent MB and the upper right adjacent MB for encoding the current MB Can be solved.

なお、第1の実施形態〜第5の実施形態で示したMBパイプラインのステージ構成は一例であって、他のステージ構成とすることも可能である。そして、ステージ構成が変われば、ひとまとまりとして符号化する縦に連続する複数のMB行の数が同じであっても、動き検出やイントラ予測等における制約は変わる。   In addition, the stage configuration of the MB pipeline shown in the first to fifth embodiments is an example, and other stage configurations may be used. If the stage configuration changes, the constraints in motion detection, intra prediction, and the like change even if the number of vertically continuous MB rows encoded as a group is the same.

(第6の実施形態)
図20は、内部メモリを有する動画像符号化装置のブロック図である。動画像符号化装置23は、MBの符号化に必要な全てのデータを外部メモリ4から読み出してその内部メモリに記憶する。内部メモリは参照領域用メモリ14とバッファメモリ15の2種類ある。動き検出の時に参照される参照画像は参照領域用メモリ14に記憶され、参照領域用メモリ14から動き検出部16と動き補償部17に供給される。符号化のために必要なその他のデータはバッファメモリ15に記憶され、動き検出部16、動き補償部17、イントラ予測部18、整数変換・量子化・逆量子化・逆整数変換部19、可変長符号化部20、デブロッキングフィルタ部21はバッファメモリ15との間でデータを転送する。制御部22はイントラ・インター判定とレート制御を行う。制御部22はワイヤードロジックまたはマイクロプロセサで構成される。なお、図20では参照領域用メモリ14とバッファメモリ15を別々のものとして表わしたが、参照領域用アドレスとバッファ用アドレスが別れていれば1個の共通メモリであっても良い。
(Sixth embodiment)
FIG. 20 is a block diagram of a video encoding apparatus having an internal memory. The moving image encoding device 23 reads all data necessary for MB encoding from the external memory 4 and stores the data in the internal memory. There are two types of internal memory: a reference area memory 14 and a buffer memory 15. The reference image to be referred to at the time of motion detection is stored in the reference area memory 14 and is supplied from the reference area memory 14 to the motion detection unit 16 and the motion compensation unit 17. Other data necessary for encoding is stored in the buffer memory 15, and includes a motion detection unit 16, a motion compensation unit 17, an intra prediction unit 18, an integer transform / quantization / inverse quantization / inverse integer transform unit 19, a variable The long encoding unit 20 and the deblocking filter unit 21 transfer data to and from the buffer memory 15. The control unit 22 performs intra / inter determination and rate control. The control unit 22 is configured by a wired logic or a microprocessor. In FIG. 20, the reference area memory 14 and the buffer memory 15 are shown as separate ones. However, if the reference area address and the buffer address are separated, one common memory may be used.

図21は、縦に連続する4つのMB行に含まれる4個のMBを1個のMBパイプラインで処理する場合の参照領域を示した説明図である。参照領域28、29、30、31はそれぞれMB24、25、26、27の動き検出のときに参照される領域である。参照領域28、29、30、31は大きく重なっており、縦に隣り合うMB行に属する2個のMBの参照領域において重なっていない部分の高さはMBの縦方向の画素数と一致する。この重なり部分は動きベクトルの検出範囲が広くなるほど大きくなる。本実施形態において参照領域28、29、30、31中の全画素は、参照領域用メモリ14に記憶される。従来技術と同様に、本実施形態でも右方向に隣接するMBの符号化を開始するとき、外部メモリ4から参照領域用メモリ14へ更新領域32、33、34、35のみ転送し、それまで符号化していた左隣接MBの参照領域28、29、30、31の原点から次に符号化する右隣りのMBのための新しい原点に付け替える。ただし、MB25のための更新領域33は、MB24の参照領域28に含まれていない部分のみである。同様に、MB26とMB27の更新領域34、35はそれぞれMB25とMB26の参照領域29、30に含まれていない部分のみである。従って、従来技術に比べて、外部メモリ4と参照領域用メモリ14の間の画素転送量を大幅に削減することができる。   FIG. 21 is an explanatory diagram showing a reference area when four MBs included in four vertically continuous MB rows are processed by one MB pipeline. Reference areas 28, 29, 30, and 31 are areas that are referred to when motions of MBs 24, 25, 26, and 27 are detected, respectively. The reference areas 28, 29, 30, and 31 are greatly overlapped, and the height of the non-overlapping portions in the reference areas of two MBs belonging to the vertically adjacent MB rows is equal to the number of pixels in the vertical direction of the MB. This overlapping portion becomes larger as the motion vector detection range becomes wider. In the present embodiment, all the pixels in the reference areas 28, 29, 30 and 31 are stored in the reference area memory 14. As in the prior art, in this embodiment, when encoding of the MB adjacent in the right direction is started, only the update areas 32, 33, 34, and 35 are transferred from the external memory 4 to the reference area memory 14, and the code is processed up to that point. The origin of the reference area 28, 29, 30, 31 of the left adjacent MB that has been converted is changed to a new origin for the right adjacent MB to be encoded next. However, the update area 33 for the MB 25 is only a portion not included in the reference area 28 of the MB 24. Similarly, the update areas 34 and 35 of MB26 and MB27 are only portions not included in the reference areas 29 and 30 of MB25 and MB26, respectively. Therefore, the amount of pixel transfer between the external memory 4 and the reference area memory 14 can be greatly reduced as compared with the prior art.

図22は、参照領域用メモリに参照領域を記憶するもう一つの方法を示した説明図である。参照領域用メモリ14には、参照領域28、29、30、31を全て含む矩形の領域36を記憶する。この方法によれば、参照領域用メモリ14のアドレス生成が簡単になる。また、更新領域37もひとまとまりの矩形領域となるため、外部メモリ4から参照領域用メモリ14への画素の転送が簡単になる。   FIG. 22 is an explanatory diagram showing another method of storing the reference area in the reference area memory. The reference area memory 14 stores a rectangular area 36 that includes all the reference areas 28, 29, 30, and 31. According to this method, the address generation of the reference area memory 14 is simplified. Further, since the update area 37 is also a group of rectangular areas, transfer of pixels from the external memory 4 to the reference area memory 14 is simplified.

上記では、連続した4つのMB行に含まれる4つのMBを1個のMBパイプラインで同時に処理する場合を例として示したが、本実施形態に示す方法は連続した2以上のMB行であれば適用でき、例えば連続した8のMB行であっても良い。   In the above, the case where four MBs included in four consecutive MB rows are simultaneously processed by one MB pipeline has been shown as an example. However, the method shown in the present embodiment may be performed on two or more consecutive MB rows. For example, it may be eight consecutive MB lines.

なお、参照領域用メモリ14には単画素精度画像のみ記憶し、参照領域用メモリ14から読み出した単画素精度画像から動き検出部16と動き補償部17の内部で半画素精度画像や1/4画素精度画像を作成する構成とすることができる。この構成は、予め半画素精度画像や1/4画素精度画像を作成して外部メモリ4に記憶し、外部メモリ4から参照領域用メモリ14に半画素精度画像や1/4画素精度画像を転送する構成よりも外部メモリ4と参照領域用メモリ14の間の画素転送量を削減することができる。   The reference region memory 14 stores only a single pixel accuracy image, and the single pixel accuracy image read out from the reference region memory 14 is used to generate a half pixel accuracy image or ¼ inside the motion detection unit 16 and the motion compensation unit 17. It can be set as the structure which produces a pixel precision image. In this configuration, a half-pixel precision image or a quarter-pixel precision image is created in advance and stored in the external memory 4, and the half-pixel precision image or the quarter-pixel precision image is transferred from the external memory 4 to the reference area memory 14. The pixel transfer amount between the external memory 4 and the reference area memory 14 can be reduced as compared with the configuration to be performed.

また、2画素精度画像等の縮小画像を作成し、最初に縮小画像上で動き検出を行い、段階的に高精度画像で動き検出を行う階層的探索法がある。この探索法に対して本発明を適用する場合にも、参照領域用メモリ14には単画素精度画像のみを記憶しておき、動き検出部16と動き補償部17の内部で縮小画像を作成する構成とすることができる。この構成は、予め縮小画像を作成して外部メモリ4に記憶し、外部メモリ4から参照領域用メモリ14に縮小画像を転送する構成よりも外部メモリ4と参照領域用メモリ14の間の画素転送量を削減することができる。   Further, there is a hierarchical search method in which a reduced image such as a two-pixel accuracy image is created, motion is first detected on the reduced image, and motion detection is performed on the high-accuracy image step by step. Even when the present invention is applied to this search method, only the single-pixel precision image is stored in the reference area memory 14, and a reduced image is created inside the motion detection unit 16 and the motion compensation unit 17. It can be configured. This configuration creates a reduced image in advance and stores it in the external memory 4, and transfers pixels between the external memory 4 and the reference region memory 14 rather than a configuration in which the reduced image is transferred from the external memory 4 to the reference region memory 14. The amount can be reduced.

その他、動き検出における演算量を削減する手法としてテレスコピック探索法が提案されている。テレスコピック探索法では、符号化対象画像と参照画像の中間の画像も必要となる。この場合には、中間の画像の中で動き検出に必要な領域に対しても本実施形態に示す更新方法を適用することができる。   In addition, a telescopic search method has been proposed as a method for reducing the amount of calculation in motion detection. In the telescopic search method, an intermediate image between the encoding target image and the reference image is also required. In this case, the update method shown in the present embodiment can be applied to a region necessary for motion detection in an intermediate image.

また、輝度信号だけを本実施形態に示す方法で外部メモリ4から画像符号化装置23の内部メモリに転送しても良いし、輝度信号と色差信号の両方に本実施形態に示す方法を適用しても良い。なお、動き検出のときに色差信号を参照しない場合には、色差信号は参照領域用メモリ14とバッファメモリ15のどちらに記憶しても良い。   Further, only the luminance signal may be transferred from the external memory 4 to the internal memory of the image encoding device 23 by the method shown in this embodiment, or the method shown in this embodiment is applied to both the luminance signal and the color difference signal. May be. If the color difference signal is not referred to during motion detection, the color difference signal may be stored in either the reference area memory 14 or the buffer memory 15.

(第7の実施形態)
HDTV映像を符号化対象とする場合、良好な画質を得るために動きベクトルの範囲は横±200画素、縦±100画素程度必要である。この範囲の動きベクトルを検出するための演算量は膨大であり、動き検出のために多くのサイクル数を要する。しかし、MBパイプライン構造の動画像符号化装置では、MBサイクル当たりのサイクル数は全てのステージで共通である。動き検出のためのステージのみMBサイクル当たりのサイクル数を増加させることはできない。また、本発明を適用したMBパイプラインでは、処理結果をフィードバックできるステージ数に限界があるため、MBパイプラインのステージ数を増加させることは好ましくない。
(Seventh embodiment)
When HDTV video is to be encoded, the motion vector range needs to be about ± 200 pixels horizontally and ± 100 pixels vertically to obtain good image quality. The amount of calculation for detecting a motion vector in this range is enormous, and a large number of cycles are required for motion detection. However, in a moving picture encoding apparatus having an MB pipeline structure, the number of cycles per MB cycle is common to all stages. Only the stage for motion detection cannot increase the number of cycles per MB cycle. Also, in the MB pipeline to which the present invention is applied, there is a limit to the number of stages where the processing result can be fed back, so it is not preferable to increase the number of stages in the MB pipeline.

図23は広い範囲で動きを検出できる動き検出装置38と、本発明が適用されたMBパイプラインを含む動画像符号化装置23の組み合わせを示す。動き検出装置38は、動きベクトルの符号化コストを考慮せず、予測誤差の符号化コストのみを考慮して動きベクトル候補を検出する。動画像符号化装置23は、動き検出装置38で検出された動きベクトル候補を受け取って、その動きベクトル候補の周辺領域について動きベクトルの符号化コストまで考慮して動き検出を行う。すなわち、広い範囲でPMVを参照せずに動きを検出し、検出された動きベクトル候補の周辺領域についてPMVを参照して再度動き検出を行う。受け取った動きベクトル候補の周辺領域における再度の動き検出は2画素精度動き検出や単画素精度動き検出等任意の精度の動き検出段階で行うことが可能である。動画像符号化装置23では、この動きベクトル候補の周辺領域に加えて、コスト最小の動きベクトルが存在する可能性が高い他の領域、例えばPMVの周辺領域でも同時に動き検出を行っても良い。動き検出装置38は、動画像符号化装置23のMBパイプラインと無関係に動作するため、多くのサイクル数をかけて動き検出を行うことができる。   FIG. 23 shows a combination of a motion detection device 38 capable of detecting motion in a wide range and a moving image encoding device 23 including an MB pipeline to which the present invention is applied. The motion detection device 38 detects motion vector candidates in consideration of only the encoding cost of the prediction error without considering the encoding cost of the motion vector. The video encoding device 23 receives the motion vector candidate detected by the motion detection device 38 and performs motion detection in consideration of the motion vector encoding cost for the peripheral region of the motion vector candidate. That is, motion is detected without referring to the PMV over a wide range, and motion detection is performed again with reference to the PMV for the peripheral region of the detected motion vector candidate. The motion detection again in the peripheral region of the received motion vector candidate can be performed at a motion detection stage of any accuracy such as 2-pixel accuracy motion detection or single pixel accuracy motion detection. In the moving image encoding device 23, in addition to the peripheral region of the motion vector candidate, motion detection may be performed simultaneously in another region where there is a high possibility that a motion vector with the minimum cost exists, for example, the peripheral region of the PMV. Since the motion detection device 38 operates independently of the MB pipeline of the video encoding device 23, motion detection can be performed over many cycles.

また、動き検出装置38は、動画像符号化装置23で作成された再生画像ではなく、符号化されていない入力されたままの画像を対象として動き検出を行う構成とすることもできる。この構成とすることにより、動画像符号化装置23から動き検出装置38に再生画像を送る必要が無くなる。   In addition, the motion detection device 38 may be configured to perform motion detection on an input image that has not been encoded, but is not a reproduced image created by the video encoding device 23. With this configuration, it is not necessary to send a reproduced image from the moving image encoding device 23 to the motion detection device 38.

なお、動き検出装置38と動画像符号化装置23を同一のLSI上に集積することも可能である。この場合、動画像符号化装置23に接続されている外部メモリ4を動き検出装置38と動画像符号化装置23の共有メモリとし、動き検出装置38は再生画像を対象として動き検出を行う構成としても良い。   It is possible to integrate the motion detection device 38 and the moving image encoding device 23 on the same LSI. In this case, the external memory 4 connected to the video encoding device 23 is a shared memory of the motion detection device 38 and the video encoding device 23, and the motion detection device 38 performs motion detection on the reproduced image. Also good.

また、MPEG−2からH.264へトランスコードするときのように、既に検出された動きベクトルを利用できるときには、動き検出装置38を用いず、検出済の動きベクトルを直接動画像符号化装置23に入力し、この検出済み動きベクトルの周辺領域について動きベクトルの符号化コストまで考慮して動き検出を行う構成とすることもできる。 Also, MPEG-2 to H.264. When the already detected motion vector can be used as in the case of transcoding to H.264, the detected motion vector is directly input to the moving image encoding device 23 without using the motion detecting device 38, and this detected motion is detected. It is also possible to adopt a configuration in which motion detection is performed in consideration of the coding cost of the motion vector for the peripheral region of the vector .

MBパイプラインに連続して投入されるMBの例を示した説明図である。It is explanatory drawing which showed the example of MB thrown continuously into MB pipeline. 本発明が適用される動画像符号化装置のブロック図である。It is a block diagram of the moving image encoder to which the present invention is applied. 本発明が適用される動画像符号化方法の処理のフローチャートである。It is a flowchart of a process of the moving image encoding method to which this invention is applied. 図1に例示される4個のMBを1個のMBパイプラインに連続して投入したときに、各MBがMBパイプラインの各ステージを流れていく様子を示した説明図である。FIG. 2 is an explanatory diagram showing a state in which each MB flows through each stage of the MB pipeline when the four MBs exemplified in FIG. 1 are continuously input into one MB pipeline. 図1のピクチャを構成する各MBがMBパイプラインに投入され、ステージ0の処理が開始されるMBサイクル番号を示した説明図である。FIG. 2 is an explanatory diagram showing MB cycle numbers at which the MBs constituting the picture of FIG. 1 are input to the MB pipeline and stage 0 processing is started. 8画素×8画素の4つのSBに分割されたMBを示した説明図である。It is explanatory drawing which showed MB divided | segmented into 4 SB of 8 pixels x 8 pixels. MBパイプラインに連続して投入されるMBの例を示した説明図である。It is explanatory drawing which showed the example of MB thrown continuously into MB pipeline. 8画素×8画素SBごとの動きベクトルを検出するために、8つのMB行に含まれるMBを1個のMBパイプラインに連続して投入したとき、各MBが各ステージを流れていく様子を示した説明図である。In order to detect a motion vector for every 8 pixels × 8 pixels SB, when MBs included in 8 MB rows are continuously input to one MB pipeline, each MB flows through each stage. It is explanatory drawing shown. 本発明が適用される動きベクトル検出回路のブロック図である。It is a block diagram of a motion vector detection circuit to which the present invention is applied. 8画素×8画素SBごとの動きベクトルを検出するためのSBパイプラインの詳細な動作を示した説明図である。It is explanatory drawing which showed the detailed operation | movement of SB pipeline for detecting the motion vector for every 8 pixel x 8 pixel SB. 8画素×8画素SBごとの動きベクトルを検出するためのSBパイプラインの詳細な動作を示した説明図である。It is explanatory drawing which showed the detailed operation | movement of SB pipeline for detecting the motion vector for every 8 pixel x 8 pixel SB. 本発明が適用される動きベクトル検出回路のブロック図である。It is a block diagram of a motion vector detection circuit to which the present invention is applied. 16個の4画素×4画素SBに分割されたMBを示した説明図である。It is explanatory drawing which showed MB divided | segmented into 16 4 pixels x 4 pixels SB. 4画素×4画素イントラ予測のために、8つのMB行に含まれるMBを1個のMBパイプラインに連続して投入したとき、各MBが各ステージを流れていく様子を示した説明図である。An explanatory diagram showing how each MB flows through each stage when MBs included in 8 MB rows are continuously input to one MB pipeline for 4 pixel × 4 pixel intra prediction. is there. 4画素×4画素イントラ予測のためのSBパイプラインの詳細な動作を示した説明図である。It is explanatory drawing which showed the detailed operation | movement of SB pipeline for 4 pixel x 4 pixel intra prediction. 8×8SBごとの動きベクトルを検出するために、4つのMB行に含まれるMBを1個のMBパイプラインに連続して投入したとき、各MBがMBパイプラインの各ステージを流れていく様子を示した説明図である。When MBs included in four MB rows are continuously input to one MB pipeline in order to detect a motion vector for each 8 × 8 SB, each MB flows through each stage of the MB pipeline. It is explanatory drawing which showed. 8画素×8画素SBごとの動きベクトルを検出するためのSBパイプラインの詳細な動作を示した説明図である。It is explanatory drawing which showed the detailed operation | movement of SB pipeline for detecting the motion vector for every 8 pixel x 8 pixel SB. 4画素×4画素イントラ予測のために、4つのMB行に含まれるMBを1個のMBパイプラインに連続して投入したとき、各MBが各ステージを流れていく様子を示した説明図である。An explanatory diagram showing how each MB flows through each stage when MBs included in four MB rows are continuously input to one MB pipeline for 4 pixel × 4 pixel intra prediction. is there. 4画素×4画素イントラ予測のためのSBパイプラインの詳細な動作を示した説明図である。It is explanatory drawing which showed the detailed operation | movement of SB pipeline for 4 pixel x 4 pixel intra prediction. 内部メモリを有する動画像符号化装置のブロック図である。It is a block diagram of the moving image encoder which has an internal memory. 縦に連続する4つのMB行に含まれる4個のMBを1個のMBパイプラインで処理する場合の参照領域を示した説明図である。It is explanatory drawing which showed the reference area | region in the case of processing 4 MB contained in 4 vertical MB lines by one MB pipeline. 参照領域用メモリに参照領域を記憶するもう一つの方法を示した説明図である。It is explanatory drawing which showed another method which memorize | stores a reference area in the memory for reference areas. 広い範囲で動きを検出できる動き検出装置と、本発明が適用されたMBパイプラインを含む動画像符号化装置の組み合わせを示した説明図である。It is explanatory drawing which showed the combination of the motion detection apparatus which can detect a motion in a wide range, and the moving image encoding apparatus containing MB pipeline to which this invention was applied. MPEG−2の符号化器のブロック図である。It is a block diagram of an MPEG-2 encoder. H.264の符号化器のブロック図である。H. 2 is a block diagram of an H.264 encoder. FIG. 従来のH.264の符号化器のMBパイプラインにおいて、MBがMBパイプラインの各ステージを流れていく様子を示した説明図である。Conventional H.264. 2 is an explanatory diagram showing a state in which an MB flows through each stage of the MB pipeline in an MB pipeline of an H.264 encoder. FIG. 従来の動画像符号化装置の構成を示したブロック図である。It is the block diagram which showed the structure of the conventional moving image encoder. 隣接する2つのMBの参照領域の例を示した説明図である。It is explanatory drawing which showed the example of the reference area of two adjacent MB.

符号の説明Explanation of symbols

1、80…MBパイプライン、2…MB選択回路、3、83…符号化データ設定回路、14…参照領域用メモリ、15…バッファメモリ、20…可変長符号化部、23、40、41…動画像符号化装置、24、25、26、27…MB、28、29、30、31、36…参照領域、32、33、34、35、37…更新領域、28、29、30、34を全て含む矩形の領域、39…内部メモリ DESCRIPTION OF SYMBOLS 1,80 ... MB pipeline, 2 ... MB selection circuit, 3, 83 ... Encoded data setting circuit, 14 ... Memory for reference area, 15 ... Buffer memory, 20 ... Variable length encoding part, 23, 40, 41 ... Moving picture encoding device, 24, 25, 26, 27 ... MB, 28, 29, 30, 31, 36 ... Reference area, 32, 33, 34, 35, 37 ... Update area, 28, 29, 30, 34 Rectangular area including all, 39 ... internal memory

Claims (4)

ピクチャの左端から右端まで横方向に連続して並んだマクロブロックの集まりであるマクロブロック行の中では、左端のマクロブロックから符号化を開始し、右に隣接したマクロブロックを順番に符号化する動画像符号化であって、
動画像符号化の処理が少なくとも2つの処理に分割され、当該分割された処理を行うステージが少なくとも2ステージ含まれ、当該ステージの中に動き検出を行うステージが含まれるマクロブロックパイプラインを含み、
縦方向に連続する少なくとも2行であって、ピクチャ全体に含まれる前記マクロブロック行の総行数よりも少ない行数の前記マクロブロック行をひとまとまりとして選択し、
前記ひとまとまりのマクロブロック行の中の最も上のマクロブロック行に含まれるマクロブロックを前記マクロブロックパイプラインに投入し、
前記ひとまとまりのマクロブロック行の中の上から2行目のマクロブロック行に含まれるマクロブロックから最も下のマクロブロック行に含まれるマクロブロックまで順番に、各マクロブロック行の上に隣接したマクロブロック行に含まれる直前投入マクロブロックが前記マクロブロックパイプラインに投入された後に、当該各マクロブロック行に含まれ、当該直前投入マクロブロックより左に位置し、かつ当該直前投入マクロブロックが右上隣接マクロブロックではないマクロブロックを、前記マクロブロックパイプラインに投入する
動画像符号化部と、
前記ひとまとまりのマクロブロック行の中の最も上のマクロブロック行から最も下のマクロブロック行までの各マクロブロック行に含まれ、連続して前記マクロブロックパイプラインに投入される、前記ひとまとまりのマクロブロック行の行数と同じ数の動き検出の対象である各マクロブロックについて動きベクトルを検出するとき参照される参照領域であって、1ピクチャの総画素数より少ない画素数の当該参照領域に含まれる全画素を記憶し、
前記参照領域の右側に位置し、横方向の画素数がマクロブロックの横方向の画素数に応じた画素数である更新領域が外部のメモリから転送され、前記動き検出の対象である各マクロブロックについて動き検出を終了し、前記動き検出の対象である各マクロブロックの右隣接マクロブロックについて新たに動き検出を行うとき前記参照領域が更新される
参照領域用メモリと
を有する動画像符号化装置。
In a macroblock row, which is a collection of macroblocks arranged in a row in the horizontal direction from the left end to the right end of a picture, start encoding from the leftmost macroblock, and sequentially encode the macroblocks adjacent to the right A moving image encoding unit ,
The video encoding process is divided into at least two processes, including at least two stages for performing the divided processes, including a macroblock pipeline including a stage for motion detection in the stages,
Selecting the macroblock rows as a group with at least two rows that are continuous in the vertical direction and having a number of rows smaller than the total number of the macroblock rows included in the entire picture;
Injecting the macroblock included in the top macroblock row in the group of macroblock rows into the macroblock pipeline;
Macros adjacent on each macroblock row in order from the macroblock included in the second macroblock row from the top to the macroblock included in the bottommost macroblock row in the group of macroblock rows. After the previous input macroblock included in the block row is input to the macroblock pipeline, it is included in each macroblock row and is located to the left of the previous input macroblock, and the previous input macroblock is adjacent to the upper right. A video encoding unit that inputs macroblocks that are not macroblocks into the macroblock pipeline;
The batch of macroblocks that are included in each macroblock row from the top macroblock row to the bottom macroblock row in the batch of macroblock rows and that are successively entered into the macroblock pipeline. A reference area that is referred to when detecting a motion vector for each macroblock that is subject to motion detection for the same number of lines as the number of macroblock lines, and the reference area has a smaller number of pixels than the total number of pixels in one picture. Memorize all included pixels,
Each macroblock which is located on the right side of the reference area and has an update area whose number of pixels in the horizontal direction is the number of pixels corresponding to the number of pixels in the horizontal direction of the macroblock is transferred from an external memory and is the target of motion detection for Exit motion detection, video coding apparatus and a memory reference region in which the reference area is updated when performing a new motion detection for the right neighboring macroblocks of the macroblock in the motion detection of the target .
動画像符号化の処段落理が少なくとも2つの処理に分割され、当該分割された処理を行うステージが少なくとも2ステージ含まれ、当該ステージの中に動き検出を行うステージが含まれるマクロブロックパイプラインと、
ピクチャの左端から右端まで横方向に連続して並んだマクロブロックの集まりであるマクロブロック行を、縦方向に連続する少なくとも2行であって、ピクチャ全体に含まれる前記マクロブロック行の総行数よりも少ない行数をひとまとまりとして選択し、当該ひとまとまりのマクロブロック行の中の最も上のマクロブロック行に含まれるマクロブロックについては、左下隣接マクロブロックがまだ選択されていないマクロブロックを選択し、かつ、当該ひとまとまりのマクロブロック行の中の最も上以外のマクロブロック行に含まれるマクロブロックについては、右上隣接マクロブロックが既に選択されているマクロブロックを選択することによって、当該ひとまとまりのマクロブロック行に含まれるマクロブロックを1マクロブロック行当たり1個選択するマクロブロック選択部と、
前記マクロブロック選択部によって選択された個々のマクロブロックについて、前記ひとまとまりのマクロブロック行の中の最も上のマクロブロック行に含まれるマクロブロックから、最も下のマクロブロック行に含まれるマクロブロックまで順番に、個々のマクロブロックを符号化するために必要なデータを前記マクロブロックパイプラインに設定し、当該マクロブロックを前記マクロブロックパイプラインに投入する符号化データ設定部と
を含み、
前記符号化データ設定部によって前記ひとまとまりのマクロブロック行の中の最も下のマクロブロック行に含まれるマクロブロックを符号化するために必要な前記データが前記マクロブロックパイプラインに設定されると、前記マクロブロック選択部が前記選択されている個々のマクロブロックごとにその右隣接マクロブロックを新たに選択する
動画像符号化部と、
前記ひとまとまりのマクロブロック行の中の最も上のマクロブロック行から最も下のマクロブロック行までの各マクロブロック行に含まれ、連続して前記マクロブロックパイプラインに投入される、前記ひとまとまりのマクロブロック行の行数と同じ数の動き検出の対象である各マクロブロックについて動きベクトルを検出するとき参照される参照領域であって、1ピクチャの総画素数より少ない画素数の当該参照領域に含まれる全画素を記憶し、
前記参照領域の右側に位置し、横方向の画素数がマクロブロックの横方向の画素数に応じた画素数である更新領域が外部のメモリから転送され、前記動き検出の対象である各マクロブロックについて動き検出を終了し、前記動き検出の対象である各マクロブロックの右隣接マクロブロックについて新たに動き検出を行うとき前記参照領域が更新される
参照領域用メモリと
を有する動画像符号化装置。
A macroblock pipeline in which the process of encoding a moving image is divided into at least two processes, at least two stages for performing the divided processes are included, and a stage for performing motion detection is included in the stages; ,
The total number of macroblock rows included in the entire picture, which is a macroblock row that is a group of macroblocks arranged in a row in the horizontal direction from the left end to the right end of the picture, and is at least two rows continuous in the vertical direction. Select a smaller number of lines as a group, and for the macroblocks included in the uppermost macroblock line in the group of macroblock lines, select the macroblock for which the lower left adjacent macroblock has not yet been selected For a macroblock included in a macroblock row other than the topmost macroblock row in the group, select the macroblock in which the upper right adjacent macroblock has already been selected to select the macroblock. A macroblock included in one macroblock line is one macroblock line Macroblock selecting unit or selecting one,
For each macroblock selected by the macroblock selector, from the macroblock included in the top macroblock row to the macroblock included in the bottom macroblock row in the group of macroblock rows And sequentially setting data necessary for encoding each macroblock in the macroblock pipeline, and including an encoded data setting unit that inputs the macroblock into the macroblock pipeline,
When the encoded data setting unit sets the data necessary for encoding the macroblock included in the lowest macroblock row in the group of macroblock rows, in the macroblock pipeline, A moving picture encoding unit for the macroblock selection unit to newly select the right adjacent macroblock for each selected macroblock;
The batch of macroblocks that are included in each macroblock row from the top macroblock row to the bottom macroblock row in the batch of macroblock rows and that are successively entered into the macroblock pipeline. A reference area that is referred to when detecting a motion vector for each macroblock that is subject to motion detection for the same number of lines as the number of macroblock lines, and the reference area has a smaller number of pixels than the total number of pixels in one picture. Memorize all included pixels,
Each macroblock which is located on the right side of the reference area and has an update area whose number of pixels in the horizontal direction is the number of pixels corresponding to the number of pixels in the horizontal direction of the macroblock is transferred from an external memory and is the target of motion detection for Exit motion detection, video coding apparatus and a memory reference region in which the reference area is updated when performing a new motion detection for the right neighboring macroblocks of the macroblock in the motion detection of the target .
動画像符号化の処理が少なくとも2つの処理に分割され、当該分割された処理を行うステージが少なくとも2ステージ含まれ、当該ステージの中に動き検出を行うステージが含まれるマクロブロックパイプラインと、
ピクチャの左端から右端まで横方向に連続して並んだマクロブロックの集まりであるマクロブロック行を、縦方向に連続する少なくとも2行であって、ピクチャ全体に含まれる当該マクロブロック行の総行数よりも少ない行数をひとまとまりとして選択し、当該ひとまとまりのマクロブロック行の中の最も上のマクロブロック行に含まれるマクロブロックについては、左下隣接マクロブロックがまだ選択されていないマクロブロックを選択し、かつ、当該ひとまとまりのマクロブロック行の中の最も上以外のマクロブロック行に含まれるマクロブロックについては、右上隣接マクロブロックが既に選択されているマクロブロックを選択することによって、当該ひとまとまりのマクロブロック行に含まれるマクロブロックを1マクロブロック行当たり1個選択する第1の手段と、
前記第1の手段によって選択された個々のマクロブロックを、前記ひとまとまりのマクロブロック行の中の最も上のマクロブロック行に含まれるマクロブロックから、最も下のマクロブロック行に含まれるマクロブロックまで順番に、前記マクロブロックパイプラインに投入する第2の手段と
を含み、
前記第2の手段によって前記ひとまとまりのマクロブロック行の中の最も下のマクロブロック行に含まれるマクロブロックが前記マクロブロックパイプラインに投入されると、前記第1の手段が前記選択されている個々のマクロブロックごとにその右隣接マクロブロックを新たに選択する
動画像符号化部と、
前記ひとまとまりのマクロブロック行の中の最も上のマクロブロック行から最も下のマクロブロック行までの各マクロブロック行に含まれ、連続して前記マクロブロックパイプラインに投入される、前記ひとまとまりのマクロブロック行の行数と同じ数の動き検出の対象である各マクロブロックについて動きベクトルを検出するとき参照される参照領域であって、1ピクチャの総画素数より少ない画素数の当該参照領域に含まれる全画素を記憶し、
前記参照領域の右側に位置し、横方向の画素数がマクロブロックの横方向の画素数に応じた画素数である更新領域が外部のメモリから転送され、前記動き検出の対象である各マクロブロックについて動き検出を終了し、前記動き検出の対象である各マクロブロックの右隣接マクロブロックについて新たに動き検出を行うとき前記参照領域が更新される
参照領域用メモリと
を有する動画像符号化装置。
A video encoding process is divided into at least two processes, a macroblock pipeline including at least two stages for performing the divided processes, and a stage for performing motion detection in the stages;
The total number of macroblock rows included in the entire picture, which are at least two macroblock rows that are a collection of macroblocks arranged in a row in the horizontal direction from the left end to the right end of the picture, and that are continuous in the vertical direction. Select a smaller number of lines as a group, and for the macroblocks included in the uppermost macroblock line in the group of macroblock lines, select the macroblock for which the lower left adjacent macroblock has not yet been selected For a macroblock included in a macroblock row other than the topmost macroblock row in the group, select the macroblock in which the upper right adjacent macroblock has already been selected to select the macroblock. A macroblock included in one macroblock line is one macroblock line First means for one selected or,
The individual macroblocks selected by the first means are changed from the macroblock included in the uppermost macroblock row to the macroblock included in the lowermost macroblock row in the group of macroblock rows. A second means for injecting into the macroblock pipeline in turn,
When the macroblock included in the lowest macroblock row in the group of macroblock rows is input to the macroblock pipeline by the second means, the first means is selected. A video encoding unit that newly selects the right adjacent macroblock for each macroblock;
The batch of macroblocks that are included in each macroblock row from the top macroblock row to the bottom macroblock row in the batch of macroblock rows and that are successively entered into the macroblock pipeline. A reference area that is referred to when detecting a motion vector for each macroblock that is subject to motion detection for the same number of lines as the number of macroblock lines, and the reference area has a smaller number of pixels than the total number of pixels in one picture. Memorize all included pixels,
Each macroblock which is located on the right side of the reference area and has an update area whose number of pixels in the horizontal direction is the number of pixels corresponding to the number of pixels in the horizontal direction of the macroblock is transferred from an external memory and is the target of motion detection for Exit motion detection, video coding apparatus and a memory reference region in which the reference area is updated when performing a new motion detection for the right neighboring macroblocks of the macroblock in the motion detection of the target .
ピクチャの最も上の前記ひとまとまりのマクロブロック行から符号化を開始し、下に隣接した前記ひとまとまりのマクロブロック行を順番に符号化する請求項1から請求項3までのいずれか1項に記載の動画像符号化装置。   The encoding is started from the group of macroblock rows at the top of a picture, and the group of macroblock rows adjacent to the bottom is sequentially encoded. The moving image encoding apparatus described.
JP2007198211A 2006-04-17 2007-07-30 Video encoding device Expired - Fee Related JP4095664B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007198211A JP4095664B2 (en) 2006-04-17 2007-07-30 Video encoding device

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2006113925 2006-04-17
JP2006113925 2006-04-17
JP2007198211A JP4095664B2 (en) 2006-04-17 2007-07-30 Video encoding device

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2006144890A Division JP4062711B2 (en) 2006-04-17 2006-05-25 Video encoding device

Publications (2)

Publication Number Publication Date
JP2007312427A JP2007312427A (en) 2007-11-29
JP4095664B2 true JP4095664B2 (en) 2008-06-04

Family

ID=38844779

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007198211A Expired - Fee Related JP4095664B2 (en) 2006-04-17 2007-07-30 Video encoding device

Country Status (1)

Country Link
JP (1) JP4095664B2 (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4660433B2 (en) * 2006-06-29 2011-03-30 株式会社東芝 Encoding circuit, decoding circuit, encoder circuit, decoder circuit, CABAC processing method
JP4895396B2 (en) * 2008-01-22 2012-03-14 キヤノン株式会社 Image decoding apparatus and image decoding method
JP5241622B2 (en) * 2008-07-02 2013-07-17 キヤノン株式会社 Encoding apparatus and encoding method
EP2312854A1 (en) 2009-10-15 2011-04-20 Siemens Aktiengesellschaft Method for coding symbols from a digital image sequence
JP2011217082A (en) * 2010-03-31 2011-10-27 Jvc Kenwood Corp Image encoder, image encoding method, image encoding program, image decoder, image decoding method and image decoding program
JP2012004615A (en) * 2010-06-14 2012-01-05 Nippon Telegr & Teleph Corp <Ntt> Motion vector search method, motion vector search apparatus and program therefor
JP2013150215A (en) * 2012-01-20 2013-08-01 Fujitsu Ltd Moving image decoding device, moving image encoding device, moving image decoding method, moving image encoding method, moving image decoding program, and moving image encoding program
JP2016054514A (en) * 2015-11-09 2016-04-14 富士通株式会社 Moving image encoding device, moving image encoding method, and moving image encoding program
JP6065090B2 (en) * 2015-11-09 2017-01-25 富士通株式会社 Moving picture decoding apparatus, moving picture decoding method, and moving picture decoding program
JP6317720B2 (en) * 2015-11-09 2018-04-25 富士通株式会社 Moving picture coding apparatus, moving picture coding method, and moving picture coding program
JP6311821B2 (en) * 2017-04-18 2018-04-18 富士通株式会社 Moving image processing apparatus and moving image processing method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3803122B2 (en) * 1995-05-02 2006-08-02 松下電器産業株式会社 Image memory device and motion vector detection circuit
JP4577048B2 (en) * 2004-03-11 2010-11-10 パナソニック株式会社 Image coding method, image coding apparatus, and image coding program

Also Published As

Publication number Publication date
JP2007312427A (en) 2007-11-29

Similar Documents

Publication Publication Date Title
JP4095664B2 (en) Video encoding device
JP4062711B2 (en) Video encoding device
JP5368631B2 (en) Image encoding method, apparatus, and program
JP4527677B2 (en) Moving picture coding method, moving picture coding apparatus, moving picture coding program
JP5340289B2 (en) Image decoding apparatus, image decoding method, integrated circuit, and program
US20090274213A1 (en) Apparatus and method for computationally efficient intra prediction in a video coder
CN102970543A (en) Methods for decoder-side motion vector derivation
WO2014010224A1 (en) Video compression device, video decoding device, image compression device, image decoding device, imaging device, and program
WO2010100672A1 (en) Compressed dynamic image encoding device, compressed dynamic image decoding device, compressed dynamic image encoding method and compressed dynamic image decoding method
JP4709155B2 (en) Motion detection device
JP4764706B2 (en) Video converter
JP5726220B2 (en) Motion estimation apparatus and motion estimation program
CN100568920C (en) The method and apparatus of the video image brightness interpolating of serial input and line output
JP4062712B2 (en) Moving picture coding apparatus and moving picture coding method
JP2010130351A (en) Motion compensation device
JP2011015262A (en) Image decoder
JP5974691B2 (en) MOVING IMAGE COMPRESSION DEVICE, IMAGING DEVICE, AND PROGRAM
WO2016047375A1 (en) Moving image coding device, moving image decoding device, moving image coding method, and moving image decoding method
JP5444497B2 (en) Image encoding method and image decoding method
TWI486908B (en) Method and associated apparatus for video encoding
JP5571262B2 (en) Image encoding method and image decoding method
CN103888780B (en) Moving picture encoding device, dynamic image decoding device, motion image encoding method and dynamic image decoding method
JP3698501B2 (en) Motion vector detection device
JP6609004B2 (en) Image encoding method and image decoding method
JP6370977B2 (en) Image encoding method and image decoding method

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070903

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070901

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20071218

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080103

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080308

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

Free format text: PAYMENT UNTIL: 20110314

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees