JP2016187171A - Video encoding device, video encoding method, and video encoding program - Google Patents

Video encoding device, video encoding method, and video encoding program Download PDF

Info

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
Application number
JP2015067601A
Other languages
Japanese (ja)
Inventor
三好 秀誠
Hidemasa Miyoshi
秀誠 三好
康之 村田
Yasuyuki Murata
康之 村田
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 JP2015067601A priority Critical patent/JP2016187171A/en
Publication of JP2016187171A publication Critical patent/JP2016187171A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

PROBLEM TO BE SOLVED: To settle the mismatch of vector copy relationship occurring in the subblock of peripheral copy mode, when changing the coding mode of some subblock from inter coding mode to intra coding mode, after determination of the coding mode.SOLUTION: A video encoding device includes a determination unit and a change unit. The determination unit determines the coding mode applied, respectively, to a plurality of blocks in an image, and determines a prediction mode to be applied. When the coding mode of the first block is changed to the intra-coding mode, the prediction mode of the second block adjacent to the first block has been determined to a copy mode for copying the motion vector of an adjacent block, after the coding mode of the first block, out of a plurality blocks, is determined to the inter coding mode by the determination unit, the change unit changes the prediction mode of the second block to a prediction vector mode for encoding the difference of the motion vector and prediction vector.SELECTED DRAWING: Figure 5

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.

特開2006−20095号公報JP 2006-20095 A 特表2010−517405号公報Special table 2010-517405 gazette 特開2014−103429号公報JP 2014-103429 A 特開2014−33460号公報JP 2014-33460 A 特開2012−191247号公報JP 2012-191247 A 特開2012−191491号公報JP 2012-191491 A 特開2012−191397号公報JP 2012-191397 A

ここで、例えば、リアルタイム処理を実現するため、動画像符号化装置が、或るブロック内の複数のサブブロックに対する符号化モード及び予測モードを一括して決定することがある。そして、この符号化モードの決定後に、動画像符号化装置が、例えば、インター符号化モードと決定したサブブロックを、イントラ符号化モードに変更することがある。この様な場合に、例えば、インター符号化モードからイントラ符号化モードに変更されたサブブロックに隣接する別のサブブロックの符号化モードがインター符号化であり、且つ、予測モードがコピーモードであったとする。この場合、コピーモードにおいてコピーする動きベクトルの導出のために参照する参照先のサブブロックに、符号化モードがインター符号化モードからイントラ符号化モードに変更されたサブブロックが含まれている可能性がある。しかしながら、イントラ符号化モードに変更された場合、その参照されるサブブロックは動きベクトルを有さなくなる。そのため、イントラ符号化モードに変更されたサブブロックの動きベクトルは参照されなくなる。その結果、コピーモードにおける動きベクトルのコピー関係が崩れ、隣接する別のサブブロックにおいて誤った動きベクトルを選択してしまうことがある。また更に、この誤ったベクトルが選択された別のサブブロックに隣接するサブブロックの予測モードもコピーモードである場合、連鎖的に誤った動きベクトルを用いて動きベクトルの導出が行われることになる。その結果、誤りが更に周囲のサブブロックに伝搬してしまい、動画像データの伝送先の動画像復号装置において、ストリームが正しくデコードされず、画質劣化等の問題を引き起こしてしまうことがある。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におけるブロックの構成を例示する図である。It is a figure which illustrates the structure of the block in HEVC. インター符号化モードに決定されていたサブブロックをイントラ符号化モードに変更する場合に生じ得る不整合について例示する図である。It is a figure which illustrates about the mismatching which may arise when changing the subblock determined to inter coding mode to intra coding mode. 第1の実施形態に係る動画像符号化装置の機能ブロック構成を例示する図である。It is a figure which illustrates the functional block structure of the moving image encoder which concerns on 1st Embodiment. 第1の実施形態に係る動画像の符号化処理の流れを例示する図である。It is a figure which illustrates the flow of the encoding process of the moving image which concerns on 1st Embodiment. 第1の実施形態に係る動画像の符号化処理の動作フローを例示する図である。It is a figure which illustrates the operation | movement flow of the encoding process of the moving image which concerns on 1st Embodiment. サブブロックの符号化モードのIPCMへの変更と、周辺サブブロックの予測ベクトルモードへの変更とを例示する図である。It is a figure which illustrates the change to the IPCM of the encoding mode of a subblock, and the change to the prediction vector mode of a surrounding subblock. コピーモードで参照されるサブブロックを例示する図である。It is a figure which illustrates the subblock referred in copy mode. 第2の実施形態に係る動画像の符号化処理の動作フローを例示する図である。It is a figure which illustrates the operation | movement flow of the encoding process of the moving image which concerns on 2nd Embodiment. 一実施形態に係る動画像符号化装置を実現するためのハードウェア構成を例示する図である。It is a figure which illustrates the hardware constitutions for realizing the moving picture coding device concerning one embodiment.

以下、図面を参照しながら、本発明のいくつかの実施形態について詳細に説明する。なお、複数の図面において対応する要素には同一の符号を付す。また、以下では、動画像符号化方式として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 video encoding device 30 according to the first embodiment. The moving image encoding device 30 includes, for example, a control unit 300 and a storage unit 310. The control unit 300 may include, for example, a determination unit 301 and a change unit 302. In addition, the control unit 300 includes a prediction error signal generation unit 401, an orthogonal transformation unit 402, a quantization unit 403, an entropy coding unit 404, an inverse quantization unit 405, an inverse orthogonal transformation unit 406, and a decoding shown in FIG. An image generation unit 407 and the like may be included. Furthermore, the control unit 300 may include, for example, an intra prediction image generation unit 409, an inter prediction image generation unit 410, a motion vector calculation unit 411, an encoding mode determination unit 412, a prediction image selection unit 413, and the like. The control unit 300 may include a copy mode determination unit 414, an inter encoding mode change unit 415, an adjacent subblock determination unit 416, an encoding mode change determination unit 418, and the like. In one embodiment, the control unit 300 of the video encoding device 30 may operate as these functional units by reading and executing a video encoding program using the storage unit 310, for example. Further, the determination unit 301 and the change unit 302 illustrated in FIG. 3 may correspond to, for example, some of the functional blocks illustrated in FIG. The storage unit 310 of the moving image encoding device 30 may store information such as a moving image encoding program and moving image data, for example. The storage unit 310 may function as, for example, a decoded image storage unit 408 and an intra block position storage unit 417 described later. Details of each functional unit included in the control unit 300 will be described later.

図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 image encoding device 30 according to the first embodiment. In FIG. 4, the control unit 300 of the video encoding device 30 includes, for example, a prediction error signal generation unit 401, an orthogonal transform unit 402, a quantization unit 403, an entropy coding unit 404, an inverse quantization unit 405, and an inverse orthogonal transform. 406 and a decoded image generation unit 407. In addition, the control unit 300 of the video encoding device includes, for example, an intra prediction image generation unit 409, an inter prediction image generation unit 410, a motion vector calculation unit 411, a coding mode determination unit 412, and a prediction image selection unit 413. It is out. Furthermore, the control unit 300 of the moving image encoding apparatus 30 includes a copy mode determination unit 414, an inter encoding mode change unit 415, an adjacent sub-block determination unit 416, and an encoding mode change determination unit 418. The storage unit 310 may function as, for example, the decoded image storage unit 408 and the intra block position storage unit 417.

予測誤差信号生成部401は、後述する符号化モード決定部412によって決定された符号化モードに従い、動画像データ内のピクチャに含まれる符号化対象の符号化ブロックを、複数のサブブロックへと分割する。なお、符号化ブロックは、例えば、HEVCにおけるCTUであってよい。また、サブブロックは、例えば、HEVCにおけるCU、PU、及びTUを含んでいてよい。予測誤差信号生成部401は、分割により得られた処理対象のサブブロックのデータと、予測画像選択部413から供給される予測画像のサブブロックのデータとを用いて、予測誤差信号を生成する。予測誤差信号生成部401は、生成された予測誤差信号を直交変換部402に渡す。   The prediction error signal generation unit 401 divides a coding block to be coded included in a picture in moving image data into a plurality of sub-blocks according to a coding mode determined by a coding mode determination unit 412 described later. To do. The encoded block may be a CTU in HEVC, for example. Further, the sub-block may include, for example, CU, PU, and TU in HEVC. The prediction error signal generation unit 401 generates a prediction error signal using the processing target sub-block data obtained by the division and the prediction image sub-block data supplied from the prediction image selection unit 413. The prediction error signal generation unit 401 passes the generated prediction error signal to the orthogonal transformation unit 402.

直交変換部402は、入力された予測誤差信号を直交変換する。直交変換部402は、予測誤差信号を直交変換することによって水平方向及び垂直方向の周波数成分に分離された信号を量子化部403に供給する。量子化部403は、直交変換部402の出力を量子化する。量子化部403は、量子化により信号を符号化することによって予測誤差信号の符号量を低減し、コピーモード判定部414及び逆量子化部405に供給する。   The orthogonal transform unit 402 performs orthogonal transform on the input prediction error signal. The orthogonal transform unit 402 supplies a signal separated into frequency components in the horizontal direction and the vertical direction by performing orthogonal transform on the prediction error signal to the quantization unit 403. The quantization unit 403 quantizes the output of the orthogonal transform unit 402. The quantization unit 403 reduces the code amount of the prediction error signal by encoding the signal by quantization, and supplies the signal to the copy mode determination unit 414 and the inverse quantization unit 405.

逆量子化部405は、量子化部403の出力を逆量子化してから逆直交変換部406に供給する。逆直交変換部406は、逆量子化部405の出力を逆直交変換処理してから復号画像生成部407に供給する。これら逆量子化部405及び逆直交変換部406によって復号化処理が行われることにより、符号化前の予測誤差信号と同程度の信号が得られる。   The inverse quantization unit 405 dequantizes the output of the quantization unit 403 and then supplies the output to the inverse orthogonal transform unit 406. The inverse orthogonal transform unit 406 performs an inverse orthogonal transform process on the output of the inverse quantization unit 405 and then supplies the output to the decoded image generation unit 407. By performing decoding processing by the inverse quantization unit 405 and the inverse orthogonal transform unit 406, a signal comparable to the prediction error signal before encoding is obtained.

復号画像生成部407は、例えば、インター予測画像生成部410で動き補償されたピクチャのサブブロックのデータと、逆量子化部405、及び逆直交変換部406により復号処理された予測誤差信号とを加算する。それにより、復号画像生成部407は、符号化対象のピクチャの予測されるサブブロックのデータを再生し、復号画像記憶部408に渡す。   For example, the decoded image generation unit 407 receives the sub-block data of the picture motion-compensated by the inter prediction image generation unit 410 and the prediction error signal decoded by the inverse quantization unit 405 and the inverse orthogonal transform unit 406. to add. As a result, the decoded image generation unit 407 reproduces the predicted sub-block data of the picture to be encoded and passes it to the decoded image storage unit 408.

復号画像記憶部408は、渡された予測されるサブブロックのデータを新たな参照ピクチャのデータとして記憶する。復号画像記憶部408に記憶された新たな参照ピクチャのデータは、例えば、イントラ予測画像生成部409、インター予測画像生成部410及び動きベクトル計算部411で利用されてよい。   The decoded image storage unit 408 stores the passed predicted sub-block data as new reference picture data. The new reference picture data stored in the decoded image storage unit 408 may be used by, for example, the intra prediction image generation unit 409, the inter prediction image generation unit 410, and the motion vector calculation unit 411.

イントラ予測画像生成部409は、同ピクチャ内の既に符号化された周辺の画素から予測画像を生成する。一方、インター予測画像生成部410は、復号画像記憶部408から得た参照ピクチャのデータを動きベクトル計算部411から提供される動きベクトルで動き補償することにより、動き補償された参照ピクチャのサブブロックのデータを生成する。   The intra-predicted image generation unit 409 generates a predicted image from peripheral pixels that have already been encoded in the same picture. On the other hand, the inter predicted image generation unit 410 performs motion compensation on the reference picture data obtained from the decoded image storage unit 408 with the motion vector provided from the motion vector calculation unit 411, thereby subblocks of the motion-compensated reference picture. Generate data for

動きベクトル計算部411は、符号化対象のピクチャにおける符号化ブロック(例えば、HEVCにおけるCTU)のデータと、復号画像記憶部408から得られる既に符号化された参照ピクチャの符号化ブロックのデータを用いて、動きベクトルを求める。動きベクトルとは、例えば、ブロック単位で参照ピクチャから符号化対象のピクチャに最も類似している位置を探索するブロックマッチング技術(動きベクトル探索とも呼ばれる)を用いて求められるブロック単位の空間的なズレを示す値である。動きベクトル計算部411は、求めた動きベクトルをインター予測画像生成部410に渡す。   The motion vector calculation unit 411 uses data of a coding block (for example, CTU in HEVC) in a picture to be coded and data of a coding block of an already coded reference picture obtained from the decoded image storage unit 408. To obtain a motion vector. The motion vector is, for example, a spatial shift in block units obtained by using a block matching technique (also referred to as motion vector search) that searches for a position most similar to a picture to be encoded from a reference picture in block units. Is a value indicating The motion vector calculation unit 411 passes the obtained motion vector to the inter predicted image generation unit 410.

符号化モード決定部412は、符号化ブロックを複数のサブブロックに分割し、サブブロックの符号化モードと、符号化モードに属する予測モードとを決定する。符号化モードは、例えば、イントラ符号化モード及びインター符号化モードを含んでいてよい。そして、決定された符号化モード及び予測モードに応じてイントラ予測画像生成部409とインター予測画像生成部410から出力されたサブブロックのデータは、予測画像選択部413に入力される。予測画像選択部413は、どちらか一方の予測画像のサブブロックのデータを選択することができる。選択されたサブブロックのデータは、予測誤差信号生成部401に供給される。   The coding mode determination unit 412 divides the coding block into a plurality of subblocks, and determines the coding mode of the subblock and the prediction mode belonging to the coding mode. The encoding mode may include, for example, an intra encoding mode and an inter encoding mode. Then, the sub-block data output from the intra predicted image generation unit 409 and the inter predicted image generation unit 410 according to the determined encoding mode and prediction mode are input to the predicted image selection unit 413. The predicted image selection unit 413 can select data of a sub-block of one of the predicted images. Data of the selected sub-block is supplied to the prediction error signal generation unit 401.

また、符号化モード決定部412は、サブブロックの符号化モードの決定の際に、そのサブブロックの動きベクトルを決定する。この決定は、例えば、上述のように動きベクトル計算部411が動きベクトル探索を行うことで実行されてよい。そして、符号化モード決定部412が、処理対象の符号化ブロック内の全てのサブブロックの符号化モードを決定した後、各サブブロックに対して以下の処理が実行される。   Also, the encoding mode determination unit 412 determines the motion vector of the sub-block when determining the encoding mode of the sub-block. This determination may be executed, for example, by the motion vector calculation unit 411 performing a motion vector search as described above. Then, after the encoding mode determination unit 412 determines the encoding modes of all subblocks in the processing target encoding block, the following processing is executed for each subblock.

まず、符号化対象の符号化ブロックに含まれる全てのサブブロックに対して決定された符号化モードと、符号化モードに応じた情報(例えば、予測モード、動きベクトル)とが符号化モード決定部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 mode determination unit 414. In addition, the copy mode determination unit 414 also receives the data of the processing target sub-block quantized by the quantization unit 403. Then, the copy mode determination unit 414 determines whether or not the sub-block to be processed is a copy mode in the inter coding mode based on the coding mode and prediction mode information input from the coding mode determination unit 412, for example. Determine whether. When the processing target sub block is in the copy mode, the copy mode determination unit 414 outputs information indicating the position of the processing target sub block to the adjacent sub block determination unit 416, for example. Also, the copy mode determination unit 414 outputs the data of the sub-block to be processed to the inter coding mode change unit 415.

隣接サブブロック判定部416は、位置を示す情報が入力されたコピーモードのサブブロックと隣接するサブブロックに、符号化モードがIPCMに変更されたサブブロックが含まれるか否かを判定する。後述するように、イントラブロック位置記憶部417には、インター符号化モードからIPCMに変更されたサブブロックの位置の情報が記憶されている。隣接サブブロック判定部416は、イントラブロック位置記憶部417に記憶されているIPCMに変更されたサブブロックの位置の情報に基づいて、隣接するサブブロックにIPCMに変更されたサブブロックが含まれるか否かを判定してよい。処理対象のサブブロックと隣接するサブブロックにIPCMに変更されたサブブロックが含まれる場合、隣接サブブロック判定部416は、インター符号化モード変更部415に条件が合致したことを示す情報を出力する。   The adjacent sub-block determining unit 416 determines whether or not a sub-block whose encoding mode has been changed to IPCM is included in a sub-block adjacent to the copy-mode sub-block to which the position information is input. As will be described later, the intra block position storage unit 417 stores information on the position of the sub block changed from the inter coding mode to the IPCM. Whether the adjacent sub-block determining unit 416 includes the sub-block changed to the IPCM in the adjacent sub-block based on the position information of the sub-block changed to the IPCM stored in the intra block position storage unit 417. It may be determined whether or not. When the subblock changed to the IPCM is included in the subblock adjacent to the processing target subblock, the adjacent subblock determination unit 416 outputs information indicating that the condition is met to the inter coding mode change unit 415. .

インター符号化モード変更部415は、処理対象のサブブロックがコピーモードであり、且つ、処理対象のサブブロックと隣接するサブブロックにIPCMに変更されたサブブロックが含まれているか否かを判定する。そして、処理対象のサブブロックがコピーモードであり、且つ、処理対象のサブブロックと隣接するサブブロックにIPCMに変更されたサブブロックが含まれている場合に、処理対象のサブブロックを予測ベクトルモードに変更する。なお、インター符号化モード変更部415は、例えば、隣接サブブロック判定部416から条件が合致したことを示す情報が入力されている場合に、処理対象のサブブロックを予測ベクトルモードに変更してよい。   The inter coding mode changing unit 415 determines whether or not the sub-block to be processed is in the copy mode and the sub-block changed to the IPCM is included in the sub-block adjacent to the sub-block to be processed. . When the sub-block to be processed is in the copy mode and the sub-block changed to the IPCM is included in the sub-block adjacent to the sub-block to be processed, the sub-block to be processed is set to the prediction vector mode. Change to Note that the inter coding mode changing unit 415 may change the processing target sub-block to the prediction vector mode when information indicating that the condition is met is input from the adjacent sub-block determining unit 416, for example. .

変更する予測ベクトルモードで用いる動きベクトルには、後述する符号化モード変更判定部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 change determination unit 418 described later. May be set. As described above, the encoding mode determination unit 412 determines the encoding mode of each of the plurality of sub-blocks in the encoding block and information (for example, prediction mode, motion vector) according to the encoding mode. ing. Then, an encoding mode change determination unit 418, which will be described later, changes the encoding mode determined by the encoding mode determination unit 412. Therefore, the inter coding mode change unit 415 sets the copy source motion vector in the copy mode determined by the coding mode determination unit 412 for the processing target sub-block as the motion vector in the prediction vector mode to be changed. Good. In the following description, the copy-source motion vector in the copy mode that has been determined for the sub-block to be processed may be referred to as a copy vector.

また、このコピーベクトルは、例えば、予測誤差信号生成部401に入力された処理対象のサブブロックのデータがコピーモード判定部414へと入力されるまでの処理において、復号画像生成部407により復号画像記憶部408に記憶されてよい。そして、インター符号化モード変更部415は、復号画像記憶部408から処理対象のサブブロックに対して符号化モード決定部412が決定したコピーモードにおけるコピーベクトルを取得してよい。或いは、別の実施形態では、符号化モード決定部412は、処理対象のサブブロックの符号化モード、及び符号化モードに応じた情報(例えば、予測モード、動きベクトル)を決定する際に、決定した情報を例えば記憶部310に記憶してよい。そして、インター符号化モード変更部415は、記憶部310から、例えば、符号化モードに応じた情報に含まれる処理対象のサブブロックのコピーベクトルを取得してもよい。このように、予測ベクトルモードの動きベクトルには、符号化モード変更判定部418が符号化ブロック内のサブブロックの符号化モードの変更を実行する前に、処理対象のサブブロックに決定されていたコピーベクトルが設定されてよい。   Further, this copy vector is a decoded image generated by the decoded image generation unit 407 in the process until the data of the processing target sub-block input to the prediction error signal generation unit 401 is input to the copy mode determination unit 414, for example. It may be stored in the storage unit 408. Then, the inter encoding mode changing unit 415 may acquire a copy vector in the copy mode determined by the encoding mode determining unit 412 for the processing target sub-block from the decoded image storage unit 408. Alternatively, in another embodiment, the encoding mode determination unit 412 determines when determining the encoding mode of the processing target sub-block and information (for example, prediction mode, motion vector) according to the encoding mode. The information may be stored in the storage unit 310, for example. Then, the inter coding mode changing unit 415 may acquire, from the storage unit 310, for example, a copy vector of a processing target sub-block included in information according to the coding mode. As described above, the motion vector in the prediction vector mode is determined to be the processing target sub-block before the coding mode change determination unit 418 executes the change of the coding mode of the sub-block in the coding block. A copy vector may be set.

また、インター符号化モード変更部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 mode changing unit 415 selects a prediction vector based on selection information (for example, syntax mvp_l0_flag and mvp_l1_flag in HEVC) in order to encode a motion vector in the prediction vector mode. In one embodiment, the selection information may be predetermined information. For example, the selection information may be set to mvp_lX_flag = 0 that makes it easy to calculate a prediction vector candidate list (for example, mvpListLX (here, X = 0 or 1) in HEVC) generated for derivation of a prediction vector. . Alternatively, the inter coding mode changing unit 415 executes a process of creating a prediction vector candidate list (mvpListLX), selects mvp_lX_flag so that the cost of coding the difference vector between the prediction vector and the motion vector is reduced. Also good. For example, as described above, when the encoding mode is changed from the copy mode to the prediction vector mode, the motion vector and the prediction vector are set, so that data can be appropriately decoded in the transmission destination video decoding device. Is possible.

符号化モード変更判定部418は、処理対象のサブブロックの符号化モードを変更するか否かを判定する。なお、第1の実施形態では、符号化モード決定部412が、IPCM以外のイントラ符号化モードを用いるか、又はインター符号化モードを用いるかについての判定を完了している。そのため、第1の実施形態では、符号化モード変更判定部418は、符号化モードをIPCMに変更するか否かを判定してよい。上述のように、例えば、HEVCでは、IPCMの符号量を基に1CTUあたりの符号量に制限値が設けられており、1CTUあたりの制限値をサブブロック単位で正規化することで、サブブロック単位での符号量の制限を表す閾値を設定することができる。そして、符号化モード変更判定部418は、処理対象のサブブロックの符号量が設定されている閾値を超えているか否かを判定し、処理対象のサブブロックの符号量が閾値を超えている場合、処理対象のサブブロックの符号化モードをIPCMに変更してよい。また、符号化モード変更判定部418は、処理対象のサブブロックの符号化モードをIPCMに変更した場合、符号化モードをIPCMに変更したサブブロックの位置を示す情報を、イントラブロック位置記憶部417に出力する。そして、符号化モード変更判定部418は、処理を完了したサブブロックのデータを、エントロピー符号化部404に出力する。   The encoding mode change determination unit 418 determines whether to change the encoding mode of the sub-block to be processed. In the first embodiment, the encoding mode determination unit 412 has completed the determination as to whether to use an intra encoding mode other than IPCM or an inter encoding mode. Therefore, in the first embodiment, the encoding mode change determination unit 418 may determine whether or not to change the encoding mode to IPCM. 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. By normalizing the limit value per CTU in units of sub-blocks, It is possible to set a threshold value representing the code amount limitation in Then, the encoding mode change determination unit 418 determines whether or not the code amount of the processing target sub-block exceeds a set threshold value, and the code amount of the processing target sub-block exceeds the threshold value The coding mode of the sub-block to be processed may be changed to IPCM. Also, when the encoding mode change determination unit 418 changes the encoding mode of the sub-block to be processed to IPCM, the intra-block position storage unit 417 displays information indicating the position of the sub-block whose encoding mode has been changed to IPCM. Output to. Then, the encoding mode change determination unit 418 outputs the data of the sub-block that has been processed to the entropy encoding unit 404.

イントラブロック位置記憶部417は、符号化モード変更判定部418から入力されたIPCMに変更されたサブブロックの位置を示す情報を記憶する。イントラブロック位置記憶部417は、例えば、IPCMに変更されたサブブロックの位置をフラグを用いたビットマップなどで記憶してよい。   The intra block position storage unit 417 stores information indicating the position of the sub block changed to the IPCM input from the encoding mode change determination unit 418. The intra block position storage unit 417 may store, for example, the position of the sub block changed to the IPCM as a bitmap using a flag.

エントロピー符号化部404は、符号化モード変更判定部418から入力されるサブブロックのデータにエントロピー符号化を行い、ストリームを出力する。なお、エントロピー符号化とは、シンボルの出現頻度に応じて可変長の符号を割り当てる方式(可変長符号化)であってよい。   The entropy encoding unit 404 performs entropy encoding on the sub-block data input from the encoding mode change determination unit 418, and outputs a stream. Note that entropy coding may be a method (variable length coding) in which a variable length code is assigned according to the appearance frequency of a symbol.

続いて、以上で例示した機能ブロック構成により実行される第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 image encoding device 30.

ステップ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 mode determination unit 412 of the moving image encoding device 30 converts the picture in the moving image into a plurality of encoded blocks. To divide. For example, in HVEC, the control unit 300 may divide a picture into a plurality of CTUs. The subsequent processes from S502 to S519 are repetitive processes executed for each of the plurality of divided encoded blocks.

S503において、符号化モード決定部412は、処理対象の符号化ブロックを更に複数のサブブロックへと分割する。例えば、HVECでは、符号化モード決定部412は、CTUを複数のCUに分割してよい。続く、S504からS506までの処理は、分割された複数のサブブロックのそれぞれに対して実行される繰り返し処理である。S505において符号化モード決定部412は、処理対象のサブブロックの符号化モードを決定する。   In S503, the encoding mode determination unit 412 further divides the encoding block to be processed into a plurality of sub-blocks. For example, in HVEC, the encoding mode determination unit 412 may divide a CTU into a plurality of CUs. The subsequent processes from S504 to S506 are repetitive processes executed for each of the divided sub-blocks. In S505, the encoding mode determination unit 412 determines the encoding mode of the processing target sub-block.

符号化モードの決定は、符号化コストに基づいて行われてよく、例えば、画素差分絶対値和: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 mode determination unit 412 compares the intra encoding cost of the processing target sub-block with the inter encoding cost, and determines the encoding mode by selecting the one with the lower cost. Good. Further, the motion vector used for calculating the cost of the inter coding mode may be determined by the motion vector calculation unit 411 using a block matching technique (motion vector search) as described above, for example. The motion vector may be determined for each PU in the CU. Note that MVDCost and PRDCost need not be used in determining the encoding mode of the sub-block to be processed. For example, the encoding mode may be determined by comparing SADs.

また、符号化モード決定部412は、S505において処理対象のサブブロックの予測モードを決定してよい。予測モードは、例えば、インター符号化モードであれば、予測ベクトルモードと、コピーモードとを含んでいてよい。予測ベクトルモードは、上述のように、例えば、符号化済みの周辺ブロックの動きベクトルを予測ベクトルとして、処理対象のサブブロックにおいて求められた動きベクトルとの差分ベクトルを符号化するモードであってよい。また、コピーモードは、符号化済みの周辺のサブブロックの動きベクトルをコピーするモードであってよい。符号化モード決定部412は、例えば、動きベクトル探索により求めた動きベクトルから予測した予測画像のブロックと処理対象のブロックとのSADを予測ベクトルモードのコストとして求めてよい。また、符号化モード決定部412は、符号化済みの周辺のサブブロックの動きベクトルから導出された動きベクトル候補のリスト(例えば、マージ候補リスト)を生成する。そして、符号化モード決定部412は、候補のうちから選択した動きベクトルを用いて予測した予測画像のブロックと処理対象のブロックとのSADをコピーモードのコストとして求めてよい。符号化モード決定部412は、予測ベクトルモードのコストと、コピーモードのコストを比較し、コストの低い方を選択することで、予測モードを決定してよい。なお、符号化モード決定部412は、コピーモードのコストの算出の際に、動きベクトル候補のリストのうちからコピーモードで用いる動きベクトルを指定するインデックスを決定してよい。また、予測モードは、CU内のPU単位で決定されてよい。   Also, the coding mode determination unit 412 may determine the prediction mode of the processing target sub-block in S505. For example, the prediction mode may include a prediction vector mode and a copy mode if the prediction mode is an inter coding mode. As described above, the prediction vector mode may be a mode in which, for example, a motion vector of an encoded peripheral block is used as a prediction vector, and a difference vector from the motion vector obtained in the processing target sub-block is encoded. . The copy mode may be a mode for copying the motion vectors of the encoded peripheral sub-blocks. For example, the encoding mode determination unit 412 may obtain the SAD of the predicted image block predicted from the motion vector obtained by the motion vector search and the block to be processed as the cost of the predicted vector mode. Also, the encoding mode determination unit 412 generates a list of motion vector candidates (for example, a merge candidate list) derived from the motion vectors of the encoded peripheral sub-blocks. Then, the encoding mode determination unit 412 may obtain the SAD of the predicted image block predicted using the motion vector selected from the candidates and the processing target block as the cost of the copy mode. The encoding mode determination unit 412 may determine the prediction mode by comparing the cost of the prediction vector mode with the cost of the copy mode and selecting the one with the lower cost. Note that the encoding mode determination unit 412 may determine an index for designating a motion vector used in the copy mode from the list of motion vector candidates when calculating the cost of the copy mode. Further, the prediction mode may be determined for each PU in the CU.

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 mode determination unit 414 determines whether the processing target sub-block (for example, PU) is in the copy mode. If the sub-block to be processed is not in the copy mode (No in S509), the flow proceeds to S510. On the other hand, when the sub-block to be processed is in the copy mode (Yes in S509), the flow proceeds to S511.

S511において隣接サブブロック判定部416は、処理対象のサブブロックと隣接するサブブロックにインター符号化モードからIPCMに符号化モードが変更されたサブブロック(例えば、CU)があるか否かを判定する。なお、後述するS517で述べるように、或るサブブロックの符号化モードが、インター符号化モードからIPCMへと変更された場合、その変更されたサブブロックの位置についての情報がイントラブロック位置記憶部417に記憶される。そのため、隣接サブブロック判定部416は、イントラブロック位置記憶部417を参照して、処理対象のサブブロックと隣接するサブブロックにインター符号化モードからIPCMに変更されたサブブロックがあるか否かを判定してよい。処理対象のサブブロックと隣接するサブブロックにインター符号化モードからIPCMに変更されたサブブロックが無い場合(S511がNo)、フローはS513へと進む。一方、処理対象のサブブロックと隣接するサブブロックにインター符号化モードからIPCMに変更されたサブブロックがある場合(S511がYes)、フローはS512へと進む。   In S511, the adjacent sub-block determining unit 416 determines whether there is a sub-block (for example, CU) whose encoding mode is changed from the inter encoding mode to the IPCM in the sub-block adjacent to the processing target sub-block. . As will be described later in S517, when the coding mode of a certain subblock is changed from the inter coding mode to the IPCM, information about the changed subblock position is stored in the intra block position storage unit. 417 is stored. Therefore, the adjacent subblock determination unit 416 refers to the intra block position storage unit 417 and determines whether there is a subblock that has been changed from the inter coding mode to the IPCM in a subblock adjacent to the processing target subblock. You may judge. If there is no sub-block changed from the inter coding mode to the IPCM in the sub-block adjacent to the processing target sub-block (No in S511), the flow proceeds to S513. On the other hand, when 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 (Yes in S511), the flow proceeds to S512.

S512においてインター符号化モード変更部415は、処理対象のサブブロックの予測モードをコピーモードから予測ベクトルモードに変更する。なお、予測ベクトルモードで用いる動きベクトルは、後述するS516において符号化対象の符号化ブロック内のサブブロックの符号化モードが変更される前に決定されていた処理対象のサブブロックに対するコピーベクトルであってよい。例えば、このコピーベクトルは、予測誤差信号生成部401に入力された処理対象のサブブロックのデータがコピーモード判定部414へと入力されるまでの処理で、復号画像生成部407により復号画像記憶部408に記憶されてよい。そして、インター符号化モード変更部415は、S512において、復号画像記憶部408から処理対象のサブブロックに対して決定されたコピーモードにおけるコピーベクトルを取得してよい。或いは、別の実施形態では、S505において、符号化モード決定部412は、処理対象のサブブロックの符号化モード、及び符号化モードに応じた情報を決定する際に、決定した情報を例えば記憶部310に記憶してよい。そして、S512において、インター符号化モード変更部415は、記憶部310から、例えば、符号化モードに応じた情報に含まれる処理対象のサブブロックのコピーベクトルを取得してもよい。   In S512, the inter coding mode changing unit 415 changes the prediction mode of the processing target sub-block from the copy mode to the prediction vector mode. Note that the motion vector used in the prediction vector mode is a copy vector for the processing target sub-block determined before the coding mode of the sub-block in the coding block to be encoded is changed in S516 described later. It's okay. For example, this copy vector is processed until the sub-block data to be processed input to the prediction error signal generation unit 401 is input to the copy mode determination unit 414. 408 may be stored. Then, in S512, the inter coding mode changing unit 415 may acquire the copy vector in the copy mode determined for the processing target sub-block from the decoded image storage unit 408. Alternatively, in another embodiment, in S505, the encoding mode determination unit 412 determines the encoding mode of the processing target sub-block and information according to the encoding mode, for example, the storage unit 310 may be stored. In step S512, the inter coding mode changing unit 415 may acquire, from the storage unit 310, for example, a copy vector of the processing target sub-block included in the information corresponding to the coding mode.

続いて、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 mode changing unit 415 calculates a prediction vector. For example, the inter coding mode changing unit 415 may select a prediction vector based on selection information (for example, syntax mvp_l0_flag and mvp_l1_flag in HEVC) in order to encode a motion vector. In one embodiment, the selection information may be predetermined information that is determined in advance. For example, the selection information may be set to mvp_lX_flag = 0 that makes it easy to calculate a prediction vector candidate list (for example, mvpListLX (here, X = 0 or 1) in HEVC) generated for derivation of a prediction vector. . Alternatively, in another embodiment, mvp_lX_flag may be selected so that the process of creating a prediction vector candidate list (mvpListLX) is executed and the cost of encoding the difference vector between the prediction vector and the motion vector is reduced. . For example, even when the encoding mode is changed from the copy mode to the prediction vector mode by performing the encoding using the motion vector and the selection information for selecting the prediction vector as described above, the transmission destination Data can be appropriately decoded in the moving picture decoding apparatus. In S510, for example, if the sub-block to be processed is an intra coding mode or IPCM, the prediction vector need not be calculated.

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 change determination unit 418 determines whether or not to change the coding mode of the processing target sub-block (for example, CU) to the intra coding mode. In the first embodiment, whether the encoding mode determination unit 412 uses an intra encoding mode other than the IPCM or an inter encoding mode for encoding the sub-block to be processed in S505. Judgment is being executed. Therefore, the encoding mode change determination unit 418 may determine whether or not to change the encoding mode to IPCM in S514.

また、この判定は、以下のように行われてよい。上述のように、例えば、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 change determination unit 418 may determine whether or not the code amount of the sub-block to be processed exceeds a threshold representing the code amount limit in S514. For example, if the code amount of the sub-block to be processed does not exceed the threshold, the encoding mode change determination unit 418 determines No in S514, and the flow proceeds to S515. On the other hand, if the code amount of the sub-block to be processed exceeds the threshold, the encoding mode change determination unit 418 determines Yes in S514, and the flow proceeds to S516.

S516において、符号化モード変更判定部418は、処理対象のサブブロックの符号化モードをIPCMに変更する。また、S517において、符号化モード変更判定部418は、符号化モードをIPCMに変更したサブブロックの位置を示す情報を、イントラブロック位置記憶部417に記憶する。例えば、イントラブロック位置記憶部417は、IPCMに変更したサブブロックの位置をフラグを用いたビットマップなどで記憶してよい。続いて、S515において、エントロピー符号化部404は、符号化モード変更判定部418から入力される処理対象のサブブロックのデータにエントロピー符号化を実行し、ビットストリームを出力してよい。なお、エントロピー符号化とは、シンボルの出現頻度に応じて可変長の符号を割り当てる方式(可変長符号化)であってよい。   In S516, the encoding mode change determination unit 418 changes the encoding mode of the processing target sub-block to IPCM. In S517, the coding mode change determination unit 418 stores information indicating the position of the sub-block whose coding mode is changed to the IPCM in the intra block position storage unit 417. For example, the intra block position storage unit 417 may store the position of the sub block changed to the IPCM as a bitmap using a flag. Subsequently, in S515, the entropy encoding unit 404 may perform entropy encoding on the processing target sub-block data input from the encoding mode change determination unit 418, and output a bitstream. Note that entropy coding may be a method (variable length coding) in which a variable length code is assigned according to the appearance frequency of a symbol.

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 determination unit 301 included in the control unit 300. The processing of S509 to S512 may be executed by the changing unit 302 included in the control unit 300.

図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 oblique line 601 in FIG. 6A, the subblock changed to the IPCM may be referred to as a motion vector copy source in the merge mode. There is. In this case, according to the above operation flow, as shown in FIG. 6B, adjacent sub-blocks are changed from the merge mode to the AMVP mode. Further, a copy vector that is scheduled to be used in the merge mode is explicitly encoded as a motion vector in the AMVP mode. Therefore, according to the first embodiment, when the coding mode of a certain subblock in the coding block is changed from the inter coding mode to the IPCM, the vector copy relationship that occurs in the subblocks in the adjacent copy mode Inconsistency can be solved. In addition, since inconsistencies in vector copy relations are resolved in adjacent copy mode sub-blocks, errors may be chained to adjacent copy mode sub-blocks around adjacent copy mode sub-blocks. Can be avoided.

また、上述の実施形態では、予測モードを予測ベクトルモードに変更する際に動きベクトルとして、符号化ブロック内のサブブロックがインター符号化モードからイントラ符号化モードに変更される前に決定されていたコピーベクトルを用いている。そのため、符号化する予測画像が変わらない。また、既に決定されていたコピーベクトルを動きベクトルとして用いているため、例えば、動き探索等をやり直さなくてもよく、演算量を抑えることができる。また更に、上記の実施形態では、サブブロックの予測モードがコピーモードから予測ベクトルモードに変更される場合に、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 subblock determination unit 416 determines whether there is a subblock that has been changed to the IPCM in a block that is a reference target in the copy mode among subblocks adjacent to the processing target subblock. It may be determined. Thereby, for example, in the process of S512, it is possible to reduce the number of sub-blocks for which the prediction mode is changed from the copy mode to the prediction vector mode, and thus it is possible to further reduce the processing load according to the embodiment.

<第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 image encoding apparatus 30 first determines the prediction mode and the motion vector in the inter encoding mode by setting the encoding mode of all the sub-blocks in the encoding block to be processed as the inter encoding mode. Thereafter, the moving image encoding device 30 may, for example, change from the inter encoding mode to the intra encoding mode based on a comparison between the pixel difference absolute value sum in the inter encoding mode and the pixel difference absolute value sum in the intra encoding mode. It may be determined whether or not to change. Even in such a case, if there is a copy mode sub-block around the sub-block changed from the inter coding mode to the intra coding mode, copying is performed in the copy mode due to the change of the coding mode. The motion vector to be changed may change.

そこで、第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 video encoding device 30 sets the copy mode sub-block to the prediction vector mode. change. Hereinafter, the second embodiment will be described.

なお、第2の実施形態においても、動画像符号化装置30は、例えば、図3、及び図4に示す機能ブロック構成を有していてよい。しかしながら、第2の実施形態では、例えば、機能ブロック構成は、第1の実施形態とは異なる動作をしてもよい。   Note that, also in the second embodiment, the video encoding device 30 may have the functional block configuration shown in FIGS. 3 and 4, for example. However, in the second embodiment, for example, the functional block configuration may perform an operation different from that in the first embodiment.

例えば、第2の実施形態においては、符号化モード決定部412は、処理対象の符号化ブロック内の全てのサブブロックをインター符号化モードとして、各サブブロックの動きベクトルと予測モードとを決定する。なお、この様に、符号化対象の符号化ブロック内の全てのサブブロックをインター符号化モードとして、各サブブロックの動きベクトルと予測モードとを決定する場合、これらの処理を並列処理することが可能である。そして、例えば、動きベクトルと予測モードとの決定を並列処理で実行することは、リアルタイム性の確保に有用である。   For example, in the second embodiment, the encoding mode determination unit 412 determines all the subblocks in the processing target encoding block as the inter encoding mode, and determines the motion vector and the prediction mode of each subblock. . As described above, when all the sub-blocks in the coding block to be coded are set to the inter coding mode and the motion vector and the prediction mode of each sub-block are determined, these processes can be performed in parallel. Is possible. For example, executing the determination of the motion vector and the prediction mode by parallel processing is useful for securing real-time properties.

また、符号化モード変更判定部418は、処理対象のサブブロックをインター符号化モードからイントラ符号化モードに変更するか否かを判定する。この判定は、符号化コストに基づいて行われてよく、例えば、画素差分絶対値和:SAD=Σ|OrgPixel-PredPixel|の比較によって判定が行われてよい。ただし、実施形態で用いられる符号化コストは、SADに限定されるものではなく、例えば、差分画素をアダマール変換した後の絶対値和SATDなどでもよい。そして、例えば、符号化モード変更判定部418は、処理対象のサブブロックのイントラ符号化のコストと、インター符号化のコストとを比較し、イントラ符号化のコストの方が低い場合に、符号化モードをイントラ符号化モードに変更してよい。   Also, the coding mode change determination unit 418 determines whether or not to change the processing target sub-block from the inter coding mode to the intra coding mode. 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 change determination unit 418 compares the intra coding cost of the sub-block to be processed with the inter coding cost, and performs coding when the intra coding cost is lower. The mode may be changed to the intra coding mode.

また更に、符号化モード変更判定部418は、第1の実施形態と同様に、符号化モードをイントラ符号化モードの一つであるIPCMに変更するか否かを判定してよい。この判定は、上述のように、サブブロック(例えば、CU)単位で正規化された閾値を用いて実行されてよい。   Furthermore, the encoding mode change determination unit 418 may determine whether or not to change the encoding mode to IPCM, which is one of the intra encoding modes, as in the first embodiment. This determination may be performed using a threshold normalized on a sub-block (eg, CU) basis, as described above.

イントラブロック位置記憶部417は、符号化モード変更判定部418により、処理対象のサブブロックがイントラ符号化モード(IPCMを含む)に変更された場合、そのサブブロックの位置を示す情報を記憶してよい。   The intra block position storage unit 417 stores information indicating the position of the sub block when the encoding mode change determination unit 418 changes the processing target sub block to the intra coding mode (including IPCM). Good.

コピーモード判定部414は、処理対象のサブブロックの符号化モードがコピーモードであるか否かを判定する。処理対象のサブブロックの符号化モードがコピーモードである場合、コピーモード判定部414は、隣接サブブロック判定部416に、コピーモードと判定されたサブブロックの位置を示す情報を入力する。隣接サブブロック判定部416は、位置を示す情報が入力されたコピーモードのサブブロックと隣接するサブブロックにイントラ符号化モード(IPCMを含む)に変更されたサブブロックが含まれるか否かを判定する。この判定は、例えば、イントラブロック位置記憶部417に記憶されているイントラ符号化モード(IPCMを含む)に変更されたサブブロックの位置を示す情報に基づいて実行されてよい。   The copy mode determination unit 414 determines whether the encoding mode of the processing target sub-block is the copy mode. When the encoding mode of the subblock to be processed is the copy mode, the copy mode determination unit 414 inputs information indicating the position of the subblock determined to be the copy mode to the adjacent subblock determination unit 416. The adjacent sub-block determining unit 416 determines whether the sub-block changed to the intra coding mode (including IPCM) is included in the sub-block adjacent to the copy mode sub-block to which the position information is input. To do. This determination may be performed based on, for example, information indicating the position of the sub block changed to the intra coding mode (including IPCM) stored in the intra block position storage unit 417.

インター符号化モード変更部415は、処理対処のサブブロックがコピーモードであって、隣接するサブブロックにイントラ符号化モード(IPCMを含む)に変更されたサブブロックが含まれている場合、処理対処のサブブロックを予測ベクトルモードに変更する。また、インター符号化モード変更部415は、例えば、隣接するサブブロックがイントラ符号化モードに変更される前に、処理対象のサブブロックに対してコピーモードで決定されていたコピーベクトルを、予測ベクトルモードでの動きベクトルとして用いる。例えば、予測ベクトルモードで用いる動きベクトルには、符号化モード決定部412が、全てのサブブロックをインター符号化モードとして符号化モードを決定した際に、処理対象のサブブロックに対して決定したコピーベクトルを用いてよい。   The inter coding mode changing unit 415 handles the processing when the sub block to be processed is in the copy mode and the adjacent sub block includes a sub block changed to the intra coding mode (including IPCM). Are changed to the prediction vector mode. Further, the inter coding mode changing unit 415, for example, uses the copy vector determined in the copy mode for the processing target sub-block before the adjacent sub-block is changed to the intra coding mode, as a prediction vector. Used as a motion vector in mode. For example, for the motion vector used in the prediction vector mode, when the encoding mode determination unit 412 determines the encoding mode with all the sub blocks as the inter encoding mode, the copy determined for the processing target sub block is used. Vectors may be used.

続いて、以上で例示した機能ブロック構成が実行する第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 image encoding device 30.

なお、図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 mode determination unit 412 determines the motion vector and the prediction mode for the processing target sub-block, with the coding mode of all the sub-blocks included in the coding block as the inter-coding mode.

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 subblock determination unit 416 is changed from the inter coding mode to the intra coding mode (including IPCM) for the subblock (for example, CU) adjacent to the processing target subblock (for example, PU). It may be determined whether there is another sub-block. As will be described later in S817, when the coding mode of a certain subblock is changed from the inter coding mode to the intra coding mode (including IPCM), the position of the changed subblock is changed. Information is stored in the intra block position storage unit 417. Therefore, the adjacent subblock determination unit 416 refers to the intra block position storage unit 417 and determines whether there is a subblock that has been changed from the inter coding mode to the intra coding mode (including IPCM) in the adjacent subblock. It may be determined whether or not. If there is no subblock changed from the inter coding mode to the intra coding mode (including IPCM) in the subblock adjacent to the processing target subblock (S811 is No), the flow proceeds to S813. On the other hand, when there is a subblock that has been changed from the inter coding mode to the intra coding mode (including IPCM) in the subblock adjacent to the processing target subblock (Yes in S811), the flow proceeds to S812. In step S812, the inter coding mode changing unit 415 changes the prediction mode of the processing target sub-block (for example, PU) from the copy mode to the prediction vector mode.

また、S814において符号化モード変更判定部418は、処理対象のサブブロック(例えば、CU)の符号化モードをイントラ符号化モードに変更するか否かを判定する。なお、第2の実施形態では、上述のように、S805において、符号化対象の符号化ブロック内の全てのサブブロックをインター符号化モードとして処理を行っている。そのため、符号化モード変更判定部418は、S814において、符号化モードをイントラ符号化モードに変更するか否かを判定してよい。   In S814, the coding mode change determination unit 418 determines whether or not to change the coding mode of the processing target sub-block (for example, CU) to the intra coding mode. In the second embodiment, as described above, in S805, all the sub-blocks in the coding block to be coded are processed in the inter coding mode. Therefore, the coding mode change determination unit 418 may determine whether or not to change the coding mode to the intra coding mode in S814.

この判定は、符号化コストに基づいて行われてよく、例えば、画素差分絶対値和: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 change determination unit 418 compares the intra coding cost of the sub-block to be processed with the inter coding cost, and performs coding when the intra coding cost is lower. The mode may be changed to the intra coding mode.

また更に、S814において符号化モード変更判定部418は、第1の実施形態と同様に、符号化モードをイントラ符号化モードの一つであるIPCMに変更するか否かを判定してよい。この判定は、上述のように、サブブロック(例えば、CU)単位で正規化された閾値を用いて実行されてよい。   Furthermore, in S814, the coding mode change determination unit 418 may determine whether or not to change the coding mode to an IPCM that is one of the intra coding modes, as in the first embodiment. This determination may be performed using a threshold normalized on a sub-block (eg, CU) basis, as described above.

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 change determination unit 418 changes the coding mode to the intra coding mode (including IPCM). In S817, the coding mode change determination unit 418 stores information indicating the position of the sub-block whose coding mode is changed to the intra coding mode (including IPCM) in the intra block position storage unit 417.

なお、図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 determination unit 301 included in the control unit 300. Further, the processing of S809 to S812 may be executed by the changing unit 302 included in the control unit 300.

以上で述べたように、第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 image encoding apparatus 30 according to an embodiment can be implemented as a hardware circuit, and can be realized by using, for example, an information processing apparatus (computer) 900 as shown in FIG.

図9の情報処理装置900は、プロセッサ901、メモリ902、入力装置903、出力装置904、記憶装置905、媒体駆動装置906、及びネットワーク接続装置907を含み、これらの構成要素はバス909により互いに接続されている。   9 includes a processor 901, a memory 902, an input device 903, an output device 904, a storage device 905, a medium drive device 906, and a network connection device 907, and these components are connected to each other by a bus 909. Has been.

メモリ902は、例えば、Read Only Memory(ROM)、Random Access Memory(RAM)、フラッシュメモリ等の半導体メモリである。メモリ902は、動画像符号化処理に用いられる動画像符号化プログラム及び例えば動画像データなどのデータを格納する。図3の記憶部310、並びに図4の復号画像記憶部408、及びイントラブロック位置記憶部417は、例えば、メモリ902であってよい。   The memory 902 is, for example, a semiconductor memory such as a read only memory (ROM), a random access memory (RAM), or a flash memory. The memory 902 stores a moving image encoding program used for moving image encoding processing and data such as moving image data. The storage unit 310 in FIG. 3, the decoded image storage unit 408, and the intra block position storage unit 417 in FIG. 4 may be, for example, the memory 902.

プロセッサ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 processor 901 may be, for example, a Central Processing Unit (CPU). 3 may be the processor 901, for example. The processor 901 may operate as the determination unit 301 and the change unit 302 in FIG. 3, for example, by executing a moving image encoding program using the memory 902. Further, the processor 901, for example, the prediction error signal generation unit 401, the orthogonal transformation unit 402, the quantization unit 403, the entropy coding unit 404, the inverse quantization unit 405, the inverse orthogonal transformation unit 406, and the decoded image generation illustrated in FIG. The unit 407 may operate. The processor 901 may operate as, for example, the intra prediction image generation unit 409, the inter prediction image generation unit 410, the motion vector calculation unit 411, the encoding mode determination unit 412, and the prediction image selection unit 413. The processor 901 may operate as the copy mode determination unit 414, the inter coding mode change unit 415, the adjacent subblock determination unit 416, and the coding mode change determination unit 418.

入力装置903は、例えば、キーボード、ポインティングデバイス等であり、ユーザ又はオペレータからの指示や情報の入力に用いられる。出力装置904は、例えば、表示装置、プリンタ、スピーカ等であり、ユーザ又はオペレータへの問い合わせや処理結果の出力に用いられる。   The input device 903 is, for example, a keyboard, a pointing device, or the like, and is used for inputting an instruction or information from a user or an operator. The output device 904 is, for example, a display device, a printer, a speaker, or the like, and is used to output an inquiry to a user or an operator or a processing result.

記憶装置905は、例えば、磁気ディスク装置、光ディスク装置、光磁気ディスク装置、テープ装置等である。記憶装置905は、ハードディスクドライブであってもよい。情報処理装置900は、記憶装置905に動画像符号化プログラム及び例えば動画像データなどのデータを格納しておき、それらをメモリ902にロードして使用することができる。   The storage device 905 is, for example, a magnetic disk device, an optical disk device, a magneto-optical disk device, a tape device, or the like. The storage device 905 may be a hard disk drive. The information processing apparatus 900 can store a moving image encoding program and data such as moving image data in the storage device 905 and load them into the memory 902 for use.

媒体駆動装置906は、可搬型記録媒体910を駆動し、その記録内容にアクセスする。可搬型記録媒体910は、メモリデバイス、フレキシブルディスク、光ディスク、光磁気ディスク等である。可搬型記録媒体910は、Compact Disk Read Only Memory(CD−ROM)、Digital Versatile Disk(DVD)、又はUniversal Serial Bus(USB)メモリであってもよい。ユーザ又はオペレータは、この可搬型記録媒体910に動画像符号化プログラム及び例えば動画像データなどのデータを格納しておき、それらをメモリ902にロードして使用することができる。   The medium driving device 906 drives the portable recording medium 910 and accesses the recorded contents. The portable recording medium 910 is a memory device, a flexible disk, an optical disk, a magneto-optical disk, or the like. The portable recording medium 910 may be a Compact Disk Read Only Memory (CD-ROM), a Digital Versatile Disk (DVD), or a Universal Serial Bus (USB) memory. A user or an operator can store a moving image encoding program and data such as moving image data in the portable recording medium 910 and load them into the memory 902 for use.

このように、動画像符号化プログラム及び例えば動画像データなどのデータを格納するコンピュータ読み取り可能な記録媒体は、メモリ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 memory 902, the storage device 905, or the portable recording medium 910. A temporary recording medium.

ネットワーク接続装置907は、Local Area Network(LAN)、インターネット等の通信ネットワークに接続され、通信に伴うデータ変換を行う通信インタフェースである。ネットワーク接続装置907は、動画像復号装置に対して符号化ストリームを出力する出力インタフェースとして用いることもできる。情報処理装置900は、動画像符号化プログラム及び例えば動画像データなどのデータを外部の装置からネットワーク接続装置907を介して受信し、それらをメモリ902にロードして使用することもできる。   The network connection device 907 is a communication interface that is connected to a communication network such as a local area network (LAN) or the Internet and performs data conversion accompanying communication. The network connection device 907 can also be used as an output interface that outputs an encoded stream to the video decoding device. The information processing apparatus 900 can also receive a moving image encoding program and data such as moving image data from an external device via the network connection device 907 and load them into the memory 902 for use.

なお、図9に示す情報処理装置900のハードウェア構成は例示であり、実施形態はこれに限定されるものではない。例えば、情報処理装置900は、用途や条件に応じて一部の構成要素が省略されていてもよい。例えば、ユーザ又はオペレータとのインタフェースが利用されない場合は、入力装置903及び出力装置904を省略してもよい。また、情報処理装置900が可搬型記録媒体910にアクセスしない場合は、媒体駆動装置906を省略してもよい。   The hardware configuration of the information processing apparatus 900 illustrated in FIG. 9 is an exemplification, and the embodiment is not limited to this. For example, in the information processing apparatus 900, some components may be omitted depending on the application and conditions. For example, when the interface with the user or the operator is not used, the input device 903 and the output device 904 may be omitted. Further, when the information processing apparatus 900 does not access the portable recording medium 910, the medium driving apparatus 906 may be omitted.

また、例えば、別の実施形態では、上述の動画像符号化装置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 video encoding device 30 may be implemented as hardware such as FPGA and SoC. Note that FPGA is an abbreviation for Field Programmable Gate Array. SoC is an abbreviation for System-on-a-chip. Furthermore, when the processes included in the above-described operation flow are possible, a part of the processes may be executed in parallel processing. For example, a part of the processes may be executed by another processor. By executing in parallel processing, the real-time property of the moving image encoding processing can be ensured.

上述の実施形態を含むいくつかの実施形態は、上述の実施形態の各種変形形態及び代替形態を包含するものとして当業者には理解される。例えば、各種実施形態は、構成要素を変形して具体化されてよい。また、上述した実施形態に開示されている複数の構成要素を適宜組み合わせることにより、種々の実施形態が実施されてよい。更には、実施形態に示される全構成要素からいくつかの構成要素を削除して又は置換して、或いは実施形態に示される構成要素にいくつかの構成要素を追加して種々の実施形態が実施されてよい。   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 control unit 301 determination unit 302 change unit 310 storage unit 401 prediction error signal generation unit 402 orthogonal transform unit 403 quantization unit 404 entropy coding unit 405 inverse quantization unit 406 inverse orthogonal transform unit 407 decoded image Generation unit 408 Decoded image storage unit 409 Intra prediction image generation unit 410 Inter prediction image generation unit 411 Motion vector calculation unit 412 Coding mode determination unit 413 Prediction image selection unit 414 Copy mode determination unit 415 Inter coding mode change unit 416 Adjacent sub Block determination unit 417 Intra block position storage unit 418 Coding mode change determination unit 900 Information processing device 901 Processor 902 Memory 903 Input device 904 Output device 905 Storage device 906 Medium drive device 907 Network connection device 909 Bus 910 Portable Recording media

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.
前記変更部は、前記第2のブロックの符号化モードを前記コピーモードから前記予測ベクトルモードに変更する場合に、前記予測ベクトルモードで用いる動きベクトルとして、前記決定部が前記第2のブロックに対して決定した前記コピーモードにおいてコピーする動きベクトルを用いる、ことを特徴とする請求項1に記載の動画像符号化装置。   When the encoding unit of the second block is changed from the copy mode to the prediction vector mode, the changing unit determines whether the determining unit applies the motion vector used in the prediction vector mode to the second block. The moving image encoding apparatus according to claim 1, wherein a motion vector to be copied in the copy mode determined in the above is used. 前記変更部は、前記予測ベクトルモードで用いる前記予測ベクトルを選択するための選択情報として所定の情報を設定する、ことを特徴とする請求項1又は2に記載の動画像符号化装置。   The moving image encoding apparatus according to claim 1, wherein the changing unit sets predetermined information as selection information for selecting the prediction vector used in the prediction vector mode. 前記変更部は、前記第2のブロックに対して、前記予測ベクトルモードで用いる前記予測ベクトルの候補を導出し、前記候補のうちから前記第2のブロックに対する前記差分ベクトルを符号化するコストが小さくなるように前記予測ベクトルを選択する、ことを特徴とする請求項1又は2に記載の動画像符号化装置。   The changing unit derives the prediction vector candidate used in the prediction vector mode for the second block, and the cost for encoding the difference vector for the second block out of the candidates is small. The moving picture coding apparatus according to claim 1, wherein the prediction vector is selected so that 前記変更部は、前記第2のブロックの予測モードの前記コピーモードからの前記予測ベクトルモードへの変更を、更に、前記第2のブロックに対する前記第1のブロックの位置が、前記コピーモードにおいて動きベクトルの参照先として規定されている位置にある場合に実行する、ことを特徴とする請求項1から4のいずれか一項に記載の動画像符号化装置。   The changing unit changes the prediction mode of the second block from the copy mode to the prediction vector mode, and the position of the first block relative to the second block moves in the copy mode. 5. The moving picture encoding apparatus according to claim 1, wherein the moving picture encoding apparatus is executed when the position is defined as a vector reference destination. 画像内の複数のブロックそれぞれに適用される符号化モードを決定するとともに、前記複数のブロックそれぞれに適用される予測モードを決定する工程と、
前記複数のブロックのうち第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.
JP2015067601A 2015-03-27 2015-03-27 Video encoding device, video encoding method, and video encoding program Pending JP2016187171A (en)

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)

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

Cited By (2)

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