JP2015192438A - Moving image encoding processing device, program and integrated circuit - Google Patents
Moving image encoding processing device, program and integrated circuit Download PDFInfo
- 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
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
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,
しかしながら、特許文献1の技術では、指定された領域の量子化ステップを調整するだけであり、指定された領域に対して動画圧縮処理を実行する場合に生成される残差信号を制御するものではないので、残差信号が大きな場合には、当該指定された領域に対して動画圧縮処理を実行した場合に発生する符号量が多くなることがある。
However, the technique of
また、特許文献1の技術では、有効領域(映像有効領域)と余分な領域(映像無効領域)との両方を含んだマクロブロックに対して、符号量が少なくなるよう量子化ステップが制御される可能性がある。この場合、当該マクロブロックについての発生符号量が少なくなるように当該マクロブロックに適用される量子化ステップが比較的大きな値に設定されることになる。その結果、余分な領域(映像無効領域)から取得される残差信号の発生符号量を抑制することができるが、有効領域(映像有効領域)から取得される残差信号の発生符号量も抑制されることになる。したがって、このようにエンコードされた信号(動画像圧縮処理が実行された符号化信号)を、デコードすることで取得される映像において、当該マクロブロックに含まれる有効領域(映像有効領域)の画質が劣化する可能性がある。
In the technique disclosed in
また、その全部または一部に、余分な領域(映像無効領域)を含むマクロブロックについて、動きベクトルの探索処理を行う場合、当該余分な領域も探索対象として動きベクトルの探索処理が実行されるので、精度の良い動きベクトルの探索処理を実行することができない。 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実施形態]
第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
動画像符号化装置1000は、例えば、H.264に準拠した動画像符号化信号を生成し、出力することができる構成を有している。
The moving
動画像符号化装置1000は、図1に示すように、減算器1と、第1ゼロ設定部2と、コスト算出部3と、直交変換部4と、量子化部5と、可変長符号化部6と、逆量子化部7と、逆直交変換部8と、加算器9と、記憶部10と、を備える。
As shown in FIG. 1, the moving
また、動画像符号化装置1000は、図1に示すように、インター予測部11と、イントラ予測部12と、位置情報取得部13と、スキップMB判定部14と、符号化モード判定部15と、動きベクトル処理部16と、第2ゼロ設定部17と、を備える。
In addition, as illustrated in FIG. 1, the moving
減算器1は、動画像信号Dinと、符号化モード判定部15から出力される予測信号Dp(予測動画像信号)と、を入力する。減算器1は、動画像信号Dinと、予測信号Dpとの差分信号である予測誤差信号diffを取得し、取得した予測誤差信号diffを第1ゼロ設定部2に出力する。
The
第1ゼロ設定部2は、符号化モード判定部から出力される制御信号ctl_z1と、減算器1から出力される予測誤差信号diffとを入力する。第1ゼロ設定部2は、制御信号ctl_z1に基づいて、予測誤差信号diffまたは予測誤差信号diffの信号値を強制的に「0」にした信号のいずれかを選択し、予測誤差信号diff1として、コスト算出部3および直交変換部4に出力する。なお、第1ゼロ設定部2は、図1に示すように、例えば、セレクタsel1を用いて実現される。
The first zero
コスト算出部3は、第1ゼロ設定部2から出力される予測誤差信号diff1と、第2ゼロ設定部17から出力される動きベクトル差分信号diff1_MVに基づいて、符号化コストの算出を行う。そして、算出した符号化コストを含む情報costを符号化モード判定部15に出力する。
The
なお、コスト算出部3は、動画像符号化装置の制御を行う制御部(不図示)から、符号化コストの算出処理に必要な情報、例えば、マクロブロック(例えば、H.264規格に準拠する場合16画素×16画素からなるマクロブロック)と同一のサイズのブロックを分割して取得される分割ブロックサイズ、分割方法、イントラ予測/インター予測の種別等の情報を取得する。
Note that the
直交変換部4は、第1ゼロ設定部2から出力される予測誤差信号diff1を入力する。直交変換部4は、入力された予測誤差信号diff1に対して、所定のブロック単位(例えば、8画素×8画素のブロック単位や、4画素×4画素のブロック単位)で直交変換(例えば、整数変換や離散コサイン変換(DCT))を実行し、直交変換後の信号を量子化部5に出力する。
The
量子化部5は、直交変換部4から出力される直交変換後の信号を入力する。量子化部5は、直交変換部4から出力される直交変換後の信号に対して、量子化処理を実行し、量子化処理後の信号を、可変長符号化部6および逆量子化部7に出力する。
The
逆量子化部7は、量子化部5から出力される信号を入力し、当該信号に対して、逆量子化処理を実行する。そして、逆量子化部7は、逆量子化処理後の信号を逆直交変換部8に出力する。
The
逆直交変換部8は、逆量子化部7から出力される信号を入力し、当該信号に対して、逆直交変換処理を実行する。これにより、逆直交変換部8は、直交変換部4に入力された予測誤差信号diff1と同様の信号(予測誤差信号diff1’)を取得する。そして、逆直交変換部8は、逆直交変換処理後の信号(予測誤差信号diff1’)を加算器9に出力する。
The inverse orthogonal transform unit 8 receives the signal output from the
なお、予測誤差信号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
記憶部10は、例えば、複数フレーム分の動画像信号(データ)を記憶することができるフレームメモリである。記憶部10は、加算器9から出力される動画像信号Din’を記憶する。また、記憶部10は、インター予測処理用の基準フレーム(例えば、現フレームの1フレーム前のフレーム)の動画像信号をインター予測部11に出力する。また、記憶部10は、イントラ予測処理用の基準フレーム(現フレーム)あるいは、当該基準フレームの所定の領域に相当するデータ(例えば、イントラ予測を行う単位のブロックのデータや、当該ブロックの複数個からなる領域のデータ)をイントラ予測部12に出力する。
The
インター予測部11は、動画像信号Dinと、記憶部10からの出力(参照画像を形成する動画像信号)と、を入力する。また、インター予測部11は、符号化モード判定部から出力される制御信号ctl1と、位置情報取得部13から出力される位置情報posとを入力する。インター予測部11は、制御信号ctl1と位置情報posとに基づいて、インター予測処理を実行し、インター予測信号(インター予測動画像信号)を取得する。そして、インター予測部11は、取得したインター予測信号を符号化モード判定部15に出力する。
The
また、インター予測部11は、動きベクトル処理部16から予測動きベクトルpMV(予測動きベクトルに関する情報)を入力する。そして、インター予測部11は、当該予測動きベクトルpMVを、動きベクトルの探索処理の初期ベクトルに設定し、動きベクトルの探索処理を実行する。そして、インター予測部11は、動きベクトルの探索処理により取得した動きベクトルMV(動きベクトル情報MV)を動きベクトル処理部16に出力する。
In addition, the
イントラ予測部12は、動画像信号Dinと、記憶部10からの出力(イントラフレーム画像(現フレーム画像)を形成する動画像信号)と、を入力する。また、イントラ予測部12は、符号化モード判定部から出力される制御信号ctl2と、位置情報取得部13から出力される位置情報posとを入力する。イントラ予測部12は、制御信号ctl2と位置情報posとに基づいて、イントラ予測処理を実行し、イントラ予測信号(イントラ予測動画像信号)を取得する。そして、イントラ予測部12は、取得したイントラ予測信号を符号化モード判定部15に出力する。
The
位置情報取得部13は、動画像信号Dinと、映像無効領域を特定するための情報Info_areaとを入力とする。位置情報取得部13は、処理対象中のマクロブロックの画面上の位置情報を取得する。また、位置情報取得部13は、情報Info_areaに基づいて、処理対象中のマクロブロックが、映像無効領域内に存在するのか否かについての情報を取得する。そして、位置情報取得部13は、取得した上記2つの情報を含む情報を位置情報posとして、インター予測部11と、イントラ予測部12と、スキップMB判定部14と、符号化モード判定部15と、動きベクトル処理部16とに出力する。
The position
スキップMB判定部14は、動画像信号Dinと、位置情報取得部13から出力される位置情報posと、を入力とする。スキップMB判定部14は、位置情報posに基づいて、処理対象中のマクロブロックをスキップマクロブロック(スキップトマクロブロック)とするか否かを判定し、その判定結果を示す情報を符号化モード判定部15に出力する。
The skip
符号化モード判定部15は、位置情報取得部13から出力される位置情報posと、スキップMB判定部14から出力される情報と、インター予測部11からの出力と、イントラ予測部12からの出力と、コスト算出部3から出力される情報costと、を入力とする。
The encoding
符号化モード判定部15は、位置情報posに基づいて、符号化コスト算出処理のときに、映像無効領域に対応する予測誤差信号が強制的に「0」となるように制御信号ctl_z1を設定する。符号化モード判定部15は、制御信号ctl_z1を第1ゼロ設定部2に出力する。
Based on the position information pos, the encoding
また、符号化モード判定部15は、位置情報posに基づいて、符号化コスト算出処理のときに、所定の条件を満たし、映像無効領域に対応するベクトル差分信号が強制的に「0」となるように制御信号ctl_z2を設定する。符号化モード判定部15は、制御信号ctl_z2を第2ゼロ設定部17に出力する。
Also, the encoding
また、符号化モード判定部15は、コスト算出部3から出力される情報costと、位置情報posとに基づいて、処理対象マクロブロックについて、インター予測を適用するのか、あるいは、イントラ予測を適用するのかを決定する。
(1)インター予測を適用すると判定された場合、符号化モード判定部15は、インター予測部11に、インター予測処理を実行させるための制御信号ctl1を生成し、当該制御信号ctl1をインター予測部11に出力する。
(2)イントラ予測を適用すると判定された場合、符号化モード判定部15は、イントラ予測部12に、イントラ予測処理を実行させるための制御信号ctl2を生成し、当該制御信号ctl2をイントラ予測部12に出力する。
In addition, the encoding
(1) When it is determined that the inter prediction is applied, the encoding
(2) When it is determined that intra prediction is to be applied, the encoding
また、符号化モード判定部15は、採用した予測方法(イントラ予測/インター予測)についての情報、イントラ予測モード、イントラ予測処理に用いたブロックサイズ、インター予測に用いたブロックサイズ(分割ブロックサイズ、マクロブロック・パーティション)、サブマクロブロック・パーティションについての情報等を、情報Info_modeとして、可変長符号化部6に出力する。
The encoding
動きベクトル処理部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
第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
The second zero setting
可変長符号化部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
<1.2:動画像符号化装置の動作>
以上のように構成された動画像符号化装置1000の動作について、以下、説明する。
<1.2: Operation of Video Encoding Device>
The operation of the moving
(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
図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
位置情報取得部13は、情報Info_areaに基づいて、処理対象中のマクロブロックMB1が、下半分の領域に無効領域を有することを示す情報を取得し、当該情報と上記情報Info_areaを含む位置情報posとして、インター予測部11と、イントラ予測部12と、動きベクトル処理部16とに出力する。
Based on the information Info_area, the position
動画像符号化装置1000では、符号化コストの算出処理が実行される。具体的には、以下の(A)に示した処理により、インター予測処理による符号化コストの算出処理が実行され、以下の(B)に示した処理により、イントラ予測処理による符号化コストの算出処理が実行される。
In the moving
(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
(A2) The encoding
(A3) The encoding
(A4) The first zero
(A5) Also, the
(A6) The second zero setting
(A7) The
(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
マクロブロック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
(B2) The encoding
(B3) The encoding
(B4) The first zero
(B5) The
上記処理により取得された、インター予測処理による符号化コストと、イントラ予測処理による符号化コストとに関する情報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
符号化モード判定部15では、コスト算出部3により取得された符号化コストに関する情報costに基づいて、マクロブロックMB1に対して、インター予測処理を行うのか、それとも、イントラ予測処理を行うのかを決定する。つまり、符号化モード判定部15は、最小の符号化コストとなる予測処理を、インター予測部11、または、イントラ予測部12に実行させるための制御信号ctl1、または、制御信号ctl2を生成する。
The coding
≪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
インター予測部11は、符号化モード判定部15からの制御信号ctl1に従い、マクロブロックMB1の上半分の領域(有効領域)について、動き推定(ME)および動き補償(MC)を実行する。なお、処理対象ブロックであるマクロブロックMB1の上半分の16×8のブロックを「注目分割ブロック」という。
The
また、インター予測部11は、記憶部10から入力された参照画像と、動き推定(ME)処理で取得した動きベクトルMVとに基づいて、動き補償(MC)を実行することで、注目分割ブロックについてのインター予測信号を取得し、符号化モード判定部15に出力する。
In addition, the
符号化モード判定部15は、注目分割ブロックが16×8であり、マクロブロックMB1の下半分の領域(16×8の領域)が無効領域であるので、動き補償(MC)のブロックサイズを16×16に設定する。さらに、符号化モード判定部15は、マクロブロックMB1の動きベクトルを、インター予測部11が、注目分割ブロック(マクロブロックMB1の上半分の領域(16×8の領域))を処理対象として取得した動きベクトルMVとする。この処理について、図3を用いて、説明する。
The encoding
図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
符号化モード判定部15は、上記のようにして取得されたインター予測信号、および、注目分割ブロック(有効領域)の動きベクトルMV1に基づいて、マクロブロックMB1の動き補償のブロックサイズを16×16に設定し、当該16×16のブロックの動きベクトルをMV1として、予測信号Dpを生成し、減算器1に出力する。また、符号化モード判定部15は、マクロブロックMB1の動き補償のブロックサイズが16×16であることと、マクロブロックMB1に対してインター予測処理が実行されたことを示す情報を情報Info_modeとして、可変長符号化部6に出力する。
The encoding
また、符号化モード判定部15は、無効領域に相当する予測誤差信号diffの信号値が強制的に「0」となるように制御信号ctl_z1を生成し、第1ゼロ設定部2に出力する。
Also, the encoding
減算器1は、マクロブロックMB1に相当する動画像信号Dinから、符号化モード判定部15から入力された予測信号Dpを減算し取得した予測誤差信号diffを、第1ゼロ設定部2に出力する。
The
第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
直交変換部4では、予測誤差信号diff1に対して、直交変換処理を実行し、直交変換後の信号が量子化部5に出力される。
The
量子化部5は、直交変換部4から入力される信号に対して量子化処理を実行し、量子化処理後の信号を可変長符号化部6に出力する。
The
また、インター予測部11は、上記により取得された動きベクトルMV1を動きベクトル処理部16に出力する。
Further, the
動きベクトル処理部16は、インター予測部11から入力された動きベクトルMV1と、注目分割ブロックの周辺から取得した予測動きベクトルpMVとの差分をとり、動きベクトル差分信号diff_MVを第2ゼロ設定部17に出力する。第2ゼロ設定部17は、動きベクトル処理部16から入力した動きベクトル差分信号diff_MVを、マクロブロックMB1用の動きベクトル差分信号diff1_MVとして、可変長符号化部6に出力する。
The motion
可変長符号化部6は、量子化部5から入力された信号に対して可変長符号化処理を実行する。
The variable length encoding unit 6 performs variable length encoding processing on the signal input from the
また、可変長符号化部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
可変長符号化部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
≪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
図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
なお、説明便宜のため、分割ブロックDB11が注目分割ブロック(処理対象分割ブロック)である場合について、以下、説明する。
For convenience of explanation, a case where the divided
インター予測部11は、分割ブロックDB11についての動き推定処理(ME)により注目分割ブロックDB11の動きベクトルMV11を取得する。インター予測部11は、取得した動きベクトルMV11を動きベクトル処理部16に出力する。
The
また、インター予測部11は、記憶部10から入力された参照画像と、取得した動きベクトルMV11とに基づいて、動き補償(MC)を実行することで、注目分割ブロックDB11についてのインター予測信号を取得し、符号化モード判定部15に出力する。
In addition, the
符号化モード判定部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
パターン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
符号化モード判定部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
また、符号化モード判定部15は、無効領域に相当する予測誤差信号diffの信号値が強制的に「0」となるように制御信号ctl_z1を生成し、第1ゼロ設定部2に出力する。
Also, the encoding
減算器1は、ME用ブロックDB11eに相当する動画像信号Dinから、符号化モード判定部15から入力された予測信号Dpを減算し取得した予測誤差信号diffを、第1ゼロ設定部2に出力する。
The
第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
直交変換部4では、予測誤差信号diff1に対して、直交変換処理を実行し、直交変換後の信号が量子化部5に出力される。
The
量子化部5は、直交変換部4から入力される信号に対して量子化処理を実行し、量子化処理後の信号を可変長符号化部6に出力する。
The
また、インター予測部11は、上記により取得された動きベクトルMV11e(MV11と同じ動きベクトル)を動きベクトル処理部16に出力する。
Further, the
動きベクトル処理部16は、インター予測部11から入力された動きベクトルMV11e(MV11と同じ動きベクトル)と、注目分割ブロックの周辺から取得した予測動きベクトルpMVとの差分をとり、動きベクトル差分信号diff_MVを第2ゼロ設定部17に出力する。第2ゼロ設定部17は、動きベクトル処理部16から入力した動きベクトル差分信号diff_MVを、ME用ブロックDB11e用の動きベクトル差分信号diff1_MVとして、可変長符号化部6に出力する。
The motion
可変長符号化部6は、量子化部5から入力された信号に対して可変長符号化処理を実行する。
The variable length encoding unit 6 performs variable length encoding processing on the signal input from the
また、可変長符号化部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
可変長符号化部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
なお、上記では、分割ブロック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
図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
なお、説明便宜のため、サブブロック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
インター予測部11は、取得した動きベクトルmv22を動きベクトル処理部16に出力する。
The
また、インター予測部11は、記憶部10から入力された参照画像と、取得した動きベクトルmv22とに基づいて、動き補償(MC)を実行することで、注目ブロックdB22についてのインター予測信号を取得し、符号化モード判定部15に出力する。つまり、注目ブロックdB22については、H.264に規格されている通りの処理を行う。そして、そのために、符号化モード判定部15は、注目ブロックdB22に相当する予測誤差信号diffが、第1ゼロ設定部2において、そのまま、予測誤差信号diff1として出力されるように、制御信号ctl1を生成する。
The
また、インター予測部11は、注目ブロックdB22について取得された動きベクトルmv22を動きベクトル処理部16に出力し、動きベクトル処理部16は、注目ブロックdB22の周辺ブロックから取得された予測動きベクトルと、動きベクトルmv22との差分をとることで、動きベクトル差分信号diff_MVを取得し、第2ゼロ設定部17に出力する。
Further, the
第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
つまり、注目ブロック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
第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
次に、分割ブロック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
インター予測部11は、制御信号ctl1に従い、動きベクトル処理部16から、分割ブロックdB31の周辺のブロックから取得された予測動きベクトルpmv31を取得する。例えば、分割ブロックdB31の周辺のブロックおよび取得された動きベクトルが図5の左図に示す場合、動きベクトル処理部16は、H.264規格の規定通り、pmv31を、
pmv31=median(mv21,mv23,mv30)
median():要素のメディアン値をとる関数
mv21:ブロックdB21の動きベクトル
mv23:ブロックdB23の動きベクトル
mv30:ブロックdB30の動きベクトル
により、取得する。
The
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
そして、インター予測部11は、上記のように取得した動きベクトルmv31を、分割ブロックdB31の動きベクトルとして、動きベクトル処理部16に出力する。
Then, the
動きベクトル処理部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
可変長符号化部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
イントラ予測部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
そして、イントラ予測部12は、実際のブロックDB21の画素の画素値と、イントラ予測ブロックの画素の画素値との差分をとることで、ブロックDB21に相当するイントラ予測信号を符号化モード判定部15に出力する。なお、ブロックDB22についても同様である。以下では、ブロックDB21に対する処理について、説明する。
Then, the
符号化モード判定部15は、無効領域に存在するブロックDB21に対応する予測誤差信号diff1の信号値が「0」となるように、制御信号ctl_z1を生成し、第1ゼロ設定部2に出力する。
The encoding
また、符号化モード判定部15は、ブロックDB21に対応するインター予測信号を予測信号Dpとして減算器1に出力する。
Moreover, the encoding
減算器1は、ブロックDB21に相当する動画像信号Dinから、予測信号Dpを減算して取得した予測誤差信号diffを第1ゼロ設定部2に出力する。
The
第1ゼロ設定部2は、符号化モード判定部15から出力される制御信号ctl_z1に従い、予測誤差信号diff1の信号値を強制的に「0」にし、直交変換部4に出力する。
The first zero
直交変換部4以降において、上記で説明した、インター予測処理がなされた場合の予測誤差信号diff1の処理と同様の処理が実行される。
In the
このように、動画像符号化装置1000では、符号化コストが最小であると判定されたのが、イントラ予測処理である場合において、無効領域に相当する予測誤差信号diff1の信号値を強制的に「0」とするので、不要な符号量の発生を適切に抑制することができる。
As described above, the moving
なお、上記では、予測モード0について説明したが、他の予測モードにおいても、動画像符号化装置1000では、同様に無効領域に相当する予測誤差信号diff1の信号値を強制的に「0」とするので、不要な符号量の発生を適切に抑制することができる。
Although the
(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
符号化モード判定部15は、スキップMB判定部14からの情報に基づいて、マクロブロックMB2をスキップマクロブロックに設定し、マクロブロックMB2をスキップマクロブロックに設定したことを示す情報を、情報Info_modeに含め、可変長符号化部6に出力する。そして、可変長符号化部6は、マクロブロックMB2をスキップマクロブロックに設定したことを示す情報に対して、可変長符号化処理を実行し、動画像符号化信号Doutを生成し出力する。
Based on the information from the skip
これにより、無効領域のみを含むマクロブロック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
(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
インター予測部11は、制御信号ctl1に基づいて、動き補償のブロックサイズを16×16として、インター予測処理を実行する。そして、動き補償のブロックサイズを16×16として、動きベクトルの探索処理を実行し、動きベクトルMV3を取得する。なお、動きベクトルの探索処理については、上記で説明した処理と同様である。
Based on the control signal ctl1, the
そして、インター予測部11は、動きベクトルMV3を用いた動き補償処理により取得したインター予測信号を符号化モード判定部15に出力する。
Then, the
符号化モード判定部15は、マクロブロックMB3の無効領域の部分において、予測誤差信号diff1が強制的に「0」となるように制御信号ctl_z1を生成し、第1ゼロ設定部2に出力する。
The encoding
そして、上記で説明したのと同様に、無効領域についての予測誤差信号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
≪図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
インター予測部11は、制御信号ctl1に基づいて、動き補償のブロックサイズを8×16として、インター予測処理を実行する。
Based on the control signal ctl1, the
インター予測部11は、マクロブロックMB3の右半分の8×16の分割ブロックDB12については、動き補償のブロックサイズを8×16として、動きベクトルの探索処理を実行し、動きベクトルMV12Aを取得する。なお、動きベクトルの探索処理については、上記で説明した処理と同様である。
The
インター予測部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
≪図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
インター予測部11は、制御信号ctl1に基づいて、動き補償のブロックサイズを16×8として、インター予測処理を実行する。
Based on the control signal ctl1, the
インター予測部11は、マクロブロックMB3の上半分の16×8の分割ブロックDB11については、動き補償のブロックサイズを16×8として、動きベクトルの探索処理を実行し、動きベクトルMV11Aを取得する。なお、動きベクトルの探索処理については、上記で説明した処理と同様である。
For the
インター予測部11は、マクロブロックMB3の下半分の16×8のブロックでは、図4を用いて説明したのと同様に、8×8ブロックであるブロックDB22により、インター予測処理を実行し、取得した動きベクトルMV22を、図11の右図に示すように、マクロブロックMB3の下半分の16×8の分割ブロックDB21eの動きベクトルして、インター予測処理を実行する。つまり、分割ブロックDB21eを動き補償のブロックとして、インター予測処理(動き推定処理、動き補償処理)を実行する。そして、図4を用いて説明したのと同様に、動画像符号化装置1000では、無効領域に相当する予測誤差信号diff1を強制的に「0」とすることで、無効領域についての符号量の発生を抑制する。
In the
≪図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
インター予測部11は、制御信号ctl1に基づいて、動き補償のブロックサイズを8×8として、インター予測処理を実行する。
The
インター予測部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
インター予測部11は、図12に示す、無効領域のみを含む分割ブロックDB21に対しては、図5を用いて説明したのと同様に、分割ブロックDB21の周辺から算出される予測動きベクトルを、分割ブロックDB21の動きベクトルに設定するよう指示する制御信号ctl1を生成し、インター予測部11に出力する。
For the divided block DB 21 including only the invalid region shown in FIG. 12, the
インター予測部11は、制御信号ctl1に従い、動きベクトル処理部16から、分割ブロックDB21の周辺のブロックから取得された予測動きベクトルpmv21を取得する。例えば、分割ブロックDB21の周辺のブロックおよび取得された動きベクトルが図12の左図に示す場合、動きベクトル処理部16は、H.264規格の規定通り、pmv21を、
pmv21=median(MV11,MV12,MV20)
median():要素のメディアン値をとる関数
mv11:ブロックDB11の動きベクトル
mv12:ブロックDB12の動きベクトル
mv20:ブロックDB20の動きベクトル
により、取得する。
The
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
そして、インター予測部11は、上記のように取得した動きベクトルpmv21を、分割ブロックDB21の動きベクトルとして、動きベクトル処理部16に出力する。
Then, the
動きベクトル処理部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
可変長符号化部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
また、また、動画像符号化装置1000では、無効領域に相当する領域の動きベクトルを、周辺のブロックを用いて予測した予測動きベクトルとして、差分ベクトル信号を取得するので、動きベクトル探索処理を実行する必要がない。
In addition, since the moving
≪変形例≫
次に、第1実施形態の変形例について、説明する。
≪Modification≫
Next, a modification of the first embodiment will be described.
本変形例では、無効領域の画素の画素値が全て同一値である場合についての動画像符号化装置1000の処理について説明する。
In the present modification, the processing of the moving
本変形例では、動画像符号化装置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
まず、本変形例において、無効領域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
符号化モード判定部15は、予測信号Dpとして、イントラ予測信号(信号値:D1)を減算器1に出力する。
The encoding
減算器1は、マクロブロックMB0に相当する動画像信号Din(信号値:D2)から、イントラ予測信号(信号値:D1)を減算することで予測誤差信号diff(信号値:D2−D1)を取得し、第1ゼロ設定部2に出力し、第1ゼロ設定部2は、入力された予測誤差信号diffを、そのまま、予測誤差信号diff1として出力する。そして、予測誤差信号diff1に対して、直交変換部4以降の処理が、上記と同様に実行される。
The
つまり、本変形例では、上記実施形態と異なり、画像の左上端にあるマクロブロック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
なお、本変形例では、無効領域の画素の画素値が全て同じであるため、量子化処理により、量子化誤差が発生する場合、デコード処理後の信号において、もとの画素値が再現されない可能性がある。この場合、例えば、量子化部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
次に、本変形例において、無効領域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
[他の実施形態]
上記実施形態(変形例を含む)で示した、符号化コストを算出するための構成、および、符号化コストを算出するための処理方法は、一例であり、これに限定されない。既に開発されている多様な符号化コスト算出方法や構成を、上記実施形態の動画像符号化装置に適用するようにしてもよい。
[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
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:
前記符号化モード判定部は、
前記符号化モード判定部により算出された前記符号化コストに基づいて、処理対象のマクロブロックの分割方法を決定し、決定された分割方法により取得された分割ブロックに前記映像無効領域を含む場合、当該無効領域に対応する前記予測誤差信号の信号値を「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」にするための第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:
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)
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)
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 |
-
2014
- 2014-03-31 JP JP2014070726A patent/JP6308838B2/en active Active
Patent Citations (6)
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)
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 |