JP2016187171A - Video encoding device, video encoding method, and video encoding program - Google Patents
Video encoding device, video encoding method, and video encoding program Download PDFInfo
- Publication number
- JP2016187171A JP2016187171A JP2015067601A JP2015067601A JP2016187171A JP 2016187171 A JP2016187171 A JP 2016187171A JP 2015067601 A JP2015067601 A JP 2015067601A JP 2015067601 A JP2015067601 A JP 2015067601A JP 2016187171 A JP2016187171 A JP 2016187171A
- Authority
- JP
- Japan
- Prior art keywords
- mode
- block
- prediction
- encoding
- vector
- 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.)
- Pending
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
Description
本発明は、動画像符号化装置、動画像符号化方法、及び動画像符号化プログラムに関する。 The present invention relates to a moving image encoding apparatus, a moving image encoding method, and a moving image encoding program.
画像データ、特に動画像データは、データ量が大きいことが多いため、例えば、データを動画像符号化装置から動画像復号装置へと伝送する際、又は記憶装置に格納する際などに、データ列を符号化して別のデータ列に変換することが行われている。それにより、例えば、データ量を圧縮して、動画像符号化装置から動画像復号装置へと伝送し、受信側の動画像復号装置でのスムーズな閲覧を可能としている。 Since image data, particularly moving image data, often has a large amount of data, for example, when data is transmitted from a moving image encoding device to a moving image decoding device or stored in a storage device, a data string Is encoded and converted into another data string. Thereby, for example, the data amount is compressed and transmitted from the moving image encoding device to the moving image decoding device, thereby enabling smooth browsing on the receiving side moving image decoding device.
動画像を符号化する技術として、例えば、H.264、及びHigh Efficiency Video Coding(HEVC,H.265)等の技術が知られている。 As a technique for encoding a moving image, for example, H.264. Technologies such as H.264 and High Efficiency Video Coding (HEVC, H.265) are known.
動画像を符号化する場合に、画像を複数のブロックに分割し、ブロック単位で符号化が実行されることがある。また、この場合に、ブロックを更に複数のサブブロックへと分割し、サブブロック単位で、符号化モードを決定することがある。例えば、HEVCでは、画像は、Coding Tree Unit(CTU)と呼ばれるブロックに分割され、更に、CTUはCoding Unit(CU)と呼ばれる複数のサブブロックに分割される。そして、CU単位で、符号化モードが選択される。なお、符号化モードは、例えば、インター符号化モードと、イントラ符号化モードとを含んでいてよい。 When encoding a moving image, the image may be divided into a plurality of blocks, and encoding may be performed in units of blocks. In this case, the block may be further divided into a plurality of sub blocks, and the encoding mode may be determined in units of sub blocks. For example, in HEVC, an image is divided into blocks called Coding Tree Units (CTUs), and the CTU is further divided into a plurality of sub-blocks called Coding Units (CUs). Then, the encoding mode is selected on a CU basis. Note that the encoding mode may include, for example, an inter encoding mode and an intra encoding mode.
インター符号化モードは、動画像に含まれる符号化の対象画像を符号化済み画像の情報を用いて符号化する符号化モードであり、イントラ符号化モードは、符号化の対象画像が持つ情報を用いてその対象画像を符号化する符号化モードである。なお、符号化の対象画像は、以下の説明においてフレーム又はピクチャと呼ばれることがある。 The inter coding mode is a coding mode in which a coding target image included in a moving image is coded using information of a coded image, and the intra coding mode is information that the coding target image has. This is an encoding mode for encoding the target image. Note that the encoding target image may be referred to as a frame or a picture in the following description.
動画像データは、或るタイミングのピクチャデータと次のタイミングのピクチャデータとの類似度が高いことが多い。そのため、インター符号化モードでは、この動画像データの時間方向に相関性が高い性質を利用して符号化が行われる。まず、画像は複数のブロックに分割される。そして、動画像符号化装置は、ブロック毎に、符号化済みフレームの復号画像から、符号化する対象のブロックと類似している領域を選択し、類似領域を指し示す動きベクトルを特定する。また、動画像符号化装置は、この類似領域と符号化する対象のブロックとの差分を計算する。そして、動画像符号化装置は、特定された動きベクトルを示す情報と計算された差分の情報とを符号化することで、高い圧縮率を実現する。 In many cases, moving image data has a high degree of similarity between picture data at a certain timing and picture data at the next timing. For this reason, in the inter coding mode, coding is performed using the property of high correlation in the time direction of the moving image data. First, an image is divided into a plurality of blocks. Then, for each block, the moving image encoding apparatus selects a region similar to the target block to be encoded from the decoded image of the encoded frame, and specifies a motion vector indicating the similar region. In addition, the moving image encoding apparatus calculates a difference between the similar region and a block to be encoded. Then, the moving image encoding apparatus realizes a high compression rate by encoding the information indicating the identified motion vector and the calculated difference information.
ここで、インター符号化モードは、例えば、コピーモードと、予測ベクトルモードの2つの予測モードを含んでいてよい。コピーモードは、符号化済みの周辺ブロックの動きベクトルをコピーするモードであってよい。例えば、HEVCではコピーモードとして、マージモードが規定されている。マージモードでは、符号化済みの隣接ブロックの動きベクトルを用いて複数の動きベクトル候補を導出し、マージ候補リストを生成する。そして、マージ候補リスト内から適した動きベクトル候補を選択し、その選択された動きベクトル候補を指定するインデックスを符号化して伝送する。予測ベクトルモードは、処理対象のブロックの動きベクトルと、符号化済みの隣接ブロックの動きベクトルから導出された予測ベクトルとの差分ベクトルを符号化するモードであってよい。例えば、HEVCでは予測ベクトルモードとして、Advanced Motion Vector Prediction(AMVP)が規定されている。また、例えば、H.264においても、符号化済みの隣接ブロックの動きベクトルをコピーするコピーモードと、符号化済みの隣接ブロックを予測ベクトルとして動きベクトルとの差分ベクトルを符号化する予測ベクトルモードとが規定されている。 Here, the inter coding mode may include two prediction modes, for example, a copy mode and a prediction vector mode. The copy mode may be a mode for copying the motion vector of the encoded peripheral block. For example, HEVC defines a merge mode as a copy mode. In the merge mode, a plurality of motion vector candidates are derived using motion vectors of encoded adjacent blocks, and a merge candidate list is generated. Then, a suitable motion vector candidate is selected from the merge candidate list, and an index designating the selected motion vector candidate is encoded and transmitted. The prediction vector mode may be a mode in which a difference vector between a motion vector of a block to be processed and a prediction vector derived from a motion vector of an encoded adjacent block is encoded. For example, in HEVC, Advanced Motion Vector Prediction (AMVP) is defined as a prediction vector mode. Also, for example, H. Also in H.264, a copy mode for copying a motion vector of an encoded adjacent block and a prediction vector mode for encoding a difference vector from the motion vector using the encoded adjacent block as a prediction vector are defined.
これに関し、動画像符号化時の動き検出において、動きベクトル検出の対象となるブロックの周辺ブロックにイントラモードで符号化されたものがある場合に、精度良く動きベクトルを検出するための技術が知られている。(例えば、特許文献1)イントラ予測モードで符号化されるブロックに仮想動きベクトルを割り当て、イントラブロック後にインター予測モードで符号化されるブロックの動きベクトルを符号化するとき、イントラブロックに割り当てられた仮想動きベクトルを利用する技術が知られている。(例えば、特許文献2)また、特許文献3〜7にも関連する技術が記載されている。 In this regard, there is known a technique for detecting a motion vector with high accuracy when there is a block encoded in the intra mode among the peripheral blocks of a block that is a target of motion vector detection in motion detection during moving image encoding. It has been. (For example, Patent Document 1) When a virtual motion vector is allocated to a block encoded in the intra prediction mode and a motion vector of a block encoded in the inter prediction mode is encoded after the intra block, the block is allocated to the intra block. A technique using a virtual motion vector is known. (For example, patent document 2) Moreover, the technique relevant to patent documents 3-7 is described.
ここで、例えば、リアルタイム処理を実現するため、動画像符号化装置が、或るブロック内の複数のサブブロックに対する符号化モード及び予測モードを一括して決定することがある。そして、この符号化モードの決定後に、動画像符号化装置が、例えば、インター符号化モードと決定したサブブロックを、イントラ符号化モードに変更することがある。この様な場合に、例えば、インター符号化モードからイントラ符号化モードに変更されたサブブロックに隣接する別のサブブロックの符号化モードがインター符号化であり、且つ、予測モードがコピーモードであったとする。この場合、コピーモードにおいてコピーする動きベクトルの導出のために参照する参照先のサブブロックに、符号化モードがインター符号化モードからイントラ符号化モードに変更されたサブブロックが含まれている可能性がある。しかしながら、イントラ符号化モードに変更された場合、その参照されるサブブロックは動きベクトルを有さなくなる。そのため、イントラ符号化モードに変更されたサブブロックの動きベクトルは参照されなくなる。その結果、コピーモードにおける動きベクトルのコピー関係が崩れ、隣接する別のサブブロックにおいて誤った動きベクトルを選択してしまうことがある。また更に、この誤ったベクトルが選択された別のサブブロックに隣接するサブブロックの予測モードもコピーモードである場合、連鎖的に誤った動きベクトルを用いて動きベクトルの導出が行われることになる。その結果、誤りが更に周囲のサブブロックに伝搬してしまい、動画像データの伝送先の動画像復号装置において、ストリームが正しくデコードされず、画質劣化等の問題を引き起こしてしまうことがある。1つの側面に係る目的は、符号化モードの決定後に、或るサブブロックの符号化モードをインター符号化モードからイントラ符号化モードへと変更した場合に、周辺のコピーモードのサブブロックに生じるベクトルコピー関係の不整合を解決することである。 Here, for example, in order to realize real-time processing, the moving image encoding apparatus may collectively determine the encoding mode and the prediction mode for a plurality of sub-blocks in a certain block. Then, after the determination of the encoding mode, the moving image encoding apparatus may change, for example, the sub-block determined to be the inter encoding mode to the intra encoding mode. In such a case, for example, the coding mode of another subblock adjacent to the subblock changed from the inter coding mode to the intra coding mode is inter coding, and the prediction mode is copy mode. Suppose. In this case, there is a possibility that the sub-block to be referred to for deriving the motion vector to be copied in the copy mode includes a sub-block whose coding mode is changed from the inter coding mode to the intra coding mode. There is. However, when the mode is changed to the intra coding mode, the referenced sub-block does not have a motion vector. Therefore, the motion vector of the sub block changed to the intra coding mode is not referred to. As a result, the copy relationship of motion vectors in the copy mode is broken, and an incorrect motion vector may be selected in another adjacent sub-block. Furthermore, when the prediction mode of a sub-block adjacent to another sub-block from which this erroneous vector is selected is also a copy mode, the motion vector is derived using the chained erroneous motion vector. . As a result, the error further propagates to surrounding sub-blocks, and the video decoding device that is the transmission destination of the video data may not decode the stream correctly, which may cause problems such as image quality degradation. An object according to one aspect is that a vector generated in a sub-block of a peripheral copy mode when a coding mode of a certain sub-block is changed from an inter-coding mode to an intra-coding mode after the coding mode is determined. It is to resolve inconsistencies in copy relationships.
本発明の一つの態様の動画像符号化装置は、決定部と、変更部とを含む。決定部は、画像内の複数のブロックそれぞれに適用される符号化モードを決定するとともに、複数のブロックそれぞれに適用される予測モードを決定する。変更部は、決定部により複数のブロックのうち第1のブロックの符号化モードがインター符号化モードに決定された後に、第1のブロックの符号化モードがイントラ符号化モードに変更され、複数のブロックのうち第1のブロックに隣接する第2のブロックの予測モードが、隣接ブロックの動きベクトルをコピーするコピーモードに決定されている場合、第2のブロックの予測モードをコピーモードから、動きベクトルと予測ベクトルとの差分ベクトルを符号化する予測ベクトルモードに変更する。 The moving picture coding apparatus according to one aspect of the present invention includes a determination unit and a change unit. The determination unit determines an encoding mode to be applied to each of the plurality of blocks in the image and determines a prediction mode to be applied to each of the plurality of blocks. The changing unit changes the coding mode of the first block to the intra coding mode after the coding mode of the first block among the plurality of blocks is determined to the inter coding mode by the determining unit, When the prediction mode of the second block adjacent to the first block among the blocks is determined to be the copy mode for copying the motion vector of the adjacent block, the prediction mode of the second block is changed from the copy mode to the motion vector. And a prediction vector mode for encoding a difference vector between the prediction vector and the prediction vector.
1つの側面によれば、符号化モードの決定後に、或るサブブロックの符号化モードをインター符号化モードからイントラ符号化モードへと変更した場合に、周辺のコピーモードのサブブロックに生じるベクトルコピー関係の不整合を解決することができる。 According to one aspect, when the coding mode of a certain sub-block is changed from the inter-coding mode to the intra-coding mode after the coding mode is determined, the vector copy that occurs in the sub-blocks in the neighboring copy mode Relationship inconsistencies can be resolved.
以下、図面を参照しながら、本発明のいくつかの実施形態について詳細に説明する。なお、複数の図面において対応する要素には同一の符号を付す。また、以下では、動画像符号化方式としてHEVCを用いる場合を例に説明を行う。しかしながら、実施形態で利用可能な動画像符号化方式はこれに限定されるものではない。例えば、H.264、及びMPEG−2などの他の動画像符号化方式でも、或るブロック内の複数のサブブロック(例えばマクロブロック)の符号化モードを一括して決定し、その後に符号化モードの変更が行われる場合、同様に実施形態を適用することができる。 Hereinafter, some embodiments of the present invention will be described in detail with reference to the drawings. In addition, the same code | symbol is attached | subjected to the corresponding element in several drawing. In the following, a case where HEVC is used as a moving image encoding method will be described as an example. However, the moving picture encoding method that can be used in the embodiment is not limited to this. For example, H.M. In other moving image coding systems such as H.264 and MPEG-2, a coding mode of a plurality of sub-blocks (for example, a macro block) in a certain block is determined in a lump, and then the coding mode is changed. If so, embodiments can be applied as well.
図1は、動画像符号化方式:HEVCにおけるブロックの構成を例示する図である。HEVCでは、図1に示すように、ピクチャはCTUと呼ばれるブロックに分割される。CTUは、ラスタスキャン順に符号化処理が行われる。CTUサイズは、シーケンス単位で一定であり、例えば、16×16画素、32×32画素、又は64×64画素のいずれかのサイズに設定されてよい。CTUは、更にCUに四分木構造で分割され、分割されたCUは、Zスキャン順に符号化処理が行われる。CUのサイズは可変であり、例えば、8×8画素から64×64画素のサイズを選択することができる。CUは、符号化モードを選択する単位であり、符号化モードは例えば、イントラ予測符号化を行うイントラ符号化モードと、インター予測符号化を行うインター符号化モードとを含んでいてよい。 FIG. 1 is a diagram illustrating a block configuration in a moving image encoding scheme: HEVC. In HEVC, as shown in FIG. 1, a picture is divided into blocks called CTUs. The CTU is encoded in the raster scan order. The CTU size is constant in sequence units, and may be set to any size of 16 × 16 pixels, 32 × 32 pixels, or 64 × 64 pixels, for example. The CTU is further divided into CUs with a quadtree structure, and the divided CUs are encoded in the Z-scan order. The size of the CU is variable. For example, a size of 8 × 8 pixels to 64 × 64 pixels can be selected. The CU is a unit for selecting a coding mode, and the coding mode may include, for example, an intra coding mode for performing intra prediction coding and an inter coding mode for performing inter prediction coding.
CUは、Prediction Unit(PU)とTransform Unit(TU)単位に個別に処理される。PUは、それぞれの符号化モードにおける予測モードの決定の単位となる。例えば、イントラ符号化モードでは画面内予測モードを決定する単位であり、また、インター符号化モードでは動き補償を行う単位である。PUサイズは、例えばインター予測であれば、PUの分割形状を、2N×2N,N×N,2N×N,N×2N,2N×nU,2N×nD,nR×2N,nL×2Nの8種類のPUパーティションタイプから選択することができる。なお、PU分割形状名のnU、nD、nR、nLは、小さい方のPUが同CU内で上、下、右、左にそれぞれ位置することを示している。一方、TUは、直交変換の単位であり、TUサイズは、4×4画素から32×32画素を選択することができる。TUの分割では、CUは、四分木構造で分割され、Zスキャン順に処理される。以降の説明では、CTUを符号化ブロックと呼ぶことがある。また、CTUよりも下階層のブロック(例えば、CU,PU,及びTU)をサブブロックと呼ぶことがある。 The CU is individually processed for each Prediction Unit (PU) and Transform Unit (TU). The PU is a unit for determining the prediction mode in each coding mode. For example, the intra coding mode is a unit for determining the intra prediction mode, and the inter coding mode is a unit for performing motion compensation. For example, if the PU size is inter prediction, the PU partition shape is 2N × 2N, N × N, 2N × N, N × 2N, 2N × nU, 2N × nD, nR × 2N, nL × 2N. You can choose from different PU partition types. The PU division shape names nU, nD, nR, and nL indicate that the smaller PU is located at the top, bottom, right, and left in the CU, respectively. On the other hand, TU is a unit of orthogonal transform, and TU size can select from 4 × 4 pixels to 32 × 32 pixels. In the TU division, the CU is divided in a quadtree structure and processed in the Z scan order. In the following description, the CTU may be referred to as a coding block. In addition, blocks below the CTU (for example, CU, PU, and TU) may be referred to as sub-blocks.
また、HEVCでは、動きベクトルはPU単位に求めることができ、また、予測モードをPU単位に決定することができる。HEVCでは、動きベクトルの符号化方式として上述のように、AMVPと呼ばれる予測ベクトルモードと、マージモードと呼ばれるコピーモードの2つの予測モードが規定されている。AMVPは、例えば、シンタックス:merge_flag=0で指定されるモードであってよい。また、マージモードは、例えば、シンタックス:cu_skip_flag=1又はmerge_flag=1で指定されるモードであってよい。 In HEVC, the motion vector can be obtained in units of PUs, and the prediction mode can be determined in units of PUs. In HEVC, as described above, two prediction modes of a prediction vector mode called AMVP and a copy mode called a merge mode are defined as motion vector encoding methods. AMVP may be a mode specified by syntax: merge_flag = 0, for example. In addition, the merge mode may be a mode specified by the syntax: cu_skip_flag = 1 or merge_flag = 1, for example.
ここで、例えば、リアルタイム処理を実現するため、動画像符号化装置が、1つのCTU内の複数のサブブロック(例えば、CU,PU等)のそれぞれに対して符号化モード及び予測モードを一括して決定することがある。また、その後の符号化処理は規格通りに行われるため、例えば、上記の図1に示すようにZスキャン順にCTU内のCUは符号化される。しかしながら、この符号化処理中に、インター符号化モードに決定されていた符号化対象のCUをIntra Pulse Code Modulation(IPCM)や他のイントラ符号化モードに変更することがある。なお、IPCMは、サブブロック(例えばCU)のPCMデータを伝送するイントラ符号化モードにおける予測モードの一種であってよい。 Here, for example, in order to realize real-time processing, the moving image encoding apparatus collectively sets the encoding mode and the prediction mode for each of a plurality of sub-blocks (for example, CU, PU, etc.) in one CTU. May be determined. Further, since the subsequent encoding process is performed according to the standard, for example, as shown in FIG. 1, the CUs in the CTU are encoded in the Z scan order. However, during this encoding process, the encoding target CU that has been determined to be the inter encoding mode may be changed to Intra Pulse Code Modulation (IPCM) or another intra encoding mode. Note that the IPCM may be a kind of prediction mode in the intra coding mode in which PCM data of a sub-block (for example, CU) is transmitted.
符号化処理中に、インター符号化モードに決定されていた符号化対象のCUをIPCMや他のイントラ符号化モードに変更する例としては、以下がある。例えば、HEVCでは、IPCMの符号量を基に1CTU当たりの符号量に制限値が設けられている。一方で、符号化モード(例えばIPCM)は、CU単位で選択することが可能である。そのため、1CTU当たりに設定された符号量の制限値を基に、CU単位に正規化された閾値を決定する。続いて、CUに対して決定した閾値を、処理対象のサブブロックに対して決定された符号化モードで符号化した場合の符号量(コスト)と比較する。そして、符号量が決定された閾値を超えている場合に、処理対象のサブブロックの符号化モードをIPCMに置き換えることで、個々のCUで符号化コストを抑え、CTU単位での制限値を満たすことが行われる。例えば、この場合に、インター符号化モードに決定されていた符号化対象のサブブロックがIPCMに変更されることがある。そして、インター符号化モードに決定されていた符号化対象のCUをIPCMや他のイントラ符号化モードに変更する場合に、それ以降に符号化されるサブブロックにおいて、符号化モードの変更に起因する不整合が生じることがある。 Examples of changing the encoding target CU that has been determined to be the inter encoding mode to the IPCM or another intra encoding mode during the encoding process are as follows. For example, in HEVC, a limit value is provided for the code amount per CTU based on the code amount of IPCM. On the other hand, the encoding mode (for example, IPCM) can be selected in units of CUs. Therefore, a threshold value normalized for each CU is determined based on the limit value of the code amount set per CTU. Subsequently, the threshold value determined for the CU is compared with the code amount (cost) when encoding is performed in the encoding mode determined for the processing target sub-block. When the code amount exceeds the determined threshold value, the encoding mode of the sub-block to be processed is replaced with IPCM, so that the encoding cost is suppressed in each CU and the limit value in CTU units is satisfied. Is done. For example, in this case, the encoding target sub-block that has been determined as the inter encoding mode may be changed to the IPCM. When the encoding target CU that has been determined to be the inter encoding mode is changed to the IPCM or another intra encoding mode, the sub-block encoded thereafter is caused by the change of the encoding mode. Inconsistencies may occur.
図2は、インター符号化モードに決定されていた符号化対象のサブブロックをIPCMや他のイントラ符号化モードに変更する場合に生じ得る不整合について例示する図である。図2(a)は、動画像符号化装置が、CTU内の複数のサブブロックのそれぞれに対して符号化モード及び予測モードを一括して決定した状態を例示する図である。図2(a)では、CTU内に含まれる複数のサブブロック(例えばCU)の符号化モードがインター符号化モードかイントラ符号化モードに決定されているものとする。そして、図2(a)では、CUに含まれる各PUに対して、その予測モードがHEVCにおけるコピーモードであるマージモード、又はHEVCにおける予測ベクトルモードであるAMVPに決定されている。この状態で、動画像符号化装置が、CTU内のCUをZスキャン順に、決定された符号化モード及び予測モードに従って符号化するとする。ここで、図2(a)において“対象”の文字で示されるサブブロックは、現在の符号化対象のサブブロックを表しており、また、その符号化モードは、インター符号化モード(例えば、マージモード又はAMVP)に決定されているものとする。この場合に、例えば、符号化対象のサブブロックに対して決定されている符号化モードで符号化した場合の符号量が、CUに対して正規化された閾値を超えており、その結果、符号化対象のサブブロックの符号化モードがIPCMに変更されるとする。この場合に、図2(b)に示すように、変更されたサブブロックの符号化モードに依存関係を有する周辺のサブブロック(例えば、PU)において、不整合が生じ得る。 FIG. 2 is a diagram illustrating an inconsistency that may occur when a sub-block to be encoded that has been determined to be in the inter encoding mode is changed to an IPCM or another intra encoding mode. FIG. 2A is a diagram exemplifying a state in which the moving image encoding apparatus collectively determines the encoding mode and the prediction mode for each of a plurality of sub-blocks in the CTU. In FIG. 2A, it is assumed that the coding mode of a plurality of sub-blocks (for example, CU) included in the CTU is determined as the inter coding mode or the intra coding mode. In FIG. 2A, for each PU included in the CU, the prediction mode is determined to be a merge mode that is a copy mode in HEVC or AMVP that is a prediction vector mode in HEVC. In this state, it is assumed that the moving image encoding apparatus encodes the CUs in the CTU in the Z scan order according to the determined encoding mode and prediction mode. Here, the sub-block indicated by the character “target” in FIG. 2A represents the current sub-block to be encoded, and the encoding mode is the inter encoding mode (for example, merge). Mode or AMVP). In this case, for example, the amount of code when encoding is performed in the encoding mode determined for the sub-block to be encoded exceeds a threshold normalized with respect to the CU. Assume that the encoding mode of the sub-block to be converted is changed to IPCM. In this case, as shown in FIG. 2B, inconsistency may occur in the neighboring sub-blocks (for example, PUs) having a dependency relationship with the coding mode of the changed sub-block.
図2(b)に示すように、図2(a)において“対象”の文字で示されるサブブロック(例えば、CU)が、イントラ符号化モードの予測モードの1つであるIPCMに変更されたとする。また、IPCMに変更されたサブブロックに隣接するサブブロック(例えば、PU)の予測モードが、HEVCにおける符号化済みの隣接サブブロックの動きベクトルをコピーするコピーモードであるマージモードであったとする。この場合に、符号化モードの変更に起因して動きベクトルの予測が変わってしまうことがある。例えば、HEVCにおけるマージモードでは、符号化済みの隣接ブロックの動きベクトルを用いて複数の動きベクトル候補を導出し、マージ候補リストを生成する。マージ候補リストでは、動きベクトルのコピー元となる参照先のサブブロックがmerge_idxというシンタックスで表されており、merge_idxは、HEVECの規格で定められた方法で周辺のサブブロックと関係づけられている。そして、マージモードでは、マージ候補リスト内から適した動きベクトル候補を選択し、その選択された動きベクトル候補を指定するmerge_idxを符号化して伝送する。また、受信側の動画像復号装置ではmerge_idxを基に動きベクトルを取得し、動画像の復号が行われる。 As shown in FIG. 2B, the sub-block (for example, CU) indicated by the characters “target” in FIG. 2A is changed to IPCM which is one of the prediction modes of the intra coding mode. To do. Also, it is assumed that the prediction mode of a subblock (for example, PU) adjacent to a subblock changed to IPCM is a merge mode that is a copy mode for copying a motion vector of an encoded adjacent subblock in HEVC. In this case, the motion vector prediction may change due to the change of the encoding mode. For example, in the merge mode in HEVC, a plurality of motion vector candidates are derived using motion vectors of encoded adjacent blocks, and a merge candidate list is generated. In the merge candidate list, a reference sub-block that is a copy source of a motion vector is represented by a syntax called merge_idx, and merge_idx is related to a surrounding sub-block by a method defined in the HEVEC standard. . In the merge mode, a suitable motion vector candidate is selected from the merge candidate list, and merge_idx designating the selected motion vector candidate is encoded and transmitted. In addition, the moving image decoding device on the receiving side acquires a motion vector based on merge_idx and decodes the moving image.
しかしながら、マージモードのサブブロック(例えば、PU)の周辺のサブブロック(例えば、CU)がIPCMに変更されると、マージ候補リストと周辺のサブブロックとの関係が変わり、即ち、merge_idxで示される動きベクトルが変わってしまう。そのため、図2(b)に示すように、IPCMに変更されたサブブロック(例えば、CU)に隣接するマージモードのサブブロック(例えば、PU)において、誤った動きベクトルが選択されてしまう。その結果、受信側の動画像復号装置で復号する際に画質の劣化等を引き起こしてしまうことがある。また、誤った動きベクトルが選択されたサブブロックの周辺のサブブロックもマージモードであった場合、更に誤った動きベクトルをコピーすることになり、誤りが伝搬してしまうことがある。 However, when the peripheral subblock (for example, CU) of the merge mode subblock (for example, PU) is changed to IPCM, the relationship between the merge candidate list and the peripheral subblock changes, that is, indicated by merge_idx. The motion vector changes. Therefore, as shown in FIG. 2B, an incorrect motion vector is selected in a merge mode sub-block (for example, PU) adjacent to the sub-block (for example, CU) changed to IPCM. As a result, image quality degradation or the like may occur when decoding is performed by the video decoding device on the receiving side. Further, if the sub-blocks around the sub-block for which the wrong motion vector is selected are also in the merge mode, the wrong motion vector is further copied, and the error may be propagated.
また、例えば、誤りが伝搬する範囲の全てのサブブロックのマージ候補リストを再計算することで、この問題に対処することも考えられるが、そのためには計算量を要する。更に、再計算をしたとしても、merge_idxが指示したサブブロックがIPCMに変更されていれば、元の動きベクトルが存在しない可能性もあり、結局、動き探索をやり直すことになり、リアルタイム性が確保されなくなる恐れがある。そのため、ブロック内の複数のサブブロックの符号化モードの決定後に、或るサブブロックをインター符号化モードから別の符号化モードへと変更した場合に、周辺のコピーモードのサブブロックに生じ得る不整合を解決する技術が望まれている。 Further, for example, it may be possible to cope with this problem by recalculating the merge candidate list of all the sub-blocks in the range in which the error propagates, but this requires a calculation amount. Furthermore, even if recalculation is performed, if the sub-block indicated by merge_idx has been changed to IPCM, the original motion vector may not exist. Eventually, the motion search is performed again, ensuring real-time performance. There is a risk of being lost. For this reason, if a certain sub-block is changed from the inter coding mode to another coding mode after the coding modes of a plurality of sub-blocks in the block are determined, this may occur in the sub-blocks in the neighboring copy mode. A technique for resolving the alignment is desired.
そこで、例えば、符号化対象のサブブロック(例えば、PU)がコピーモードであり、且つ、その周辺にインター符号化モードからイントラ符号化モードに変更されたサブブロック(例えば、CU)があったとする。この場合に、第1の実施形態では動画像符号化装置は、例えば、符号化対象のサブブロックの符号化モードを予測ベクトルモードに変更する。予測ベクトルモードでは、動きベクトルが明示的に符号化される。そのため、動画像符号化装置は、ブロック内の複数のサブブロックの符号化モードの決定後に、或るサブブロックにおいて符号化モードがIPCMに変更されたとしても、その変更に起因する不整合を解決することができる。従って、例えば、受信側の動画像復号装置において適切に動画像を復号することができる。以下、図3から図7を参照して、第1の実施形態を説明する。 Therefore, for example, it is assumed that the sub-block to be encoded (for example, PU) is in the copy mode, and there are sub-blocks (for example, CU) that have been changed from the inter encoding mode to the intra encoding mode in the vicinity. . In this case, in the first embodiment, the moving image encoding apparatus changes, for example, the encoding mode of the sub-block to be encoded to the prediction vector mode. In the prediction vector mode, the motion vector is explicitly encoded. Therefore, even if the coding mode is changed to IPCM in a certain sub-block after determining the coding mode of a plurality of sub-blocks in the block, the moving picture coding apparatus solves inconsistency caused by the change. can do. Therefore, for example, a moving image can be appropriately decoded in the moving image decoding device on the receiving side. Hereinafter, the first embodiment will be described with reference to FIGS. 3 to 7.
<第1の実施形態>
図3は、第1の実施形態に係る動画像符号化装置30の機能ブロック構成を例示する図である。動画像符号化装置30は、例えば、制御部300及び記憶部310を含んでいる。制御部300は、例えば、決定部301、及び変更部302を含んでいてよい。また、制御部300は、後述する図4に示す予測誤差信号生成部401、直交変換部402、量子化部403、エントロピー符号化部404、逆量子化部405、逆直交変換部406、及び復号画像生成部407などを含んでいてよい。更に、制御部300は、例えば、イントラ予測画像生成部409、インター予測画像生成部410、動きベクトル計算部411、符号化モード決定部412、及び予測画像選択部413などを含んでいてよい。制御部300は、コピーモード判定部414、インター符号化モード変更部415、隣接サブブロック判定部416、及び符号化モード変更判定部418などを含んでいてよい。動画像符号化装置30の制御部300は、一実施形態においては、例えば、記憶部310を利用して動画像符号化プログラムを読み出して実行することで、これらの機能部として動作してよい。また、図3に示す決定部301、及び変更部302は、例えば、図4に示す一部の機能ブロックと対応していてよい。動画像符号化装置30の記憶部310は、例えば、動画像符号化プログラム及び動画像データなどの情報を記憶していてよい。記憶部310は、例えば、後述する復号画像記憶部408及びイントラブロック位置記憶部417として機能してよい。制御部300に含まれる各機能部の詳細については後述する。
<First Embodiment>
FIG. 3 is a diagram illustrating a functional block configuration of the
図4は、第1の実施形態に係る動画像符号化装置30の制御部300の機能ブロックによって実行される動画像の符号化処理の流れを例示する図である。図4において、動画像符号化装置30の制御部300は、例えば、予測誤差信号生成部401、直交変換部402、量子化部403、エントロピー符号化部404、逆量子化部405、逆直交変換部406、及び復号画像生成部407を含んでいる。また、動画像符号化装置の制御部300は、例えば、イントラ予測画像生成部409、インター予測画像生成部410、動きベクトル計算部411、符号化モード決定部412、及び予測画像選択部413を含んでいる。更に、動画像符号化装置30の制御部300は、コピーモード判定部414、インター符号化モード変更部415、隣接サブブロック判定部416、符号化モード変更判定部418を含んでいる。また、記憶部310は、例えば、復号画像記憶部408、及びイントラブロック位置記憶部417として機能してよい。
FIG. 4 is a diagram illustrating a flow of a moving image encoding process executed by the functional block of the control unit 300 of the moving
予測誤差信号生成部401は、後述する符号化モード決定部412によって決定された符号化モードに従い、動画像データ内のピクチャに含まれる符号化対象の符号化ブロックを、複数のサブブロックへと分割する。なお、符号化ブロックは、例えば、HEVCにおけるCTUであってよい。また、サブブロックは、例えば、HEVCにおけるCU、PU、及びTUを含んでいてよい。予測誤差信号生成部401は、分割により得られた処理対象のサブブロックのデータと、予測画像選択部413から供給される予測画像のサブブロックのデータとを用いて、予測誤差信号を生成する。予測誤差信号生成部401は、生成された予測誤差信号を直交変換部402に渡す。
The prediction error
直交変換部402は、入力された予測誤差信号を直交変換する。直交変換部402は、予測誤差信号を直交変換することによって水平方向及び垂直方向の周波数成分に分離された信号を量子化部403に供給する。量子化部403は、直交変換部402の出力を量子化する。量子化部403は、量子化により信号を符号化することによって予測誤差信号の符号量を低減し、コピーモード判定部414及び逆量子化部405に供給する。
The
逆量子化部405は、量子化部403の出力を逆量子化してから逆直交変換部406に供給する。逆直交変換部406は、逆量子化部405の出力を逆直交変換処理してから復号画像生成部407に供給する。これら逆量子化部405及び逆直交変換部406によって復号化処理が行われることにより、符号化前の予測誤差信号と同程度の信号が得られる。
The
復号画像生成部407は、例えば、インター予測画像生成部410で動き補償されたピクチャのサブブロックのデータと、逆量子化部405、及び逆直交変換部406により復号処理された予測誤差信号とを加算する。それにより、復号画像生成部407は、符号化対象のピクチャの予測されるサブブロックのデータを再生し、復号画像記憶部408に渡す。
For example, the decoded
復号画像記憶部408は、渡された予測されるサブブロックのデータを新たな参照ピクチャのデータとして記憶する。復号画像記憶部408に記憶された新たな参照ピクチャのデータは、例えば、イントラ予測画像生成部409、インター予測画像生成部410及び動きベクトル計算部411で利用されてよい。
The decoded
イントラ予測画像生成部409は、同ピクチャ内の既に符号化された周辺の画素から予測画像を生成する。一方、インター予測画像生成部410は、復号画像記憶部408から得た参照ピクチャのデータを動きベクトル計算部411から提供される動きベクトルで動き補償することにより、動き補償された参照ピクチャのサブブロックのデータを生成する。
The intra-predicted
動きベクトル計算部411は、符号化対象のピクチャにおける符号化ブロック(例えば、HEVCにおけるCTU)のデータと、復号画像記憶部408から得られる既に符号化された参照ピクチャの符号化ブロックのデータを用いて、動きベクトルを求める。動きベクトルとは、例えば、ブロック単位で参照ピクチャから符号化対象のピクチャに最も類似している位置を探索するブロックマッチング技術(動きベクトル探索とも呼ばれる)を用いて求められるブロック単位の空間的なズレを示す値である。動きベクトル計算部411は、求めた動きベクトルをインター予測画像生成部410に渡す。
The motion
符号化モード決定部412は、符号化ブロックを複数のサブブロックに分割し、サブブロックの符号化モードと、符号化モードに属する予測モードとを決定する。符号化モードは、例えば、イントラ符号化モード及びインター符号化モードを含んでいてよい。そして、決定された符号化モード及び予測モードに応じてイントラ予測画像生成部409とインター予測画像生成部410から出力されたサブブロックのデータは、予測画像選択部413に入力される。予測画像選択部413は、どちらか一方の予測画像のサブブロックのデータを選択することができる。選択されたサブブロックのデータは、予測誤差信号生成部401に供給される。
The coding
また、符号化モード決定部412は、サブブロックの符号化モードの決定の際に、そのサブブロックの動きベクトルを決定する。この決定は、例えば、上述のように動きベクトル計算部411が動きベクトル探索を行うことで実行されてよい。そして、符号化モード決定部412が、処理対象の符号化ブロック内の全てのサブブロックの符号化モードを決定した後、各サブブロックに対して以下の処理が実行される。
Also, the encoding
まず、符号化対象の符号化ブロックに含まれる全てのサブブロックに対して決定された符号化モードと、符号化モードに応じた情報(例えば、予測モード、動きベクトル)とが符号化モード決定部412からコピーモード判定部414に入力される。また、コピーモード判定部414には、量子化部403で量子化された処理対象のサブブロックのデータも入力される。そして、コピーモード判定部414は、例えば、符号化モード決定部412から入力された符号化モードと予測モードの情報に基づいて、処理対象のサブブロックがインター符号化モードのコピーモードであるか否かを判定する。処理対象のサブブロックがコピーモードである場合、コピーモード判定部414は、例えば、処理対象のサブブロックの位置を示す情報を隣接サブブロック判定部416に出力する。また、コピーモード判定部414は、処理対象のサブブロックのデータをインター符号化モード変更部415に出力する。
First, an encoding mode determination unit includes an encoding mode determined for all sub-blocks included in an encoding target encoding block and information (for example, a prediction mode and a motion vector) according to the encoding mode. 412 is input to the copy
隣接サブブロック判定部416は、位置を示す情報が入力されたコピーモードのサブブロックと隣接するサブブロックに、符号化モードがIPCMに変更されたサブブロックが含まれるか否かを判定する。後述するように、イントラブロック位置記憶部417には、インター符号化モードからIPCMに変更されたサブブロックの位置の情報が記憶されている。隣接サブブロック判定部416は、イントラブロック位置記憶部417に記憶されているIPCMに変更されたサブブロックの位置の情報に基づいて、隣接するサブブロックにIPCMに変更されたサブブロックが含まれるか否かを判定してよい。処理対象のサブブロックと隣接するサブブロックにIPCMに変更されたサブブロックが含まれる場合、隣接サブブロック判定部416は、インター符号化モード変更部415に条件が合致したことを示す情報を出力する。
The adjacent
インター符号化モード変更部415は、処理対象のサブブロックがコピーモードであり、且つ、処理対象のサブブロックと隣接するサブブロックにIPCMに変更されたサブブロックが含まれているか否かを判定する。そして、処理対象のサブブロックがコピーモードであり、且つ、処理対象のサブブロックと隣接するサブブロックにIPCMに変更されたサブブロックが含まれている場合に、処理対象のサブブロックを予測ベクトルモードに変更する。なお、インター符号化モード変更部415は、例えば、隣接サブブロック判定部416から条件が合致したことを示す情報が入力されている場合に、処理対象のサブブロックを予測ベクトルモードに変更してよい。
The inter coding
変更する予測ベクトルモードで用いる動きベクトルには、後述する符号化モード変更判定部418によって符号化ブロック内のサブブロックの符号化モードが変更される前の処理対象のサブブロックのコピーモードにおけるコピー元の動きベクトルを設定してよい。上述のように、符号化モード決定部412は、符号化ブロック内の複数のサブブロックのそれぞれの符号化モードと、符号化モードに応じた情報(例えば、予測モード、動きベクトル)とを決定している。そして、後述する符号化モード変更判定部418は、符号化モード決定部412によって決定された符号化モードを変更する。そのため、インター符号化モード変更部415は、符号化モード決定部412が処理対象のサブブロックに対して決定したコピーモードにおけるコピー元の動きベクトルを、変更する予測ベクトルモードにおける動きベクトルとして設定してよい。なお、以降の説明では、この処理対象のサブブロックに対して決定されていたコピーモードにおけるコピー元の動きベクトルを、コピーベクトルと呼ぶことがある。
The motion vector used in the prediction vector mode to be changed includes a copy source in the copy mode of the sub-block to be processed before the encoding mode of the sub-block in the encoding block is changed by the encoding mode
また、このコピーベクトルは、例えば、予測誤差信号生成部401に入力された処理対象のサブブロックのデータがコピーモード判定部414へと入力されるまでの処理において、復号画像生成部407により復号画像記憶部408に記憶されてよい。そして、インター符号化モード変更部415は、復号画像記憶部408から処理対象のサブブロックに対して符号化モード決定部412が決定したコピーモードにおけるコピーベクトルを取得してよい。或いは、別の実施形態では、符号化モード決定部412は、処理対象のサブブロックの符号化モード、及び符号化モードに応じた情報(例えば、予測モード、動きベクトル)を決定する際に、決定した情報を例えば記憶部310に記憶してよい。そして、インター符号化モード変更部415は、記憶部310から、例えば、符号化モードに応じた情報に含まれる処理対象のサブブロックのコピーベクトルを取得してもよい。このように、予測ベクトルモードの動きベクトルには、符号化モード変更判定部418が符号化ブロック内のサブブロックの符号化モードの変更を実行する前に、処理対象のサブブロックに決定されていたコピーベクトルが設定されてよい。
Further, this copy vector is a decoded image generated by the decoded
また、インター符号化モード変更部415は、予測ベクトルモードで動きベクトルを符号化するために、選択情報(例えば、HEVCではシンタックスmvp_l0_flag及びmvp_l1_flag)により予測ベクトルを選択する。一実施形態においては、選択情報は予め決めた情報であってよい。例えば、選択情報は、予測ベクトルの導出のために生成される予測ベクトル候補リスト(例えば、HEVCにおけるmvpListLX(ここで、X=0 or 1))の計算が最も簡単となるmvp_lX_flag=0としてもよい。或いは、インター符号化モード変更部415は、予測ベクトル候補リスト(mvpListLX)を作成する処理を実行し、予測ベクトルと動きベクトルの差分ベクトルを符号化するコストが小さくなるように、mvp_lX_flagを選択してもよい。例えば、以上のように、符号化モードをコピーモードから予測ベクトルモードに変更した場合に動きベクトルと予測ベクトルとを設定することで、伝送先の動画像復号装置においてデータを適切に復号することが可能である。
Further, the inter coding
符号化モード変更判定部418は、処理対象のサブブロックの符号化モードを変更するか否かを判定する。なお、第1の実施形態では、符号化モード決定部412が、IPCM以外のイントラ符号化モードを用いるか、又はインター符号化モードを用いるかについての判定を完了している。そのため、第1の実施形態では、符号化モード変更判定部418は、符号化モードをIPCMに変更するか否かを判定してよい。上述のように、例えば、HEVCでは、IPCMの符号量を基に1CTUあたりの符号量に制限値が設けられており、1CTUあたりの制限値をサブブロック単位で正規化することで、サブブロック単位での符号量の制限を表す閾値を設定することができる。そして、符号化モード変更判定部418は、処理対象のサブブロックの符号量が設定されている閾値を超えているか否かを判定し、処理対象のサブブロックの符号量が閾値を超えている場合、処理対象のサブブロックの符号化モードをIPCMに変更してよい。また、符号化モード変更判定部418は、処理対象のサブブロックの符号化モードをIPCMに変更した場合、符号化モードをIPCMに変更したサブブロックの位置を示す情報を、イントラブロック位置記憶部417に出力する。そして、符号化モード変更判定部418は、処理を完了したサブブロックのデータを、エントロピー符号化部404に出力する。
The encoding mode
イントラブロック位置記憶部417は、符号化モード変更判定部418から入力されたIPCMに変更されたサブブロックの位置を示す情報を記憶する。イントラブロック位置記憶部417は、例えば、IPCMに変更されたサブブロックの位置をフラグを用いたビットマップなどで記憶してよい。
The intra block
エントロピー符号化部404は、符号化モード変更判定部418から入力されるサブブロックのデータにエントロピー符号化を行い、ストリームを出力する。なお、エントロピー符号化とは、シンボルの出現頻度に応じて可変長の符号を割り当てる方式(可変長符号化)であってよい。
The
続いて、以上で例示した機能ブロック構成により実行される第1の実施形態に係る動画像の符号化処理の動作フローを例示する。図5は、第1の実施形態に係る動画像の符号化処理の動作フローを例示する図である。図5の動画像の符号化処理の動作フローは、例えば、動画像符号化装置30において制御部300に動画像の符号化を指示する情報が入力されると開始してよい。
Subsequently, an operation flow of a moving image encoding process according to the first embodiment executed by the functional block configuration illustrated above will be exemplified. FIG. 5 is a diagram illustrating an operation flow of a moving image encoding process according to the first embodiment. The operation flow of the moving image encoding process in FIG. 5 may be started when, for example, information instructing encoding of a moving image is input to the control unit 300 in the moving
ステップ501(以降、ステップを“S”と記載し、例えば、S501と表記する)において、動画像符号化装置30の符号化モード決定部412は、動画像内のピクチャを複数の符号化ブロックに分割する。例えば、HVECでは、制御部300は、ピクチャを複数のCTUに分割してよい。続く、S502からS519までの処理は、分割された複数の符号化ブロックのそれぞれに対して実行される繰り返し処理である。
In step 501 (hereinafter, “step” is described as “S”, for example, expressed as S501), the encoding
S503において、符号化モード決定部412は、処理対象の符号化ブロックを更に複数のサブブロックへと分割する。例えば、HVECでは、符号化モード決定部412は、CTUを複数のCUに分割してよい。続く、S504からS506までの処理は、分割された複数のサブブロックのそれぞれに対して実行される繰り返し処理である。S505において符号化モード決定部412は、処理対象のサブブロックの符号化モードを決定する。
In S503, the encoding
符号化モードの決定は、符号化コストに基づいて行われてよく、例えば、画素差分絶対値和:SAD=Σ|OrgPixel-PredPixel|の比較によって判定が行われてよい。ここで、SADは、Sum of Absolute Differenceの略称である。また、OrgPixelは原画像のブロックに含まれる画素、PredPixelは、例えば、HEVC規格で求められる予測画像のブロックに含まれる画素であってよい。ただし、実施形態で用いられる符号化コストは、SADに限定されるものではなく、例えば、差分画素をアダマール変換した後の絶対値和SATDなどでもよい。なお、SATDは、Sum of Absolute Hadamard Transformed Differenceの略称である。 The determination of the encoding mode may be performed based on the encoding cost. For example, the determination may be performed by comparing the pixel difference absolute value sum: SAD = Σ | OrgPixel-PredPixel |. Here, SAD is an abbreviation for Sum of Absolute Difference. OrgPixel may be a pixel included in a block of an original image, and PredPixel may be a pixel included in a block of a predicted image determined by the HEVC standard, for example. However, the coding cost used in the embodiment is not limited to SAD, and may be, for example, an absolute value sum SATD after Hadamard transform of the difference pixel. SATD is an abbreviation for Sum of Absolute Hadamard Transformed Difference.
一例として、インター符号化のコストの場合、予測ベクトルモードであれば差分ベクトル:MVD=(予測ベクトル−動きベクトル)を符号化するための情報量をMVDCostとすると、全体のコストは、Cost=SAD + λ*MVDCostで表すことができる。ここで、λはSADとMVDCostのバランスを調整するスケーラーである。 As an example, in the case of the cost of inter coding, if the amount of information for coding the difference vector: MVD = (predicted vector-motion vector) is MVDCost in the prediction vector mode, the overall cost is Cost = SAD. + Can be expressed as λ * MVDCost. Here, λ is a scaler that adjusts the balance between SAD and MVDCost.
また、例えば、イントラ符号化のコストの場合、画面内予測モードに関する情報を符号化するコスト等のイントラ予測モードの符号化のためのコストをPRDCostとすると、全体のコストは、Cost=SAD + λ*PRDCostで表すことができる。ここで、λはSADとPRDCostのバランスを調整するスケーラーである。 Further, for example, in the case of the cost of intra coding, if the cost for coding in the intra prediction mode such as the cost for coding information on the intra prediction mode is PRDCost, the total cost is Cost = SAD + λ * It can be expressed as PRDCost. Here, λ is a scaler that adjusts the balance between SAD and PRDCost.
そして、符号化モード決定部412は、処理対象のサブブロックのイントラ符号化のコストと、インター符号化のコストとを比較し、コストの低い方を選択することで、符号化モードを決定してよい。また、インター符号化モードのコストの算出に用いる動きベクトルは、例えば、上述のように、動きベクトル計算部411がブロックマッチング技術(動きベクトル探索)を用いて決定してよい。また、動きベクトルは、CU内のPU単位で決定されてよい。なお、処理対象のサブブロックの符号化モードの決定において、MVDCost及びPRDCostは用いなくてもよく、例えば、符号化モードはSADの比較により決定されてもよい。
Then, the encoding
また、符号化モード決定部412は、S505において処理対象のサブブロックの予測モードを決定してよい。予測モードは、例えば、インター符号化モードであれば、予測ベクトルモードと、コピーモードとを含んでいてよい。予測ベクトルモードは、上述のように、例えば、符号化済みの周辺ブロックの動きベクトルを予測ベクトルとして、処理対象のサブブロックにおいて求められた動きベクトルとの差分ベクトルを符号化するモードであってよい。また、コピーモードは、符号化済みの周辺のサブブロックの動きベクトルをコピーするモードであってよい。符号化モード決定部412は、例えば、動きベクトル探索により求めた動きベクトルから予測した予測画像のブロックと処理対象のブロックとのSADを予測ベクトルモードのコストとして求めてよい。また、符号化モード決定部412は、符号化済みの周辺のサブブロックの動きベクトルから導出された動きベクトル候補のリスト(例えば、マージ候補リスト)を生成する。そして、符号化モード決定部412は、候補のうちから選択した動きベクトルを用いて予測した予測画像のブロックと処理対象のブロックとのSADをコピーモードのコストとして求めてよい。符号化モード決定部412は、予測ベクトルモードのコストと、コピーモードのコストを比較し、コストの低い方を選択することで、予測モードを決定してよい。なお、符号化モード決定部412は、コピーモードのコストの算出の際に、動きベクトル候補のリストのうちからコピーモードで用いる動きベクトルを指定するインデックスを決定してよい。また、予測モードは、CU内のPU単位で決定されてよい。
Also, the coding
S506において、S503で分割して得られた全てのサブブロックがS504〜S506において処理されていない場合、フローはS503へと戻り、制御部300は、次のサブブロックを処理対象として処理を繰り返す。一方、S506において、S503で分割して得られた全てのサブブロックに対してS504〜S506の処理が実行されている場合、フローはS507へと進む。 In S506, when all the subblocks obtained by dividing in S503 are not processed in S504 to S506, the flow returns to S503, and the control unit 300 repeats the process with the next subblock as a processing target. On the other hand, in S506, when the processes of S504 to S506 are executed for all the sub-blocks obtained by the division in S503, the flow proceeds to S507.
続く、S507からS518までの処理は、例えば、S503で分割された複数のサブブロック(例えば、CU)のそれぞれに対して実行される繰り返し処理である。また、S508からS513までの処理は、例えば、処理対象のサブブロック(例えばCU)内にある予測モードを決定する単位のサブブロック(例えば、PU)のそれぞれに対して実行される繰り返し処理である。S509においてコピーモード判定部414は、処理対象のサブブロック(例えば、PU)がコピーモードであるか否かを判定する。処理対象のサブブロックが、コピーモードではない場合(S509がNo)、フローはS510へと進む。一方、処理対象のサブブロックがコピーモードである場合(S509がYes)、フローはS511へと進む。
The subsequent processing from S507 to S518 is, for example, repetitive processing executed for each of a plurality of sub-blocks (for example, CU) divided in S503. Further, the processing from S508 to S513 is an iterative process that is executed for each sub-block (for example, PU) of a unit that determines the prediction mode in the processing-target sub-block (for example, CU), for example. . In step S509, the copy
S511において隣接サブブロック判定部416は、処理対象のサブブロックと隣接するサブブロックにインター符号化モードからIPCMに符号化モードが変更されたサブブロック(例えば、CU)があるか否かを判定する。なお、後述するS517で述べるように、或るサブブロックの符号化モードが、インター符号化モードからIPCMへと変更された場合、その変更されたサブブロックの位置についての情報がイントラブロック位置記憶部417に記憶される。そのため、隣接サブブロック判定部416は、イントラブロック位置記憶部417を参照して、処理対象のサブブロックと隣接するサブブロックにインター符号化モードからIPCMに変更されたサブブロックがあるか否かを判定してよい。処理対象のサブブロックと隣接するサブブロックにインター符号化モードからIPCMに変更されたサブブロックが無い場合(S511がNo)、フローはS513へと進む。一方、処理対象のサブブロックと隣接するサブブロックにインター符号化モードからIPCMに変更されたサブブロックがある場合(S511がYes)、フローはS512へと進む。
In S511, the adjacent
S512においてインター符号化モード変更部415は、処理対象のサブブロックの予測モードをコピーモードから予測ベクトルモードに変更する。なお、予測ベクトルモードで用いる動きベクトルは、後述するS516において符号化対象の符号化ブロック内のサブブロックの符号化モードが変更される前に決定されていた処理対象のサブブロックに対するコピーベクトルであってよい。例えば、このコピーベクトルは、予測誤差信号生成部401に入力された処理対象のサブブロックのデータがコピーモード判定部414へと入力されるまでの処理で、復号画像生成部407により復号画像記憶部408に記憶されてよい。そして、インター符号化モード変更部415は、S512において、復号画像記憶部408から処理対象のサブブロックに対して決定されたコピーモードにおけるコピーベクトルを取得してよい。或いは、別の実施形態では、S505において、符号化モード決定部412は、処理対象のサブブロックの符号化モード、及び符号化モードに応じた情報を決定する際に、決定した情報を例えば記憶部310に記憶してよい。そして、S512において、インター符号化モード変更部415は、記憶部310から、例えば、符号化モードに応じた情報に含まれる処理対象のサブブロックのコピーベクトルを取得してもよい。
In S512, the inter coding
続いて、S510において、インター符号化モード変更部415は、予測ベクトルを計算する。例えば、インター符号化モード変更部415は、動きベクトルを符号化するために、選択情報(例えば、HEVCではシンタックスmvp_l0_flag及びmvp_l1_flag)により予測ベクトルを選択してよい。一実施形態においては、選択情報は予め決めておいた所定の情報であってよい。例えば、選択情報は、予測ベクトルの導出のために生成される予測ベクトル候補リスト(例えば、HEVCにおけるmvpListLX(ここで、X=0 or 1))の計算が最も簡単となるmvp_lX_flag=0としてもよい。或いは、別の実施形態では、予測ベクトル候補リスト(mvpListLX)を作成する処理を実行し、予測ベクトルと動きベクトルとの差分ベクトルを符号化するコストが小さくなるように、mvp_lX_flagを選択してもよい。例えば、以上で述べたように動きベクトルと、予測ベクトルを選択する選択情報とを用いて符号化を行うことで、符号化モードをコピーモードから予測ベクトルモードに変更した場合にも、伝送先の動画像復号装置においてデータを適切に復号することができる。なお、S510において、例えば、処理対象のサブブロックがイントラ符号化モードやIPCMであれば、予測ベクトルの計算は実行しなくてよい。
Subsequently, in S510, the inter coding
S513において制御部300は、処理対象のサブブロック(例えばCU)内にある予測モードを決定する単位のサブブロック(例えば、PU)のそれぞれに対してS508〜S513までの繰り返し処理を実行しているか否かを判定する。S513において、予測モードを決定する単位のサブブロック(例えば、PU)のそれぞれに対してS508〜S513までの繰り返し処理を実行していない場合、フローはS508へと戻り、制御部300は、次のサブブロックに対して処理を繰り返す。一方、S513において、予測モードを決定する単位のサブブロック(例えば、PU)のそれぞれに対してS508〜S513までの繰り返し処理を実行している場合、フローはS514へと進む。 In S513, is the control unit 300 performing the repetition processing from S508 to S513 on each of the sub-blocks (for example, PUs) for determining the prediction mode in the processing target sub-block (for example, CU)? Determine whether or not. In S513, when the iterative process from S508 to S513 is not executed for each of the sub-blocks (for example, PUs) for determining the prediction mode, the flow returns to S508, and the control unit 300 Repeat the process for the sub-block. On the other hand, in S513, when the iterative process from S508 to S513 is executed for each of the sub-blocks (for example, PUs) for determining the prediction mode, the flow proceeds to S514.
S514において符号化モード変更判定部418は、処理対象のサブブロック(例えば、CU)の符号化モードをイントラ符号化モードに変更するか否かを判定する。なお、第1の実施形態では、S505において符号化モード決定部412が、処理対象のサブブロックの符号化にIPCM以外のイントラ符号化モードを用いるか、又はインター符号化モードを用いるかについては、判定を実行している。そのため、符号化モード変更判定部418は、S514において符号化モードをIPCMに変更するか否かを判定してよい。
In S514, the coding mode
また、この判定は、以下のように行われてよい。上述のように、例えば、HEVCでは、IPCMの符号量を基に1CTUあたりの符号量に制限値が設けられている。そして、1CTUあたりの制限値をサブブロック(例えば、CU)単位で正規化することで、サブブロック単位で符号量の制限を表す閾値を設定することができる。そのため、符号化モード変更判定部418は、S514において処理対象のサブブロックの符号量が、符号量の制限を表す閾値を超えているか否かを判定してよい。例えば、処理対象のサブブロックの符号量が閾値を超えていない場合、符号化モード変更判定部418はS514においてNoと判定し、フローはS515へと進む。一方、処理対象のサブブロックの符号量が閾値を超えている場合、符号化モード変更判定部418はS514においてYesと判定し、フローはS516へと進む。
Further, this determination may be performed as follows. As described above, for example, in HEVC, a limit value is provided for the code amount per CTU based on the code amount of IPCM. Then, by normalizing the limit value per CTU in units of sub-blocks (for example, CU), it is possible to set a threshold value indicating the code amount limit in units of sub-blocks. Therefore, the encoding mode
S516において、符号化モード変更判定部418は、処理対象のサブブロックの符号化モードをIPCMに変更する。また、S517において、符号化モード変更判定部418は、符号化モードをIPCMに変更したサブブロックの位置を示す情報を、イントラブロック位置記憶部417に記憶する。例えば、イントラブロック位置記憶部417は、IPCMに変更したサブブロックの位置をフラグを用いたビットマップなどで記憶してよい。続いて、S515において、エントロピー符号化部404は、符号化モード変更判定部418から入力される処理対象のサブブロックのデータにエントロピー符号化を実行し、ビットストリームを出力してよい。なお、エントロピー符号化とは、シンボルの出現頻度に応じて可変長の符号を割り当てる方式(可変長符号化)であってよい。
In S516, the encoding mode
S518において制御部300は、S503で分割して得られた複数のサブブロック(例えば、CU)のそれぞれに対してS507〜S518までの繰り返し処理を実行しているか否かを判定する。S518において、S503で分割して得られた複数のサブブロックのそれぞれに対してS507〜S518までの繰り返し処理を実行していない場合、フローはS507へと戻り、制御部300は、次のサブブロックを処理対象として処理を繰り返す。一方、S518において、S503で分割して得られた複数のサブブロックのそれぞれに対してS507〜S518までの繰り返し処理を実行している場合、フローはS519へと進む。 In S518, the control unit 300 determines whether or not iterative processing from S507 to S518 is being performed on each of a plurality of sub-blocks (for example, CUs) obtained by dividing in S503. In S518, when iterative processing from S507 to S518 is not executed for each of the plurality of subblocks obtained by dividing in S503, the flow returns to S507, and the control unit 300 determines that the next subblock The process is repeated for. On the other hand, in S518, when the iterative processing from S507 to S518 is executed for each of the plurality of sub-blocks obtained by dividing in S503, the flow proceeds to S519.
S519において制御部300は、S501で分割して得られた全ての符号化ブロックに対してS502〜S519までの繰り返し処理を実行しているか否かを判定する。未処理の符号化ブロックがある場合には、フローはS502へと戻る。一方、S501で分割して得られた全ての符号化ブロックに対してS502〜S519までの繰り返し処理を実行している場合には、本動作フローは終了する。 In S519, the control unit 300 determines whether or not the iterative processing from S502 to S519 has been executed for all the encoded blocks obtained by the division in S501. If there is an unprocessed encoded block, the flow returns to S502. On the other hand, when the iterative process from S502 to S519 is executed for all the encoded blocks obtained by the division in S501, the operation flow ends.
なお、以上の図5の動作フローにおいて、例えば、S504〜S506の処理は、制御部300に含まれる決定部301が実行してもよい。S509〜S512の処理は、制御部300に含まれる変更部302が実行してもよい。
In the operation flow of FIG. 5 described above, for example, the processing of S504 to S506 may be executed by the
図6は、以上で述べた、処理対象のサブブロックの符号化モードのIPCMへの変更と、それに伴う周辺サブブロックの予測ベクトルモードへの変更とを例示する図である。図6(a)において、図2(a)の処理対象のサブブロック(例えば、CU)がIPCMに変更されている。この場合に、図6(a)の斜線601で示すマージモードの隣接するサブブロック(例えば、PU)では、IPCMに変更されたサブブロックを、マージモードにおける動きベクトルのコピー元として参照する可能性がある。この場合に、上記の動作フローによれば、図6(b)に示すように、隣接するサブブロックはマージモードからAMVPモードに変更される。また、マージモードで用いる予定であったコピーベクトルが、AMVPモードで明示的に動きベクトルとして符号化される。そのため、第1の実施形態によれば、符号化ブロック内の或るサブブロックの符号化モードがインター符号化モードからIPCMに変更された場合に、隣接するコピーモードのサブブロックに生じるベクトルコピー関係の不整合を解決することができる。また、隣接するコピーモードのサブブロックにおいてベクトルコピー関係の不整合が解決されるため、隣接するコピーモードのサブブロックの周辺のコピーモードのサブブロックへと連鎖的に誤りが伝搬してしまうことも回避できる。
FIG. 6 is a diagram exemplifying the change to the IPCM of the coding mode of the sub-block to be processed and the change to the prediction vector mode of the surrounding sub-block accompanying the above-described change. 6A, the processing target sub-block (for example, CU) in FIG. 2A is changed to IPCM. In this case, in the adjacent subblock (for example, PU) in the merge mode indicated by the
また、上述の実施形態では、予測モードを予測ベクトルモードに変更する際に動きベクトルとして、符号化ブロック内のサブブロックがインター符号化モードからイントラ符号化モードに変更される前に決定されていたコピーベクトルを用いている。そのため、符号化する予測画像が変わらない。また、既に決定されていたコピーベクトルを動きベクトルとして用いているため、例えば、動き探索等をやり直さなくてもよく、演算量を抑えることができる。また更に、上記の実施形態では、サブブロックの予測モードがコピーモードから予測ベクトルモードに変更される場合に、S510において予測ベクトルが計算される。コピーモードから予測ベクトルモードに予測モードが変更される場合に、予測ベクトルモードで用いる動きベクトルを特定し、予測ベクトルを計算しているため、予測ベクトルモードに変更したサブブロックを伝送先の動画像復号装置において適切に復号できる。 Further, in the above-described embodiment, when the prediction mode is changed to the prediction vector mode, the motion vector is determined before the sub-block in the coding block is changed from the inter coding mode to the intra coding mode. A copy vector is used. Therefore, the predicted image to be encoded does not change. Further, since the copy vector that has already been determined is used as the motion vector, for example, it is not necessary to perform motion search again, and the amount of calculation can be suppressed. Furthermore, in the above embodiment, when the sub-block prediction mode is changed from the copy mode to the prediction vector mode, a prediction vector is calculated in S510. When the prediction mode is changed from the copy mode to the prediction vector mode, the motion vector used in the prediction vector mode is specified and the prediction vector is calculated. Decoding can be performed appropriately in the decoding device.
また、予測ベクトルの計算では、予測ベクトル候補を導出し、候補のうちから予測ベクトルが選択される。ここで、例えば、予測ベクトルを選択する選択情報として、予め決めた情報を用いることで、全ての予測ベクトル候補を導出しなくてもよく、予測ベクトルの決定にかかる演算量を削減することができる。 Moreover, in the calculation of a prediction vector, a prediction vector candidate is derived and a prediction vector is selected from the candidates. Here, for example, by using predetermined information as selection information for selecting a prediction vector, it is not necessary to derive all prediction vector candidates, and it is possible to reduce the amount of calculation for determining a prediction vector. .
或いは、別の実施形態では、S510において、予測ベクトル候補を導出し、候補のうちから、予測ベクトルと動きベクトルの差分ベクトルを符号化するコストが小さくなるように、予測ベクトルを選択してもよい。この様に予測ベクトルを選択することで、予測ベクトルモードにおける符号量を削減することができる。なお、予測ベクトルモードにおける予測ベクトルの導出の計算は、コピーモードにおけるコピーベクトルの導出の計算と比較して、演算量が少ない。そのため、例えば、符号化ブロック内の或るサブブロックの符号化モードがインター符号化モードからIPCMに変更された場合に、その周辺のコピーモードのサブブロックについて、コピーベクトルを再計算する場合と比較して、演算量を抑えることができる。 Alternatively, in another embodiment, a prediction vector candidate may be derived in S510, and the prediction vector may be selected so that the cost for encoding the difference vector between the prediction vector and the motion vector is reduced from among the candidates. . By selecting the prediction vector in this way, the code amount in the prediction vector mode can be reduced. Note that the calculation for deriving the prediction vector in the prediction vector mode has a smaller amount of calculation than the calculation for deriving the copy vector in the copy mode. Therefore, for example, when the coding mode of a certain sub-block in the coding block is changed from the inter coding mode to the IPCM, compared with the case where the copy vector is recalculated for the sub-blocks in the surrounding copy mode. Thus, the calculation amount can be suppressed.
なお、上述の実施形態では、S511において、処理対象のサブブロックと隣接するサブブロックにインター符号化モードからIPCMに変更されたサブブロックがあるか否かを判定する例を述べた。しかしながら、実施形態はこれに限定されるものではない。例えば、HEVCでは、コピーモードにおいて、処理対象のサブブロック(例えば、PU)に対する動きベクトル候補のリストを生成するために参照されるサブブロックが規定されている。図7は、HEVCにおいて、コピーモードで動きベクトル候補のリストを生成するために参照されるサブブロックを例示する図である。図7において、A0、A1、B0、B1、B2が動きベクトル候補のリストを生成するために参照されるサブブロックである。そのため、隣接サブブロック判定部416は、S511において、処理対象のサブブロックに隣接するサブブロックのうちで、コピーモードにおいて参照対象となる位置にあるブロックにIPCMに変更されたサブブロックがあるか否かを判定してよい。これにより、例えば、S512の処理においてコピーモードから予測ベクトルモードへと予測モードが変更される対象となるサブブロックを減らすことができるため、実施形態に係る処理の負荷を更に軽減することができる。
In the above-described embodiment, the example in which it is determined in S511 whether or not there is a sub-block that has been changed from the inter coding mode to the IPCM in a sub-block adjacent to the processing target sub-block. However, the embodiment is not limited to this. For example, in the HEVC, sub-blocks that are referred to in order to generate a motion vector candidate list for a processing target sub-block (for example, PU) are defined in the copy mode. FIG. 7 is a diagram illustrating sub-blocks that are referred to in HEVC for generating a motion vector candidate list in the copy mode. In FIG. 7, A0, A1, B0, B1, and B2 are sub-blocks that are referred to in order to generate a motion vector candidate list. Therefore, in S511, the adjacent
<第2の実施形態>
第1の実施形態では、符号化ブロック内の複数のサブブロックのそれぞれの符号化モードが、インター符号化モード又はイントラ符号化モードに決定され、その後に、符号化モードがIPCMに変更される場合の例を述べた。しかしながら、実施形態はこれに限定されるものではない。例えば、動画像符号化装置30は、まず、処理対象の符号化ブロック内の全てのサブブロックの符号化モードをインター符号化モードとして、インター符号化モードにおける予測モードと動きベクトルとを決定する。その後、動画像符号化装置30は、例えば、インター符号化モードにおける画素差分絶対値和と、イントラ符号化モードにおける画素差分絶対値和との比較に基づいて、インター符号化モードからイントラ符号化モードに変更するか否かを判定してもよい。そして、この様な場合にも、インター符号化モードからイントラ符号化モードに変更されたサブブロックの周辺にコピーモードのサブブロックが存在する場合、符号化モードの変更に起因してコピーモードでコピーされる動きベクトルが変わってしまうことがある。
<Second Embodiment>
In the first embodiment, the encoding mode of each of the plurality of sub-blocks in the encoding block is determined to be the inter encoding mode or the intra encoding mode, and then the encoding mode is changed to IPCM. An example of. However, the embodiment is not limited to this. For example, the moving
そこで、第2の実施形態では動画像符号化装置30は、イントラ符号化モードに変更されたサブブロックの周辺にコピーモードのサブブロックが存在する場合、そのコピーモードのサブブロックを予測ベクトルモードに変更する。以下、第2の実施形態について説明する。
Therefore, in the second embodiment, when there is a copy mode sub-block around the sub-block changed to the intra coding mode, the
なお、第2の実施形態においても、動画像符号化装置30は、例えば、図3、及び図4に示す機能ブロック構成を有していてよい。しかしながら、第2の実施形態では、例えば、機能ブロック構成は、第1の実施形態とは異なる動作をしてもよい。
Note that, also in the second embodiment, the
例えば、第2の実施形態においては、符号化モード決定部412は、処理対象の符号化ブロック内の全てのサブブロックをインター符号化モードとして、各サブブロックの動きベクトルと予測モードとを決定する。なお、この様に、符号化対象の符号化ブロック内の全てのサブブロックをインター符号化モードとして、各サブブロックの動きベクトルと予測モードとを決定する場合、これらの処理を並列処理することが可能である。そして、例えば、動きベクトルと予測モードとの決定を並列処理で実行することは、リアルタイム性の確保に有用である。
For example, in the second embodiment, the encoding
また、符号化モード変更判定部418は、処理対象のサブブロックをインター符号化モードからイントラ符号化モードに変更するか否かを判定する。この判定は、符号化コストに基づいて行われてよく、例えば、画素差分絶対値和:SAD=Σ|OrgPixel-PredPixel|の比較によって判定が行われてよい。ただし、実施形態で用いられる符号化コストは、SADに限定されるものではなく、例えば、差分画素をアダマール変換した後の絶対値和SATDなどでもよい。そして、例えば、符号化モード変更判定部418は、処理対象のサブブロックのイントラ符号化のコストと、インター符号化のコストとを比較し、イントラ符号化のコストの方が低い場合に、符号化モードをイントラ符号化モードに変更してよい。
Also, the coding mode
また更に、符号化モード変更判定部418は、第1の実施形態と同様に、符号化モードをイントラ符号化モードの一つであるIPCMに変更するか否かを判定してよい。この判定は、上述のように、サブブロック(例えば、CU)単位で正規化された閾値を用いて実行されてよい。
Furthermore, the encoding mode
イントラブロック位置記憶部417は、符号化モード変更判定部418により、処理対象のサブブロックがイントラ符号化モード(IPCMを含む)に変更された場合、そのサブブロックの位置を示す情報を記憶してよい。
The intra block
コピーモード判定部414は、処理対象のサブブロックの符号化モードがコピーモードであるか否かを判定する。処理対象のサブブロックの符号化モードがコピーモードである場合、コピーモード判定部414は、隣接サブブロック判定部416に、コピーモードと判定されたサブブロックの位置を示す情報を入力する。隣接サブブロック判定部416は、位置を示す情報が入力されたコピーモードのサブブロックと隣接するサブブロックにイントラ符号化モード(IPCMを含む)に変更されたサブブロックが含まれるか否かを判定する。この判定は、例えば、イントラブロック位置記憶部417に記憶されているイントラ符号化モード(IPCMを含む)に変更されたサブブロックの位置を示す情報に基づいて実行されてよい。
The copy
インター符号化モード変更部415は、処理対処のサブブロックがコピーモードであって、隣接するサブブロックにイントラ符号化モード(IPCMを含む)に変更されたサブブロックが含まれている場合、処理対処のサブブロックを予測ベクトルモードに変更する。また、インター符号化モード変更部415は、例えば、隣接するサブブロックがイントラ符号化モードに変更される前に、処理対象のサブブロックに対してコピーモードで決定されていたコピーベクトルを、予測ベクトルモードでの動きベクトルとして用いる。例えば、予測ベクトルモードで用いる動きベクトルには、符号化モード決定部412が、全てのサブブロックをインター符号化モードとして符号化モードを決定した際に、処理対象のサブブロックに対して決定したコピーベクトルを用いてよい。
The inter coding
続いて、以上で例示した機能ブロック構成が実行する第2の実施形態に係る動画像の符号化処理の動作フローを例示する。図8は、第2の実施形態に係る動画像の符号化処理の動作フローを例示する図である。図8の動画像の符号化処理の動作フローは、例えば、動画像符号化装置30において制御部300に動画像の符号化を指示する情報が入力されると開始してよい。
Subsequently, an operation flow of a moving image encoding process according to the second embodiment executed by the functional block configuration exemplified above will be exemplified. FIG. 8 is a diagram illustrating an operation flow of a moving image encoding process according to the second embodiment. The operation flow of the moving image encoding process in FIG. 8 may be started when, for example, information instructing encoding of a moving image is input to the control unit 300 in the moving
なお、図8の動作フローは、第1の実施形態における図5の動作フローと対応する動作フローである。例えば、S801〜S804、S806〜S810、S813、S815、S818、S819の処理では、図5のS501〜S504、S506〜S510、S513、S515、S518、S519の処理とそれぞれ同様の処理が実行されてよい。しかしながら、例えば、以下の処理では、図5と異なる処理が実行されてよい。 The operation flow in FIG. 8 is an operation flow corresponding to the operation flow in FIG. 5 in the first embodiment. For example, in the processes of S801 to S804, S806 to S810, S813, S815, S818, and S819, the same processes as the processes of S501 to S504, S506 to S510, S513, S515, S518, and S519 in FIG. Good. However, for example, in the following processing, processing different from that in FIG. 5 may be executed.
S805において、符号化モード決定部412は、符号化ブロック内に含まれる全てのサブブロックの符号化モードをインター符号化モードとして、処理対象のサブブロックに対する動きベクトルと、予測モードを決定する。
In S805, the coding
S811において、隣接サブブロック判定部416は、処理対象のサブブロック(例えば、PU)と隣接するサブブロック(例えば、CU)にインター符号化モードからイントラ符号化モード(IPCMを含む)へと変更されたサブブロックがあるかを判定してよい。なお、後述するS817で述べるように、或るサブブロックの符号化モードが、インター符号化モードからイントラ符号化モード(IPCMを含む)へと変更された場合、その変更されたサブブロックの位置の情報がイントラブロック位置記憶部417に記憶される。そのため、隣接サブブロック判定部416は、イントラブロック位置記憶部417を参照して、隣接するサブブロックにインター符号化モードからイントラ符号化モード(IPCMを含む)へと変更されたサブブロックがあるか否かを判定してよい。処理対象のサブブロックと隣接するサブブロックにインター符号化モードからイントラ符号化モード(IPCMを含む)へと変更されたサブブロックが無い場合(S811がNo)、フローはS813へと進む。一方、処理対象のサブブロックと隣接するサブブロックにインター符号化モードからイントラ符号化モード(IPCMを含む)へと変更されたサブブロックがある場合(S811がYes)、フローはS812へと進む。そして、S812において、インター符号化モード変更部415は、処理対象のサブブロック(例えば、PU)の予測モードをコピーモードから予測ベクトルモードに変更する。
In S811, the adjacent
また、S814において符号化モード変更判定部418は、処理対象のサブブロック(例えば、CU)の符号化モードをイントラ符号化モードに変更するか否かを判定する。なお、第2の実施形態では、上述のように、S805において、符号化対象の符号化ブロック内の全てのサブブロックをインター符号化モードとして処理を行っている。そのため、符号化モード変更判定部418は、S814において、符号化モードをイントラ符号化モードに変更するか否かを判定してよい。
In S814, the coding mode
この判定は、符号化コストに基づいて行われてよく、例えば、画素差分絶対値和:SAD=Σ|OrgPixel-PredPixel|の比較によって判定が行われてよい。ただし、実施形態で用いられる符号化コストは、SADに限定されるものではなく、例えば、差分画素をアダマール変換した後の絶対値和SATDなどでもよい。そして、例えば、符号化モード変更判定部418は、処理対象のサブブロックのイントラ符号化のコストと、インター符号化のコストとを比較し、イントラ符号化のコストの方が低い場合に、符号化モードをイントラ符号化モードに変更してよい。
This determination may be performed based on the coding cost. For example, the determination may be performed by comparing the pixel difference absolute value sum: SAD = Σ | OrgPixel−PredPixel |. However, the coding cost used in the embodiment is not limited to SAD, and may be, for example, an absolute value sum SATD after Hadamard transform of the difference pixel. For example, the coding mode
また更に、S814において符号化モード変更判定部418は、第1の実施形態と同様に、符号化モードをイントラ符号化モードの一つであるIPCMに変更するか否かを判定してよい。この判定は、上述のように、サブブロック(例えば、CU)単位で正規化された閾値を用いて実行されてよい。
Furthermore, in S814, the coding mode
S814においてインター符号化モードをイントラ符号化モード(IPCMを含む)に変更しない場合(S814がNo)、フローはS815へと進む。一方、インター符号化モードをイントラ符号化モード(IPCMを含む)に変更する場合(S814がYes)、フローはS816へと進む。S816において、符号化モード変更判定部418は、符号化モードをイントラ符号化モード(IPCMを含む)に変更する。S817において、符号化モード変更判定部418は、符号化モードをイントラ符号化モード(IPCMを含む)に変更したサブブロックの位置を示す情報を、イントラブロック位置記憶部417に記憶する。
If the inter coding mode is not changed to the intra coding mode (including IPCM) in S814 (No in S814), the flow proceeds to S815. On the other hand, when the inter coding mode is changed to the intra coding mode (including IPCM) (Yes in S814), the flow proceeds to S816. In S816, the coding mode
なお、図8の動作フローにおいて、例えば、S804〜S806の処理は、制御部300に含まれる決定部301が実行してもよい。また、S809〜S812の処理は、制御部300に含まれる変更部302が実行してもよい。
In the operation flow of FIG. 8, for example, the processing of S804 to S806 may be executed by the
以上で述べたように、第2の実施形態では、処理対象の符号化ブロック内の全てのサブブロックの符号化モードをインター符号化モードとして、インター符号化モードにおける予測モードと動きベクトルとを決定している。そして、その後に、或るサブブロック(例えば、CU)の符号化モードをイントラ符号化モード(IPCMを含む)に変更する場合、そのサブブロックと隣接するコピーモードのサブブロック(例えば、PU)を予測ベクトルモードに変更している。従って、第2の実施形態は第1の実施形態が奏する効果を有する。また、第2の実施形態によれば、符号化モードの決定後に、或るサブブロックをインター符号化モードからイントラ符号化モードに変更する場合にも、そのサブブロックの周辺のコピーモードのサブブロックに生じるベクトルコピー関係の不整合を解決できる。 As described above, in the second embodiment, the prediction mode and the motion vector in the inter coding mode are determined with the coding mode of all the sub-blocks in the coding block to be processed as the inter coding mode. doing. After that, when the coding mode of a certain subblock (for example, CU) is changed to the intra coding mode (including IPCM), the subblock (for example, PU) in the copy mode adjacent to the subblock is changed. The prediction vector mode has been changed. Therefore, the second embodiment has the effect of the first embodiment. Further, according to the second embodiment, even when a certain sub-block is changed from the inter-coding mode to the intra-coding mode after the coding mode is determined, the sub-blocks in the copy mode around the sub-block Inconsistency in the vector copy relationship that occurs in
以上においていくつかの実施形態を例示したが、実施形態は上述の実施形態に限定されるものではない。例えば、上記の例では、HEVCによる動画像符号化を例として説明したが、実施形態はこれに限定されるものではない。例えば、H.264、及びMPEG−2などの他の動画像符号化方式でも、或るブロック内の複数のサブブロック(例えばマクロブロック)の符号化モードを一括して決定し、その後に符号化モードの変更が行われる場合、同様に実施形態を適用することができる。 Although several embodiments have been exemplified above, the embodiments are not limited to the above-described embodiments. For example, in the above example, the moving image coding by HEVC has been described as an example, but the embodiment is not limited to this. For example, H.M. In other moving image coding systems such as H.264 and MPEG-2, a coding mode of a plurality of sub-blocks (for example, a macro block) in a certain block is determined in a lump, and then the coding mode is changed. If so, embodiments can be applied as well.
また、例えば、図5及び図8の動作フローは例示であり、実施形態はこれに限定されるものではない。例えば、図5及び図8の動作フローは、可能な場合には、処理の順番が変更されてもよく、別に更なる処理を含んでいてもよく、又は、一部の処理が省略されてもよい。 Further, for example, the operation flows of FIGS. 5 and 8 are examples, and the embodiment is not limited to this. For example, in the operation flows of FIGS. 5 and 8, the order of processing may be changed, if possible, may include additional processing, or some processing may be omitted. Good.
また、一実施形態に係る動画像符号化装置30は、ハードウェア回路として実装することもでき、例えば、図9に示すような情報処理装置(コンピュータ)900を用いて実現することもできる。
Further, the moving
図9の情報処理装置900は、プロセッサ901、メモリ902、入力装置903、出力装置904、記憶装置905、媒体駆動装置906、及びネットワーク接続装置907を含み、これらの構成要素はバス909により互いに接続されている。
9 includes a
メモリ902は、例えば、Read Only Memory(ROM)、Random Access Memory(RAM)、フラッシュメモリ等の半導体メモリである。メモリ902は、動画像符号化処理に用いられる動画像符号化プログラム及び例えば動画像データなどのデータを格納する。図3の記憶部310、並びに図4の復号画像記憶部408、及びイントラブロック位置記憶部417は、例えば、メモリ902であってよい。
The
プロセッサ901は、例えば、Central Processing Unit(CPU)であってよい。また、図3の制御部300は、例えば、プロセッサ901であってよい。プロセッサ901は、メモリ902を利用して動画像符号化プログラムを実行することにより、例えば、図3の決定部301、及び変更部302として動作してよい。また、プロセッサ901は、例えば、図4の予測誤差信号生成部401、直交変換部402、量子化部403、エントロピー符号化部404、逆量子化部405、逆直交変換部406、及び復号画像生成部407として動作してよい。プロセッサ901は、例えば、イントラ予測画像生成部409、インター予測画像生成部410、動きベクトル計算部411、符号化モード決定部412、及び予測画像選択部413として動作してよい。プロセッサ901は、コピーモード判定部414、インター符号化モード変更部415、隣接サブブロック判定部416、及び符号化モード変更判定部418として動作してよい。
The
入力装置903は、例えば、キーボード、ポインティングデバイス等であり、ユーザ又はオペレータからの指示や情報の入力に用いられる。出力装置904は、例えば、表示装置、プリンタ、スピーカ等であり、ユーザ又はオペレータへの問い合わせや処理結果の出力に用いられる。
The
記憶装置905は、例えば、磁気ディスク装置、光ディスク装置、光磁気ディスク装置、テープ装置等である。記憶装置905は、ハードディスクドライブであってもよい。情報処理装置900は、記憶装置905に動画像符号化プログラム及び例えば動画像データなどのデータを格納しておき、それらをメモリ902にロードして使用することができる。
The
媒体駆動装置906は、可搬型記録媒体910を駆動し、その記録内容にアクセスする。可搬型記録媒体910は、メモリデバイス、フレキシブルディスク、光ディスク、光磁気ディスク等である。可搬型記録媒体910は、Compact Disk Read Only Memory(CD−ROM)、Digital Versatile Disk(DVD)、又はUniversal Serial Bus(USB)メモリであってもよい。ユーザ又はオペレータは、この可搬型記録媒体910に動画像符号化プログラム及び例えば動画像データなどのデータを格納しておき、それらをメモリ902にロードして使用することができる。
The
このように、動画像符号化プログラム及び例えば動画像データなどのデータを格納するコンピュータ読み取り可能な記録媒体は、メモリ902、記憶装置905、又は可搬型記録媒体910のような、物理的な(非一時的な)記録媒体である。
As described above, a computer-readable recording medium that stores a moving image encoding program and data such as moving image data is a physical (non-storage medium) such as the
ネットワーク接続装置907は、Local Area Network(LAN)、インターネット等の通信ネットワークに接続され、通信に伴うデータ変換を行う通信インタフェースである。ネットワーク接続装置907は、動画像復号装置に対して符号化ストリームを出力する出力インタフェースとして用いることもできる。情報処理装置900は、動画像符号化プログラム及び例えば動画像データなどのデータを外部の装置からネットワーク接続装置907を介して受信し、それらをメモリ902にロードして使用することもできる。
The
なお、図9に示す情報処理装置900のハードウェア構成は例示であり、実施形態はこれに限定されるものではない。例えば、情報処理装置900は、用途や条件に応じて一部の構成要素が省略されていてもよい。例えば、ユーザ又はオペレータとのインタフェースが利用されない場合は、入力装置903及び出力装置904を省略してもよい。また、情報処理装置900が可搬型記録媒体910にアクセスしない場合は、媒体駆動装置906を省略してもよい。
The hardware configuration of the
また、例えば、別の実施形態では、上述の動画像符号化装置30の制御部300の一部又は全部の機能はFPGA及びSoCなどによるハードウェアとして実装されてもよい。なお、FPGAは、Field Programmable Gate Arrayの略称である。SoCは、System-on-a-chipの略称である。また更に、上述の動作フローに含まれる処理は可能な場合には、一部の処理が並列処理で実行されてもよく、例えば、一部の処理を別のプロセッサに実行させてもよい。並列処理で実行することで、動画像符号化処理のリアルタイム性を確保することができる。
Further, for example, in another embodiment, a part or all of the functions of the control unit 300 of the above-described
上述の実施形態を含むいくつかの実施形態は、上述の実施形態の各種変形形態及び代替形態を包含するものとして当業者には理解される。例えば、各種実施形態は、構成要素を変形して具体化されてよい。また、上述した実施形態に開示されている複数の構成要素を適宜組み合わせることにより、種々の実施形態が実施されてよい。更には、実施形態に示される全構成要素からいくつかの構成要素を削除して又は置換して、或いは実施形態に示される構成要素にいくつかの構成要素を追加して種々の実施形態が実施されてよい。 Several embodiments, including those described above, will be understood by those skilled in the art as encompassing various variations and alternatives of the embodiments described above. For example, various embodiments may be embodied by modifying components. Various embodiments may be implemented by appropriately combining a plurality of components disclosed in the above-described embodiments. Further, various embodiments may be implemented by deleting or replacing some components from all the components shown in the embodiments, or adding some components to the components shown in the embodiments. May be.
30 動画像符号化装置
300 制御部
301 決定部
302 変更部
310 記憶部
401 予測誤差信号生成部
402 直交変換部
403 量子化部
404 エントロピー符号化部
405 逆量子化部
406 逆直交変換部
407 復号画像生成部
408 復号画像記憶部
409 イントラ予測画像生成部
410 インター予測画像生成部
411 動きベクトル計算部
412 符号化モード決定部
413 予測画像選択部
414 コピーモード判定部
415 インター符号化モード変更部
416 隣接サブブロック判定部
417 イントラブロック位置記憶部
418 符号化モード変更判定部
900 情報処理装置
901 プロセッサ
902 メモリ
903 入力装置
904 出力装置
905 記憶装置
906 媒体駆動装置
907 ネットワーク接続装置
909 バス
910 可搬型記録媒体
30 moving image coding apparatus 300
Claims (7)
前記決定部により前記複数のブロックのうち第1のブロックの符号化モードがインター符号化モードに決定された後に、前記第1のブロックの符号化モードがイントラ符号化モードに変更され、前記複数のブロックのうち前記第1のブロックに隣接する第2のブロックの予測モードが、隣接ブロックの動きベクトルをコピーするコピーモードに決定されている場合、前記第2のブロックの予測モードを前記コピーモードから、動きベクトルと予測ベクトルとの差分ベクトルを符号化する予測ベクトルモードに変更する変更部と、
を含む、動画像符号化装置。 Determining a coding mode to be applied to each of a plurality of blocks in the image, and determining a prediction mode to be applied to each of the plurality of blocks;
After the determining unit determines that the encoding mode of the first block among the plurality of blocks is the inter encoding mode, the encoding mode of the first block is changed to the intra encoding mode, and the plurality of blocks When the prediction mode of the second block adjacent to the first block among the blocks is determined to be the copy mode for copying the motion vector of the adjacent block, the prediction mode of the second block is changed from the copy mode. A changing unit for changing to a prediction vector mode for encoding a difference vector between a motion vector and a prediction vector;
A moving picture encoding apparatus.
前記複数のブロックのうち第1のブロックの符号化モードがインター符号化モードに決定された後に、前記第1のブロックの符号化モードがイントラ符号化モードに変更され、前記複数のブロックのうち前記第1のブロックに隣接する第2のブロックの予測モードが、隣接ブロックの動きベクトルをコピーするコピーモードに決定されている場合、前記第2のブロックの予測モードを前記コピーモードから、動きベクトルと予測ベクトルとの差分ベクトルを符号化する予測ベクトルモードに変更する工程と、
を含む、コンピュータが実行する動画像符号化方法。 Determining a coding mode applied to each of a plurality of blocks in the image, and determining a prediction mode applied to each of the plurality of blocks;
After the coding mode of the first block among the plurality of blocks is determined to be the inter coding mode, the coding mode of the first block is changed to the intra coding mode, When the prediction mode of the second block adjacent to the first block is determined as the copy mode for copying the motion vector of the adjacent block, the prediction mode of the second block is changed from the copy mode to the motion vector. Changing to a prediction vector mode for encoding a difference vector with a prediction vector;
A moving picture encoding method executed by a computer.
前記複数のブロックのうち第1のブロックの符号化モードがインター符号化モードに決定された後に、前記第1のブロックの符号化モードがイントラ符号化モードに変更され、前記複数のブロックのうち前記第1のブロックに隣接する第2のブロックの予測モードが、隣接ブロックの動きベクトルをコピーするコピーモードに決定されている場合、前記第2のブロックの予測モードを前記コピーモードから、動きベクトルと予測ベクトルとの差分ベクトルを符号化する予測ベクトルモードに変更する、
処理をコンピュータに実行させる動画像符号化プログラム。 Determining a coding mode applied to each of the plurality of blocks in the image, and determining a prediction mode applied to each of the plurality of blocks;
After the coding mode of the first block among the plurality of blocks is determined to be the inter coding mode, the coding mode of the first block is changed to the intra coding mode, When the prediction mode of the second block adjacent to the first block is determined as the copy mode for copying the motion vector of the adjacent block, the prediction mode of the second block is changed from the copy mode to the motion vector. Change to the prediction vector mode that encodes the difference vector with the prediction vector,
A moving image encoding program for causing a computer to execute processing.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015067601A JP2016187171A (en) | 2015-03-27 | 2015-03-27 | Video encoding device, video encoding method, and video encoding program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015067601A JP2016187171A (en) | 2015-03-27 | 2015-03-27 | Video encoding device, video encoding method, and video encoding program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2016187171A true JP2016187171A (en) | 2016-10-27 |
Family
ID=57202665
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2015067601A Pending JP2016187171A (en) | 2015-03-27 | 2015-03-27 | Video encoding device, video encoding method, and video encoding program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2016187171A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112839224A (en) * | 2019-11-22 | 2021-05-25 | 腾讯科技(深圳)有限公司 | Prediction mode selection method and device, video coding equipment and storage medium |
WO2022108417A1 (en) * | 2020-11-23 | 2022-05-27 | 현대자동차주식회사 | Image encoding and decoding method and apparatus using sub-block unit intra prediction |
-
2015
- 2015-03-27 JP JP2015067601A patent/JP2016187171A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112839224A (en) * | 2019-11-22 | 2021-05-25 | 腾讯科技(深圳)有限公司 | Prediction mode selection method and device, video coding equipment and storage medium |
WO2022108417A1 (en) * | 2020-11-23 | 2022-05-27 | 현대자동차주식회사 | Image encoding and decoding method and apparatus using sub-block unit intra prediction |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6272948B2 (en) | Decoding method of motion information | |
JP7271768B2 (en) | Candidate list sharing method and apparatus using such method | |
US10856006B2 (en) | Method and system using overlapped search space for bi-predictive motion vector refinement | |
JP6404487B2 (en) | Image prediction method and related apparatus | |
KR102051197B1 (en) | Palette Coding Method with Inter Prediction in Video Coding | |
JP5277257B2 (en) | Video decoding method and video encoding method | |
RU2603541C2 (en) | Method and device for video encoding and method and device for video decoding | |
JP5367098B2 (en) | Motion vector predictive coding method, motion vector predictive decoding method, moving picture coding apparatus, moving picture decoding apparatus, and programs thereof | |
JP5367097B2 (en) | Motion vector predictive coding method, motion vector predictive decoding method, moving picture coding apparatus, moving picture decoding apparatus, and programs thereof | |
JP2015195575A (en) | Moving picture encoding device and method | |
JP6962193B2 (en) | A recording medium that stores a moving image coding device, a moving image coding method, and a moving image coding program. | |
JP2014143650A (en) | Moving image encoder, moving image encoding method, moving image decoder and moving image decoding method | |
JP2016187171A (en) | Video encoding device, video encoding method, and video encoding program | |
US9313492B2 (en) | Device and method for moving image encoding | |
WO2019150411A1 (en) | Video encoding device, video encoding method, video decoding device, and video decoding method, and video encoding system | |
JP2015111774A (en) | Video coding device and video coding program | |
JP2016187134A (en) | Prediction mode determination method and prediction mode determination program | |
JP2004165785A (en) | Image coding method, image decoding method, image coder, image decoder, image coding program, image decoding program and recording medium with the programs | |
US20230388484A1 (en) | Method and apparatus for asymmetric blending of predictions of partitioned pictures | |
JP6438376B2 (en) | Video encoding apparatus, video decoding apparatus, video encoding method, video decoding method, video encoding program, and video decoding program | |
JP6323185B2 (en) | Moving picture coding apparatus, moving picture coding method, and moving picture coding computer program | |
JP2020025308A (en) | Image encoding method and image decoding method |