JP7827614B2 - Image decoding device, image decoding method, and program - Google Patents
Image decoding device, image decoding method, and programInfo
- Publication number
- JP7827614B2 JP7827614B2 JP2022209474A JP2022209474A JP7827614B2 JP 7827614 B2 JP7827614 B2 JP 7827614B2 JP 2022209474 A JP2022209474 A JP 2022209474A JP 2022209474 A JP2022209474 A JP 2022209474A JP 7827614 B2 JP7827614 B2 JP 7827614B2
- Authority
- JP
- Japan
- Prior art keywords
- motion vector
- pixels
- template matching
- motion compensation
- decoded
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Description
本発明は、画像復号装置、画像復号方法及びプログラムに関する。 The present invention relates to an image decoding device, an image decoding method, and a program.
非特許文献1では、動きベクトルが参照画像外を参照する場合であっても動き補償できるように、画面境界の画素値を参照画像境界の外側方向に所定画素数だけ複製(パディング)した領域(すなわち、反復パディング領域)が規定されている。 Non-Patent Document 1 defines an area (i.e., a repeated padding area) in which pixel values at the screen boundary are duplicated (padded) a predetermined number of pixels outward from the reference image boundary, so that motion compensation can be performed even when the motion vector references an area outside the reference image.
さらに、非特許文献1には、動きベクトルが参照画像や反復パディング領域を含む参照可能な領域外を参照する場合に、動きベクトルの参照位置を参照可能な領域内に平行移動(クリップ)する技術が開示されている。 Furthermore, Non-Patent Document 1 discloses a technique for translating (clipping) the reference position of a motion vector into the referenceable area when the motion vector references an area outside the referenceable area, including a reference image or repeated padding area.
非特許文献2には、動きベクトルを修正するテンプレートマッチングが開示されている。 Non-Patent Document 2 discloses template matching for correcting motion vectors.
非特許文献2で開示されているテンプレートマッチングが有効な場合で且つ動きベクトルが参照画像を含む参照可能な領域(参照可能領域)の外側を参照する場合に、クリップされた動きベクトルを原点とするテンプレートマッチングの探索範囲が、かかる参照可能領域を超えるという問題点があった。 そこで、本発明は、上述の課題に鑑みてなされたものであり、参照可能領域の外側を参照する動きベクトルがクリップされた後、かかる動きベクトルを原点とするテンプレートマッチングの探索範囲が、参照画像を含む参照可能領域を超えることを回避することができる画像復号装置、画像復号方法及びプログラムを提供することを目的とする。 When the template matching disclosed in Non-Patent Document 2 is effective and a motion vector references an area outside the referenceable area (referenceable area) that includes the reference image, the search range of template matching with the clipped motion vector as the origin exceeds that referenceable area. The present invention has been made in light of the above-mentioned problem, and aims to provide an image decoding device, image decoding method, and program that can prevent the search range of template matching with the motion vector as the origin from exceeding the referenceable area that includes the reference image after a motion vector that references an area outside the referenceable area is clipped.
本発明の第1の特徴は、画像復号装置であって、制御情報を復号する復号部と、復号済み画素と前記制御情報とに基づいて第1予測画素を生成するイントラ予測部と、前記復号済み画素を蓄積する蓄積部と、前記蓄積された復号済み画素と前記制御情報とに基づいて第2予測画素を生成する動き補償部とを具備し、前記動き補償部は、動きベクトルが参照画像を含む参照可能領域外を参照する場合に、テンプレートマッチングが有効であるか否かに応じて、前記動きベクトルのクリップ位置を制御することを要旨とする。 A first feature of the present invention is an image decoding device comprising: a decoding unit that decodes control information; an intra prediction unit that generates first predicted pixels based on decoded pixels and the control information; a storage unit that stores the decoded pixels; and a motion compensation unit that generates second predicted pixels based on the stored decoded pixels and the control information, wherein the motion compensation unit controls the clip position of the motion vector depending on whether template matching is valid when the motion vector references a region outside a referenceable area that includes a reference image.
本発明の第2の特徴は、画像復号装置であって、制御情報を復号する復号部と、復号済み画素と前記制御情報とに基づいて第1予測画素を生成するイントラ予測部と、前記復号済み画素を蓄積する蓄積部と、前記蓄積された復号済み画素と前記制御情報とに基づいて第2予測画素を生成する動き補償部とを具備し、前記動き補償部は、動きベクトルが参照画像を含む参照可能領域外を参照する場合に、テンプレートマッチングが有効であるか否か及び復号対象ブロックの幅又は高さに応じて、前記テンプレートマッチングの探索範囲を制限することを要旨とする。 A second feature of the present invention is an image decoding device comprising: a decoding unit that decodes control information; an intra prediction unit that generates first predicted pixels based on decoded pixels and the control information; a storage unit that stores the decoded pixels; and a motion compensation unit that generates second predicted pixels based on the stored decoded pixels and the control information, wherein, when a motion vector references a region outside a referenceable region that includes a reference image, the motion compensation unit limits the search range of the template matching depending on whether template matching is valid and the width or height of the block to be decoded.
本発明の第3の特徴は、画像復号方法であって、制御情報を復号する工程Aと、復号済み画素と前記制御情報とに基づいて第1予測画素を生成する工程Bと、前記復号済み画素を蓄積する工程Cと、前記蓄積された復号済み画素と前記制御情報とに基づいて第2予測画素を生成する工程Dとを有し、前記工程Dにおいて、動きベクトルが参照画像を含む参照可能領域外を参照する場合に、テンプレートマッチングが有効であるか否かに応じて、前記動きベクトルのクリップ位置を制御することを要旨とする。 A third feature of the present invention is an image decoding method comprising: step A of decoding control information; step B of generating first predicted pixels based on decoded pixels and the control information; step C of accumulating the decoded pixels; and step D of generating second predicted pixels based on the accumulated decoded pixels and the control information, wherein in step D, when a motion vector references a region outside a referenceable area that includes a reference image, the clip position of the motion vector is controlled depending on whether template matching is valid.
本発明の第4の特徴は、コンピュータを、画像復号装置として機能させるプログラムであって、前記画像復号装置は、制御情報を復号する復号部と、復号済み画素と前記制御情報とに基づいて第1予測画素を生成するイントラ予測部と、前記復号済み画素を蓄積する蓄積部と、前記蓄積された復号済み画素と前記制御情報とに基づいて第2予測画素を生成する動き補償部とを具備し、前記動き補償部は、動きベクトルが参照画像を含む参照可能領域外を参照する場合に、テンプレートマッチングが有効であるか否かに応じて、前記動きベクトルのクリップ位置を制御することを要旨とする。 A fourth feature of the present invention is a program that causes a computer to function as an image decoding device, the image decoding device comprising: a decoding unit that decodes control information; an intra prediction unit that generates first predicted pixels based on decoded pixels and the control information; a storage unit that stores the decoded pixels; and a motion compensation unit that generates second predicted pixels based on the stored decoded pixels and the control information, and the motion compensation unit controls the clip position of the motion vector depending on whether template matching is valid when the motion vector references a region outside the referenceable area that includes a reference image.
本発明によれば、参照可能領域の外側を参照する動きベクトルが参照可能領域外にクリップされた後、かかる動きベクトルを原点とするテンプレートマッチングの探索範囲が、参照画像を含む参照可能領域を超えることを回避することができる画像復号装置、画像復号方法及びプログラムを提供することができる。 The present invention provides an image decoding device, image decoding method, and program that can prevent the search range of template matching, which has the motion vector as its origin, from exceeding the referenceable area that includes the reference image after the motion vector that references the area outside the referenceable area is clipped to the outside of the referenceable area.
以下、本発明の実施の形態について、図面を参照しながら説明する。なお、以下の実施形態における構成要素は、適宜、既存の構成要素等との置き換えが可能であり、また、他の既存の構成要素との組み合わせを含む様々なバリエーションが可能である。したがって、以下の実施形態の記載をもって、特許請求の範囲に記載された発明の内容を限定するものではない。 Embodiments of the present invention will be described below with reference to the drawings. Note that the components in the following embodiments can be appropriately replaced with existing components, and various variations, including combinations with other existing components, are possible. Therefore, the following description of the embodiments does not limit the content of the invention described in the claims.
<第1実施形態>
以下、図1~図13を参照して、本実施形態に係る画像復号装置200について説明する。図1は、本実施形態に係る画像復号装置200の機能ブロックの一例について示す図である。
First Embodiment
An image decoding device 200 according to this embodiment will be described below with reference to Figures 1 to 13. Figure 1 is a diagram showing an example of functional blocks of the image decoding device 200 according to this embodiment.
図1に示すように、画像復号装置200は、符号入力部210と、復号部201と、逆量子化部202と、逆変換部203と、イントラ予測部204と、加算器206と、蓄積部207と、動き補償部208と、画像出力部220とを有する。 As shown in FIG. 1, the image decoding device 200 includes a code input unit 210, a decoding unit 201, an inverse quantization unit 202, an inverse transform unit 203, an intra prediction unit 204, an adder 206, an accumulation unit 207, a motion compensation unit 208, and an image output unit 220.
符号入力部210は、画像符号化装置によって符号化された符号情報を取得するように構成されている。 The code input unit 210 is configured to acquire code information encoded by the image encoding device.
復号部201は、符号入力部210から入力された符号情報から、制御情報並びに量子化値を復号するように構成されている。例えば、復号部201は、かかる符号情報に対して可変長復号を行うことで制御情報及び量子化値を出力するように構成されている。 The decoding unit 201 is configured to decode control information and quantized values from the code information input from the code input unit 210. For example, the decoding unit 201 is configured to output control information and quantized values by performing variable-length decoding on the code information.
ここで、量子化値は、逆量子化部202に送られ、制御情報は、動き補償部208及びイントラ予測部204に送られる。なお、かかる制御情報は、逆量子化部202、動き補償部208及びイントラ予測部204等の制御に必要な情報を含み、シーケンスパラメータセットやピクチャパラメータセットやピクチャヘッダやスライスヘッダ等のヘッダ情報を含んでもよい。 Here, the quantized values are sent to the inverse quantization unit 202, and the control information is sent to the motion compensation unit 208 and the intra prediction unit 204. Note that this control information includes information necessary for controlling the inverse quantization unit 202, motion compensation unit 208, intra prediction unit 204, etc., and may also include header information such as a sequence parameter set, picture parameter set, picture header, slice header, etc.
逆量子化部202は、復号部201から送られた量子化値を逆量子化して復号された変換係数とするように構成されている。かかる変換係数は、逆変換部203に送られる。 The inverse quantization unit 202 is configured to inverse quantize the quantized values sent from the decoding unit 201 to generate decoded transform coefficients. These transform coefficients are sent to the inverse transform unit 203.
逆変換部203は、逆量子化部202から送られた変換係数を逆変換して復号された予測残差とするように構成されている。かかる予測残差は、加算器206に送られる。 The inverse transform unit 203 is configured to inversely transform the transform coefficients sent from the inverse quantization unit 202 to generate decoded prediction residuals. These prediction residuals are sent to the adder 206.
イントラ予測部204は、復号済み画素と復号部201から送られた制御情報とに基づいて第1予測画素を生成するように構成されている。ここで、復号済み画素は、加算器206を介して得られて蓄積部207に蓄積されるものである。また、第1予測画素は、加算器206で予測残差と加算するための予測画素である。なお、第1予測画素は、加算器206に送られる。 The intra prediction unit 204 is configured to generate a first predicted pixel based on the decoded pixel and control information sent from the decoding unit 201. Here, the decoded pixel is obtained via the adder 206 and stored in the storage unit 207. The first predicted pixel is a predicted pixel to be added to the prediction residual in the adder 206. The first predicted pixel is sent to the adder 206.
蓄積部207は、加算器206から送られた復号済み画素を累積的に蓄積するように構成されている。かかる復号済み画素は、蓄積部207を介して動き補償部208からの参照を受ける。 The storage unit 207 is configured to cumulatively store the decoded pixels sent from the adder 206. These decoded pixels are referenced by the motion compensation unit 208 via the storage unit 207.
動き補償部208は、蓄積部207に蓄積された復号済み画素と復号部201から送られた制御情報とに基づいて第2予測画素を生成するように構成されている。ここで、第2予測画素は、加算器206で予測残差と加算するための予測画素である。第2予測画素は、加算器206に送られる。 The motion compensation unit 208 is configured to generate second predicted pixels based on the decoded pixels stored in the storage unit 207 and the control information sent from the decoding unit 201. Here, the second predicted pixels are predicted pixels to be added to the prediction residual in the adder 206. The second predicted pixels are sent to the adder 206.
加算器206は、逆変換部203から送られる予測残差と、入力された第1予測画素及び第2予測画素のいずれかを加算して復号済み画素を得るように構成されている。かかる復号済み画素は、画像出力部220、蓄積部207及びイントラ予測部204へ送られる。 The adder 206 is configured to add the prediction residual sent from the inverse transform unit 203 to either the input first predicted pixel or second predicted pixel to obtain a decoded pixel. This decoded pixel is sent to the image output unit 220, storage unit 207, and intra prediction unit 204.
画像出力部220は、加算器206から送信された復号済み画素を出力するように構成されている。 The image output unit 220 is configured to output the decoded pixels transmitted from the adder 206.
以下、本実施形態に係る画像復号装置200の特徴的構成である動き補償部208について説明する。 The following describes the motion compensation unit 208, a characteristic component of the image decoding device 200 according to this embodiment.
<動きベクトルの導出方法及びインター予測画像の生成方法>
動き補償部208は、インター予測画素を生成するために(すなわち、参照画像から動き補償するために)必要な動きベクトル及び参照画像の組み合わせを導出する。
<Method of deriving motion vectors and method of generating inter-predicted images>
The motion compensation unit 208 derives a combination of a motion vector and a reference image required to generate an inter-predicted pixel (i.e., to perform motion compensation from a reference image).
ここで、動き補償部208によって導出される動きベクトル及び参照画像の組み合わせは、非特許文献1に開示されている最大で2つの異なる動きベクトル及び参照画像の組み合わせで構成されてもよい。 Here, the combination of motion vector and reference image derived by the motion compensation unit 208 may be composed of up to two different combinations of motion vector and reference image as disclosed in Non-Patent Document 1.
或いは、動き補償部208によって導出される動きベクトル及び参照画像の組み合わせは、非特許文献2に開示されている複数仮説予測(MHP:Multiple Hypothesis Prediction)やOBMC(Overlapped Block Motion Compensation)のような2つ以上(例えば、3つや4つ)の動きベクトル及び参照画像の組み合わせで構成されてもよい。 Alternatively, the combination of motion vectors and reference images derived by the motion compensation unit 208 may be composed of a combination of two or more (e.g., three or four) motion vectors and reference images, such as Multiple Hypothesis Prediction (MHP) or Overlapped Block Motion Compensation (OBMC), as disclosed in Non-Patent Document 2.
また、動き補償部208は、動きベクトル及び参照画像の導出方法として、非特許文献1で開示されている適応動きベクトル予測(AMVP:Adaptive Motion Vector Prediction)モード或いはマージモードを用いてもよい。 In addition, the motion compensation unit 208 may use the adaptive motion vector prediction (AMVP) mode or merge mode disclosed in Non-Patent Document 1 as a method for deriving motion vectors and reference images.
動き補償部208は、AMVPモードを用いる場合、復号対象ブロックの動きベクトルを導出するために、非特許文献1や非特許文献2で開示されている空間AMVPや時間AMVPやヒストリーベースドAMVP等の方法で、動きベクトル予測(MVP:Motion Vector Prediction)の候補を生成し、復号部201から送られる制御情報に応じてMVPの候補を選択する。 When using AMVP mode, the motion compensation unit 208 generates motion vector prediction (MVP) candidates using methods such as spatial AMVP, temporal AMVP, or history-based AMVP disclosed in Non-Patent Document 1 and Non-Patent Document 2 to derive the motion vector of the block to be decoded, and selects MVP candidates according to the control information sent from the decoding unit 201.
また、動き補償部208は、AMVPモードを用いる場合、復号部201から送られる制御情報に含まれる動きベクトル差分(MVD:Motion Vector Difference)と選択したMVPの候補とを足し合わせて、最終的な動きベクトル及び参照画像を導出する。 In addition, when using AMVP mode, the motion compensation unit 208 adds the motion vector difference (MVD) included in the control information sent from the decoding unit 201 to the selected MVP candidate to derive the final motion vector and reference image.
動き補償部208は、マージモードを用いる場合、復号対象ブロックの動きベクトルを導出するために、非特許文献1や非特許文献2で開示されている空間マージや時間マージや非隣接空間マージやヒストリーベースドマージやペアワイズ平均マージ等からマージ候補(動きベクトル及び参照画像の組み合わせ)を生成し、マージリスト内に登録する。 When using merge mode, the motion compensation unit 208 generates merge candidates (combinations of motion vectors and reference images) from spatial merge, temporal merge, non-adjacent spatial merge, history-based merge, pairwise average merge, etc., as disclosed in Non-Patent Document 1 and Non-Patent Document 2, in order to derive the motion vector of the block to be decoded, and registers them in a merge list.
また、動き補償部208は、マージモードを用いる場合、復号部201から送られる制御情報に含まれるマージインデックスを用いて、マージ候補から最終的な動きベクトル及び参照画像を導出する。 In addition, when using merge mode, the motion compensation unit 208 uses the merge index included in the control information sent from the decoding unit 201 to derive the final motion vector and reference image from the merge candidates.
さらに、動き補償部208は、上述のAMVPモード又はマージモードにより導出された動きベクトルに対して、非特許文献2で開示されている動きベクトルを修正するテンプレートマッチングを適用してもよい。 Furthermore, the motion compensation unit 208 may apply template matching to correct motion vectors, as disclosed in Non-Patent Document 2, to the motion vectors derived in the above-mentioned AMVP mode or merge mode.
具体的に、テンプレートマッチングは、図2に示すように、復号対象ブロックの動きベクトル(Initial MV)を原点として、所定の探索範囲(Search range)でテンプレートコストが最小となる参照位置(すなわち、MVD)を導出して、復号対象ブロックの動きベクトル(Initial MV)に足し合わせ、最終的な動きベクトル(Final MV)を生成するという技術である。 Specifically, as shown in Figure 2, template matching is a technique in which the motion vector (Initial MV) of the block to be decoded is used as the origin, and the reference position (i.e., MVD) that minimizes the template cost within a specified search range is derived, and this is added to the motion vector (Initial MV) of the block to be decoded to generate the final motion vector (Final MV).
ここで、テンプレートコストとは、復号対象ブロックと参照ブロックの左部及び/又は上部に隣接する1ライン又は複数ラインの復号済み画素との絶対値差分和(SAD:Sum of Absolute Difference)やアダマール変換絶対値誤差和(SATD:Sum of Absolute Transformed Difference)である。 Here, the template cost is the sum of absolute differences (SAD) or the sum of absolute Hadamard transformed differences (SATD) between the block to be decoded and one or more lines of decoded pixels adjacent to the left and/or top of the reference block.
また、動き補償部208は、最終的な動きベクトルの生成のみならず、AMVPモードにおけるMVPの候補の選択に対しても、上述したテンプレートコストの比較を適用してもよい。 In addition, the motion compensation unit 208 may apply the above-mentioned template cost comparison not only to generating the final motion vector, but also to selecting MVP candidates in AMVP mode.
すなわち、動き補償部208は、AMVPモードにおいて、テンプレートコストが最小となるMVPを選択してもよい。 In other words, in AMVP mode, the motion compensation unit 208 may select the MVP with the smallest template cost.
テンプレートマッチングの探索範囲は、図2及び非特許文献2で規定されている動きベクトル(Initial MV)を原点として上下左右方向に8画素(±8画素)の範囲で構成されてもよい。 The search range for template matching may be configured as a range of 8 pixels (±8 pixels) in the up, down, left, and right directions, with the motion vector (Initial MV) specified in Figure 2 and Non-Patent Document 2 as the origin.
或いは、テンプレートマッチングの探索範囲は、上述の範囲よりも小さい範囲(例えば、±2、±4、±6画素)や、上述の範囲よりも大きい範囲(例えば、±10、±12、±14画素)で構成されてもよい。 Alternatively, the template matching search range may be configured as a range smaller than the above range (e.g., ±2, ±4, ±6 pixels) or a range larger than the above range (e.g., ±10, ±12, ±14 pixels).
或いは、テンプレートマッチングの探索範囲は、上下左右方向に対して非対称の探索範囲で構成されてもよい。 Alternatively, the template matching search range may be configured as an asymmetric search range in the up/down and left/right directions.
また、テンプレートマッチングにおけるMVDの探索精度は、図2及び非特許文献2で開示されているように、AMVPモード及びマージモードに対する動きベクトルの精度を考慮して制御されてもよい。 Furthermore, the search accuracy of MVD in template matching may be controlled taking into account the accuracy of motion vectors for AMVP mode and merge mode, as disclosed in Figure 2 and non-patent document 2.
例えば、AMVPモードに対して、動きベクトルの精度が非特許文献1で開示されているAMVR(Adaptive Motion Vector Resolution)で4画素精度や整数画素精度である場合は、動き補償部208は、それぞれの画素精度でのみ探索を実施してもよい。 For example, in the AMVP mode, if the motion vector accuracy is AMVR (Adaptive Motion Vector Resolution) disclosed in Non-Patent Document 1, with 4-pixel accuracy or integer pixel accuracy, the motion compensation unit 208 may perform searches only at the respective pixel accuracy levels.
マージモードにおいては、非特許文献1で開示されている動き補償用の代替補間フィルタ(Switchable Interpolation Filter)が有効である場合は、動き補償部208は、図2のように、1/2画素精度及び整数画素精度のみで探索してもよい。 In merge mode, if the alternative interpolation filter for motion compensation (Switchable Interpolation Filter) disclosed in Non-Patent Document 1 is enabled, the motion compensation unit 208 may perform searches only with half-pixel accuracy and integer pixel accuracy, as shown in Figure 2.
最後に、動き補償部208は、上述のように導出された動きベクトル及び参照画像を用いて、復号対象ブロックのインター予測画素を生成する。 Finally, the motion compensation unit 208 generates inter-predicted pixels for the block to be decoded using the motion vector and reference image derived as described above.
<動きベクトルの参照可能領域>
以下、動き補償部208において導出される動きベクトルの参照可能領域について説明する。
<Area where motion vectors can be referenced>
The referenceable area of the motion vector derived by the motion compensation unit 208 will be described below.
図3は、非特許文献1及び非特許文献2で開示されている動き補償部208における動きベクトル導出時の参照可能領域の一例を示す図である。 Figure 3 shows an example of a referenceable area when deriving a motion vector in the motion compensation unit 208 disclosed in Non-Patent Document 1 and Non-Patent Document 2.
画面全体の動きが速い映像シーン(左右方向や上下方向に素早くカメラパンするような映像)では、予測対象の人物、物体、背景等)が参照画像の外側(参照画像外)にある場合、すなわち、動き補償部208で導出される動きベクトルが参照画像外を参照する場合がある。 In video scenes with fast movement across the screen (video in which the camera pans quickly left and right or up and down), the person, object, background, etc. being predicted may be outside the reference image (outside the reference image), i.e., the motion vector derived by the motion compensation unit 208 may refer to an area outside the reference image.
このような場合に対応するために、非特許文献1及び非特許文献2では、参照画像の外側に所定画素数分だけ参照可能な領域を規定している。 To deal with such cases, Non-Patent Documents 1 and 2 define a referenceable area of a certain number of pixels outside the reference image.
具体的には、非特許文献1では、図3(a)に示すように、参照画像外に復号対象ブロック(符号化対象ブロック)の幅又は高さの最大サイズ(すなわち、符号化ツリーブロックの幅又は高さ)(図3の例では、maxCUwidth)に16画素を加えたサイズの反復パディング領域(Repetitive Padding Area)が規定されている。かかる反復パディング領域の大きさ(参照画像の境界からの画素数)として、16画素以外の固定値を設定してもよい。具体的な事例は後述する。 Specifically, Non-Patent Document 1 prescribes a repetitive padding area outside the reference image, as shown in Figure 3(a), whose size is the maximum width or height of the block to be decoded (block to be coded) (i.e., the width or height of the coding tree block) (maxCUwidth in the example of Figure 3) plus 16 pixels. The size of this repetitive padding area (the number of pixels from the boundary of the reference image) may be set to a fixed value other than 16 pixels. Specific examples will be described later.
かかる反復パディング領域は、参照画像の境界に位置する画素値を参照画像の外側方向に複製(パディング)して生成される。 Such repeated padding areas are generated by duplicating (padding) pixel values located on the boundary of the reference image outward from the reference image.
動き補償部208は、参照画像又は反復パディング領域を含む参照可能領域の外側を動きベクトルが参照する場合は、かかる反復パディング領域内に動きベクトルの参照位置を平行移動する(クリップ)する。 When a motion vector references an area outside the referenceable area, including the reference image or the repeated padding area, the motion compensation unit 208 translates (clips) the reference position of the motion vector within the repeated padding area.
次に、非特許文献2では、図3(b)に示すように、参照画像の境界と反復パディング領域との間に、動き補償パディング領域(Motion Compensation Padding Area)が規定されている。 Next, Non-Patent Document 2 defines a motion compensation padding area between the boundary of the reference image and the repeated padding area, as shown in Figure 3(b).
動き補償パディング領域は、動き補償部208における動き補償の精度向上のために、反復パディング領域のような参照画像境界に位置する画素値の複製ではなく、参照画像の参照画素値を割り当てる。 To improve the accuracy of motion compensation in the motion compensation unit 208, the motion compensation padding area assigns reference pixel values from the reference image, rather than duplicating pixel values located on the reference image boundary as in the repeated padding area.
図4に、動き補償パディング領域の具体的な発生例を示す。 Figure 4 shows a specific example of how motion compensation padding areas are generated.
例えば、図4に示すように、復号対象画像の境界を挟んで、復号対象画像内にある復号対象ブロック(BBlk)及び復号対象画像外にある隣接ブロック(MCP Blk)それぞれの参照ブロックが参照画像内にある場合、隣接ブロックに対する参照ブロックは、参照画像の境界画素値の複製ではなく、参照画像内の画素値を保有する。 For example, as shown in Figure 4, if the reference blocks for a block to be decoded (BBlk) within the image to be decoded and an adjacent block (MCP Blk) outside the image to be decoded, which are separated by a boundary between the two, are within the reference image, the reference block for the adjacent block contains pixel values within the reference image, rather than a copy of the boundary pixel values of the reference image.
このような場合において、参照画像境界の画素値の複製ではない参照画素値を動き補償パディング領域として保持することで、動きベクトルが参照画像外で且つ動き補償パディング領域内を参照する場合において、参照画像外に反復パディング領域を規定する場合よりも、動き補償の精度が向上する。 In such cases, by storing reference pixel values that are not duplicates of pixel values at the reference image boundary as the motion compensation padding area, the accuracy of motion compensation is improved when the motion vector references a pixel outside the reference image but within the motion compensation padding area, compared to when a repeated padding area is defined outside the reference image.
動き補償パディング領域の大きさは、非特許文献2に開示されているように、16画素で構成されていてもよいし、図3に示すように、64画素で構成されていてもよい。或いは、動き補償パディング領域の大きさは、これ以外の4画素や8画素や32画素や128画素や256画素といった復号対象ブロックの最小サイズ、最大サイズ又は取りうるサイズ値(2のべき乗の画素数)で構成されていてもよい。 The size of the motion compensation padding area may be 16 pixels, as disclosed in Non-Patent Document 2, or 64 pixels, as shown in Figure 3. Alternatively, the size of the motion compensation padding area may be other than these, such as 4 pixels, 8 pixels, 32 pixels, 128 pixels, or 256 pixels, which is the minimum size, maximum size, or possible size value (number of pixels that is a power of 2) of the block to be decoded.
なお、動きベクトルが、参照画像、動き補償パディング領域又は反復パディング領域を含む参照可能領域の外側を参照する場合、動き補償部208は、かかる反復パディング領域内に動きベクトルの参照位置を平行移動(クリップ)する。 Note that if a motion vector references an area outside the referenceable area, including the reference image, motion compensation padding area, or repeated padding area, the motion compensation unit 208 translates (clips) the reference position of the motion vector within the repeated padding area.
<動きベクトルが参照可能領域外を参照する際のクリップ方法>
以下、動き補償部208が、動きベクトルが参照可能領域外を参照する際のクリップ方法について説明する。
<Clipping method when a motion vector references an area outside the referenceable area>
The clipping method used by the motion compensation unit 208 when a motion vector refers to a region outside the referenceable region will be described below.
第1に、図5及びと図6を用いて、テンプレートマッチングが無効である場合で且つ動きベクトルが参照可能領域外を参照する場合の動きベクトルのクリップ方法について説明する。 First, using Figures 5 and 6, we will explain how to clip a motion vector when template matching is disabled and the motion vector references an area outside the referenceable area.
図5は、非特許文献1で開示されている参照可能領域(参照画像及び反復パディング領域で構成)に対して、動きベクトルが参照画像右側の参照可能領域外を参照する場合のクリップ方法の事例を示している。 Figure 5 shows an example of a clipping method when a motion vector references an area outside the referenceable area (consisting of a reference image and a repeated padding area) to the right of the reference image, as disclosed in Non-Patent Document 1.
非特許文献1では、図5に示すように、動きベクトル(Intitial MV)が参照可能領域外を参照する場合、すなわち、参照ブロック(RefBlk)が参照可能領域外にある場合、動き補償部208は、参照ブロックの左上端を示す動きベクトルを、参照画像の境界から8画素離れた位置に平行移動(クリップ)する。 In Non-Patent Document 1, as shown in Figure 5, when a motion vector (Initial MV) references an area outside the referenceable area, i.e., when the reference block (RefBlk) is outside the referenceable area, the motion compensation unit 208 translates (clips) the motion vector indicating the upper left corner of the reference block to a position 8 pixels away from the boundary of the reference image.
かかるクリップ動作は、参照画像の下方向に動きベクトルが参照画像外を参照する場合についても同様である。 This clipping operation also applies when the motion vector references a location outside the reference image in the downward direction of the reference image.
図6は、非特許文献1で開示されている参照可能領域(参照画像及び反復パディング領域で構成)に対して、動きベクトルが参照画像左側の参照可能領域外を参照する場合のクリップ方法の事例を示している。 Figure 6 shows an example of a clipping method when a motion vector references an area outside the referenceable area (consisting of a reference image and a repeated padding area) to the left of the reference image, as disclosed in Non-Patent Document 1.
非特許文献1では、図6に示すように、動きベクトルが参照可能領域外を参照する場合、すなわち、参照ブロック(RefBlk)が参照可能領域外にある場合、動き補償部208は、参照ブロックの左上端を示す動きベクトル(Intitial MV)を、参照画像の境界から8画素に復号対象ブロックの最大幅(maxCUwidth)或いは最大高さを加えた距離だけ離れた位置に平行移動(クリップ)する。 In Non-Patent Document 1, as shown in Figure 6, when a motion vector references an area outside the referenceable area, i.e., when the reference block (RefBlk) is outside the referenceable area, the motion compensation unit 208 translates (clips) the motion vector (Initial MV) indicating the upper left corner of the reference block to a position that is 8 pixels away from the boundary of the reference image plus the maximum width (maxCUwidth) or maximum height of the block to be decoded.
かかるクリップ動作は、参照画像の上方向に動きベクトルが参照画像外を参照する場合についても同様である。 This clipping operation also applies when the motion vector references an area outside the reference image in the upward direction of the reference image.
非特許文献1では、かかる参照画像の境界或いは参照可能領域の境界から8画素離れた位置に動きベクトルがクリップされるため、図5及び図6で示すように、仮に参照ブロック(RefBlk)の幅或いは高さが、復号対象ブロックの最大幅或いは最大高さであっても、図5及び図6に示すように、参照ブロック(RefBlk)は、参照可能領域内に収容される。 In Non-Patent Document 1, the motion vector is clipped to a position 8 pixels away from the boundary of the reference image or the boundary of the referenceable area. Therefore, as shown in Figures 5 and 6, even if the width or height of the reference block (RefBlk) is the maximum width or height of the block to be decoded, the reference block (RefBlk) will be contained within the referenceable area, as shown in Figures 5 and 6.
さらに、参照可能領域の境界から参照画像方向に対して8画素確保されているため、動きベクトルが小数画素精度位置を参照する場合であっても、動き補償画素を生成する際に適用する動き補償補間フィルタ(非特許文献1では8タップ、非特許文献2では12タップ)のための、参照ブロックの左右及び上下方向の参照画素(8タップの場合は、ブロックの左側及び上側で3画素が必要で、右側及び下側で4画素が必要であり、12タップの場合は、ブロックの左側及び上側で5画素が必要であり、右側及び下側で6画素が必要である)が確保されている。 Furthermore, because eight pixels are secured from the boundary of the referenceable area in the direction of the reference image, even when the motion vector references a position with fractional pixel accuracy, reference pixels are secured to the left, right, and top and bottom of the reference block for the motion compensation interpolation filter (eight taps in Non-Patent Document 1, 12 taps in Non-Patent Document 2) used to generate motion compensation pixels (in the case of eight taps, three pixels are required on the left and top of the block, and four pixels are required on the right and bottom; in the case of 12 taps, five pixels are required on the left and top of the block, and six pixels are required on the right and bottom).
なお、動き補償部208は、動き補償補間フィルタのタップ数(フィルタ長)に応じて、かかる参照可能領域の反復パディング領域の画素数を変更してもよい。 Note that the motion compensation unit 208 may change the number of pixels in the repeated padding area of the referenceable area depending on the number of taps (filter length) of the motion compensation interpolation filter.
具体的には、動き補償部208は、かかる反復パディング領域の大きさとして、上述の16画素以外に、符号化ブロック(復号対象ブロック)の最小幅又は最小高さの倍数(べき数)で規定してもよい。 Specifically, the motion compensation unit 208 may specify the size of such repeated padding area as a multiple (power) of the minimum width or height of the coding block (block to be decoded), in addition to the above-mentioned 16 pixels.
例えば、動き補償部208は、符号化ブロック(復号対象ブロック)の最小幅が4画素である場合、かかる反復パディング領域の大きさとして、8画素、32画素、64画素のような固定値で設定してもよい。 For example, if the minimum width of the coding block (block to be decoded) is 4 pixels, the motion compensation unit 208 may set the size of the repeated padding area to a fixed value such as 8 pixels, 32 pixels, or 64 pixels.
或いは、反復パディング領域の幅或いは高さの画素数は、復号対象ブロックの最大幅或いは最大高さに対して、それぞれ動き補償補間フィルタのタップ数(フィルタ長)Tよりも大きな画素数、すなわち、T+αを加えて構成されていてもよい。 Alternatively, the number of pixels in the width or height of the repeated padding area may be calculated by adding a number of pixels greater than the number of taps (filter length) T of the motion compensation interpolation filter, i.e., T + α, to the maximum width or height of the block to be decoded.
この動き補償補間フィルタのタップ数(フィルタ長)Tよりも大きな画素数T+αとしては、例えば、T+α=kT(e.g., k=1.1、1.2、1.3、1.4、1.5、2.0)といったTの1.0倍から2.0倍の固定値で設定してもよい。
なお、動き補償部208は、動き補償補間フィルタのタップ数(フィルタ長)に応じて、動きベクトル参照可能領域の外側を参照する場合、かかる参照画像の境界或いは参照可能領域の境界からの動きベクトルのクリップ位置(図5及び図6の事例では、8画素)を動き補償補間フィルタのタップ数が収容できるように、予め設定を変更してもよい。
The number of pixels T+α, which is greater than the number of taps (filter length) T of this motion compensation interpolation filter, may be set to a fixed value between 1.0 and 2.0 times T, such as T+α=kT (e.g., k=1.1, 1.2, 1.3, 1.4, 1.5, 2.0).
In addition, when the motion compensation unit 208 references the area outside the motion vector referenceable area, the motion compensation unit 208 may change the settings in advance depending on the number of taps (filter length) of the motion compensation interpolation filter so that the clip position of the motion vector from the boundary of the reference image or the boundary of the referenceable area (8 pixels in the examples of Figures 5 and 6) can be accommodated by the number of taps of the motion compensation interpolation filter.
具体的には、反復パディング領域の幅或いは高さの画素数が、上述の図5及び図6に示すように、復号対象ブロックの最大幅或いは最大高さに対して、それぞれ動き補償補間フィルタのタップ数(フィルタ長)よりも大きな画素数を加えて構成される場合、動き補償部208は、動きベクトルのクリップ位置を(T+α)/2画素だけ、かかる参照画像の境界或いは参照可能領域の境界からそれぞれ離れた位置にクリップしてもよい。 Specifically, if the number of pixels in the width or height of the repeated padding area is calculated by adding a number of pixels greater than the number of taps (filter length) of the motion compensation interpolation filter to the maximum width or maximum height of the block to be decoded, as shown in Figures 5 and 6 above, the motion compensation unit 208 may clip the motion vector clip position to a position that is (T + α)/2 pixels away from the boundary of the reference image or the boundary of the referenceable area, respectively.
第2に、図7~図10を用いて、テンプレートマッチングが有効である場合で且つ動きベクトルが参照可能領域外を参照する場合の動きベクトルのクリップ方法について説明する。 Secondly, using Figures 7 to 10, we will explain how to clip a motion vector when template matching is enabled and the motion vector references an area outside the referenceable area.
図7~図10は、テンプレートマッチングが有効である場合で且つ動きベクトルが参照可能領域外を参照する場合に、かかる動きベクトルをクリップする一例を示す図である。 Figures 7 to 10 show an example of clipping a motion vector when template matching is enabled and the motion vector references an area outside the referenceable area.
図7及び図8は、非特許文献1で開示されている参照可能領域(参照画像及び反復パディング領域で構成)に対して、動きベクトルが参照画像右側の参照可能領域外を参照する場合のクリップ方法の事例を示している。 Figures 7 and 8 show examples of clipping methods when a motion vector references an area outside the referenceable area (consisting of a reference image and a repeated padding area) to the right of the reference image, as disclosed in Non-Patent Document 1.
図7及び図8に示すケースでは、共通してテンプレートマッチングが有効であるため、図5に示すケースとは異なり、動きベクトル(Initial MV)の参照位置が、参照画像の境界から8画素離れた位置に平行移動(クリップ)されるのではなく、かかる動きベクトルを原点としたテンプレートマッチングの探索範囲の左端位置が同位置に平行移動(クリップ)される。 In the cases shown in Figures 7 and 8, template matching is enabled in both cases, so unlike the case shown in Figure 5, the reference position of the motion vector (Initial MV) is not translated (clipped) to a position 8 pixels away from the boundary of the reference image, but rather the left edge position of the template matching search range, which has the motion vector as its origin, is translated (clipped) to the same position.
かかるクリップ動作は、参照画像の下方向に動きベクトルが参照画像外を参照する場合についても同様である。 This clipping operation also applies when the motion vector references a location outside the reference image in the downward direction of the reference image.
ここで、図7に示すケースでは、テンプレートマッチングの探索範囲(8画素×2+RefBlkの幅)が反復パディング領域のクリップ位置から参照可能領域の境界までに収容される画素数であるため、すなわち、テンプレートマッチングの探索範囲が、図7に示すように、参照可能領域の境界外側方向に超えないため、テンプレートマッチングの探索を実行できる。 Here, in the case shown in Figure 7, the template matching search range (8 pixels x 2 + width of RefBlk) is the number of pixels that can fit from the clip position of the repeated padding area to the boundary of the referenceable area. In other words, the template matching search range does not extend beyond the boundary of the referenceable area, as shown in Figure 7, so the template matching search can be performed.
一方、図8に示すケースでは、テンプレートマッチングの探索範囲(8画素×2+RefBlkの幅)が反復パディング領域のクリップ位置から参照可能領域の境界までに収容されない画素数であるため、すなわち、テンプレートマッチングの探索範囲が、図8に示すように、参照可能領域の境界外側方向に超えるため、テンプレートマッチングの探索を実行できない。 On the other hand, in the case shown in Figure 8, the template matching search range (8 pixels x 2 + width of RefBlk) is a number of pixels that cannot be accommodated from the clip position of the repeated padding area to the boundary of the referenceable area. In other words, the template matching search range extends beyond the boundary of the referenceable area, as shown in Figure 8, so template matching search cannot be performed.
なお、図8に示すケースでも、動きベクトルの参照位置が、小数画素精度位置になる場合は、動き補償補間フィルタのタップ数次第では、図7のケースと同様に、テンプレートマッチングの探索範囲が参照可能領域の境界外側方向に越える場合がある。 Note that even in the case shown in Figure 8, if the reference position of the motion vector is a decimal pixel accuracy position, the template matching search range may extend outside the boundary of the referenceable area, depending on the number of taps of the motion compensation interpolation filter, just as in the case of Figure 7.
かかるテンプレートマッチングが有効時の探索範囲の動作は、参照画像の下方向に動きベクトルが参照画像外を参照する場合についても同様である。 The search range behavior when template matching is enabled is also the same when the motion vector references a location outside the reference image in the downward direction of the reference image.
図9及び図10は、非特許文献1で開示されている参照可能領域(参照画像及び反復パディング領域で構成)に対して、動きベクトルが参照画像左側の参照可能領域外を参照する場合のクリップ方法の事例を示している。 Figures 9 and 10 show an example of a clipping method when a motion vector references an area outside the referenceable area (consisting of a reference image and a repeated padding area) to the left of the reference image, as disclosed in Non-Patent Document 1.
図9及び図10に示すケースでは、共通してテンプレートマッチングが有効であるため、図6に示すケースとは異なり、動きベクトルの参照位置が、参照可能領域の境界から8画素離れた位置に平行移動(クリップ)されるのではなく、かかる動きベクトルを原点としたテンプレートマッチングの探索範囲の左端位置が同位置に平行移動(クリップ)される。 In the cases shown in Figures 9 and 10, template matching is enabled in both cases, so unlike the case shown in Figure 6, the reference position of the motion vector is not translated (clipped) to a position 8 pixels away from the boundary of the referenceable area, but rather the left edge position of the template matching search range, which has the motion vector as its origin, is translated (clipped) to the same position.
かかるクリップ動作は、参照画像の上方向に動きベクトルが参照画像外を参照する場合についても同様である。 This clipping operation also applies when the motion vector references an area outside the reference image in the upward direction of the reference image.
ここで、図9に示すケースでは、テンプレートマッチング探索範囲(8画素×2+RefBlkの幅)が反復パディング領域のクリップ位置から参照画像領域の境界までに収容される画素数であるため、すなわち、テンプレートマッチングの探索範囲が、図9に示すように、参照画像の境界内側方向に超えないため、テンプレートマッチングの探索を実行できる。 Here, in the case shown in Figure 9, the template matching search range (8 pixels x 2 + width of RefBlk) is the number of pixels that can fit from the clip position of the repeated padding area to the boundary of the reference image area. In other words, the template matching search range does not extend inward toward the boundary of the reference image, as shown in Figure 9, so the template matching search can be performed.
一方、図10に示すケースでは、テンプレートマッチング探索範囲(8画素×2+RefBlkの幅)が反復パディング領域のクリップ位置から参照画像領域の境界までに収容されない画素数であるため、すなわち、テンプレートマッチングの探索範囲が、図10に示すように、参照画像の境界内側方向を越えるため、テンプレートマッチングの探索を実行できるが、テンプレートマッチングの探索範囲内で参照画像の境界内側を超えた領域のみ参照画像境界にある画素値が反復されてない画素値を持つことになる。 On the other hand, in the case shown in Figure 10, the template matching search range (8 pixels x 2 + width of RefBlk) is the number of pixels that cannot be accommodated from the clip position of the repeated padding area to the boundary of the reference image area. In other words, the template matching search range extends beyond the inside of the reference image boundary as shown in Figure 10. Therefore, template matching search can be performed, but only in the area within the template matching search range that extends beyond the inside of the reference image boundary will the pixel values at the reference image boundary have pixel values that are not repeated.
すなわち、テンプレートマッチングの探索範囲にある画素値において、上述の参照画像の境界内側方向には、左右方向における画素値の不均一性が生じるため、左右方向の動きベクトル差分(MVD)が生成され、テンプレートマッチングにより左右方向に動きベクトルが修正される(本ケースにおいて、参照画像の境界内側方向を越えない場合は、上下方向のみMVDのみが発生する)。 In other words, for pixel values within the template matching search range, non-uniformity in pixel values occurs in the left-right direction inside the boundary of the reference image mentioned above, so a left-right motion vector differential (MVD) is generated and the motion vector is corrected in the left-right direction by template matching (in this case, if the direction does not go beyond the inside boundary of the reference image, only MVD occurs in the up-down direction).
かかるテンプレートマッチングが有効時の探索範囲の動作は、参照画像の上方向に動きベクトルが参照画像外を参照する場合についても同様である。 The search range behavior when template matching is enabled is also the same when the motion vector references an area outside the reference image in the upward direction of the reference image.
図6~図10では、図3で説明した非特許文献2に示す動き補償パディング領域が存在しないケースに基づいて、テンプレートマッチングが有効な場合で且つ動きベクトルが参照可能領域外を参照する場合に生じるケースの課題を説明した。 Figures 6 to 10 explain the issues that arise when template matching is enabled and a motion vector references an area outside the referenceable area, based on the case where there is no motion compensation padding area as shown in Non-Patent Document 2 and explained in Figure 3.
一方、非特許文献2の動き補償パディング領域があるケースにおいても同じ課題は生じる。何故なら、非特許文献2において、動きベクトルが参照可能領域外を参照する場合に動きベクトルがクリップされる位置は、動き補償パディング領域が存在する前提で設定されているためである。 On the other hand, the same problem occurs in the case of the motion compensation padding area described in Non-Patent Document 2. This is because, in Non-Patent Document 2, the position to which the motion vector is clipped when it references an area outside the referenceable area is set on the assumption that a motion compensation padding area exists.
具体的に、図5に対しては、動きベクトルは、参照画像の境界ではなく、動き補償パディング領域の境界から8画素だけ参照可能領域の境界方向に離れた位置にクリップされる。なお、かかるクリップ動作は、参照画像の上方向に動きベクトルが参照画像外を参照する場合についても同様である。
また、図6に対しては、動きベクトルは、参照画像の境界ではなく、動き補償パディング領域の境界から8画素+復号対象ブロックの最大幅だけ参照可能領域の境界方向に離れた位置(すなわち、参照可能領域の境界から参照画像方向に8画素離れた位置)にクリップされる。なお、かかるクリップ動作は、参照画像の上方向に動きベクトルが参照画像外を参照する場合についても同様である。
5, the motion vector is clipped not to the boundary of the reference image but to a position 8 pixels away from the boundary of the motion compensation padding area toward the boundary of the referenceable area. Note that this clipping operation is also the same when the motion vector references an area outside the reference image in the upward direction of the reference image.
6, the motion vector is clipped not at the boundary of the reference image but at a position that is 8 pixels away from the boundary of the motion compensation padding area plus the maximum width of the block to be decoded in the direction of the boundary of the referenceable area (i.e., a position that is 8 pixels away from the boundary of the referenceable area in the direction of the reference image). Note that this clipping operation is also the same when the motion vector references an area outside the reference image in the upward direction of the reference image.
かかる課題を解消するために、動き補償部208は、以下の解決方法1~3の少なくもいずれか一つを選択する。 To resolve this issue, the motion compensation unit 208 selects at least one of the following solutions 1 to 3.
<解決方法1:テンプレートマッチングの探索範囲の制御/制限>
動き補償部208は、動きベクトルが参照可能領域外を参照する場合、テンプレートマッチングが有効であるか否かに応じて、テンプレートマッチングの探索範囲を制御する。
<Solution 1: Controlling/Limiting the Search Range of Template Matching>
When a motion vector references a region outside the referenceable region, the motion compensation unit 208 controls the search range of template matching depending on whether template matching is valid or not.
或いは、動き補償部208は、動きベクトルが参照可能領域外を参照する場合、テンプレートマッチングが有効であるか否か及び参照ブロックの幅、高さ又はサイズに応じて、テンプレートマッチングの探索範囲を制御してもよい。 Alternatively, when a motion vector references an area outside the referenceable area, the motion compensation unit 208 may control the search range for template matching depending on whether template matching is enabled and the width, height, or size of the reference block.
具体的に、動き補償部208は、参照ブロックの幅、高さ又はサイズ及びテンプレートマッチングの探索範囲と所定画素数との比較により、テンプレートマッチングの探索範囲を制御してもよい。 Specifically, the motion compensation unit 208 may control the template matching search range by comparing the width, height, or size of the reference block and the template matching search range with a predetermined number of pixels.
ここで、所定画素数とは、例えば、符号化対象ブロック(復号対象ブロック)の最大幅、最大高さ又は最大サイズとしてもよいし、予め規定した画素数T+α(上述の図5から図10で示した事例では8画素)としてもよい。 Here, the specified number of pixels may be, for example, the maximum width, maximum height, or maximum size of the block to be coded (block to be decoded), or it may be a predetermined number of pixels T + α (8 pixels in the examples shown in Figures 5 to 10 above).
具体的には、動き補償部208は、以下の式が満たされる場合は、テンプレートマッチングの探索範囲を維持し、以下の式が満たされない場合は、テンプレートマッチングの探索範囲を制限する。 Specifically, the motion compensation unit 208 maintains the template matching search range if the following formula is satisfied, and limits the template matching search range if the following formula is not satisfied.
CuWidth+TmPmWidth<maxCUwidth+(T+α)/2
ここで、CuWidthは、復号対象ブロック(参照ブロック)の幅であり、TmPmWidthは、テンプレートマッチングの探索幅(非特許文献2では±8画素=16画素)であり、maxCUwidthは、復号対象ブロック(参照ブロック)の最大幅である。また、T+αは、上述した通り、補間フィルタのタップ数(フィルタ長)に所定画素数αを加えた値である。
CuWidth+TmPmWidth<maxCUwidth+(T+α)/2
Here, CuWidth is the width of the block to be decoded (reference block), TmPmWidth is the search width of template matching (±8 pixels = 16 pixels in Non-Patent Document 2), and maxCUwidth is the maximum width of the block to be decoded (reference block). Also, as described above, T + α is the value obtained by adding a predetermined number of pixels α to the number of taps (filter length) of the interpolation filter.
動き補償部208は、テンプレートマッチングの探索範囲の削減方法を用いる場合、図11に示すように、動きベクトルが参照可能領域外を参照する方向の探索を全て禁止する(図11の例では、左右方向の探索幅を制限する)。 When using the template matching search range reduction method, the motion compensation unit 208 prohibits all searches in directions in which the motion vector references areas outside the referenceable area, as shown in Figure 11 (in the example of Figure 11, the search width in the left and right directions is limited).
すなわち、テンプレートマッチングの探索範囲は、上下方向のみになるため、テンプレートマッチングで生成されるMVDは、図11に示すように、上下方向のみの成分を持つ。 In other words, the search range for template matching is limited to the vertical direction, so the MVD generated by template matching contains components only in the vertical direction, as shown in Figure 11.
図11では、動きベクトルが参照可能領域外の右側を参照する場合の一例を示したが、動きベクトルが参照可能領域外の左側を参照する場合であっても、同じ方法で、テンプレートマッチングの探索範囲を制限することで、動きベクトルを原点として参照画像境界を越えてテンプレートマッチングされるようなケースを回避できる。 Figure 11 shows an example where the motion vector references the right side outside the referenceable area, but even if the motion vector references the left side outside the referenceable area, by limiting the template matching search range in the same way, it is possible to avoid cases where template matching is performed across the reference image boundary with the motion vector as the origin.
同様に、動き補償部208は、動きベクトルが参照可能領域外の上側、下側を参照する場合であっても、同じ方法を適用することで対処できる。 Similarly, the motion compensation unit 208 can apply the same method to cases where the motion vector references the upper or lower side outside the referenceable area.
或いは、動き補償部208は、上述のような参照可能領域外への参照方向のみを対象としたテンプレートマッチングの探索範囲の一括制限(禁止)ではなく、テンプレートマッチングの探索範囲の画素数を削減してもよい。 Alternatively, the motion compensation unit 208 may reduce the number of pixels in the template matching search range, rather than restricting (prohibiting) the template matching search range in a lump, which only targets reference directions outside the referenceable area, as described above.
さらに、動き補償部208は、復号対象ブロック(参照ブロック)の幅、高さ又はサイズ(画素数)に応じて、テンプレートマッチングの画素数の削減数を、制御してもよい。 Furthermore, the motion compensation unit 208 may control the number of pixels reduced in template matching depending on the width, height, or size (number of pixels) of the block to be decoded (reference block).
<解決方法2:動きベクトルのクリップ位置の修正>
動き補償部208は、動きベクトルが参照可能領域外を参照する場合、テンプレートマッチングが有効であるか否かに応じて、動きベクトルのクリップ位置を制御する。
<Solution 2: Correcting the clip position of the motion vector>
When a motion vector references a region outside the referenceable region, the motion compensation unit 208 controls the clip position of the motion vector depending on whether template matching is valid or not.
具体的には、動き補償部208は、テンプレートマッチングが有効ではない場合は、上述の図5及び図6で説明した位置に、動きベクトルの参照位置を平行移動(クリップ)する。 Specifically, when template matching is not effective, the motion compensation unit 208 translates (clips) the reference position of the motion vector to the position described above in Figures 5 and 6.
一方、動き補償部208は、テンプレートマッチングが有効である場合は、図12及び図13に示す位置(すなわち、図2では参照画像の境界、図13では参照可能領域の境界)に、それぞれ動きベクトルの参照位置を平行移動(クリップ)する。 On the other hand, when template matching is enabled, the motion compensation unit 208 translates (clips) the reference position of the motion vector to the positions shown in Figures 12 and 13 (i.e., the boundary of the reference image in Figure 2, and the boundary of the referenceable area in Figure 13).
ここで、それぞれのクリップ位置が小数画素精度である場合は、動き補償部208は、クリップ位置を整数画素精度の位置に(常に)丸めてもよい。これにより、動き補償補間フィルタが不要になり、図12及び図13に示すように、反復パディング領域内にテンプレートの探索範囲が収容される。 Here, if each clip position has fractional pixel accuracy, the motion compensation unit 208 may (always) round the clip position to a position with integer pixel accuracy. This eliminates the need for a motion compensation interpolation filter, and the template search range is accommodated within the repeated padding area, as shown in Figures 12 and 13.
なお、図12及び図13の例では、テンプレートマッチングの探索範囲を16画素(±8画素)、反復パディング領域の符号化対象ブロック(復号対象ブロック)の最大幅を除いた領域の画素数を16画素(反復パディングリザーブ領域)としているが、テンプレートマッチングの探索範囲が16画素以上になる場合は、反復パディングリザーブ領域をテンプレートマッチングの探索範囲にあわせて16画素以上に設定することで、同様に対処できる。 In the examples of Figures 12 and 13, the template matching search range is 16 pixels (±8 pixels), and the number of pixels in the repeated padding area excluding the maximum width of the block to be coded (block to be decoded) is 16 pixels (repeated padding reserve area). However, if the template matching search range is more than 16 pixels, the same issue can be addressed by setting the repeated padding reserve area to 16 pixels or more to match the template matching search range.
変更例として、動き補償部208は、テンプレートマッチングが有効であるか否かに関わらず、上述した位置、に動きベクトルをクリップしてもよい。 As a modification, the motion compensation unit 208 may clip the motion vector to the above-mentioned position, regardless of whether template matching is valid or not.
<解決方法3:反復パディング領域の拡張>
動き補償部208は、テンプレートマッチングが有効である場合、反復パディング領域を拡張する。
<Solution 3: Expanding the repeat padding area>
The motion compensation unit 208 extends the repeated padding area if template matching is effective.
具体的には、動き補償部208は、テンプレートマッチングの探索範囲に応じて、反復パディング領域をテンプレートマッチングの探索範囲の画素数分だけ、テンプレートマッチングが無効時の規定領域に対して拡張する。 Specifically, the motion compensation unit 208 expands the repeated padding area by the number of pixels in the template matching search range relative to the specified area when template matching is disabled, depending on the template matching search range.
本実施形態に係る画像復号装置200によれば、動きベクトルが参照画像を含む参照可能領域外を超えてテンプレートマッチングすることを回避することができる。 The image decoding device 200 according to this embodiment can prevent template matching when the motion vector goes beyond the referenceable area that includes the reference image.
動き補償部208は、テンプレートマッチングが有効であるか否かを、復号部201で復号或いは推定される制御情報に基づいて判定してもよい。 The motion compensation unit 208 may determine whether template matching is effective based on control information decoded or estimated by the decoding unit 201.
具体的には、制御情報には、テンプレートマッチングが有効であるか否かを特定するための符号化対象ブロック(復号対象ブロック)単位のフラグが含まれてもよく、動き補償部208は、このフラグの値に基づいて判定できる。 Specifically, the control information may include a flag for each block to be coded (block to be decoded) that specifies whether template matching is enabled or disabled, and the motion compensation unit 208 can make a determination based on the value of this flag.
例えば、動き補償部208は、かかるフラグの値が1の場合は、テンプレートマッチングが有効であり、かかるフラグが0の場合は、テンプレートマッチングが無効であると判定してもよい。 For example, the motion compensation unit 208 may determine that template matching is enabled when the value of such a flag is 1, and that template matching is disabled when the value of such a flag is 0.
また、制御情報には、この符号化対象ブロック(復号対象ブロック)単位より前に、シーケンス単位又はピクチャ単位又はスライス単位で、テンプレートマッチングが有効であるか否かを特定するためのフラグが含まれてもよく、復号部201は、1つ前の階層のフラグ(ブロックに対してはスライス、スライスに対してはピクチャ)の復号結果に基づいて復号するか否かを制御してもよい。 The control information may also include a flag for specifying whether template matching is enabled or disabled for each sequence, picture, or slice before the current block to be coded (current block to be decoded), and the decoding unit 201 may control whether to decode based on the decoding result of the flag for the previous layer (slice for blocks, picture for slices).
上述の画像復号装置200は、コンピュータに各機能(各工程)を実行させるプログラムであって実現されていてもよい。 The above-described image decoding device 200 may be realized as a program that causes a computer to execute each function (each process).
なお、本実施形態によれば、例えば、動画像通信において総合的なサービス品質の向上を実現できることから、国連が主導する持続可能な開発目標(SDGs)の目標9「レジリエントなインフラを整備し、持続可能な産業化を推進するとともに、イノベーションの拡大を図る」に貢献することが可能となる。 Note that, according to this embodiment, it is possible to achieve an improvement in overall service quality in video communication, for example, and therefore contribute to the achievement of Goal 9 of the United Nations-led Sustainable Development Goals (SDGs), which is to "Develop resilient infrastructure, promote sustainable industrialization and foster innovation."
200…画像復号装置
201…復号部
202…逆量子化部
203…逆変換部
204…イントラ予測部
206…加算器
207…蓄積部
208…動き補償部
210…符号入力部
220…画像出力部
200... Image decoding device 201... Decoding unit 202... Inverse quantization unit 203... Inverse transform unit 204... Intra prediction unit 206... Adder 207... Storage unit 208... Motion compensation unit 210... Code input unit 220... Image output unit
Claims (5)
制御情報を復号する復号部と、
復号済み画素と前記制御情報とに基づいて第1予測画素を生成するイントラ予測部と、
前記復号済み画素を蓄積する蓄積部と、
前記蓄積された復号済み画素と前記制御情報とに基づいて第2予測画素を生成する動き補償部とを具備し、
前記動き補償部は、動きベクトルが参照画像を含む参照可能領域外を参照する場合に、テンプレートマッチングが有効であるか否かに応じて、前記動きベクトルのクリップ位置を制御することを特徴とする画像復号装置。 An image decoding device,
a decoding unit that decodes the control information;
an intra prediction unit that generates a first predicted pixel based on a decoded pixel and the control information;
a storage unit that stores the decoded pixels;
a motion compensation unit that generates a second predicted pixel based on the stored decoded pixel and the control information,
An image decoding device characterized in that the motion compensation unit controls the clip position of the motion vector depending on whether template matching is valid or not when the motion vector references a reference area outside the referenceable area including the reference image.
制御情報を復号する復号部と、
復号済み画素と前記制御情報とに基づいて第1予測画素を生成するイントラ予測部と、
前記復号済み画素を蓄積する蓄積部と、
前記蓄積された復号済み画素と前記制御情報とに基づいて第2予測画素を生成する動き補償部とを具備し、
前記動き補償部は、動きベクトルが参照画像を含む参照可能領域外を参照する場合に、テンプレートマッチングが有効であるか否か及び復号対象ブロックの幅又は高さに応じて、前記テンプレートマッチングの探索範囲を制限することを特徴とする画像復号装置。 An image decoding device,
a decoding unit that decodes the control information;
an intra prediction unit that generates a first predicted pixel based on a decoded pixel and the control information;
a storage unit that stores the decoded pixels;
a motion compensation unit that generates a second predicted pixel based on the stored decoded pixel and the control information,
The image decoding device is characterized in that, when a motion vector references a region outside a referenceable region including a reference image, the motion compensation unit limits the search range of the template matching depending on whether template matching is valid and the width or height of the block to be decoded.
制御情報を復号する工程Aと、
復号済み画素と前記制御情報とに基づいて第1予測画素を生成する工程Bと、
前記復号済み画素を蓄積する工程Cと、
前記蓄積された復号済み画素と前記制御情報とに基づいて第2予測画素を生成する工程Dとを有し、
前記工程Dにおいて、動きベクトルが参照画像を含む参照可能領域外を参照する場合に、テンプレートマッチングが有効であるか否かに応じて、前記動きベクトルのクリップ位置を制御することを特徴とする画像復号方法。 An image decoding method, comprising:
a step A of decoding control information;
a step B of generating a first predicted pixel based on the decoded pixel and the control information;
a step C of storing the decoded pixels;
a step D of generating a second predicted pixel based on the stored decoded pixel and the control information,
An image decoding method characterized in that in step D, when a motion vector references a region outside a referenceable area including a reference image, the clip position of the motion vector is controlled depending on whether template matching is valid or not.
前記画像復号装置は、
制御情報を復号する復号部と、
復号済み画素と前記制御情報とに基づいて第1予測画素を生成するイントラ予測部と、
前記復号済み画素を蓄積する蓄積部と、
前記蓄積された復号済み画素と前記制御情報とに基づいて第2予測画素を生成する動き補償部とを具備し、
前記動き補償部は、動きベクトルが参照画像を含む参照可能領域外を参照する場合に、テンプレートマッチングが有効であるか否かに応じて、前記動きベクトルのクリップ位置を制御することを特徴とするプログラム。 A program that causes a computer to function as an image decoding device,
The image decoding device comprises:
a decoding unit that decodes the control information;
an intra prediction unit that generates a first predicted pixel based on a decoded pixel and the control information;
a storage unit that stores the decoded pixels;
a motion compensation unit that generates a second predicted pixel based on the stored decoded pixel and the control information,
A program characterized in that the motion compensation unit controls the clip position of the motion vector depending on whether template matching is valid or not when the motion vector references a region outside the referenceable region including the reference image.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2022209474A JP7827614B2 (en) | 2022-12-27 | 2022-12-27 | Image decoding device, image decoding method, and program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2022209474A JP7827614B2 (en) | 2022-12-27 | 2022-12-27 | Image decoding device, image decoding method, and program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2024093233A JP2024093233A (en) | 2024-07-09 |
| JP7827614B2 true JP7827614B2 (en) | 2026-03-10 |
Family
ID=91804592
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2022209474A Active JP7827614B2 (en) | 2022-12-27 | 2022-12-27 | Image decoding device, image decoding method, and program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7827614B2 (en) |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2019139013A1 (en) | 2018-01-09 | 2019-07-18 | シャープ株式会社 | Motion vector derivation device, moving image decoding device, and moving image encoding device |
| JP2020522960A (en) | 2017-06-09 | 2020-07-30 | エレクトロニクス アンド テレコミュニケーションズ リサーチ インスチチュートElectronics And Telecommunications Research Institute | Image encoding/decoding method, device, and recording medium storing bitstream |
| JP2024514113A (en) | 2021-04-12 | 2024-03-28 | クゥアルコム・インコーポレイテッド | Template matching-based affine prediction for video coding |
-
2022
- 2022-12-27 JP JP2022209474A patent/JP7827614B2/en active Active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2020522960A (en) | 2017-06-09 | 2020-07-30 | エレクトロニクス アンド テレコミュニケーションズ リサーチ インスチチュートElectronics And Telecommunications Research Institute | Image encoding/decoding method, device, and recording medium storing bitstream |
| WO2019139013A1 (en) | 2018-01-09 | 2019-07-18 | シャープ株式会社 | Motion vector derivation device, moving image decoding device, and moving image encoding device |
| JP2024514113A (en) | 2021-04-12 | 2024-03-28 | クゥアルコム・インコーポレイテッド | Template matching-based affine prediction for video coding |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2024093233A (en) | 2024-07-09 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11956462B2 (en) | Video processing methods and apparatuses for sub-block motion compensation in video coding systems | |
| JP7319440B2 (en) | Video encoding method, video decoding method, and recording medium | |
| US20240163453A1 (en) | Method and apparatus for processing video signal based on inter prediction | |
| US11451824B2 (en) | Motion vector refinement search with integer pixel resolution | |
| JP6855411B2 (en) | Predicted motion vector guidance method and equipment using that method | |
| KR101711688B1 (en) | Motion vector prediction and refinement | |
| KR102731944B1 (en) | Motion vector refinement for multi-reference prediction | |
| US12395644B2 (en) | Affine model-based image encoding/decoding method and device | |
| KR102094436B1 (en) | Method for inter prediction and apparatus thereof | |
| JP2020526112A (en) | Search area for motion vector refinement | |
| WO2013036041A2 (en) | Method for deriving a temporal predictive motion vector, and apparatus using the method | |
| WO2013009104A2 (en) | Inter prediction method and apparatus for same | |
| WO2023208224A1 (en) | Method and apparatus for complexity reduction of video coding using merge with mvd mode | |
| CN116471418B (en) | Inter-frame prediction methods, encoders, decoders, and computer storage media | |
| US12407851B2 (en) | Method and apparatus for implicitly indicating motion vector predictor precision | |
| JP7827614B2 (en) | Image decoding device, image decoding method, and program | |
| KR102435445B1 (en) | Method and apparatus for encoding/decoding a video signal | |
| WO2023208189A1 (en) | Method and apparatus for improvement of video coding using merge with mvd mode with template matching | |
| JP2012070152A (en) | Video encoding device, video encoding method and program | |
| WO2019072369A1 (en) | Motion vector list pruning |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20250225 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20251210 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20260203 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20260226 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7827614 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |