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 PDF

Info

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
Application number
JP2014116180A
Other languages
Japanese (ja)
Other versions
JP2015231124A (en
Inventor
健太朗 片山
健太朗 片山
昇 米岡
昇 米岡
博信 山崎
博信 山崎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2014116180A priority Critical patent/JP6323185B2/en
Publication of JP2015231124A publication Critical patent/JP2015231124A/en
Application granted granted Critical
Publication of JP6323185B2 publication Critical patent/JP6323185B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Description

本発明は、例えば、ピクチャを符号化済みの他のピクチャを参照して符号化する動画像符号化装置、動画像符号化方法及び動画像符号化用コンピュータプログラムに関する。   The present invention relates to, 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, Patent Document 1 proposes an image encoding device that generates an encoded image that can reduce the data transfer amount of a reference image during motion compensation processing in an image decoding device. This image encoding apparatus sets a search range that is a transfer amount with a small transfer amount of data generated in motion compensation processing at the time of decoding an encoded image, and acquires pixel data of the search range from the image storage unit. To predict motion.

国際公開第10/140338号International Publication No. 10/140338

しかし、特許文献1に開示された画像符号化装置では、探索範囲が狭く制限され過ぎてしまい、探索範囲内では、符号化対象ブロックに対する予測誤差が十分に小さい参照領域が設定できずに動き探索の精度が低下してしまうことがある。この場合、予測誤差ブロックにおいて0以外の値を持つ画素の数が多くなり、予測誤差ブロックを直交変換して得られる直交変換係数の組においても、0以外の値を持つ直交変換係数の数が多くなる。そのため、再生されるピクチャの画質を一定以上に保つためには、直交変換係数に対して適用できる量子化幅が小さくなり、その結果として、符号化効率が低下してしまう。   However, in the image encoding device disclosed in Patent Document 1, the search range is too narrowly limited, and within the search range, a reference region with a sufficiently small prediction error for the encoding target block cannot be set and motion search is performed. Accuracy may be reduced. In this case, the number of pixels having a value other than 0 in the prediction error block increases, and the number of orthogonal transform coefficients having a value other than 0 also exists in the set of orthogonal transform coefficients obtained by orthogonal transform of the prediction error block. Become more. Therefore, in order to keep the picture quality of a picture to be reproduced at a certain level or more, the quantization width that can be applied to the orthogonal transform coefficient is reduced, and as a result, the encoding efficiency is lowered.

そこで、本明細書は、符号化効率の低下を抑制しつつ、動き探索処理におけるメモリアクセス量を削減できる動画像符号化装置を提供することを目的とする。   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.

HEVCによる、ピクチャの分割の一例を示す図である。It is a figure which shows an example of the division | segmentation of the picture by HEVC. 一つの実施形態による動画像符号化装置の概略構成図である。It is a schematic block diagram of the moving image encoder by one Embodiment. (a)〜(c)は、それぞれ、探索モードに応じた探索範囲の制限の例を示す図である。(A)-(c) is a figure which shows the example of a restriction | limiting of the search range according to search mode, respectively. (a)及び(b)は、それぞれ、符号化対象CTUに対して適用されるPUの組の一例を示す図である。(A) And (b) is a figure which shows an example of the set of PU respectively applied with respect to encoding object CTU. メモリアクセス量の履歴と目標アクセス量の関係の一例を示す図である。It is a figure which shows an example of the relationship between the log | history of memory access amount, and target access amount. 探索モードごとのメモリアクセス量と符号化コストの分布の一例を示す図である。It is a figure which shows an example of distribution of the memory access amount for every search mode, and encoding cost. 動画像符号化処理の動作フローチャートである。It is an operation | movement flowchart of a moving image encoding process. 探索モードごとのメモリアクセス量と符号化コストの分布の他の一例を示す図である。It is a figure which shows another example of distribution of the memory access amount for every search mode, and encoding cost. 変形例による動画像符号化処理の動作フローチャートである。It is an operation | movement flowchart of the moving image encoding process by a modification. 実施形態またはその変形例による動画像符号化装置の各部の機能を実現するコンピュータプログラムが動作することにより、動画像符号化装置として動作するコンピュータの構成図である。It is a block diagram of the computer which operate | moves as a moving image encoder by the computer program which implement | achieves the function of each part of the moving image encoder by embodiment or its modification.

以下、図を参照しつつ、動画像符号化装置について説明する。この動画像符号化装置は、インター予測符号化モードが適用される符号化対象ブロックに対する動き探索処理を行う際に、動きベクトルの探索方法を規定する複数の探索モードの中から、適用する探索モードを選択する。その際、この動画像符号化装置は、符号化済みの参照ピクチャから画素を間引いて生成される縮小ピクチャ上で動き探索処理を行うことで、複数の探索モードのそれぞれについて符号化対象ブロックの符号量の指標である符号化コストを算出する。さらに、この動画像符号化装置は、各探索モードについて、参照ピクチャが記憶されている記憶部から動き探索処理において読み出すデータ量を表すメモリアクセス量を求める。そしてこの動画像符号化装置は、目標とするメモリアクセス量以下のメモリアクセス量となる探索モードの中から、符号化コストが最小となる探索モードを、符号化対象ブロックに適用する探索モードとして選択する。これにより、この動画像符号化装置は、符号化効率の低下を抑制しつつ、動き探索処理におけるメモリアクセス量を削減する。   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 picture 100 is divided in units of Coding Tree Units (CTUs) that are examples of blocks, and each CTU 101 is encoded in the order of raster scanning. The size of the CTU 101 can be selected from 16x16 to 64x64 pixels. However, the size of the CTU 101 is constant for each sequence.

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 CTU 101 is further divided into a plurality of Coding Units (CU) 102 in a quadtree structure. Each CU 102 in one CTU 101 is encoded in the Z scan order. The size of the CU 102 is variable, and the size is selected from 8 × 8 to 64 × 64 pixels in the CU division mode. The CU 102 is a unit for selecting an intra prediction encoding mode and an inter prediction encoding mode that are encoding modes. The CU 102 is individually processed in units of Prediction Unit (PU) 103 or Transform Unit (TU) 104. The PU 103 is a unit for performing prediction according to the encoding mode. For example, in the intra prediction coding mode, the PU 103 is a unit to which a prediction mode indicating a reference direction for obtaining a value of each pixel in the prediction block is applied when generating a prediction block, and in the inter prediction coding mode. This is a unit for performing motion compensation. The size of the PU 103 can be selected, for example, from PU partition modes PartMode = 2Nx2N, NxN, 2NxN, Nx2N, 2NxU, 2NxnD, nRx2N, and nLx2N in inter prediction coding.

一方、TU104は、直交変換の単位である。またイントラ予測符号化モードでは、TU104は、予測ブロックの生成単位でもある。TU104のサイズは、4x4画素〜32x32画素の中から選択される。TU104は、四分木構造で分割され、Zスキャン順に処理される。CU、PU及びTUは、それぞれ、サブブロックの一例である。   On the other hand, the TU 104 is a unit of orthogonal transformation. In the intra prediction encoding mode, the TU 104 is also a prediction block generation unit. The size of the TU 104 is selected from 4 × 4 pixels to 32 × 32 pixels. The TU 104 is divided by a quadtree structure and processed in the Z scan order. Each of CU, PU, and TU is an example of a sub-block.

図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 image encoding apparatus 1 includes an encoding cost calculation unit 11, a memory access amount calculation unit 12, a target access amount determination unit 13, a search mode determination unit 14, a motion vector calculation unit 15, and an encoding mode determination. Unit 16, encoding unit 17, and storage unit 18.

動画像符号化装置1が有するこれらの各部は、それぞれ別個の回路として形成される。あるいは動画像符号化装置1が有するこれらの各部は、その各部に対応する回路が集積された一つの集積回路として動画像符号化装置1に実装されてもよい。さらに、動画像符号化装置1が有するこれらの各部は、動画像符号化装置1が有するプロセッサ上で実行されるコンピュータプログラムにより実現される、機能モジュールであってもよい。   Each of these units included in the moving image encoding apparatus 1 is formed as a separate circuit. Alternatively, these units included in the video encoding device 1 may be mounted on the video encoding device 1 as one integrated circuit in which circuits corresponding to the respective units are integrated. Furthermore, each of these units included in the moving image encoding device 1 may be a functional module realized by a computer program executed on a processor included in the moving image encoding device 1.

符号化対象となるピクチャは、例えば、動画像符号化装置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 image encoding apparatus 1. Each CTU is input to the moving image encoding apparatus 1 in the raster scan order, for example. Then, the moving image encoding apparatus 1 performs encoding for each CTU. Hereinafter, each part which the moving image encoder 1 has is demonstrated.

符号化コスト算出部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 amount calculation unit 12, the target access amount determination unit 13, the search mode determination unit 14, and the motion vector calculation unit 15 applies an inter prediction encoding mode such as P picture or B picture. Performed on possible pictures. For blocks that are bidirectionally predicted, such as a CTU on a B picture, for each prediction direction, an encoding cost calculation unit 11, a memory access amount calculation unit 12, a target access amount determination unit 13, and a search mode determination unit. 14 and the motion vector calculation unit 15 are executed.

符号化コスト算出部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 storage unit 18 and used.

さらに、符号化コスト算出部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 storage unit 18 in the motion search process by the motion vector calculation unit 15, the encoding cost calculation unit 11 sets, for example, a search mode with a limited search range as described below.
(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 search mode 1 is demonstrated.
(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 search range 311 for the PU 310 applied to the encoding target CTU 300 is smaller than the ratio of the offset area in the search range 321 for the PU 320 smaller than the PU 310. Thus, as the PU size is smaller, the ratio of the offset area to the search range increases. Therefore, the total number of pixels included in each search range when the encoding target CTU 300 is divided into a plurality of PUs 310 is the number of pixels included in each search range when the encoding target CTU 300 is divided into a plurality of PUs 320. More than the sum of Therefore, by prohibiting application of the minimum PU size, the memory access amount in the motion search process in the motion vector calculation unit 15 is reduced.
(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 region 331 in the search mode 1 for the PU 330 applicable to the encoding target CTU, in the search mode 4, the width becomes narrower like the offset region 332. Therefore, the search range 334 in the search mode 4 is narrower than the search range 333 in the search mode 1. Therefore, the memory access amount in the motion search process in the motion vector calculation unit 15 is reduced.
(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 search modes 4 and 5. The width of the offset region may be narrowed.

(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 search mode 1.
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 search mode 1, it is assumed that the reference picture 361 has the minimum encoding cost for the PU 351 included in the encoding target CTU 350, and the reference picture 362 has the minimum encoding cost for the PU 352. Furthermore, it is assumed that the coding cost of the PU 353 and the PU 354 is the minimum for the reference picture 363. In contrast, in the search mode 6, it is assumed that the reference picture 361 is referred to for each of the PUs 351 to 354. In this case, in search mode 1, the reference pictures for PU 351 and PU 352 are different from the reference pictures for PU 353 and PU 354. Therefore, the search range 371 for PU 351 and the search range 372 for PU 352 do not overlap with the search range 373 for PU 353 and the search range 374 for PU 354. On the other hand, in search mode 6, since the reference pictures for each PU are the same, the search ranges 381 to 384 for each PU may overlap each other. Therefore, the memory access amount in the motion search process in the motion vector calculation unit 15 is reduced.

符号化コスト算出部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 encoding target CTU 400 is equally divided into four PUs 401 to 404. Therefore, the encoding cost is the sum of the pixel difference absolute value sums SAD1 to SAD4 of each of the four PUs 401 to 404. Note that the reference pictures referenced by each PU may be different. However, when the reference picture is limited to one in the restriction mode 6, the reference picture referred to by each PU is the same. On the other hand, in the example shown in FIG. 4B, the encoding target CTU 400 is such that the lower right PU 404 is further divided into four PUs 405 to 408. Therefore, the encoding cost is the sum of the pixel difference absolute value sums SAD1 to SAD3 and SAD5 to SAD8 of each of the seven PUs 401 to 403 and 405 to 408.

なお、符号化コスト算出部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 search modes 1 to 5 in the search mode. 6 may be used. Thereby, the calculation amount in the search mode 6 is reduced.

符号化コスト算出部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 amount calculation unit 12 and Output to the search mode determination unit 14.

メモリアクセス量算出部12は、符号化対象CTUについて、探索モードごとに、動きベクトル算出部15による動き探索処理での記憶部18から読み出されるデータ量を表すメモリアクセス量を算出する。本実施形態では、メモリアクセス量算出部12は、探索モード及びその探索モードでの各PUの動きベクトル候補が示す探索範囲に応じてメモリアクセス量を算出する。例えば、メモリアクセス量算出部12は、着目する探索モードについて、各PUで示される探索範囲に含まれる画素の数の合計を、記憶部18から読み込まれる画素の数として算出する。なお、探索範囲同士の位置関係によっては、複数の探索範囲が互いに重複することがある。この場合、メモリアクセス量算出部12は、その重複する領域に含まれる画素については1回だけカウントすればよい。また、動きベクトル算出部15での探索範囲のサイズは、PUのサイズと同サイズの領域に、その領域の外周に沿った、所定幅(例えば、6〜10画素)を持つオフセット領域を合成した領域のサイズとなる。したがって、探索モード4または探索モード5のように、オフセット領域が狭くなる探索モードでは、探索範囲は狭くなる。   The memory access amount calculation unit 12 calculates a memory access amount representing the amount of data read from the storage unit 18 in the motion search process by the motion vector calculation unit 15 for each search mode for the encoding target CTU. In this embodiment, the memory access amount calculation unit 12 calculates the memory access amount according to the search mode and the search range indicated by the motion vector candidates of each PU in the search mode. For example, the memory access amount calculation unit 12 calculates the total number of pixels included in the search range indicated by each PU as the number of pixels read from the storage unit 18 for the search mode of interest. Depending on the positional relationship between the search ranges, a plurality of search ranges may overlap each other. In this case, the memory access amount calculation unit 12 only needs to count the pixels included in the overlapping area once. In addition, the size of the search range in the motion vector calculation unit 15 is obtained by combining an offset area having a predetermined width (for example, 6 to 10 pixels) along the outer periphery of the area in the same size as the PU size. This is the size of the area. Therefore, in the search mode in which the offset region is narrow as in the search mode 4 or the search mode 5, the search range is narrowed.

メモリアクセス量算出部12は、着目する探索モードについての、記憶部18から読み込まれる画素の数を、符号化対象CTUの画素数(例えば、64画素x64画素=4096画素)で除した値に100を乗じて得られるパーセント値をその探索モードのメモリアクセス量とする。なお、メモリアクセス量は、記憶部18から読み込まれる画素の数そのものであってもよく、あるいは、記憶部18から読み込まれる画素の数に、1画素当たりのビット数またはバイト数を乗じた値であってもよい。そしてメモリアクセス量算出部12は、各探索モードのメモリアクセス量を探索モード決定部14へ出力する。   The memory access amount calculation unit 12 calculates 100 as a value obtained by dividing the number of pixels read from the storage unit 18 by the number of pixels of the encoding target CTU (for example, 64 pixels × 64 pixels = 4096 pixels) for the search mode of interest. The percentage value obtained by multiplying is set as the memory access amount of the search mode. The memory access amount may be the number of pixels read from the storage unit 18 itself, or a value obtained by multiplying the number of pixels read from the storage unit 18 by the number of bits or the number of bytes per pixel. There may be. Then, the memory access amount calculation unit 12 outputs the memory access amount of each search mode to the search mode determination unit 14.

目標アクセス量決定部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 amount determination unit 13 determines a target access amount that is the upper limit of the memory access amount in the motion vector calculation unit 15 for each encoding target CTU. In the present embodiment, the target access amount determination unit 13 increases the target access amount as the total of the actual memory access amounts of the most recent predetermined number of encoded CTUs is smaller. For example, the target access amount determination unit 13 determines the actual value for the most recent (n−1) CTUs from a value obtained by multiplying the reference value of the memory access amount per CTU by n (where n is an integer of 2 or more). The target access amount is obtained by subtracting the total memory access amount. For example, it is assumed that n = 10 and the reference value of the memory access amount per CTU is 550 (%). Then, it is assumed that the total memory access amount to the storage unit 18 of the motion vector calculation unit 15 is 4900 (%) for the latest nine CTUs. In this case, the target access amount for the encoding target CTU is 600 (%) (= 550 × 10−4900). By setting the target access amount in this way, the video encoding device 1 can adaptively set the memory access amount for the encoding target CTU.

なお、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 video encoding device 1 or a required encoding rate. However, the reference value is preferably set to a value smaller than the memory access amount when the encoding target CTU is divided by the PU of the minimum size and the search range is not limited for each PU. The reference value is preferably set to a value larger than the memory access amount when the encoding target CTU is divided by the maximum size PU and the search range is minimized for each PU. Also, n is set to any value within the range of the number of CTUs included in 2 to 1 picture, for example. As n increases, the target access amount determination unit 13 refers to the memory access amount for a large number of encoded CTUs, so that the increase or decrease in the target access amount for the encoding target CTU with respect to the reference value is likely to be allowed. .

図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 line 500 represents a reference value of the memory access amount per CTU. A graph 501 represents a history of memory access amount for each CTU. For example, the target access amount for the mth CTU is determined for the memory access amount of the nearest (m− (n−1)) to (m−1) th CTU. Therefore, if the average value of the memory access amount of the (m− (n−1)) to (m−1) th CTU is lower than the reference value, the target access amount determination unit 13 sets the target for the mth CTU. The access amount can be made larger than the reference value. Conversely, if the average memory access amount of the (m- (n-1)) to (m-1) th CTU is higher than the reference value, the target access amount for the mth CTU is less than the reference value. Also lower.

目標アクセス量決定部13は、符号化対象CTUごとに、目標アクセス量を探索モード決定部14へ通知する。また目標アクセス量決定部13は、次以降のCTUについての目標アクセス量を決定するために、探索モード決定部14から通知された、符号化対象CTUについて選択された探索モードのメモリアクセス量を、目標アクセス量決定部13が有するメモリに保存する。   The target access amount determination unit 13 notifies the search mode determination unit 14 of the target access amount for each encoding target CTU. Further, the target access amount determination unit 13 determines the memory access amount of the search mode selected for the encoding target CTU notified from the search mode determination unit 14 in order to determine the target access amount for the next and subsequent CTUs. The data is stored in a memory included in the target access amount determination unit 13.

探索モード決定部14は、符号化対象CTUごとに、目標アクセス量及び複数の探索モードのそれぞれの符号化コストに基づいて、複数の探索モードの中から適用する探索モードを決定する。   The search mode determination unit 14 determines, for each encoding target CTU, a search mode to be applied from among the plurality of search modes based on the target access amount and the encoding cost of each of the plurality of search modes.

本実施形態では、探索モード決定部14は、メモリアクセス量が目標アクセス量以下となる探索モードのうちで、符号化コストが最小となる探索モードを適用する探索モードとして選択する。   In the present embodiment, the search mode determination unit 14 selects a search mode that applies a search mode that minimizes the coding cost among search modes in which the memory access amount is equal to or less than the target access amount.

図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. Points 601 to 606 represent the memory access amount and encoding cost for search mode 1 to search mode 6, respectively. A line 610 represents the target access amount. In this example, the memory access amount in the search mode 1 represented by the point 601 is larger than the target access amount. Therefore, search mode 1 is not selected. Of the remaining search modes in which the memory access amount is equal to or less than the target access amount, the encoding cost of search mode 2 indicated by point 602 is minimized. Therefore, in this example, search mode 2 is selected.

なお、探索モード決定部14は、符号化対象ピクチャがBピクチャである場合のように、双方向予測可能な場合には、予測方向ごとに探索モードを選択してもよい。あるいは、探索モード決定部14は、全ての予測方向に対して同一の探索モードを選択してもよい。この場合には、探索モードごとのメモリアクセス量及び符号化コストは、各予測方向について求められたメモリアクセス量及び符号化コストの合計とすることができる。   Note that the search mode determination unit 14 may select a search mode for each prediction direction when bidirectional prediction is possible, such as when the encoding target picture is a B picture. Alternatively, the search mode determination unit 14 may select the same search mode for all prediction directions. In this case, the memory access amount and the encoding cost for each search mode can be the sum of the memory access amount and the encoding cost obtained for each prediction direction.

探索モード決定部14は、符号化対象CTUごとに、選択した探索モードと、その探索モードに対応するPUの組み合わせ及び各PUの動きベクトル候補を動きベクトル算出部15へ出力する。また探索モード決定部14は、選択した探索モードを目標アクセス量決定部13へ通知する。   The search mode determination unit 14 outputs the selected search mode, the combination of PUs corresponding to the search mode, and the motion vector candidates of each PU to the motion vector calculation unit 15 for each encoding target CTU. In addition, the search mode determination unit 14 notifies the target access amount determination unit 13 of the selected search mode.

動きベクトル算出部15は、符号化対象CTUについて、探索モード決定部14から通知された探索モード及び各PUの動きベクトル候補に基づいて、PUごとに探索範囲を設定し、その探索範囲内で動きベクトルを算出する。   The motion vector calculation unit 15 sets a search range for each PU based on the search mode and the motion vector candidates of each PU notified from the search mode determination unit 14 for the encoding target CTU, and moves within the search range. Calculate the vector.

本実施形態では、動きベクトル算出部15は、着目するPUについて、参照ピクチャ上のそのPUと同じ位置の領域から動きベクトル候補に示される水平方向及び垂直方向の画素数だけ移動した領域を特定する。そして動きベクトル算出部15は、その特定した領域を、その外周に沿って所定幅(例えば、6画素〜10画素)を持つオフセット領域だけ拡げた領域を探索範囲とする。その際、探索モード4または5のように、オフセット領域の幅が制限される探索モードが設定されている場合、その制限に応じてオフセット領域の幅を狭くする。例えば、探索モード4では、動きベクトル算出部15は、オフセット領域の幅を1画素分狭くする。同様に、探索モード5では、動きベクトル算出部15は、オフセット領域の幅を2画素分狭くする。   In the present embodiment, the motion vector calculation unit 15 identifies an area that has moved by the number of pixels in the horizontal and vertical directions indicated by the motion vector candidate from the area at the same position as the PU on the reference picture for the target PU. . Then, the motion vector calculation unit 15 sets an area obtained by expanding the specified area by an offset area having a predetermined width (for example, 6 pixels to 10 pixels) along the outer periphery. At this time, when a search mode in which the width of the offset area is limited is set as in search mode 4 or 5, the width of the offset area is reduced according to the restriction. For example, in search mode 4, the motion vector calculation unit 15 narrows the width of the offset region by one pixel. Similarly, in search mode 5, the motion vector calculation unit 15 narrows the width of the offset region by two pixels.

動きベクトル算出部15は、符号化対象CTU内の各PUについて、記憶部18から探索範囲に含まれる画素の値を読み込む。その際、動きベクトル算出部15は、複数のPUの探索範囲が重複している場合、その重複部分に含まれる画素については1回だけ記憶部18から読み込むようにしてもよい。   The motion vector calculation unit 15 reads the value of the pixel included in the search range from the storage unit 18 for each PU in the encoding target CTU. In that case, when the search range of several PU overlaps, the motion vector calculation part 15 may read from the memory | storage part 18 about the pixel contained in the duplication part only once.

動きベクトル算出部15は、符号化対象CTU内の各PUについて、探索範囲内でブロックマッチングを実行して、PUと最も一致する探索範囲内の領域の位置を決定する。そして動きベクトル算出部15は、PUとその領域間の空間的な移動量を表すベクトルを動きベクトルとして算出する。なお、動きベクトル算出部15は、動きベクトルの精度を1画素未満とするために、探索範囲に対して補間処理を実行して、探索範囲内の各画素に対して1/2画素または1/4画素だけ水平方向または垂直方向に位置がずれた画素を持つ補間探索範囲を設定してもよい。そして動きベクトル算出部15は、探索範囲及び補間探索範囲のそれぞれに対してブロックマッチングを行って、PUと最も一致する領域の位置を求めることで、動きベクトルを算出してもよい。   The motion vector calculation unit 15 performs block matching within the search range for each PU in the encoding target CTU, and determines the position of the region within the search range that most closely matches the PU. Then, the motion vector calculation unit 15 calculates a vector representing the amount of spatial movement between the PU and its area as a motion vector. Note that the motion vector calculation unit 15 performs an interpolation process on the search range so that the accuracy of the motion vector is less than one pixel, and ½ pixel or 1/1 for each pixel in the search range. An interpolation search range having pixels whose positions are shifted in the horizontal direction or the vertical direction by 4 pixels may be set. Then, the motion vector calculation unit 15 may calculate a motion vector by performing block matching on each of the search range and the interpolation search range to obtain the position of the region that most closely matches the PU.

動きベクトル算出部15は、符号化対象CTU内の各PUの動きベクトル及びその動きベクトルが参照する参照ピクチャを示す情報を符号化モード決定部16へ出力する。   The motion vector calculation unit 15 outputs information indicating the motion vector of each PU in the encoding target CTU and the reference picture referred to by the motion vector to the encoding mode determination unit 16.

符号化モード決定部16は、符号化対象CTUにおいて、適用可能なCUサイズ、PUサイズ、TUサイズ、及び符号化モードの組み合わせを求める。そして符号化モード決定部16は、各組み合わせについて、符号量の推定値である符号化コストを算出する。そして符号化モード決定部16は、その符号化コストが最小となる組合せを、符号化対象CTUに適用するCUサイズ、PUサイズ、TUサイズ及び符号化モードとする。   The encoding mode determination unit 16 obtains a combination of applicable CU size, PU size, TU size, and encoding mode in the encoding target CTU. Then, the encoding mode determination unit 16 calculates an encoding cost that is an estimated value of the code amount for each combination. Then, the encoding mode determination unit 16 sets the combination that minimizes the encoding cost as the CU size, PU size, TU size, and encoding mode to be applied to the encoding target CTU.

本実施形態では、その組み合わせを設定する際、符号化モード決定部16は、符号化モードをインター予測符号化モードとする場合、選択された探索モードに応じて設定された各PUについての動きベクトルを利用する。すなわち、符号化モード決定部16は、選択された探索モードに応じて決定された動きベクトルで、参照ピクチャ上の参照領域を動き補償することで予測ブロックを生成する。   In the present embodiment, when setting the combination, the encoding mode determination unit 16 sets the motion vector for each PU set according to the selected search mode when the encoding mode is the inter prediction encoding mode. Is used. That is, the encoding mode determination unit 16 generates a prediction block by performing motion compensation on the reference region on the reference picture with the motion vector determined according to the selected search mode.

符号化モード決定部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 mode determination unit 16 calculates a prediction error, that is, a pixel difference absolute value sum SAD for each TU included in the combination according to the following equation.
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 mode determination unit 16 may calculate the absolute value sum SATD of each pixel after Hadamard transform of the difference image between the block of interest and the prediction block, instead of SAD.

符号化モード決定部16は、着目する組み合わせについて、次式に従って符号化コストCostを算出する。
Cost = ΣSAD+λR
ここで、ΣSADは、符号化対象のCTUに含まれる各TUについて算出されたSADの総和である。またRは、動きベクトル、イントラ予測符号化モードにおける予測方向を表す予測モードを示すフラグなど、直交変換係数以外の項目についての符号量の推定値である。そしてλは定数である。
The encoding mode determination unit 16 calculates the encoding cost Cost according to the following expression for the combination of interest.
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 mode determination unit 16 obtains a combination that minimizes the encoding cost, the encoding unit determines the CU size, the PU size, the TU size, and the encoding mode that are included in the combination and are applied to the CTU to be encoded. 17 to output. Note that, for a CU to be inter-predictively encoded, the encoding mode determination unit 16 also outputs a motion vector calculated for a PU included in the CU to the encoding unit 17.

符号化部17は、符号化モード決定部16により決定されたCUサイズ、PUサイズ及びTUサイズに従って、符号化対象のCTUを分割する。そして符号化部17は、符号化モード決定部16により決定されたCUごとの符号化モードに従って、そのCUに含まれる各TUの予測ブロックを作成する。そして符号化部17は、符号化対象のCTUと予測ブロック間の予測誤差信号を、TUごとに直交変換して得られる直交変換係数を量子化及び可変長符号化することで、符号化対象のCTUを符号化する。   The encoding unit 17 divides the CTU to be encoded according to the CU size, PU size, and TU size determined by the encoding mode determination unit 16. Then, the encoding unit 17 creates a prediction block for each TU included in the CU according to the encoding mode for each CU determined by the encoding mode determination unit 16. Then, the encoding unit 17 quantizes and variable-length-codes the orthogonal transform coefficient obtained by orthogonally transforming the prediction error signal between the CTU to be encoded and the prediction block for each TU, thereby obtaining the encoding target. Encode the CTU.

再度図2を参照すると、符号化部17は、予測ブロック生成部21と、予測誤差信号算出部22と、直交変換部23と、量子化部24と、復号部25と、可変長符号化部26とを有する。   Referring to FIG. 2 again, the encoding unit 17 includes a prediction block generation unit 21, a prediction error signal calculation unit 22, an orthogonal transformation unit 23, a quantization unit 24, a decoding unit 25, and a variable length encoding unit. 26.

予測ブロック生成部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 signal calculation unit 22.

予測誤差信号算出部22は、符号化対象のCTU内の各画素について、予測ブロックの対応する画素との差分演算を実行する。そして予測誤差信号算出部22は、その差分演算により得られた各画素に対応する差分値を、予測誤差信号とする。予測誤差信号算出部22は、予測誤差信号を直交変換部23へ出力する。   The prediction error signal calculation unit 22 performs a difference calculation for each pixel in the CTU to be encoded with the corresponding pixel of the prediction block. And the prediction error signal calculation part 22 makes the difference value corresponding to each pixel obtained by the difference calculation a prediction error signal. The prediction error signal calculation unit 22 outputs the prediction error signal to the orthogonal transformation unit 23.

直交変換部23は、符号化対象のCTU内のTUごとに、予測誤差信号を直交変換することにより、直交変換係数の組を求める。例えば、直交変換部23は、直交変換処理として、離散コサイン変換(Discrete Cosine Transform、DCT)を用いることで、直交変換係数として、TUごとのDCT係数の組を得る。
直交変換部23は、TUごとの直交変換係数の組を量子化部24へ出力する。
The orthogonal transform unit 23 obtains a set of orthogonal transform coefficients by performing orthogonal transform on the prediction error signal for each TU in the CTU to be encoded. For example, the orthogonal transform unit 23 obtains a set of DCT coefficients for each TU as orthogonal transform coefficients by using discrete cosine transform (DCT) as orthogonal transform processing.
The orthogonal transform unit 23 outputs a set of orthogonal transform coefficients for each TU to the quantization unit 24.

量子化部24は、TUごとに、直交変換係数を量子化することにより、その直交変換係数の量子化係数を算出する。この量子化処理は、一定区間に含まれる信号値を一つの信号値で表す処理である。そしてその一定区間は、量子化幅と呼ばれる。例えば、量子化部24は、直交変換係数から、量子化幅に相当する所定数の下位ビットを切り捨てることにより、その直交変換係数を量子化する。量子化幅は、量子化パラメータによって決定される。例えば、量子化部24は、量子化パラメータの値に対する量子化幅の値を表す関数にしたがって、使用される量子化幅を決定する。またその関数は、量子化パラメータの値に対する単調増加関数とすることができ、予め設定される。   For each TU, the quantization unit 24 quantizes the orthogonal transform coefficient to calculate a quantization coefficient of the orthogonal transform coefficient. This quantization process is a process that represents a signal value included in a certain section as one signal value. The fixed interval is called a quantization width. For example, the quantization unit 24 quantizes the orthogonal transform coefficient by truncating a predetermined number of lower bits corresponding to the quantization width from the orthogonal transform coefficient. The quantization width is determined by the quantization parameter. For example, the quantization unit 24 determines a quantization width to be used according to a function representing a quantization width value with respect to a quantization parameter value. The function can be a monotonically increasing function with respect to the value of the quantization parameter, and is set in advance.

また量子化部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 quantization unit 24 may determine the quantization parameter according to any of various quantization parameter determination methods corresponding to a moving image coding standard such as HEVC. The quantization unit 24 can use, for example, a quantization parameter calculation method related to the MPEG-2 standard test model 5. For the quantization parameter calculation method for the MPEG-2 standard test model 5, refer to the URL specified at http://www.mpeg.org/MPEG/MSSG/tm5/Ch10/Ch10.html, for example. I want to be.
Since the quantization unit 24 can reduce the number of bits used to represent the orthogonal transform coefficient by executing the quantization process, the amount of information included in the CTU to be encoded can be reduced. The quantization unit 24 outputs the quantized coefficient to the decoding unit 25 and the variable length coding unit 26.

復号部25は、符号化対象のCTUの量子化係数から、そのCTUよりも後のCTU及び符号化対象のCTUを含むピクチャよりも符号化順で後のピクチャを符号化するために参照される参照ピクチャを生成する。そのために、復号部25は、量子化係数に、量子化パラメータにより決定された量子化幅に相当する所定数を乗算することにより、量子化係数を逆量子化する。この逆量子化により、各TUの直交変換係数の組、例えば、DCT係数の組が復元される。その後、復号部25は、TUごとに、直交変換係数の組を逆直交変換処理する。例えば、直交変換部23がDCTを用いている場合、復号部25は、各TUに対して逆DCT処理を実行する。逆量子化処理及び逆直交変換処理を量子化信号に対して実行することにより、符号化前の予測誤差信号と同程度の情報を有する予測誤差信号が再生される。   The decoding unit 25 is referred from the quantization coefficient of the CTU to be encoded in order to encode a picture subsequent to the CTU after the CTU and a picture including the CTU to be encoded in the encoding order. Generate a reference picture. For this purpose, the decoding unit 25 dequantizes the quantization coefficient by multiplying the quantization coefficient by a predetermined number corresponding to the quantization width determined by the quantization parameter. By this inverse quantization, a set of orthogonal transform coefficients of each TU, for example, a set of DCT coefficients is restored. Thereafter, the decoding unit 25 performs inverse orthogonal transform processing on the set of orthogonal transform coefficients for each TU. For example, when the orthogonal transform unit 23 uses DCT, the decoding unit 25 performs inverse DCT processing on each TU. By performing the inverse quantization process and the inverse orthogonal transform process on the quantized signal, a prediction error signal having the same level of information as the prediction error signal before encoding is reproduced.

復号部25は、予測ブロックの各画素値に、その画素に対応する再生された予測誤差信号を加算する。これらの処理を各予測ブロックについて実行することにより、復号部25は、その後に符号化されるPUに対する予測ブロックを生成するために参照されるブロックを復元する。さらに、復号部25は、復元したブロックに対してデブロッキングフィルタ処理を実行してもよい。
復号部25は、ブロックを復元する度に、その復元されたブロックを、記憶部18に記憶する。
The decoding unit 25 adds the reproduced prediction error signal corresponding to the pixel to each pixel value of the prediction block. By executing these processes for each prediction block, the decoding unit 25 restores a block that is referred to in order to generate a prediction block for a PU to be encoded thereafter. Further, the decoding unit 25 may perform a deblocking filter process on the restored block.
Each time the decoding unit 25 restores a block, the decoding unit 25 stores the restored block in the storage unit 18.

復号部25は、さらに、復元されたブロックから画素を間引くことで、そのブロックの画素数よりも画素数が少ない間引きブロックを生成し、その間引きブロックも記憶部18に記憶する。この間引きブロックは、参照ピクチャの縮小ピクチャを生成するために利用される。   The decoding unit 25 further generates a thinned block having a smaller number of pixels than the number of pixels of the block by thinning out the pixels from the restored block, and stores the thinned block in the storage unit 18. This decimation block is used to generate a reduced picture of the reference picture.

記憶部18は、復元されたブロックを一時的に記憶する。各ブロックの符号化順序にしたがって、1枚のピクチャ分の復元されたブロックを結合することで、後続するピクチャの符号化の際に参照されるピクチャが得られる。同様に、各ブロックの符号化順序にしたがって、1枚のピクチャ分の間引きブロックを結合することで、その参照ピクチャに対応する縮小ピクチャが得られる。記憶部18は、符号化対象ピクチャが参照する可能性がある、予め定められた所定枚数分の参照ピクチャ及び縮小ピクチャを記憶し、記憶している参照ピクチャの枚数がその所定枚数を超えると、符号化順序が古い参照ピクチャ及び縮小ピクチャから順に破棄する。   The storage unit 18 temporarily stores the restored block. By combining the restored blocks for one picture according to the coding order of each block, a picture to be referred to when coding the subsequent picture is obtained. Similarly, a reduced picture corresponding to the reference picture is obtained by combining the thinned blocks for one picture according to the coding order of each block. The storage unit 18 stores a predetermined number of reference pictures and reduced pictures that may be referred to by the encoding target picture, and when the number of stored reference pictures exceeds the predetermined number, Discard the oldest reference picture and reduced picture in order.

さらに、記憶部18は、インター予測符号化されたPUのそれぞれについての動きベクトルを記憶する。   Further, the storage unit 18 stores a motion vector for each of the PUs subjected to inter prediction encoding.

可変長符号化部26は、符号化対象のCTUに含まれる量子化係数を可変長符号化する。さらに、可変長符号化部26は、予測ブロックの作成に利用された動きベクトルなども可変長符号化する。そして可変長符号化部26は、その可変長符号化によって得られた符号化ビットを、HEVCなどに従って所定の順序に並べたビットストリームを出力する。なお、可変長符号化部26は、可変長符号化方式として、Context-based Adaptive Variable Length Coding (CAVLC)といったハフマン符号化処理あるいはContext-based Adaptive Binary Arithmetic Coding(CABAC)といった算術符号化処理を用いることができる。   The variable length coding unit 26 performs variable length coding on the quantization coefficient included in the CTU to be coded. Furthermore, the variable length coding unit 26 also performs variable length coding on a motion vector or the like used to create a prediction block. Then, the variable length coding unit 26 outputs a bit stream in which coded bits obtained by the variable length coding are arranged in a predetermined order according to HEVC or the like. The variable length coding unit 26 uses a Huffman coding process such as Context-based Adaptive Variable Length Coding (CAVLC) or an arithmetic coding process such as Context-based Adaptive Binary Arithmetic Coding (CABAC) as the variable length coding method. be able to.

制御部(図示せず)は、出力されたビットストリームを所定の順序で結合し、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 image encoding device 1. The moving image encoding apparatus 1 performs encoding for each CTU according to the following operation flowchart.

制御部(図示せず)は、符号化対象の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 amount calculation unit 12 and the search mode determination unit 14 for each search mode.

メモリアクセス量算出部12は、探索モードごとに、各PUの探索範囲に基づいてメモリアクセス量を算出する(ステップS103)。そしてメモリアクセス量算出部12は、各探索モードのメモリアクセス量を探索モード決定部14へ出力する。   The memory access amount calculation unit 12 calculates the memory access amount based on the search range of each PU for each search mode (step S103). Then, the memory access amount calculation unit 12 outputs the memory access amount of each search mode to the search mode determination unit 14.

また、目標アクセス量決定部13は、直近の(n-1)個のCTUのメモリアクセス量に基づいて符号化対象CTUの目標アクセス量を決定する(ステップS104)。そして目標アクセス量決定部13は、その目標アクセス量を探索モード決定部14へ出力する。   Further, the target access amount determination unit 13 determines the target access amount of the encoding target CTU based on the memory access amount of the latest (n−1) CTUs (step S104). Then, the target access amount determination unit 13 outputs the target access amount to the search mode determination unit 14.

探索モード決定部14は、メモリアクセス量が目標アクセス量以下となる探索モードのうちで、符号化コストが最小となる探索モードを適用する探索モードとして選択する(ステップS105)。そして探索モード決定部14は、選択した探索モードと、その探索モードに対応するPUの組み合わせ及び各PUの動きベクトル候補を動きベクトル算出部15へ出力する。   The search mode determination unit 14 selects a search mode that applies a search mode that minimizes the coding cost among search modes in which the memory access amount is equal to or less than the target access amount (step S105). Then, the search mode determination unit 14 outputs the selected search mode, the combination of PUs corresponding to the search mode, and the motion vector candidates of each PU to the motion vector calculation unit 15.

動きベクトル算出部15は、符号化対象CTUについて、選択された探索モード及びその探索モードについての符号化対象CTU内の各PUの動きベクトル候補に基づいて、PUごとに探索範囲を設定し、その探索範囲内で動きベクトルを算出する(ステップS106)。   The motion vector calculation unit 15 sets a search range for each PU based on the selected search mode and the motion vector candidates of each PU in the encoding target CTU for the search mode for the encoding target CTU, A motion vector is calculated within the search range (step S106).

ステップ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 mode determination unit 16 determines the encoding mode, CU size, Determine the combination of PU size and TU size. That is, the encoding mode determination unit 16 sets a combination that applies the minimum encoding cost to the encoding target CTU among combinations of the encoding mode, CU size, PU size, and TU size (step S107). . The prediction block generation unit 21 of the encoding unit 17 calculates a prediction block according to the encoding mode included in the determined combination (step S108). The prediction block generation unit 21 corresponds to the PU in the reference picture with the motion vector calculated by the motion vector calculation unit 15 for each PU in the CU that is inter-predictively encoded in the encoding target CTU. The prediction block is obtained by motion compensation of the reference region to be performed. And the prediction error signal calculation part 22 of the encoding part 17 calculates a prediction error signal by calculating the difference for every pixel between TU and the prediction block corresponding to the TU for every TU (step S109).

その後、符号化部17の直交変換部23は、予測誤差信号をTUごとに直交変換して直交変換係数の組を算出する(ステップS110)。そして符号化部17の量子化部24は、各直交変換係数を量子化する(ステップS111)。   Thereafter, the orthogonal transform unit 23 of the encoding unit 17 performs orthogonal transform on the prediction error signal for each TU to calculate a set of orthogonal transform coefficients (step S110). Then, the quantization unit 24 of the encoding unit 17 quantizes each orthogonal transform coefficient (step S111).

符号化部17の復号部25は、量子化係数を逆量子化及び逆直交変換して再生した予測誤差信号と予測ブロックを加算して参照ブロックを生成する(ステップS112)。そして復号部25は、その参照ブロックを記憶部18に記憶する。さらに、復号部25は、参照ブロックから画素を間引くことで生成される縮小ブロックも記憶部18に記憶する。一方、符号化部17の可変長符号化部26は、各量子化係数を可変長符号化する(ステップS113)。そして動画像符号化装置1は、動画像符号化処理を終了する。   The decoding unit 25 of the encoding unit 17 adds the prediction error signal reproduced by inverse quantization and inverse orthogonal transform of the quantized coefficient and the prediction block to generate a reference block (step S112). Then, the decoding unit 25 stores the reference block in the storage unit 18. Further, the decoding unit 25 also stores a reduced block generated by thinning out pixels from the reference block in the storage unit 18. On the other hand, the variable length coding unit 26 of the coding unit 17 performs variable length coding on each quantization coefficient (step S113). Then, the moving image encoding apparatus 1 ends the moving image encoding process.

以上に説明してきたように、この動画像符号化装置は、元のピクチャよりも画素数を減らした縮小ピクチャを利用して、各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 mode determination unit 14 applies a search mode in which the memory access amount is minimum among search modes in which the encoding cost is equal to or less than a predetermined reference value to the encoding target CTU. The mode may be selected. In this modification, the moving picture encoding apparatus can select a search mode that can minimize the memory access amount while maintaining the encoding efficiency at a constant level. In this case, the target access amount determination unit 13 may be omitted.

また他の変形例によれば、探索モード決定部14は、再生されたピクチャ上で、隣接するCTU間で画質が急激に変化することがないように、連続する二つのCTU間での符号化コストの差が許容変化量以下となるように、探索モードを選択してもよい。この場合には、探索モード決定部14は、メモリアクセス量が目標アクセス量以下となる探索モードのうちで、直前のCTUの符号化コストとの差が許容変化量以下となる探索モードが無いことがある。このような場合には、探索モード決定部14は、目標アクセス量を超える探索モードの中から探索モードを選択してもよい。なお、許容変化量は、例えば、直近のCTUについての符号化コストとすることができる。すなわち、ある探索モードについて符号化対象CTUの符号化コストが直近のCTUについての符号化コストの2倍以下であれば、その探索モードについては符号化コストの差が許容変化量以下となる。   According to another modification, the search mode determination unit 14 performs encoding between two consecutive CTUs so that the image quality does not change suddenly between adjacent CTUs on the reproduced picture. The search mode may be selected so that the cost difference is equal to or less than the allowable change amount. In this case, the search mode determination unit 14 does not have a search mode in which the difference from the encoding cost of the immediately preceding CTU is equal to or less than the allowable change amount among search modes in which the memory access amount is equal to or less than the target access amount. There is. In such a case, the search mode determination unit 14 may select a search mode from search modes exceeding the target access amount. The allowable change amount can be, for example, the encoding cost for the latest CTU. That is, if the encoding cost of the encoding target CTU for a certain search mode is less than or equal to twice the encoding cost for the nearest CTU, the difference in encoding cost for that search mode is less than the allowable change amount.

図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. Points 801 to 806 represent the memory access amount and encoding cost for search mode 1 to search mode 6 for the encoding target CTU, respectively. A line 810 represents the target access amount. Furthermore, a line 820 represents the encoding cost for the immediately preceding CTU, and a line 821 represents the encoding cost obtained by adding an allowable change amount to the encoding cost for the immediately preceding CTU. In this example, in search mode 3 to search mode 6 in which the memory access amount is equal to or less than the target access amount, the change amount of the coding cost from the immediately preceding CTU becomes larger than the allowable change amount. Therefore, the search mode determination unit 14 selects the memory among the search mode 1 and the search mode 2 in which the change amount of the coding cost from the immediately preceding CTU is within the allowable change amount although the memory access amount is larger than the target access amount. The search mode 2 with the smaller access amount is selected.

図9は、この変形例による動画像符号化処理の動作フローチャートである。動画像符号化装置1は、図7に示された動画像符号化処理におけるステップS105の代わりに、図9に示される各ステップの処理を実行する。   FIG. 9 is an operation flowchart of a moving image encoding process according to this modification. The moving image encoding apparatus 1 executes the process of each step shown in FIG. 9 instead of step S105 in the moving image encoding process shown in FIG.

ステップ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 mode determination unit 14 determines whether there is a search mode in which the memory access amount is equal to or less than the target access amount and the difference between the encoding cost and the encoding cost of the immediately preceding CTU is equal to or less than the allowable change amount. It is determined whether or not (step S201). When there is a search mode that satisfies the condition of step S201 (step S201-Yes), the search mode determination unit 14 selects a search mode that minimizes the coding cost among the search modes that satisfy the condition (step S202). . On the other hand, when there is no search mode that satisfies the condition of step S201 (step S201-No), the search mode determination unit 14 searches the search mode in which the difference between the encoding cost and the encoding cost of the immediately preceding CTU is less than the allowable change amount. To extract. Then, the search mode determination unit 14 selects a search mode that minimizes the memory access amount from the extracted search modes (step S203).
After step S202 or S203, the moving image encoding apparatus 1 executes the processes after step S106.

この変形例によれば、動画像符号化装置は、隣接する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 mode determination unit 14 performs intra processing for the encoding target CTU. It may be determined that the predictive coding mode is applied. Alternatively, for any search mode, even when the difference between the encoding cost for the most recent CTU and the encoding cost of the encoding target CTU is not less than or equal to the allowable change amount, the search mode determination unit 14 may be set to intra It may be determined that the predictive coding mode is applied. Then, the search mode determination unit 14 may notify the encoding mode determination unit 16 to that effect. In this case, the encoding mode determination unit 16 only needs to calculate the encoding cost when applying the intra prediction encoding mode for each combination of CU, PU, and TU applied to the encoding target CTU. .

また、この場合には、動きベクトル算出部15における動き探索処理は行われないので、動きベクトル算出部15による符号化対象CTUについてのメモリアクセス量は0になる。そのため、探索モード決定部14は、後続するCTUについての目標アクセス量を高くすることができる。その結果として、後続するCTUについては、探索モード選択の自由度が高くなる。   In this case, since the motion search processing in the motion vector calculation unit 15 is not performed, the memory access amount for the encoding target CTU by the motion vector calculation unit 15 becomes zero. Therefore, the search mode determination unit 14 can increase the target access amount for the subsequent CTU. As a result, with respect to the subsequent CTU, the degree of freedom in selecting the search mode is increased.

さらに他の変形例によれば、動きベクトル算出部15は、探索モード決定部14により選択された探索モードに従って、符号化対象CTUについて適用するPUの組み合わせ及び各PUの動きベクトルの算出を最初から実行してもよい。この場合には、動きベクトル算出部15は、縮小ピクチャを用いて求められたPUの組み合わせ及び動きベクトル候補を利用しないので、演算量は増加するものの、より符号化コストが低くなる動きベクトルを求めることができる可能性がある。   According to still another modification, the motion vector calculation unit 15 calculates the PU combination to be applied to the encoding target CTU and the motion vector of each PU from the beginning according to the search mode selected by the search mode determination unit 14. May be executed. In this case, since the motion vector calculation unit 15 does not use the PU combination and the motion vector candidate obtained using the reduced picture, the motion vector increases, but the motion vector that further reduces the coding cost is obtained. Could be possible.

さらに他の変形例によれば、動画像符号化装置は、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 computer 100 includes a user interface unit 101, a communication interface unit 102, a storage unit 103, a storage medium access device 104, and a processor 105. The processor 105 is connected to the user interface unit 101, the communication interface unit 102, the storage unit 103, and the storage medium access device 104 via, for example, a bus.

ユーザインターフェース部101は、例えば、キーボードとマウスなどの入力装置と、液晶ディスプレイといった表示装置とを有する。または、ユーザインターフェース部101は、タッチパネルディスプレイといった、入力装置と表示装置とが一体化された装置を有してもよい。そしてユーザインターフェース部101は、例えば、ユーザの操作に応じて、符号化する動画像データあるいは復号する符号化動画像データを選択する操作信号をプロセッサ105へ出力する。またユーザインターフェース部101は、プロセッサ105から受け取った、復号された動画像データを表示してもよい。   The user interface unit 101 includes, for example, an input device such as a keyboard and a mouse and a display device such as a liquid crystal display. Alternatively, the user interface unit 101 may include a device such as a touch panel display in which an input device and a display device are integrated. Then, the user interface unit 101 outputs, to the processor 105, an operation signal for selecting moving image data to be encoded or encoded moving image data to be decoded in accordance with a user operation, for example. The user interface unit 101 may display the decoded moving image data received from the processor 105.

通信インターフェース部102は、コンピュータ100を、動画像データを生成する装置、例えば、ビデオカメラと接続するための通信インターフェース及びその制御回路を有してもよい。そのような通信インターフェースは、例えば、Universal Serial Bus(ユニバーサル・シリアル・バス、USB)とすることができる。   The communication interface unit 102 may include a communication interface for connecting the computer 100 to a device that generates moving image data, for example, a video camera, and a control circuit thereof. Such a communication interface can be, for example, Universal Serial Bus (Universal Serial Bus, USB).

さらに、通信インターフェース部102は、イーサネット(登録商標)などの通信規格に従った通信ネットワークに接続するための通信インターフェース及びその制御回路を有してもよい。   Furthermore, the communication interface unit 102 may include a communication interface for connecting to a communication network according to a communication standard such as Ethernet (registered trademark) and a control circuit thereof.

この場合には、通信インターフェース部102は、通信ネットワークに接続された他の機器から、符号化する動画像データを取得し、そのデータをプロセッサ105へ渡す。また通信インターフェース部102は、プロセッサ105から受け取った、符号化動画像データを通信ネットワークを介して他の機器へ出力してもよい。   In this case, the communication interface unit 102 acquires moving image data to be encoded from another device connected to the communication network, and passes the data to the processor 105. Further, the communication interface unit 102 may output the encoded moving image data received from the processor 105 to another device via a communication network.

記憶部103は、例えば、読み書き可能な半導体メモリと読み出し専用の半導体メモリとを有する。そして記憶部103は、プロセッサ105上で実行される、動画像符号化処理を実行するためのコンピュータプログラム、及びこれらの処理の途中または結果として生成されるデータを記憶する。   The storage unit 103 includes, for example, a readable / writable semiconductor memory and a read-only semiconductor memory. The storage unit 103 stores a computer program for executing a moving image encoding process executed on the processor 105, and data generated during or as a result of these processes.

記憶媒体アクセス装置104は、例えば、磁気ディスク、半導体メモリカード及び光記憶媒体といった記憶媒体106にアクセスする装置である。記憶媒体アクセス装置104は、例えば、記憶媒体106に記憶されたプロセッサ105上で実行される、動画像符号化処理用のコンピュータプログラムを読み込み、プロセッサ105に渡す。   The storage medium access device 104 is a device that accesses a storage medium 106 such as a magnetic disk, a semiconductor memory card, and an optical storage medium. For example, the storage medium access device 104 reads a computer program for moving image encoding processing executed on the processor 105 stored in the storage medium 106 and passes the computer program to the processor 105.

プロセッサ105は、上記の実施形態または変形例による動画像符号化処理用コンピュータプログラムを実行することにより、符号化動画像データを生成する。そしてプロセッサ105は、生成された符号化動画像データを記憶部103に保存し、または通信インターフェース部102を介して他の機器へ出力する。   The processor 105 generates encoded moving image data by executing the computer program for moving image encoding processing according to the above-described embodiment or modification. The processor 105 stores the generated encoded moving image data in the storage unit 103 or outputs it to another device via the communication interface unit 102.

なお、動画像符号化装置1の各部の機能をプロセッサ上で実行可能なコンピュータプログラムは、コンピュータによって読み取り可能な媒体に記録された形で提供されてもよい。ただし、そのような記録媒体には、搬送波は含まれない。   Note that the computer program capable of executing the functions of the respective units of the moving image encoding device 1 on the processor may be provided in a form recorded on a computer-readable medium. However, such a recording medium does not include a carrier wave.

ここに挙げられた全ての例及び特定の用語は、読者が、本発明及び当該技術の促進に対する本発明者により寄与された概念を理解することを助ける、教示的な目的において意図されたものであり、本発明の優位性及び劣等性を示すことに関する、本明細書の如何なる例の構成、そのような特定の挙げられた例及び条件に限定しないように解釈されるべきものである。本発明の実施形態は詳細に説明されているが、本発明の精神及び範囲から外れることなく、様々な変更、置換及び修正をこれに加えることが可能であることを理解されたい。   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 1, wherein the motion vector calculation unit calculates the motion vector for each sub-block included in the combination of the sub-blocks for the selected search mode.
(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 attachment 3.
(Appendix 5)
The moving image encoding apparatus according to Supplementary Note 3 or 4, wherein the plurality of search modes further include a fourth search mode in which the number of other pictures that can be referred to is smaller than that in the first search mode. (Figure 3)
(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 SYMBOLS 1 Moving image encoder 11 Coding cost calculation part 12 Memory access amount calculation part 13 Target access amount determination part 14 Search mode determination part 15 Motion vector calculation part 16 Encoding mode determination part 17 Encoding part 18 Storage part 21 Prediction block Generation unit 22 Prediction error signal calculation unit 23 Orthogonal transformation unit 24 Quantization unit 25 Decoding unit 26 Variable length coding unit 100 Computer 101 User interface unit 102 Communication interface unit 103 Storage unit 104 Storage medium access device 105 Processor 106 Storage medium

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.
前記探索モード決定部は、前記複数の探索モードのうち、前記メモリアクセス量が目標アクセス量以下となる探索モードのうちで前記符号化コストが最小となる探索モードを選択する、請求項1または2に記載の動画像符号化装置。   The search mode determination unit selects a search mode in which the coding cost is minimum 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 apparatus described in 1. 前記符号化対象ブロックの直近の所定数のブロックのそれぞれの前記メモリアクセス量の合計が少ないほど前記目標アクセス量を大きくする目標アクセス量決定部をさらに有する、請求項3に記載の動画像符号化装置。   The moving image encoding according to claim 3, further comprising a target access amount determination unit that increases the target access amount as the sum of the memory access amounts of the predetermined number of blocks nearest to the encoding target block decreases. apparatus. 前記探索モード決定部は、前記複数の探索モードのうちの前記メモリアクセス量が前記目標アクセス量以下となる探索モードの何れについても、当該探索モードの前記符号化コストと前記ブロックの直前のブロックの前記符号化コストとの差が許容範囲から外れる場合、前記差が前記許容範囲に含まれる探索モードのうちの前記メモリアクセス量が最小となる探索モードを選択する、請求項3または4に記載の動画像符号化装置。   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. 5. The search mode according to claim 3, wherein, when a difference from the encoding cost is out of an allowable range, a search mode that minimizes the memory access amount is selected from search modes in which the difference is included in the allowable range. Video encoding device. 動画像データに含まれるピクチャ上の符号化対象ブロックと、符号化済みの他のピクチャ上の動きベクトルで示された参照ブロック間の誤差を符号化する動画像符号化方法であって、
前記動きベクトルの探索方法を規定する複数の探索モードのそれぞれについて、前記他のピクチャに含まれる画素の数を減じた縮小ピクチャ上の当該探索モードで規定される前記動きベクトルの探索範囲に対応する領域内で前記符号化対象ブロックに含まれる画素の数を減じた縮小ブロックと最も一致する領域を求め、前記縮小ブロックと当該最も一致する領域間の移動量から前記探索範囲を特定する動きベクトル候補及び前記符号化対象ブロックの符号量を表す符号化コストを算出し、
前記複数の探索モードのそれぞれについて、当該探索モードでの前記探索範囲に基づいて、前記動きベクトルを算出するために前記他のピクチャを記憶している記憶部から読み出すデータ量を表すメモリアクセス量を算出し、
前記複数の探索モードのそれぞれについての前記メモリアクセス量及び前記符号化コストに基づいて、前記複数の探索モードの中から前記符号化対象ブロックに適用する探索モードを選択し、
前記選択された探索モードに従って前記他のピクチャ上に前記探索範囲を設定し、前記記憶部から前記他のピクチャ上の当該探索範囲に含まれる画素のデータを読み出して、当該探索範囲内で前記符号化対象ブロックと最も一致する領域を求め、前記符号化対象ブロックと当該領域間の移動量を表すベクトルを前記動きベクトルとして算出する、
ことを含む動画像符号化方法。
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.
JP2014116180A 2014-06-04 2014-06-04 Moving picture coding apparatus, moving picture coding method, and moving picture coding computer program Active JP6323185B2 (en)

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)

* Cited by examiner, † Cited by third party
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

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