JP2015192438A - Moving image encoding processing device, program and integrated circuit - Google Patents

Moving image encoding processing device, program and integrated circuit Download PDF

Info

Publication number
JP2015192438A
JP2015192438A JP2014070726A JP2014070726A JP2015192438A JP 2015192438 A JP2015192438 A JP 2015192438A JP 2014070726 A JP2014070726 A JP 2014070726A JP 2014070726 A JP2014070726 A JP 2014070726A JP 2015192438 A JP2015192438 A JP 2015192438A
Authority
JP
Japan
Prior art keywords
signal
unit
prediction
motion vector
block
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.)
Granted
Application number
JP2014070726A
Other languages
Japanese (ja)
Other versions
JP6308838B2 (en
JP2015192438A5 (en
Inventor
斉藤 誠
Makoto Saito
誠 斉藤
喬士 藤江
Takashi Fujie
喬士 藤江
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.)
MegaChips Corp
Original Assignee
MegaChips Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by MegaChips Corp filed Critical MegaChips Corp
Priority to JP2014070726A priority Critical patent/JP6308838B2/en
Publication of JP2015192438A publication Critical patent/JP2015192438A/en
Publication of JP2015192438A5 publication Critical patent/JP2015192438A5/en
Application granted granted Critical
Publication of JP6308838B2 publication Critical patent/JP6308838B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a moving image encoding device capable of suppressing generation of an excessive code amount and appropriately preventing image quality deterioration even in the case where an excessive ineffective region that is not an effective video region forming an original video image is included in a part of or an entire predetermined macro block, in accordance with a relation between a display size and a macro block unit.SOLUTION: In a moving image encoding device 1000, a first zero setting section 2 sets a signal value of a predictive error signal to "0" in the case of a signal corresponding to the ineffective region. A second zero setting section 17 sets a signal value of a differential vector signal to "0" inn the case of a signal corresponding to the ineffective region. Thus, unsuitable moving image encoding processing is prevented from being performed on the ineffective region, and the generation of the useless code amount is appropriately suppressed.

Description

本発明は、動き補償を用いる動画像符号化技術に関する。   The present invention relates to a moving picture coding technique using motion compensation.

高解像度デジタルテレビ放送(HDTV)において、1920画素×1080ラインの画面解像度を実現するフルハイビジョン(フルHD)方式が規定されている。   In high-resolution digital television broadcasting (HDTV), a full high-definition (full HD) system that realizes a screen resolution of 1920 pixels × 1080 lines is defined.

フルHDを受信するテレビ受像機は、通常、フルHDの映像の表示サイズ(表示画素数)を、1920画素×1080ラインとしている。   A television receiver that receives full HD normally has a display size (number of display pixels) of full HD video of 1920 pixels × 1080 lines.

この表示画素数の場合、動画圧縮規格のH.264では、マクロブロック(MB)の単位が16画素×16画素となるため、実際にエンコード処理の対象とされている映像信号の1フレームの画像サイズは、1920画素×1080画素ではなく、1920画素×1088画素となる。つまり、H.264に準拠して、フルHDの映像信号を動画圧縮する場合、表示装置において、表示されない余分なラインを含めて圧縮を行う必要がある。また、余分なラインの画素値は、例えば、動画圧縮処理を開始するときの初期値に設定される可能性があり、どのような値に設定されるか不明(画素値が不定)である。   In the case of this number of display pixels, the video compression standard H.264. In H.264, since the unit of the macroblock (MB) is 16 pixels × 16 pixels, the image size of one frame of the video signal actually subjected to the encoding process is not 1920 pixels × 1080 pixels, but 1920 pixels. × 1088 pixels. That is, H.I. When a full HD video signal is compressed into a moving image in accordance with H.264, it is necessary to compress the display device including an extra line that is not displayed. Further, the pixel value of the extra line may be set to an initial value when starting the moving image compression process, for example, and it is unclear what value is set (the pixel value is undefined).

このように、余分なラインの画素の画素値が不定な値が設定されているフルHDの映像信号に対して、Intra予測処理又はInter予測処理を行うと、余分なラインの画素の画素値の影響を受け、余分なラインの画素の部分に残差が発生し、本来不要な圧縮処理が実行されることになる。その結果、不要なエンコード信号が出力され、符号量が増加してしまう可能性がある。例えば、余分なラインの画素の画素値によっては、残差が大きな値となり、増加する符号量が多くなってしまう可能性もある。   As described above, when the Intra prediction process or the Inter prediction process is performed on the full HD video signal in which the pixel values of the extra line pixels are indefinite, the pixel values of the extra line pixels are changed. As a result, a residual is generated in the pixel portion of the extra line, and an originally unnecessary compression process is executed. As a result, an unnecessary encoded signal may be output and the amount of codes may increase. For example, depending on the pixel values of the pixels in the extra line, the residual becomes a large value, and there is a possibility that the code amount to be increased increases.

このような問題に対処するために、余分なラインを含むマクロブロックの量子化ステップを調整することで、発生符号量の増加を抑制することができる。   In order to deal with such a problem, an increase in the amount of generated codes can be suppressed by adjusting a quantization step of a macroblock including an extra line.

例えば、特許文献1では、領域情報、モード制御に基づいて、指定された領域の量子化ステップを調整し、当該指定された領域に符号を多く割り当てる、又は、少なく割り当てる、方法が開示されている。   For example, Patent Document 1 discloses a method of adjusting a quantization step of a designated area based on area information and mode control, and assigning more or less codes to the designated area. .

特開平9−098416号公報Japanese Patent Laid-Open No. 9-098416

しかしながら、特許文献1の技術では、指定された領域の量子化ステップを調整するだけであり、指定された領域に対して動画圧縮処理を実行する場合に生成される残差信号を制御するものではないので、残差信号が大きな場合には、当該指定された領域に対して動画圧縮処理を実行した場合に発生する符号量が多くなることがある。   However, the technique of Patent Document 1 only adjusts the quantization step of a designated area, and does not control a residual signal generated when moving image compression processing is performed on the designated area. Therefore, when the residual signal is large, the amount of code generated when the moving image compression process is executed on the designated area may increase.

また、特許文献1の技術では、有効領域(映像有効領域)と余分な領域(映像無効領域)との両方を含んだマクロブロックに対して、符号量が少なくなるよう量子化ステップが制御される可能性がある。この場合、当該マクロブロックについての発生符号量が少なくなるように当該マクロブロックに適用される量子化ステップが比較的大きな値に設定されることになる。その結果、余分な領域(映像無効領域)から取得される残差信号の発生符号量を抑制することができるが、有効領域(映像有効領域)から取得される残差信号の発生符号量も抑制されることになる。したがって、このようにエンコードされた信号(動画像圧縮処理が実行された符号化信号)を、デコードすることで取得される映像において、当該マクロブロックに含まれる有効領域(映像有効領域)の画質が劣化する可能性がある。   In the technique disclosed in Patent Document 1, the quantization step is controlled so that the amount of code is reduced for a macroblock including both an effective area (video effective area) and an extra area (video invalid area). there is a possibility. In this case, the quantization step applied to the macroblock is set to a relatively large value so that the generated code amount for the macroblock is reduced. As a result, it is possible to suppress the generated code amount of the residual signal acquired from the extra region (video invalid region), but also suppress the generated code amount of the residual signal acquired from the effective region (video effective region). Will be. Therefore, in the video obtained by decoding the signal encoded in this way (the encoded signal on which the moving image compression process has been executed), the image quality of the effective area (video effective area) included in the macroblock is low. There is a possibility of deterioration.

また、その全部または一部に、余分な領域(映像無効領域)を含むマクロブロックについて、動きベクトルの探索処理を行う場合、当該余分な領域も探索対象として動きベクトルの探索処理が実行されるので、精度の良い動きベクトルの探索処理を実行することができない。   In addition, when a motion vector search process is performed for a macroblock that includes an extra area (video invalid area) in all or part of the macro block, the motion vector search process is executed for the extra area as a search target. Therefore, the motion vector search process with high accuracy cannot be executed.

そこで、本発明は、上記問題点に鑑み、表示サイズとマクロブロック単位との関係から、所定のマクロブロックの一部または全部に、本来の映像を構成する有効領域(映像有効領域)ではない余分な領域(映像無効領域)が含まれる場合であっても、余分な符号量が発生することを抑制するとともに、画質劣化を適切に防止することができる動画像符号化装置、プログラム、および、集積回路を実現することを目的とする。   Therefore, in view of the above problems, the present invention provides an extra area that is not an effective area (image effective area) that constitutes an original image in a part or all of a predetermined macro block because of the relationship between the display size and the macro block unit. Video coding apparatus, program, and integration capable of suppressing generation of an excessive code amount and appropriately preventing image quality deterioration even when a large area (video invalid area) is included The purpose is to realize a circuit.

上記課題を解決するために、第1の発明は、複数のマクロブロックからなるフレーム画像を形成することができる動画像信号を符号化する動画像符号化装置であって、記憶部と、インター予測部と、イントラ予測部と、位置情報取得部と、符号化モード判定部と、差分処理部と、第1ゼロ設定部と、直交変換部と、量子化部と、可変長符号化部と、を備える。   In order to solve the above-described problem, a first invention is a moving image encoding apparatus that encodes a moving image signal capable of forming a frame image including a plurality of macroblocks, and includes a storage unit, an inter prediction Unit, an intra prediction unit, a position information acquisition unit, a coding mode determination unit, a difference processing unit, a first zero setting unit, an orthogonal transform unit, a quantization unit, a variable length coding unit, Is provided.

記憶部は、参照画像を記憶する。   The storage unit stores a reference image.

インター予測部は、現フレーム画像と参照画像とに基づいて、インター予測処理を実行し、インター予測信号を取得する。   The inter prediction unit performs an inter prediction process based on the current frame image and the reference image, and acquires an inter prediction signal.

イントラ予測部は、現フレーム画像を用いて、イントラ予測処理を実行し、イントラ予測信号を取得する。   The intra prediction unit performs an intra prediction process using the current frame image, and acquires an intra prediction signal.

位置情報取得部は、画面上で映像を構成する映像有効領域と、画面上で映像を構成しない映像無効領域との境界についての位置情報を取得する。   The position information acquisition unit acquires position information about a boundary between a video valid area that constitutes a video on the screen and a video invalid area that does not constitute a video on the screen.

符号化モード判定部は、インター予測信号およびイントラ予測信号のいずれかを予測信号として出力する。   The encoding mode determination unit outputs either the inter prediction signal or the intra prediction signal as a prediction signal.

差分処理部は、動画像信号と符号化モード判定部から出力される予測信号とに対して差分処理を行うことで、予測誤差信号を取得する。   The difference processing unit obtains a prediction error signal by performing difference processing on the moving image signal and the prediction signal output from the encoding mode determination unit.

第1ゼロ設定部は、予測誤差信号が、映像無効領域に相当する信号である場合、予測誤差信号の信号値を「0」にすることで第1予測誤差信号を取得する。   When the prediction error signal is a signal corresponding to the video invalid area, the first zero setting unit obtains the first prediction error signal by setting the signal value of the prediction error signal to “0”.

直交変換部は、第1予測誤差信号に対して、直交変換処理を実行する。   The orthogonal transform unit performs an orthogonal transform process on the first prediction error signal.

量子化部は、直交変換部により処理された信号を量子化する。   The quantization unit quantizes the signal processed by the orthogonal transform unit.

可変長符号化部は、量子化部により処理された信号に対して可変長符号化処理を実行することで、動画像符号化信号を取得する。   The variable length encoding unit acquires a moving image encoded signal by performing variable length encoding processing on the signal processed by the quantization unit.

この動画像符号化装置では、第1ゼロ設定部により、予測誤差信号が、映像無効領域に相当する信号である場合、予測誤差信号の信号値を「0」にした第1予測誤差信号が取得される。そして、第1予測誤差信号に対して動画像符号化処理が実行されるので、例えば、表示サイズとマクロブロック単位との関係から、所定のマクロブロックに、本来の映像を構成する有効領域(映像有効領域)ではない余分な領域(映像無効領域)が含まれる場合であっても、余分な符号量が発生することを抑制するとともに、画質劣化を適切に防止することができる。
第2の発明は、第1の発明であって、処理対象のマクロブロックを所定の分割方法により分割して取得した分割ブロックについて取得された第1予測誤差信号に基づいて、分割ブロックについての符号化コストを算出する符号化コスト算出部をさらに備える。
In this moving image coding apparatus, when the prediction error signal is a signal corresponding to a video invalid area, the first zero setting unit obtains a first prediction error signal with the signal value of the prediction error signal being “0”. Is done. Then, since the moving image encoding process is performed on the first prediction error signal, for example, an effective area (video) that constitutes the original video in a predetermined macroblock from the relationship between the display size and the macroblock unit. Even when an extra area (video invalid area) that is not an effective area) is included, it is possible to suppress generation of an extra code amount and to appropriately prevent image quality deterioration.
2nd invention is 1st invention, Comprising: The code | symbol about a division | segmentation block based on the 1st prediction error signal acquired about the division | segmentation block acquired by dividing | segmenting the macroblock to be processed by the predetermined | prescribed division | segmentation method An encoding cost calculation unit that calculates an encoding cost is further provided.

符号化モード判定部は、符号化モード判定部により算出された符号化コストに基づいて、処理対象のマクロブロックの分割方法を決定し、決定された分割方法により取得された分割ブロックに映像無効領域を含む場合、当該無効領域に対応する予測誤差信号の信号値を「0」にするための第1制御信号を生成する。   The encoding mode determination unit determines a macroblock division method to be processed based on the encoding cost calculated by the encoding mode determination unit, and a video invalid area is added to the divided block obtained by the determined division method. Is included, a first control signal for setting the signal value of the prediction error signal corresponding to the invalid region to “0” is generated.

第1ゼロ設定部は、符号化モード判定部により生成された第1制御信号に基づいて、分割ブロックに含まれる映像無効領域に対応する予測誤差信号の信号値を「0」にする。   The first zero setting unit sets the signal value of the prediction error signal corresponding to the video invalid area included in the divided block to “0” based on the first control signal generated by the encoding mode determination unit.

この動画像符号化装置では、符号化コスト算出部が、分割ブロックについて取得された第1予測誤差信号に基づいて、分割ブロックについての符号化コストを算出するので、映像無効領域の影響を適切に排除することができ、適切な符号化コストの算出を行うことができる。   In this moving image coding apparatus, the coding cost calculation unit calculates the coding cost for the divided block based on the first prediction error signal acquired for the divided block, so that the influence of the video invalid region is appropriately adjusted. This can be eliminated, and an appropriate encoding cost can be calculated.

第3の発明は、第2の発明であって、処理対象ブロックの周辺のブロックの動きベクトルに基づいて、処理対象ブロックの予測動きベクトルを取得する動きベクトル処理部をさらに備える。   3rd invention is 2nd invention, Comprising: The motion vector process part which acquires the prediction motion vector of a process target block based on the motion vector of the block around a process target block is further provided.

インター予測部は、符号化モード判定部により設定された分割ブロックの予測動きベクトルを動きベクトル処理部から取得し、取得した分割ブロックの予測動きベクトルに基づいて、分割ブロックに対して、インター予測処理を実行することで、分割ブロックの動きベクトルを取得し、取得した分割ブロックの動きベクトルを動きベクトル処理部に出力する。   The inter prediction unit acquires the prediction motion vector of the divided block set by the encoding mode determination unit from the motion vector processing unit, and performs inter prediction processing on the divided block based on the acquired prediction motion vector of the divided block. Is executed, the motion vector of the divided block is acquired, and the acquired motion vector of the divided block is output to the motion vector processing unit.

動きベクトル処理部は、分割ブロックの動きベクトルと、分割ブロックの予測動きベクトルとに対して差分処理を行うことで、差分ベクトル信号を取得する。   The motion vector processing unit obtains a difference vector signal by performing difference processing on the motion vector of the divided block and the predicted motion vector of the divided block.

この動画像符号化装置では、さらに、動きベクトル処理部を備えるので、差分ベクトル信号を取得し、差分ベクトル信号を用いた動画像符号化処理を実行することができる。   Since this moving image encoding apparatus further includes a motion vector processing unit, a difference vector signal can be acquired and a moving image encoding process using the difference vector signal can be executed.

第4の発明は、第3の発明であって、差分ベクトル信号が、映像無効領域に相当する信号である場合、差分ベクトル信号の信号値を「0」にすることで第1差分ベクトル信号を取得する第2ゼロ設定部をさらに備える。   4th invention is 3rd invention, Comprising: When a difference vector signal is a signal equivalent to a video invalid area | region, the signal value of a difference vector signal is set to "0", and a 1st difference vector signal is obtained. A second zero setting unit to be acquired is further provided.

符号化モード判定部は、分割ブロックに映像無効領域が含まれる場合、当該無効領域に対応する差分ベクトル信号の信号値を「0」にするための第2制御信号を生成する。   The encoding mode determination unit generates a second control signal for setting the signal value of the difference vector signal corresponding to the invalid area to “0” when the divided block includes a video invalid area.

第2ゼロ設定部は、符号化モード判定部により生成された第2制御信号に基づいて、分割ブロックに含まれる映像無効領域に対応する差分ベクトル信号の信号値を「0」にする。   The second zero setting unit sets the signal value of the difference vector signal corresponding to the video invalid area included in the divided block to “0” based on the second control signal generated by the encoding mode determination unit.

この動画像符号化装置では、分割ブロックに含まれる映像無効領域に対応する差分ベクトル信号の信号値が「0」となるので、映像有効領域のみの差分ベクトル信号が動画像符号化される。したがって、この画像符号化装置では、映像無効領域のための差分ベクトル信号による余計な符号量の発生を効果的に抑制することができる。   In this moving picture coding apparatus, the signal value of the difference vector signal corresponding to the video invalid area included in the divided block is “0”, so that the differential vector signal of only the video valid area is coded as a moving picture. Therefore, in this image encoding device, it is possible to effectively suppress the generation of an extra code amount due to the difference vector signal for the video invalid area.

第5の発明は、第4の発明であって、インター予測部は、分割ブロックに映像無効領域が含まれる場合、当該分割ブロックの動きベクトルを算出する単位のブロックが全て映像無効領域である場合、当該ブロックの動きベクトルを当該ブロックの周辺の予測動きベクトルとする。   5th invention is 4th invention, Comprising: When the image | video invalid area | region is contained in a division | segmentation block, the inter estimation part is a case where all the blocks of the unit which calculates the motion vector of the said division | segmentation block are image | video invalid area | regions The motion vector of the block is set as a predicted motion vector around the block.

この画像符号化装置では、全て映像無効領域のブロックであって、動きベクトル算出の対象となるブロックに対して、動きベクトルを、当該ブロックの周辺から算出された予測動きベクトルに設定する。これにより、当該ブロックの動きベクトルの探索処理を省略することができるため、演算量を削減することができる。さらに、当該ブロックにおいて、動きベクトルと予測動きベクトルとは同じであるため、差分ベクトル信号の信号値が「0」となり、当該ブロック(映像無効領域)のために、余計な符号量を発生させることもない。   In this image encoding device, for all blocks in the video invalid area and the target of motion vector calculation, the motion vector is set to the predicted motion vector calculated from the periphery of the block. Thereby, since the search process of the motion vector of the said block can be omitted, the amount of calculation can be reduced. Furthermore, since the motion vector and the predicted motion vector are the same in the block, the signal value of the difference vector signal is “0”, and an extra code amount is generated for the block (video invalid area). Nor.

第6の発明は、第3から第5のいずれか発明であって、符号化コスト算出部は、分割ブロックについて取得された第1予測誤差信号と、差分ベクトル信号とに基づいて、分割ブロックについての符号化コストを算出する。   A sixth invention is any one of the third to fifth inventions, wherein the encoding cost calculation unit is configured to determine the divided block based on the first prediction error signal acquired for the divided block and the difference vector signal. The coding cost of is calculated.

これにより、第1予測誤差信号と、差分ベクトル信号とに基づいて、分割ブロックについての符号化コストをより高精度に算出することができる。   Thereby, based on the first prediction error signal and the difference vector signal, the encoding cost for the divided block can be calculated with higher accuracy.

第7の発明は、複数のマクロブロックからなるフレーム画像を形成することができる動画像信号を符号化する動画像符号化方法をコンピュータに実行させるためのプログラムである。   A seventh invention is a program for causing a computer to execute a moving image encoding method for encoding a moving image signal capable of forming a frame image composed of a plurality of macroblocks.

動画像符号化方法は、記憶ステップと、インター予測ステップと、イントラ予測ステップと、位置情報取得ステップと、符号化モード判定ステップと、差分処理ステップと、第1ゼロ設定ステップと、直交変換ステップと、量子化ステップと、可変長符号化ステップと、を備える。   The moving image encoding method includes a storage step, an inter prediction step, an intra prediction step, a position information acquisition step, an encoding mode determination step, a difference processing step, a first zero setting step, and an orthogonal transform step. A quantization step and a variable length coding step.

記憶ステップは、参照画像を記憶する。   The storing step stores the reference image.

インター予測ステップは、現フレーム画像と参照画像とに基づいて、インター予測処理を実行し、インター予測信号を取得する。   In the inter prediction step, an inter prediction process is performed based on the current frame image and the reference image, and an inter prediction signal is acquired.

イントラ予測ステップは、現フレーム画像を用いて、イントラ予測処理を実行し、イントラ予測信号を取得する。   In the intra prediction step, an intra prediction process is executed using the current frame image to acquire an intra prediction signal.

位置情報取得ステップは、画面上で映像を構成する映像有効領域と、画面上で映像を構成しない映像無効領域との境界についての位置情報を取得する。   The position information acquisition step acquires position information about a boundary between a video valid area that configures a video on the screen and a video invalid area that does not configure a video on the screen.

符号化モード判定ステップは、インター予測信号およびイントラ予測信号のいずれかを予測信号として出力する。   The encoding mode determination step outputs either an inter prediction signal or an intra prediction signal as a prediction signal.

差分処理ステップは、動画像信号と符号化モード判定ステップにより出力される予測信号とに対して差分処理を行うことで、予測誤差信号を取得する。   The difference processing step obtains a prediction error signal by performing difference processing on the moving image signal and the prediction signal output by the encoding mode determination step.

第1ゼロ設定ステップは、予測誤差信号が、映像無効領域に相当する信号である場合、予測誤差信号の信号値を「0」にすることで第1予測誤差信号を取得する。   In the first zero setting step, when the prediction error signal is a signal corresponding to the video invalid area, the signal value of the prediction error signal is set to “0” to obtain the first prediction error signal.

直交変換ステップは、第1予測誤差信号に対して、直交変換処理を実行する。   In the orthogonal transform step, an orthogonal transform process is performed on the first prediction error signal.

量子化ステップは、直交変換ステップにより処理された信号を量子化する。   The quantization step quantizes the signal processed by the orthogonal transformation step.

可変長符号化ステップは、量子化ステップにより処理された信号に対して可変長符号化処理を実行することで、動画像符号化信号を取得する。   In the variable length coding step, a variable length coding process is performed on the signal processed in the quantization step to obtain a moving image coded signal.

これにより、第1の発明と同様の効果を奏する動画像符号化方法をコンピュータに実行させるためのプログラムを実現することができる。   As a result, it is possible to realize a program for causing a computer to execute a moving image encoding method having the same effect as that of the first invention.

第8の発明は、複数のマクロブロックからなるフレーム画像を形成することができる動画像信号を符号化する集積回路であって、記憶部と、インター予測部と、イントラ予測部と、位置情報取得部と、符号化モード判定部と、差分処理部と、第1ゼロ設定部と、直交変換部と、量子化部と、可変長符号化部と、を備える。   An eighth invention is an integrated circuit that encodes a moving image signal capable of forming a frame image composed of a plurality of macroblocks, and includes a storage unit, an inter prediction unit, an intra prediction unit, and position information acquisition Unit, a coding mode determination unit, a difference processing unit, a first zero setting unit, an orthogonal transform unit, a quantization unit, and a variable length coding unit.

記憶部は、参照画像を記憶する。   The storage unit stores a reference image.

インター予測部は、現フレーム画像と参照画像とに基づいて、インター予測処理を実行し、インター予測信号を取得する。   The inter prediction unit performs an inter prediction process based on the current frame image and the reference image, and acquires an inter prediction signal.

イントラ予測部は、現フレーム画像を用いて、イントラ予測処理を実行し、イントラ予測信号を取得する。   The intra prediction unit performs an intra prediction process using the current frame image, and acquires an intra prediction signal.

位置情報取得部は、画面上で映像を構成する映像有効領域と、画面上で映像を構成しない映像無効領域との境界についての位置情報を取得する。   The position information acquisition unit acquires position information about a boundary between a video valid area that constitutes a video on the screen and a video invalid area that does not constitute a video on the screen.

符号化モード判定部は、インター予測信号およびイントラ予測信号のいずれかを予測信号として出力する。   The encoding mode determination unit outputs either the inter prediction signal or the intra prediction signal as a prediction signal.

差分処理部は、動画像信号と符号化モード判定部から出力される予測信号とに対して差分処理を行うことで、予測誤差信号を取得する。   The difference processing unit obtains a prediction error signal by performing difference processing on the moving image signal and the prediction signal output from the encoding mode determination unit.

第1ゼロ設定部は、予測誤差信号が、映像無効領域に相当する信号である場合、予測誤差信号の信号値を「0」にすることで第1予測誤差信号を取得する。   When the prediction error signal is a signal corresponding to the video invalid area, the first zero setting unit obtains the first prediction error signal by setting the signal value of the prediction error signal to “0”.

直交変換部は、第1予測誤差信号に対して、直交変換処理を実行する。   The orthogonal transform unit performs an orthogonal transform process on the first prediction error signal.

量子化部は、直交変換部により処理された信号を量子化する。   The quantization unit quantizes the signal processed by the orthogonal transform unit.

可変長符号化部は、量子化部により処理された信号に対して可変長符号化処理を実行することで、動画像符号化信号を取得する。   The variable length encoding unit acquires a moving image encoded signal by performing variable length encoding processing on the signal processed by the quantization unit.

これにより、第1の発明と同様の効果を奏する集積回路を実現することができる。   Thus, an integrated circuit that exhibits the same effect as that of the first invention can be realized.

本発明によれば、表示サイズとマクロブロック単位との関係から、所定のマクロブロックの一部または全部に、本来の映像を構成する有効領域(映像有効領域)ではない余分な領域(映像無効領域)が含まれる場合であっても、余分な符号量が発生することを抑制するとともに、画質劣化を適切に防止することができる動画像符号化装置、プログラム、および、集積回路を実現することができる。   According to the present invention, due to the relationship between the display size and the macroblock unit, an extra area (video invalid area) that is not an effective area (video valid area) that constitutes the original video is included in a part or all of a predetermined macroblock. ) Is included, it is possible to realize a moving picture coding apparatus, a program, and an integrated circuit that can suppress generation of an excessive code amount and can appropriately prevent deterioration in image quality. it can.

第1実施形態に係る動画像符号化装置1000の概略構成図。1 is a schematic configuration diagram of a moving image encoding apparatus 1000 according to a first embodiment. 1フレームの表示画像サイズが1920画素×1080画素である映像信号に対して、16画素×16画素のマクロブロックを用いた動画像符号化処理を実行するために生成された1920画素×1088画素の画像サイズを有する映像信号の一部を模式的に示した図。A 1920-pixel × 1088-pixel image generated to execute a video encoding process using a 16-pixel × 16-pixel macroblock on a video signal whose display image size of one frame is 1920-pixel × 1080-pixel The figure which showed typically a part of video signal which has an image size. 処理対象マクロブロックMB1の上半分(注目分割ブロックが16×8)が有効領域である場合において、決定される動き補償(MC)のブロックサイズと、動きベクトルについて説明するための図。The figure for demonstrating the block size and motion vector of the motion compensation (MC) determined when the upper half (a target division block is 16x8) of the process target macroblock MB1 is an effective region. パターンA2の場合の処理を説明するための図。The figure for demonstrating the process in the case of pattern A2. パターンA3の場合の処理を説明するための図。The figure for demonstrating the process in the case of pattern A3. 処理対象マクロブロックMB1の上半分(注目分割ブロックが16×8)が有効領域である場合において、決定される動き補償(MC)のブロックサイズと、動きベクトルについて説明するための図。The figure for demonstrating the block size and motion vector of the motion compensation (MC) determined when the upper half (a target division block is 16x8) of the process target macroblock MB1 is an effective region. 無効領域のみを含むマクロブロックMB2を示した図。The figure which showed macroblock MB2 containing only an invalid area | region. 左下端部に無効領域を含むマクロブロックMB3を示した図。The figure which showed macroblock MB3 which contains an invalid area | region in the lower left part. ブロックを16×16のブロックにしたときのインター予測処理の符号化コストが最小であった場合を説明するための図。The figure for demonstrating the case where the encoding cost of the inter prediction process at the time of making a block into a 16x16 block is the minimum. 分割ブロックを8×16のブロックにしたときのインター予測処理の符号化コストが最小であった場合を説明するための図。The figure for demonstrating the case where the encoding cost of the inter prediction process when a division | segmentation block is made into an 8x16 block is the minimum. 分割ブロックを16×8のブロックにしたときのインター予測処理の符号化コストが最小であった場合を説明するための図。The figure for demonstrating the case where the encoding cost of the inter prediction process when a division | segmentation block is made into a 16x8 block is the minimum. 分割ブロックを8×8のブロックにしたときのインター予測処理の符号化コストが最小であった場合を説明するための図。The figure for demonstrating the case where the encoding cost of the inter prediction process when a division | segmentation block is made into an 8x8 block is the minimum. 第1実施形態の変形例の動画像符号化装置に入力される画像を示した図。The figure which showed the image input into the moving image encoder of the modification of 1st Embodiment. 無効領域AR1の左上端に位置するマクロブロックMB0を示す図である。It is a figure which shows macroblock MB0 located in the upper left end of invalid area | region AR1.

[第1実施形態]
第1実施形態について、図面を参照しながら、以下、説明する。
[First Embodiment]
The first embodiment will be described below with reference to the drawings.

<1.1:動画像符号化装置の構成>
図1は、第1実施形態に係る動画像符号化装置1000の概略構成図である。
<1.1: Configuration of Video Encoding Device>
FIG. 1 is a schematic configuration diagram of a video encoding apparatus 1000 according to the first embodiment.

動画像符号化装置1000は、例えば、H.264に準拠した動画像符号化信号を生成し、出力することができる構成を有している。   The moving image encoding apparatus 1000 is, for example, H.264. H.264 has a configuration capable of generating and outputting a moving image encoded signal.

動画像符号化装置1000は、図1に示すように、減算器1と、第1ゼロ設定部2と、コスト算出部3と、直交変換部4と、量子化部5と、可変長符号化部6と、逆量子化部7と、逆直交変換部8と、加算器9と、記憶部10と、を備える。   As shown in FIG. 1, the moving image encoding apparatus 1000 includes a subtracter 1, a first zero setting unit 2, a cost calculation unit 3, an orthogonal transform unit 4, a quantization unit 5, and variable length encoding. Unit 6, inverse quantization unit 7, inverse orthogonal transform unit 8, adder 9, and storage unit 10.

また、動画像符号化装置1000は、図1に示すように、インター予測部11と、イントラ予測部12と、位置情報取得部13と、スキップMB判定部14と、符号化モード判定部15と、動きベクトル処理部16と、第2ゼロ設定部17と、を備える。   In addition, as illustrated in FIG. 1, the moving image encoding apparatus 1000 includes an inter prediction unit 11, an intra prediction unit 12, a position information acquisition unit 13, a skip MB determination unit 14, and a coding mode determination unit 15. A motion vector processing unit 16 and a second zero setting unit 17.

減算器1は、動画像信号Dinと、符号化モード判定部15から出力される予測信号Dp(予測動画像信号)と、を入力する。減算器1は、動画像信号Dinと、予測信号Dpとの差分信号である予測誤差信号diffを取得し、取得した予測誤差信号diffを第1ゼロ設定部2に出力する。   The subtracter 1 receives the moving image signal Din and the prediction signal Dp (predicted moving image signal) output from the encoding mode determination unit 15. The subtracter 1 acquires a prediction error signal diff that is a difference signal between the moving image signal Din and the prediction signal Dp, and outputs the acquired prediction error signal diff to the first zero setting unit 2.

第1ゼロ設定部2は、符号化モード判定部から出力される制御信号ctl_z1と、減算器1から出力される予測誤差信号diffとを入力する。第1ゼロ設定部2は、制御信号ctl_z1に基づいて、予測誤差信号diffまたは予測誤差信号diffの信号値を強制的に「0」にした信号のいずれかを選択し、予測誤差信号diff1として、コスト算出部3および直交変換部4に出力する。なお、第1ゼロ設定部2は、図1に示すように、例えば、セレクタsel1を用いて実現される。   The first zero setting unit 2 receives the control signal ctl_z1 output from the encoding mode determination unit and the prediction error signal diff output from the subtractor 1. The first zero setting unit 2 selects either the prediction error signal diff or a signal forcibly setting the signal value of the prediction error signal diff to “0” based on the control signal ctl_z1 as the prediction error signal diff1. It outputs to the cost calculation part 3 and the orthogonal transformation part 4. Note that the first zero setting unit 2 is realized by using, for example, a selector sel1 as shown in FIG.

コスト算出部3は、第1ゼロ設定部2から出力される予測誤差信号diff1と、第2ゼロ設定部17から出力される動きベクトル差分信号diff1_MVに基づいて、符号化コストの算出を行う。そして、算出した符号化コストを含む情報costを符号化モード判定部15に出力する。   The cost calculation unit 3 calculates an encoding cost based on the prediction error signal diff1 output from the first zero setting unit 2 and the motion vector difference signal diff1_MV output from the second zero setting unit 17. Then, information cost including the calculated encoding cost is output to the encoding mode determination unit 15.

なお、コスト算出部3は、動画像符号化装置の制御を行う制御部(不図示)から、符号化コストの算出処理に必要な情報、例えば、マクロブロック(例えば、H.264規格に準拠する場合16画素×16画素からなるマクロブロック)と同一のサイズのブロックを分割して取得される分割ブロックサイズ、分割方法、イントラ予測/インター予測の種別等の情報を取得する。   Note that the cost calculation unit 3 is compliant with information necessary for encoding cost calculation processing, such as a macroblock (for example, H.264 standard) from a control unit (not shown) that controls the moving image encoding device. In this case, information such as a divided block size, a division method, a type of intra prediction / inter prediction, and the like obtained by dividing a block having the same size as a macro block of 16 pixels × 16 pixels) is acquired.

直交変換部4は、第1ゼロ設定部2から出力される予測誤差信号diff1を入力する。直交変換部4は、入力された予測誤差信号diff1に対して、所定のブロック単位(例えば、8画素×8画素のブロック単位や、4画素×4画素のブロック単位)で直交変換(例えば、整数変換や離散コサイン変換(DCT))を実行し、直交変換後の信号を量子化部5に出力する。   The orthogonal transform unit 4 receives the prediction error signal diff1 output from the first zero setting unit 2. The orthogonal transform unit 4 performs orthogonal transform (for example, an integer) on the input prediction error signal diff1 in a predetermined block unit (for example, a block unit of 8 pixels × 8 pixels or a block unit of 4 pixels × 4 pixels). Transformation or discrete cosine transformation (DCT) is executed, and the signal after orthogonal transformation is output to the quantization unit 5.

量子化部5は、直交変換部4から出力される直交変換後の信号を入力する。量子化部5は、直交変換部4から出力される直交変換後の信号に対して、量子化処理を実行し、量子化処理後の信号を、可変長符号化部6および逆量子化部7に出力する。   The quantization unit 5 inputs the signal after orthogonal transformation output from the orthogonal transformation unit 4. The quantization unit 5 performs quantization processing on the signal after orthogonal transformation output from the orthogonal transformation unit 4, and converts the quantized signal into a variable length coding unit 6 and an inverse quantization unit 7. Output to.

逆量子化部7は、量子化部5から出力される信号を入力し、当該信号に対して、逆量子化処理を実行する。そして、逆量子化部7は、逆量子化処理後の信号を逆直交変換部8に出力する。   The inverse quantization unit 7 receives the signal output from the quantization unit 5 and performs an inverse quantization process on the signal. Then, the inverse quantization unit 7 outputs the signal after the inverse quantization process to the inverse orthogonal transform unit 8.

逆直交変換部8は、逆量子化部7から出力される信号を入力し、当該信号に対して、逆直交変換処理を実行する。これにより、逆直交変換部8は、直交変換部4に入力された予測誤差信号diff1と同様の信号(予測誤差信号diff1’)を取得する。そして、逆直交変換部8は、逆直交変換処理後の信号(予測誤差信号diff1’)を加算器9に出力する。   The inverse orthogonal transform unit 8 receives the signal output from the inverse quantization unit 7 and performs an inverse orthogonal transform process on the signal. Thereby, the inverse orthogonal transform unit 8 acquires a signal (prediction error signal diff1 ') similar to the prediction error signal diff1 input to the orthogonal transform unit 4. Then, the inverse orthogonal transform unit 8 outputs the signal (prediction error signal diff <b> 1 ′) after the inverse orthogonal transform process to the adder 9.

なお、予測誤差信号diff1’は、予測誤差信号diff1を、直交変換、量子化処理、逆量子化処理、および、逆直交変換処理を行うことで取得される信号であり、直交変換、量子化処理等に伴う誤差を含む信号である。   The prediction error signal diff1 ′ is a signal obtained by performing orthogonal transformation, quantization processing, inverse quantization processing, and inverse orthogonal transformation processing on the prediction error signal diff1. It is a signal including an error associated with the above.

加算器9は、逆直交変換部8から出力される信号と、符号化モード判定部15から出力される予測信号Dpとを入力とし、両者を加算する。これにより減算器1に入力される動画像信号Dinと同様の動画像信号Din’が取得される。加算器9は、取得した動画像信号Din’を記憶部10に出力する。   The adder 9 receives the signal output from the inverse orthogonal transform unit 8 and the prediction signal Dp output from the coding mode determination unit 15 and adds both. As a result, a moving image signal Din ′ similar to the moving image signal Din input to the subtractor 1 is acquired. The adder 9 outputs the acquired moving image signal Din ′ to the storage unit 10.

記憶部10は、例えば、複数フレーム分の動画像信号(データ)を記憶することができるフレームメモリである。記憶部10は、加算器9から出力される動画像信号Din’を記憶する。また、記憶部10は、インター予測処理用の基準フレーム(例えば、現フレームの1フレーム前のフレーム)の動画像信号をインター予測部11に出力する。また、記憶部10は、イントラ予測処理用の基準フレーム(現フレーム)あるいは、当該基準フレームの所定の領域に相当するデータ(例えば、イントラ予測を行う単位のブロックのデータや、当該ブロックの複数個からなる領域のデータ)をイントラ予測部12に出力する。   The storage unit 10 is a frame memory that can store moving image signals (data) for a plurality of frames, for example. The storage unit 10 stores the moving image signal Din ′ output from the adder 9. In addition, the storage unit 10 outputs a moving image signal of a reference frame for inter prediction processing (for example, a frame one frame before the current frame) to the inter prediction unit 11. In addition, the storage unit 10 stores a reference frame (current frame) for intra prediction processing or data corresponding to a predetermined area of the reference frame (for example, data of a block in a unit for performing intra prediction, or a plurality of blocks). (Region data) is output to the intra prediction unit 12.

インター予測部11は、動画像信号Dinと、記憶部10からの出力(参照画像を形成する動画像信号)と、を入力する。また、インター予測部11は、符号化モード判定部から出力される制御信号ctl1と、位置情報取得部13から出力される位置情報posとを入力する。インター予測部11は、制御信号ctl1と位置情報posとに基づいて、インター予測処理を実行し、インター予測信号(インター予測動画像信号)を取得する。そして、インター予測部11は、取得したインター予測信号を符号化モード判定部15に出力する。   The inter prediction unit 11 receives the moving image signal Din and the output from the storage unit 10 (moving image signal forming a reference image). The inter prediction unit 11 also receives the control signal ctl1 output from the encoding mode determination unit and the position information pos output from the position information acquisition unit 13. The inter prediction unit 11 performs an inter prediction process based on the control signal ctl1 and the position information pos, and acquires an inter prediction signal (inter prediction video signal). Then, the inter prediction unit 11 outputs the acquired inter prediction signal to the encoding mode determination unit 15.

また、インター予測部11は、動きベクトル処理部16から予測動きベクトルpMV(予測動きベクトルに関する情報)を入力する。そして、インター予測部11は、当該予測動きベクトルpMVを、動きベクトルの探索処理の初期ベクトルに設定し、動きベクトルの探索処理を実行する。そして、インター予測部11は、動きベクトルの探索処理により取得した動きベクトルMV(動きベクトル情報MV)を動きベクトル処理部16に出力する。   In addition, the inter prediction unit 11 inputs the predicted motion vector pMV (information on the predicted motion vector) from the motion vector processing unit 16. Then, the inter prediction unit 11 sets the predicted motion vector pMV as an initial vector for the motion vector search process, and executes the motion vector search process. Then, the inter prediction unit 11 outputs the motion vector MV (motion vector information MV) acquired by the motion vector search process to the motion vector processing unit 16.

イントラ予測部12は、動画像信号Dinと、記憶部10からの出力(イントラフレーム画像(現フレーム画像)を形成する動画像信号)と、を入力する。また、イントラ予測部12は、符号化モード判定部から出力される制御信号ctl2と、位置情報取得部13から出力される位置情報posとを入力する。イントラ予測部12は、制御信号ctl2と位置情報posとに基づいて、イントラ予測処理を実行し、イントラ予測信号(イントラ予測動画像信号)を取得する。そして、イントラ予測部12は、取得したイントラ予測信号を符号化モード判定部15に出力する。   The intra prediction unit 12 receives the moving image signal Din and the output from the storage unit 10 (moving image signal forming an intra frame image (current frame image)). Further, the intra prediction unit 12 receives the control signal ctl2 output from the encoding mode determination unit and the position information pos output from the position information acquisition unit 13. The intra prediction unit 12 performs an intra prediction process based on the control signal ctl2 and the position information pos, and acquires an intra prediction signal (intra prediction video signal). Then, the intra prediction unit 12 outputs the acquired intra prediction signal to the encoding mode determination unit 15.

位置情報取得部13は、動画像信号Dinと、映像無効領域を特定するための情報Info_areaとを入力とする。位置情報取得部13は、処理対象中のマクロブロックの画面上の位置情報を取得する。また、位置情報取得部13は、情報Info_areaに基づいて、処理対象中のマクロブロックが、映像無効領域内に存在するのか否かについての情報を取得する。そして、位置情報取得部13は、取得した上記2つの情報を含む情報を位置情報posとして、インター予測部11と、イントラ予測部12と、スキップMB判定部14と、符号化モード判定部15と、動きベクトル処理部16とに出力する。   The position information acquisition unit 13 receives the moving image signal Din and information Info_area for specifying the video invalid area. The position information acquisition unit 13 acquires position information on the screen of the macro block being processed. Further, the position information acquisition unit 13 acquires information on whether or not the macro block being processed exists in the video invalid area based on the information Info_area. Then, the position information acquisition unit 13 uses the acquired information including the two pieces of information as the position information pos, the inter prediction unit 11, the intra prediction unit 12, the skip MB determination unit 14, the encoding mode determination unit 15, To the motion vector processing unit 16.

スキップMB判定部14は、動画像信号Dinと、位置情報取得部13から出力される位置情報posと、を入力とする。スキップMB判定部14は、位置情報posに基づいて、処理対象中のマクロブロックをスキップマクロブロック(スキップトマクロブロック)とするか否かを判定し、その判定結果を示す情報を符号化モード判定部15に出力する。   The skip MB determination unit 14 receives the moving image signal Din and the position information pos output from the position information acquisition unit 13 as inputs. Based on the position information pos, the skip MB determination unit 14 determines whether or not the macro block being processed is a skip macro block (skipped macro block), and information indicating the determination result is encoded mode determination To the unit 15.

符号化モード判定部15は、位置情報取得部13から出力される位置情報posと、スキップMB判定部14から出力される情報と、インター予測部11からの出力と、イントラ予測部12からの出力と、コスト算出部3から出力される情報costと、を入力とする。   The encoding mode determination unit 15 includes position information pos output from the position information acquisition unit 13, information output from the skip MB determination unit 14, output from the inter prediction unit 11, and output from the intra prediction unit 12. And the information cost output from the cost calculation unit 3 are input.

符号化モード判定部15は、位置情報posに基づいて、符号化コスト算出処理のときに、映像無効領域に対応する予測誤差信号が強制的に「0」となるように制御信号ctl_z1を設定する。符号化モード判定部15は、制御信号ctl_z1を第1ゼロ設定部2に出力する。   Based on the position information pos, the encoding mode determination unit 15 sets the control signal ctl_z1 so that the prediction error signal corresponding to the video invalid area is forcibly set to “0” during the encoding cost calculation process. . The encoding mode determination unit 15 outputs the control signal ctl_z1 to the first zero setting unit 2.

また、符号化モード判定部15は、位置情報posに基づいて、符号化コスト算出処理のときに、所定の条件を満たし、映像無効領域に対応するベクトル差分信号が強制的に「0」となるように制御信号ctl_z2を設定する。符号化モード判定部15は、制御信号ctl_z2を第2ゼロ設定部17に出力する。   Also, the encoding mode determination unit 15 complies with a predetermined condition and forcibly sets the vector difference signal corresponding to the video invalid area to “0” during the encoding cost calculation process based on the position information pos. In this way, the control signal ctl_z2 is set. The encoding mode determination unit 15 outputs the control signal ctl_z <b> 2 to the second zero setting unit 17.

また、符号化モード判定部15は、コスト算出部3から出力される情報costと、位置情報posとに基づいて、処理対象マクロブロックについて、インター予測を適用するのか、あるいは、イントラ予測を適用するのかを決定する。
(1)インター予測を適用すると判定された場合、符号化モード判定部15は、インター予測部11に、インター予測処理を実行させるための制御信号ctl1を生成し、当該制御信号ctl1をインター予測部11に出力する。
(2)イントラ予測を適用すると判定された場合、符号化モード判定部15は、イントラ予測部12に、イントラ予測処理を実行させるための制御信号ctl2を生成し、当該制御信号ctl2をイントラ予測部12に出力する。
In addition, the encoding mode determination unit 15 applies inter prediction or applies intra prediction to the processing target macroblock based on the information cost output from the cost calculation unit 3 and the position information pos. To decide.
(1) When it is determined that the inter prediction is applied, the encoding mode determination unit 15 generates the control signal ctl1 for causing the inter prediction unit 11 to execute the inter prediction process, and uses the control signal ctl1 as the inter prediction unit. 11 is output.
(2) When it is determined that intra prediction is to be applied, the encoding mode determination unit 15 generates a control signal ctl2 for causing the intra prediction unit 12 to execute an intra prediction process, and uses the control signal ctl2 as an intra prediction unit. 12 is output.

また、符号化モード判定部15は、採用した予測方法(イントラ予測/インター予測)についての情報、イントラ予測モード、イントラ予測処理に用いたブロックサイズ、インター予測に用いたブロックサイズ(分割ブロックサイズ、マクロブロック・パーティション)、サブマクロブロック・パーティションについての情報等を、情報Info_modeとして、可変長符号化部6に出力する。   The encoding mode determination unit 15 also includes information on the employed prediction method (intra prediction / inter prediction), the intra prediction mode, the block size used for the intra prediction process, and the block size used for the inter prediction (divided block size, Macroblock / partition), sub-macroblock / partition information and the like are output to the variable-length encoding unit 6 as information Info_mode.

動きベクトル処理部16は、位置情報取得部13から出力される位置情報posと、インター予測部11から出力される動きベクトル情報MVとを入力する。動きベクトル処理部16は、処理対象ブロックの周辺のブロックの動きベクトルについての情報を記憶するメモリ(不図示)を有している。動きベクトル処理部16は、処理対象ブロックの予測動きベクトルpMVを、例えば、H.264規格に準拠した方法により、処理対象ブロックの周辺の動きベクトルを用いて取得する。そして、動きベクトル処理部16は、取得した予測動きベクトルpMVと、インター予測部11により取得された動きベクトルMVとの差分をとることにより、動きベクトル差分信号diff_MVを取得する。そして、動きベクトル処理部16は、取得した動きベクトル差分信号diff_MVを第2ゼロ設定部17に出力する。また、動きベクトル処理部16は、インター予測部11での動きベクトルの探索処理の初期ベクトル用として、予測動きベクトルpMV(予測動きベクトルに関する情報)をインター予測部11に出力する。   The motion vector processing unit 16 receives the position information pos output from the position information acquisition unit 13 and the motion vector information MV output from the inter prediction unit 11. The motion vector processing unit 16 includes a memory (not shown) that stores information on motion vectors of blocks around the processing target block. The motion vector processing unit 16 calculates the predicted motion vector pMV of the processing target block, for example, H.264. It is acquired by using a motion vector around the block to be processed by a method based on the H.264 standard. Then, the motion vector processing unit 16 obtains the motion vector difference signal diff_MV by taking the difference between the obtained predicted motion vector pMV and the motion vector MV obtained by the inter prediction unit 11. Then, the motion vector processing unit 16 outputs the acquired motion vector difference signal diff_MV to the second zero setting unit 17. Further, the motion vector processing unit 16 outputs a predicted motion vector pMV (information on the predicted motion vector) to the inter prediction unit 11 as an initial vector for the motion vector search processing in the inter prediction unit 11.

第2ゼロ設定部17は、動きベクトル処理部16から出力される動きベクトル差分信号diff_MVと、符号化モード判定部15から出力される制御信号ctl_z2とを入力する。第2ゼロ設定部17は、制御信号ctl_z2に基づいて、
第2ゼロ設定部17は、制御信号ctl_z2に基づいて、動きベクトル差分信号diff_MVまたは動きベクトル差分信号diff_MVの信号値を強制的に「0」にした信号のいずれかを選択し、動きベクトル差分信号diff1_MVとして、コスト算出部3および可変長符号化部6に出力する。なお、第2ゼロ設定部17は、図1に示すように、例えば、セレクタsel2を用いて実現される。
The second zero setting unit 17 receives the motion vector difference signal diff_MV output from the motion vector processing unit 16 and the control signal ctl_z2 output from the encoding mode determination unit 15. The second zero setting unit 17 is based on the control signal ctl_z2.
The second zero setting unit 17 selects either the motion vector difference signal diff_MV or the signal in which the signal value of the motion vector difference signal diff_MV is forcibly set to “0” based on the control signal ctl_z2, and the motion vector difference signal As diff1_MV, it outputs to the cost calculation part 3 and the variable length encoding part 6. Note that the second zero setting unit 17 is realized by using, for example, a selector sel2 as shown in FIG.

可変長符号化部6は、量子化部5から出力される信号を入力する。また、符号化モード判定部15から出力される情報Info_modeと、第2ゼロ設定部17から出力される動きベクトル差分信号diff1_MVとを入力する。可変長符号化部6は、量子化部5から出力される信号と、情報Info_modeと、動きベクトル差分信号diff1_MVとに対して可変長符号化処理を実行し、動画像符号化信号Doutを取得し、取得した動画像符号化信号Doutを出力する。   The variable length coding unit 6 receives the signal output from the quantization unit 5. Also, the information Info_mode output from the encoding mode determination unit 15 and the motion vector difference signal diff1_MV output from the second zero setting unit 17 are input. The variable length coding unit 6 performs variable length coding processing on the signal output from the quantization unit 5, the information Info_mode, and the motion vector difference signal diff1_MV, and acquires the moving image coded signal Dout. The obtained moving image encoded signal Dout is output.

<1.2:動画像符号化装置の動作>
以上のように構成された動画像符号化装置1000の動作について、以下、説明する。
<1.2: Operation of Video Encoding Device>
The operation of the moving picture coding apparatus 1000 configured as described above will be described below.

(1.2.1:下半分に無効領域を含むマクロブロック(パターン1)の処理)
まず、図2に示すマクロブロックの処理について、説明する。
(1.2.1: Processing of macroblock (pattern 1) including invalid area in lower half)
First, the processing of the macroblock shown in FIG. 2 will be described.

図2は、1フレームの表示画像サイズが1920画素×1080画素である映像信号に対して、16画素×16画素のマクロブロックを用いた動画像符号化処理を実行するために生成された1920画素×1088画素の画像サイズを有する映像信号の一部(1073ライン〜1088ラインにおいて、水平方向の1番目の画素から第32番目までの画素に相当する画像領域)を模式的に示した図である。   FIG. 2 shows 1920 pixels generated in order to execute a moving image encoding process using a macro block of 16 pixels × 16 pixels on a video signal whose display image size of one frame is 1920 pixels × 1080 pixels. FIG. 6 is a diagram schematically showing a part of a video signal having an image size of × 1088 pixels (image areas corresponding to pixels from the first pixel to the 32nd pixel in the horizontal direction in 1073 lines to 1088 lines). .

以下では、説明便宜のため、動画像符号化装置1000が、図2に示したマクロブロックMB1を処理対象マクロブロックとして、処理する場合について、説明する。   Hereinafter, for convenience of explanation, a case will be described in which the video encoding apparatus 1000 processes the macro block MB1 illustrated in FIG. 2 as a processing target macro block.

図2から分かるようにマクロブロックMB1は、16画素×16画素(以下、「N画素×M画素」(N,M:自然数)を「N×M」と表記する。)のマクロブロックであり、上半分の16画素×8画素の領域が有効領域(映像有効領域)であり、下半分の16画素×8画素の領域が無効領域(映像無効領域)である。図2に無地で示した領域が有効領域であり、ハッチングを付した領域が無効領域である(以下同様)。   As can be seen from FIG. 2, the macro block MB1 is a macro block of 16 pixels × 16 pixels (hereinafter, “N pixels × M pixels” (N, M: natural numbers) are expressed as “N × M”). The upper half area of 16 pixels × 8 pixels is an effective area (video effective area), and the lower half area of 16 pixels × 8 pixels is an invalid area (video invalid area). A region indicated by a solid color in FIG. 2 is an effective region, and a hatched region is an invalid region (the same applies hereinafter).

位置情報取得部13は、図2に示すように、1081ライン目から1088ライン目までの領域が無効領域(映像無効領域)であることを特定するための情報Info_areaを入力する。   As shown in FIG. 2, the position information acquisition unit 13 inputs information Info_area for specifying that the area from the 1081st line to the 1088th line is an invalid area (video invalid area).

位置情報取得部13は、情報Info_areaに基づいて、処理対象中のマクロブロックMB1が、下半分の領域に無効領域を有することを示す情報を取得し、当該情報と上記情報Info_areaを含む位置情報posとして、インター予測部11と、イントラ予測部12と、動きベクトル処理部16とに出力する。   Based on the information Info_area, the position information acquisition unit 13 acquires information indicating that the macro block MB1 being processed has an invalid area in the lower half of the area, and the position information pos including the information and the information Info_area Are output to the inter prediction unit 11, the intra prediction unit 12, and the motion vector processing unit 16.

動画像符号化装置1000では、符号化コストの算出処理が実行される。具体的には、以下の(A)に示した処理により、インター予測処理による符号化コストの算出処理が実行され、以下の(B)に示した処理により、イントラ予測処理による符号化コストの算出処理が実行される。   In the moving image encoding apparatus 1000, encoding cost calculation processing is executed. Specifically, the encoding cost calculation process by the inter prediction process is executed by the process shown in (A) below, and the encoding cost calculation by the intra prediction process is executed by the process shown in (B) below. Processing is executed.

(A)インター予測処理による符号化コストの算出処理:
(A1)インター予測部11は、H.264規格に規定されている分割方法により分割されたブロック(分割ブロック(マクロブロック・パーティション))ごとにインター予測処理を実行する。マクロブロックMB1の場合、マクロブロックの上半分が有効領域であるので、符号化モード判定部15は、インター予測部11に対して、制御信号ctl1により、動き推定(ME:Motion Estimation)および動き補償(MC:Motion Compensation)の処理対象を、マクロブロックMB1の上半分の領域に設定し、動き推定(ME)および動き補償(MC)ための分割ブロックを16×8、8×8(サブマクロブロック・パーティションあり)、8×8(サブマクロブロック・パーティションなし)に設定し、それぞれの場合について、動き推定(ME)および動き補償(MC)を実行し、マクロブロックMB1の上半分の領域についてのインター予測信号を取得する。そして、インター予測部11は、インター予測信号を符号化モード判定部15に出力する。なお、マクロブロックMB1の下半分の領域は、無効領域であるので、動き推定(ME)および動き補償(MC)の対象とはせず、マクロブロックMB1の下半分の領域についての動き推定(ME)および動き補償(MC)は、実行されない。
(A2)符号化モード判定部15は、マクロブロックMB1の下半分の領域の画素についての予測誤差信号diff1が「0」となるように制御信号ctl_z1(図1の場合、信号値を「1」とする制御信号ctl_z1)を生成し、第1ゼロ設定部2に出力する。
(A3)符号化モード判定部15は、マクロブロックMB1の上半分の領域について、インター予測部11により取得されたインター予測信号を、予測信号Dpとして、減算器1に出力する。減算器1は、動画像信号Din(マクロブロックMB1に相当する動画像信号Din)から、予測信号Dpを減算し、予測誤差信号diffを生成し、第1ゼロ設定部2に出力する。
(A4)第1ゼロ設定部2は、符号化モード判定部15からの制御信号ctl_z1に従い、マクロブロックMB1の上半分の領域については、減算器1から出力される予測誤差信号diffを予測誤差信号diff1として、コスト算出部3に出力し、マクロブロックMB1の下半分については、予測誤差信号diff1の信号値を強制的に「0」にして、コスト算出部3に出力する。なお、図1の場合、第1ゼロ設定部2に入力される制御信号ctl_z1の信号値は、符号化モード判定部15により、マクロブロックMB1の上半分の領域についての処理が実行されるときは、「0」に設定され、マクロブロックMB1の下半分の領域についての処理が実行されるときは、「1」に設定される。
(A5)また、インター予測部11は、動き推定(ME)により、上記で設定された分割ブロック(分割方法)ごとに取得した動きベクトルMVを動きベクトル処理部16に出力する。動きベクトル処理部16は、H.264規格に準拠した方法により、処理対象ブロックの周辺の動きベクトルを用いて、分割ブロックの予測動きベクトルを取得し、インター予測部11から出力された動きベクトルと、取得した予測動きベクトルとの差分をとることにより、動きベクトル差分信号diff_MVを取得する。そして、取得された動きベクトル差分信号diff_MVは、第2ゼロ設定部17に出力される。
(A6)第2ゼロ設定部17は、符号化モード判定部15からの制御信号ctl_z2に従い、マクロブロックMB1の上半分の領域については、動きベクトル処理部16から出力される動きベクトル差分信号diff_MVを動きベクトル差分信号diff1_MVとして、コスト算出部3に出力し、マクロブロックMB1の下半分については、動きベクトル差分信号diff1_MVの信号値を強制的に「0」にして、コスト算出部3に出力する。なお、図1の場合、第2ゼロ設定部17に入力される制御信号ctl_z2の信号値は、符号化モード判定部15により、マクロブロックMB1の上半分の領域についての処理が実行されるときは、「0」に設定され、マクロブロックMB1の下半分の領域についての処理が実行されるときは、「1」に設定される。
(A7)コスト算出部3は、分割ブロックごとに、上記により取得された予測誤差信号diff1と、動きベクトル差分信号diff1_MVとを用いて符号化コストが算出する。なお、マクロブロックMB1の下半分の領域(無効領域)における予測誤差信号diff1および動きベクトル差分信号diff1_MVは、その信号値が全て「0」であるので、コスト算出部3は、マクロブロックMB1の上半分の領域(有効領域)についてのみ符号化コストを算出するようにしてもよい。
(A) Coding cost calculation processing by inter prediction processing:
(A1) The inter-prediction unit 11 The inter prediction process is executed for each block (divided block (macroblock partition)) divided by the division method defined in the H.264 standard. In the case of the macro block MB1, since the upper half of the macro block is an effective region, the encoding mode determination unit 15 performs motion estimation (ME) and motion compensation to the inter prediction unit 11 based on the control signal ctl1. The processing target of (MC: Motion Compensation) is set in the upper half area of the macroblock MB1, and the divided blocks for motion estimation (ME) and motion compensation (MC) are 16 × 8, 8 × 8 (sub macroblocks). Set to 8 × 8 (no sub-macroblock / partition), and in each case, motion estimation (ME) and motion compensation (MC) are performed, and the upper half region of macroblock MB1 is Obtain an inter prediction signal. Then, the inter prediction unit 11 outputs the inter prediction signal to the coding mode determination unit 15. Since the lower half area of the macroblock MB1 is an invalid area, it is not targeted for motion estimation (ME) and motion compensation (MC), and motion estimation (ME) for the lower half area of the macroblock MB1 is performed. ) And motion compensation (MC) are not performed.
(A2) The encoding mode determination unit 15 controls the control signal ctl_z1 (in the case of FIG. 1, the signal value is “1”) so that the prediction error signal diff1 for the pixels in the lower half region of the macroblock MB1 is “0”. The control signal ctl_z1) is generated and output to the first zero setting unit 2.
(A3) The encoding mode determination unit 15 outputs the inter prediction signal acquired by the inter prediction unit 11 for the upper half region of the macroblock MB1 to the subtracter 1 as the prediction signal Dp. The subtracter 1 subtracts the prediction signal Dp from the moving image signal Din (moving image signal Din corresponding to the macroblock MB1), generates a prediction error signal diff, and outputs the prediction error signal diff to the first zero setting unit 2.
(A4) The first zero setting unit 2 applies the prediction error signal diff output from the subtractor 1 to the prediction error signal for the upper half region of the macroblock MB1 according to the control signal ctl_z1 from the coding mode determination unit 15. diff1 is output to the cost calculation unit 3, and the signal value of the prediction error signal diff1 is forcibly set to “0” for the lower half of the macroblock MB1 and output to the cost calculation unit 3. In the case of FIG. 1, the signal value of the control signal ctl_z1 input to the first zero setting unit 2 is obtained when the encoding mode determination unit 15 executes processing for the upper half area of the macroblock MB1. , “0” is set to “1” when the process for the lower half of the macroblock MB1 is executed.
(A5) Also, the inter prediction unit 11 outputs the motion vector MV acquired for each of the divided blocks (division method) set as described above to the motion vector processing unit 16 by motion estimation (ME). The motion vector processing unit 16 is an H.264 driver. The predicted motion vector of the divided block is acquired using the motion vector around the processing target block by a method based on the H.264 standard, and the difference between the motion vector output from the inter prediction unit 11 and the acquired predicted motion vector To obtain the motion vector difference signal diff_MV. The acquired motion vector difference signal diff_MV is output to the second zero setting unit 17.
(A6) The second zero setting unit 17 uses the motion vector difference signal diff_MV output from the motion vector processing unit 16 for the upper half area of the macroblock MB1 in accordance with the control signal ctl_z2 from the coding mode determination unit 15. The motion vector difference signal diff1_MV is output to the cost calculation unit 3. For the lower half of the macroblock MB1, the signal value of the motion vector difference signal diff1_MV is forcibly set to “0” and output to the cost calculation unit 3. In the case of FIG. 1, the signal value of the control signal ctl_z2 input to the second zero setting unit 17 is obtained when the encoding mode determination unit 15 executes processing for the upper half area of the macroblock MB1. , “0” is set to “1” when the process for the lower half of the macroblock MB1 is executed.
(A7) The cost calculation unit 3 calculates the encoding cost for each divided block using the prediction error signal diff1 obtained as described above and the motion vector difference signal diff1_MV. Note that since the signal values of the prediction error signal diff1 and the motion vector difference signal diff1_MV in the lower half area (invalid area) of the macroblock MB1 are all “0”, the cost calculation unit 3 performs the above operation on the macroblock MB1. The coding cost may be calculated only for a half region (effective region).

(B)イントラ予測処理による符号化コストの算出処理:
(B1)イントラ予測部12は、H.264規格に規定されているイントラ予測用のブロックサイズごとにインター予測処理を実行する。なお、直交変換のブロックサイズが4×4のとき、イントラ予測用のブロックサイズは、4×4または16×16であり、直交変換のブロックサイズが8×8のとき、イントラ予測用のブロックサイズは、8×8である。
(B) Coding cost calculation processing by intra prediction processing:
(B1) The intra prediction unit 12 The inter prediction process is executed for each block size for intra prediction defined in the H.264 standard. When the orthogonal transform block size is 4 × 4, the intra prediction block size is 4 × 4 or 16 × 16, and when the orthogonal transform block size is 8 × 8, the intra prediction block size is 4 × 4. Is 8 × 8.

マクロブロックMB1の場合、マクロブロックの上半分が有効領域であるので、符号化モード判定部15は、イントラ予測部12に対して、制御信号ctl2により、イントラ予測用のブロックサイズおよびイントラ予測モードを設定する。イントラ予測部12は、設定されたイントラ予測モードで、イントラ予測処理を実行し、イントラ予測信号を取得し、符号化モード判定部15に出力する。これを、イントラ予測用のブロックサイズの種別、および、イントラ予測モードの種別ごとに行う。
(B2)符号化モード判定部15は、マクロブロックMB1の下半分の領域の画素についての予測誤差信号diff1が「0」となるように制御信号ctl_z1(図1の場合、信号値を「1」とする制御信号ctl_z1)を生成し、第1ゼロ設定部2に出力する。
(B3)符号化モード判定部15は、マクロブロックMB1の上半分の領域について、イントラ予測部12により取得されたイントラ予測信号を、予測信号Dpとして、減算器1に出力する。減算器1は、動画像信号Din(マクロブロックMB1に相当する動画像信号Din)から、予測信号Dpを減算し、予測誤差信号diffを生成し、第1ゼロ設定部2に出力する。
(B4)第1ゼロ設定部2は、符号化モード判定部15からの制御信号ctl_z1に従い、マクロブロックMB1の上半分の領域については、減算器1から出力される予測誤差信号diffを予測誤差信号diff1として、コスト算出部3に出力し、マクロブロックMB1の下半分については、予測誤差信号diff1の信号値を強制的に「0」にして、コスト算出部3に出力する。なお、図1の場合、第1ゼロ設定部2に入力される制御信号ctl_z1の信号値は、符号化モード判定部15により、マクロブロックMB1の上半分の領域についての処理が実行されるときは、「0」に設定され、マクロブロックMB1の下半分の領域についての処理が実行されるときは、「1」に設定される。
(B5)コスト算出部3は、イントラ予測用のブロックサイズの種別、および、イントラ予測モードの種別ごと、上記により取得された予測誤差信号diff1を用いて符号化コストが算出する。なお、マクロブロックMB1の下半分の領域(無効領域)における予測誤差信号diff1は、その信号値が全て「0」であるので、コスト算出部3は、マクロブロックMB1の上半分の領域(有効領域)についてのみ符号化コストを算出するようにしてもよい。
In the case of the macro block MB1, since the upper half of the macro block is an effective area, the encoding mode determination unit 15 sets the block size for intra prediction and the intra prediction mode to the intra prediction unit 12 using the control signal ctl2. Set. The intra prediction unit 12 performs an intra prediction process in the set intra prediction mode, acquires an intra prediction signal, and outputs the intra prediction signal to the encoding mode determination unit 15. This is performed for each type of block size for intra prediction and each type of intra prediction mode.
(B2) The encoding mode determination unit 15 controls the control signal ctl_z1 (in the case of FIG. 1, the signal value is “1”) so that the prediction error signal diff1 for the pixels in the lower half region of the macroblock MB1 is “0”. The control signal ctl_z1) is generated and output to the first zero setting unit 2.
(B3) The encoding mode determination unit 15 outputs the intra prediction signal acquired by the intra prediction unit 12 for the upper half region of the macroblock MB1 to the subtracter 1 as the prediction signal Dp. The subtracter 1 subtracts the prediction signal Dp from the moving image signal Din (moving image signal Din corresponding to the macroblock MB1), generates a prediction error signal diff, and outputs the prediction error signal diff to the first zero setting unit 2.
(B4) The first zero setting unit 2 uses the prediction error signal diff output from the subtractor 1 as the prediction error signal for the upper half area of the macroblock MB1 according to the control signal ctl_z1 from the coding mode determination unit 15. diff1 is output to the cost calculation unit 3, and the signal value of the prediction error signal diff1 is forcibly set to “0” for the lower half of the macroblock MB1 and output to the cost calculation unit 3. In the case of FIG. 1, the signal value of the control signal ctl_z1 input to the first zero setting unit 2 is obtained when the encoding mode determination unit 15 executes processing for the upper half area of the macroblock MB1. , “0” is set to “1” when the process for the lower half of the macroblock MB1 is executed.
(B5) The cost calculation unit 3 calculates the encoding cost using the prediction error signal diff1 obtained as described above for each type of block size for intra prediction and each type of intra prediction mode. Note that since the prediction error signal diff1 in the lower half area (invalid area) of the macroblock MB1 has all signal values “0”, the cost calculation unit 3 uses the upper half area (effective area) of the macroblock MB1. The encoding cost may be calculated only for ().

上記処理により取得された、インター予測処理による符号化コストと、イントラ予測処理による符号化コストとに関する情報costが、コスト算出部3から符号化モード判定部15に出力される。   Information cost about the encoding cost by the inter prediction process and the encoding cost by the intra prediction process acquired by the above process is output from the cost calculation unit 3 to the encoding mode determination unit 15.

符号化モード判定部15では、コスト算出部3により取得された符号化コストに関する情報costに基づいて、マクロブロックMB1に対して、インター予測処理を行うのか、それとも、イントラ予測処理を行うのかを決定する。つまり、符号化モード判定部15は、最小の符号化コストとなる予測処理を、インター予測部11、または、イントラ予測部12に実行させるための制御信号ctl1、または、制御信号ctl2を生成する。   The coding mode determination unit 15 determines whether to perform the inter prediction process or the intra prediction process on the macroblock MB1 based on the information cost related to the coding cost acquired by the cost calculation unit 3. To do. That is, the encoding mode determination unit 15 generates the control signal ctl1 or the control signal ctl2 for causing the inter prediction unit 11 or the intra prediction unit 12 to execute the prediction process that provides the minimum encoding cost.

≪A:インター予測処理≫
まず、符号化コストが最小であると判定されたのが、インター予測処理である場合について、場合分けをして、以下、説明する。
≪A: Inter prediction process≫
First, the case where it is determined that the coding cost is the minimum is an inter prediction process will be described below.

≪A1:分割ブロックが16×8の場合(インター予測処理)≫
分割ブロックを16×8としたときのインター予測処理の符号化コストが最小である場合(これを「パターンA1」の場合という。)、符号化モード判定部15は、インター予測部11に制御信号ctl1を出力し、インター予測部11に分割ブロックを16×8として、マクロブロックMB1の上半分の領域(有効領域)について、動き推定(ME)および動き補償(MC)を実行するように制御する。
<< A1: When the divided block is 16 × 8 (inter prediction process) >>
When the coding cost of the inter prediction process when the divided block is 16 × 8 is the minimum (this is referred to as “pattern A1”), the coding mode determination unit 15 sends a control signal to the inter prediction unit 11. ctl1 is output, and the inter prediction unit 11 is controlled to perform motion estimation (ME) and motion compensation (MC) on the upper half area (effective area) of the macroblock MB1 by setting the divided block to 16 × 8. .

インター予測部11は、符号化モード判定部15からの制御信号ctl1に従い、マクロブロックMB1の上半分の領域(有効領域)について、動き推定(ME)および動き補償(MC)を実行する。なお、処理対象ブロックであるマクロブロックMB1の上半分の16×8のブロックを「注目分割ブロック」という。   The inter prediction unit 11 performs motion estimation (ME) and motion compensation (MC) for the upper half region (effective region) of the macroblock MB1 in accordance with the control signal ctl1 from the coding mode determination unit 15. Note that the upper half 16 × 8 block of the macroblock MB1 that is the processing target block is referred to as a “target divided block”.

また、インター予測部11は、記憶部10から入力された参照画像と、動き推定(ME)処理で取得した動きベクトルMVとに基づいて、動き補償(MC)を実行することで、注目分割ブロックについてのインター予測信号を取得し、符号化モード判定部15に出力する。   In addition, the inter prediction unit 11 performs motion compensation (MC) on the basis of the reference image input from the storage unit 10 and the motion vector MV acquired by the motion estimation (ME) process. The inter prediction signal is acquired and output to the encoding mode determination unit 15.

符号化モード判定部15は、注目分割ブロックが16×8であり、マクロブロックMB1の下半分の領域(16×8の領域)が無効領域であるので、動き補償(MC)のブロックサイズを16×16に設定する。さらに、符号化モード判定部15は、マクロブロックMB1の動きベクトルを、インター予測部11が、注目分割ブロック(マクロブロックMB1の上半分の領域(16×8の領域))を処理対象として取得した動きベクトルMVとする。この処理について、図3を用いて、説明する。   The encoding mode determination unit 15 sets the block size of motion compensation (MC) to 16 because the target divided block is 16 × 8 and the lower half area (16 × 8 area) of the macroblock MB1 is an invalid area. Set to x16. Furthermore, the encoding mode determination unit 15 acquires the motion vector of the macroblock MB1, and the inter prediction unit 11 acquires the target divided block (the upper half area (16 × 8 area) of the macroblock MB1) as a processing target. Let it be a motion vector MV. This process will be described with reference to FIG.

図3は、処理対象マクロブロックMB1の上半分(注目分割ブロックが16×8)が有効領域である場合において、決定される動き補償(MC)のブロックサイズと、動きベクトルについて説明するための図である。なお、図3において、有効領域を無地(白地)の領域として、無効領域をハッチングを付した領域として示している(以下、同様)。   FIG. 3 is a diagram for explaining the motion compensation (MC) block size and motion vector determined when the upper half of the processing target macroblock MB1 (the target divided block is 16 × 8) is an effective region. It is. In FIG. 3, the effective area is shown as a plain (white) area, and the invalid area is shown as a hatched area (the same applies hereinafter).

上記の場合、図3の左図に示すように、注目分割ブロックDB1(マクロブロックMB1の上半分の領域)について、動き推定により算出された動きベクトルを動きベクトルMV1とすると、インター予測部11は、マクロブロックMB1の上半分(16×8の領域)を、参照画像において、動きベクトルMV1が示す先に存在する画像領域として、インター予測信号を生成する。なお、マクロブロックの下半分(16×8の領域)の無効領域については、動きベクトルの探索処理も、動き補償(MC)処理も実行されない。   In the above case, as shown in the left diagram of FIG. 3, if the motion vector calculated by motion estimation is the motion vector MV1 for the target divided block DB1 (the upper half region of the macroblock MB1), the inter prediction unit 11 The inter prediction signal is generated using the upper half (16 × 8 region) of the macro block MB1 as the image region existing earlier in the reference image indicated by the motion vector MV1. Note that neither the motion vector search process nor the motion compensation (MC) process is executed for the invalid area in the lower half (16 × 8 area) of the macroblock.

符号化モード判定部15は、上記のようにして取得されたインター予測信号、および、注目分割ブロック(有効領域)の動きベクトルMV1に基づいて、マクロブロックMB1の動き補償のブロックサイズを16×16に設定し、当該16×16のブロックの動きベクトルをMV1として、予測信号Dpを生成し、減算器1に出力する。また、符号化モード判定部15は、マクロブロックMB1の動き補償のブロックサイズが16×16であることと、マクロブロックMB1に対してインター予測処理が実行されたことを示す情報を情報Info_modeとして、可変長符号化部6に出力する。   The encoding mode determination unit 15 sets the motion compensation block size of the macroblock MB1 to 16 × 16 based on the inter prediction signal obtained as described above and the motion vector MV1 of the target divided block (effective region). The motion vector of the 16 × 16 block is set as MV1, and a prediction signal Dp is generated and output to the subtracter 1. Also, the coding mode determination unit 15 uses information indicating that the block size for motion compensation of the macroblock MB1 is 16 × 16 and that the inter prediction process has been performed on the macroblock MB1 as information Info_mode. The data is output to the variable length coding unit 6.

また、符号化モード判定部15は、無効領域に相当する予測誤差信号diffの信号値が強制的に「0」となるように制御信号ctl_z1を生成し、第1ゼロ設定部2に出力する。   Also, the encoding mode determination unit 15 generates the control signal ctl_z1 so that the signal value of the prediction error signal diff corresponding to the invalid region becomes “0”, and outputs the control signal ctl_z1 to the first zero setting unit 2.

減算器1は、マクロブロックMB1に相当する動画像信号Dinから、符号化モード判定部15から入力された予測信号Dpを減算し取得した予測誤差信号diffを、第1ゼロ設定部2に出力する。   The subtracter 1 outputs the prediction error signal diff obtained by subtracting the prediction signal Dp input from the encoding mode determination unit 15 from the moving image signal Din corresponding to the macroblock MB1 to the first zero setting unit 2. .

第1ゼロ設定部2は、マクロブロックMB1の上半分の16×8の領域(有効領域)に相当する予測誤差信号diffが入力された場合は、符号化モード判定部15からの制御信号ctl_z1に従い、入力された予測誤差信号diffを、そのまま、予測誤差信号diff1として、直交変換部4に出力する。一方、第1ゼロ設定部2は、マクロブロックMB1の下半分(無効領域)の16×8の領域に相当する予測誤差信号diffが入力された場合は、符号化モード判定部15からの制御信号ctl_z1に従い、その信号値を強制的に「0」にし、予測誤差信号diff1として、直交変換部4に出力する。   When the prediction error signal diff corresponding to the upper half 16 × 8 region (effective region) of the macroblock MB1 is input, the first zero setting unit 2 follows the control signal ctl_z1 from the coding mode determination unit 15 The input prediction error signal diff is output to the orthogonal transform unit 4 as it is as the prediction error signal diff1. On the other hand, when the prediction error signal diff corresponding to the 16 × 8 region of the lower half (invalid region) of the macroblock MB1 is input, the first zero setting unit 2 receives the control signal from the coding mode determination unit 15 The signal value is forcibly set to “0” in accordance with ctl_z1, and is output to the orthogonal transform unit 4 as the prediction error signal diff1.

直交変換部4では、予測誤差信号diff1に対して、直交変換処理を実行し、直交変換後の信号が量子化部5に出力される。   The orthogonal transform unit 4 performs orthogonal transform processing on the prediction error signal diff1 and outputs a signal after the orthogonal transform to the quantization unit 5.

量子化部5は、直交変換部4から入力される信号に対して量子化処理を実行し、量子化処理後の信号を可変長符号化部6に出力する。   The quantization unit 5 performs a quantization process on the signal input from the orthogonal transform unit 4, and outputs the quantized signal to the variable length coding unit 6.

また、インター予測部11は、上記により取得された動きベクトルMV1を動きベクトル処理部16に出力する。   Further, the inter prediction unit 11 outputs the motion vector MV1 acquired as described above to the motion vector processing unit 16.

動きベクトル処理部16は、インター予測部11から入力された動きベクトルMV1と、注目分割ブロックの周辺から取得した予測動きベクトルpMVとの差分をとり、動きベクトル差分信号diff_MVを第2ゼロ設定部17に出力する。第2ゼロ設定部17は、動きベクトル処理部16から入力した動きベクトル差分信号diff_MVを、マクロブロックMB1用の動きベクトル差分信号diff1_MVとして、可変長符号化部6に出力する。   The motion vector processing unit 16 calculates the difference between the motion vector MV1 input from the inter prediction unit 11 and the predicted motion vector pMV acquired from the periphery of the target divided block, and uses the motion vector difference signal diff_MV as the second zero setting unit 17. Output to. The second zero setting unit 17 outputs the motion vector difference signal diff_MV input from the motion vector processing unit 16 to the variable length encoding unit 6 as the motion vector difference signal diff1_MV for the macroblock MB1.

可変長符号化部6は、量子化部5から入力された信号に対して可変長符号化処理を実行する。   The variable length encoding unit 6 performs variable length encoding processing on the signal input from the quantization unit 5.

また、可変長符号化部6は、符号化モード判定部15から入力されたマクロブロックMB1の動き補償のブロックサイズが16×16であることと、マクロブロックMB1に対してインター予測処理が実行されたことを示す情報Info_modeと、第2ゼロ設定部17から入力されたマクロブロックMB1用の動きベクトル差分信号diff1_MVとに対して、可変長符号化処理を実行する。   In addition, the variable length encoding unit 6 performs the inter prediction process on the macroblock MB1 that the macroblock MB1 input from the encoding mode determination unit 15 has a motion compensation block size of 16 × 16. The variable length coding process is performed on the information Info_mode indicating that this has occurred and the motion vector difference signal diff1_MV for the macroblock MB1 input from the second zero setting unit 17.

可変長符号化部6は、上記のように、量子化信号、各種情報(モード情報等)、および、差分ベクトル信号に対して、可変長符号化処理を実行して取得した信号を、マクロブロックMB1に対する動画像符号化信号Doutとして、出力する。   As described above, the variable-length encoding unit 6 performs a macroblock on a signal obtained by performing variable-length encoding processing on the quantized signal, various information (mode information, etc.), and the difference vector signal. It outputs as the moving image encoding signal Dout with respect to MB1.

このように、動画像符号化装置1000では、有効領域のみを用いて、動き推定処理、動き補償処理を実行するので、無効領域の影響を受けることなく、精度の良い動き推定処理、動き補償処理を実行することができるので、それにより取得される動きベクトルの精度も高い。また、動画像符号化装置1000では、無効領域における予測誤差信号を強制的に「0」にするので、無効領域に対する符号量の発生を顕著に抑制することができる。また、無効領域についての動き推定処理(動きベクトル探索処理)、動き補償処理を実行することがないので、演算量の増加も抑制することができる。   As described above, since the moving picture coding apparatus 1000 executes the motion estimation process and the motion compensation process using only the effective area, the motion estimation process and the motion compensation process with high accuracy without being affected by the invalid area. Therefore, the accuracy of the motion vector acquired thereby is also high. Further, in the moving picture coding apparatus 1000, the prediction error signal in the invalid area is forcibly set to “0”, so that the generation of the code amount for the invalid area can be remarkably suppressed. In addition, since the motion estimation processing (motion vector search processing) and motion compensation processing for the invalid area are not executed, an increase in the amount of computation can be suppressed.

≪A2:分割ブロックが8×8であり、かつ、サブブロック(サブマクロブロック・パーティション)がない場合(インター予測処理)≫
分割ブロックを8×8とし、かつ、サブブロックなしにしたときのインター予測処理の符号化コストが最小である場合(これを「パターンA2」の場合という。)、符号化モード判定部15は、インター予測部11に制御信号ctl1を出力し、インター予測部11に分割ブロックを8×8として、マクロブロックMB1の上半分の2つの領域(有効領域)について、動き推定(ME)および動き補償(MC)を実行するように制御する。
<< A2: When the divided block is 8 × 8 and there is no sub-block (sub-macroblock / partition) (inter prediction process) >>
When the coding cost of the inter prediction process when the divided block is 8 × 8 and no sub-block is minimum (this is referred to as “pattern A2”), the coding mode determination unit 15 The control signal ctl1 is output to the inter prediction unit 11, the divided block is set to 8 × 8 to the inter prediction unit 11, and motion estimation (ME) and motion compensation (for the upper half of the macroblock MB1 (effective region)) ( MC) is executed.

図4は、パターンA2の場合の処理を説明するための図である。   FIG. 4 is a diagram for explaining processing in the case of the pattern A2.

インター予測部11は、符号化モード判定部15からの制御信号ctl1に従い、マクロブロックMB1の上半分の領域(有効領域)について、動き推定(ME)および動き補償(MC)を実行する。具体的には、インター予測部11は、処理対象ブロックであるマクロブロックMB1の上半分の2つの8×8のブロックについての予測動きベクトルpMV(注目分割ブロックの周辺のブロックから求めた予測動きベクトル)を動きベクトル処理部16から取得する。以下では、図4の左図に示すように、2つの8×8ブロックのうち左側の分割ブロック(8×8ブロック)を分割ブロックDB11とし、右側の分割ブロック(8×8ブロック)を分割ブロックDB12とする。   The inter prediction unit 11 performs motion estimation (ME) and motion compensation (MC) for the upper half region (effective region) of the macroblock MB1 in accordance with the control signal ctl1 from the coding mode determination unit 15. Specifically, the inter prediction unit 11 predicts motion vectors pMV (predicted motion vectors obtained from the blocks around the target divided block) for the upper half of the 8 × 8 blocks in the upper half of the macroblock MB1 that is the processing target block. ) Is acquired from the motion vector processing unit 16. In the following, as shown in the left diagram of FIG. 4, the left divided block (8 × 8 block) of the two 8 × 8 blocks is referred to as a divided block DB 11 and the right divided block (8 × 8 block) is divided into blocks. Let it be DB12.

なお、説明便宜のため、分割ブロックDB11が注目分割ブロック(処理対象分割ブロック)である場合について、以下、説明する。   For convenience of explanation, a case where the divided block DB 11 is a target divided block (processing target divided block) will be described below.

インター予測部11は、分割ブロックDB11についての動き推定処理(ME)により注目分割ブロックDB11の動きベクトルMV11を取得する。インター予測部11は、取得した動きベクトルMV11を動きベクトル処理部16に出力する。   The inter prediction unit 11 acquires the motion vector MV11 of the target divided block DB11 by the motion estimation process (ME) for the divided block DB11. The inter prediction unit 11 outputs the acquired motion vector MV11 to the motion vector processing unit 16.

また、インター予測部11は、記憶部10から入力された参照画像と、取得した動きベクトルMV11とに基づいて、動き補償(MC)を実行することで、注目分割ブロックDB11についてのインター予測信号を取得し、符号化モード判定部15に出力する。   In addition, the inter prediction unit 11 performs motion compensation (MC) based on the reference image input from the storage unit 10 and the acquired motion vector MV11, thereby obtaining an inter prediction signal for the target divided block DB11. Obtained and output to the encoding mode determination unit 15.

符号化モード判定部15は、注目分割ブロックDB11が8×8であり、マクロブロックMB1の左下半分の領域(8×8の領域)が無効領域であるので、動き補償(MC)のブロックを注目分割ブロックDB11を含む8×16のブロックであるME用ブロックDB11e(図4の右図に示すME用ブロックDB11e)に設定し、さらに、ME用ブロックDB11eの動きベクトルMV11eを、インター予測部11により、注目分割ブロックDB11を処理対象として取得された動きベクトルMV11(図4の左図に示す動きベクトルMV11)とする。この処理について、図4を用いて、具体的に説明する。   The encoding mode determination unit 15 pays attention to the motion compensation (MC) block because the attention divided block DB11 is 8 × 8 and the lower left half area (8 × 8 area) of the macroblock MB1 is an invalid area. The ME block DB 11e (ME block DB 11e shown in the right figure of FIG. 4) including the divided block DB 11 is set in the ME block DB 11e, and the motion vector MV11e of the ME block DB 11e is further set by the inter prediction unit 11. The motion vector MV11 (motion vector MV11 shown in the left diagram of FIG. 4) acquired with the target divided block DB11 as a processing target is assumed. This process will be specifically described with reference to FIG.

パターンA2の場合、図4の左図に示すように、注目分割ブロックDB11について、インター予測部11は、注目分割ブロックMB11を、参照画像において、動きベクトルMV11が示す先に存在する画像領域として、インター予測信号を生成する。なお、マクロブロックの下半分(8×16の領域)の無効領域については、動きベクトルの探索処理も、動き補償(MC)処理も実行しない。   In the case of the pattern A2, as shown in the left diagram of FIG. 4, with respect to the target divided block DB11, the inter prediction unit 11 sets the target divided block MB11 as an image area existing ahead of the motion vector MV11 in the reference image. An inter prediction signal is generated. Note that neither the motion vector search process nor the motion compensation (MC) process is executed for the invalid area in the lower half (8 × 16 area) of the macroblock.

符号化モード判定部15は、上記のようにして取得されたインター予測信号、および、注目分割ブロックDB11の動きベクトルMV11に基づいて、ME用ブロックDB11eの動き補償のブロックサイズを8×16に設定し、当該8×16のブロックの動きベクトルをMV11と同じベクトルである動きベクトルMV11eとして、予測信号Dpを生成し、減算器1に出力する。また、符号化モード判定部15は、ME用ブロックDB11eの動き補償のブロックサイズが8×16であることと、ME用ブロックDB11eに対してインター予測処理が実行されたことを示す情報を情報Info_modeとして、可変長符号化部6に出力する。   The encoding mode determination unit 15 sets the motion compensation block size of the ME block DB 11e to 8 × 16 based on the inter prediction signal acquired as described above and the motion vector MV11 of the target divided block DB11. Then, the motion vector MV11e, which is the same vector as the MV11, is generated as the motion vector of the 8 × 16 block, and is output to the subtracter 1. The encoding mode determination unit 15 also receives information Info_mode indicating that the motion compensation block size of the ME block DB 11e is 8 × 16 and that the inter prediction process has been performed on the ME block DB 11e. Is output to the variable length encoding unit 6.

また、符号化モード判定部15は、無効領域に相当する予測誤差信号diffの信号値が強制的に「0」となるように制御信号ctl_z1を生成し、第1ゼロ設定部2に出力する。   Also, the encoding mode determination unit 15 generates the control signal ctl_z1 so that the signal value of the prediction error signal diff corresponding to the invalid region becomes “0”, and outputs the control signal ctl_z1 to the first zero setting unit 2.

減算器1は、ME用ブロックDB11eに相当する動画像信号Dinから、符号化モード判定部15から入力された予測信号Dpを減算し取得した予測誤差信号diffを、第1ゼロ設定部2に出力する。   The subtractor 1 outputs the prediction error signal diff obtained by subtracting the prediction signal Dp input from the encoding mode determination unit 15 from the moving image signal Din corresponding to the ME block DB11e to the first zero setting unit 2. To do.

第1ゼロ設定部2は、ME用ブロックDB11eの上半分の領域(有効領域)に相当する予測誤差信号diffが入力された場合は、符号化モード判定部15からの制御信号ctl_z1に従い、入力された予測誤差信号diffを、そのまま、予測誤差信号diff1として、直交変換部4に出力する。一方、第1ゼロ設定部2は、ME用ブロックDB11eの上半分の領域の下半分(無効領域)の領域に相当する予測誤差信号diffが入力された場合は、符号化モード判定部15からの制御信号ctl_z1に従い、その信号値を強制的に「0」にし、予測誤差信号diff1として、直交変換部4に出力する。   When the prediction error signal diff corresponding to the upper half region (effective region) of the ME block DB 11e is input, the first zero setting unit 2 is input according to the control signal ctl_z1 from the encoding mode determination unit 15 The prediction error signal diff is output as it is to the orthogonal transform unit 4 as the prediction error signal diff1. On the other hand, when the prediction error signal diff corresponding to the lower half (invalid region) of the upper half region of the ME block DB 11e is input, the first zero setting unit 2 According to the control signal ctl_z1, the signal value is forcibly set to “0”, and is output to the orthogonal transform unit 4 as the prediction error signal diff1.

直交変換部4では、予測誤差信号diff1に対して、直交変換処理を実行し、直交変換後の信号が量子化部5に出力される。   The orthogonal transform unit 4 performs orthogonal transform processing on the prediction error signal diff1 and outputs a signal after the orthogonal transform to the quantization unit 5.

量子化部5は、直交変換部4から入力される信号に対して量子化処理を実行し、量子化処理後の信号を可変長符号化部6に出力する。   The quantization unit 5 performs a quantization process on the signal input from the orthogonal transform unit 4, and outputs the quantized signal to the variable length coding unit 6.

また、インター予測部11は、上記により取得された動きベクトルMV11e(MV11と同じ動きベクトル)を動きベクトル処理部16に出力する。   Further, the inter prediction unit 11 outputs the motion vector MV11e (same motion vector as MV11) acquired as described above to the motion vector processing unit 16.

動きベクトル処理部16は、インター予測部11から入力された動きベクトルMV11e(MV11と同じ動きベクトル)と、注目分割ブロックの周辺から取得した予測動きベクトルpMVとの差分をとり、動きベクトル差分信号diff_MVを第2ゼロ設定部17に出力する。第2ゼロ設定部17は、動きベクトル処理部16から入力した動きベクトル差分信号diff_MVを、ME用ブロックDB11e用の動きベクトル差分信号diff1_MVとして、可変長符号化部6に出力する。   The motion vector processing unit 16 takes the difference between the motion vector MV11e (same motion vector as MV11) input from the inter prediction unit 11 and the predicted motion vector pMV acquired from the periphery of the target divided block, and the motion vector difference signal diff_MV Is output to the second zero setting unit 17. The second zero setting unit 17 outputs the motion vector difference signal diff_MV input from the motion vector processing unit 16 to the variable length encoding unit 6 as the motion vector difference signal diff1_MV for the ME block DB 11e.

可変長符号化部6は、量子化部5から入力された信号に対して可変長符号化処理を実行する。   The variable length encoding unit 6 performs variable length encoding processing on the signal input from the quantization unit 5.

また、可変長符号化部6は、符号化モード判定部15から入力されたME用ブロックDB11eの動き補償のブロックサイズが8×16であることと、ME用ブロックDB11eに対してインター予測処理が実行されたことを示す情報Info_modeと、第2ゼロ設定部17から入力されたME用ブロックDB11e用の動きベクトル差分信号diff1_MVとに対して、可変長符号化処理を実行する。   In addition, the variable length encoding unit 6 performs the inter prediction process on the ME block DB 11e, and the ME block DB 11e input from the encoding mode determination unit 15 has a motion compensation block size of 8 × 16. A variable length encoding process is performed on the information Info_mode indicating that the process has been executed and the motion vector difference signal diff1_MV for the ME block DB 11e input from the second zero setting unit 17.

可変長符号化部6は、上記のように、量子化信号、各種情報(モード情報等)、および、差分ベクトル信号に対して、可変長符号化処理を実行して取得した信号を、ME用ブロックDB11eに対する動画像符号化信号Doutとして、出力する。   As described above, the variable-length encoding unit 6 uses the signal obtained by executing the variable-length encoding process for the quantized signal, various information (mode information, etc.) and the difference vector signal for the ME. It outputs as a moving image encoding signal Dout with respect to block DB11e.

このように、動画像符号化装置1000では、有効領域のみを用いて、動き推定処理、動き補償処理を実行するので、無効領域の影響を受けることなく、精度の良い動き推定処理、動き補償処理を実行することができるので、それにより取得される動きベクトルの精度も高い。また、動画像符号化装置1000では、無効領域における予測誤差信号を強制的に「0」にするので、無効領域に対する符号量の発生を顕著に抑制することができる。また、無効領域についての動き推定処理(動きベクトル探索処理)、動き補償処理を実行することがないので、演算量の増加も抑制することができる。   As described above, since the moving picture coding apparatus 1000 executes the motion estimation process and the motion compensation process using only the effective area, the motion estimation process and the motion compensation process with high accuracy without being affected by the invalid area. Therefore, the accuracy of the motion vector acquired thereby is also high. Further, in the moving picture coding apparatus 1000, the prediction error signal in the invalid area is forcibly set to “0”, so that the generation of the code amount for the invalid area can be remarkably suppressed. In addition, since the motion estimation processing (motion vector search processing) and motion compensation processing for the invalid area are not executed, an increase in the amount of computation can be suppressed.

なお、上記では、分割ブロックDB11が注目分割ブロック(処理対象分割ブロック)である場合について、説明したが、分割ブロックDB12(図4に示す分割ブロックDB12)が注目分割ブロック(処理対象分割ブロック)である場合についても、上記と同様の処理が実行され、ME用ブロックDB12e(図4に示すME用ブロックDB12e)に対する動画像符号化信号Doutが取得される。   In the above description, the case where the divided block DB11 is the target divided block (processing target divided block) has been described. However, the divided block DB12 (the divided block DB12 illustrated in FIG. 4) is the target divided block (processing target divided block). Even in some cases, the same processing as described above is performed, and the moving image encoded signal Dout for the ME block DB 12e (ME block DB 12e shown in FIG. 4) is acquired.

≪A3:分割ブロックが8×8の場合であって、サブブロック(サブマクロブロック・パーティション)がある場合(インタ予測処理)≫
分割ブロックを8×8とし、かつ、サブブロックありにしたときのインター予測処理の符号化コストが最小である場合(これを「パターンA3」の場合という。)、符号化モード判定部15は、インター予測部11に制御信号ctl1を出力し、インター予測部11に分割ブロックを8×8として、さらに、符号化コストが最小となるサブブロックが設定されたマクロブロックMB1の上半分の有効領域について、動き推定(ME)および動き補償(MC)を実行するように制御する。ここでは、説明便宜のため、有効領域の8×8の分割ブロックのサブブロックが全て4×4のブロックである場合について説明する。なお、サブブロックは、例えば、H.264規格に規定されているように、4×8のブロック、8×4のブロック、4×4のブロックを取り得る。
<< A3: When the divided block is 8 × 8 and there is a sub-block (sub-macroblock / partition) (inter prediction process) >>
When the encoding cost of the inter prediction process when the divided block is 8 × 8 and the sub-block is present (this is referred to as “pattern A3”), the encoding mode determination unit 15 The control signal ctl1 is output to the inter prediction unit 11, the divided block is set to 8 × 8 in the inter prediction unit 11, and the effective area of the upper half of the macroblock MB1 in which the subblock having the minimum coding cost is set. , Control to perform motion estimation (ME) and motion compensation (MC). Here, for convenience of explanation, a case will be described in which the sub-blocks of the 8 × 8 divided blocks in the effective area are all 4 × 4 blocks. The sub-block is, for example, H.264. As specified in the H.264 standard, 4 × 8 blocks, 8 × 4 blocks, and 4 × 4 blocks can be taken.

図5は、パターンA3の場合の処理を説明するための図である。   FIG. 5 is a diagram for explaining processing in the case of the pattern A3.

インター予測部11は、符号化モード判定部15からの制御信号ctl1に従い、マクロブロックMB1の上半分の領域(有効領域)について、動き推定(ME)および動き補償(MC)を実行する。具体的には、インター予測部11は、処理対象ブロックであるマクロブロックMB1の上半分の8つの4×4のブロック(図5の左図に示すサブブロックdB11、dB12、dB13、dB14、dB21、dB22、dB23、dB24)についての予測動きベクトルpMV(注目分割ブロックの周辺のブロックから求めた予測動きベクトル)を動きベクトル処理部16から取得する。   The inter prediction unit 11 performs motion estimation (ME) and motion compensation (MC) for the upper half region (effective region) of the macroblock MB1 in accordance with the control signal ctl1 from the coding mode determination unit 15. Specifically, the inter prediction unit 11 includes eight 4 × 4 blocks (subblocks dB11, dB12, dB13, dB14, dB21 illustrated in the left diagram of FIG. 5) in the upper half of the macroblock MB1 that is the processing target block. The motion vector processing unit 16 obtains a motion vector predictor pMV (predicted motion vector obtained from blocks around the target divided block) for dB22, dB23, and dB24).

なお、説明便宜のため、サブブロックdB22が注目ブロック(処理対象ブロック)である場合について、以下、説明する。   For convenience of explanation, a case where the sub-block dB22 is a target block (processing target block) will be described below.

インター予測部11は、分割ブロックdB22についての予測動きベクトルpMVを動きベクトルの探索処理の初期ベクトルとして、動きベクトルの探索処理を実行し、注目ブロックdB22の動きベクトルmv22を取得する。   The inter prediction unit 11 performs a motion vector search process using the predicted motion vector pMV for the divided block dB22 as an initial vector of the motion vector search process, and acquires a motion vector mv22 of the block of interest dB22.

インター予測部11は、取得した動きベクトルmv22を動きベクトル処理部16に出力する。   The inter prediction unit 11 outputs the acquired motion vector mv22 to the motion vector processing unit 16.

また、インター予測部11は、記憶部10から入力された参照画像と、取得した動きベクトルmv22とに基づいて、動き補償(MC)を実行することで、注目ブロックdB22についてのインター予測信号を取得し、符号化モード判定部15に出力する。つまり、注目ブロックdB22については、H.264に規格されている通りの処理を行う。そして、そのために、符号化モード判定部15は、注目ブロックdB22に相当する予測誤差信号diffが、第1ゼロ設定部2において、そのまま、予測誤差信号diff1として出力されるように、制御信号ctl1を生成する。   The inter prediction unit 11 acquires an inter prediction signal for the block of interest dB22 by performing motion compensation (MC) based on the reference image input from the storage unit 10 and the acquired motion vector mv22. And output to the encoding mode determination unit 15. That is, for the target block dB22, the H.264 Processing as specified in H.264 is performed. For this purpose, the encoding mode determination unit 15 outputs the control signal ctl1 so that the prediction error signal diff corresponding to the target block dB22 is output as it is as the prediction error signal diff1 in the first zero setting unit 2. Generate.

また、インター予測部11は、注目ブロックdB22について取得された動きベクトルmv22を動きベクトル処理部16に出力し、動きベクトル処理部16は、注目ブロックdB22の周辺ブロックから取得された予測動きベクトルと、動きベクトルmv22との差分をとることで、動きベクトル差分信号diff_MVを取得し、第2ゼロ設定部17に出力する。   Further, the inter prediction unit 11 outputs the motion vector mv22 acquired for the target block dB22 to the motion vector processing unit 16, and the motion vector processing unit 16 includes the predicted motion vector acquired from the peripheral blocks of the target block dB22, and By taking the difference from the motion vector mv22, the motion vector difference signal diff_MV is acquired and output to the second zero setting unit 17.

第2ゼロ設定部17は、注目ブロックdB22が有効領域に含まれるので、制御信号ctl_z2に従い、動きベクトル差分信号diff_MVを、そのまま、動きベクトル差分信号diff1_MVとして、可変長符号化部6に出力する。   Since the target block dB22 is included in the effective region, the second zero setting unit 17 outputs the motion vector difference signal diff_MV as it is as the motion vector difference signal diff1_MV to the variable length encoding unit 6 according to the control signal ctl_z2.

つまり、注目ブロックdB22については、H.264規格に規定されている通常の処理が実行される。   That is, for the target block dB22, the H.264 Normal processing defined in the H.264 standard is executed.

なお、マクロブロックMB1の有効領域に含まれる他のサブブロックについても同様である。   The same applies to the other sub-blocks included in the effective area of the macroblock MB1.

次に、パターンA3の場合の無効領域の処理について、図5の左図の8×8の分割ブロックdB31が処理対象である場合を例に、説明する。   Next, the processing of the invalid area in the case of the pattern A3 will be described by taking as an example the case where the 8 × 8 divided block dB31 in the left diagram of FIG. 5 is the processing target.

符号化モード判定部15は、分割ブロックdB31が無効領域に含まれるので、当該領域において予測誤差信号diff1の信号値が強制的に「0」となるように、制御信号ctl1を生成し、第1ゼロ設定部2に出力する。   Since the divided block dB31 is included in the invalid region, the encoding mode determination unit 15 generates the control signal ctl1 so that the signal value of the prediction error signal diff1 is forced to be “0” in the region. Output to the zero setting unit 2.

第1ゼロ設定部2は、分割ブロックdB31に相当する予測誤差信号diffが入力された場合、制御信号ctl1に従い、信号値「0」を出力する。これにより、第1ゼロ設定部2から出力される、分割ブロックdB31に相当する予測誤差信号diff1の信号値は「0」となる。なお、直交変換部4以降の処理は、上記で説明した処理と同様である。   When the prediction error signal diff corresponding to the divided block dB31 is input, the first zero setting unit 2 outputs a signal value “0” in accordance with the control signal ctl1. As a result, the signal value of the prediction error signal diff1 output from the first zero setting unit 2 and corresponding to the divided block dB31 is “0”. Note that the processing after the orthogonal transform unit 4 is the same as the processing described above.

次に、分割ブロックdB31に設定する動きベクトルについての処理について、説明する。   Next, the process for the motion vector set in the divided block dB31 will be described.

符号化モード判定部15は、処理対象の分割ブロックdB31が、8×8のブロックであり、無効領域内のブロックであるので、分割ブロックdB31の周辺から算出される予測動きベクトルを、分割ブロックdB31の動きベクトルに設定するよう指示する制御信号ctl1を生成し、インター予測部11に出力する。   Since the division block dB31 to be processed is an 8 × 8 block and is a block in the invalid area, the encoding mode determination unit 15 determines the prediction motion vector calculated from the periphery of the division block dB31 as the division block dB31. A control signal ctl1 instructing to set the motion vector is generated and output to the inter prediction unit 11.

インター予測部11は、制御信号ctl1に従い、動きベクトル処理部16から、分割ブロックdB31の周辺のブロックから取得された予測動きベクトルpmv31を取得する。例えば、分割ブロックdB31の周辺のブロックおよび取得された動きベクトルが図5の左図に示す場合、動きベクトル処理部16は、H.264規格の規定通り、pmv31を、
pmv31=median(mv21,mv23,mv30)
median():要素のメディアン値をとる関数
mv21:ブロックdB21の動きベクトル
mv23:ブロックdB23の動きベクトル
mv30:ブロックdB30の動きベクトル
により、取得する。
The inter prediction unit 11 acquires the motion vector predictor pmv31 acquired from the blocks around the divided block dB31 from the motion vector processing unit 16 according to the control signal ctl1. For example, when the blocks around the divided block dB31 and the acquired motion vectors are shown in the left diagram of FIG. As specified in the H.264 standard, pmv31 is
pmv31 = median (mv21, mv23, mv30)
median (): a function that takes the median value of an element mv21: motion vector of block dB21 mv23: motion vector of block dB23 mv30: motion vector of block dB30

そして、インター予測部11は、上記により取得された予測動きベクトルを、そのまま、分割ブロックdB31の動きベクトルmv31として採用する。これにより、分割ブロックdB31についての動きベクトル探索処理は省略される。   Then, the inter prediction unit 11 directly adopts the predicted motion vector acquired as described above as the motion vector mv31 of the divided block dB31. Thereby, the motion vector search process for the divided block dB31 is omitted.

そして、インター予測部11は、上記のように取得した動きベクトルmv31を、分割ブロックdB31の動きベクトルとして、動きベクトル処理部16に出力する。   Then, the inter prediction unit 11 outputs the motion vector mv31 acquired as described above to the motion vector processing unit 16 as a motion vector of the divided block dB31.

動きベクトル処理部16は、分割ブロックdB31の予測動きベクトルpmv31と、インター予測部11から入力された動きベクトルmv31との差分をとり、動きベクトル差分信号diff_MVを取得し、第2ゼロ設定部17に出力する。なお、予測動きベクトルpmv31と動きベクトルmv31とは同じなので、信号値が「0」である動きベクトル差分信号diff_MVが、動きベクトル処理部16から第2ゼロ設定部17に出力されることになる。そして、第2ゼロ設定部17は、入力された動きベクトル差分信号diff_MVを、そのまま、動きベクトル差分信号diff1_MVとして、可変長符号化部6に出力する。   The motion vector processing unit 16 obtains a motion vector difference signal diff_MV by taking the difference between the predicted motion vector pmv31 of the divided block dB31 and the motion vector mv31 input from the inter prediction unit 11, and sends it to the second zero setting unit 17. Output. Note that since the predicted motion vector pmv31 and the motion vector mv31 are the same, the motion vector difference signal diff_MV having a signal value of “0” is output from the motion vector processing unit 16 to the second zero setting unit 17. Then, the second zero setting unit 17 outputs the input motion vector difference signal diff_MV as it is to the variable length encoding unit 6 as the motion vector difference signal diff1_MV.

可変長符号化部6では、分割ブロックdB31に対応する動きベクトル差分信号diff1_MVに対して可変長符号化処理を行う。なお、分割ブロックdB31に対応する動きベクトル差分信号diff1_MVは、上記の通り、信号値が「0」となるので、可変長符号化処理後の分割ブロックdB31に相当する動画像符号化信号は、その発生符号量が抑制されたものとなる。   The variable length coding unit 6 performs variable length coding processing on the motion vector difference signal diff1_MV corresponding to the divided block dB31. Note that the motion vector difference signal diff1_MV corresponding to the divided block dB31 has a signal value of “0” as described above, and thus the moving image encoded signal corresponding to the divided block dB31 after the variable-length encoding process is The generated code amount is suppressed.

なお、分割ブロックdB32についても、上記と同様の処理が実行される。   Note that the same processing as described above is executed for the divided block dB32.

このように、パターンA3の場合、動画像符号化装置では、無効領域に相当する予測誤差信号diff1の信号値が「0」となり、また、動きベクトル差分信号diff1_MVの信号値も「0」となるため、無効領域に相当する部分の動画像符号化信号の発生符号量を効果的に抑制することができる。また、上記の通り、無効領域に対する処理は、H.264規格に準拠した処理を実行するだけなので、回路規模の増大を抑制しつつ、簡単に実現することができる。   Thus, in the case of the pattern A3, in the video encoding device, the signal value of the prediction error signal diff1 corresponding to the invalid region is “0”, and the signal value of the motion vector difference signal diff1_MV is also “0”. Therefore, it is possible to effectively suppress the generated code amount of the moving image encoded signal corresponding to the invalid area. Further, as described above, the processing for the invalid area is performed by H.264. Since only the processing conforming to the H.264 standard is executed, it can be easily realized while suppressing an increase in circuit scale.

≪B:イントラ予測処理≫
次に、符号化コストが最小であると判定されたのが、イントラ予測処理である場合について図6を用いて説明する。
≪B: Intra prediction process≫
Next, a case where it is determined that the coding cost is the minimum is an intra prediction process will be described with reference to FIG.

図6は、処理対象マクロブロックMB1の上半分(注目分割ブロックが16×8)が有効領域である場合において、決定される動き補償(MC)のブロックサイズと、動きベクトルについて説明するための図である。なお、以下では、イントラ予測モードとして、H.264規格で規定されている予測モード0(垂直方向への予測モード)の場合について説明する。なお、イントラ予測のためのブロックサイズは、8×8に設定されているものとして、説明する。   FIG. 6 is a diagram for explaining the motion compensation (MC) block size and the motion vector determined when the upper half of the processing target macroblock MB1 (the target divided block is 16 × 8) is an effective region. It is. In the following, H. The case of the prediction mode 0 (prediction mode in the vertical direction) defined by the H.264 standard will be described. Note that the block size for intra prediction is assumed to be set to 8 × 8.

図6の場合、符号化モード判定部15は、イントラ予測部12に対して、予測モード0として、イントラ予測処理を実行するように指示する制御信号ctl1を生成し、イントラ予測部12に出力する。   In the case of FIG. 6, the encoding mode determination unit 15 generates a control signal ctl1 that instructs the intra prediction unit 12 to execute the intra prediction process as the prediction mode 0 and outputs the control signal ctl1 to the intra prediction unit 12. .

イントラ予測部12は、制御信号ctl1に従い、マクロブロックMB1に対して、予測モード0のイントラ予測処理を実行する。具体的には、図6に示すように、イントラ予測部12は、無効領域に存在する8×8のブロックDB21の各列の画素の画素値を、有効領域に存在する8×8ブロックであるブロックDB11の最下段に位置する8つの画素P1〜P8の画素値と、それぞれ、同じ画素値となるように設定する。また、同様に、イントラ予測部12は、無効領域に存在する8×8のブロックDB22の各列の画素の画素値を、有効領域に存在する8×8ブロックであるブロックDB12の最下段に位置する8つの画素P9〜P16の画素値と、それぞれ、同じ画素値となるように設定する。このようにして、イントラ予測部12は、イントラ予測ブロックDB21、DB22を取得する。   The intra prediction unit 12 performs the prediction mode 0 intra prediction process on the macroblock MB1 in accordance with the control signal ctl1. Specifically, as illustrated in FIG. 6, the intra prediction unit 12 is an 8 × 8 block in which the pixel value of each column of the 8 × 8 block DB 21 existing in the invalid area is present in the valid area. The pixel values of the eight pixels P1 to P8 located at the bottom of the block DB11 are set to have the same pixel value. Similarly, the intra prediction unit 12 positions the pixel values of the pixels in each column of the 8 × 8 block DB 22 existing in the invalid area at the lowest level of the block DB 12 that is the 8 × 8 block existing in the valid area. The pixel values of the eight pixels P9 to P16 are set to have the same pixel value. In this way, the intra prediction unit 12 acquires the intra prediction blocks DB21 and DB22.

そして、イントラ予測部12は、実際のブロックDB21の画素の画素値と、イントラ予測ブロックの画素の画素値との差分をとることで、ブロックDB21に相当するイントラ予測信号を符号化モード判定部15に出力する。なお、ブロックDB22についても同様である。以下では、ブロックDB21に対する処理について、説明する。   Then, the intra prediction unit 12 calculates the difference between the pixel value of the pixel of the actual block DB 21 and the pixel value of the pixel of the intra prediction block, thereby encoding the intra prediction signal corresponding to the block DB 21 into the encoding mode determination unit 15. Output to. The same applies to the block DB 22. Below, the process with respect to block DB21 is demonstrated.

符号化モード判定部15は、無効領域に存在するブロックDB21に対応する予測誤差信号diff1の信号値が「0」となるように、制御信号ctl_z1を生成し、第1ゼロ設定部2に出力する。   The encoding mode determination unit 15 generates the control signal ctl_z1 so that the signal value of the prediction error signal diff1 corresponding to the block DB 21 existing in the invalid region is “0”, and outputs the control signal ctl_z1 to the first zero setting unit 2 .

また、符号化モード判定部15は、ブロックDB21に対応するインター予測信号を予測信号Dpとして減算器1に出力する。   Moreover, the encoding mode determination part 15 outputs the inter prediction signal corresponding to block DB21 to the subtracter 1 as the prediction signal Dp.

減算器1は、ブロックDB21に相当する動画像信号Dinから、予測信号Dpを減算して取得した予測誤差信号diffを第1ゼロ設定部2に出力する。   The subtracter 1 outputs a prediction error signal diff obtained by subtracting the prediction signal Dp from the moving image signal Din corresponding to the block DB 21 to the first zero setting unit 2.

第1ゼロ設定部2は、符号化モード判定部15から出力される制御信号ctl_z1に従い、予測誤差信号diff1の信号値を強制的に「0」にし、直交変換部4に出力する。   The first zero setting unit 2 forcibly sets the signal value of the prediction error signal diff1 to “0” according to the control signal ctl_z1 output from the encoding mode determination unit 15 and outputs the signal value to the orthogonal transform unit 4.

直交変換部4以降において、上記で説明した、インター予測処理がなされた場合の予測誤差信号diff1の処理と同様の処理が実行される。   In the orthogonal transform unit 4 and later, processing similar to the processing of the prediction error signal diff1 when the inter prediction processing described above is performed is executed.

このように、動画像符号化装置1000では、符号化コストが最小であると判定されたのが、イントラ予測処理である場合において、無効領域に相当する予測誤差信号diff1の信号値を強制的に「0」とするので、不要な符号量の発生を適切に抑制することができる。   As described above, the moving image encoding apparatus 1000 forcibly sets the signal value of the prediction error signal diff1 corresponding to the invalid region when the encoding cost is determined to be the minimum in the intra prediction process. Since “0” is set, generation of an unnecessary code amount can be appropriately suppressed.

なお、上記では、予測モード0について説明したが、他の予測モードにおいても、動画像符号化装置1000では、同様に無効領域に相当する予測誤差信号diff1の信号値を強制的に「0」とするので、不要な符号量の発生を適切に抑制することができる。   Although the prediction mode 0 has been described above, in the other prediction modes, the moving image encoding apparatus 1000 similarly forcibly sets the signal value of the prediction error signal diff1 corresponding to the invalid region to “0”. Therefore, it is possible to appropriately suppress generation of an unnecessary code amount.

(1.2.2:無効領域のみを含むマクロブロック(パターン2)の処理)
次に、図7に示すように、無効領域のみを含むマクロブロックの処理について、説明する。
(1.2.2: Processing of macroblock (pattern 2) including only invalid area)
Next, as shown in FIG. 7, processing of a macroblock including only an invalid area will be described.

図7は、無効領域のみを含むマクロブロックMB2を示した図である。   FIG. 7 is a diagram showing a macroblock MB2 including only an invalid area.

スキップMB判定部14は、図7に示すマクロブロックMB2に相当する動画像信号Dinが入力された場合、マクロブロックMB2をスキップマクロブロックに設定するための情報を生成し、当該情報を符号化モード判定部15に出力する。   When the moving image signal Din corresponding to the macro block MB2 shown in FIG. 7 is input, the skip MB determination unit 14 generates information for setting the macro block MB2 to be a skip macro block, and uses the information as a coding mode. Output to the determination unit 15.

符号化モード判定部15は、スキップMB判定部14からの情報に基づいて、マクロブロックMB2をスキップマクロブロックに設定し、マクロブロックMB2をスキップマクロブロックに設定したことを示す情報を、情報Info_modeに含め、可変長符号化部6に出力する。そして、可変長符号化部6は、マクロブロックMB2をスキップマクロブロックに設定したことを示す情報に対して、可変長符号化処理を実行し、動画像符号化信号Doutを生成し出力する。   Based on the information from the skip MB determination unit 14, the encoding mode determination unit 15 sets information indicating that the macro block MB2 is set to the skip macro block and the macro block MB2 is set to the skip macro block in the information Info_mode. And output to the variable length encoding unit 6. Then, the variable length coding unit 6 performs variable length coding processing on the information indicating that the macro block MB2 is set as a skip macro block, and generates and outputs a moving image coded signal Dout.

これにより、無効領域のみを含むマクロブロックMB2はスキップマクロブロックに設定されるだけなので、インター予測処理、イントラ予測処理等が実行されることがない。その結果、動画像符号化装置1000では、無効領域について不要な符号を発生させることがなく、不要な符号量の発生を適切に抑制することができる。   Thereby, since the macroblock MB2 including only the invalid area is only set as the skip macroblock, the inter prediction process, the intra prediction process, and the like are not performed. As a result, the moving picture coding apparatus 1000 can appropriately suppress the generation of an unnecessary code amount without generating an unnecessary code for the invalid area.

(1.2.3:左下端部に無効領域を含むマクロブロック(パターン3)の処理)
次に、図8に示すように、左下端部に無効領域を含むマクロブロックMB3の処理について、説明する。
(1.2.3: Processing of a macro block (pattern 3) including an invalid area at the lower left corner)
Next, as shown in FIG. 8, the processing of the macro block MB3 including the invalid area at the lower left corner will be described.

≪図9の場合≫
マクロブロックMB3についての符号化コスト計算を行った結果、ブロックを16×16のブロックにしたときのインター予測処理の符号化コストが最小であった場合、符号化モード判定部15は、動き補償のブロックサイズを16×16に設定し、インター予測部11に、動き補償のブロックサイズを16×16として、インター予測処理を実行させるように制御信号ctl1を生成する。図9に、ブロックを16×16のブロックにしたときのインター予測処理の符号化コストが最小であった場合を説明するための図を示す。
<< In the case of FIG. 9 >>
As a result of calculating the coding cost for the macroblock MB3, when the coding cost of the inter prediction process when the block is changed to a 16 × 16 block is minimum, the coding mode determination unit 15 performs motion compensation. The block size is set to 16 × 16, and the control signal ctl1 is generated so that the inter prediction unit 11 performs the inter prediction process with the motion compensation block size set to 16 × 16. FIG. 9 is a diagram for explaining a case where the coding cost of the inter prediction process is the minimum when the block is a 16 × 16 block.

インター予測部11は、制御信号ctl1に基づいて、動き補償のブロックサイズを16×16として、インター予測処理を実行する。そして、動き補償のブロックサイズを16×16として、動きベクトルの探索処理を実行し、動きベクトルMV3を取得する。なお、動きベクトルの探索処理については、上記で説明した処理と同様である。   Based on the control signal ctl1, the inter prediction unit 11 sets the motion compensation block size to 16 × 16 and performs inter prediction processing. Then, the motion vector search processing is executed with the motion compensation block size set to 16 × 16, and the motion vector MV3 is acquired. The motion vector search process is the same as the process described above.

そして、インター予測部11は、動きベクトルMV3を用いた動き補償処理により取得したインター予測信号を符号化モード判定部15に出力する。   Then, the inter prediction unit 11 outputs the inter prediction signal acquired by the motion compensation process using the motion vector MV3 to the encoding mode determination unit 15.

符号化モード判定部15は、マクロブロックMB3の無効領域の部分において、予測誤差信号diff1が強制的に「0」となるように制御信号ctl_z1を生成し、第1ゼロ設定部2に出力する。   The encoding mode determination unit 15 generates the control signal ctl_z1 so that the prediction error signal diff1 is forcibly set to “0” in the invalid region portion of the macroblock MB3, and outputs the control signal ctl_z1 to the first zero setting unit 2.

そして、上記で説明したのと同様に、無効領域についての予測誤差信号diff1の信号値が「0」となるように制御される。   Then, as described above, the signal value of the prediction error signal diff1 for the invalid region is controlled to be “0”.

動画像符号化装置1000では、図9に示すように、ブロックを16×16のブロックにしたときのインター予測処理の符号化コストが最小であった場合、動き補償のブロックサイズを16×16とし、当該ブロックにより取得される動きベクトルMV3を用いて動画像符号化処理を実行する。そして、動画像符号化装置1000は、無効領域において、予測誤差信号diff1が「0」となるように制御するので、無効領域による不要な符号量の発生を適切に防止することができる。   In the moving image coding apparatus 1000, as shown in FIG. 9, when the coding cost of the inter prediction process when the block is a 16 × 16 block is the minimum, the motion compensation block size is set to 16 × 16. Then, the moving image encoding process is executed using the motion vector MV3 acquired by the block. Since the video encoding apparatus 1000 controls the prediction error signal diff1 to be “0” in the invalid area, it is possible to appropriately prevent generation of an unnecessary code amount due to the invalid area.

≪図10の場合≫
マクロブロックMB3についての符号化コスト計算を行った結果、ブロックを8×16のブロックにしたときのインター予測処理の符号化コストが最小であった場合、符号化モード判定部15は、動き補償のブロックサイズを8×16に設定し、インター予測部11に、動き補償のブロックサイズを8×16として、インター予測処理を実行させるように制御信号ctl1を生成する。図10に、分割ブロックを8×16のブロックにしたときのインター予測処理の符号化コストが最小であった場合を説明するための図を示す。
<< In the case of FIG. 10 >>
As a result of calculating the coding cost for the macroblock MB3, when the coding cost of the inter prediction process when the block is changed to an 8 × 16 block is minimum, the coding mode determination unit 15 performs motion compensation. The block size is set to 8 × 16, and the control signal ctl1 is generated so that the inter prediction unit 11 performs the inter prediction process with the motion compensation block size set to 8 × 16. FIG. 10 is a diagram for explaining a case where the encoding cost of the inter prediction process is the minimum when the divided block is an 8 × 16 block.

インター予測部11は、制御信号ctl1に基づいて、動き補償のブロックサイズを8×16として、インター予測処理を実行する。   Based on the control signal ctl1, the inter prediction unit 11 sets the motion compensation block size to 8 × 16 and performs inter prediction processing.

インター予測部11は、マクロブロックMB3の右半分の8×16の分割ブロックDB12については、動き補償のブロックサイズを8×16として、動きベクトルの探索処理を実行し、動きベクトルMV12Aを取得する。なお、動きベクトルの探索処理については、上記で説明した処理と同様である。   The inter prediction unit 11 executes motion vector search processing for the 8 × 16 divided block DB 12 in the right half of the macroblock MB3 with a motion compensation block size of 8 × 16, and obtains a motion vector MV12A. The motion vector search process is the same as the process described above.

インター予測部11は、マクロブロックMB3の左半分の8×16のブロックでは、図4を用いて説明したのと同様に、8×8ブロックであるブロックDB11により、インター予測処理を実行し、取得した動きベクトルMV11を、図10の右図に示すように、マクロブロックMB3の左半分の8×16の分割ブロックDB11eの動きベクトルして、インター予測処理を実行する。つまり、分割ブロックDB11eを動き補償のブロックとして、インター予測処理(動き推定処理、動き補償処理)を実行する。そして、図4を用いて説明したのと同様に、動画像符号化装置1000では、無効領域に相当する予測誤差信号diff1を強制的に「0」とすることで、無効領域についての符号量の発生を抑制する。   For the 8 × 16 block in the left half of the macroblock MB3, the inter prediction unit 11 executes the inter prediction process by the block DB 11 that is an 8 × 8 block, as described with reference to FIG. As shown in the right diagram of FIG. 10, the motion vector MV11 is used as the motion vector of the left half 8 × 16 divided block DB 11e of the macroblock MB3, and the inter prediction process is executed. That is, the inter prediction process (motion estimation process, motion compensation process) is executed using the divided block DB 11e as a motion compensation block. In the same way as described with reference to FIG. 4, the moving image encoding apparatus 1000 forcibly sets the prediction error signal diff1 corresponding to the invalid area to “0”, thereby reducing the code amount for the invalid area. Suppresses the occurrence.

≪図11の場合≫
マクロブロックMB3についての符号化コスト計算を行った結果、ブロックを16×8のブロックにしたときのインター予測処理の符号化コストが最小であった場合、符号化モード判定部15は、動き補償のブロックサイズを16×8に設定し、インター予測部11に、動き補償のブロックサイズを16×8として、インター予測処理を実行させるように制御信号ctl1を生成する。図11に、分割ブロックを16×8のブロックにしたときのインター予測処理の符号化コストが最小であった場合を説明するための図を示す。
<< In the case of FIG. 11 >>
As a result of calculating the coding cost for the macroblock MB3, when the coding cost of the inter prediction process when the block is changed to a 16 × 8 block is minimum, the coding mode determination unit 15 performs motion compensation. The block size is set to 16 × 8, and the control signal ctl1 is generated so that the inter prediction unit 11 performs the inter prediction process with the motion compensation block size set to 16 × 8. FIG. 11 is a diagram for explaining a case where the encoding cost of the inter prediction process is the minimum when the divided block is a 16 × 8 block.

インター予測部11は、制御信号ctl1に基づいて、動き補償のブロックサイズを16×8として、インター予測処理を実行する。   Based on the control signal ctl1, the inter prediction unit 11 sets the motion compensation block size to 16 × 8 and performs inter prediction processing.

インター予測部11は、マクロブロックMB3の上半分の16×8の分割ブロックDB11については、動き補償のブロックサイズを16×8として、動きベクトルの探索処理を実行し、動きベクトルMV11Aを取得する。なお、動きベクトルの探索処理については、上記で説明した処理と同様である。   For the upper half 16 × 8 divided block DB11 of the macro block MB3, the inter prediction unit 11 sets the motion compensation block size to 16 × 8, and performs motion vector search processing to obtain the motion vector MV11A. The motion vector search process is the same as the process described above.

インター予測部11は、マクロブロックMB3の下半分の16×8のブロックでは、図4を用いて説明したのと同様に、8×8ブロックであるブロックDB22により、インター予測処理を実行し、取得した動きベクトルMV22を、図11の右図に示すように、マクロブロックMB3の下半分の16×8の分割ブロックDB21eの動きベクトルして、インター予測処理を実行する。つまり、分割ブロックDB21eを動き補償のブロックとして、インター予測処理(動き推定処理、動き補償処理)を実行する。そして、図4を用いて説明したのと同様に、動画像符号化装置1000では、無効領域に相当する予測誤差信号diff1を強制的に「0」とすることで、無効領域についての符号量の発生を抑制する。   In the lower half 16 × 8 block of the macroblock MB3, the inter prediction unit 11 performs the inter prediction process by the block DB 22 that is an 8 × 8 block, as described with reference to FIG. As shown in the right diagram of FIG. 11, the motion vector MV22 is used as the motion vector of the lower half 16 × 8 divided block DB 21e of the macro block MB3, and the inter prediction process is executed. That is, the inter prediction process (motion estimation process, motion compensation process) is executed using the divided block DB 21e as a motion compensation block. In the same way as described with reference to FIG. 4, the moving image encoding apparatus 1000 forcibly sets the prediction error signal diff1 corresponding to the invalid area to “0”, thereby reducing the code amount for the invalid area. Suppresses the occurrence.

≪図12の場合≫
マクロブロックMB3についての符号化コスト計算を行った結果、ブロックを8×8のブロックにしたときのインター予測処理の符号化コストが最小であった場合、符号化モード判定部15は、動き補償のブロックサイズを8×8に設定し、インター予測部11に、動き補償のブロックサイズを8×8として、インター予測処理を実行させるように制御信号ctl1を生成する。図12に、分割ブロックを8×8のブロックにしたときのインター予測処理の符号化コストが最小であった場合を説明するための図を示す。
<< In the case of FIG. 12 >>
As a result of calculating the coding cost for the macroblock MB3, when the coding cost of the inter prediction process when the block is changed to an 8 × 8 block is minimum, the coding mode determination unit 15 performs motion compensation. The block size is set to 8 × 8, and the control signal ctl1 is generated to cause the inter prediction unit 11 to perform the inter prediction process with the motion compensation block size set to 8 × 8. FIG. 12 is a diagram for explaining a case where the encoding cost of the inter prediction process is the minimum when the divided block is an 8 × 8 block.

インター予測部11は、制御信号ctl1に基づいて、動き補償のブロックサイズを8×8として、インター予測処理を実行する。   The inter prediction unit 11 executes the inter prediction process with the motion compensation block size set to 8 × 8 based on the control signal ctl1.

インター予測部11は、図12に示す分割ブロックDB11、DB12、および、DB22については、動き補償のブロックサイズを8×8として、それぞれ、動きベクトルの探索処理を実行し、動きベクトルMV11、MV12、および、MV22を取得する。なお、動きベクトルの探索処理については、上記で説明した処理と同様である。   For each of the divided blocks DB11, DB12, and DB22 shown in FIG. 12, the inter prediction unit 11 sets the motion compensation block size to 8 × 8, and executes a motion vector search process, thereby obtaining motion vectors MV11, MV12, And MV22 is acquired. The motion vector search process is the same as the process described above.

インター予測部11は、図12に示す、無効領域のみを含む分割ブロックDB21に対しては、図5を用いて説明したのと同様に、分割ブロックDB21の周辺から算出される予測動きベクトルを、分割ブロックDB21の動きベクトルに設定するよう指示する制御信号ctl1を生成し、インター予測部11に出力する。   For the divided block DB 21 including only the invalid region shown in FIG. 12, the inter prediction unit 11, as described with reference to FIG. 5, predicts motion vectors calculated from the periphery of the divided block DB 21. A control signal ctl1 instructing to set the motion vector of the divided block DB21 is generated and output to the inter prediction unit 11.

インター予測部11は、制御信号ctl1に従い、動きベクトル処理部16から、分割ブロックDB21の周辺のブロックから取得された予測動きベクトルpmv21を取得する。例えば、分割ブロックDB21の周辺のブロックおよび取得された動きベクトルが図12の左図に示す場合、動きベクトル処理部16は、H.264規格の規定通り、pmv21を、
pmv21=median(MV11,MV12,MV20)
median():要素のメディアン値をとる関数
mv11:ブロックDB11の動きベクトル
mv12:ブロックDB12の動きベクトル
mv20:ブロックDB20の動きベクトル
により、取得する。
The inter prediction unit 11 acquires, from the motion vector processing unit 16, the predicted motion vector pmv21 acquired from the peripheral blocks of the divided block DB21 in accordance with the control signal ctl1. For example, when the blocks around the divided block DB 21 and the acquired motion vector are shown in the left diagram of FIG. As specified in the H.264 standard, pmv21 is
pmv21 = median (MV11, MV12, MV20)
median (): a function that takes the median value of an element mv11: motion vector of block DB11 mv12: motion vector of block DB12 mv20: motion vector of block DB20

そして、インター予測部11は、上記により取得された予測動きベクトルを、そのまま、分割ブロックDB21の動きベクトルMV21eとして採用する。これにより、分割ブロックDB21についての動きベクトル探索処理は省略される。   Then, the inter prediction unit 11 directly adopts the predicted motion vector acquired as described above as the motion vector MV21e of the divided block DB 21. Thereby, the motion vector search process for the divided block DB 21 is omitted.

そして、インター予測部11は、上記のように取得した動きベクトルpmv21を、分割ブロックDB21の動きベクトルとして、動きベクトル処理部16に出力する。   Then, the inter prediction unit 11 outputs the motion vector pmv21 acquired as described above to the motion vector processing unit 16 as a motion vector of the divided block DB21.

動きベクトル処理部16は、分割ブロックDB21の予測動きベクトルpmv21と、インター予測部11から入力された動きベクトルMV21との差分をとり、動きベクトル差分信号diff_MVを取得し、第2ゼロ設定部17に出力する。なお、予測動きベクトルpmv21と動きベクトルMV21とは同じなので、信号値が「0」である動きベクトル差分信号diff_MVが、動きベクトル処理部16から第2ゼロ設定部17に出力されることになる。そして、第2ゼロ設定部17は、入力された動きベクトル差分信号diff_MVを、そのまま、動きベクトル差分信号diff1_MVとして、可変長符号化部6に出力する。   The motion vector processing unit 16 obtains a motion vector difference signal diff_MV by taking the difference between the predicted motion vector pmv21 of the divided block DB 21 and the motion vector MV21 input from the inter prediction unit 11, and sends it to the second zero setting unit 17. Output. Since the motion vector predictor pmv21 and the motion vector MV21 are the same, the motion vector difference signal diff_MV having a signal value of “0” is output from the motion vector processing unit 16 to the second zero setting unit 17. Then, the second zero setting unit 17 outputs the input motion vector difference signal diff_MV as it is to the variable length encoding unit 6 as the motion vector difference signal diff1_MV.

可変長符号化部6では、分割ブロックDB21に対応する動きベクトル差分信号diff1_MVに対して可変長符号化処理を行う。なお、分割ブロックDB21に対応する動きベクトル差分信号diff1_MVは、上記の通り、信号値が「0」となるので、可変長符号化処理後の分割ブロックDB21に相当する動画像符号化信号は、その発生符号量が抑制されたものとなる。   The variable length coding unit 6 performs variable length coding processing on the motion vector difference signal diff1_MV corresponding to the divided block DB21. Note that the motion vector difference signal diff1_MV corresponding to the divided block DB21 has a signal value of “0” as described above, and therefore the moving image encoded signal corresponding to the divided block DB21 after the variable-length encoding process is The generated code amount is suppressed.

以上のように、動画像符号化装置1000では、処理対象のマクロブロック内に無効領域がある場合、無効領域に相当する予測誤差信号の信号値を強制的に「0」にすることで、無効領域による不要な符号量の発生を抑制する。また、動画像符号化装置1000では、無効領域に相当する領域の動きベクトルを、周辺のブロックを用いて予測した予測動きベクトルとして、差分ベクトル信号を取得するので、無効領域についての動きベクトルを符号化する場合に、不要な符号量が発生することを適切に防止することができる。   As described above, in the video encoding device 1000, when there is an invalid area in the macroblock to be processed, the signal value of the prediction error signal corresponding to the invalid area is forcibly set to “0”, thereby invalidating the signal. The generation of an unnecessary code amount due to the region is suppressed. In addition, since the moving image coding apparatus 1000 acquires a difference vector signal using a motion vector of an area corresponding to an invalid area as a predicted motion vector predicted using surrounding blocks, the motion vector for the invalid area is encoded. In this case, it is possible to appropriately prevent an unnecessary code amount from being generated.

また、また、動画像符号化装置1000では、無効領域に相当する領域の動きベクトルを、周辺のブロックを用いて予測した予測動きベクトルとして、差分ベクトル信号を取得するので、動きベクトル探索処理を実行する必要がない。   In addition, since the moving image coding apparatus 1000 obtains a difference vector signal using a motion vector of an area corresponding to an invalid area as a predicted motion vector predicted using surrounding blocks, a motion vector search process is executed. There is no need to do.

≪変形例≫
次に、第1実施形態の変形例について、説明する。
≪Modification≫
Next, a modification of the first embodiment will be described.

本変形例では、無効領域の画素の画素値が全て同一値である場合についての動画像符号化装置1000の処理について説明する。   In the present modification, the processing of the moving image encoding apparatus 1000 when the pixel values of the pixels in the invalid area are all the same value will be described.

本変形例では、動画像符号化装置1000に、図13に示す画像を表示する動画像信号Dinが入力される場合について、以下、説明する。図13において、領域AR1および領域AR3が、無効領域(映像無効領域)であり、かつ、全ての画素の画素値が同一である領域であり、領域AR2が有効領域(映像有効領域)である。   In this modification, the case where the moving image signal Din for displaying the image shown in FIG. 13 is input to the moving image encoding apparatus 1000 will be described below. In FIG. 13, an area AR1 and an area AR3 are invalid areas (video invalid areas), the pixel values of all the pixels are the same, and an area AR2 is an effective area (video valid area).

まず、本変形例において、無効領域AR1の左上端に位置するマクロブロックMB0に対してイントラ予測処理が実行される場合について、説明する。   First, the case where the intra prediction process is performed on the macroblock MB0 located at the upper left end of the invalid area AR1 in the present modification will be described.

図14は、無効領域AR1の左上端に位置するマクロブロックMB0を示す図である。   FIG. 14 is a diagram showing the macro block MB0 located at the upper left corner of the invalid area AR1.

マクロブロックMB0は、無効領域AR1の左上端に位置するマクロブロックであるので、イントラ予測を実行する場合に、所定の値による画素値を用いて、イントラ予測処理が実行される。例えば、予測モード0である場合、図14に示すように、マクロブロックMB0の各列の画素値は、所定の値D1(例えば、「128」)に設定される。そして、本変形例における無効領域の画素値をD2とすると、イントラ予測部12は、マクロブロックMB0の全ての画素値がD1となるイントラ予測信号を取得する。イントラ予測部12は、取得したイントラ予測信号(信号値:D1)を符号化モード判定部15に出力する。   Since the macro block MB0 is a macro block located at the upper left corner of the invalid area AR1, when performing intra prediction, intra prediction processing is performed using pixel values of predetermined values. For example, in the case of the prediction mode 0, as shown in FIG. 14, the pixel value of each column of the macroblock MB0 is set to a predetermined value D1 (for example, “128”). Then, assuming that the pixel value of the invalid area in this modification is D2, the intra prediction unit 12 acquires an intra prediction signal in which all the pixel values of the macroblock MB0 are D1. The intra prediction unit 12 outputs the acquired intra prediction signal (signal value: D1) to the encoding mode determination unit 15.

符号化モード判定部15は、予測信号Dpとして、イントラ予測信号(信号値:D1)を減算器1に出力する。   The encoding mode determination unit 15 outputs an intra prediction signal (signal value: D1) to the subtracter 1 as the prediction signal Dp.

減算器1は、マクロブロックMB0に相当する動画像信号Din(信号値:D2)から、イントラ予測信号(信号値:D1)を減算することで予測誤差信号diff(信号値:D2−D1)を取得し、第1ゼロ設定部2に出力し、第1ゼロ設定部2は、入力された予測誤差信号diffを、そのまま、予測誤差信号diff1として出力する。そして、予測誤差信号diff1に対して、直交変換部4以降の処理が、上記と同様に実行される。   The subtractor 1 subtracts the intra prediction signal (signal value: D1) from the moving image signal Din (signal value: D2) corresponding to the macroblock MB0 to obtain the prediction error signal diff (signal value: D2-D1). Obtained and output to the first zero setting unit 2, and the first zero setting unit 2 outputs the input prediction error signal diff as it is as the prediction error signal diff1. And the process after the orthogonal transformation part 4 is performed similarly to the above with respect to the prediction error signal diff1.

つまり、本変形例では、上記実施形態と異なり、画像の左上端にあるマクロブロックMB0に対してイントラ予測処理が実行された場合、無効領域に相当する予測誤差信号diff1を強制的に「0」にしない。   That is, in the present modification, unlike the above embodiment, when the intra prediction process is performed on the macro block MB0 at the upper left corner of the image, the prediction error signal diff1 corresponding to the invalid region is forcibly set to “0”. Don't make it.

なお、図13に示すように、有効領域から無効領域に変わる最初のマクロブロックMBnにおいても、マクロブロックMB0についての上記処理と同様に、予測誤差信号diff1を強制的に「0」にしない。   As shown in FIG. 13, also in the first macroblock MBn that changes from the valid area to the invalid area, the prediction error signal diff1 is not forcibly set to “0” as in the above-described process for the macroblock MB0.

これは、デコード処理において、無効領域の全ての画素の画素値D2を再現させるためである。   This is because the pixel value D2 of all the pixels in the invalid area is reproduced in the decoding process.

なお、映像信号の有効領域が開始される位置(図13の左上端に相当する位置)のマクロブロックおよび有効領域から無効領域に移る最初の位置にあるマクロブロック(例えば、図13のマクロブロックMBn)以外の領域に対しては、上記実施形態と同様に、無効領域に相当する予測誤差信号diff1の信号値を強制的に「0」にする。   Note that the macroblock at the position where the effective area of the video signal is started (the position corresponding to the upper left corner in FIG. 13) and the macroblock at the first position where the effective area moves from the effective area to the invalid area (for example, macroblock MBn in FIG. 13). For regions other than), the signal value of the prediction error signal diff1 corresponding to the invalid region is forcibly set to “0” as in the above embodiment.

以上により、動画像符号化装置1000では、無効領域の画素の画素値が全て同一値である場合についても、無効領域において無駄な符号量の発生を適切に抑制することができる。   As described above, the moving image encoding apparatus 1000 can appropriately suppress generation of useless code amounts in the invalid area even when the pixel values of the pixels in the invalid area are all the same value.

なお、本変形例では、無効領域の画素の画素値が全て同じであるため、量子化処理により、量子化誤差が発生する場合、デコード処理後の信号において、もとの画素値が再現されない可能性がある。この場合、例えば、量子化部5に、ルックアップテーブルを設け、もとの画素値が必ず再現されるように量子化ステップ値(あるいは量子化パラメータ値)を、無効領域の画素の画素値に応じて決定するようにしてもよい。   In this modification, since the pixel values of the pixels in the invalid area are all the same, if a quantization error occurs due to the quantization process, the original pixel value may not be reproduced in the signal after the decoding process. There is sex. In this case, for example, a lookup table is provided in the quantization unit 5, and the quantization step value (or quantization parameter value) is changed to the pixel value of the pixel in the invalid area so that the original pixel value is always reproduced. It may be determined accordingly.

次に、本変形例において、無効領域AR1の左上端に位置するマクロブロックMB0に対してインター予測処理が実行される場合について、説明する。   Next, the case where the inter prediction process is performed on the macroblock MB0 located at the upper left end of the invalid area AR1 in the present modification will be described.

この場合、動画像符号化装置1000は、無効領域に含まれる分割ブロックの動きベクトルを「0」にする。これにより、参照画像における同一座標位置の分割ブロック(同一の画素値である画素からなる無効領域内の分割ブロック)が参照されるため、予測誤差信号diff1の信号値が「0」となる。したがって、動画像符号化装置1000では、無効領域の画素の画素値が全て同一値である場合についても、無効領域において無駄な符号量の発生を適切に抑制することができる。   In this case, the moving picture coding apparatus 1000 sets the motion vector of the divided block included in the invalid area to “0”. As a result, the divided block at the same coordinate position in the reference image (the divided block in the invalid area made up of pixels having the same pixel value) is referred to, so that the signal value of the prediction error signal diff1 becomes “0”. Therefore, in the moving image encoding apparatus 1000, even when the pixel values of the pixels in the invalid area are all the same value, it is possible to appropriately suppress the generation of a wasteful code amount in the invalid area.

[他の実施形態]
上記実施形態(変形例を含む)で示した、符号化コストを算出するための構成、および、符号化コストを算出するための処理方法は、一例であり、これに限定されない。既に開発されている多様な符号化コスト算出方法や構成を、上記実施形態の動画像符号化装置に適用するようにしてもよい。
[Other Embodiments]
The configuration for calculating the encoding cost and the processing method for calculating the encoding cost shown in the above embodiment (including the modification) are examples, and the present invention is not limited to this. Various encoding cost calculation methods and configurations that have already been developed may be applied to the moving image encoding apparatus of the above embodiment.

なお、上記実施形態では、マクロブロックのサイズが16×16の場合について、説明したが、これに限定されることはなく、マクロブロックのサイズは、他のサイズであってもよい。   In the above embodiment, the case where the size of the macroblock is 16 × 16 has been described. However, the present invention is not limited to this, and the size of the macroblock may be another size.

また、上記実施形態の動画像符号化装置の一部または全部は、集積回路(例えば、LSI、システムLSI等)として実現されるものであってもよい。   In addition, part or all of the moving image encoding apparatus according to the above-described embodiment may be realized as an integrated circuit (for example, an LSI, a system LSI, or the like).

上記実施形態の各機能ブロックの処理の一部または全部は、プログラムにより実現されるものであってもよい。そして、上記実施形態の各機能ブロックの処理の一部または全部は、コンピュータにおいて、中央演算装置(CPU)により行われる。また、それぞれの処理を行うためのプログラムは、ハードディスク、ROMなどの記憶装置に格納されており、ROMにおいて、あるいはRAMに読み出されて実行される。   Part or all of the processing of each functional block in the above embodiment may be realized by a program. A part or all of the processing of each functional block in the above embodiment is performed by a central processing unit (CPU) in the computer. In addition, a program for performing each processing is stored in a storage device such as a hard disk or a ROM, and is read out and executed in the ROM or the RAM.

また、上記実施形態の各処理をハードウェアにより実現してもよいし、ソフトウェア(OS(オペレーティングシステム)、ミドルウェア、あるいは、所定のライブラリとともに実現される場合を含む。)により実現してもよい。さらに、ソフトウェアおよびハードウェアの混在処理により実現しても良い。なお、上記実施形態に係る動画像符号化装置をハードウェアにより実現する場合、各処理を行うためのタイミング調整を行う必要があるのは言うまでもない。上記実施形態においては、説明便宜のため、実際のハードウェア設計で生じる各種信号のタイミング調整の詳細については省略している。   Each processing of the above embodiment may be realized by hardware, or may be realized by software (including a case where the processing is realized together with an OS (Operating System), middleware, or a predetermined library). Further, it may be realized by mixed processing of software and hardware. Needless to say, when the video encoding apparatus according to the above embodiment is realized by hardware, it is necessary to adjust the timing for performing each process. In the above embodiment, for convenience of explanation, details of timing adjustment of various signals generated in actual hardware design are omitted.

また、上記実施形態における処理方法の実行順序は、必ずしも、上記実施形態の記載に制限されるものではなく、発明の要旨を逸脱しない範囲で、実行順序を入れ替えることができるものである。   Moreover, the execution order of the processing method in the said embodiment is not necessarily restricted to description of the said embodiment, The execution order can be changed in the range which does not deviate from the summary of invention.

前述した方法をコンピュータに実行させるコンピュータプログラム及びそのプログラムを記録したコンピュータ読み取り可能な記録媒体は、本発明の範囲に含まれる。ここで、コンピュータ読み取り可能な記録媒体としては、例えば、フレキシブルディスク、ハードディスク、CD−ROM、MO、DVD、DVD−ROM、DVD−RAM、大容量DVD、次世代DVD、半導体メモリを挙げることができる。   A computer program that causes a computer to execute the above-described method and a computer-readable recording medium that records the program are included in the scope of the present invention. Here, examples of the computer-readable recording medium include a flexible disk, hard disk, CD-ROM, MO, DVD, DVD-ROM, DVD-RAM, large-capacity DVD, next-generation DVD, and semiconductor memory. .

上記コンピュータプログラムは、上記記録媒体に記録されたものに限られず、電気通信回線、無線又は有線通信回線、インターネットを代表とするネットワーク等を経由して伝送されるものであってもよい。   The computer program is not limited to the one recorded on the recording medium, and may be transmitted via a telecommunication line, a wireless or wired communication line, a network represented by the Internet, or the like.

なお、本発明の具体的な構成は、前述の実施形態に限られるものではなく、発明の要旨を逸脱しない範囲で種々の変更および修正が可能である。   The specific configuration of the present invention is not limited to the above-described embodiment, and various changes and modifications can be made without departing from the scope of the invention.

1000 動画像符号化装置
1 減算器
2 第1ゼロ設定部
3 コスト算出部
4 直交変換部
5 量子化部
6 可変長符号化部
10 記憶部
11 インター予測部
12 イントラ予測部
13 位置情報取得部
15 符号化モード判定部
1000 Moving image encoding device 1 Subtractor 2 First zero setting unit 3 Cost calculation unit 4 Orthogonal transformation unit 5 Quantization unit 6 Variable length encoding unit 10 Storage unit 11 Inter prediction unit 12 Intra prediction unit 13 Position information acquisition unit 15 Coding mode determination unit

Claims (8)

複数のマクロブロックからなるフレーム画像を形成することができる動画像信号を符号
化する動画像符号化装置であって、
参照画像を記憶する記憶部と、
現フレーム画像と前記参照画像とに基づいて、インター予測処理を実行し、インター予測信号を取得するインター予測部と、
現フレーム画像を用いて、イントラ予測処理を実行し、イントラ予測信号を取得するイントラ予測部と、
画面上で映像を構成する映像有効領域と、画面上で映像を構成しない映像無効領域との境界についての位置情報を取得する位置情報取得部と、
前記インター予測信号および前記イントラ予測信号のいずれかを予測信号として出力する符号化モード判定部と、
前記動画像信号と前記符号化モード判定部から出力される前記予測信号とに対して差分処理を行うことで、予測誤差信号を取得する差分処理部と、
前記予測誤差信号が、前記映像無効領域に相当する信号である場合、前記予測誤差信号の信号値を「0」にすることで第1予測誤差信号を取得する第1ゼロ設定部と、
前記第1予測誤差信号に対して、直交変換処理を実行する直交変換部と、
前記直交変換部により処理された信号を量子化する量子化部と、
前記量子化部により処理された信号に対して可変長符号化処理を実行することで、動画像符号化信号を取得する可変長符号化部と、
を備える動画像符号化装置。
A moving image encoding apparatus that encodes a moving image signal capable of forming a frame image composed of a plurality of macroblocks,
A storage unit for storing a reference image;
Based on the current frame image and the reference image, an inter prediction unit that performs inter prediction processing and acquires an inter prediction signal;
An intra prediction unit that executes an intra prediction process using the current frame image and acquires an intra prediction signal;
A position information acquisition unit that acquires position information about a boundary between a video valid area that configures video on the screen and a video invalid area that does not configure video on the screen;
A coding mode determination unit that outputs one of the inter prediction signal and the intra prediction signal as a prediction signal;
A difference processing unit that obtains a prediction error signal by performing difference processing on the moving image signal and the prediction signal output from the encoding mode determination unit;
A first zero setting unit that obtains a first prediction error signal by setting a signal value of the prediction error signal to “0” when the prediction error signal is a signal corresponding to the video invalid area;
An orthogonal transform unit that performs an orthogonal transform process on the first prediction error signal;
A quantization unit that quantizes the signal processed by the orthogonal transform unit;
A variable length coding unit that obtains a moving image coded signal by performing a variable length coding process on the signal processed by the quantization unit;
A video encoding device comprising:
処理対象のマクロブロックを所定の分割方法により分割して取得した分割ブロックについて取得された前記第1予測誤差信号に基づいて、前記分割ブロックについての符号化コストを算出する符号化コスト算出部をさらに備え、
前記符号化モード判定部は、
前記符号化モード判定部により算出された前記符号化コストに基づいて、処理対象のマクロブロックの分割方法を決定し、決定された分割方法により取得された分割ブロックに前記映像無効領域を含む場合、当該無効領域に対応する前記予測誤差信号の信号値を「0」にするための第1制御信号を生成し、
前記第1ゼロ設定部は、
前記符号化モード判定部により生成された前記第1制御信号に基づいて、前記分割ブロックに含まれる前記映像無効領域に対応する前記予測誤差信号の信号値を「0」にする、
請求項1に記載の動画像符号化装置。
An encoding cost calculation unit for calculating an encoding cost for the divided block based on the first prediction error signal acquired for the divided block acquired by dividing the macroblock to be processed by a predetermined dividing method; Prepared,
The encoding mode determination unit
Based on the encoding cost calculated by the encoding mode determination unit, determine a method for dividing a macroblock to be processed, and when the divided block obtained by the determined division method includes the video invalid area, Generating a first control signal for setting the signal value of the prediction error signal corresponding to the invalid region to “0”;
The first zero setting unit includes:
Based on the first control signal generated by the encoding mode determination unit, the signal value of the prediction error signal corresponding to the video invalid area included in the divided block is set to “0”.
The moving image encoding apparatus according to claim 1.
処理対象ブロックの周辺のブロックの動きベクトルに基づいて、前記処理対象ブロックの予測動きベクトルを取得する動きベクトル処理部をさらに備え、
前記インター予測部は、
前記符号化モード判定部により設定された分割ブロックの前記予測動きベクトルを前記動きベクトル処理部から取得し、取得した前記分割ブロックの前記予測動きベクトルに基づいて、前記分割ブロックに対して、前記インター予測処理を実行することで、前記分割ブロックの動きベクトルを取得し、取得した前記分割ブロックの動きベクトルを前記動きベクトル処理部に出力し、
前記動きベクトル処理部は、
前記分割ブロックの前記動きベクトルと、前記分割ブロックの予測動きベクトルとに対して差分処理を行うことで、差分ベクトル信号を取得する、
請求項2に記載の動画像符号化装置。
A motion vector processing unit that obtains a predicted motion vector of the processing target block based on motion vectors of blocks around the processing target block;
The inter prediction unit
The prediction motion vector of the divided block set by the encoding mode determination unit is acquired from the motion vector processing unit, and the interblock is determined for the divided block based on the acquired prediction motion vector of the divided block. By executing a prediction process, the motion vector of the divided block is obtained, and the obtained motion vector of the divided block is output to the motion vector processing unit,
The motion vector processing unit
A difference vector signal is obtained by performing a difference process on the motion vector of the divided block and the predicted motion vector of the divided block.
The moving image encoding apparatus according to claim 2.
前記差分ベクトル信号が、前記映像無効領域に相当する信号である場合、前記差分ベクトル信号の信号値を「0」にすることで第1差分ベクトル信号を取得する第2ゼロ設定部をさらに備え、
前記符号化モード判定部は、
前記分割ブロックに前記映像無効領域が含まれる場合、当該無効領域に対応する前記差分ベクトル信号の信号値を「0」にするための第2制御信号を生成し、
前記第2ゼロ設定部は、
前記符号化モード判定部により生成された前記第2制御信号に基づいて、前記分割ブロックに含まれる前記映像無効領域に対応する前記差分ベクトル信号の信号値を「0」にする、
請求項3に記載の動画像符号化装置。
When the difference vector signal is a signal corresponding to the video invalid area, further comprising a second zero setting unit for obtaining a first difference vector signal by setting a signal value of the difference vector signal to “0”.
The encoding mode determination unit
If the divided block includes the video invalid area, a second control signal for setting the signal value of the difference vector signal corresponding to the invalid area to “0” is generated.
The second zero setting unit includes:
Based on the second control signal generated by the encoding mode determination unit, the signal value of the difference vector signal corresponding to the video invalid area included in the divided block is set to “0”.
The moving image encoding apparatus according to claim 3.
前記インター予測部は、前記分割ブロックに前記映像無効領域が含まれる場合、当該分割ブロックの動きベクトルを算出する単位のブロックが全て前記映像無効領域である場合、当該ブロックの動きベクトルを当該ブロックの周辺の予測動きベクトルとする、
請求項4に記載の動画像符号化装置。
The inter prediction unit, when the video invalid area is included in the divided block, and when the unit block for calculating the motion vector of the divided block is all the video invalid area, the motion vector of the block Let it be a predicted motion vector around
The moving image encoding apparatus according to claim 4.
前記符号化コスト算出部は、
前記分割ブロックについて取得された前記第1予測誤差信号と、前記差分ベクトル信号とに基づいて、前記分割ブロックについての符号化コストを算出する、
請求項3から5のいずれかに記載の動画像符号化装置。
The encoding cost calculation unit
An encoding cost for the divided block is calculated based on the first prediction error signal acquired for the divided block and the difference vector signal.
The moving image encoding apparatus according to claim 3.
複数のマクロブロックからなるフレーム画像を形成することができる動画像信号を符号
化する動画像符号化方法であって、
参照画像を記憶する記憶ステップと、
現フレーム画像と前記参照画像とに基づいて、インター予測処理を実行し、インター予測信号を取得するインター予測ステップと、
現フレーム画像を用いて、イントラ予測処理を実行し、イントラ予測信号を取得するイントラ予測ステップと、
画面上で映像を構成する映像有効領域と、画面上で映像を構成しない映像無効領域との境界についての位置情報を取得する位置情報取得ステップと、
前記インター予測信号および前記イントラ予測信号のいずれかを予測信号として出力する符号化モード判定ステップと、
前記動画像信号と前記符号化モード判定ステップにより出力される前記予測信号とに対して差分処理を行うことで、予測誤差信号を取得する差分処理ステップと、
前記予測誤差信号が、前記映像無効領域に相当する信号である場合、前記予測誤差信号の信号値を「0」にすることで第1予測誤差信号を取得する第1ゼロ設定ステップと、
前記第1予測誤差信号に対して、直交変換処理を実行する直交変換ステップと、
前記直交変換ステップにより処理された信号を量子化する量子化ステップと、
前記量子化ステップにより処理された信号に対して可変長符号化処理を実行することで、動画像符号化信号を取得する可変長符号化ステップと、
を備える動画像符号化方法をコンピュータに実行させるためのプログラム。
A moving image encoding method for encoding a moving image signal capable of forming a frame image composed of a plurality of macroblocks,
A storage step for storing a reference image;
An inter prediction step of performing an inter prediction process based on a current frame image and the reference image and obtaining an inter prediction signal;
An intra prediction step of performing an intra prediction process using the current frame image and obtaining an intra prediction signal;
A position information acquisition step for acquiring position information about a boundary between a video valid area constituting a video on the screen and a video invalid area not constituting a video on the screen;
A coding mode determination step of outputting either the inter prediction signal or the intra prediction signal as a prediction signal;
A difference processing step for obtaining a prediction error signal by performing difference processing on the moving image signal and the prediction signal output by the encoding mode determination step;
A first zero setting step of obtaining a first prediction error signal by setting a signal value of the prediction error signal to “0” when the prediction error signal is a signal corresponding to the video invalid area;
An orthogonal transform step of performing an orthogonal transform process on the first prediction error signal;
A quantization step for quantizing the signal processed by the orthogonal transformation step;
A variable length coding step for obtaining a moving image coded signal by performing a variable length coding process on the signal processed by the quantization step;
A program for causing a computer to execute a moving image encoding method.
複数のマクロブロックからなるフレーム画像を形成することができる動画像信号を符号
化する集積回路であって、
参照画像を記憶する記憶部と、
現フレーム画像と前記参照画像とに基づいて、インター予測処理を実行し、インター予測信号を取得するインター予測部と、
現フレーム画像を用いて、イントラ予測処理を実行し、イントラ予測信号を取得するイントラ予測部と、
画面上で映像を構成する映像有効領域と、画面上で映像を構成しない映像無効領域との境界についての位置情報を取得する位置情報取得部と、
前記インター予測信号および前記イントラ予測信号のいずれかを予測信号として出力する符号化モード判定部と、
前記動画像信号と前記符号化モード判定部から出力される前記予測信号とに対して差分処理を行うことで、予測誤差信号を取得する差分処理部と、
前記予測誤差信号が、前記映像無効領域に相当する信号である場合、前記予測誤差信号の信号値を「0」にすることで第1予測誤差信号を取得する第1ゼロ設定部と、
前記第1予測誤差信号に対して、直交変換処理を実行する直交変換部と、
前記直交変換部により処理された信号を量子化する量子化部と、
前記量子化部により処理された信号に対して可変長符号化処理を実行することで、動画像符号化信号を取得する可変長符号化部と、
を備える集積回路。
An integrated circuit that encodes a moving image signal capable of forming a frame image composed of a plurality of macroblocks,
A storage unit for storing a reference image;
Based on the current frame image and the reference image, an inter prediction unit that performs inter prediction processing and acquires an inter prediction signal;
An intra prediction unit that executes an intra prediction process using the current frame image and acquires an intra prediction signal;
A position information acquisition unit that acquires position information about a boundary between a video valid area that configures video on the screen and a video invalid area that does not configure video on the screen;
A coding mode determination unit that outputs one of the inter prediction signal and the intra prediction signal as a prediction signal;
A difference processing unit that obtains a prediction error signal by performing difference processing on the moving image signal and the prediction signal output from the encoding mode determination unit;
A first zero setting unit that obtains a first prediction error signal by setting a signal value of the prediction error signal to “0” when the prediction error signal is a signal corresponding to the video invalid area;
An orthogonal transform unit that performs an orthogonal transform process on the first prediction error signal;
A quantization unit that quantizes the signal processed by the orthogonal transform unit;
A variable length coding unit that obtains a moving image coded signal by performing a variable length coding process on the signal processed by the quantization unit;
An integrated circuit comprising:
JP2014070726A 2014-03-31 2014-03-31 Moving picture coding apparatus, program, and integrated circuit Active JP6308838B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014070726A JP6308838B2 (en) 2014-03-31 2014-03-31 Moving picture coding apparatus, program, and integrated circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014070726A JP6308838B2 (en) 2014-03-31 2014-03-31 Moving picture coding apparatus, program, and integrated circuit

Publications (3)

Publication Number Publication Date
JP2015192438A true JP2015192438A (en) 2015-11-02
JP2015192438A5 JP2015192438A5 (en) 2017-03-30
JP6308838B2 JP6308838B2 (en) 2018-04-11

Family

ID=54426587

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014070726A Active JP6308838B2 (en) 2014-03-31 2014-03-31 Moving picture coding apparatus, program, and integrated circuit

Country Status (1)

Country Link
JP (1) JP6308838B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111681199A (en) * 2019-02-25 2020-09-18 北京地平线机器人技术研发有限公司 Method and device for detecting image validity

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07123412A (en) * 1993-10-21 1995-05-12 Sanyo Electric Co Ltd Moving image compression-encoding method
JP2007124564A (en) * 2005-10-31 2007-05-17 Matsushita Electric Ind Co Ltd Image coding apparatus, method, and program
JP2010193401A (en) * 2009-02-20 2010-09-02 Canon Inc Image encoding method and apparatus
JP2012195702A (en) * 2011-03-15 2012-10-11 Fujitsu Ltd Image encoding method and image encoding device
JP2013098745A (en) * 2011-10-31 2013-05-20 Fujitsu Ltd Moving image decoder, moving image encoder, moving image decoding method, moving image encoding method, moving image decoding program and moving image encoding program
JP2013214990A (en) * 2009-10-30 2013-10-17 Samsung Electronics Co Ltd Method and apparatus for encoding and decoding coding unit of picture boundary

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07123412A (en) * 1993-10-21 1995-05-12 Sanyo Electric Co Ltd Moving image compression-encoding method
JP2007124564A (en) * 2005-10-31 2007-05-17 Matsushita Electric Ind Co Ltd Image coding apparatus, method, and program
JP2010193401A (en) * 2009-02-20 2010-09-02 Canon Inc Image encoding method and apparatus
JP2013214990A (en) * 2009-10-30 2013-10-17 Samsung Electronics Co Ltd Method and apparatus for encoding and decoding coding unit of picture boundary
JP2012195702A (en) * 2011-03-15 2012-10-11 Fujitsu Ltd Image encoding method and image encoding device
JP2013098745A (en) * 2011-10-31 2013-05-20 Fujitsu Ltd Moving image decoder, moving image encoder, moving image decoding method, moving image encoding method, moving image decoding program and moving image encoding program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111681199A (en) * 2019-02-25 2020-09-18 北京地平线机器人技术研发有限公司 Method and device for detecting image validity
CN111681199B (en) * 2019-02-25 2023-11-03 北京地平线机器人技术研发有限公司 Method and device for detecting image validity

Also Published As

Publication number Publication date
JP6308838B2 (en) 2018-04-11

Similar Documents

Publication Publication Date Title
JP7507166B2 (en) Constraints on decoder-side motion vector refinement.
CN109587479B (en) Inter-frame prediction method and device for video image and coder-decoder
JP7171770B2 (en) Memory access windowing and padding for motion vector refinement and motion compensation
JP6546277B2 (en) Image prediction method and related apparatus
JP2021022936A (en) Image prediction method and related device
RU2721004C1 (en) Method and device for predicting motion compensation
KR20110008653A (en) Method and apparatus for predicting motion vector and method and apparatus of encoding/decoding a picture using the same
JP2015506606A (en) Perform motion vector prediction for video coding
JP2010011075A (en) Method and apparatus for encoding and decoding moving image
JP2021502031A (en) Interpolation filters for inter-prediction equipment and methods for video coding
JP4787044B2 (en) Image decoding apparatus, image decoding method, image decoding program, and image decoding integrated circuit
US10349071B2 (en) Motion vector searching apparatus, motion vector searching method, and storage medium storing motion vector searching program
JP2024038060A (en) Method for refining accuracy of sub-pixel of error surface base for decoder side motion vector refinement
JP2024016288A (en) Method and apparatus for decoder side motion vector correction in video coding
JP6308838B2 (en) Moving picture coding apparatus, program, and integrated circuit
KR20200134302A (en) Image processing apparatus and method
US12015780B2 (en) Inter prediction method and apparatus, video encoder, and video decoder
JP6646125B2 (en) Video prediction decoding method and video prediction decoding device
JP5637010B2 (en) Motion vector detection apparatus, motion vector detection method, and motion vector detection program
JP2008283302A (en) Motion image processor and motion image processing method
JP2019176421A (en) Image decoding device, image encoding device, image processing system, image decoding method and program
JP2017168955A (en) Image decoding apparatus, image decoding program and chip
JP2015088954A (en) Image encoder and image encoding program
JP2012138947A (en) Video encoder, video decoder, video encoding method, video decoding method, video encoding program and video decoding program

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170217

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170217

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20171207

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20171219

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180124

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180313

R150 Certificate of patent or registration of utility model

Ref document number: 6308838

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250