JP6616242B2 - Video coding apparatus, block structure determination method, and computer program - Google Patents
Video coding apparatus, block structure determination method, and computer program Download PDFInfo
- Publication number
- JP6616242B2 JP6616242B2 JP2016101597A JP2016101597A JP6616242B2 JP 6616242 B2 JP6616242 B2 JP 6616242B2 JP 2016101597 A JP2016101597 A JP 2016101597A JP 2016101597 A JP2016101597 A JP 2016101597A JP 6616242 B2 JP6616242 B2 JP 6616242B2
- Authority
- JP
- Japan
- Prior art keywords
- block
- size
- candidate
- blocks
- determination unit
- 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.)
- Active
Links
Images
Description
本発明は、映像符号化装置、ブロック構造決定方法及びコンピュータプログラムに関する。 The present invention relates to a video encoding device, a block structure determination method, and a computer program.
映像符号化の標準規格としてH.264/AVC(Advanced Video Coding)やH.265/HEVC(High Efficiency Video Coding)と呼ばれる映像符号化方式が策定されている。HEVCは、高い圧縮率を達成する反面、符号化処理の演算量が従来規格と比べて多いことで知られている。その理由の1つとして、画面内の符号化ブロックのバリエーションが増加したことが挙げられる。HEVCでは、符号化対象の画像領域をLCU(Largest Coding Unit:最大符号化単位)と呼ばれる正方形のブロック単位に分割し、更にLCUをCU(Coding Unit)と呼ばれるブロック単位に再帰的に最大3回まで4等分することができる。 H.264 is a standard for video coding. H.264 / AVC (Advanced Video Coding) and H.264. A video encoding method called H.265 / HEVC (High Efficiency Video Coding) has been formulated. While HEVC achieves a high compression ratio, it is known that the amount of calculation of encoding processing is larger than that of the conventional standard. One reason for this is that the variation of coding blocks in the screen has increased. In HEVC, an image region to be encoded is divided into square block units called LCUs (Largest Coding Units), and the LCUs are recursively up to 3 times in block units called CUs (Coding Units). Can be divided into 4 equal parts.
LCUは最大64×64画素に設定でき、その場合CUは、64×64画素、32×32画素、16×16画素、8×8画素を設定することができる。LCU毎にCU(最大4パターン分)のブロックを組み合わせ、最適なブロック構造を決定することで効率的に圧縮が可能である。しかし、組み合わせ数が膨大となるため全ての組み合わせを行ってしまうと符号化の演算負荷が高くなってしまうという問題がある。よって、少ない演算量で最適なブロック構造を選択する手法が望まれている。 The LCU can be set to a maximum of 64 × 64 pixels. In that case, the CU can be set to 64 × 64 pixels, 32 × 32 pixels, 16 × 16 pixels, and 8 × 8 pixels. Combining CU (maximum 4 patterns) blocks for each LCU and determining an optimal block structure enables efficient compression. However, since the number of combinations becomes enormous, if all combinations are performed, there is a problem that the calculation load of encoding increases. Therefore, a method for selecting an optimal block structure with a small amount of calculation is desired.
例えば、隣接するブロックの最小CUサイズを用いてブロックサイズの候補を制限する手法が提案されている(例えば、特許文献1参照)。特許文献1に記載の技術(以下、「従来技術1」という)では、隣接するブロックの構造が予め選択されている必要があり、複数のブロックの構造を同時に選択していくような並列処理へは適用し難いという課題がある。この課題を解決する手法として、隣接するブロックを符号化済みフレームから取得する手法が提案されている(例えば、非特許文献1参照)。非特許文献1に記載の技術(以下、「従来技術2」という)では符号化済みフレームの参照ブロックの最大分割深度に基づいて、符号化対象ブロックの最大分割深度を選択する。
For example, a method of restricting block size candidates using the minimum CU size of adjacent blocks has been proposed (see, for example, Patent Document 1). In the technique described in Patent Document 1 (hereinafter referred to as “
ただし、従来技術2では、1箇所でも最大分割のブロックがあると全パターンのブロックを計算することになるため、演算量が削減できないケースが発生する。そのため、従来技術2を、従来技術1などと組み合わせて、図21に示すような構成とし、ブロックサイズ毎に判定する手法(以下、「従来技術2’」という)も考えられる。しかしながら、時間的参照ブロックは、符号化対象ブロックと相関が必ずしも高いとは限らないため、相関が低い場合に各ブロックサイズを個別に判定すると符号化効率が低下してしまうという問題がある。
However, in the
本発明は、上記問題を解決すべくなされたもので、その目的は、符号化効率の低下を抑えつつ、ブロック構造決定処理の演算量を削減する映像符号化装置、ブロック構造決定方法及びコンピュータプログラムを提供することにある。 The present invention has been made to solve the above problems, and an object of the present invention is to provide a video encoding apparatus, a block structure determination method, and a computer program that reduce the amount of calculation of block structure determination processing while suppressing a decrease in encoding efficiency. Is to provide.
本発明の一態様は、画像を複数の領域に分割し、前記領域を再帰的にブロックに分割することで生成される1つのブロックサイズで構成される若しくは複数のブロックサイズのブロックを組み合わせて構成されるブロック構造を決定するブロック構造決定部と、決定された前記ブロック構造に基づいて符号化を行う符号化部と、を備え、前記ブロック構造決定部は、前記ブロックサイズごとに、前記画像の領域を所定のサイズのブロックに分割するブロック分割部と、分割された前記ブロックのサイズと、前記ブロックが参照する領域の中心が属するブロックのサイズと、が等しい若しくは前記中心が属するブロックのサイズが1段階大きい場合、前記ブロックの各々が、第1の候補ブロックとなると判定する第1候補ブロック判定部と、前記所定のサイズより1段階大きいサイズのブロックを前記所定のサイズに分割して得られたブロック群が前記第1の候補ブロックとして判定されている数が所定の値以上の場合、前記ブロック群に属するすべてのブロックを第2の候補ブロックにすると判定する第2候補ブロック判定部と、前記第2の候補ブロックと判定された前記ブロックについて評価値を算出するブロックサイズ評価値算出部と、前記評価値に基づいて、前記画像の領域を分割する前記ブロックの組み合わせを選択する最終ブロック選択部と、を備える映像符号化装置である。 One embodiment of the present invention is configured with one block size generated by dividing an image into a plurality of regions and recursively dividing the region into blocks, or a combination of blocks having a plurality of block sizes. A block structure determining unit that determines a block structure to be processed, and an encoding unit that performs encoding based on the determined block structure, and the block structure determining unit includes, for each block size, the image of the image A block dividing unit that divides an area into blocks of a predetermined size, the size of the divided block, and the size of the block to which the center of the area referred to by the block belongs are equal or the size of the block to which the center belongs is If one step higher, each of said blocks, a first candidate block determination unit determines that the first candidate block, before If the number of block groups obtained by dividing one step larger size of the blocks than a predetermined size to the predetermined size is determined as the first candidate block is not less than a predetermined value, belonging to the blocks A second candidate block determination unit that determines that all blocks are second candidate blocks; a block size evaluation value calculation unit that calculates an evaluation value for the block determined to be the second candidate block; and the evaluation And a final block selection unit that selects a combination of the blocks that divide the region of the image based on the value.
本発明の一態様は、上記の映像符号化装置であって、前記ブロック分割部は、あらかじめ定められた複数のサイズごとに前記画像を分割し、前記第1候補ブロック判定部と、前記第2候補ブロック判定部は、前記複数のサイズごとに判定を行い、前記画像の所定の領域について、前記第2候補ブロック判定部により重複して前記第2の候補ブロックにすると判定されている場合、前記画像の所定の領域についてのいずれかのブロックを前記第2の候補ブロックから除外する重複領域処理部をさらに備える。 One aspect of the present invention is the video encoding device, wherein the block division unit divides the image into a plurality of predetermined sizes, the first candidate block determination unit, and the second The candidate block determination unit performs the determination for each of the plurality of sizes, and when the predetermined region of the image is determined to be duplicated by the second candidate block determination unit as the second candidate block, The image processing apparatus further includes an overlapping area processing unit that excludes any block for a predetermined area of the image from the second candidate block .
本発明の一態様は、上記の映像符号化装置であって、前記第1候補ブロック判定部は、前記画像に適用される予測モードごとに、分割された前記ブロックと、前記画像の領域に対応する参照ピクチャ内の領域を分割する参照ブロックとに基づいて、前記ブロックの各々が、第1の候補ブロックとなるか否かを判定し、前記第2候補ブロック判定部は、前記所定のサイズより1段階大きいサイズのブロックを前記所定のサイズに分割して得られたブロック群に対して、前記予測モードごとに、前記ブロック群に含まれる前記第1の候補ブロックの割合と、予測モードとブロックサイズとに応じて予め定められる尤度と、に基づいて、前記ブロック群のブロックを全て第2の候補ブロックにするか否かを判定する。 One aspect of the present invention is the video encoding device described above, wherein the first candidate block determination unit corresponds to the divided block and the region of the image for each prediction mode applied to the image. And determining whether each of the blocks is a first candidate block based on a reference block that divides a region in a reference picture to be processed, and the second candidate block determination unit determines whether the block is a predetermined size or not. for one-step larger size block divided and obtained block group to the predetermined size, for each of the prediction mode, and the ratio of the first candidate block included in the block group, the prediction mode and the block Whether or not all the blocks in the block group are to be the second candidate blocks is determined based on the likelihood determined in advance according to the size .
本発明の一態様は、上記の映像符号化装置であって、前記第1候補ブロック判定部は、いずれかの前記予測モードについて、分割された前記ブロックの各々のブロックサイズが、前記参照ブロックのブロックサイズと同一、または、前記参照ブロックのブロックサイズよりも1段階小さいブロックサイズと同一の場合、前記第1の候補ブロックとし、前記予測モード以外の予測モードについて、分割された前記ブロックの各々のブロックサイズが、前記参照ブロックのブロックサイズと同一、または、前記参照ブロックのブロックサイズよりも1段階大きいブロックサイズと同一の場合、前記第1の候補ブロックとして判定する。 One aspect of the present invention is the video encoding device described above, in which the first candidate block determination unit determines whether the block size of each of the divided blocks for any of the prediction modes is the reference block. When the block size is the same as the block size or the block size that is one step smaller than the block size of the reference block, the first candidate block is used, and each of the divided blocks is divided into prediction modes other than the prediction mode. When the block size is the same as the block size of the reference block or the same block size as the block size of the reference block, the block is determined as the first candidate block.
本発明の一態様は、上記の映像符号化装置であって、ブロックサイズと前記予測モードの組み合わせごとに異なる尤度が予め定められており、前記第2候補ブロック判定部は、前記ブロック群のブロックサイズと、前記予測モードとに基づいて、前記予測モードごとの前記ブロック群の尤度を算出し、算出した尤度の合計値に基づいて、前記ブロック群のブロックを全て第2の候補ブロックにするか否かを判定する。 One aspect of the present invention is the above-described video encoding apparatus, different likelihood for each combination of the prediction modes and the block size is predetermined, the second candidate block determination unit of the block group Based on the block size and the prediction mode, the likelihood of the block group for each prediction mode is calculated, and based on the total value of the calculated likelihoods, all the blocks in the block group are second candidate blocks. It is determined whether or not.
本発明の一態様は、上記の映像符号化装置であって、前記第2候補ブロック判定部は、前記ブロック群のブロックを全て第2の候補ブロックにすると判定した場合、前記ブロック群の中で前記第1の候補ブロックでないブロックを前記第2の候補ブロックとして追加する際に、前記ブロックを、複数の予測モードそれぞれにおいて得られる尤度の合計値の中で前記尤度の合計値の大きい前記予測モードに対応する前記第2の候補ブロックとして追加する。 One aspect of the present invention is the video encoding device described above, wherein the second candidate block determination unit determines that all blocks in the block group are second candidate blocks. When adding a block that is not the first candidate block as the second candidate block, the block has a large total likelihood value among the total likelihood values obtained in each of a plurality of prediction modes. The second candidate block corresponding to the prediction mode is added.
本発明の一態様は、画像の領域をブロックに分割し、前記領域を再帰的にブロックに分割することで生成される1つのブロックサイズで構成される若しくは複数のブロックサイズのブロックを組み合わせて構成されるブロック構造を決定するブロック構造決定ステップと、決定された前記ブロック構造に基づいて符号化を行う符号化ステップと、を有し、前記ブロック構造決定ステップにおいて、前記ブロックサイズごとに、前記画像の領域を所定のサイズのブロックに分割するブロック分割ステップと、分割された前記ブロックのサイズと、前記ブロックが参照する領域の中心が属するブロックのサイズと、が等しい若しくは前記中心が属するブロックのサイズが1段階大きい場合、前記ブロックの各々が、第1の候補ブロックとなると判定する第1候補ブロック判定ステップと、前記所定のサイズより1段階大きいサイズのブロックを前記所定のサイズに分割して得られたブロック群が前記第1の候補ブロックとして判定されている数が所定の値以上の場合、前記ブロック群に属するすべてのブロックを第2の候補ブロックにすると判定する第2候補ブロック判定ステップと、前記第2の候補ブロックと判定された前記ブロックについて評価値を算出するブロックサイズ評価値算出ステップと、前記評価値に基づいて、前記画像の領域を分割する前記ブロックの組み合わせを選択する最終ブロック選択ステップと、を行うブロック構造決定方法である。 One embodiment of the present invention is configured by one block size generated by dividing an image region into blocks and recursively dividing the region into blocks, or a combination of blocks having a plurality of block sizes. A block structure determining step for determining a block structure to be performed, and an encoding step for performing encoding based on the determined block structure. In the block structure determining step, for each block size, the image A block dividing step for dividing the area into blocks of a predetermined size, the size of the divided block, and the size of the block to which the center of the area to which the block refers belongs, or the size of the block to which the center belongs determine if There one step higher, each of said blocks, when the first candidate block To a first candidate block determination step, said number of predetermined one stage larger size block group block obtained by dividing the predetermined size from the size is determined as the first candidate block is given for more than a value, calculates an evaluation value of all the blocks belonging to the block group and a second candidate block determination step determines to a second candidate block for the second candidate block and determined to be the block A block structure determination method that performs a block size evaluation value calculation step and a final block selection step that selects a combination of the blocks that divide the image area based on the evaluation value.
本発明の一態様は、画像の領域をブロックに分割し、前記領域を再帰的にブロックに分割することで生成される1つのブロックサイズで構成される若しくは複数のブロックサイズのブロックを組み合わせて構成されるブロック構造を決定するブロック構造決定ステップと、決定された前記ブロック構造に基づいて符号化を行う符号化ステップと、をコンピュータに実行させ、前記ブロック構造決定ステップにおいて、前記ブロックサイズごとに、前記画像の領域を所定のサイズのブロックに分割するブロック分割ステップと、分割された前記ブロックのサイズと、前記ブロックが参照する領域の中心が属するブロックのサイズと、が等しい若しくは前記中心が属するブロックのサイズが1段階大きい場合、前記ブロックの各々が、第1の候補ブロックとなると判定する第1候補ブロック判定ステップと、前記所定のサイズより1段階大きいサイズのブロックを前記所定のサイズに分割して得られたブロック群が前記第1の候補ブロックとして判定されている数が所定の値以上の場合、前記ブロック群に属するすべてのブロックを第2の候補ブロックにすると判定する第2候補ブロック判定ステップと、前記第2の候補ブロックと判定された前記ブロックについて評価値を算出するブロックサイズ評価値算出ステップと、前記評価値に基づいて、前記画像の領域を分割する前記ブロックの組み合わせを選択する最終ブロック選択ステップと、を実行させるためのコンピュータプログラムである。 One embodiment of the present invention is configured by one block size generated by dividing an image region into blocks and recursively dividing the region into blocks, or a combination of blocks having a plurality of block sizes. A block structure determination step for determining a block structure to be performed, and an encoding step for performing encoding based on the determined block structure, and causing the computer to execute the block structure determination step for each block size. A block dividing step for dividing the image area into blocks of a predetermined size, and the size of the divided block is equal to the size of the block to which the center of the area referred to by the block belongs, or to which the center belongs If the size of one step higher, each of said blocks, a first candidate A first candidate block determination step of determining that a lock, the predetermined one stage larger size block group block obtained by dividing the predetermined size from the size is determined as the first candidate block If the number there are greater than a predetermined value, and a second candidate block determination step determines to all blocks belonging to the block group to a second candidate block for the second candidate block and determined to be the block A computer program for executing a block size evaluation value calculation step for calculating an evaluation value and a final block selection step for selecting a combination of the blocks for dividing the region of the image based on the evaluation value.
この発明によれば、符号化効率の低下を抑えつつ、ブロック構造決定処理の演算量を削減することが可能となる。 According to the present invention, it is possible to reduce the calculation amount of the block structure determination process while suppressing a decrease in encoding efficiency.
(第一実施形態)
以下、第一実施形態から順に本発明の実施形態について図面を参照して説明する。図1は、本発明の第一実施形態における映像符号化装置1の構成を示すブロック図である。映像符号化装置1は、ブロック構造決定部10、減算器11、直交変換・量子化部12、可変長符号化部13、逆量子化・逆直交変換部14、加算器15、イントラ予測部16、イントラ・インター切替スイッチ17、ループフィルタ部18、復号ピクチャメモリ部19及びインター予測部20を備える。
(First embodiment)
Hereinafter, embodiments of the present invention will be described in order from the first embodiment with reference to the drawings. FIG. 1 is a block diagram showing a configuration of a
映像符号化装置1は、符号化対象の映像を構成する符号化対象ピクチャをLCUごとに外部の装置等から受けて、LCUのブロックに対応する符号化データを他の外部の装置等に出力する。符号化対象ピクチャは、外部の装置等によって、LCUのサイズ単位でラスタスキャンされて、映像符号化装置1に入力され、ラスタスキャンされた順に映像符号化装置1が繰り返し処理を行うことで、符号化対象ピクチャの符号化が行われる。映像符号化装置1において、ブロック構造決定部10は、外部の装置等から入力されるLCUのブロック構造を決定、すなわち適切なブロックの組み合わせを選択する。また、ブロック構造決定部10は、決定したブロック構造にしたがって、LCUを再帰的にブロックに分割してCUを生成し、予め定められる所定の順序で繰り返し、生成したCUを減算器11に出力する。
The
減算器11は、CUの画像データから、イントラ予測部16またはインター予測部20のいずれかが出力する予測画像データを減算し、減算した差分を直交変換・量子化部12に出力する。直交変換・量子化部12は、減算器11が出力する差分の画像データに対して直交変換と量子化を行って、可変長符号化部13と、逆量子化・逆直交変換部14に出力する。可変長符号化部13は、直交変換・量子化部12が出力する量子化係数を可変長符号化し、符号化データとして出力する。逆量子化・逆直交変換部14は、直交変換・量子化部12が出力する量子化係数に対して逆量子化と逆直交変換を行い、加算器15に出力する。加算器15は、逆量子化・逆直交変換部14が出力する画像データに、イントラ予測部16またはインター予測部20のいずれかが出力する予測画像データを加算してイントラ予測部16と、ループフィルタ部18とに出力する。
The
イントラ予測部16は、加算器15が出力する、画像データに予測画像データを加算した後の画像データを参照画像データとして、符号化対象ブロックのイントラ予測画像データを生成する。ループフィルタ部18は、加算器15が出力する画像データにループフィルタを適用し、フィルタリング後の画像データを復号ピクチャメモリ部19に出力する。復号ピクチャメモリ部19は、ループフィルタが適用された画像データを記憶する。インター予測部20は、復号ピクチャメモリ部19に記憶されている画像データを参照画像データとし、符号化対象ブロックのインター予測画像を生成する。イントラ・インター切替スイッチ17は、符号化対象ブロックの予測モードに応じてイントラ予測部16と、インター予測部20とを切り替えて、各々の予測モードに対応する予測画像データを減算器11と加算器15とに出力する。
The
図2は、ブロック構造決定部10の内部構成を示すブロック図である。ブロック構造決定部10は、ブロック分割部101、第1候補ブロック判定部102、第2候補ブロック判定部103、ブロックサイズ評価値算出部104及び最終ブロック選択部105を備える。ブロック分割部101は、符号化対象ピクチャのLCUを32×32画素、16×16画素及び8×8画素のブロックに分割する。また、ブロック分割部101は、最大ブロックサイズの64×64画素のLCUと、32×32画素に分割されたLCUと、16×16画素に分割されたLCUと、8×8画素に分割されたLCUとを第1候補ブロック判定部102に出力する。
FIG. 2 is a block diagram illustrating an internal configuration of the block
第1候補ブロック判定部102は、64×64ブロック判定部1021、32×32ブロック判定部1022、16×16ブロック判定部1023及び8×8ブロック判定部1024を備える。第1候補ブロック判定部102の各々の判定部(すなわち、64×64ブロック判定部1021、32×32ブロック判定部1022、16×16ブロック判定部1023、8×8ブロック判定部1024)は、ブロック分割部101が出力する各々のブロックサイズに対応するLCUを受ける。すなわち、64×64ブロック判定部1021は、64×64画素のLCUを受け、32×32ブロック判定部1022は、32×32画素に分割されたLCUを受け、16×16ブロック判定部1023は、16×16画素に分割されたLCUを受け、8×8ブロック判定部1024は、8×8画素に分割されたLCUを受ける。64×64ブロック判定部1021、32×32ブロック判定部1022、16×16ブロック判定部1023、8×8ブロック判定部1024は、LCUの各ブロックが第1の候補ブロックに該当するか否かを判定する。
The first candidate
ここで、第1候補ブロック判定部102の判定部の各々による第1の候補ブロックに該当するか否かの判定は、以下のようにして行われる。64×64ブロック判定部1021の場合は、1個の符号化対象ブロック、32×32ブロック判定部1022の場合は、4個の符号化対象ブロック、16×16ブロック判定部1023の場合は、16個の符号化対象ブロック、8×8ブロック判定部1024の場合は、64個の符号化対象ブロックが判定の対象となる。これらの符号化対象ブロックの各々について、まず、下記の条件(1)を満たすか否かを判定する。
Here, the determination of whether or not the first candidate
条件(1):符号化対象ブロックのブロックサイズが、参照ブロックのブロックサイズと同一または1段階小さいブロックサイズと同一の場合、条件(1)を満たすと判定する。ここで、参照ブロックとは、図3に示すように、LCUの動きベクトルが指す参照ピクチャにおいて、符号化対象ブロックの中心座標を含むCUのことである。例えば、図4において、符号化対象ブロックが64×64画素のサイズの場合、中心座標が存在する参照ピクチャにおけるCUは、右上の64×64画素の参照ブロックとなる。 Condition (1): It is determined that the condition (1) is satisfied when the block size of the block to be encoded is the same as the block size of the reference block or the block size that is one step smaller. Here, as shown in FIG. 3, the reference block is a CU including the center coordinates of the encoding target block in the reference picture indicated by the LCU motion vector. For example, in FIG. 4, when the encoding target block has a size of 64 × 64 pixels, the CU in the reference picture in which the center coordinates exist is the reference block of the upper right 64 × 64 pixels.
また、第1候補ブロック判定部102の各々の判定部は、判定結果を第2候補ブロック判定部103に出力する。第2候補ブロック判定部103は、第1候補ブロック判定部102が出力する判定結果を受けて、以下の条件(2)を満たすか否かを判定する。
Each determination unit of the first candidate
条件(2):符号化対象ブロックが最大ブロックサイズ(本実施形態では、64×64画素)の場合、条件(1)を満たしたブロックは、条件(2)を満たすと判定して第2の候補ブロックとする。最大ブロックサイズではない場合、当該ブロックサイズより1段階大きいブロックサイズのブロックを4分割した領域、例えば、当該ブロックサイズが16×16画素の場合、1段階大きい32×32画素のいずれかを4分割した4個の16×16画素の領域に属するブロック群を選択する。当該ブロック群において、条件(1)を満たすブロックが予め定められる所定個数以上である場合、条件(2)を満たすと判定し、当該ブロック群全てを第2の候補ブロックとする。条件(1)を満たすブロックが所定個数未満である場合、条件(2)を満たさないと判定し、当該ブロック群全てを第2の候補ブロックとしない。ただし、符号化対象LCUにおいて一度も第2の候補ブロックとなっていない領域は、少なくとも一度は第2の候補ブロックとなるように小さいブロックサイズから優先的に第2の候補ブロックとする。なお、予め定められる所定個数は、ブロックサイズごとに変更してもよく、本実施形態では、32×32画素以上のブロックサイズについては「2個」、16×16画素以下のブロックサイズについては「3個」とする。 Condition (2): When the encoding target block has the maximum block size (64 × 64 pixels in the present embodiment), the block that satisfies the condition (1) is determined to satisfy the condition (2) and the second Candidate block. If the block size is not the maximum, the block is divided into four blocks having a block size that is one step larger than the block size. For example, if the block size is 16 × 16 pixels, one of the 32 × 32 pixels that are one step larger is divided into four. A block group belonging to the four 16 × 16 pixel regions is selected. In the block group, when the number of blocks satisfying the condition (1) is equal to or greater than a predetermined number, it is determined that the condition (2) is satisfied, and all the block groups are set as second candidate blocks. When the number of blocks satisfying the condition (1) is less than the predetermined number, it is determined that the condition (2) is not satisfied, and all the block groups are not set as the second candidate blocks. However, an area that has never become the second candidate block in the encoding target LCU is preferentially set as the second candidate block from a small block size so as to become the second candidate block at least once. The predetermined number may be changed for each block size. In this embodiment, “2” is used for a block size of 32 × 32 pixels or more, and “2” is used for a block size of 16 × 16 pixels or less. 3 ”.
ブロックサイズ評価値算出部104は、第2の候補ブロックとなったブロックの評価値(以下、評価コストという)、すなわち、以下の式(1)に基づいて算出するRDコストを算出する。
The block size evaluation
RDコスト=D+λR・・・(1) RD cost = D + λR (1)
式(1)において、Dは符号化対象ブロックを符号化した場合の誤差を表し、Rは符号量を表し、λはラグラジアン定数を表す。また、ブロックサイズ評価値算出部104は、予測モードごと、すなわちイントラ予測部16によるイントラ予測モード、及びインター予測部20によるインター予測モードの各予測モードに対してRDコストを算出し、最小のRDコストをブロックの評価コストとする。
In Expression (1), D represents an error when the encoding target block is encoded, R represents a code amount, and λ represents a Lagrangian constant. Further, the block size evaluation
最終ブロック選択部105は、ブロックサイズ評価値算出部104が、算出した評価コストが最小となるブロックの組み合わせをブロック構造として選択する。例えば、最終ブロック選択部105は、同一のブロック領域で小さいブロックサイズと大きいブロックサイズを比較する場合、小さいブロックサイズの評価コストの合計と、大きいブロックサイズの評価コストを比較し、評価コストの小さいブロックサイズのブロックをブロック構造を構成するブロックとして選択する。
The final
次に、図5から図8を参照しつつ、第一実施形態の映像符号化装置1のブロック構造決定部10によるブロック構造決定処理について説明する。図5は、ブロック構造決定処理の流れを示すフローチャートである。映像符号化装置1のブロック構造決定部10のブロック分割部101は、外部の装置等から受けた符号化対象ピクチャのLCUを32×32画素、16×16画素、8×8画素のブロックサイズに分割する。ブロック分割部101は、最大ブロックサイズの64×64画素のLCUと、32×32画素に分割されたLCUと、16×16画素に分割されたLCUと、8×8画素に分割されたLCUとを第1候補ブロック判定部102の対応する判定部に出力する(ステップSa1)。
Next, block structure determination processing by the block
第1候補ブロック判定部102は、符号化対象ブロックが条件(1)を満たす第1の候補ブロックになるか否かを判定し、第1の候補ブロックを選択する処理を行う(ステップSa2)。ステップSa2の処理は、例えば、64×64ブロック判定部1021、32×32ブロック判定部1022、16×16ブロック判定部1023、8×8ブロック判定部1024の順に、各々の判定部によって、各々に対応するブロックサイズのLCUに対して行われる(ループLa1)。また、第1候補ブロック判定部102の各々の判定部は、符号化対象ブロックに含まれるブロックの各々について繰り返しステップSa2の処理を行う(ループLa2)。例えば、8×8ブロック判定部1024の場合、64個のブロックの各々に対してステップSa2を64回繰り返して行う。第1候補ブロック判定部102の各々の判定部によって、符号化対象ブロックに含まれるブロックの各々についてステップSa2の処理が行なわれると、ループLa2が終了する(ループLa3)。また、第1候補ブロック判定部102の各々の判定部によって、各々に対応するブロックサイズのLCUに対してステップSa2の処理が行われると、ループLa1が終了する(ループLa4)。
The first candidate
図6は、第1候補ブロック判定部102によるステップSa2の処理の例を示す図である。図6において「○」が条件(1)を満たすブロックであり、「×」が条件(1)を満たさないブロックであることを示す。例えば、符号化対象LCUの各ブロックと、参照ブロックとの関係が図4に示す関係である場合、64×64ブロック判定部1021は、ブロック分割部101が出力する64×64画素のLCUを受けて、64×64画素のブロックの中心座標が、参照ピクチャのどの参照ブロックに存在しているかを判定する。64×64画素の中心座標は、参照ピクチャの右上の64×64画素の参照ブロックに存在し、当該参照ブロックと同一のブロックサイズとなるため、条件(1)を満たすことになる。したがって、64×64ブロック判定部1021は、図6(a)に示すように「○」、すなわち第1の候補ブロックという判定結果を出力する。
FIG. 6 is a diagram illustrating an example of the process of step Sa2 by the first candidate
32×32ブロック判定部1022は、ブロック分割部101から、32×32画素に分割されたLCUを受けて、32×32画素の4個のブロックの各々の中心座標が、参照ピクチャのどの参照ブロックに存在しているかを判定する。右上のブロックは、参照ピクチャの64×64画素の参照ブロックに存在し、当該参照ブロックのブロックサイズよりも1段階低いブロックサイズのブロックに該当する。そのため、右上のブロックは、条件(1)を満たすことになる。同様に、左上のブロックは、参照ピクチャの32×32画素のブロックに存在するため、参照ブロックのブロックサイズと同一のブロックサイズのブロックに該当するため条件(1)を満たすことになる。これに対して、右下と、左下のブロックは、参照ピクチャの16×16画素のブロックに存在するため、条件(1)を満たさないことになる。したがって、32×32ブロック判定部1022は、図6(b)に示すように右上と左上のブロックが「○」、すなわち第1の候補ブロックに該当し、右下と左下のブロックが「×」、すなわち第1の候補ブロックに該当しない判定結果を出力する。
The 32 × 32
同様にして16×16ブロック判定部1023は、ブロック分割部101から、16×16画素に分割されたLCUを受けて、16×16画素の16個のブロックの中心座標が、参照ピクチャのどの参照ブロックに存在しているかを判定する。中心座標が16×16画素のブロック、または32×32画素の参照ブロックに存在する場合、条件(1)を満たし、64×64画素の参照ブロックに存在する場合、条件(1)を満たさないため、16×16ブロック判定部1023は、図6(c)に示すような判定結果を出力する。8×8ブロック判定部1024は、8×8画素については、全て条件(1)を満たさないため、図6(d)に示す「×」、すなわち全てが、第1の候補ブロックに該当しない判定結果を出力する。
Similarly, the 16 × 16
図5に戻り、第2候補ブロック判定部103は、第1候補ブロック判定部102の各々の判定部による判定結果を受けて、符号化対象ブロックが条件(2)を満たすか否かを判定する(ステップSa3)。図7は、第2候補ブロック判定部103による判定の結果を示す図であり、図7において「☆」は、第2の候補ブロックとして判定されたブロックを示している。図7において、「†」の意味は、図6において、第1の候補ブロックとなっていなかったブロックが第2の候補ブロックにした場合、または、第1の候補ブロックとなっていたブロックが第2の候補ブロックにしなかった場合を示す記号である。
Returning to FIG. 5, the second candidate
図6の第1の候補ブロックの判定結果を受けて、64×64画素のLCUについては、第2候補ブロック判定部103は、最大ブロックサイズに該当し、更に、64×64画素のLCUは、第1の候補ブロックにも該当しているため、条件(2)を満たすと判定する。したがって、第2候補ブロック判定部103は、図7(a)に示すように「☆」、すなわち第2の候補ブロックに該当する判定結果を出力する。
In response to the determination result of the first candidate block of FIG. 6, for the LCU of 64 × 64 pixels, the second candidate
32×32画素に分割されたLCUについては、第2候補ブロック判定部103は、最大ブロッサイズではないため、再帰的に4分割された領域に属する各々ブロックの中で第1の候補ブロックとなっているブロックの数を検出する。図6(b)に示すように、32×32画素のLCUについては、第1の候補ブロックは、2個存在するため、第2候補ブロック判定部103は、個数を「2」として検出する。32×32画素については、予め定められる所定個数が「2」となっているため、第2候補ブロック判定部103は、32×32画素に分割されたLCUについては、条件(2)を満たすと判定し、当該4分割の領域に存在するブロックを全て第2の候補ブロックとする判定結果を出力する。したがって、第2候補ブロック判定部103は、図7(b)に示すように、32×32画素のLCUの全てのブロックが「☆」、すなわち第2の候補ブロックに該当する判定結果を出力する。
For the LCU divided into 32 × 32 pixels, the second candidate
16×16画素に分割されたLCUについては、第2候補ブロック判定部103は、最大ブロッサイズではないため、32×32画素のブロックから更に再帰的に4分割された領域に属する各々ブロックについて、第1の候補ブロックとなっているブロックの数を検出する。図6(c)に示すように、16×16画素のLCUにおいて、左下の4分割されたブロックには、第1の候補ブロックが3個存在するため、第2候補ブロック判定部103は、個数を「3」として検出する。また、右下の4分割されたブロックには、第1の候補ブロックが2個存在するため、第2候補ブロック判定部103は、個数を「2」として検出する。また、左上の4分割されたブロックには、第1の候補ブロックが2個存在するため、第2候補ブロック判定部103は、個数を「2」として検出する。右上の4分割されたブロックには、第1の候補ブロックは存在しないため、第2候補ブロック判定部103は、個数を「0」として検出する。16×16画素のブロックについては、予め定められる所定数が「3」となっているため、第2候補ブロック判定部103は、左下の4分割された領域については、条件(2)を満たし、それ以外については、条件(2)を満たさないと判定する。したがって、第2候補ブロック判定部103は、条件(2)を満たす左下の4分割された領域に属するブロックについては、「☆」、すなわち第2の候補ブロックに該当し、それ以外のブロックについては、「×」、すなわち第2の候補ブロックに該当しない判定結果を出力する。
For the LCU divided into 16 × 16 pixels, since the second candidate
第2候補ブロック判定部103は、8×8の画素に分割されたLCUについては、第1の候補ブロックとなっているブロックが存在しないため、全てが条件(2)を満たさないと判定する。
The second candidate
次に、ブロックサイズ評価値算出部104は、第2の候補ブロックとなった各ブロックについて、予測モードごとに、評価コスト、すなわちRDコストを上記の式(1)に基づいて算出する(ステップSa4)。図8(a)に示す各ブロック内の数値が、ブロックサイズ評価値算出部104が算出した評価コストの値である。最終ブロック選択部105は、ブロックサイズ評価値算出部104が算出した評価コストが最小となる組み合わせをブロック構造を構成するブロックとして選択する(ステップSa5)。図8(a)に示すように、まず、最終ブロック選択部105は、32×32画素の左下のブロックの評価コストである「30」と、16×16画素の左下の4分割の領域の評価コストの合計である「25=10+5+5+5」とを比較する。16×16画素の4分割の領域の評価コストの合計の方が小さいので、最終ブロック選択部105は、16×16画素に分割されたブロックを選択する。
Next, the block size evaluation
次に、最終ブロック選択部105は、64×64画素の評価コストである「100」と、32×32画素の4分割の領域の各ブロックの評価コストの合計とを比較する。この際、32×32画素の左下のブロックの評価コストは、16×16画素の左下の4分割の領域の評価コストの合計である「25=10+5+5+5」が用いられる。すなわち、最終ブロック選択部105は、64×64画素の評価コストである「100」と、32×32画素の4分割の領域の各ブロックの評価コストの合計である「85=25+25+20+15」とを比較する。32×32画素の4分割の領域の評価コストの合計の方が小さいので、最終ブロック選択部105は、32×32画素に分割されたブロックを選択する。この際、最終ブロック選択部105は、32×32画素に分割されたブロックの左下のブロックにおいては16×16画素に分割されたブロックを選択する。選択したブロックに基づいて、最終ブロック選択部105は、図8(b)に示すブロック構造を出力する。
Next, the final
上記の第一実施形態の構成により、第1候補ブロック判定部102は、64×64画素のLCU、32×32画素に分割されたLCU、16×16画素に分割されたLCU、8×8画素に分割されたLCUの各ブロックのブロックサイズと、対応する参照ブロックのブロックサイズとに基づいて、第1の候補ブロックに該当するか否かを判定する。第2候補ブロック判定部103は、1段階ブロックサイズが大きいブロックから4分割された4個のブロックに占める第1の候補ブロックの個数に基づいて、各ブロックが、第2の候補ブロックに該当するか否かを判定する。ブロックサイズ評価値算出部104は、第2の候補ブロックの評価コストを算出し、最終ブロック選択部105は、評価コストが最小となるブロックの組み合わせをブロック構造を構成するブロックとして選択する。これにより、符号化効率の低下を抑えつつ、ブロック構造決定処理の演算量を削減することが可能となる。
With the configuration of the first embodiment, the first candidate
上述した従来技術2を図4の例に適用した場合、64×64画素のLCU、32×32画素に分割されたLCU、16×16画素に分割されたLCUの全てのブロックが候補となるため、演算量の削減効果がほとんど得られない。これに対して、本発明の第一実施形態の構成では16×16画素に分割されたLCUについては左下のブロック群のみを候補とするので、演算量を削減することができる。
When the above-described
また、上述した従来技術2’を同様に図4の例に適用した場合、仮に32×32画素に分割されたLCUの左右下の2個のブロックにおいて参照ブロックとの相関が低い場合、従来技術2’では左右下の2個のブロックは候補とならない。そのため、従来技術2’では、この2個のブロックを候補から除外してしまうことで符号化効率を低下させてしまうことになる。これに対し、本発明の第一実施形態の構成では、図21に示す従来技術2’のブロック構造決定部1000には備えられていない第2候補ブロック判定部103を備えている。そのため、第1候補ブロック判定部102により各ブロックで判定した後、更に、第2候補ブロック判定部103により再度周囲のブロック(図6(b)に示す左右の上2個のブロック)を考慮して左右の下2個のブロックを候補に加えるため、符号化効率の低下を抑えることができる。
Similarly, when the above-described
<変形例>
なお、上記の第一実施形態において、条件(1)に示した条件は、符号化対象ブロックのブロックサイズが、参照ブロックのブロックサイズと同一のサイズになる確率が高いという特徴を利用した条件である。しかしながら、本発明の構成は当該実施の形態に限られず、条件(1)は、上記した条件には限られず、従来技術1に示されている条件や、その他の条件を用いてもよい。
また、条件(2)は、1段階大きいブロックサイズから4分割された4個のブロック群間にブロックサイズの相関があるという特徴を利用した条件である。しかしながら、本発明の構成は当該実施の形態に限られない。条件(2)は、上記した条件に限られず、符号化対象ブロックの周囲の複数のブロックを判定に用いるようにしてもよいし、最大ブロックサイズである64×64画素のLCUにおいても当該LCUの周囲のブロックを判定に用いるようにしてもよい。
<Modification>
In the first embodiment, the condition shown in the condition (1) is a condition using a feature that the block size of the encoding target block is highly likely to be the same size as the block size of the reference block. is there. However, the configuration of the present invention is not limited to the embodiment, and the condition (1) is not limited to the above-described conditions, and the conditions shown in the
Condition (2) is a condition that uses the feature that there is a block size correlation among four block groups divided into four blocks from a block size that is one step larger. However, the configuration of the present invention is not limited to the embodiment. The condition (2) is not limited to the above-described condition, and a plurality of blocks around the encoding target block may be used for the determination, and even in the LCU having the maximum block size of 64 × 64 pixels, You may make it use the surrounding block for a determination.
(第二実施形態)
図9は、本発明の第二実施形態におけるブロック構造決定部10aの構成を示すブロック図である。第一実施形態における映像符号化装置1は、ブロック構造決定部10を備えている。これに対して、第二実施形態では、当該ブロック構造決定部10がブロック構造決定部10aに置き換えられる構成となる。図9において、第一実施形態と同一の構成については、同一の符号を付し、以下、異なる構成について説明する。ブロック構造決定部10aは、第2候補ブロック判定部103と、ブロックサイズ評価値算出部104との間に、重複領域処理部106を備える。
(Second embodiment)
FIG. 9 is a block diagram showing the configuration of the block
重複領域処理部106は、第2候補ブロック判定部103によって、第2の候補ブロックであると判定されたブロックの重複領域を検出し、予め定められている所定回数以上重複しているブロックについては、以下の条件(3)を満たすように第2の候補ブロックから除外する。除外された第2の候補ブロックについては、ブロックサイズ評価値算出部104の評価コストの算出対象に含まれない。
The overlapping
条件(3):重複回数が所定回数以上の領域について、条件(1)を満たすブロックの占める割合が最大となるように、第2の候補ブロックから除外する。ただし、占める割合が同じになった場合、小さいブロックサイズを優先的に除外する。なお、本実施形態では、予め定められる所定回数を「2」とする。 Condition (3): Excluded from the second candidate block so that the area occupied by the block satisfying the condition (1) is maximized for an area where the number of times of overlap is a predetermined number or more. However, when the proportions are the same, a small block size is preferentially excluded. In the present embodiment, the predetermined number of times is “2”.
図10は、第二実施形態におけるブロック構造決定処理の流れを示すフローチャートである。ステップSb1からSb3までの処理は、第一実施形態におけるブロック構造決定処理のステップSa1からSa3までの処理と同じ処理が行われる。ステップSb3までの処理により、第2候補ブロック判定部103によって、図7に示す判定結果が得られる。重複領域処理部106は、第2候補ブロック判定部103からの判定結果の出力を受けて、各ブロックでの重複回数を検出する。図11(a)は、例えば、32×32画素に分割された領域の各ブロックにおける重複回数を重複領域処理部106が検出した例であり、左右の上のブロックと、右下のブロックについては、64×64画素のブロックの領域のみが重複するため重複回数として「1」を検出する。左下のブロックについては、64×64画素のブロックの領域に加えて、16×16画素に分割されたブロックの領域も重複するため重複回数として「2」を検出する。
FIG. 10 is a flowchart showing the flow of the block structure determination process in the second embodiment. The process from step Sb1 to Sb3 is the same as the process from step Sa1 to Sa3 of the block structure determination process in the first embodiment. Through the processing up to step Sb3, the second candidate
2回以上重複している左下の領域は、条件(3)の重複回数が所定回数以上の領域に該当するため、図7(b)に示すように除外対象領域となる。重複領域処理部106は、当該左下の領域について、第1の候補ブロックの占める割合を検出する。64×64画素のブロックにおいて、当該領域における第1の候補ブロックの占める割合は、100%である。16×16画素のブロックにおいて、当該領域における第1の候補ブロックの占める割合は、75%である。これに対して、32×32画素のブロックにおいて、当該領域における第1の候補ブロックの占める割合は、0%である。したがって、割合が低い32×32画素の左下のブロックを除外する。図12は、重複領域処理部106による処理が行われた後の各ブロックの判定結果を示す図であり、図12において「☆」は第2の候補ブロックとして選択されたブロックを示し、「△」は、除外されたブロックを示す。
The lower left region that overlaps twice or more corresponds to a region in which the number of times of overlap of the condition (3) corresponds to a predetermined number of times or more, and thus becomes an exclusion target region as shown in FIG. The overlapping
ブロックサイズ評価値算出部104は、第2の候補ブロックから除外されたブロックを除く、第2の候補ブロックとなった各ブロックについて、予測モードごとに、評価コスト、すなわちRDコストを上記の式(1)に基づいて算出する(ステップSb4)。図13(a)に示す各ブロック内の数値が、ブロックサイズ評価値算出部104が算出した評価コストの値である。最終ブロック選択部105は、ブロックサイズ評価値算出部104が算出した評価コストが最小となる組み合わせをブロック構造を構成するブロックとして選択する(ステップSb5)。
The block size evaluation
32×32画素に分割されたブロックの左下の領域については、重複領域処理部106によって除外されている。そのため、最終ブロック選択部105は、当該領域に、16×16画素に分割されたブロックの左下の4つの領域の評価コストを適用し、評価コストの合計値を「85=25+20+15+10+5+5+5」として算出する。これに対して、64×64画素のブロックの評価コストは「100」である。したがって、最終ブロック選択部105は、図13(b)に示すような組み合わせ、すなわち左右の上と右下は、32×32画素に分割されたブロックであり、左下は、32×32画素に分割されたブロックを再帰的に分割した4つの16×16画素のブロックである組み合わせを選択する。この組み合わせが、評価コストが最小となるブロック構造を構成するブロックの組み合わせとなる。
The lower left area of the block divided into 32 × 32 pixels is excluded by the overlapping
上記の第二実施形態の構成では、第一実施形態の構成に加えて、第2候補ブロック判定部103と、ブロックサイズ評価値算出部104の間に重複領域処理部106を備えたことにより、重複領域処理部106が、第2の候補ブロックとして判定されたブロックが符号化対象LCUの同一の領域で予め定められる回数以上重複している場合、重複しているいずれかのブロックを除外する構成とした。これにより、符号化効率の低下を抑え、ブロック構造決定処理の演算量を削減しつつ、ブロックサイズ評価値算出部104による、評価コストの演算量が削減され、演算速度を高めることが可能となる。
上記の第二実施形態の例では、最終ブロック選択部105が出力するブロック構造は第一実施形態と同じであるが、32×32画素に分割されたLCUの1ブロック分の評価コストの演算量が削減されており、当該演算量の削減により演算速度も速くなっている。
また、重複領域処理部106は、第1の候補ブロックの占める割合が最大となるようにすることで、候補として尤もらしいブロックを候補として残すことを可能としている。
In the configuration of the second embodiment, in addition to the configuration of the first embodiment, the overlap
In the example of the second embodiment described above, the block structure output by the final
In addition, the overlapping
なお、上記の第二実施形態では、条件(3)として、重複回数を判定の基準としているが、重複の回数ではなく、符号化対象LCUにおける、重複領域面積や重複領域の占める割合などを用いてもよい。
また、第二実施形態の構成では、重複回数の判定に用いられる予め定められる所定回数の値によって演算量を変えることができており、図4の例では、所定回数を「2」に設定した場合、面積比で2/4=50%の演算量削減効果を得ることができる。例えば、64×64から8×8までの全ブロックが第2の候補ブロックとなった場合について考える。この場合、所定回数を2に設定すると、2LCU分の面積のブロックが除外される。すなわち、4LCUから2LCUになっているため、評価コストを計算する必要のあるブロックが50%削減されていることになる。その結果、最大でも全体の50%(2LCU分)だけしか計算しなくても良くなる。また、重複の回数ではなく、符号化対象LCUにおける、重複領域面積や重複領域の占める割合などを用いれば、より精度の高い演算量の変更を行うことが可能となる。
In the second embodiment, the number of overlaps is used as a criterion for determination as the condition (3). However, the overlap area area, the ratio of the overlap area in the encoding target LCU, and the like are used instead of the number of overlaps. May be.
In the configuration of the second embodiment, the amount of calculation can be changed by a predetermined number of times used for determination of the number of times of duplication. In the example of FIG. 4, the number of times is set to “2”. In this case, the calculation amount reduction effect of 2/4 = 50% in the area ratio can be obtained. For example, consider a case where all blocks from 64 × 64 to 8 × 8 are the second candidate blocks. In this case, if the predetermined number of times is set to 2, blocks having an area of 2 LCUs are excluded. That is, since 4 LCUs are changed to 2 LCUs, the blocks for which the evaluation cost needs to be calculated are reduced by 50%. As a result, only 50% (for 2 LCUs) of the whole need to be calculated at the maximum. Further, if the overlap area area or the ratio of the overlap area in the encoding target LCU is used instead of the number of overlaps, the calculation amount can be changed with higher accuracy.
(第三実施形態)
次に、本発明の第三実施形態について説明する。図14は、本発明の第三実施形態におけるブロック構造決定部10bの構成を示すブロック図である。第一実施形態における映像符号化装置1は、ブロック構造決定部10を備えている。これに対して、第三実施形態では、当該ブロック構造決定部10がブロック構造決定部10bに置き換えられる構成となる。図14において、第一実施形態と同一の構成については、同一の符号を付し、以下、異なる構成について説明する。ブロック構造決定部10bは、第1候補ブロック判定部102b、第2候補ブロック判定部103bを備える。第1候補ブロック判定部102bは、64×64ブロック判定部1021b、32×32ブロック判定部1022b、16×16ブロック判定部1023b、8×8ブロック判定部1024bを備える。第1候補ブロック判定部102bは、ブロック分割部101が出力する各々のブロックサイズに対応するLCUに基づいて、予測モードごとに、各ブロックが第1の候補ブロックに該当するか否かを判定する。本実施形態では、予測モードとして、イントラ予測モードとインター予測モードとが適用される。
(Third embodiment)
Next, a third embodiment of the present invention will be described. FIG. 14 is a block diagram showing the configuration of the block
第1候補ブロック判定部102の判定部の各々(すなわち、64×64ブロック判定部1021b、32×32ブロック判定部1022b、16×16ブロック判定部1023b、8×8ブロック判定部1024b)による第1の候補ブロックに該当するか否かの判定は、以下のようにして行われる。64×64ブロック判定部1021bの場合は、1個の符号化対象ブロック、32×32ブロック判定部1022bの場合は、4個の符号化対象ブロック、16×16ブロック判定部1023bの場合は、16個の符号化対象ブロック、8×8ブロック判定部1024bの場合は、64個の符号化対象ブロックが判定の対象となる。これらの符号化対象ブロックの各々について、予測モードごとに、下記の条件(4)を満たすか否かを判定する。
First by each of the determination units of the first candidate block determination unit 102 (that is, 64 × 64
条件(4):予測モードが、イントラ予測モードである場合、符号化対象ブロックのブロックサイズが、参照ブロックのブロックサイズと同一、または参照ブロックのブロックサイズよりも1段階小さいサイズと同一の場合、当該符号化対象ブロックをイントラ予測モードにおける第1の候補ブロックとする。予測モードが、インター予測モードである場合、符号化対象ブロックのブロックサイズが参照ブロックのブロックサイズと同一、または参照ブロックのブロックサイズよりも1段階大きいサイズと同一の場合、当該符号化対象ブロックをインター予測モードにおける第1の候補ブロックとする。 Condition (4): When the prediction mode is the intra prediction mode, when the block size of the block to be encoded is the same as the block size of the reference block or the same size as the block size of the reference block, The encoding target block is set as a first candidate block in the intra prediction mode. When the prediction mode is the inter prediction mode, when the block size of the encoding target block is the same as the block size of the reference block or the same size as the block size of the reference block, the encoding target block is Let it be the first candidate block in the inter prediction mode.
また、第1候補ブロック判定部102bの各々の判定部は、判定結果を第2候補ブロック判定部103bに出力する。第2候補ブロック判定部103bは、第1候補ブロック判定部102bが出力する判定結果を受けて、以下の条件(5)を満たすか否かを判定する。
Each determination unit of the first candidate
条件(5):符号化対象ブロックが、最大ブロックサイズ(本実施形態では、64×64画素)の場合、条件(4)を満たした、予測モードとブロックの組を、条件(5)を満たすと判定して第2の候補ブロックとする。最大ブロックサイズではない場合、1段階大きいブロックサイズのブロックを4分割した領域に属するブロック群について、第2候補ブロック判定部103bが内部の記憶領域に予め記憶する図15に示す尤度テーブルに基づいて、尤度の合計を算出する。算出した尤度の合計値が、予め定められる所定の尤度閾値以上の場合、該当する予測モードとブロック群の組み合わせを、条件(5)を満たすと判定し、当該ブロック群に含まれるブロックの全てを当該予測モードにおける第2の候補ブロックとする。このとき、複数の予測モードにおいて、算出した尤度の合計値が、予め定められる所定の尤度閾値以上となった場合、予測モードごとの尤度の合計値において、最も大きい合計値の予測モードに対応するブロック群を第2の候補ブロックとする。算出した尤度の合計値が、予め定められる所定の尤度閾値以上でない場合、条件(5)を満たさないと判定し、ブロック群全てを第2の候補ブロックとしない。ただし、符号化対象LCU内で一度も第2の候補ブロックとなっていない領域は少なくとも一度は第2の候補ブロックとなるように小さいブロックサイズで、かつ尤度合計が最も大きい予測モードを優先的に第2の候補ブロックとする。本実施形態では、予め定められる所定の尤度閾値の値を「6」としている。
Condition (5): When the encoding target block has a maximum block size (64 × 64 pixels in the present embodiment), a combination of a prediction mode and a block that satisfies the condition (4) satisfies the condition (5). Is determined as a second candidate block. If the block size is not the maximum block size, the second candidate
次に、図16から図20を参照しつつ、第三実施形態におけるブロック構造決定処理について説明する。図16は、ブロック構造決定処理の流れを示すフローチャートである。映像符号化装置1のブロック構造決定部10のブロック分割部101は、外部の装置等から受けた符号化対象ピクチャのLCUを32×32画素、16×16画素、8×8画素のブロックサイズに分割する。ブロック分割部101は、最大ブロックサイズの64×64画素のLCUと、32×32画素に分割されたLCUと、16×16画素に分割されたLCUと、8×8画素に分割されたLCUとを第1候補ブロック判定部102bの対応する判定部に出力する(ステップSc1)。
Next, block structure determination processing in the third embodiment will be described with reference to FIGS. 16 to 20. FIG. 16 is a flowchart showing the flow of the block structure determination process. The
第1候補ブロック判定部102bは、符号化対象ブロックが条件(4)を満たす第1の候補ブロックになるか否かを判定し、第1の候補ブロックを選択する処理を行う(ステップSc2)。ステップSc2の処理は、例えば、64×64ブロック判定部1021b、32×32ブロック判定部1022b、16×16ブロック判定部1023b、8×8ブロック判定部1024bの順に、各々の判定部によって、各々に対応するブロックサイズのLCUに対して行われる(ループLc1)。また、第1候補ブロック判定部102の各々の判定部は、符号化対象LCUに含まれるブロックの各々について繰り返しステップSc2の処理を行う(ループLc2)。例えば、8×8ブロック判定部1024bの場合、64個のブロックの各々に対してステップSa2を64回繰り返して行う。また、第1候補ブロック判定部102bの各々の判定部は、予測モードごと、すなわち本実施形態ではイントラ予測モードとインター予測モードについて、ステップSc2の処理を行う(ループLc3)。第1候補ブロック判定部102bの各々の判定部によって、予測モードごとについてステップSc2の処理が行なわれると、ループLc3が終了する(ループLc4)。また、第1候補ブロック判定部102bの各々の判定部によって、符号化対象LCUに含まれるブロックの各々についてステップSc2の処理が行なわれると、ループLc2が終了する(ループLc5)。また、第1候補ブロック判定部102bの各々の判定部によって、各々に対応するブロックサイズのLCUに対してステップSc2の処理が行われると、ループLc1が終了する(ループLc6)。
The first candidate
図17は、第1候補ブロック判定部102bによる判定結果を示す図である。図17において、「○」は、条件(4)を満たしていることを示しており、「×」は、条件(4)を満たしていないことを示す。64×64画素のブロックについては、最大ブロックサイズであるため、予測モードに関わらず、条件(4)を満たすことになるため、図17(a)に示すように、第1の候補ブロックとなる。32×32画素に分割されたLCUについては、イントラ予測モードについては、第一実施形態と同じ結果となり、左右上のブロックが、第1の候補ブロックとなり、左右下のブロックは、第1の候補ブロックとはならない。これに対して、インター予測モードについては、右上のブロックに重なる参照ブロックのサイズが64×64画素であるため、条件(4)を満たさない。左上のブロックは、参照ブロックと同じブロックサイズであり、左右の下のブロックは、参照ブロックが16×16画素であるため、条件(4)を満たすことから、第1の候補ブロックとなる。したがって、第1候補ブロック判定部102bによる32×32画素に分割されたLCUの判定結果は、図17(b)のようになる。
FIG. 17 is a diagram illustrating a determination result by the first candidate
16×16画素に分割されたLCUについても、イントラ予測モードについては、第一実施形態と同じブロックが、第1の候補ブロックとなる。これに対して、インター予測モードについては、LCUの4行目の4個のブロックの中心座標が、いずれも16×16画素のブロック、または32×32画素のブロックに存在するため、条件(4)を満たし、第1の候補ブロックとなる。したがって、第1候補ブロック判定部102bによる16×16画素に分割されたLCUの判定結果は、図17(c)のようになる。8×8画素については、全て条件(4)を満たさないと判定される。
For the LCU divided into 16 × 16 pixels, the same block as the first embodiment is the first candidate block in the intra prediction mode. On the other hand, in the inter prediction mode, since the center coordinates of the four blocks in the fourth row of the LCU are all in a 16 × 16 pixel block or a 32 × 32 pixel block, the condition (4 ) To satisfy the first candidate block. Therefore, the determination result of the LCU divided into 16 × 16 pixels by the first candidate
次に、第2候補ブロック判定部103bは、第1候補ブロック判定部102bが出力する判定結果を受けて、条件(5)に基づいて第2の候補ブロックの判定を行う(ステップSc3)。第2候補ブロック判定部103bは、32×32画素に4分割されたLCUの4個の領域の尤度の合計値と、32×32画素の各ブロックが更に4分割された16×16画素の4個の領域の尤度の合計値とを、予測モードごとに、図15に示す尤度テーブルを用いて算出する。図18は、第2候補ブロック判定部103bによる尤度の合計値の算出結果である。32×32画素のLCUについては、尤度の合計値が「11」となる。16×16画素の左上の4個の領域の尤度の合計値は、「6」となり、16×16画素の左下の4個の領域の尤度の合計値は、「13」となり、16×16画素の右下の4個の領域の尤度の合計値は、「10」となる。
Next, the second candidate
第2候補ブロック判定部103bは、尤度の合計値が、予め定められる尤度閾値、すなわち「7」以上であるか否かに基づいて、第2の候補ブロックに該当するか否かを判定する。図19(b)に示すように、32×32画素に分割されたLCUは、尤度の合計値が、「11」であるため、第2候補ブロック判定部103bは、条件(5)を満たすと判定する。図19(b)に示すように第2候補ブロック判定部103bは、イントラ予測モードについては、尤度の合計値が「2」であり、インター予測モードについては、尤度の合計値が「9」である。尤度の合計値の大きいのは、インター予測モードであるため、第2候補ブロック判定部103bは、インター予測モードにおいて「×」となっている右上のブロックを第2の候補ブロックとする。
The second candidate
図19(c)に示すように、16×16画素に分割されたLCUの左上の4個のブロックについては、尤度の合計値が「6」であるため、第2候補ブロック判定部103bは、4個のブロック全てを第2の候補ブロックにはしない。
As shown in FIG. 19 (c), for the four blocks at the upper left of the LCU divided into 16 × 16 pixels, the total likelihood value is “6”, so the second candidate
左下の4個のブロックについては、イントラ予測モードの尤度の合計値が「9」であり、インター予測モードの尤度の合計値が「4」であるため、全体としての尤度の合計値は「13」であり、尤度閾値以上となっている。尤度の合計値が大きいのは、イントラ予測モードの方であるため、第2候補ブロック判定部103bは、イントラ予測モードのブロックについて、「×」となっている右上のブロックを第2の候補ブロックとする。
For the four blocks at the lower left, the total likelihood value in the intra prediction mode is “9” and the total likelihood value in the inter prediction mode is “4”, so the total likelihood value as a whole Is “13”, which is equal to or greater than the likelihood threshold. Since the total likelihood value is larger in the intra prediction mode, the second candidate
右下の4個のブロックについては、イントラ予測モードの尤度の合計値が「6」であり、インター予測モードの尤度の合計値が「4」であり、全体としての尤度の合計値は「10」であり、尤度閾値以上となっている。尤度の合計値が大きいのは、イントラ予測モードの方であるため、第2候補ブロック判定部103bは、イントラ予測モードのブロックについて、「×」となっている左右上のブロックを第2の候補ブロックとする。最終的に、第2候補ブロック判定部103bによって、図19(c)に同一、示すように、第2の候補ブロックが選択される。
For the four blocks on the lower right, the total likelihood value in the intra prediction mode is “6”, the total likelihood value in the inter prediction mode is “4”, and the total likelihood value as a whole Is “10”, which is equal to or greater than the likelihood threshold. Since the total likelihood value is larger in the intra prediction mode, the second candidate
ブロックサイズ評価値算出部104は、第2の候補ブロックとなった各ブロックについて、予測モードごとに、評価コスト、すなわちRDコストを上記の式(1)に基づいて算出する(ステップSc4)。図20(a)に示す各ブロック内の数値が、ブロックサイズ評価値算出部104が算出した評価コストの値である。最終ブロック選択部105は、ブロックサイズ評価値算出部104が算出した評価コストが最小となる組み合わせをブロック構造を構成するブロックとして選択する(ステップSc5)。
The block size evaluation
図20(a)に示すように、まず、最終ブロック選択部105は、32×32画素の左下のブロックの評価コストである「30」と、16×16画素の左下の4分割の領域の評価コストの合計である「25=10+5+5+5」とを比較する。16×16画素の左下の4分割の領域の評価コストの合計の方が小さいので、最終ブロック選択部105は、16×16画素に分割されたブロックを選択する。また、最終ブロック選択部105は、32×32画素の右下のブロックの評価コストである「15」と、16×16画素の右下の4分割の領域の評価コストの合計である「14=5+3+3+3」とを比較する。16×16画素の左下の4分割の領域の評価コストの合計の方が小さいので、最終ブロック選択部105は、16×16画素に分割されたブロックを選択する。
As shown in FIG. 20A, first, the final
次に、最終ブロック選択部105は、64×64画素の評価コストである「100」と、32×32画素の4分割の領域の各ブロックの評価コストの合計とを比較する。この際、32×32画素の左下のブロックの評価コストは、16×16画素の左下の4分割の領域の評価コストの合計である「25=10+5+5+5」が用いられる。また、32×32画素の右下のブロックの評価コストは、16×16画素の右下の4分割の領域の評価コストの合計である「14=5+3+3+3」が用いられる。すなわち、最終ブロック選択部105は、64×64画素の評価コストである「100」と、32×32画素の4分割の領域の各ブロックの評価コストの合計である「84=25+20+25+14」とを比較する。
Next, the final
32×32画素の4分割の領域の評価コストの合計の方が小さいので、最終ブロック選択部105は、32×32画素に分割されたブロックを選択する。この際、最終ブロック選択部105は、32×32画素に分割されたブロックの左下のブロックにおいては16×16画素に分割されたブロックを選択する。また、最終ブロック選択部105は、32×32画素に分割されたブロックの右下のブロックにおいては16×16画素に分割されたブロックを選択する。選択したブロックに基づいて、最終ブロック選択部105は、図20(b)に示すブロック構造を出力する。
Since the total evaluation cost of the 32 × 32 pixel four-divided area is smaller, the final
上記の第三実施形態の構成により、第1候補ブロック判定部102bは、64×64画素のLCU、32×32画素に分割されたLCU、16×16画素に分割されたLCU、8×8画素に分割されたLCUの各ブロックのブロックサイズと、対応する参照ブロックのブロックサイズとに基づいて、予測モードの種類に応じて、第1の候補ブロックに該当するか否かを判定する。第2候補ブロック判定部103は、予測モードとブロックサイズとに応じて予め定められる尤度、及び1段階ブロックサイズが大きいブロックから4分割された4個のブロックに占める第1の候補ブロックの割合に基づいて、4個のブロックの尤度の合計値を算出する。そして、尤度の合計値が、予め定められる尤度閾値以上の場合、当該ブロック群を第2の候補ブロックとする。これにより、符号化効率の低下を抑えつつ、ブロック構造決定処理の演算量を削減することが可能となる。
With the configuration of the third embodiment, the first candidate
第一実施形態の構成では、各ブロックについて第1の候補ブロック及び第2の候補ブロックとするか否かを判定していた。そのため、第2候補ブロック判定部103の判定処理により、第1の候補ブロックでないブロックを第2の候補ブロックとして追加した場合、適用される全ての予測モードについて演算を行う必要があった。これに対して、第三実施形態の構成では、予測モードを考慮に加えて判定しているため、判定精度が向上し、更に、第2の候補ブロックを追加する際に、尤度の値が大きい予測モードに対応するブロックのみを第2の候補ブロックとしている。そのため、追加したブロックについては、当該予測モードについて演算するだけでよく、演算量の増加を抑えた上で第2の候補ブロックを追加することができる。例えば、図4の例において、第三実施形態では、第一実施形態では第2の候補ブロックとされていない、16×16画素に分割されたLCUの右下ブロック群を新たに第2の候補ブロックとして追加しているが、4個のブロックの内2つは評価コストをインター予測モードのみで計算しているため、演算量の増加が抑えられた上で第一実施形態とは異なる精度の高いブロック構造を出力することを可能としている。
In the configuration of the first embodiment, it is determined whether or not each block is the first candidate block and the second candidate block. Therefore, when a block that is not the first candidate block is added as the second candidate block by the determination process of the second candidate
なお、上記の第三実施形態において、条件(4)は、候補となるブロックサイズにおいて、予測モードによって尤度が異なるという特徴を利用した条件である。しかしながら、本発明の構成は当該実施の形態に限られず、上記した以外の条件を適用するようにしてもよい。
また、条件(5)についても、上記した以外の条件を適用してもよく、例えば、図15に示す尤度テーブルや尤度閾値を符号化結果に応じて適応的に変えるなどしてもよい。また、ブロックの位置関係を考慮し、例えば、新たに第2の候補ブロックとするブロックの予測モードを隣接ブロックの予測モードの候補の中で数が多い予測モードにしてもよい。また、隣接ブロックにおいて同じ予測モードが候補になっている場合、図15に示す尤度テーブルにおいて、尤度の値を大きく設定するようにしてもよい。
In the third embodiment, the condition (4) is a condition using a feature that the likelihood differs depending on the prediction mode in the candidate block size. However, the configuration of the present invention is not limited to this embodiment, and conditions other than those described above may be applied.
Moreover, conditions other than those described above may also be applied to the condition (5). For example, the likelihood table and the likelihood threshold shown in FIG. 15 may be adaptively changed according to the encoding result. . In consideration of the positional relationship of blocks, for example, the prediction mode of a block that is newly set as a second candidate block may be set to a prediction mode with a large number of prediction mode candidates of adjacent blocks. Further, when the same prediction mode is a candidate in an adjacent block, the likelihood value may be set large in the likelihood table shown in FIG.
上記の第一実施形態から第三実施形態では、HEVCに準拠した構成を対象としているが、HEVCに準拠した構成に限られるものではない。 In the first to third embodiments, the configuration conforming to HEVC is targeted, but the configuration is not limited to the configuration conforming to HEVC.
また、上記の第一実施形態から第三実施形態では、LCUのサイズを64×64画素とし、CUのサイズを64×64画素、32×32画素、16×16画素、8×8画素の4パターンの中からブロック構造を構成するブロックを選択している。しかしながら、本発明の構成は当該実施の形態に限られず、2つ以上のパターンの中からブロック構造を構成するブロックを選択する実施形態等にも適用することが可能である。 In the first to third embodiments, the LCU size is 64 × 64 pixels, and the CU size is 4 × 64 pixels, 32 × 32 pixels, 16 × 16 pixels, and 8 × 8 pixels. A block constituting the block structure is selected from the pattern. However, the configuration of the present invention is not limited to this embodiment, and can also be applied to an embodiment in which blocks constituting a block structure are selected from two or more patterns.
また、上記の第一実施形態から第三実施形態では、図3において説明した符号化対象LCUと、参照ブロックとの関係を示す動きベクトルとして、1つの動きベクトルを示しているが、動きベクトルを用いずに、符号化対象LCUと空間的に同位置のブロックを参照ブロックとしてもよいし、符号化対象LCUごとの動きベクトルではなく、符号化対象LCUの各ブロックそれぞれの動きベクトルを用いるようにしてもよい。 In the first to third embodiments, one motion vector is shown as a motion vector indicating the relationship between the encoding target LCU described in FIG. 3 and the reference block. Instead, the block located in the same position as the encoding target LCU may be used as a reference block, and the motion vector of each block of the encoding target LCU is used instead of the motion vector for each encoding target LCU. May be.
また、上記の第一実施形態から第三実施形態において、ブロックサイズ評価値算出部104が算出するRDコストは、評価コストの一例であり、ブロックを評価することのできる指標であればどのようなものでもよく、例えば、評価コストとして、誤差のみ、符号量のみ、輝度値の分散値等の統計値を適用してもよい。
In the first to third embodiments, the RD cost calculated by the block size evaluation
また、上記の第一実施形態から第三実施形態において、予測モードとして、イントラ予測モードとインター予測モードを適用するようにしているが、本発明の実施の形態は、当該実施の形態に限られない。イントラ予測モードやインター予測モードに加えて、Merge予測モードやSkip予測モードを適用してもよく、また、これらの中の任意の2つ以上の予測モードを選択して適用するようにしてもよい。 Moreover, in said 1st embodiment to 3rd embodiment, although intra prediction mode and inter prediction mode are applied as prediction mode, embodiment of this invention is limited to the said embodiment. Absent. In addition to the intra prediction mode and the inter prediction mode, the Merge prediction mode and the Skip prediction mode may be applied, or any two or more of these prediction modes may be selected and applied. .
例えば、Skip予測モードとMerge予測モードを適用する場合、参照ブロックがSkip予測モードの場合、参照ブロックのブロックサイズと同一、または、参照ブロックのブロックサイズより1段階大きいブロックサイズと同一であれば第1の候補ブロックとする。参照ブロックがSkip予測モード以外の場合、参照ブロックのブロックサイズと同一、または、参照ブロックのブロックサイズより1段階小さいブロックサイズと同一であれば第1の候補ブロックとする。
第2の候補ブロックを選択する手法としては、例えば、4分割された4個のブロックにおいて、第1の候補ブロックの割合が50%以上であれば、第1の候補ブロックでない残りのブロックも含めて全てを第2の候補ブロックとする手法がある。また、他の手法として、点数によって第2の候補ブロックを選択する手法もある。例えば、参照ブロックのブロックサイズが32×32画素で、Skipモードである場合、符号化対象ブロックも32×32画素になる確率が高いとして2点、参照ブロックの予測モードがインター予測モードの場合、符号化対象ブロックが32×32画素になる確率は普通であるとして1点、参照ブロックの予測モードがイントラ予測モードの場合、符号化対象ブロックが32×32画素になる確率は低いとして0点というように点数を決めておく。4分割された4個のブロックにおける点数が4点を超えた場合、4個のブロック全てを第2の候補ブロックとして選択する手法もある。
For example, when the Skip prediction mode and the Merge prediction mode are applied, if the reference block is the Skip prediction mode, the first block size is the same as the block size of the reference block or the block size that is one step larger than the block size of the reference block. Let it be one candidate block. When the reference block is other than the Skip prediction mode, the first candidate block is determined if it is the same as the block size of the reference block or the block size that is one step smaller than the block size of the reference block.
As a method of selecting the second candidate block, for example, in the four blocks divided into four, if the ratio of the first candidate block is 50% or more, the remaining blocks that are not the first candidate block are included. There is a technique in which all are used as second candidate blocks. As another method, there is also a method of selecting the second candidate block by the score. For example, when the block size of the reference block is 32 × 32 pixels and the Skip mode is used, there is a high probability that the encoding target block is also 32 × 32 pixels, and when the prediction mode of the reference block is the inter prediction mode, The probability that the encoding target block is 32 × 32 pixels is normal, 1 point, and when the prediction mode of the reference block is the intra prediction mode, the probability that the encoding target block is 32 × 32 pixels is low, 0 points. Determine the score as follows. There is also a method of selecting all four blocks as second candidate blocks when the number of points in the four blocks divided into four exceeds four points.
また、上記の第一実施形態から第三実施形態において、第2候補ブロック判定部103、103bは、分割されたブロック群をまとめて第2の候補ブロックとするか否かを判定しており、このように複数のブロックを一度に判定することで、GPU(Graphics Processing Unit)などの並列処理に特化したデバイスなどにおいて、大量のデータをまとめて処理することによる高速化の効果が得られるという利点がある。 Moreover, in said 1st embodiment to 3rd embodiment, the 2nd candidate block determination part 103,103b has determined whether the divided | segmented block group is made into a 2nd candidate block collectively, By determining a plurality of blocks in this way, a device that specializes in parallel processing such as a GPU (Graphics Processing Unit) can achieve the effect of speeding up by processing a large amount of data collectively. There are advantages.
また、上記の第一実施形態から第三実施形態において、図5、図10、図16のフローチャートにおけるLa1、La2、Lb1、Lb2、Lc1、Lc2、Lc3のループ処理は、上述したように順番に行われてもよいし、並列に処理を行うようにしてもよい。 In the first to third embodiments, the loop processing of La1, La2, Lb1, Lb2, Lc1, Lc2, and Lc3 in the flowcharts of FIGS. 5, 10, and 16 is performed in order as described above. It may be performed, or processing may be performed in parallel.
また、上記の第一実施形態から第三実施形態において、例えば、第一実施形態における条件(2)の所定個数以上とする判定、第二実施形態における重複回数の判定における所定回数以上とする判定、第三実施形態における尤度閾値以上とする判定の処理は、一例であり、ある値以上、ある値未満とする判定ではなく、ある値を超過、ある値以下とする判定であってもよい。
また、上記の第一実施形態から第三実施形態において、8×8画素についてはすべて条件(1)を満たさないため、8×8画素全てが第1の候補ブロックに該当しないという判定がなされる一例を示したが、以下のような場合には8×8画素の一部が第1の候補ブロックになるケースも想定される。それは、8×8の場合、その中心座標が参照ブロックの16×16画素のブロックに存在している場合である。この場合には、参照ブロックのサイズよりも1段階小さいサイズとなるため、8×8画素の一部が第1の候補ブロックになる。
Moreover, in said 1st embodiment to 3rd embodiment, the determination made into more than the predetermined number of conditions (2) in 1st embodiment, for example, the determination made more than the predetermined number in the determination of the frequency | count of duplication in 2nd embodiment In the third embodiment, the process of determining to be greater than or equal to the likelihood threshold is an example, and may be a determination to exceed a certain value and to be less than or equal to a certain value, instead of determining to be greater than a certain value and less than a certain value. .
Moreover, in said 1st embodiment to 3rd embodiment, since all 8 * 8 pixels do not satisfy | fill conditions (1), determination that all 8 * 8 pixels do not correspond to a 1st candidate block is made. Although an example has been shown, in the following cases, a case where a part of 8 × 8 pixels becomes the first candidate block is also assumed. In the case of 8 × 8, the center coordinates are present in a 16 × 16 pixel block of the reference block. In this case, since the size is one step smaller than the size of the reference block, a part of 8 × 8 pixels becomes the first candidate block.
上述した実施形態におけるブロック構造決定部10、10a、10bをコンピュータで実現するようにしてもよい。その場合、この機能を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することによって実現してもよい。なお、ここでいう「コンピュータシステム」とは、OSや周辺機器等のハードウェアを含むものとする。また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD−ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムを送信する場合の通信線のように、短時間の間、動的にプログラムを保持するもの、その場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリのように、一定時間プログラムを保持しているものも含んでもよい。また上記プログラムは、前述した機能の一部を実現するためのものであってもよく、さらに前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるものであってもよく、FPGA(Field Programmable Gate Array)等のプログラマブルロジックデバイスを用いて実現されるものであってもよい。
You may make it implement | achieve the block
以上、この発明の実施形態について図面を参照して詳述してきたが、具体的な構成はこの実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の設計等も含まれる。 The embodiment of the present invention has been described in detail with reference to the drawings. However, the specific configuration is not limited to this embodiment, and includes designs and the like that do not depart from the gist of the present invention.
1…映像符号化装置,10…ブロック構造決定部,11…減算器,12…直交変換・量子化部,13…可変長符号化部,14…逆量子化・逆直交変換部,15…加算器,16…イントラ予測部,17…イントラ・インター切替スイッチ,18…ループフィルタ部,19…復号ピクチャメモリ部,20…インター予測部,101…ブロック分割部,102…第1候補ブロック判定部,103…第2候補ブロック判定部,104…ブロックサイズ評価値算出部,105…最終ブロック選択部,1021…64×64ブロック判定部,1022…32×32ブロック判定部,1023…16×16ブロック判定部,1024…8×8ブロック判定部
DESCRIPTION OF
Claims (8)
決定された前記ブロック構造に基づいて符号化を行う符号化部と、
を備え、
前記ブロック構造決定部は、
前記ブロックサイズごとに、前記画像の領域を所定のサイズのブロックに分割するブロック分割部と、
分割された前記ブロックのサイズと、前記ブロックが参照する領域の中心が属するブロックのサイズと、が等しい若しくは前記中心が属するブロックのサイズが1段階大きい場合、前記ブロックの各々が、第1の候補ブロックとなると判定する第1候補ブロック判定部と、
前記所定のサイズより1段階大きいサイズのブロックを前記所定のサイズに分割して得られたブロック群が前記第1の候補ブロックとして判定されている数が所定の値以上の場合、前記ブロック群に属するすべてのブロックを第2の候補ブロックにすると判定する第2候補ブロック判定部と、
前記第2の候補ブロックと判定された前記ブロックについて評価値を算出するブロックサイズ評価値算出部と、
前記評価値に基づいて、前記画像の領域を分割する前記ブロックの組み合わせを選択する最終ブロック選択部と、
を備える映像符号化装置。 Dividing an image into a plurality of regions, and determining a block structure configured by one block size generated by recursively dividing the region into blocks or a combination of blocks having a plurality of block sizes A block structure determination unit;
An encoding unit that performs encoding based on the determined block structure;
With
The block structure determining unit
A block dividing unit that divides the area of the image into blocks of a predetermined size for each block size;
If the size of the divided block is equal to the size of the block to which the center of the area referred to by the block belongs, or if the size of the block to which the center belongs is one step larger, each of the blocks is the first candidate a first candidate block determination unit determines that the block,
When the number of blocks determined by dividing a block having a size one step larger than the predetermined size into the predetermined size is equal to or greater than a predetermined value, the block group all block and the second candidate block determination unit determines to a second candidate block belonging,
A block size evaluation value calculation unit for calculating an evaluation value for the block determined as the second candidate block;
A final block selection unit that selects a combination of the blocks that divide the image area based on the evaluation value;
A video encoding device comprising:
前記第1候補ブロック判定部と、前記第2候補ブロック判定部は、前記複数のサイズごとに判定を行い、
前記画像の所定の領域について、前記第2候補ブロック判定部により重複して前記第2の候補ブロックにすると判定されている場合、前記画像の所定の領域についてのいずれかのブロックを前記第2の候補ブロックから除外する
重複領域処理部をさらに備える、請求項1に記載の映像符号化装置。 The block dividing unit divides the image into a plurality of predetermined sizes,
The first candidate block determination unit and the second candidate block determination unit perform determination for each of the plurality of sizes,
When it is determined by the second candidate block determination unit that the predetermined region of the image overlaps with the second candidate block, any block of the predetermined region of the image is set as the second candidate block. Exclude from candidate block
The video encoding apparatus according to claim 1, further comprising an overlapping area processing unit .
前記第2候補ブロック判定部は、前記所定のサイズより1段階大きいサイズのブロックを前記所定のサイズに分割して得られたブロック群に対して、前記予測モードごとに、前記ブロック群に含まれる前記第1の候補ブロックの割合と、予測モードとブロックサイズとに応じて予め定められる尤度と、に基づいて、前記ブロック群のブロックを全て第2の候補ブロックにするか否かを判定する、請求項1又は2に記載の映像符号化装置。 The first candidate block determination unit, for each prediction mode applied to the image, based on the divided block and a reference block that divides a region in a reference picture corresponding to the region of the image, Determine whether each of the blocks is a first candidate block;
The second candidate block determination unit is included in the block group for each prediction mode with respect to a block group obtained by dividing a block having a size one step larger than the predetermined size into the predetermined size. Based on the ratio of the first candidate block and the likelihood determined in advance according to the prediction mode and the block size, it is determined whether or not all the blocks in the block group are the second candidate blocks. The video encoding device according to claim 1 or 2 .
前記第2候補ブロック判定部は、前記ブロック群のブロックサイズと、前記予測モードとに基づいて、前記予測モードごとの前記ブロック群の尤度を算出し、算出した尤度の合計値に基づいて、前記ブロック群のブロックを全て第2の候補ブロックにするか否かを判定する、請求項3又は4に記載の映像符号化装置。 Different likelihoods are predetermined for each combination of block size and the prediction mode,
The second candidate block determination unit calculates the likelihood of the block group for each prediction mode based on the block size of the block group and the prediction mode, and based on the calculated total likelihood value The video encoding device according to claim 3 , wherein it is determined whether or not all blocks of the block group are second candidate blocks.
決定された前記ブロック構造に基づいて符号化を行う符号化ステップと、
を有し、
前記ブロック構造決定ステップにおいて、
前記ブロックサイズごとに、前記画像の領域を所定のサイズのブロックに分割するブロック分割ステップと、
分割された前記ブロックのサイズと、前記ブロックが参照する領域の中心が属するブロックのサイズと、が等しい若しくは前記中心が属するブロックのサイズが1段階大きい場合、前記ブロックの各々が、第1の候補ブロックとなると判定する第1候補ブロック判定ステップと、
前記所定のサイズより1段階大きいサイズのブロックを前記所定のサイズに分割して得られたブロック群が前記第1の候補ブロックとして判定されている数が所定の値以上の場合、前記ブロック群に属するすべてのブロックを第2の候補ブロックにすると判定する第2候補ブロック判定ステップと、
前記第2の候補ブロックと判定された前記ブロックについて評価値を算出するブロックサイズ評価値算出ステップと、
前記評価値に基づいて、前記画像の領域を分割する前記ブロックの組み合わせを選択する最終ブロック選択ステップと、
を行うブロック構造決定方法。 A block structure configured by one block size generated by dividing an image region into blocks and recursively dividing the region into blocks or a combination of blocks having a plurality of block sizes is determined. A block structure determination step;
An encoding step for performing encoding based on the determined block structure;
Have
In the block structure determination step,
A block dividing step of dividing the image area into blocks of a predetermined size for each block size;
If the size of the divided block is equal to the size of the block to which the center of the area referred to by the block belongs, or if the size of the block to which the center belongs is one step larger, each of the blocks is the first candidate a first candidate block determination step of determining that the block,
When the number of blocks determined by dividing a block having a size one step larger than the predetermined size into the predetermined size is equal to or greater than a predetermined value, the block group a second candidate block determination step determines to all blocks belonging to the second candidate block,
A block size evaluation value calculating step for calculating an evaluation value for the block determined to be the second candidate block;
A final block selection step of selecting a combination of the blocks that divide the region of the image based on the evaluation value;
A block structure determination method.
決定された前記ブロック構造に基づいて符号化を行う符号化ステップと、
をコンピュータに実行させ、
前記ブロック構造決定ステップにおいて、
前記ブロックサイズごとに、前記画像の領域を所定のサイズのブロックに分割するブロック分割ステップと、
分割された前記ブロックのサイズと、前記ブロックが参照する領域の中心が属するブロックのサイズと、が等しい若しくは前記中心が属するブロックのサイズが1段階大きい場合、前記ブロックの各々が、第1の候補ブロックとなると判定する第1候補ブロック判定ステップと、
前記所定のサイズより1段階大きいサイズのブロックを前記所定のサイズに分割して得られたブロック群が前記第1の候補ブロックとして判定されている数が所定の値以上の場合、前記ブロック群に属するすべてのブロックを第2の候補ブロックにすると判定する第2候補ブロック判定ステップと、
前記第2の候補ブロックと判定された前記ブロックについて評価値を算出するブロックサイズ評価値算出ステップと、
前記評価値に基づいて、前記画像の領域を分割する前記ブロックの組み合わせを選択する最終ブロック選択ステップと、
を実行させるためのコンピュータプログラム。 A block structure configured by one block size generated by dividing an image region into blocks and recursively dividing the region into blocks or a combination of blocks having a plurality of block sizes is determined. A block structure determination step;
An encoding step for performing encoding based on the determined block structure;
To the computer,
In the block structure determination step,
A block dividing step of dividing the image area into blocks of a predetermined size for each block size;
If the size of the divided block is equal to the size of the block to which the center of the area referred to by the block belongs, or if the size of the block to which the center belongs is one step larger, each of the blocks is the first candidate a first candidate block determination step of determining that the block,
When the number of blocks determined by dividing a block having a size one step larger than the predetermined size into the predetermined size is equal to or greater than a predetermined value, the block group a second candidate block determination step determines to all blocks belonging to the second candidate block,
A block size evaluation value calculating step for calculating an evaluation value for the block determined to be the second candidate block;
A final block selection step of selecting a combination of the blocks that divide the region of the image based on the evaluation value;
A computer program for running.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016101597A JP6616242B2 (en) | 2016-05-20 | 2016-05-20 | Video coding apparatus, block structure determination method, and computer program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016101597A JP6616242B2 (en) | 2016-05-20 | 2016-05-20 | Video coding apparatus, block structure determination method, and computer program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2017208768A JP2017208768A (en) | 2017-11-24 |
JP6616242B2 true JP6616242B2 (en) | 2019-12-04 |
Family
ID=60415650
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2016101597A Active JP6616242B2 (en) | 2016-05-20 | 2016-05-20 | Video coding apparatus, block structure determination method, and computer program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6616242B2 (en) |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20080107965A (en) * | 2007-06-08 | 2008-12-11 | 삼성전자주식회사 | Method and apparatus for encoding and decoding image using object boundary based partition |
ES2834902T3 (en) * | 2010-12-06 | 2021-06-21 | Sun Patent Trust | Image decoding method, and image decoding device |
FR2992815A1 (en) * | 2012-06-27 | 2014-01-03 | France Telecom | METHOD FOR ENCODING A CURRENT BLOCK OF A FIRST IMAGE COMPONENT IN RELATION TO A REFERENCE BLOCK OF AT LEAST ONE SECOND IMAGE COMPONENT, ENCODING DEVICE AND CORRESPONDING COMPUTER PROGRAM |
JP5719401B2 (en) * | 2013-04-02 | 2015-05-20 | 日本電信電話株式会社 | Block size determination method, video encoding device, and program |
JP5719410B2 (en) * | 2013-07-25 | 2015-05-20 | 日本電信電話株式会社 | Image coding method, image coding apparatus, and image coding program |
-
2016
- 2016-05-20 JP JP2016101597A patent/JP6616242B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2017208768A (en) | 2017-11-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI717779B (en) | Method and apparatus of constrained overlapped block motion compensation in video coding | |
KR102551731B1 (en) | Method for encoding/decoing video using intra prediction and apparatus for the same | |
JP6545838B2 (en) | Merge candidate block derivation method and apparatus using such method | |
JP5792305B2 (en) | Method and apparatus for adaptive loop filtering | |
US11902563B2 (en) | Encoding and decoding method and device, encoder side apparatus and decoder side apparatus | |
KR20230010048A (en) | Method and apparatus for encoding/decoding image and recording medium for storing bitstream | |
JP7430721B2 (en) | Video signal encoding/decoding method and apparatus for said method | |
KR20190063452A (en) | Video encoding/decoding method and apparatus using in-loop filtering | |
CN109845256B (en) | Video encoding method and apparatus, video decoding method and apparatus, and recording medium storing bit stream | |
US20130136187A1 (en) | Video encoding method, video decoding method, video encoding apparatus, video decoding apparatus, and program thereof | |
US11750822B2 (en) | Encoding device, decoding device, and program | |
KR101197176B1 (en) | Methods of derivation of merge candidate block and apparatuses for using the same | |
KR101782156B1 (en) | Image encoding method and image decoding method and apparatus using adaptive deblocking filtering | |
KR101519557B1 (en) | Apparatus and method for fast Intra Prediction Algorithm | |
KR102327942B1 (en) | Method and device for determining coding unit partitioning, computing device and readable storage medium | |
KR20180107778A (en) | Deblocking filter method and apparatus | |
JP2017069866A (en) | Moving image encoder, moving image encoding method and computer program for encoding moving image | |
JP5770647B2 (en) | Image encoding method, image encoding device, image decoding method, image decoding device, and programs thereof | |
US10595038B2 (en) | Moving image coding apparatus, moving image coding method and recording medium | |
JP6616242B2 (en) | Video coding apparatus, block structure determination method, and computer program | |
JP2023159443A (en) | Decoding device and program | |
CN116886911A (en) | Video encoding method, video decoding method, and method for transmitting bit stream | |
CN109889838A (en) | A kind of HEVC fast encoding method based on ROI region | |
WO2022077490A1 (en) | Intra prediction method, encoder, decoder, and storage medium | |
JP2013207402A (en) | Image encoding device and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20180622 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20190422 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20190514 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20190711 |
|
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: 20191105 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20191107 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6616242 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |