JP6323185B2 - Moving picture coding apparatus, moving picture coding method, and moving picture coding computer program - Google Patents
Moving picture coding apparatus, moving picture coding method, and moving picture coding computer program Download PDFInfo
- Publication number
- JP6323185B2 JP6323185B2 JP2014116180A JP2014116180A JP6323185B2 JP 6323185 B2 JP6323185 B2 JP 6323185B2 JP 2014116180 A JP2014116180 A JP 2014116180A JP 2014116180 A JP2014116180 A JP 2014116180A JP 6323185 B2 JP6323185 B2 JP 6323185B2
- Authority
- JP
- Japan
- Prior art keywords
- search
- encoding
- picture
- motion vector
- search mode
- 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
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Description
本発明は、例えば、ピクチャを符号化済みの他のピクチャを参照して符号化する動画像符号化装置、動画像符号化方法及び動画像符号化用コンピュータプログラムに関する。 The present invention relates to, for example, a moving picture coding apparatus, a moving picture coding method, and a moving picture coding computer program for coding a picture with reference to another coded picture.
動画像データは、一般に非常に大きなデータ量を有する。そのため、動画像データを扱う装置は、動画像データを他の装置へ送信しようとする場合、あるいは、動画像データを記憶装置に記憶しようとする場合、動画像データを高能率符号化する。なお、「高能率符号化」とは、あるデータ列を他のデータ列に変換する符号化処理であって、そのデータ量を圧縮する処理をいう。 The moving image data generally has a very large amount of data. For this reason, a device that handles moving image data encodes moving image data with high efficiency when moving image data is to be transmitted to another device or when moving image data is to be stored in a storage device. “High-efficiency encoding” refers to an encoding process for converting a data string into another data string and compressing the data amount.
動画像データの高能率符号化方法として、ピクチャ内予測(イントラ予測)符号化方法が知られている。この符号化方法は、動画像データが空間方向に相関性が高いことを利用し、他のピクチャの符号化画像を用いない。ピクチャ内予測符号化方法で符号化されたピクチャは、そのピクチャ内の情報のみで復元できる。 As a high-efficiency encoding method for moving image data, an intra-picture prediction (intra prediction) encoding method is known. This encoding method uses the fact that moving image data is highly correlated in the spatial direction, and does not use encoded images of other pictures. A picture encoded by the intra-picture predictive encoding method can be restored only with information in the picture.
また、高能率符号化方法で採用されている他の符号化方式として、ピクチャ間予測(インター予測)符号化方法が知られている。この符号化方法は、動画像データが時間方向に相関性が高いことを利用する。動画像データでは、一般に、あるタイミングのピクチャとそのピクチャに後続するピクチャ間の類似度が高いことが多い。そのため、インター予測符号化方法は、動画像データのその性質を使用する。一般に、動画像符号化装置は、符号化対象の原ピクチャを複数のブロックに分割する。動画像符号化装置は、ブロックごとに、動き探索処理と呼ばれる処理を実行して、符号化済みピクチャを復号して得られた参照ピクチャから、そのブロックと類似している領域を参照領域として選択する。そして動画像符号化装置は、参照領域とブロック間の差分を表す予測誤差ブロックを計算することで、時間的な冗長性を取り除く。そして動画像符号化装置は、参照領域を示す動きベクトル情報および予測誤差ブロックを符号化することにより、高い圧縮率が実現される。一般的に、イントラ予測符号化方法よりも、インター予測符号化方法の方が圧縮効率が高い。 Further, as another encoding method employed in the high efficiency encoding method, an inter-picture prediction (inter prediction) encoding method is known. This encoding method uses the fact that moving image data is highly correlated in the time direction. In moving image data, in general, there is often a high degree of similarity between a picture at a certain timing and a picture that follows that picture. Therefore, the inter prediction encoding method uses the property of moving image data. In general, a moving image encoding apparatus divides an original picture to be encoded into a plurality of blocks. For each block, the moving image encoding apparatus executes a process called motion search process, and selects an area similar to that block as a reference area from a reference picture obtained by decoding an encoded picture. To do. Then, the moving image coding apparatus removes temporal redundancy by calculating a prediction error block representing a difference between the reference region and the block. Then, the moving image encoding apparatus realizes a high compression rate by encoding the motion vector information indicating the reference region and the prediction error block. In general, the inter prediction encoding method has higher compression efficiency than the intra prediction encoding method.
動き探索処理において、動画像符号化装置は、符号化対象ブロックについて、参照ピクチャとのブロックマッチングを行って参照領域を特定することで、動きベクトルを求める。このブロックマッチングでは、参照ピクチャ上の符号化対象ブロックよりも広い領域がブロックマッチングが行われる探索範囲となるので、参照ピクチャが記憶されているメモリから読み込むデータ量を表すメモリアクセス量が多い。そのため、インター予測符号化処理全体でのメモリアクセス量に占める、動き探索処理によるメモリアクセス量の割合は大きい。 In the motion search process, the moving image encoding apparatus obtains a motion vector by performing block matching with a reference picture and specifying a reference region for an encoding target block. In this block matching, since an area wider than the encoding target block on the reference picture is a search range in which block matching is performed, the memory access amount representing the amount of data read from the memory in which the reference picture is stored is large. Therefore, the ratio of the memory access amount by the motion search process to the memory access amount in the entire inter prediction encoding process is large.
また、最新の動画像符号化方式(High Efficiency Video Coding、HEVC)では、4K UHDといった高解像度を持つ動画像データを扱うことが想定されている。動画像符号化装置がこのような高解像度を持つ動画像データを符号化する場合、一つのピクチャに含まれるブロックの数も増えるので、メモリアクセス量も増加する。メモリアクセス量が増加すると、動画像符号化処理の実行に要する電力が増加したり、レイテンシが大きくなる。そこで、動き探索処理のメモリアクセス量を削減できることが好ましい。 Further, it is assumed that the latest video coding scheme (High Efficiency Video Coding, HEVC) handles video data having a high resolution such as 4K UHD. When the moving image encoding apparatus encodes moving image data having such a high resolution, the number of blocks included in one picture increases, so that the memory access amount also increases. As the memory access amount increases, the power required for executing the moving image encoding process increases and the latency increases. Therefore, it is preferable that the memory access amount of the motion search process can be reduced.
例えば、特許文献1には、画像復号装置における動き補償処理の際の、参照画像のデータ転送量を低減できる符号化画像を生成する画像符号化装置が提案されている。この画像符号化装置は、符号化された画像の復号時の動き補償処理において生じるデータの転送量が少ない転送量である探索範囲を設定し、その探索範囲の画素データを画像記憶部から取得して動き予測する。
For example,
しかし、特許文献1に開示された画像符号化装置では、探索範囲が狭く制限され過ぎてしまい、探索範囲内では、符号化対象ブロックに対する予測誤差が十分に小さい参照領域が設定できずに動き探索の精度が低下してしまうことがある。この場合、予測誤差ブロックにおいて0以外の値を持つ画素の数が多くなり、予測誤差ブロックを直交変換して得られる直交変換係数の組においても、0以外の値を持つ直交変換係数の数が多くなる。そのため、再生されるピクチャの画質を一定以上に保つためには、直交変換係数に対して適用できる量子化幅が小さくなり、その結果として、符号化効率が低下してしまう。
However, in the image encoding device disclosed in
そこで、本明細書は、符号化効率の低下を抑制しつつ、動き探索処理におけるメモリアクセス量を削減できる動画像符号化装置を提供することを目的とする。 Therefore, an object of the present specification is to provide a moving image encoding apparatus that can reduce the memory access amount in the motion search process while suppressing a decrease in encoding efficiency.
一つの実施形態によれば、動画像データに含まれるピクチャ上の符号化対象ブロックと、符号化済みの他のピクチャ上の動きベクトルで示された参照ブロック間の誤差を符号化する動画像符号化装置が提供される。この動画像符号化装置は、動きベクトルの探索方法を規定する複数の探索モードのそれぞれについて、符号化済みの他のピクチャに含まれる画素の数を減じた縮小ピクチャ上のその探索モードで規定される動きベクトルの探索範囲に対応する領域内で符号化対象ブロックに含まれる画素の数を減じた縮小ブロックと最も一致する領域を求め、縮小ブロックとその最も一致する領域間の移動量から探索範囲を特定する動きベクトル候補及び符号化対象ブロックの符号量を表す符号化コストを算出する符号化コスト算出部と、複数の探索モードのそれぞれについて、その探索モードでの探索範囲に基づいて、動きベクトルを算出するために他のピクチャを記憶している記憶部から読み出すデータ量を表すメモリアクセス量を算出するメモリアクセス量算出部と、複数の探索モードのそれぞれについてのメモリアクセス量及び符号化コストに基づいて、複数の探索モードの中から符号化対象ブロックに適用する探索モードを選択する探索モード決定部と、選択された探索モードに従って符号化済みの他のピクチャ上に探索範囲を設定し、記憶部から符号化済みの他のピクチャ上の探索範囲に含まれる画素のデータを読み出して、その探索範囲内で符号化対象ブロックと最も一致する領域を求め、符号化対象ブロックとその最も一致する領域間の移動量を表すベクトルを動きベクトルとして算出する動きベクトル算出部とを有する。 According to one embodiment, a moving image code that encodes an error between an encoding target block on a picture included in moving image data and a reference block indicated by a motion vector on another encoded picture A device is provided. This moving image encoding device is defined by the search mode on the reduced picture obtained by reducing the number of pixels included in the other encoded pictures for each of the plurality of search modes that define the search method of the motion vector. In the region corresponding to the search range of the motion vector to be obtained, the region that most closely matches the reduced block obtained by reducing the number of pixels included in the encoding target block is obtained, and the search range is calculated from the amount of movement between the reduced block and the most coincident region. A motion vector candidate that identifies the coding cost, a coding cost calculation unit that calculates a coding cost that represents the coding amount of the coding target block, and a motion vector for each of a plurality of search modes based on a search range in the search mode To calculate the memory access amount indicating the amount of data read from the storage unit storing other pictures. An amount calculation unit, a search mode determination unit that selects a search mode to be applied to the encoding target block from the plurality of search modes based on the memory access amount and the encoding cost for each of the plurality of search modes, and a selection A search range is set on another encoded picture according to the search mode specified, and pixel data included in the search range on the other encoded picture is read from the storage unit, and encoded within the search range. A motion vector calculating unit that obtains a region that most closely matches the encoding target block and calculates a vector representing a movement amount between the encoding target block and the most matching region as a motion vector;
本発明の目的及び利点は、請求項において特に指摘されたエレメント及び組み合わせにより実現され、かつ達成される。
上記の一般的な記述及び下記の詳細な記述の何れも、例示的かつ説明的なものであり、請求項のように、本発明を限定するものではないことを理解されたい。
The objects and advantages of the invention will be realized and attained by means of the elements and combinations particularly pointed out in the appended claims.
It should be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are not restrictive of the invention as claimed.
本明細書に開示された動画像符号化装置は、符号化効率の低下を抑制しつつ、動き探索処理におけるメモリアクセス量を削減できる。 The moving picture encoding apparatus disclosed in this specification can reduce the memory access amount in the motion search process while suppressing a decrease in encoding efficiency.
以下、図を参照しつつ、動画像符号化装置について説明する。この動画像符号化装置は、インター予測符号化モードが適用される符号化対象ブロックに対する動き探索処理を行う際に、動きベクトルの探索方法を規定する複数の探索モードの中から、適用する探索モードを選択する。その際、この動画像符号化装置は、符号化済みの参照ピクチャから画素を間引いて生成される縮小ピクチャ上で動き探索処理を行うことで、複数の探索モードのそれぞれについて符号化対象ブロックの符号量の指標である符号化コストを算出する。さらに、この動画像符号化装置は、各探索モードについて、参照ピクチャが記憶されている記憶部から動き探索処理において読み出すデータ量を表すメモリアクセス量を求める。そしてこの動画像符号化装置は、目標とするメモリアクセス量以下のメモリアクセス量となる探索モードの中から、符号化コストが最小となる探索モードを、符号化対象ブロックに適用する探索モードとして選択する。これにより、この動画像符号化装置は、符号化効率の低下を抑制しつつ、動き探索処理におけるメモリアクセス量を削減する。 Hereinafter, the moving picture coding apparatus will be described with reference to the drawings. This moving image encoding device, when performing a motion search process for an encoding target block to which an inter prediction encoding mode is applied, uses a search mode to be applied from among a plurality of search modes that define a motion vector search method. Select. At this time, the moving image encoding apparatus performs a motion search process on a reduced picture generated by thinning out pixels from an encoded reference picture, so that the encoding of the encoding target block is performed for each of a plurality of search modes. An encoding cost that is an index of the amount is calculated. Further, the moving image encoding apparatus obtains a memory access amount representing a data amount read in the motion search process from the storage unit storing the reference picture for each search mode. Then, the moving image encoding apparatus selects a search mode with the minimum encoding cost as a search mode to be applied to the encoding target block from search modes having a memory access amount equal to or less than a target memory access amount. To do. Thereby, this moving image encoding device reduces the memory access amount in the motion search process while suppressing a decrease in encoding efficiency.
本実施形態では、動画像符号化装置は、HEVCに準拠して、動画像データを符号化する。そこで最初に、HEVCに従って、ピクチャを複数のブロックに分割する方法について説明する。 In the present embodiment, the moving image encoding device encodes moving image data in conformity with HEVC. First, a method for dividing a picture into a plurality of blocks according to HEVC will be described.
図1は、HEVCによる、ピクチャの分割の一例を示す図である。
図1に示されるように、ピクチャ100は、ブロックの一例であるCoding Tree Unit(CTU)単位で分割され、各CTU101は、ラスタスキャン順に符号化される。CTU101のサイズは、16x16〜64x64画素の中から選択できる。ただし、CTU101のサイズは、シーケンス単位で一定とされる。
FIG. 1 is a diagram illustrating an example of picture division by HEVC.
As shown in FIG. 1, a
CTU101は、さらに、四分木構造で複数のCoding Unit(CU)102に分割される。一つのCTU101内の各CU102は、Zスキャン順に符号化される。CU102のサイズは可変であり、そのサイズは、CU分割モード8x8〜64x64画素の中から選択される。CU102は、符号化モードであるイントラ予測符号化モードとインター予測符号化モードを選択する単位となる。CU102は、Prediction Unit(PU)103単位またはTransform Unit(TU)104単位で個別に処理される。PU103は、符号化モードに応じた予測が行われる単位となる。例えば、PU103は、イントラ予測符号化モードでは、予測ブロックの生成の際に予測ブロック内の各画素の値を求めるための参照方向を表す予測モードが適用される単位となり、インター予測符号化モードでは、動き補償を行う単位となる。PU103のサイズは、例えば、インター予測符号化では、PU分割モードPartMode =2Nx2N, NxN, 2NxN, Nx2N, 2NxU, 2NxnD, nRx2N, nLx2Nの中から選択できる。
The
一方、TU104は、直交変換の単位である。またイントラ予測符号化モードでは、TU104は、予測ブロックの生成単位でもある。TU104のサイズは、4x4画素〜32x32画素の中から選択される。TU104は、四分木構造で分割され、Zスキャン順に処理される。CU、PU及びTUは、それぞれ、サブブロックの一例である。
On the other hand, the
図2は、本実施形態による動画像符号化装置の概略構成図である。動画像符号化装置1は、符号化コスト算出部11と、メモリアクセス量算出部12と、目標アクセス量決定部13と、探索モード決定部14と、動きベクトル算出部15と、符号化モード決定部16と、符号化部17と、記憶部18とを有する。
FIG. 2 is a schematic configuration diagram of the moving picture encoding apparatus according to the present embodiment. The moving
動画像符号化装置1が有するこれらの各部は、それぞれ別個の回路として形成される。あるいは動画像符号化装置1が有するこれらの各部は、その各部に対応する回路が集積された一つの集積回路として動画像符号化装置1に実装されてもよい。さらに、動画像符号化装置1が有するこれらの各部は、動画像符号化装置1が有するプロセッサ上で実行されるコンピュータプログラムにより実現される、機能モジュールであってもよい。
Each of these units included in the moving
符号化対象となるピクチャは、例えば、動画像符号化装置1全体を制御する制御部(図示せず)により複数のCTUに分割される。そして動画像符号化装置1には、各CTUが、例えばラスタスキャン順で入力される。そして動画像符号化装置1は、CTUごとに符号化する。以下、動画像符号化装置1が有する各部について説明する。
A picture to be encoded is divided into a plurality of CTUs, for example, by a control unit (not shown) that controls the entire moving
符号化コスト算出部11、メモリアクセス量算出部12、目標アクセス量決定部13、探索モード決定部14及び動きベクトル算出部15の処理は、PピクチャまたはBピクチャといった、インター予測符号化モードを適用可能なピクチャに対して実行される。また、Bピクチャ上のCTUのように、双方向予測されるブロックについては、予測方向ごとに、符号化コスト算出部11、メモリアクセス量算出部12、目標アクセス量決定部13、探索モード決定部14及び動きベクトル算出部15の処理が実行される。
The processing of the encoding cost calculation unit 11, the memory access
符号化コスト算出部11は、複数の探索モードのそれぞれについて、符号化対象CTUに設定可能な各PUについて動きベクトルの探索範囲を特定する動きベクトル候補とそのCTUの符号量の指標である符号化コストを算出する。 For each of the plurality of search modes, the encoding cost calculation unit 11 encodes a motion vector candidate for specifying a motion vector search range for each PU that can be set as the encoding target CTU and an index of the code amount of the CTU. Calculate the cost.
本実施形態では、動きベクトルの候補の算出及び符号化コストの算出に要する演算量を削減するために、符号化コスト算出部11は、参照ピクチャから所定数の画素ごとに一つの画素を取り出して生成される縮小ピクチャを記憶部18から読み込んで利用する。
In the present embodiment, in order to reduce the amount of calculation required for motion vector candidate calculation and encoding cost calculation, the encoding cost calculation unit 11 extracts one pixel for each predetermined number of pixels from the reference picture. The generated reduced picture is read from the
さらに、符号化コスト算出部11は、符号化対象のCTUから、所定数の画素ごとに一つの画素を取り出して縮小CTUを生成する。例えば、符号化コスト算出部11は、水平方向及び垂直方向のそれぞれについて、符号化対象のCTUから1画素おきに画素を取り出して縮小CTUを生成する。なお、対象となるPUのサイズが8画素x8画素以上であれば、符号化コスト算出部11は、水平方向及び垂直方向について、符号化対象のCTUの連続する4画素の組ごとに、一つの画素を取り出して縮小CTUを生成してもよい。 Furthermore, the encoding cost calculation unit 11 extracts one pixel for each predetermined number of pixels from the encoding target CTU and generates a reduced CTU. For example, the encoding cost calculation unit 11 extracts a pixel every other pixel from the CTU to be encoded and generates a reduced CTU in each of the horizontal direction and the vertical direction. When the size of the target PU is 8 pixels × 8 pixels or more, the encoding cost calculation unit 11 performs one encoding for each group of four consecutive pixels of the encoding target CTU in the horizontal direction and the vertical direction. Pixels may be extracted to generate a reduced CTU.
符号化コスト算出部11は、動きベクトル算出部15による動き探索処理における記憶部18へのメモリアクセス量を軽減するために、例えば、下記のような探索範囲を限定した探索モードを設定する。
(a)探索モード1:
この探索モードでは、個々のPUについて設定される探索範囲は最も広い。例えば、探索範囲は、参照ピクチャ上で、着目するPUと同じサイズの領域と、その外周に沿った、所定幅を持つオフセット領域を合成した領域に設定される。さらに、動きベクトル候補の決定のために参照される、探索範囲に対応する領域として、縮小ピクチャ上で、着目するPUと同じ位置及びサイズの領域と、その外周に沿った、所定幅(例えば、3〜5画素)を持つオフセット領域を合成した領域が設定される。またこの探索モードでは、適用される動きベクトルの設定方法に応じて、符号化コスト算出部11は、複数の縮小ピクチャを参照可能である。
In order to reduce the memory access amount to the
(A) Search mode 1:
In this search mode, the search range set for each PU is the widest. For example, the search range is set on the reference picture as a region obtained by combining an area having the same size as the target PU and an offset area having a predetermined width along the outer periphery thereof. Furthermore, as a region corresponding to the search range, which is referred to for determining a motion vector candidate, on the reduced picture, a region having the same position and size as the target PU, and a predetermined width along the outer periphery thereof (for example, An area obtained by combining offset areas having 3 to 5 pixels) is set. In this search mode, the encoding cost calculation unit 11 can refer to a plurality of reduced pictures according to the applied motion vector setting method.
なお、以下に説明する各探索モードについては、探索モード1と異なる点について説明する。
(b)探索モード2:
この探索モードでは、符号化コスト算出部11は、最小サイズのPUの適用を禁止する。 図3(a)は、探索モード2についての探索範囲の制限の一例を示す図である。符号化対象CTU300に適用されるPU310についての探索範囲311に占めるオフセット領域の割合は、PU310よりも小さいPU320についての探索範囲321に占めるオフセット領域の割合よりも小さい。このように、PUサイズが小さいほど、探索範囲に占めるオフセット領域の割合が増加する。したがって、符号化対象CTU300を複数のPU310に分割したときの各探索範囲に含まれる画素の数の合計は、符号化対象CTU300を複数のPU320に分割したときの各探索範囲に含まれる画素の数の合計よりも多い。そこで、最小のPUサイズの適用を禁止することで、動きベクトル算出部15における動き探索処理でのメモリアクセス量が削減される。
(c)探索モード3:
この探索モードでは、符号化コスト算出部11は、最小サイズのPU及び最小サイズの次に大きいサイズのPUの適用を禁止する。
In addition, about each search mode demonstrated below, a different point from the
(B) Search mode 2:
In this search mode, the encoding cost calculation unit 11 prohibits the application of the minimum size PU. FIG. 3A is a diagram illustrating an example of a search range restriction for the search mode 2. The ratio of the offset area in the
(C) Search mode 3:
In this search mode, the encoding cost calculation unit 11 prohibits application of the smallest size PU and the next largest size PU after the smallest size.
(d)探索モード4:
この探索モードでは、符号化コスト算出部11は、探索範囲設定のための参照ピクチャ上でのオフセット領域の幅を1画素狭くする。
図3(b)は、探索モード4についての探索範囲の制限の一例を示す図である。符号化対象CTUに対して適用可能なPU330についての探索モード1でのオフセット領域331の幅に対して、探索モード4では、オフセット領域332のように狭くなる。そのため、探索モード1での探索範囲333と比較して、探索モード4での探索範囲334は狭くなる。そのため、動きベクトル算出部15における動き探索処理でのメモリアクセス量が削減される。
(e)探索モード5:
この探索モードでは、符号化コスト算出部11は、探索範囲設定のための参照ピクチャ上でのオフセット領域の幅を2画素狭くする。
なお、符号化コスト算出部11は、探索モード4及び5について、参照ピクチャ上でのオフセット領域の幅を狭くする分だけ、動きベクトル候補を探索するための縮小ピクチャ上での領域を設定するためのオフセット領域の幅も狭くしてもよい。
(D) Search mode 4:
In this search mode, the encoding cost calculation unit 11 narrows the width of the offset region on the reference picture for setting the search range by one pixel.
FIG. 3B is a diagram illustrating an example of a search range restriction for the search mode 4. In contrast to the width of the offset
(E) Search mode 5:
In this search mode, the encoding cost calculation unit 11 narrows the width of the offset area on the reference picture for setting the search range by two pixels.
Note that the encoding cost calculation unit 11 sets an area on the reduced picture for searching for a motion vector candidate by an amount corresponding to the narrowing of the offset area on the reference picture in
(f)探索モード6:
この探索モードでは、符号化コスト算出部11は、参照ピクチャの枚数を、探索モード1における、参照ピクチャの枚数よりも少なくする。
図3(c)は、探索モード6についての探索範囲の制限の一例を示す図である。参照ピクチャの数が多いほど、PUごとに異なる参照ピクチャが参照される可能性が高くなる。例えば、探索モード1では、符号化対象CTU350に含まれるPU351について符号化コストが最小となるのは参照ピクチャ361であり、PU352について符号化コストが最小となるのは参照ピクチャ362であるとする。さらに、PU353及びPU354について符号化コストが最小となるのは参照ピクチャ363であるとする。これに対して、探索モード6では、PU351〜PU354のそれぞれについて参照ピクチャ361が参照されるとする。この場合、探索モード1では、PU351及びPU352についての参照ピクチャとPU353及びPU354についての参照ピクチャが異なる。そのため、PU351についての探索範囲371とPU352についての探索範囲372は、PU353についての探索範囲373及びPU354についての探索範囲374と重ならない。一方、探索モード6では、各PUについての参照ピクチャが同一なので、各PUについての探索範囲381〜384が互いに重なることがある。そのため、動きベクトル算出部15における動き探索処理でのメモリアクセス量が削減される。
(F) Search mode 6:
In this search mode, the encoding cost calculation unit 11 makes the number of reference pictures smaller than the number of reference pictures in
FIG. 3C is a diagram illustrating an example of a search range restriction for the search mode 6. The greater the number of reference pictures, the higher the possibility that different reference pictures will be referenced for each PU. For example, in
符号化コスト算出部11は、上記以外の探索モードを設定してもよい。例えば、符号化コスト算出部11は、上記の探索モード2〜6のうちの二つ以上を組み合わせた探索モードを設定してもよい。あるいは、符号化コスト算出部11は、符号化対象CTUに含まれるPUの数の合計が所定数以下となる探索モードを設定してもよい。 The encoding cost calculation unit 11 may set a search mode other than the above. For example, the encoding cost calculation unit 11 may set a search mode that combines two or more of the search modes 2 to 6 described above. Alternatively, the encoding cost calculation unit 11 may set a search mode in which the total number of PUs included in the encoding target CTU is equal to or less than a predetermined number.
符号化コスト算出部11は、探索モードごとに、適用可能なPUのそれぞれについて、探索範囲に対応する縮小ピクチャ上の領域内でブロックマッチングを実行して、PUと最も一致する縮小ピクチャ及びその縮小ピクチャ上の参照領域の位置を決定する。なお、本実施形態では、符号化コスト算出部11は、符号化対象CTU内に設定される着目するPUに相当する、縮小CTU内のブロックをブロックマッチングに利用すればよい。そして符号化コスト算出部11は、PUとその参照領域間の空間的な移動量を表すベクトルを動きベクトル候補として算出する。 For each search mode, the encoding cost calculation unit 11 performs block matching for each applicable PU in the area on the reduced picture corresponding to the search range, and the reduced picture that most closely matches the PU and its reduction Determine the position of the reference area on the picture. In the present embodiment, the encoding cost calculation unit 11 may use a block in the reduced CTU corresponding to the focused PU set in the encoding target CTU for block matching. Then, the encoding cost calculation unit 11 calculates a vector representing a spatial movement amount between the PU and its reference area as a motion vector candidate.
符号化コスト算出部11は、例えば、ブロックマッチングにおいて、着目するPUに対応する縮小CTU内のブロックと、そのブロックと同じサイズの領域間での画素差分絶対値和SADを算出する。そして符号化コスト算出部11は、動きベクトル候補が探索される領域内で画素差分絶対値和SADが最小となる領域を、着目するPUの参照領域とする。 For example, in block matching, the encoding cost calculation unit 11 calculates a pixel difference absolute value sum SAD between a block in the reduced CTU corresponding to the focused PU and an area having the same size as the block. Then, the coding cost calculation unit 11 sets a region where the pixel difference absolute value sum SAD is minimum in a region where a motion vector candidate is searched as a reference region of a focused PU.
画素差分絶対値和SADが小さいほど、予測ブロックに含まれる各画素の値が小さくなり、その結果として符号量が少なくなると推定される。そこで符号化コスト算出部11は、各探索モードについて、適用可能なPUの組み合わせごとに、その組み合わせに含まれる各PUの動きベクトル候補に対応する画素差分絶対値和SADの合計ΣSADを算出する。そして符号化コスト算出部11は、その合計ΣSADの最小値を、その探索モードの符号化コストとする。 It is estimated that the smaller the pixel difference absolute value sum SAD, the smaller the value of each pixel included in the prediction block, resulting in a smaller code amount. Therefore, the encoding cost calculation unit 11 calculates, for each search mode, for each applicable PU combination, the sum ΣSAD of the pixel difference absolute value sum SAD corresponding to the motion vector candidates of each PU included in the combination. The encoding cost calculation unit 11 sets the minimum value of the total ΣSAD as the encoding cost of the search mode.
図4(a)及び図4(b)は、それぞれ、符号化対象CTUに対して適用されるPUの組の一例を示す図である。図4(a)に示される例では、符号化対象CTU400は、4個のPU401〜404に等分割される。そのため、符号化コストは、4個のPU401〜404のそれぞれの画素差分絶対値和SAD1〜SAD4の合計となる。なお、各PUが参照する参照ピクチャは異なっていてもよい。ただし、制限モード6において参照ピクチャが1枚に制限されている場合には、各PUが参照する参照ピクチャは同一となる。一方、図4(b)に示される例では、符号化対象CTU400は、右下のPU404がさらに4個のPU405〜408に分割されている。そのため、符号化コストは、7個のPU401〜403、405〜408のそれぞれの画素差分絶対値和SAD1〜SAD3、SAD5〜SAD8の合計となる。
FIGS. 4A and 4B are diagrams illustrating an example of a set of PUs applied to an encoding target CTU. In the example illustrated in FIG. 4A, the
なお、符号化コスト算出部11は、演算量を削減するために、サイズが小さい方のPUから順に動きベクトル候補及び差分絶対値和SADを算出し、符号化コスト算出部11が有するメモリに保存してもよい。そして符号化コスト算出部11は、着目するPUに含まれる、既に動きベクトル候補が求められたPUの動きベクトル候補及び画素差分絶対値和SADに基づいて、着目するPUの動きベクトル候補及び画素差分絶対値和SADを算出してもよい。例えば、符号化コスト算出部11は、着目するPUのサイズが16x16画素である場合、そのPUに含まれる、4個の8x8画素のPUのそれぞれについて求められた動きベクトル候補の平均値を、着目するPUの動きベクトル候補としてもよい。そして符号化コスト算出部11は、着目するPUに含まれる4個の8x8画素のPUのそれぞれの画素差分絶対値和SADの合計を、着目するPUの画素差分絶対値和SADとしてもよい。
また、符号化コスト算出部11は、探索モード1〜5で求められた、探索モード6で参照される参照ピクチャに対応する縮小ピクチャを参照するPUについての画素差分絶対値和SADを、探索モード6で利用してもよい。これにより、探索モード6での演算量が削減される。
The encoding cost calculation unit 11 calculates a motion vector candidate and a difference absolute value sum SAD in order from the PU with the smaller size in order to reduce the amount of calculation, and saves it in the memory included in the encoding cost calculation unit 11. May be. Then, the coding cost calculation unit 11 includes the motion vector candidate and the pixel difference of the target PU, based on the motion vector candidate and the pixel difference absolute value sum SAD of the PU for which motion vector candidates have already been obtained, included in the target PU. An absolute value sum SAD may be calculated. For example, when the size of the focused PU is 16 × 16 pixels, the encoding cost calculation unit 11 focuses on the average value of the motion vector candidates obtained for each of the four 8 × 8 pixel PUs included in the PU. It is good also as a motion vector candidate of PU to perform. Then, the encoding cost calculation unit 11 may set the sum of the pixel difference absolute value sums SAD of the four 8 × 8 pixel PUs included in the target PU as the pixel difference absolute value sum SAD of the target PU.
Also, the encoding cost calculation unit 11 obtains the pixel difference absolute value sum SAD for the PU that refers to the reduced picture corresponding to the reference picture referenced in the search mode 6 obtained in the
符号化コスト算出部11は、探索モードごとに、符号化対象CTUについての符号化コスト、適用されるPUの組合わせ、及び、各PUについて求められた動きベクトル候補をメモリアクセス量算出部12及び探索モード決定部14へ出力する。
For each search mode, the encoding cost calculation unit 11 sets the encoding cost for the encoding target CTU, the combination of PUs to be applied, and the motion vector candidate obtained for each PU to the memory access
メモリアクセス量算出部12は、符号化対象CTUについて、探索モードごとに、動きベクトル算出部15による動き探索処理での記憶部18から読み出されるデータ量を表すメモリアクセス量を算出する。本実施形態では、メモリアクセス量算出部12は、探索モード及びその探索モードでの各PUの動きベクトル候補が示す探索範囲に応じてメモリアクセス量を算出する。例えば、メモリアクセス量算出部12は、着目する探索モードについて、各PUで示される探索範囲に含まれる画素の数の合計を、記憶部18から読み込まれる画素の数として算出する。なお、探索範囲同士の位置関係によっては、複数の探索範囲が互いに重複することがある。この場合、メモリアクセス量算出部12は、その重複する領域に含まれる画素については1回だけカウントすればよい。また、動きベクトル算出部15での探索範囲のサイズは、PUのサイズと同サイズの領域に、その領域の外周に沿った、所定幅(例えば、6〜10画素)を持つオフセット領域を合成した領域のサイズとなる。したがって、探索モード4または探索モード5のように、オフセット領域が狭くなる探索モードでは、探索範囲は狭くなる。
The memory access
メモリアクセス量算出部12は、着目する探索モードについての、記憶部18から読み込まれる画素の数を、符号化対象CTUの画素数(例えば、64画素x64画素=4096画素)で除した値に100を乗じて得られるパーセント値をその探索モードのメモリアクセス量とする。なお、メモリアクセス量は、記憶部18から読み込まれる画素の数そのものであってもよく、あるいは、記憶部18から読み込まれる画素の数に、1画素当たりのビット数またはバイト数を乗じた値であってもよい。そしてメモリアクセス量算出部12は、各探索モードのメモリアクセス量を探索モード決定部14へ出力する。
The memory access
目標アクセス量決定部13は、符号化対象CTUごとに、動きベクトル算出部15でのメモリアクセス量の上限となる目標アクセス量を決定する。本実施形態では、目標アクセス量決定部13は、直近の所定個数の符号化済みのCTUの実際のメモリアクセス量の合計が少ないほど、目標アクセス量を大きくする。例えば、目標アクセス量決定部13は、CTU当たりのメモリアクセス量の基準値をn倍した値(ただし、nは2以上の整数)から、直近の(n-1)個のCTUについての実際のメモリアクセス量の合計を減じた値を目標アクセス量とする。例えば、n=10であり、CTU当たりのメモリアクセス量の基準値が550(%)であったとする。そして直近の9個のCTUについて、動きベクトル算出部15の記憶部18に対するメモリアクセス量の合計が4900(%)であったとする。この場合、符号化対象CTUに対する目標アクセス量は、600(%)(=550x10-4900)となる。このように目標アクセス量が設定されることで、動画像符号化装置1は、符号化対象CTUに対するメモリアクセス量を適応的に設定できる。
The target access
なお、CTU当たりのメモリアクセス量の基準値は、例えば、動画像符号化装置1が有するハードウェアリソースまたは要求される符号化レートなどに応じて設定される。ただし、その基準値は、符号化対象CTUを最小サイズのPUで分割し、各PUについて探索範囲を制限しない場合のメモリアクセス量よりも小さい値に設定されることが好ましい。また基準値は、符号化対象CTUを最大サイズのPUで分割し、各PUについて探索範囲を最小とした場合のメモリアクセス量よりも大きい値に設定されることが好ましい。またnは、例えば、2〜1枚のピクチャに含まれるCTUの数の範囲内の何れかに設定される。nが大きいほど、目標アクセス量決定部13は、多数の符号化済みのCTUについてのメモリアクセス量を参照するので、基準値に対する、符号化対象CTUについての目標アクセス量の増減が許容され易くなる。
Note that the reference value of the memory access amount per CTU is set according to, for example, hardware resources of the
図5は、メモリアクセス量の履歴と目標アクセス量の関係の一例を示す図である。図5において、横軸は符号化済みのCTUの数を表し、縦軸はメモリアクセス量を表す。そして線500は、CTU当たりのメモリアクセス量の基準値を表す。またグラフ501は、CTUごとのメモリアクセス量の履歴を表す。例えば、m番目のCTUについての目標アクセス量は、その直近の(m-(n-1))〜(m-1)番目のCTUのメモリアクセス量について決定される。そのため、(m-(n-1))〜(m-1)番目のCTUのメモリアクセス量の平均値が基準値よりも低ければ、目標アクセス量決定部13は、m番目のCTUについての目標アクセス量を、基準値よりも大きくできる。逆に、(m-(n-1))〜(m-1)番目のCTUのメモリアクセス量の平均値が基準値よりも高ければ、m番目のCTUについての目標アクセス量は、基準値よりも低くなる。
FIG. 5 is a diagram illustrating an example of the relationship between the history of the memory access amount and the target access amount. In FIG. 5, the horizontal axis represents the number of encoded CTUs, and the vertical axis represents the memory access amount. A
目標アクセス量決定部13は、符号化対象CTUごとに、目標アクセス量を探索モード決定部14へ通知する。また目標アクセス量決定部13は、次以降のCTUについての目標アクセス量を決定するために、探索モード決定部14から通知された、符号化対象CTUについて選択された探索モードのメモリアクセス量を、目標アクセス量決定部13が有するメモリに保存する。
The target access
探索モード決定部14は、符号化対象CTUごとに、目標アクセス量及び複数の探索モードのそれぞれの符号化コストに基づいて、複数の探索モードの中から適用する探索モードを決定する。
The search
本実施形態では、探索モード決定部14は、メモリアクセス量が目標アクセス量以下となる探索モードのうちで、符号化コストが最小となる探索モードを適用する探索モードとして選択する。
In the present embodiment, the search
図6は、探索モードごとのメモリアクセス量と符号化コストの分布の一例を示す図である。図6において、横軸はメモリアクセス量を表し、縦軸は、符号化コストを表す。点601〜点606は、それぞれ、探索モード1〜探索モード6についてのメモリアクセス量と符号化コストを表す。また線610は、目標アクセス量を表す。この例では、点601で表される、探索モード1のメモリアクセス量は目標アクセス量よりも大きい。そのため、探索モード1は選択されない。メモリアクセス量が目標アクセス量以下となる、残りの探索モードのうち、点602に示される、探索モード2の符号化コストが最小となる。そこでこの例では、探索モード2が選択される。
FIG. 6 is a diagram illustrating an example of a memory access amount and a coding cost distribution for each search mode. In FIG. 6, the horizontal axis represents the memory access amount, and the vertical axis represents the coding cost.
なお、探索モード決定部14は、符号化対象ピクチャがBピクチャである場合のように、双方向予測可能な場合には、予測方向ごとに探索モードを選択してもよい。あるいは、探索モード決定部14は、全ての予測方向に対して同一の探索モードを選択してもよい。この場合には、探索モードごとのメモリアクセス量及び符号化コストは、各予測方向について求められたメモリアクセス量及び符号化コストの合計とすることができる。
Note that the search
探索モード決定部14は、符号化対象CTUごとに、選択した探索モードと、その探索モードに対応するPUの組み合わせ及び各PUの動きベクトル候補を動きベクトル算出部15へ出力する。また探索モード決定部14は、選択した探索モードを目標アクセス量決定部13へ通知する。
The search
動きベクトル算出部15は、符号化対象CTUについて、探索モード決定部14から通知された探索モード及び各PUの動きベクトル候補に基づいて、PUごとに探索範囲を設定し、その探索範囲内で動きベクトルを算出する。
The motion
本実施形態では、動きベクトル算出部15は、着目するPUについて、参照ピクチャ上のそのPUと同じ位置の領域から動きベクトル候補に示される水平方向及び垂直方向の画素数だけ移動した領域を特定する。そして動きベクトル算出部15は、その特定した領域を、その外周に沿って所定幅(例えば、6画素〜10画素)を持つオフセット領域だけ拡げた領域を探索範囲とする。その際、探索モード4または5のように、オフセット領域の幅が制限される探索モードが設定されている場合、その制限に応じてオフセット領域の幅を狭くする。例えば、探索モード4では、動きベクトル算出部15は、オフセット領域の幅を1画素分狭くする。同様に、探索モード5では、動きベクトル算出部15は、オフセット領域の幅を2画素分狭くする。
In the present embodiment, the motion
動きベクトル算出部15は、符号化対象CTU内の各PUについて、記憶部18から探索範囲に含まれる画素の値を読み込む。その際、動きベクトル算出部15は、複数のPUの探索範囲が重複している場合、その重複部分に含まれる画素については1回だけ記憶部18から読み込むようにしてもよい。
The motion
動きベクトル算出部15は、符号化対象CTU内の各PUについて、探索範囲内でブロックマッチングを実行して、PUと最も一致する探索範囲内の領域の位置を決定する。そして動きベクトル算出部15は、PUとその領域間の空間的な移動量を表すベクトルを動きベクトルとして算出する。なお、動きベクトル算出部15は、動きベクトルの精度を1画素未満とするために、探索範囲に対して補間処理を実行して、探索範囲内の各画素に対して1/2画素または1/4画素だけ水平方向または垂直方向に位置がずれた画素を持つ補間探索範囲を設定してもよい。そして動きベクトル算出部15は、探索範囲及び補間探索範囲のそれぞれに対してブロックマッチングを行って、PUと最も一致する領域の位置を求めることで、動きベクトルを算出してもよい。
The motion
動きベクトル算出部15は、符号化対象CTU内の各PUの動きベクトル及びその動きベクトルが参照する参照ピクチャを示す情報を符号化モード決定部16へ出力する。
The motion
符号化モード決定部16は、符号化対象CTUにおいて、適用可能なCUサイズ、PUサイズ、TUサイズ、及び符号化モードの組み合わせを求める。そして符号化モード決定部16は、各組み合わせについて、符号量の推定値である符号化コストを算出する。そして符号化モード決定部16は、その符号化コストが最小となる組合せを、符号化対象CTUに適用するCUサイズ、PUサイズ、TUサイズ及び符号化モードとする。
The encoding
本実施形態では、その組み合わせを設定する際、符号化モード決定部16は、符号化モードをインター予測符号化モードとする場合、選択された探索モードに応じて設定された各PUについての動きベクトルを利用する。すなわち、符号化モード決定部16は、選択された探索モードに応じて決定された動きベクトルで、参照ピクチャ上の参照領域を動き補償することで予測ブロックを生成する。
In the present embodiment, when setting the combination, the encoding
符号化モード決定部16は、例えば、着目する組み合わせの符号化コストを算出するために、次式に従って、その組み合わせに含まれるTUごとに、予測誤差、すなわち画素差分絶対値和SADを算出する。
SAD=Σ|OrgPixel-PredPixel|
ここで、OrgPixelは符号化対象ピクチャの着目するブロック、例えば、TUに含まれる画素の値であり、PredPixelはHEVC規格で求められる、着目するブロックに対応する予測ブロックに含まれる画素の値である。予測ブロックは、着目する組み合わせに含まれる符号化モード(イントラ予測符号化モードまたはインター予測符号化モード)に従って、符号化済みの参照ピクチャまたは符号化済みの他のブロックから生成される。
For example, in order to calculate the encoding cost of the combination of interest, the encoding
SAD = Σ | OrgPixel-PredPixel |
Here, OrgPixel is the value of the pixel of interest in the encoding target picture, for example, the value of the pixel included in the TU, and PredPixel is the value of the pixel included in the prediction block corresponding to the block of interest, which is obtained in the HEVC standard . A prediction block is generated from a coded reference picture or another coded block according to a coding mode (intra prediction coding mode or inter prediction coding mode) included in the combination of interest.
なお、符号化モード決定部16は、SADの代わりに、着目するブロックと予測ブロックとの差分画像をアダマール変換した後の各画素の絶対値和SATDなどを算出してもよい。
The encoding
符号化モード決定部16は、着目する組み合わせについて、次式に従って符号化コストCostを算出する。
Cost = ΣSAD+λR
ここで、ΣSADは、符号化対象のCTUに含まれる各TUについて算出されたSADの総和である。またRは、動きベクトル、イントラ予測符号化モードにおける予測方向を表す予測モードを示すフラグなど、直交変換係数以外の項目についての符号量の推定値である。そしてλは定数である。
The encoding
Cost = ΣSAD + λR
Here, ΣSAD is the sum of SADs calculated for each TU included in the CTU to be encoded. R is an estimated value of code amount for items other than orthogonal transform coefficients, such as a motion vector and a flag indicating a prediction mode indicating a prediction direction in the intra prediction encoding mode. Λ is a constant.
符号化モード決定部16は、符号化コストが最小となる組み合わせを求めると、その組み合わせに含まれる、符号化対象のCTUに適用するCUサイズ、PUサイズ、TUサイズ及び符号化モードを符号化部17に出力する。なお、インター予測符号化されるCUについては、符号化モード決定部16は、そのCUに含まれるPUについて算出された動きベクトルも符号化部17へ出力する。
When the encoding
符号化部17は、符号化モード決定部16により決定されたCUサイズ、PUサイズ及びTUサイズに従って、符号化対象のCTUを分割する。そして符号化部17は、符号化モード決定部16により決定されたCUごとの符号化モードに従って、そのCUに含まれる各TUの予測ブロックを作成する。そして符号化部17は、符号化対象のCTUと予測ブロック間の予測誤差信号を、TUごとに直交変換して得られる直交変換係数を量子化及び可変長符号化することで、符号化対象のCTUを符号化する。
The
再度図2を参照すると、符号化部17は、予測ブロック生成部21と、予測誤差信号算出部22と、直交変換部23と、量子化部24と、復号部25と、可変長符号化部26とを有する。
Referring to FIG. 2 again, the
予測ブロック生成部21は、予測ブロックを生成する。予測ブロック生成部21は、符号化対象のCTUに含まれる着目するCUがインター予測符号化される場合、そのCUに含まれる各PUについて、そのPUに設定される動きベクトルを用いて参照ピクチャを動き補償することで予測ブロックを生成する。また、予測ブロック生成部21は、着目するCUがイントラ予測符号化される場合、そのCUに含まれる各PUについて、そのPUに適用される予測モードに従って、そのPUの周囲の符号化済みのブロックに含まれる画素から予測ブロックを生成する。 The prediction block generation unit 21 generates a prediction block. When the target CU included in the CTU to be encoded is inter-predictively encoded, the prediction block generation unit 21 uses the motion vector set in the PU for each PU included in the CU to generate a reference picture. A prediction block is generated by performing motion compensation. In addition, when the target CU is subjected to intra-prediction encoding, the prediction block generation unit 21 encodes blocks around the PU according to the prediction mode applied to the PU for each PU included in the CU. A prediction block is generated from the pixels included in.
予測ブロック生成部21は、予測ブロックを予測誤差信号算出部22へ出力する。
The prediction block generation unit 21 outputs the prediction block to the prediction error
予測誤差信号算出部22は、符号化対象のCTU内の各画素について、予測ブロックの対応する画素との差分演算を実行する。そして予測誤差信号算出部22は、その差分演算により得られた各画素に対応する差分値を、予測誤差信号とする。予測誤差信号算出部22は、予測誤差信号を直交変換部23へ出力する。
The prediction error
直交変換部23は、符号化対象のCTU内のTUごとに、予測誤差信号を直交変換することにより、直交変換係数の組を求める。例えば、直交変換部23は、直交変換処理として、離散コサイン変換(Discrete Cosine Transform、DCT)を用いることで、直交変換係数として、TUごとのDCT係数の組を得る。
直交変換部23は、TUごとの直交変換係数の組を量子化部24へ出力する。
The
The
量子化部24は、TUごとに、直交変換係数を量子化することにより、その直交変換係数の量子化係数を算出する。この量子化処理は、一定区間に含まれる信号値を一つの信号値で表す処理である。そしてその一定区間は、量子化幅と呼ばれる。例えば、量子化部24は、直交変換係数から、量子化幅に相当する所定数の下位ビットを切り捨てることにより、その直交変換係数を量子化する。量子化幅は、量子化パラメータによって決定される。例えば、量子化部24は、量子化パラメータの値に対する量子化幅の値を表す関数にしたがって、使用される量子化幅を決定する。またその関数は、量子化パラメータの値に対する単調増加関数とすることができ、予め設定される。
For each TU, the
また量子化部24は、HEVCなどの動画像符号化規格に対応した様々な量子化パラメータ決定方法の何れかに従って量子化パラメータを決定すればよい。量子化部24は、例えば、MPEG-2の標準テストモデル5に関する量子化パラメータの算出方法を用いることができる。なお、MPEG-2の標準テストモデル5に関する量子化パラメータの算出方法に関しては、例えば、http://www.mpeg.org/MPEG/MSSG/tm5/Ch10/Ch10.htmlで特定されるURLを参照されたい。
量子化部24は、量子化処理を実行することにより、直交変換係数を表すために使用されるビットの数を削減できるので、符号化対象のCTUに含まれる情報量を低減できる。量子化部24は、量子化係数を復号部25及び可変長符号化部26へ出力する。
Further, the
Since the
復号部25は、符号化対象のCTUの量子化係数から、そのCTUよりも後のCTU及び符号化対象のCTUを含むピクチャよりも符号化順で後のピクチャを符号化するために参照される参照ピクチャを生成する。そのために、復号部25は、量子化係数に、量子化パラメータにより決定された量子化幅に相当する所定数を乗算することにより、量子化係数を逆量子化する。この逆量子化により、各TUの直交変換係数の組、例えば、DCT係数の組が復元される。その後、復号部25は、TUごとに、直交変換係数の組を逆直交変換処理する。例えば、直交変換部23がDCTを用いている場合、復号部25は、各TUに対して逆DCT処理を実行する。逆量子化処理及び逆直交変換処理を量子化信号に対して実行することにより、符号化前の予測誤差信号と同程度の情報を有する予測誤差信号が再生される。
The
復号部25は、予測ブロックの各画素値に、その画素に対応する再生された予測誤差信号を加算する。これらの処理を各予測ブロックについて実行することにより、復号部25は、その後に符号化されるPUに対する予測ブロックを生成するために参照されるブロックを復元する。さらに、復号部25は、復元したブロックに対してデブロッキングフィルタ処理を実行してもよい。
復号部25は、ブロックを復元する度に、その復元されたブロックを、記憶部18に記憶する。
The
Each time the
復号部25は、さらに、復元されたブロックから画素を間引くことで、そのブロックの画素数よりも画素数が少ない間引きブロックを生成し、その間引きブロックも記憶部18に記憶する。この間引きブロックは、参照ピクチャの縮小ピクチャを生成するために利用される。
The
記憶部18は、復元されたブロックを一時的に記憶する。各ブロックの符号化順序にしたがって、1枚のピクチャ分の復元されたブロックを結合することで、後続するピクチャの符号化の際に参照されるピクチャが得られる。同様に、各ブロックの符号化順序にしたがって、1枚のピクチャ分の間引きブロックを結合することで、その参照ピクチャに対応する縮小ピクチャが得られる。記憶部18は、符号化対象ピクチャが参照する可能性がある、予め定められた所定枚数分の参照ピクチャ及び縮小ピクチャを記憶し、記憶している参照ピクチャの枚数がその所定枚数を超えると、符号化順序が古い参照ピクチャ及び縮小ピクチャから順に破棄する。
The
さらに、記憶部18は、インター予測符号化されたPUのそれぞれについての動きベクトルを記憶する。
Further, the
可変長符号化部26は、符号化対象のCTUに含まれる量子化係数を可変長符号化する。さらに、可変長符号化部26は、予測ブロックの作成に利用された動きベクトルなども可変長符号化する。そして可変長符号化部26は、その可変長符号化によって得られた符号化ビットを、HEVCなどに従って所定の順序に並べたビットストリームを出力する。なお、可変長符号化部26は、可変長符号化方式として、Context-based Adaptive Variable Length Coding (CAVLC)といったハフマン符号化処理あるいはContext-based Adaptive Binary Arithmetic Coding(CABAC)といった算術符号化処理を用いることができる。
The variable
制御部(図示せず)は、出力されたビットストリームを所定の順序で結合し、HEVCなどに従ったヘッダ情報などを付加することで、符号化された動画像データを含むビットストリームを得る。 A control unit (not shown) combines the output bit streams in a predetermined order and adds header information according to HEVC or the like to obtain a bit stream including encoded moving image data.
図7は、動画像符号化装置1による動画像符号化処理の動作フローチャートである。動画像符号化装置1はCTUごとに、下記の動作フローチャートに従って符号化する。
FIG. 7 is an operation flowchart of the moving image encoding process performed by the moving
制御部(図示せず)は、符号化対象のCTUが含まれる符号化対象ピクチャがPピクチャまたはBピクチャか否か判定する(ステップS101)。符号化対象ピクチャがPピクチャまたはBピクチャであれば(ステップS101−Yes)、符号化コスト算出部11は、探索モードごとに、符号化対象CTUの符号化コスト、適用するPUの組み合わせ及び各PUの動きベクトル候補を算出する(ステップS102)。そして符号化コスト算出部11は、探索モードごとに、符号化対象CTUの符号化コスト、PUの組み合わせ及び各PUの動きベクトル候補をメモリアクセス量算出部12及び探索モード決定部14へ出力する。
The control unit (not shown) determines whether or not the encoding target picture including the encoding target CTU is a P picture or a B picture (step S101). If the encoding target picture is a P picture or a B picture (step S101—Yes), the encoding cost calculation unit 11 determines the encoding cost of the encoding target CTU, the combination of PUs to be applied, and each PU for each search mode. Motion vector candidates are calculated (step S102). Then, the encoding cost calculation unit 11 outputs the encoding cost of the encoding target CTU, the combination of PUs, and motion vector candidates of each PU to the memory access
メモリアクセス量算出部12は、探索モードごとに、各PUの探索範囲に基づいてメモリアクセス量を算出する(ステップS103)。そしてメモリアクセス量算出部12は、各探索モードのメモリアクセス量を探索モード決定部14へ出力する。
The memory access
また、目標アクセス量決定部13は、直近の(n-1)個のCTUのメモリアクセス量に基づいて符号化対象CTUの目標アクセス量を決定する(ステップS104)。そして目標アクセス量決定部13は、その目標アクセス量を探索モード決定部14へ出力する。
Further, the target access
探索モード決定部14は、メモリアクセス量が目標アクセス量以下となる探索モードのうちで、符号化コストが最小となる探索モードを適用する探索モードとして選択する(ステップS105)。そして探索モード決定部14は、選択した探索モードと、その探索モードに対応するPUの組み合わせ及び各PUの動きベクトル候補を動きベクトル算出部15へ出力する。
The search
動きベクトル算出部15は、符号化対象CTUについて、選択された探索モード及びその探索モードについての符号化対象CTU内の各PUの動きベクトル候補に基づいて、PUごとに探索範囲を設定し、その探索範囲内で動きベクトルを算出する(ステップS106)。
The motion
ステップS106の後、あるいは、ステップS101にて符号化対象ピクチャがIピクチャである場合(ステップS101−No)、符号化モード決定部16は、符号化対象CTUに適用する符号化モード、CUサイズ、PUサイズ及びTUサイズの組み合わせを決定する。すなわち、符号化モード決定部16は、符号化モード、CUサイズ、PUサイズ及びTUサイズの組み合わせのうちで符号化コストが最小となる組み合わせを符号化対象CTUに適用する組み合わせとする(ステップS107)。符号化部17の予測ブロック生成部21は、決定した組み合わせに含まれる符号化モードに従って、予測ブロックを算出する(ステップS108)。予測ブロック生成部21は、符号化対象CTU内でインター予測符号化されるCUについて、そのCU内の各PUについて、動きベクトル算出部15により算出された動きベクトルで参照ピクチャ内のそのPUに対応する参照領域を動き補償することで予測ブロックを求める。そして符号化部17の予測誤差信号算出部22は、TUごとに、TUとそのTUに対応する予測ブロック間で画素ごとに差分演算することで、予測誤差信号を算出する(ステップS109)。
After step S106 or when the encoding target picture is an I picture in step S101 (step S101-No), the encoding
その後、符号化部17の直交変換部23は、予測誤差信号をTUごとに直交変換して直交変換係数の組を算出する(ステップS110)。そして符号化部17の量子化部24は、各直交変換係数を量子化する(ステップS111)。
Thereafter, the
符号化部17の復号部25は、量子化係数を逆量子化及び逆直交変換して再生した予測誤差信号と予測ブロックを加算して参照ブロックを生成する(ステップS112)。そして復号部25は、その参照ブロックを記憶部18に記憶する。さらに、復号部25は、参照ブロックから画素を間引くことで生成される縮小ブロックも記憶部18に記憶する。一方、符号化部17の可変長符号化部26は、各量子化係数を可変長符号化する(ステップS113)。そして動画像符号化装置1は、動画像符号化処理を終了する。
The
以上に説明してきたように、この動画像符号化装置は、元のピクチャよりも画素数を減らした縮小ピクチャを利用して、各CTUについて、複数の探索モードの中からメモリアクセス量が目標値以下となるうちで最も符号化コストが低い探索モードを選択する。そのため、この動画像符号化装置は、符号化効率を維持しつつ、動きベクトル算出の際の参照ピクチャが記憶された記憶部へのメモリアクセス量を抑制できる。 As described above, this moving picture encoding apparatus uses a reduced picture having a smaller number of pixels than the original picture, and for each CTU, the memory access amount is a target value from a plurality of search modes. The search mode with the lowest coding cost is selected from among the following. Therefore, this moving image encoding apparatus can suppress the memory access amount to the storage unit storing the reference picture at the time of calculating the motion vector while maintaining the encoding efficiency.
変形例によれば、探索モード決定部14は、符号化コストが所定の基準値以下となる探索モードのうちで、メモリアクセス量が最小となる探索モードを、符号化対象のCTUに適用する探索モードとして選択してもよい。この変形例では、動画像符号化装置は、符号化効率を一定水準に保ちつつ、最もメモリアクセス量を少なくできる探索モードを選択できる。なお、この場合には、目標アクセス量決定部13は省略されてもよい。
According to the modification, the search
また他の変形例によれば、探索モード決定部14は、再生されたピクチャ上で、隣接するCTU間で画質が急激に変化することがないように、連続する二つのCTU間での符号化コストの差が許容変化量以下となるように、探索モードを選択してもよい。この場合には、探索モード決定部14は、メモリアクセス量が目標アクセス量以下となる探索モードのうちで、直前のCTUの符号化コストとの差が許容変化量以下となる探索モードが無いことがある。このような場合には、探索モード決定部14は、目標アクセス量を超える探索モードの中から探索モードを選択してもよい。なお、許容変化量は、例えば、直近のCTUについての符号化コストとすることができる。すなわち、ある探索モードについて符号化対象CTUの符号化コストが直近のCTUについての符号化コストの2倍以下であれば、その探索モードについては符号化コストの差が許容変化量以下となる。
According to another modification, the search
図8は、探索モードごとのメモリアクセス量と符号化コストの分布の他の一例を示す図である。図8において、横軸はメモリアクセス量を表し、縦軸は、符号化コストを表す。点801〜点806は、それぞれ、符号化対象CTUについての探索モード1〜探索モード6についてのメモリアクセス量と符号化コストを表す。また線810は、目標アクセス量を表す。さらに、線820は、直前のCTUについての符号化コストを表し、線821は、直前のCTUについての符号化コストから許容変化量を加えた符号化コストを表す。この例では、目標アクセス量以下のメモリアクセス量となる、探索モード3〜探索モード6では、直前のCTUからの符号化コストの変化量が許容変化量よりも大きくなってしまう。そこで、探索モード決定部14は、メモリアクセス量が目標アクセス量よりも大きいものの、直前のCTUからの符号化コストの変化量が許容変化量以内となる探索モード1及び探索モード2のうち、メモリアクセス量が少ない方の探索モード2を選択する。
FIG. 8 is a diagram illustrating another example of the memory access amount and the encoding cost distribution for each search mode. In FIG. 8, the horizontal axis represents the memory access amount, and the vertical axis represents the coding cost.
図9は、この変形例による動画像符号化処理の動作フローチャートである。動画像符号化装置1は、図7に示された動画像符号化処理におけるステップS105の代わりに、図9に示される各ステップの処理を実行する。
FIG. 9 is an operation flowchart of a moving image encoding process according to this modification. The moving
ステップS104の後、探索モード決定部14は、メモリアクセス量が目標アクセス量以下となり、かつ、符号化コストと直前のCTUの符号化コストとの差が許容変化量以下となる探索モードが有るか否か判定する(ステップS201)。ステップS201の条件を満たす探索モードが有る場合(ステップS201−Yes)、探索モード決定部14は、その条件を満たす探索モードのうちで符号化コストが最小となる探索モードを選択する(ステップS202)。一方、ステップS201の条件を満たす探索モードが無い場合(ステップS201−No)、探索モード決定部14は、符号化コストと直前のCTUの符号化コストとの差が許容変化量以下となる探索モードを抽出する。そして探索モード決定部14は、抽出した探索モードのうちでメモリアクセス量が最小となる探索モードを選択する(ステップS203)。
ステップS202またはS203の後、動画像符号化装置1は、ステップS106以降の処理を実行する。
After step S104, the search
After step S202 or S203, the moving
この変形例によれば、動画像符号化装置は、隣接するCTU間で再生ピクチャの画質が急激に変化することを抑制しつつ、動き探索におけるメモリアクセス量も抑制できる。 According to this modification, the moving picture coding apparatus can also suppress the memory access amount in the motion search while suppressing the sudden change in the quality of the reproduced picture between adjacent CTUs.
また他の変形例によれば、探索モード決定部14は、符号化対象CTUについて、複数の探索モードの何れについてもメモリアクセス量が目標アクセス量以下とならない場合、その符号化対象CTUについてはイントラ予測符号化モードを適用すると判定してもよい。あるいは、何れの探索モードについても、直近のCTUに対する符号化コストと符号化対象CTUの符号化コストの差が許容変化量以下とならない場合も、探索モード決定部14は、符号化対象CTUにイントラ予測符号化モードを適用すると判定してもよい。そして探索モード決定部14は、その旨を符号化モード決定部16に通知してもよい。この場合には、符号化モード決定部16は、符号化対象CTUに適用されるCU、PU及びTUの組み合わせごとに、イントラ予測符号化モードを適用する場合の符号化コストだけを算出すればよい。
According to another modification, when the memory access amount is not equal to or less than the target access amount for any of the plurality of search modes for the encoding target CTU, the search
また、この場合には、動きベクトル算出部15における動き探索処理は行われないので、動きベクトル算出部15による符号化対象CTUについてのメモリアクセス量は0になる。そのため、探索モード決定部14は、後続するCTUについての目標アクセス量を高くすることができる。その結果として、後続するCTUについては、探索モード選択の自由度が高くなる。
In this case, since the motion search processing in the motion
さらに他の変形例によれば、動きベクトル算出部15は、探索モード決定部14により選択された探索モードに従って、符号化対象CTUについて適用するPUの組み合わせ及び各PUの動きベクトルの算出を最初から実行してもよい。この場合には、動きベクトル算出部15は、縮小ピクチャを用いて求められたPUの組み合わせ及び動きベクトル候補を利用しないので、演算量は増加するものの、より符号化コストが低くなる動きベクトルを求めることができる可能性がある。
According to still another modification, the motion
さらに他の変形例によれば、動画像符号化装置は、HEVC以外の動画像符号化方式に準拠していてもよい。この場合には、動画像符号化装置は、一つの符号化対象ブロックに対して一つの動きベクトルを設定してもよい。 According to still another modification, the video encoding device may conform to a video encoding method other than HEVC. In this case, the video encoding apparatus may set one motion vector for one encoding target block.
図10は、上記の各実施形態またはその変形例による動画像符号化装置の各部の機能を実現するコンピュータプログラムが動作することにより、動画像符号化装置として動作するコンピュータの構成図である。 FIG. 10 is a configuration diagram of a computer that operates as a moving image encoding apparatus by operating a computer program that realizes the functions of the respective units of the moving image encoding apparatus according to each of the above-described embodiments or modifications thereof.
コンピュータ100は、ユーザインターフェース部101と、通信インターフェース部102と、記憶部103と、記憶媒体アクセス装置104と、プロセッサ105とを有する。プロセッサ105は、ユーザインターフェース部101、通信インターフェース部102、記憶部103及び記憶媒体アクセス装置104と、例えば、バスを介して接続される。
The
ユーザインターフェース部101は、例えば、キーボードとマウスなどの入力装置と、液晶ディスプレイといった表示装置とを有する。または、ユーザインターフェース部101は、タッチパネルディスプレイといった、入力装置と表示装置とが一体化された装置を有してもよい。そしてユーザインターフェース部101は、例えば、ユーザの操作に応じて、符号化する動画像データあるいは復号する符号化動画像データを選択する操作信号をプロセッサ105へ出力する。またユーザインターフェース部101は、プロセッサ105から受け取った、復号された動画像データを表示してもよい。
The
通信インターフェース部102は、コンピュータ100を、動画像データを生成する装置、例えば、ビデオカメラと接続するための通信インターフェース及びその制御回路を有してもよい。そのような通信インターフェースは、例えば、Universal Serial Bus(ユニバーサル・シリアル・バス、USB)とすることができる。
The
さらに、通信インターフェース部102は、イーサネット(登録商標)などの通信規格に従った通信ネットワークに接続するための通信インターフェース及びその制御回路を有してもよい。
Furthermore, the
この場合には、通信インターフェース部102は、通信ネットワークに接続された他の機器から、符号化する動画像データを取得し、そのデータをプロセッサ105へ渡す。また通信インターフェース部102は、プロセッサ105から受け取った、符号化動画像データを通信ネットワークを介して他の機器へ出力してもよい。
In this case, the
記憶部103は、例えば、読み書き可能な半導体メモリと読み出し専用の半導体メモリとを有する。そして記憶部103は、プロセッサ105上で実行される、動画像符号化処理を実行するためのコンピュータプログラム、及びこれらの処理の途中または結果として生成されるデータを記憶する。
The
記憶媒体アクセス装置104は、例えば、磁気ディスク、半導体メモリカード及び光記憶媒体といった記憶媒体106にアクセスする装置である。記憶媒体アクセス装置104は、例えば、記憶媒体106に記憶されたプロセッサ105上で実行される、動画像符号化処理用のコンピュータプログラムを読み込み、プロセッサ105に渡す。
The storage
プロセッサ105は、上記の実施形態または変形例による動画像符号化処理用コンピュータプログラムを実行することにより、符号化動画像データを生成する。そしてプロセッサ105は、生成された符号化動画像データを記憶部103に保存し、または通信インターフェース部102を介して他の機器へ出力する。
The
なお、動画像符号化装置1の各部の機能をプロセッサ上で実行可能なコンピュータプログラムは、コンピュータによって読み取り可能な媒体に記録された形で提供されてもよい。ただし、そのような記録媒体には、搬送波は含まれない。
Note that the computer program capable of executing the functions of the respective units of the moving
ここに挙げられた全ての例及び特定の用語は、読者が、本発明及び当該技術の促進に対する本発明者により寄与された概念を理解することを助ける、教示的な目的において意図されたものであり、本発明の優位性及び劣等性を示すことに関する、本明細書の如何なる例の構成、そのような特定の挙げられた例及び条件に限定しないように解釈されるべきものである。本発明の実施形態は詳細に説明されているが、本発明の精神及び範囲から外れることなく、様々な変更、置換及び修正をこれに加えることが可能であることを理解されたい。 All examples and specific terms listed herein are intended for instructional purposes to help the reader understand the concepts contributed by the inventor to the present invention and the promotion of the technology. It should be construed that it is not limited to the construction of any example herein, such specific examples and conditions, with respect to showing the superiority and inferiority of the present invention. Although embodiments of the present invention have been described in detail, it should be understood that various changes, substitutions and modifications can be made thereto without departing from the spirit and scope of the present invention.
以上説明した実施形態及びその変形例に関し、更に以下の付記を開示する。
(付記1)
動画像データに含まれるピクチャ上の符号化対象ブロックと、符号化済みの他のピクチャ上の動きベクトルで示された参照ブロック間の誤差を符号化する動画像符号化装置であって、
前記動きベクトルの探索方法を規定する複数の探索モードのそれぞれについて、前記他のピクチャに含まれる画素の数を減じた縮小ピクチャ上の当該探索モードで規定される前記動きベクトルの探索範囲に対応する領域内で前記符号化対象ブロックに含まれる画素の数を減じた縮小ブロックと最も一致する領域を求め、前記縮小ブロックと当該最も一致する領域間の移動量から前記探索範囲を特定する動きベクトル候補及び前記符号化対象ブロックの符号量を表す符号化コストを算出する符号化コスト算出部と、
前記複数の探索モードのそれぞれについて、当該探索モードでの前記探索範囲に基づいて、前記動きベクトルを算出するために前記他のピクチャを記憶している記憶部から読み出すデータ量を表すメモリアクセス量を算出するメモリアクセス量算出部と、
前記複数の探索モードのそれぞれについての前記メモリアクセス量及び前記符号化コストに基づいて、前記複数の探索モードの中から前記符号化対象ブロックに適用する探索モードを選択する探索モード決定部と、
前記選択された探索モードに従って前記他のピクチャ上に前記探索範囲を設定し、前記記憶部から前記他のピクチャ上の当該探索範囲に含まれる画素のデータを読み出して、当該探索範囲内で前記符号化対象ブロックと最も一致する領域を求め、前記符号化対象ブロックと当該領域間の移動量を表すベクトルを前記動きベクトルとして算出する動きベクトル算出部と、
を有する動画像符号化装置。
(付記2)
前記符号化対象ブロックは、サイズの異なる複数のサブブロックに分割可能であり、
前記符号化コスト算出部は、前記複数の探索モードのそれぞれについて、前記サブブロックの組み合わせごとに、当該組み合わせに含まれる各サブブロックの前記動きベクトル候補と該サブブロックの符号量を表す符号化コストを求め、各サブブロックの符号化コストの合計の最小値を前記符号化対象ブロックの符号化コストとし、かつ、当該最小値に対応する前記サブブロックの組み合わせを当該探索モードについてのサブブロックの組み合わせとし、
前記メモリアクセス量算出部は、前記複数の探索モードのそれぞれについて、当該探索モードについての前記サブブロックの組み合わせに含まれる各サブブロックの前記動きベクトル候補が示す前記探索範囲の位置関係に基づいて当該探索モードについての前記メモリアクセス量を求め、
前記動きベクトル算出部は、前記選択された探索モードについての前記サブブロックの組み合わせに含まれるサブブロックごとに前記動きベクトルを算出する、付記1に記載の動画像符号化装置。
(付記3)
前記複数の探索モードは、前記サブブロックごとの前記探索範囲のサイズが第1のサイズとなる第1の探索モードと、前記サブブロックごとの前記探索範囲のサイズが前記第1のサイズよりも小さい第2のサイズとなる第2の探索モードを含む、付記2に記載の動画像符号化装置。
(付記4)
前記複数の探索モードは、適用可能な前記サブブロックのサイズの最小値が、前記第1の探索モードにおける、適用可能な前記サブブロックのサイズの最小値よりも大きい第3の探索モードをさらに含む、付記3に記載の動画像符号化装置。
(付記5)
前記複数の探索モードは、参照可能な前記他のピクチャの数が前記第1の探索モードよりも少ない第4の探索モードをさらに含む、付記3または4に記載の動画像符号化装置。(図3)
(付記6)
前記探索モード決定部は、前記複数の探索モードのうち、前記メモリアクセス量が目標アクセス量以下となる探索モードのうちで前記符号化コストが最小となる探索モードを選択する、付記1〜5の何れか一項に記載の動画像符号化装置。
(付記7)
前記符号化対象ブロックの直近の所定数のブロックのそれぞれの前記メモリアクセス量の合計が少ないほど前記目標アクセス量を大きくする目標アクセス量決定部をさらに有する、付記6に記載の動画像符号化装置。
(付記8)
前記探索モード決定部は、前記複数の探索モードのうちの前記メモリアクセス量が前記目標アクセス量以下となる探索モードの何れについても、当該探索モードの前記符号化コストと前記ブロックの直前のブロックの前記符号化コストとの差が許容範囲から外れる場合、前記差が前記許容範囲に含まれる探索モードのうちの前記メモリアクセス量が最小となる探索モードを選択する、付記6または7に記載の動画像符号化装置。
(付記9)
動画像データに含まれるピクチャ上の符号化対象ブロックと、符号化済みの他のピクチャ上の動きベクトルで示された参照ブロック間の誤差を符号化する動画像符号化方法であって、
前記動きベクトルの探索方法を規定する複数の探索モードのそれぞれについて、前記他のピクチャに含まれる画素の数を減じた縮小ピクチャ上の当該探索モードで規定される前記動きベクトルの探索範囲に対応する領域内で前記符号化対象ブロックに含まれる画素の数を減じた縮小ブロックと最も一致する領域を求め、前記縮小ブロックと当該最も一致する領域間の移動量から前記探索範囲を特定する動きベクトル候補及び前記符号化対象ブロックの符号量を表す符号化コストを算出し、
前記複数の探索モードのそれぞれについて、当該探索モードでの前記探索範囲に基づいて、前記動きベクトルを算出するために前記他のピクチャを記憶している記憶部から読み出すデータ量を表すメモリアクセス量を算出し、
前記複数の探索モードのそれぞれについての前記メモリアクセス量及び前記符号化コストに基づいて、前記複数の探索モードの中から前記符号化対象ブロックに適用する探索モードを選択し、
前記選択された探索モードに従って前記他のピクチャ上に前記探索範囲を設定し、前記記憶部から前記他のピクチャ上の当該探索範囲に含まれる画素のデータを読み出して、当該探索範囲内で前記符号化対象ブロックと最も一致する領域を求め、前記符号化対象ブロックと当該領域間の移動量を表すベクトルを前記動きベクトルとして算出する、
ことを含む動画像符号化方法。
(付記10)
動画像データに含まれるピクチャ上の符号化対象ブロックと、符号化済みの他のピクチャ上の動きベクトルで示された参照ブロック間の誤差を符号化するための動画像符号化用コンピュータプログラムであって、
前記動きベクトルの探索方法を規定する複数の探索モードのそれぞれについて、前記他のピクチャに含まれる画素の数を減じた縮小ピクチャ上の当該探索モードで規定される前記動きベクトルの探索範囲に対応する領域内で前記符号化対象ブロックに含まれる画素の数を減じた縮小ブロックと最も一致する領域を求め、前記縮小ブロックと当該最も一致する領域間の移動量から前記探索範囲を特定する動きベクトル候補及び前記符号化対象ブロックの符号量を表す符号化コストを算出し、
前記複数の探索モードのそれぞれについて、当該探索モードでの前記探索範囲に基づいて、前記動きベクトルを算出するために前記他のピクチャを記憶している記憶部から読み出すデータ量を表すメモリアクセス量を算出し、
前記複数の探索モードのそれぞれについての前記メモリアクセス量及び前記符号化コストに基づいて、前記複数の探索モードの中から前記符号化対象ブロックに適用する探索モードを選択し、
前記選択された探索モードに従って前記他のピクチャ上に前記探索範囲を設定し、前記記憶部から前記他のピクチャ上の当該探索範囲に含まれる画素のデータを読み出して、当該探索範囲内で前記符号化対象ブロックと最も一致する領域を求め、前記符号化対象ブロックと当該領域間の移動量を表すベクトルを前記動きベクトルとして算出する、
ことをコンピュータに実行させるための動画像符号化用コンピュータプログラム。
The following supplementary notes are further disclosed regarding the embodiment described above and its modifications.
(Appendix 1)
A video encoding device that encodes an error between a block to be encoded on a picture included in video data and a reference block indicated by a motion vector on another encoded picture,
For each of a plurality of search modes defining the motion vector search method, it corresponds to the search range of the motion vector defined in the search mode on the reduced picture obtained by reducing the number of pixels included in the other picture. A motion vector candidate for obtaining an area that most closely matches a reduced block obtained by reducing the number of pixels included in the encoding target block within the area, and specifying the search range from a movement amount between the reduced block and the most coincident area And an encoding cost calculation unit for calculating an encoding cost representing a code amount of the encoding target block;
For each of the plurality of search modes, based on the search range in the search mode, a memory access amount representing a data amount to be read from the storage unit storing the other picture to calculate the motion vector A memory access amount calculation unit to calculate,
A search mode determination unit that selects a search mode to be applied to the encoding target block from the plurality of search modes based on the memory access amount and the encoding cost for each of the plurality of search modes;
According to the selected search mode, the search range is set on the other picture, the pixel data included in the search range on the other picture is read from the storage unit, and the code is read within the search range. A motion vector calculation unit that obtains a region that most closely matches the encoding target block and calculates a vector representing a movement amount between the encoding target block and the region as the motion vector;
A moving picture encoding apparatus having:
(Appendix 2)
The encoding target block can be divided into a plurality of sub-blocks having different sizes,
The encoding cost calculation unit, for each of the plurality of search modes, for each combination of the subblocks, the encoding cost representing the motion vector candidate of each subblock included in the combination and the code amount of the subblock. Is determined as the encoding cost of the encoding target block, and the combination of the subblocks corresponding to the minimum value is a combination of subblocks for the search mode. age,
The memory access amount calculation unit, for each of the plurality of search modes, based on the positional relationship of the search range indicated by the motion vector candidate of each subblock included in the combination of the subblocks for the search mode Obtaining the memory access amount for the search mode;
The moving image encoding apparatus according to
(Appendix 3)
The plurality of search modes include a first search mode in which a size of the search range for each subblock is a first size, and a size of the search range for each subblock is smaller than the first size. The moving image encoding apparatus according to attachment 2, including a second search mode having a second size.
(Appendix 4)
The plurality of search modes further include a third search mode in which a minimum value of the applicable size of the sub-block is larger than a minimum value of the applicable size of the sub-block in the first search mode. The moving picture encoding apparatus according to
(Appendix 5)
The moving image encoding apparatus according to
(Appendix 6)
The search mode determination unit selects a search mode in which the coding cost is the lowest among search modes in which the memory access amount is equal to or less than a target access amount among the plurality of search modes. The moving image encoding device according to any one of claims.
(Appendix 7)
The moving image encoding apparatus according to appendix 6, further comprising a target access amount determination unit that increases the target access amount as the total of the memory access amounts of each of the predetermined number of blocks closest to the encoding target block decreases. .
(Appendix 8)
The search mode determination unit, for any search mode in which the memory access amount is equal to or less than the target access amount among the plurality of search modes, the coding cost of the search mode and the block immediately before the block. The moving image according to appendix 6 or 7, wherein when the difference from the encoding cost is out of an allowable range, a search mode in which the memory access amount is minimum is selected from search modes in which the difference is included in the allowable range. Image encoding device.
(Appendix 9)
A video encoding method for encoding an error between a block to be encoded on a picture included in video data and a reference block indicated by a motion vector on another encoded picture,
For each of a plurality of search modes defining the motion vector search method, it corresponds to the search range of the motion vector defined in the search mode on the reduced picture obtained by reducing the number of pixels included in the other picture. A motion vector candidate for obtaining an area that most closely matches a reduced block obtained by reducing the number of pixels included in the encoding target block within the area, and specifying the search range from a movement amount between the reduced block and the most coincident area And an encoding cost representing the code amount of the encoding target block,
For each of the plurality of search modes, based on the search range in the search mode, a memory access amount representing a data amount to be read from the storage unit storing the other picture to calculate the motion vector Calculate
Based on the memory access amount and the encoding cost for each of the plurality of search modes, select a search mode to be applied to the encoding target block from the plurality of search modes,
According to the selected search mode, the search range is set on the other picture, the pixel data included in the search range on the other picture is read from the storage unit, and the code is read within the search range. A region that most closely matches the encoding target block is calculated, and a vector representing a movement amount between the encoding target block and the region is calculated as the motion vector.
A moving picture encoding method including the above.
(Appendix 10)
A moving picture coding computer program for coding an error between a coding target block on a picture included in moving picture data and a reference block indicated by a motion vector on another coded picture. And
For each of a plurality of search modes defining the motion vector search method, it corresponds to the search range of the motion vector defined in the search mode on the reduced picture obtained by reducing the number of pixels included in the other picture. A motion vector candidate for obtaining an area that most closely matches a reduced block obtained by reducing the number of pixels included in the encoding target block within the area, and specifying the search range from a movement amount between the reduced block and the most coincident area And an encoding cost representing the code amount of the encoding target block,
For each of the plurality of search modes, based on the search range in the search mode, a memory access amount representing a data amount to be read from the storage unit storing the other picture to calculate the motion vector Calculate
Based on the memory access amount and the encoding cost for each of the plurality of search modes, select a search mode to be applied to the encoding target block from the plurality of search modes,
According to the selected search mode, the search range is set on the other picture, the pixel data included in the search range on the other picture is read from the storage unit, and the code is read within the search range. A region that most closely matches the encoding target block is calculated, and a vector representing a movement amount between the encoding target block and the region is calculated as the motion vector.
A computer program for encoding a moving image for causing a computer to execute the above.
1 動画像符号化装置
11 符号化コスト算出部
12 メモリアクセス量算出部
13 目標アクセス量決定部
14 探索モード決定部
15 動きベクトル算出部
16 符号化モード決定部
17 符号化部
18 記憶部
21 予測ブロック生成部
22 予測誤差信号算出部
23 直交変換部
24 量子化部
25 復号部
26 可変長符号化部
100 コンピュータ
101 ユーザインターフェース部
102 通信インターフェース部
103 記憶部
104 記憶媒体アクセス装置
105 プロセッサ
106 記憶媒体
DESCRIPTION OF
Claims (7)
前記動きベクトルの探索方法を規定する複数の探索モードのそれぞれについて、前記他のピクチャに含まれる画素の数を減じた縮小ピクチャ上の当該探索モードで規定される前記動きベクトルの探索範囲に対応する領域内で前記符号化対象ブロックに含まれる画素の数を減じた縮小ブロックと最も一致する領域を求め、前記縮小ブロックと当該最も一致する領域間の移動量から前記探索範囲を特定する動きベクトル候補及び前記符号化対象ブロックの符号量を表す符号化コストを算出する符号化コスト算出部と、
前記複数の探索モードのそれぞれについて、当該探索モードでの前記探索範囲に基づいて、前記動きベクトルを算出するために前記他のピクチャを記憶している記憶部から読み出すデータ量を表すメモリアクセス量を算出するメモリアクセス量算出部と、
前記複数の探索モードのそれぞれについての前記メモリアクセス量及び前記符号化コストに基づいて、前記複数の探索モードの中から前記符号化対象ブロックに適用する探索モードを選択する探索モード決定部と、
前記選択された探索モードに従って前記他のピクチャ上に前記探索範囲を設定し、前記記憶部から前記他のピクチャ上の当該探索範囲に含まれる画素のデータを読み出して、当該探索範囲内で前記符号化対象ブロックと最も一致する領域を求め、前記符号化対象ブロックと当該領域間の移動量を表すベクトルを前記動きベクトルとして算出する動きベクトル算出部と、
を有する動画像符号化装置。 A video encoding device that encodes an error between a block to be encoded on a picture included in video data and a reference block indicated by a motion vector on another encoded picture,
For each of a plurality of search modes defining the motion vector search method, it corresponds to the search range of the motion vector defined in the search mode on the reduced picture obtained by reducing the number of pixels included in the other picture. A motion vector candidate for obtaining an area that most closely matches a reduced block obtained by reducing the number of pixels included in the encoding target block within the area, and specifying the search range from a movement amount between the reduced block and the most coincident area And an encoding cost calculation unit for calculating an encoding cost representing a code amount of the encoding target block;
For each of the plurality of search modes, based on the search range in the search mode, a memory access amount representing a data amount to be read from the storage unit storing the other picture to calculate the motion vector A memory access amount calculation unit to calculate,
A search mode determination unit that selects a search mode to be applied to the encoding target block from the plurality of search modes based on the memory access amount and the encoding cost for each of the plurality of search modes;
According to the selected search mode, the search range is set on the other picture, the pixel data included in the search range on the other picture is read from the storage unit, and the code is read within the search range. A motion vector calculation unit that obtains a region that most closely matches the encoding target block and calculates a vector representing a movement amount between the encoding target block and the region as the motion vector;
A moving picture encoding apparatus having:
前記符号化コスト算出部は、前記複数の探索モードのそれぞれについて、前記サブブロックの組み合わせごとに、当該組み合わせに含まれる各サブブロックの前記動きベクトル候補と該サブブロックの符号量を表す符号化コストを求め、各サブブロックの符号化コストの合計の最小値を前記符号化対象ブロックの符号化コストとし、かつ、当該最小値に対応する前記サブブロックの組み合わせを当該探索モードについてのサブブロックの組み合わせとし、
前記メモリアクセス量算出部は、前記複数の探索モードのそれぞれについて、当該探索モードについての前記サブブロックの組み合わせに含まれる各サブブロックの前記動きベクトル候補が示す前記探索範囲の位置関係に基づいて当該探索モードについての前記メモリアクセス量を求め、
前記動きベクトル算出部は、前記選択された探索モードについての前記サブブロックの組み合わせに含まれるサブブロックごとに前記動きベクトルを算出する、請求項1に記載の動画像符号化装置。 The encoding target block can be divided into a plurality of sub-blocks having different sizes,
The encoding cost calculation unit, for each of the plurality of search modes, for each combination of the subblocks, the encoding cost representing the motion vector candidate of each subblock included in the combination and the code amount of the subblock. Is determined as the encoding cost of the encoding target block, and the combination of the subblocks corresponding to the minimum value is a combination of subblocks for the search mode. age,
The memory access amount calculation unit, for each of the plurality of search modes, based on the positional relationship of the search range indicated by the motion vector candidate of each subblock included in the combination of the subblocks for the search mode Obtaining the memory access amount for the search mode;
The moving image encoding apparatus according to claim 1, wherein the motion vector calculation unit calculates the motion vector for each sub-block included in the combination of sub-blocks for the selected search mode.
前記動きベクトルの探索方法を規定する複数の探索モードのそれぞれについて、前記他のピクチャに含まれる画素の数を減じた縮小ピクチャ上の当該探索モードで規定される前記動きベクトルの探索範囲に対応する領域内で前記符号化対象ブロックに含まれる画素の数を減じた縮小ブロックと最も一致する領域を求め、前記縮小ブロックと当該最も一致する領域間の移動量から前記探索範囲を特定する動きベクトル候補及び前記符号化対象ブロックの符号量を表す符号化コストを算出し、
前記複数の探索モードのそれぞれについて、当該探索モードでの前記探索範囲に基づいて、前記動きベクトルを算出するために前記他のピクチャを記憶している記憶部から読み出すデータ量を表すメモリアクセス量を算出し、
前記複数の探索モードのそれぞれについての前記メモリアクセス量及び前記符号化コストに基づいて、前記複数の探索モードの中から前記符号化対象ブロックに適用する探索モードを選択し、
前記選択された探索モードに従って前記他のピクチャ上に前記探索範囲を設定し、前記記憶部から前記他のピクチャ上の当該探索範囲に含まれる画素のデータを読み出して、当該探索範囲内で前記符号化対象ブロックと最も一致する領域を求め、前記符号化対象ブロックと当該領域間の移動量を表すベクトルを前記動きベクトルとして算出する、
ことを含む動画像符号化方法。 A video encoding method for encoding an error between a block to be encoded on a picture included in video data and a reference block indicated by a motion vector on another encoded picture,
For each of a plurality of search modes defining the motion vector search method, it corresponds to the search range of the motion vector defined in the search mode on the reduced picture obtained by reducing the number of pixels included in the other picture. A motion vector candidate for obtaining an area that most closely matches a reduced block obtained by reducing the number of pixels included in the encoding target block within the area, and specifying the search range from a movement amount between the reduced block and the most coincident area And an encoding cost representing the code amount of the encoding target block,
For each of the plurality of search modes, based on the search range in the search mode, a memory access amount representing a data amount to be read from the storage unit storing the other picture to calculate the motion vector Calculate
Based on the memory access amount and the encoding cost for each of the plurality of search modes, select a search mode to be applied to the encoding target block from the plurality of search modes,
According to the selected search mode, the search range is set on the other picture, the pixel data included in the search range on the other picture is read from the storage unit, and the code is read within the search range. A region that most closely matches the encoding target block is calculated, and a vector representing a movement amount between the encoding target block and the region is calculated as the motion vector.
A moving picture encoding method including the above.
前記動きベクトルの探索方法を規定する複数の探索モードのそれぞれについて、前記他のピクチャに含まれる画素の数を減じた縮小ピクチャ上の当該探索モードで規定される前記動きベクトルの探索範囲に対応する領域内で前記符号化対象ブロックに含まれる画素の数を減じた縮小ブロックと最も一致する領域を求め、前記縮小ブロックと当該最も一致する領域間の移動量から前記探索範囲を特定する動きベクトル候補及び前記符号化対象ブロックの符号量を表す符号化コストを算出し、
前記複数の探索モードのそれぞれについて、当該探索モードでの前記探索範囲に基づいて、前記動きベクトルを算出するために前記他のピクチャを記憶している記憶部から読み出すデータ量を表すメモリアクセス量を算出し、
前記複数の探索モードのそれぞれについての前記メモリアクセス量及び前記符号化コストに基づいて、前記複数の探索モードの中から前記符号化対象ブロックに適用する探索モードを選択し、
前記選択された探索モードに従って前記他のピクチャ上に前記探索範囲を設定し、前記記憶部から前記他のピクチャ上の当該探索範囲に含まれる画素のデータを読み出して、当該探索範囲内で前記符号化対象ブロックと最も一致する領域を求め、前記符号化対象ブロックと当該領域間の移動量を表すベクトルを前記動きベクトルとして算出する、
ことをコンピュータに実行させるための動画像符号化用コンピュータプログラム。 A moving picture coding computer program for coding an error between a coding target block on a picture included in moving picture data and a reference block indicated by a motion vector on another coded picture. And
For each of a plurality of search modes defining the motion vector search method, it corresponds to the search range of the motion vector defined in the search mode on the reduced picture obtained by reducing the number of pixels included in the other picture. A motion vector candidate for obtaining an area that most closely matches a reduced block obtained by reducing the number of pixels included in the encoding target block within the area, and specifying the search range from a movement amount between the reduced block and the most coincident area And an encoding cost representing the code amount of the encoding target block,
For each of the plurality of search modes, based on the search range in the search mode, a memory access amount representing a data amount to be read from the storage unit storing the other picture to calculate the motion vector Calculate
Based on the memory access amount and the encoding cost for each of the plurality of search modes, select a search mode to be applied to the encoding target block from the plurality of search modes,
According to the selected search mode, the search range is set on the other picture, the pixel data included in the search range on the other picture is read from the storage unit, and the code is read within the search range. A region that most closely matches the encoding target block is calculated, and a vector representing a movement amount between the encoding target block and the region is calculated as the motion vector.
A computer program for encoding a moving image for causing a computer to execute the above.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014116180A JP6323185B2 (en) | 2014-06-04 | 2014-06-04 | Moving picture coding apparatus, moving picture coding method, and moving picture coding computer program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014116180A JP6323185B2 (en) | 2014-06-04 | 2014-06-04 | Moving picture coding apparatus, moving picture coding method, and moving picture coding computer program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2015231124A JP2015231124A (en) | 2015-12-21 |
JP6323185B2 true JP6323185B2 (en) | 2018-05-16 |
Family
ID=54887708
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2014116180A Active JP6323185B2 (en) | 2014-06-04 | 2014-06-04 | Moving picture coding apparatus, moving picture coding method, and moving picture coding computer program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6323185B2 (en) |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1977541B (en) * | 2004-06-29 | 2010-05-26 | 索尼株式会社 | Motion prediction compensation method and motion prediction compensation device |
JP2009055410A (en) * | 2007-08-28 | 2009-03-12 | Sony Corp | Image processing device and image processing method |
JP4882956B2 (en) * | 2007-10-22 | 2012-02-22 | ソニー株式会社 | Image processing apparatus and image processing method |
JP5141633B2 (en) * | 2009-04-24 | 2013-02-13 | ソニー株式会社 | Image processing method and image information encoding apparatus using the same |
WO2010140338A1 (en) * | 2009-06-01 | 2010-12-09 | パナソニック株式会社 | Image encoding device, method, integrated circuit, and program |
JP5299319B2 (en) * | 2010-03-04 | 2013-09-25 | 富士通株式会社 | Motion vector detection device |
US9332266B2 (en) * | 2012-08-24 | 2016-05-03 | Industrial Technology Research Institute | Method for prediction in image encoding and image encoding apparatus applying the same |
-
2014
- 2014-06-04 JP JP2014116180A patent/JP6323185B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2015231124A (en) | 2015-12-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102429253B1 (en) | Video encoding and decoding method and apparatus using the same | |
KR102482553B1 (en) | Methods of motion vector predictor derivation and apparatuses for using the same | |
JP6995952B2 (en) | Inter-prediction method and its device | |
KR102086145B1 (en) | Method for intra prediction and apparatus thereof | |
WO2018119247A1 (en) | Low-complexity sign prediction for video coding | |
KR20220119579A (en) | Method and apparatus for determination of reference unit | |
WO2013042888A2 (en) | Method for inducing a merge candidate block and device using same | |
KR102548881B1 (en) | Methods and apparatus for video transform encoding/decoding | |
JP2017034531A (en) | Moving image encoder and moving image encoding method | |
JP2018107580A (en) | Moving image encoder, moving image encoding method, moving image encoding computer program, moving image decoder, moving image decoding method and moving image decoding computer program | |
JP2015211386A (en) | Dynamic image encoding device, dynamic image encoding method, and computer program for dynamic image encoding | |
KR101377529B1 (en) | Video Coding and Decoding Method and Apparatus Using Adaptive Motion Vector Coding/Encoding | |
JP6528635B2 (en) | Moving picture coding apparatus, moving picture coding method, and computer program for moving picture coding | |
KR20140105038A (en) | Apparatus for decoding motion information in merge mode | |
WO2012081895A1 (en) | Intra prediction method and apparatus | |
WO2019077751A1 (en) | Moving image encoding device, moving image encoding method, moving image encoding computer program, moving image decoding device, moving image decoding method, and moving image decoding computer program | |
JP6248783B2 (en) | Moving picture coding apparatus, moving picture coding method, and moving picture coding computer program | |
JP6323185B2 (en) | Moving picture coding apparatus, moving picture coding method, and moving picture coding computer program | |
WO2020129681A1 (en) | Encryption device and program | |
KR101841352B1 (en) | Reference frame selection method and apparatus | |
WO2012118358A2 (en) | Method for scanning transform coefficient and device therefor | |
JP6435822B2 (en) | Moving picture coding apparatus, moving picture coding method, and moving picture coding computer program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20170309 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20171212 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20171219 |
|
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: 20180313 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20180326 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6323185 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |