[go: up one dir, main page]

JP7200074B2 - Image decoding device, image decoding method and program - Google Patents

Image decoding device, image decoding method and program Download PDF

Info

Publication number
JP7200074B2
JP7200074B2 JP2019172136A JP2019172136A JP7200074B2 JP 7200074 B2 JP7200074 B2 JP 7200074B2 JP 2019172136 A JP2019172136 A JP 2019172136A JP 2019172136 A JP2019172136 A JP 2019172136A JP 7200074 B2 JP7200074 B2 JP 7200074B2
Authority
JP
Japan
Prior art keywords
block
boundary
processing
prof
prediction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2019172136A
Other languages
Japanese (ja)
Other versions
JP2021052228A (en
Inventor
恭平 海野
圭 河村
整 内藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
KDDI Corp
Original Assignee
KDDI Corp
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 KDDI Corp filed Critical KDDI Corp
Priority to JP2019172136A priority Critical patent/JP7200074B2/en
Priority to PCT/JP2020/031565 priority patent/WO2021054040A1/en
Priority to CN202080058192.5A priority patent/CN114270867B/en
Publication of JP2021052228A publication Critical patent/JP2021052228A/en
Application granted granted Critical
Publication of JP7200074B2 publication Critical patent/JP7200074B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/117Filters, e.g. for pre-processing or post-processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • H04N19/137Motion inside a coding unit, e.g. average field, frame or block difference
    • H04N19/139Analysis of motion vectors, e.g. their magnitude, direction, variance or reliability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • H04N19/159Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/577Motion compensation with bidirectional frame interpolation, i.e. using B-pictures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/80Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation
    • H04N19/82Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation involving filtering within a prediction loop
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
    • H04N19/86Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving reduction of coding artifacts, e.g. of blockiness

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • 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.

従来、PROF(Prediction Refinement with Optical Flow)という技術及びデブロッキングフィルタという技術が知られている(例えば、非特許文献1参照)。 Conventionally, a technique called PROF (Prediction Refinement with Optical Flow) and a technique called deblocking filter are known (see, for example, Non-Patent Document 1).

PROFは、4×4画素ブロック単位で平行移動と回転に対応した動きモデルによって高精度に予測信号を生成する技術であり、PROF処理を適用しない場合と比較して主観画質及び客観画質の両方の改善が期待できる。 PROF is a technology that generates a prediction signal with high accuracy using a motion model that corresponds to translation and rotation in units of 4x4 pixel blocks. Improvement can be expected.

デブロッキングフィルタは、ブロック境界に適用するローパスフィルタであり、ブロックノイズを抑制して主観画質を向上させる効果が期待できる。 The deblocking filter is a low-pass filter applied to block boundaries, and is expected to have the effect of suppressing block noise and improving subjective image quality.

Versatile Video Coding (Draft 6)、JVET-N1001Versatile Video Coding (Draft 6), JVET-N1001

従来技術では、PROF処理を適用するブロック境界にもデブロッキングフィルタが適用される可能性がある。しかしながら、PROF処理で十分主観画質が改善しているブロックについては、デブロッキングフィルタを適用することでかえって主観画質が劣化してしまう可能性があるという問題点があった。 In the prior art, a deblocking filter may also be applied to block boundaries where PROF processing is applied. However, there is a problem that the subjective image quality of a block whose subjective image quality has been sufficiently improved by the PROF process may deteriorate due to the application of the deblocking filter.

そこで、本発明は、上述の課題に鑑みてなされたものであり、PROF処理が適用されたサブブロック境界にデブロッキングフィルタを適用しないようにすることで、主観画質の劣化を防ぐことができる画像復号装置、画像復号方法及びプログラムを提供することを目的とする。 Therefore, the present invention has been made in view of the above problems, and by not applying a deblocking filter to sub-block boundaries to which PROF processing has been applied, an image that can prevent subjective image quality from deteriorating. An object is to provide a decoding device, an image decoding method, and a program.

本発明の第1の特徴は、画像復号装置であって、ブロック毎にPROF処理の適否を判定し、前記PROF処理の適用時には前記ブロックを分割したサブブロック毎に前記PROF処理を行うように構成されているアフィン予測信号生成部と、ブロック境界毎にデブロッキングフィルタの適否を判定し、前記PROF処理が適用されたブロックのサブブロック境界についてはデブロッキングフィルタを適用しないと決定するように構成されているインループフィルタ処理部とを備えることを要旨とする。 A first feature of the present invention is an image decoding device configured to determine the propriety of PROF processing for each block, and to perform the PROF processing for each sub-block obtained by dividing the block when the PROF processing is applied. and an affine prediction signal generation unit configured to determine suitability of a deblocking filter for each block boundary, and determine not to apply a deblocking filter to a sub-block boundary of a block to which the PROF processing is applied. and an in-loop filtering unit.

本発明の第2の特徴は、画像復号方法であって、ブロック毎にPROF処理の適否を判定し、前記PROF処理の適用時には前記ブロックを分割したサブブロック毎に前記PROF処理を行う工程と、ブロック境界毎にデブロッキングフィルタの適否を判定し、前記PROF処理が適用されたブロックのサブブロック境界についてはデブロッキングフィルタを適用しないと決定する工程とを有することを要旨とする。 A second feature of the present invention is an image decoding method, comprising a step of determining whether or not a PROF process is appropriate for each block, and performing the PROF process on each sub-block obtained by dividing the block when the PROF process is applied; determining whether the deblocking filter is appropriate for each block boundary, and determining that the deblocking filter is not applied to the sub-block boundary of the block to which the PROF processing has been applied.

本発明の第3の特徴は、画像復号装置で用いるプログラムであって、コンピュータに、ブロック毎にPROF処理の適否を判定し、前記PROF処理の適用時には前記ブロックを分割したサブブロック毎に前記PROF処理を行う工程と、ブロック境界毎にデブロッキングフィルタの適否を判定し、前記PROF処理が適用されたブロックのサブブロック境界についてはデブロッキングフィルタを適用しないと決定する工程とを実行させることを要旨とする。 A third feature of the present invention is a program for use in an image decoding apparatus, wherein a computer determines whether or not a PROF process is appropriate for each block, and when the PROF process is applied, each sub-block obtained by dividing the block is subjected to the PROF process. and determining whether a deblocking filter is appropriate for each block boundary, and determining that the deblocking filter is not applied to a sub-block boundary of a block to which the PROF processing has been applied. and

本発明によれば、PROF処理が適用されたサブブロック境界にデブロッキングフィルタを適用しないようにすることで、主観画質の劣化を防ぐことができる画像復号装置、画像復号方法及びプログラムを提供することができる。 According to the present invention, it is possible to provide an image decoding device, an image decoding method, and a program that can prevent deterioration of subjective image quality by not applying a deblocking filter to sub-block boundaries to which PROF processing has been applied. can be done.

一実施形態に係る画像処理システム10の構成の一例を示す図である。It is a figure showing an example of composition of image processing system 10 concerning one embodiment. 一実施形態に係る画像符号化装置100の機能ブロックの一例を示す図である。1 is a diagram showing an example of functional blocks of an image encoding device 100 according to an embodiment; FIG. 一実施形態に係る画像符号化装置100の符号化部140から出力される符号化後のデータ(ビットストリーム)の構成の一例を示す図である。FIG. 3 is a diagram showing an example of the structure of encoded data (bitstream) output from the encoding unit 140 of the image encoding device 100 according to one embodiment. 図3に示すSPS141内に含まれる制御データの一例を示す図である。It is a figure which shows an example of the control data contained in SPS141 shown in FIG. 図3に示すスライスヘッダ143Aに含まれる制御データの一例である。It is an example of control data included in the slice header 143A shown in FIG. 一実施形態に係る画像符号化装置100のインター予測部111の機能ブロックの一例を示す図である。3 is a diagram showing an example of functional blocks of an inter prediction unit 111 of the image encoding device 100 according to one embodiment; FIG. 一実施形態に係る画像符号化装置100のインター予測部111の洗練化部111Cの処理手順の一例を示すフローチャートである。3 is a flowchart showing an example of a processing procedure of a refinement unit 111C of an inter prediction unit 111 of the image encoding device 100 according to one embodiment; 一実施形態に係る画像符号化装置100のインター予測部111の予測信号生成部111Dの処理手順の一例を示すフローチャートである。4 is a flowchart showing an example of a processing procedure of a prediction signal generation unit 111D of an inter prediction unit 111 of the image encoding device 100 according to one embodiment; 一実施形態に係る画像符号化装置100のインター予測部111のアフィン動きベクトル算出部111Eの処理手順の一例を示すフローチャートである。11 is a flow chart showing an example of a processing procedure of an affine motion vector calculation unit 111E of the inter prediction unit 111 of the image encoding device 100 according to one embodiment. 一実施形態に係る画像符号化装置100のインター予測部111のアフィン動きベクトル算出部111Eの処理手順の一例を説明するための図である。FIG. 4 is a diagram for explaining an example of a processing procedure of an affine motion vector calculation unit 111E of an inter prediction unit 111 of an image encoding device 100 according to an embodiment; 一実施形態に係る画像符号化装置100のインター予測部111のアフィン予測信号生成部111Fの処理手順の一例を示すフローチャートである。11 is a flow chart showing an example of a processing procedure of an affine prediction signal generation unit 111F of an inter prediction unit 111 of an image encoding device 100 according to an embodiment; 一実施形態に係る画像符号化装置100のインループフィルタ処理部150の機能ブロックの一例を示す図である。4 is a diagram showing an example of functional blocks of an in-loop filtering unit 150 of the image encoding device 100 according to one embodiment; FIG. 一実施形態に係る画像符号化装置100のインループフィルタ処理部150の境界強度判定部153(153A/153B)の処理手順を説明するための図である。FIG. 4 is a diagram for explaining a processing procedure of a boundary strength determination unit 153 (153A/153B) of an in-loop filter processing unit 150 of the image encoding device 100 according to one embodiment; 一実施形態に係る画像復号装置200の機能ブロックの一例を示す図である。2 is a diagram showing an example of functional blocks of an image decoding device 200 according to one embodiment; FIG. 一実施形態に係る画像復号装置200のインター予測部241の機能ブロックの一例を示す図である。3 is a diagram showing an example of functional blocks of an inter prediction unit 241 of the image decoding device 200 according to one embodiment; FIG. 一実施形態に係る画像復号装置200のインループフィルタ処理部250の機能ブロックの一例を示す図である。3 is a diagram showing an example of functional blocks of an in-loop filtering unit 250 of the image decoding device 200 according to one embodiment; FIG. 変更例1について説明するための図である。FIG. 11 is a diagram for explaining Modification 1; 変更例1について説明するための図である。FIG. 11 is a diagram for explaining Modification 1; 変更例2について説明するための図である。FIG. 11 is a diagram for explaining Modification 2; 変更例2について説明するための図である。FIG. 11 is a diagram for explaining Modification 2;

以下、本発明の実施の形態について、図面を参照しながら説明する。なお、以下の実施形態における構成要素は、適宜、既存の構成要素等との置き換えが可能であり、また、他の既存の構成要素との組み合わせを含む様々なバリエーションが可能である。したがって、以下の実施形態の記載をもって、特許請求の範囲に記載された発明の内容を限定するものではない。
(第1実施形態)
以下、図1~図16を参照して、本発明の第1実施形態に係る画像処理システム10について説明する。図1は、本実施形態に係る実施形態に係る画像処理システム10を示す図である。
BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, embodiments of the present invention will be described with reference to the drawings. It should be noted that the constituent elements in the following embodiments can be appropriately replaced with existing constituent elements and the like, and various variations including combinations with other existing constituent elements are possible. Therefore, the following description of the embodiments is not intended to limit the scope of the invention described in the claims.
(First embodiment)
An image processing system 10 according to a first embodiment of the present invention will be described below with reference to FIGS. 1 to 16. FIG. FIG. 1 is a diagram showing an image processing system 10 according to an embodiment according to this embodiment.

図1に示すように、画像処理システム10は、画像符号化装置100及び画像復号装置200を有する。 As shown in FIG. 1 , the image processing system 10 has an image encoding device 100 and an image decoding device 200 .

画像符号化装置100は、入力画像信号を符号化することによって符号化データを生成するように構成されている。画像復号装置200は、符号化データを復号することによって出力画像信号を生成するように構成されている。 The image encoding device 100 is configured to generate encoded data by encoding an input image signal. The image decoding device 200 is configured to generate an output image signal by decoding encoded data.

ここで、かかる符号化データは、画像符号化装置100から画像復号装置200に対して伝送路を介して送信されてもよい。また、符号化データは、記憶媒体に格納された上で、画像符号化装置100から画像復号装置200に提供されてもよい。
(画像符号化装置100)
以下、図2を参照して、本実施形態に係る画像符号化装置100について説明する。図2は、本実施形態に係る画像符号化装置100の機能ブロックの一例について示す図である。
Here, such encoded data may be transmitted from the image encoding device 100 to the image decoding device 200 via a transmission line. Also, the encoded data may be stored in a storage medium and then provided from the image encoding device 100 to the image decoding device 200 .
(Image encoding device 100)
The image coding apparatus 100 according to this embodiment will be described below with reference to FIG. FIG. 2 is a diagram showing an example of functional blocks of the image encoding device 100 according to this embodiment.

図2に示すように、画像符号化装置100は、インター予測部111と、イントラ予測部112と、減算器121と、加算器122と、変換・量子化部131と、逆変換・逆量子化部132と、符号化部140と、インループフィルタ処理部150と、フレームバッファ160とを有する。 As shown in FIG. 2 , the image coding apparatus 100 includes an inter prediction unit 111, an intra prediction unit 112, a subtractor 121, an adder 122, a transform/quantization unit 131, an inverse transform/inverse quantization It has a section 132 , an encoding section 140 , an in-loop filtering section 150 and a frame buffer 160 .

インター予測部111は、インター予測(フレーム間予測)によって予測信号を生成するように構成されている。 The inter prediction unit 111 is configured to generate a prediction signal by inter prediction (inter-frame prediction).

具体的には、インター予測部111は、符号化対象のフレーム(以下、対象フレーム)とフレームバッファ160に格納される参照フレームとの比較によって、参照フレームに含まれる参照ブロックを特定し、特定された参照ブロックに対する動きベクトルを決定するように構成されている。 Specifically, the inter prediction unit 111 identifies a reference block included in the reference frame by comparing a frame to be encoded (hereinafter referred to as a target frame) and a reference frame stored in the frame buffer 160, and identifies a reference block included in the reference frame. It is configured to determine a motion vector for the reference block.

また、インター予測部111は、参照ブロック及び動きベクトルに基づいて予測ブロックに含まれる予測信号を予測ブロック毎に生成するように構成されている。インター予測部111は、予測信号を減算器121及び加算器122に出力するように構成されている。ここで、参照フレームは、対象フレームとは異なるフレームである。 Also, the inter prediction unit 111 is configured to generate, for each prediction block, a prediction signal included in the prediction block based on the reference block and motion vector. The inter prediction section 111 is configured to output the prediction signal to the subtractor 121 and the adder 122 . Here, the reference frame is a frame different from the target frame.

イントラ予測部112は、イントラ予測(フレーム内予測)によって予測信号を生成するように構成されている。 The intra prediction unit 112 is configured to generate a prediction signal by intra prediction (intra-frame prediction).

具体的には、イントラ予測部112は、対象フレームに含まれる参照ブロックを特定し、特定された参照ブロックに基づいて予測信号を予測ブロック毎に生成するように構成されている。また、イントラ予測部112は、予測信号を減算器121及び加算器122に出力するように構成されている。 Specifically, the intra prediction unit 112 is configured to identify a reference block included in the target frame and generate a prediction signal for each prediction block based on the identified reference block. Also, the intra prediction unit 112 is configured to output the prediction signal to the subtractor 121 and the adder 122 .

ここで、参照ブロックは、予測対象のブロック(以下、対象ブロック)について参照されるブロックである。例えば、参照ブロックは、対象ブロックに隣接するブロックである。 Here, the reference block is a block that is referred to for a prediction target block (hereinafter referred to as target block). For example, the reference block is a block adjacent to the target block.

減算器121は、入力画像信号から予測信号を減算し、予測残差信号を変換・量子化部131に出力するように構成されている。ここで、減算器121は、イントラ予測又はインター予測によって生成される予測信号と入力画像信号との差分である予測残差信号を生成するように構成されている。 The subtractor 121 is configured to subtract the prediction signal from the input image signal and output the prediction residual signal to the transform/quantization section 131 . Here, the subtractor 121 is configured to generate a prediction residual signal that is a difference between a prediction signal generated by intra prediction or inter prediction and an input image signal.

加算器122は、逆変換・逆量子化部132から出力される予測残差信号に予測信号を加算してフィルタ処理前復号信号を生成し、かかるフィルタ処理前復号信号をイントラ予測部112及びインループフィルタ処理部150に出力するように構成されている。 The adder 122 adds the prediction signal to the prediction residual signal output from the inverse transform/inverse quantization unit 132 to generate a pre-filtering decoded signal. It is configured to output to the loop filter processing unit 150 .

ここで、フィルタ処理前復号信号は、イントラ予測部112で用いる参照ブロックを構成する。 Here, the unfiltered decoded signal constitutes a reference block used in intra prediction section 112 .

変換・量子化部131は、予測残差信号の変換処理を行うとともに、係数レベル値を取得するように構成されている。さらに、変換・量子化部131は、係数レベル値の量子化を行うように構成されていてもよい。 The transform/quantization unit 131 is configured to perform transform processing on the prediction residual signal and to obtain coefficient level values. Further, the transform/quantization unit 131 may be configured to quantize the coefficient level values.

ここで、変換処理は、予測残差信号を周波数成分信号に変換する処理である。かかる変換処理では、離散コサイン変換(DCT;Discrete Cosine Transform)に対応する基底パターン(変換行列)が用いられてもよく、離散サイン変換(DST;Discrete Sine Transform)に対応する基底パターン(変換行列)が用いられてもよい。 Here, transform processing is processing for transforming a prediction residual signal into a frequency component signal. In such transformation processing, a basis pattern (transformation matrix) corresponding to discrete cosine transform (DCT) may be used, and a basis pattern (transformation matrix) corresponding to discrete sine transform (DST) may be used. may be used.

逆変換・逆量子化部132は、変換・量子化部131から出力される係数レベル値の逆変換処理を行うように構成されている。ここで、逆変換・逆量子化部132は、逆変換処理に先立って、係数レベル値の逆量子化を行うように構成されていてもよい。 The inverse transform/inverse quantization unit 132 is configured to perform inverse transform processing on the coefficient level values output from the transform/quantization unit 131 . Here, the inverse transform/inverse quantization unit 132 may be configured to perform inverse quantization of the coefficient level values prior to the inverse transform processing.

ここで、逆変換処理及び逆量子化は、変換・量子化部131で行われる変換処理及び量子化とは逆の手順で行われる。 Here, the inverse transform processing and inverse quantization are performed in the reverse order of the transform processing and quantization performed by the transform/quantization unit 131 .

符号化部140は、変換・量子化部131から出力された係数レベル値を符号化し、符号化データを出力するように構成されている。 The encoding unit 140 is configured to encode the coefficient level values output from the transform/quantization unit 131 and output encoded data.

ここで、例えば、符号化は、係数レベル値の発生確率に基づいて異なる長さの符号を割り当てるエントロピー符号化である。 Here, for example, the coding is entropy coding that assigns codes of different lengths based on the probability of occurrence of coefficient level values.

また、符号化部140は、係数レベル値に加えて、復号処理で用いる制御データを符号化するように構成されている。 In addition to the coefficient level values, the encoding unit 140 is also configured to encode control data used in the decoding process.

ここで、制御データは、符号化ブロック(CU:Coding Unit)サイズ、予測ブロック(PU:Prediction Unit)サイズ、変換ブロック(TU:Transform Unit)サイズ等のサイズデータを含んでもよい。 Here, the control data may include size data such as a coding block (CU: Coding Unit) size, a prediction block (PU: Prediction Unit) size, a transform block (TU: Transform Unit) size, and the like.

インループフィルタ処理部150は、加算器122から出力されるフィルタ処理前復号信号に対してフィルタ処理を行うとともに、フィルタ処理後復号信号をフレームバッファ160に出力するように構成されている。 The in-loop filtering section 150 is configured to perform filtering on the unfiltered decoded signal output from the adder 122 and output the filtered decoded signal to the frame buffer 160 .

ここで、例えば、フィルタ処理は、ブロック(符号化ブロック、予測ブロック又は変換ブロック)の境界部分で生じる歪みを減少するデブロッキングフィルタ処理である。 Here, for example, the filter processing is deblocking filter processing that reduces distortion that occurs at boundaries of blocks (encoding blocks, prediction blocks, or transform blocks).

フレームバッファ160は、インター予測部111で用いる参照フレームを蓄積するように構成されている。 The frame buffer 160 is configured to accumulate reference frames used by the inter prediction section 111 .

ここで、フィルタ処理後復号信号は、インター予測部111で用いる参照フレームを構成する。
(符号化部140)
以下、図3~図5を用いて符号化部140で符号化される制御データについて説明する。図3は、符号化部140から出力される符号化後のデータ(ビットストリーム)の構成例である。
Here, the filtered decoded signal constitutes a reference frame used in inter prediction section 111 .
(Encoder 140)
The control data encoded by the encoding unit 140 will be described below with reference to FIGS. 3 to 5. FIG. FIG. 3 is a configuration example of encoded data (bitstream) output from the encoding unit 140 .

まず、かかるビットストリームは、先頭にSPS(Sequence Parameter Set:シーケンスパラメータセット)141を含んでもよい。SPS141は、シーケンス(ピクチャの集合)単位での制御データの集合である。具体例については、後述する。各SPS141は、複数のSPS141が存在する場合に個々を識別するためのid情報を少なくとも含む。 First, such a bitstream may include an SPS (Sequence Parameter Set) 141 at the beginning. The SPS 141 is a set of control data for each sequence (set of pictures). A specific example will be described later. Each SPS 141 includes at least id information for individual identification when multiple SPSs 141 exist.

かかるビットストリームは、SPS141の次に、PPS(Picture Parameter Set:ピクチャパラメータセット)142を含んでもよい。PPS142は、ピクチャ(スライスの集合)単位での制御データの集合である。各PPS142は、複数のSPS141が存在する場合に個々を識別するためのid情報を少なくとも含む。また、各PPS142は、各PPS142に対応するSPS141を指定するためのSPS id情報を少なくとも含む。 Such a bitstream may include a PPS (Picture Parameter Set) 142 next to the SPS 141 . The PPS 142 is a collection of control data for each picture (set of slices). Each PPS 142 includes at least id information for individual identification when multiple SPSs 141 exist. Also, each PPS 142 includes at least SPS id information for designating the SPS 141 corresponding to each PPS 142 .

かかるビットストリームは、PPS142の次に、スライスヘッダ143Aを含んでもよい。スライスヘッダ143Aは、スライス単位での制御データの集合である。具体例については、後述する。各スライスヘッダ143Aは、各スライスヘッダ143Aに対応するPPS142を指定するためのPPS id情報を少なくとも含む。 Such a bitstream may include a PPS 142 followed by a slice header 143A. The slice header 143A is a set of control data for each slice. A specific example will be described later. Each slice header 143A includes at least PPS id information for designating the PPS 142 corresponding to each slice header 143A.

かかるビットストリームは、スライスヘッダ143Aの次に、スライスデータ144Aを含んでもよい。スライスデータ144Aは、上述の係数レベル値やサイズデータ等を含んでもよい。 Such a bitstream may include slice data 144A next to slice header 143A. The slice data 144A may include the above-described coefficient level values, size data, and the like.

以上のように、各スライスデータ144A/144Bに、1つずつスライスヘッダ143A/143B、PPS142、SPS141が対応する構成となる。上述のように、スライスヘッダ143A/143Bにて、どのPPS142を参照するかについてPPS id情報で指定し、さらに、そのPPS142にて、どのSPS141を参照するかについてSPS id情報で指定するため、複数のスライスデータ144A/144Bに対して共通のSPS141及びPPS142を用いることができる。 As described above, slice headers 143A/143B, PPS 142, and SPS 141 correspond to slice data 144A/144B one by one. As described above, in the slice header 143A/143B, which PPS 142 is to be referred to is specified by PPS id information, and further, in that PPS 142, which SPS 141 is to be referred to is specified by SPS id information. A common SPS 141 and PPS 142 can be used for the slice data 144A/144B.

言い換えると、SPS141及びPPS142は、スライスデータ144A/144B毎に、必ずしも伝送する必要がない。例えば、図3のように、スライスヘッダ143B及びスライスデータ144Bの直前では、SPS141及びPPS142を符号化しないようなストリーム構成とすることもできる。 In other words, the SPS 141 and PPS 142 do not necessarily need to be transmitted for each slice data 144A/144B. For example, as shown in FIG. 3, it is also possible to adopt a stream configuration in which the SPS 141 and PPS 142 are not encoded immediately before the slice header 143B and slice data 144B.

なお、図3の構成は、あくまで一例である。各スライスデータ144A/144Bに、スライスヘッダ144A/144B、PPS142、SPS141で指定された制御データが対応する構成となっていれば、ストリームの構成要素として、上述以外の要素が追加されてもよい。また、同様に、伝送に際して、図3と異なる構成に整形されてもよい。 Note that the configuration in FIG. 3 is merely an example. As long as each slice data 144A/144B corresponds to control data specified by the slice headers 144A/144B, PPS 142, and SPS 141, elements other than those described above may be added as constituent elements of the stream. Also, in the same way, it may be shaped into a configuration different from that in FIG. 3 at the time of transmission.

図4は、SPS141内に含まれる制御データの一例を示す図である。 FIG. 4 is a diagram showing an example of control data contained in the SPS 141. As shown in FIG.

SPS141は、上述の通り、少なくとも各SPS141を識別するためのid情報 (sps_seq_parameter_set_id)を含む。 The SPS 141 includes at least id information (sps_seq_parameter_set_id) for identifying each SPS 141 as described above.

SPS141は、後述するBDOF(Bi-Directional Optical Flow)処理の使用可否(有効・無効)を制御するためのフラグである「sps_bdof_enabled_flag」を含んでもよい。かかるフラグの値が「0」である時、かかるSPS141に対応するスライス内では、BDOF処理を使用しないことを意味する。一方、かかるフラグの値が「1」である時は、かかるSPS141に対応するスライス内で、BDOF処理を使用可能であることを意味する。スライス内の各ブロックでBDOF処理を実際に使用するかどうかは、後述する処理にてブロック毎に決定される。 The SPS 141 may include an “sps_bdof_enabled_flag” that is a flag for controlling availability (valid/invalid) of BDOF (Bi-Directional Optical Flow) processing, which will be described later. When the flag value is "0", it means that the BDOF processing is not used in the slice corresponding to the SPS141. On the other hand, when the value of this flag is "1", it means that BDOF processing can be used within the slice corresponding to this SPS141. Whether or not the BDOF process is actually used in each block in the slice is determined for each block in the process described later.

すなわち、「sps_bdof_enabled_flag」は、SPS141に含まれるBDOF処理のシーケンス単位での使用可否を示すフラグ(第4フラグ)である。 That is, “sps_bdof_enabled_flag” is a flag (fourth flag) indicating whether or not the BDOF processing included in the SPS 141 can be used for each sequence.

SPS141は、後述するDMVR(Decoder-side Motion Vector Refinemtnt)処理の使用可否(有効・無効)を制御するためのフラグである「sps_dmvr_enabled_flag」を含んでもよい。かかるフラグの値が「0」である時、かかるSPS141に対応するスライス内では、DMVR処理を使用しないことを意味する。一方、かかるフラグの値が「1」である時は、かかるSPS141に対応するスライス内で、DMVR処理を使用可能であることを意味する。スライス内の各ブロックでDMVR処理を実際に使用するかどうかは、後述する処理にてブロック毎に決定される。 The SPS 141 may include an “sps_dmvr_enabled_flag” that is a flag for controlling availability (enable/disable) of DMVR (Decoder-side Motion Vector Refinement) processing, which will be described later. When the value of this flag is '0', it means that the DMVR processing is not used in the slice corresponding to this SPS141. On the other hand, when the value of this flag is "1", it means that DMVR processing can be used within the slice corresponding to this SPS141. Whether or not DMVR processing is actually used in each block in the slice is determined for each block in the processing described later.

すなわち、「sps_dmvr_enabled_flag」は、SPS141に含まれるDMVR処理のシーケンス単位での使用可否を示すフラグ(第3フラグ)である。 That is, “sps_dmvr_enabled_flag” is a flag (third flag) indicating whether or not the DMVR process included in the SPS 141 can be used for each sequence.

SPS141は、後述するアフィン動き補償の使用可否(有効・無効)を制御するためのフラグである「sps_affine_enabled_flag」を含んでもよい。かかるフラグの値が「0」である時、かかるSPS141に対応するスライス内では、アフィン動き補償を使用しないことを意味する。一方、かかるフラグの値が「1」である時は、かかるSPS141に対応するスライス内で、アフィン動き補償を使用可能であることを意味する。スライス内の各ブロックでアフィン動き補償を実際に使用するかどうかは、後述する処理にてブロック毎に決定される。 The SPS 141 may include an "sps_affine_enabled_flag" which is a flag for controlling availability (validity/invalidity) of affine motion compensation, which will be described later. When the flag value is '0', it means that affine motion compensation is not used in the slice corresponding to SPS141. On the other hand, when the value of this flag is "1", it means that affine motion compensation can be used in the slice corresponding to this SPS141. Whether or not affine motion compensation is actually used in each block in a slice is determined for each block in a process described later.

すなわち、「sps_affine_prof_enabled_flag」は、SPS141に含まれるPROF処理のシーケンス単位での使用可否を示すフラグ(第5フラグ)である。 That is, “sps_affine_prof_enabled_flag” is a flag (fifth flag) indicating whether or not the PROF process included in the SPS 141 can be used for each sequence.

「sps_affine_enabled_flag」が「1」である時、SPS141は、追加で「sps_affine_type_flag」というフラグを含んでもよい。かかるフラグの値が「0」である時、かかるSPS141に対応するスライス内では、後述するアフィン動き補償の際のパラメータ数を常に「4」とすることを意味する。一方、かかるフラグの値が「1」である時は、かかるSPS141に対応するスライス内で、アフィン動き補償を行う際にパラメータ数を「4」又は「6」のいずれからかブロック毎に選択可能であることを意味する。 When 'sps_affine_enabled_flag' is '1', the SPS 141 may additionally include a flag 'sps_affine_type_flag'. When the flag value is "0", it means that the number of parameters for affine motion compensation, which will be described later, is always "4" in the slice corresponding to SPS141. On the other hand, when the value of the flag is "1", the number of parameters can be selected for each block from "4" or "6" when performing affine motion compensation within the slice corresponding to the SPS141. means that

「sps_affine_enabled_flag」の値が「1」である時、SPS141は、追加で「sps_affine_prof_enabled_flag」というフラグを含んでもよい。かかるフラグの値が「0」である時、かかるSPS141に対応するスライス内では、後述するPROF(Prediction Refinement with Optical Flow)処理を使用しないことを意味する。一方、かかるフラグの値が「1」である時は、かかるSPS141に対応するスライス内で、PROF処理を使用可能であることを意味する。スライス内の各ブロックでPROF処理を実際に使用するかどうかは、後述する処理にてブロック毎に決定される。 When the value of 'sps_affine_enabled_flag' is '1', the SPS 141 may additionally include a flag 'sps_affine_prof_enabled_flag'. When the value of the flag is "0", it means that the later-described PROF (Prediction Refinement with Optical Flow) processing is not used in the slice corresponding to the SPS141. On the other hand, when the flag value is "1", it means that the PROF process can be used in the slice corresponding to the SPS141. Whether or not the PROF process is actually used in each block in the slice is determined for each block in the process described later.

「sps_bdof_enabled_flag」、「sps_dmvr_enabled_flag」及び「sps_affine_prof_enabled_flag」のうち少なくともいずれか1つのフラグの値が「1」である時、SPS141は、追加で「sps_bdof_dmvr_prof_slice_present_flag」というフラグを含んでもよい。かかるフラグが「1」である時、かかるSPS141に対応するスライスヘッダ143A/143B内に、後述する「slice_disable_bdof_dmvr_prof_flag」というフラグを含むことを意味する。かかるフラグの値が「0」である時は、かかるSPS141に対応するスライスヘッダ143A/143B内に、「slice_disable_bdof_dmvr_prof_flag」が含まれないことを意味する。 When the value of at least one of 'sps_bdof_enabled_flag', 'sps_dmvr_enabled_flag' and 'sps_affine_prof_enabled_flag' is '1', the SPS 141 may additionally include a flag 'sps_bdof_dmvr_prof_slice_present_flag'. When the flag is "1", it means that the slice header 143A/143B corresponding to the SPS 141 includes a flag "slice_disable_bdof_dmvr_prof_flag", which will be described later. When the flag value is '0', it means that the slice header 143A/143B corresponding to the SPS 141 does not include 'slice_disable_bdof_dmvr_prof_flag'.

すなわち、「sps_bdof_dmvr_prof_slice_present_flag」は、スライスヘッダ143A/143B内に、「slice_disable_bdof_dmvr_prof_flag」が含まれているか否かについて示すフラグ(第2フラグ)である。なお、かかるフラグが存在しなかった場合は、かかるフラグの値が「0」であると暗黙的にみなすことができる。 That is, "sps_bdof_dmvr_prof_slice_present_flag" is a flag (second flag) indicating whether or not "slice_disable_bdof_dmvr_prof_flag" is included in the slice header 143A/143B. Note that if such a flag does not exist, it can be implicitly assumed that the value of such flag is "0".

図5は、スライスヘッダ143A/143Bに含まれる制御データの一例を示す図である。 FIG. 5 is a diagram showing an example of control data included in the slice headers 143A/143B.

スライスヘッダ143A/143Bには、上述の通り、かかるスライスに対応するPPS142を指定するためのPPS id情報である「slice_pic_parameter_set_id」を少なくとも含む。上述の通り、かかるPPS id情報で指定されたPPS内で参照されているSPS141が、かかるスライスヘッダ143A/143Bに対応するSPS141となる。 As described above, the slice header 143A/143B includes at least "slice_pic_parameter_set_id" which is PPS id information for designating the PPS 142 corresponding to the slice. As described above, the SPS 141 referenced in the PPS designated by the PPS id information becomes the SPS 141 corresponding to the slice header 143A/143B.

かかるスライスヘッダ143A/143Bに対応するSPS141内に「sps_bdof_dmvr_prof_slice_present_flag」が含まれており、かつ、かかるフラグの値が「1」である時、かかるスライスヘッダ143A/143Bに「slice_disable_bdof_dmvr_prof_flag」が含まれていてもよい。かかるフラグの値が「1」である場合、後述のように、かかるスライスに含まれる各ブロックにおいて、BDOF処理、DMVR処理、PROF処理を使用しないように制御されてもよい。かかるフラグの値が「0」である場合、かかるスライスに含まれる各ブロックにおいて、BDOF処理、DMVR処理、PROF処理を使用することができるように制御されてもよい。 When 'sps_bdof_dmvr_prof_slice_present_flag' is included in the SPS 141 corresponding to the slice header 143A/143B and the value of the flag is '1', the slice header 143A/143B includes 'slice_disable_bdof_dmvr_prof_flag'. good too. When the value of this flag is "1", each block included in this slice may be controlled not to use BDOF processing, DMVR processing, and PROF processing, as will be described later. When the value of this flag is "0", each block included in this slice may be controlled so that BDOF processing, DMVR processing, and PROF processing can be used.

ずなわち、「slice_disable_bdof_dmvr_prof_flag」は、スライスヘッダ143A/143Bに含まれるDMVR処理、BDOF処理、PROF処理の使用可否を一括して制御するフラグ(第1フラグ)である。 That is, "slice_disable_bdof_dmvr_prof_flag" is a flag (first flag) that collectively controls whether or not the DMVR processing, BDOF processing, and PROF processing included in the slice header 143A/143B can be used.

換言すると、「slice_disable_bdof_dmvr_prof_flag」は、スライスヘッダ143A/143Bに含まれるPROF処理の使用可否を制御するフラグであり、スライスヘッダ143A/143Bに含まれるDMVR処理の使用可否を制御するフラグであり、スライスヘッダ143A/143Bに含まれるBDOF処理の使用可否を制御するフラグである。 In other words, "slice_disable_bdof_dmvr_prof_flag" is a flag for controlling whether the PROF process included in the slice header 143A/143B is enabled or disabled, and is a flag for controlling whether the DMVR process included in the slice header 143A/143B is enabled or disabled. 143A/143B.

以上で説明したフラグの値は、あくまでも一例である。フラグの値(「0」及び「1」)に与える意味を逆転させた場合、対応する処理もそれに応じて逆転させることで等価な処理を実現可能である。 The flag values described above are merely examples. When the meanings given to the flag values (“0” and “1”) are reversed, equivalent processing can be realized by reversing the corresponding processing accordingly.

また、以上のように、BDOF処理、DMVR処理、PROF処理をスライス単位で使用しないように制御するフラグを設けることで、画像符号化装置100側から、かかる機能を使用しないことを明示的に制御することができるため、かかる機能を使用しないことで画像符号化装置100及び対応する画像復号装置200の処理負荷や消費電力を削減することができる。 Further, as described above, by providing a flag for controlling not to use BDOF processing, DMVR processing, and PROF processing in units of slices, the image coding apparatus 100 explicitly controls not to use these functions. Therefore, the processing load and power consumption of the image encoding device 100 and the corresponding image decoding device 200 can be reduced by not using such functions.

(インター予測部111)
以下、図6を参照して、本実施形態に係る画像符号化装置100のインター予測部111について説明する。図6は、本実施形態に係る画像符号化装置100のインター予測部111の機能ブロックの一例について示す図である。
(Inter prediction unit 111)
The inter prediction unit 111 of the image coding apparatus 100 according to this embodiment will be described below with reference to FIG. FIG. 6 is a diagram showing an example of functional blocks of the inter prediction unit 111 of the image encoding device 100 according to this embodiment.

図6に示すように、インター予測部111は、動きベクトル探索部111Aと、動きベクトル符号化部111Bと、洗練化部111Cと、予測信号生成部111Dと、アフィン動きベクトル算出部111Eと、アフィン予測信号生成部111Fとを有する。 As illustrated in FIG. 6 , the inter prediction unit 111 includes a motion vector search unit 111A, a motion vector encoding unit 111B, a refinement unit 111C, a prediction signal generation unit 111D, an affine motion vector calculation unit 111E, and an affine motion vector calculation unit 111E. and a prediction signal generator 111F.

インター予測部111は、動きベクトルに基づいて予測ブロックに含まれる予測信号を生成するように構成されている予測部の一例である。 The inter prediction unit 111 is an example of a prediction unit configured to generate a prediction signal included in a prediction block based on motion vectors.

動きベクトル探索部111Aは、対象フレームと参照フレームとの比較によって、参照フレームに含まれる参照ブロックを特定し、特定された参照ブロックに対する動きベクトルを探索するように構成されている。 The motion vector search unit 111A is configured to identify a reference block included in the reference frame by comparing the target frame and the reference frame, and search for a motion vector for the identified reference block.

また、上述の探索を複数の参照フレーム候補に対して行い、当該予測ブロックで予測に用いる参照フレーム及び動きベクトルを決定する。参照フレーム及び動きベクトルは、一つのブロックに対して最大二つずつ用いることができる。一つのブロックに対して参照フレーム及び動きベクトルを一組のみ用いる場合を片予測と呼び、参照フレーム及び動きベクトルを二組用いる場合を双予測と呼ぶ。以降、一組目をL0と呼び、二組目をL1と呼ぶ。 Also, the search described above is performed for a plurality of reference frame candidates, and the reference frame and motion vector used for prediction in the prediction block are determined. A maximum of two reference frames and motion vectors can be used for one block. The case of using only one set of reference frames and motion vectors for one block is called uni-prediction, and the case of using two sets of reference frames and motion vectors is called bi-prediction. Hereinafter, the first set will be called L0, and the second set will be called L1.

更に、動きベクトル探索部111Aは、参照フレーム及び動きベクトルの符号化方法を決定するように構成されている。符号化方法には、参照フレーム及び動きベクトルの情報をそれぞれ伝送する通常の方法に加え、後述するマージモードやアフィン動き補償等がある。 Furthermore, the motion vector search unit 111A is configured to determine the encoding method of the reference frame and motion vector. Coding methods include a merge mode, affine motion compensation, etc., which will be described later, in addition to the normal method of transmitting reference frame and motion vector information.

なお、動きベクトルの探索方法、参照フレームの決定方法及び参照フレーム及び動きベクトルの符号化方法の決定方法については、既知の手法を採用することが可能であるため、その詳細については省略する。 It should be noted that the method of searching for motion vectors, the method of determining reference frames, and the method of determining encoding methods of reference frames and motion vectors can employ known methods, and thus the details thereof will be omitted.

動きベクトル符号化部111Bは、動きベクトル探索部111Aで決定した参照フレームと動きベクトルの情報を、同じく動きベクトル探索部111Aで決定した符号化方法を用いて符号化するように構成されている。具体的な参照フレーム及び動きベクトル情報の符号化方法については、既知の手法を採用することが可能であるため、その詳細については省略する。 The motion vector encoding unit 111B is configured to encode the reference frame and motion vector information determined by the motion vector search unit 111A using the encoding method similarly determined by the motion vector search unit 111A. Since a known method can be adopted for a specific method of encoding the reference frame and motion vector information, the details thereof will be omitted.

当該ブロックの符号化方法がマージモードの場合、画像符号化装置100側において、初めに、当該ブロックに対するマージリストが作成される。ここで、マージリストは、参照フレームと動きベクトルとの組み合わせが複数列挙されたリストである。 When the encoding method for the block is the merge mode, the image encoding device 100 first creates a merge list for the block. Here, the merge list is a list listing a plurality of combinations of reference frames and motion vectors.

各組み合わせには、インデックスが振られており、画像符号化装置100は、参照フレーム及び動きベクトルの情報を個別に符号化する代わりに、かかるインデックスのみを符号化し、画像復号装置200に伝送する。画像符号化装置100側と画像復号装置200側とでマージリストの作成方法を共通化しておくことで、画像復号装置200側では、かかるインデックスに係る情報のみから参照フレーム及び動きベクトルの情報を復号することができる。 Each combination is assigned an index, and the image encoding device 100 encodes only the index and transmits it to the image decoding device 200 instead of encoding the reference frame and motion vector information individually. The image encoding device 100 side and the image decoding device 200 side share the merge list creation method, so that the image decoding device 200 side decodes the reference frame and motion vector information only from the information related to the index. can do.

なお、マージリストの作成方法については、既知の手法を採用することが可能であるため、その詳細については省略する。 As for the method of creating the merge list, since it is possible to adopt a known method, the details thereof will be omitted.

アフィン動き補償は、ブロック毎に少数のパラメータを伝送し、そのパラメータと予め定められたモデルとに基づいて、かかるブロックを分割したサブブロック毎の動きベクトルを導出する手法である。かかる動きベクトルを導出する手法の詳細については、後述する。 Affine motion compensation is a method of transmitting a small number of parameters for each block and deriving motion vectors for each sub-block into which the block is divided based on the parameters and a predetermined model. The details of the technique for deriving such motion vectors will be described later.

アフィン動き補償の場合、動きベクトル符号化部111Bは、後述するコントロールポイント動きベクトルの情報及び参照フレームの情報を符号化するように構成されている。コントロールポイント動きベクトルは、後述のように、ブロック毎に2つ又は3つの動きベクトル情報を伝送する。 In the case of affine motion compensation, the motion vector encoding unit 111B is configured to encode control point motion vector information and reference frame information, which will be described later. Control point motion vectors carry two or three motion vector information per block, as described below.

また、かかるブロックが、双予測を行うブロックの場合は、L0及びL1について、それぞれ2つ又は3つずつコントロールポイント動きベクトルの情報を伝送する。具体的な符号化方法については、既知の手法を採用することが可能であるため、その詳細については省略する。 Also, if such a block is a block that performs bi-prediction, two or three pieces of control point motion vector information are transmitted for each of L0 and L1. As for a specific encoding method, a known method can be adopted, so details thereof will be omitted.

当該ブロックにて、アフィン動き補償を用いる場合は、図6に示すアフィン動きベクトル算出部111Eの処理に移り、そうでない場合は、洗練化部111Cの処理に移る。 If affine motion compensation is used in the block, the process proceeds to the processing of the affine motion vector calculation unit 111E shown in FIG. 6; otherwise, the processing proceeds to the refinement unit 111C.

洗練化部111Cは、動きベクトル符号化部111Bで符号化された動きベクトルを修正する洗練化処理(例えば、DMVR)を行うように構成されている。 The refinement unit 111C is configured to perform a refinement process (for example, DMVR) for correcting the motion vector encoded by the motion vector encoder 111B.

具体的には、洗練化部111Cは、動きベクトル符号化部111Bで符号化された動きベクトルによって特定される参照位置を基準として探索範囲を設定し、探索範囲の中から所定コストが最も小さい修正参照位置を特定し、修正参照位置に基づいて動きベクトルを修正する洗練化処理を行うように構成されている。 Specifically, the refining unit 111C sets a search range based on the reference position specified by the motion vector encoded by the motion vector encoding unit 111B, and selects a modification having the lowest predetermined cost from the search range. A refinement process is configured to identify the reference position and modify the motion vector based on the modified reference position.

図7は、洗練化部111Cの処理手順の一例を示すフローチャートである。 FIG. 7 is a flowchart illustrating an example of a processing procedure of the refining unit 111C.

図7に示すように、ステップS71において、洗練化部111Cは、洗練化処理を適用するための所定条件が満足されているかどうかについて判定する。かかる所定条件が全て満足されている場合に、本処理手順は、ステップS72へ進む。一方、かかる所定条件のどれか一つでも満足されていない場合は、本処理手順は、ステップS75へ進み、洗練化処理を終了する。 As shown in FIG. 7, in step S71, the refinement unit 111C determines whether a predetermined condition for applying the refinement process is satisfied. If all such predetermined conditions are satisfied, the process proceeds to step S72. On the other hand, if any one of these predetermined conditions is not satisfied, the processing procedure proceeds to step S75 and the refinement processing ends.

ここで、所定条件は、当該ブロックが双予測を行うブロックであるという条件を含む。 Here, the predetermined condition includes a condition that the block is a block for bi-prediction.

また、所定条件は、L0側の参照フレーム及びL1側の参照フレームのいずれか一方が当該フレームに対して時間的に過去のフレームで、他方の参照フレームが当該フレームに対して時間的に未来のフレームであり、当該フレームからの時間的な距離(例えば、POC(Picture Order Count)の差の絶対値)がL0側とL1側とで等しいことという条件を含んでもよい。 Further, the predetermined condition is that one of the reference frame on the L0 side and the reference frame on the L1 side is a temporally past frame with respect to the frame, and the other reference frame is a temporally future frame with respect to the frame. It may be a frame, and may include a condition that the temporal distance from the frame (for example, the absolute value of the difference in POC (Picture Order Count)) is equal between the L0 side and the L1 side.

また、所定条件は、動きベクトルがマージモードで符号化されているという条件を含んでもよい。 The predetermined condition may also include a condition that motion vectors are encoded in merge mode.

また、所定条件は、当該ブロックが属するシーケンスのSPS141において、「sps_dmvr_enabled_flag」の値が当該シーケンスにてDMVRを使用可能であるということを示していること(例えば、当該フラグの値が「1」であること)という条件を含んでもよい。 Also, the predetermined condition is that the value of "sps_dmvr_enabled_flag" in the SPS 141 of the sequence to which the block belongs indicates that DMVR can be used in the sequence (for example, if the value of the flag is "1"). It may include the condition that

さらに、所定条件は、当該ブロックが属するスライスのスライスヘッダ143A/143Bにおいて、「slice_disable_bdof_dmvr_prof_flag」の値が当該スライスにおいてDMVRを使用可能であるということを示していること(例えば、当該フラグの値が「0」であること)という条件を含んでもよい。 Furthermore, the predetermined condition is that the value of "slice_disable_bdof_dmvr_prof_flag" in the slice header 143A/143B of the slice to which the block belongs indicates that DMVR can be used in the slice (for example, the value of the flag is " 0”).

ステップS72において、洗練化部111Cは、動きベクトル符号化部111Bで符号化された動きベクトル及び参照フレームの情報に基づいて、探索用画像を生成する。 In step S72, the refining unit 111C generates a search image based on the motion vector encoded by the motion vector encoding unit 111B and the reference frame information.

ここで、動きベクトルが非整数画素位置を指していた場合は、洗練化部111Cは、参照フレームの画素値にフィルタを適用して非整数画素位置の画素を内挿する。この時、洗練化部111Cは、後述する予測信号生成部111Dで用いる内挿フィルタより、少ないタップ数の内挿フィルタを用いることで、演算量を削減することができる。例えば、洗練化部111Cは、バイリニア補間によって非整数画素位置の画素値を内挿することができる。 Here, if the motion vector points to a non-integer pixel position, the refining unit 111C applies a filter to the pixel values of the reference frame and interpolates the pixels at the non-integer pixel position. At this time, the refining unit 111C can reduce the amount of calculation by using an interpolation filter with a smaller number of taps than an interpolation filter used in the prediction signal generation unit 111D, which will be described later. For example, the refinement unit 111C can interpolate pixel values at non-integer pixel positions by bilinear interpolation.

ステップS73において、洗練化部111Cは、ステップS72で生成した探索用画像を用いて、整数画素精度での探索を行う。ここで、整数画素精度とは、動きベクトル符号化部111Bで符号化された動きベクトルを基準として、整数画素間隔となる点のみを探索することを意味する。
洗練化部111Cは、ステップS72の探索によって、整数画素間隔位置での修正後の動きベクトルを決定する。探索の方法としては、既知の手法を用いることができる。
In step S73, the refining unit 111C uses the search image generated in step S72 to perform a search with integer pixel accuracy. Here, integer pixel precision means searching only for points that are at intervals of integer pixels based on the motion vector encoded by the motion vector encoding unit 111B.
The refining unit 111C determines the motion vector after correction at the integer-pixel interval position through the search in step S72. A known method can be used as a search method.

例えば、洗練化部111Cは、L0側及びL1側の差分動きベクトルが符号のみを反転した組み合わせとなる点のみを探索するという方法で探索することもできる。探索に際しては、洗練化部111Cは、例えば、各探索点において探索コストを算出し、探索コストが最も小さい探索点に動きベクトルを修正するように決定してもよい。 For example, the refining unit 111C can also perform a search by a method of searching only for points where the differential motion vectors on the L0 side and the L1 side are combinations in which only the signs are inverted. During the search, the refining unit 111C may, for example, calculate the search cost at each search point and determine to correct the motion vector to the search point with the lowest search cost.

ここで、洗練化部111Cは、動きベクトル符号化部111Bで符号化された動きベクトルに対応する探索点での探索コストのみを小さくするように算出してもよい。例えば、当該探索点に関しては、洗練化部111Cは、他の探索点と同様の方法で算出した探索コストを、3/4に小さくした値を当該探索点の最終的な探索コストと設定してもよい。 Here, the refining unit 111C may calculate so as to reduce the search cost only at the search point corresponding to the motion vector encoded by the motion vector encoding unit 111B. For example, for this search point, the refining unit 111C sets a value obtained by reducing the search cost calculated by the same method as for other search points to 3/4 as the final search cost for this search point. good too.

ステップS73における探索の結果、探索前の動きベクトルと同じ値になる可能性もある。 As a result of the search in step S73, the motion vector may have the same value as before the search.

ステップS74において、洗練化部111Cは、ステップS73で決定した整数画素精度での修正後の動きベクトルを初期値として、非整数画素精度での動きベクトル探索を行う。動きベクトルの探索方法としては、既知の手法を用いることができる。 In step S74, the refining unit 111C performs motion vector search with non-integer pixel precision using the motion vector after modification with integer pixel precision determined in step S73 as an initial value. A known method can be used as a motion vector search method.

また、洗練化部111Cは、実際に探索を行わずに、ステップS73の結果を入力として、パラボラフィッティング等のパラメトリックなモデルを用いて非整数画素精度でのベクトルを決定することもできる。 The refining unit 111C can also use the result of step S73 as an input and determine a vector with non-integer pixel precision using a parametric model such as parabolic fitting without actually performing a search.

洗練化部111Cは、ステップS74において、非整数画素精度での修正後の動きベクトルを決定した後、ステップS45へ移り洗練化処理を終了する。ここでは、便宜上、非整数画素精度の修正後動きベクトルという表現を用いたが、ステップS74の探索結果により、結果的に、ステップS73で求めた整数画素精度の動きベクトルと同じ値になる可能性もある。 In step S74, the refining unit 111C determines the motion vector after modification with non-integer pixel precision, and then proceeds to step S45 to end the refining process. Here, for the sake of convenience, the expression "corrected motion vector with non-integer pixel precision" is used, but the result of the search in step S74 may result in the same value as the motion vector with integer pixel precision obtained in step S73. There is also

洗練化部111Cは、予め定めた閾値より大きなブロックを、小さなサブブロックに分割してサブブロックごとに洗練化処理を実行してもよい。例えば、洗練化部111Cは、洗練化処理の実行単位を16×16画素と設定しておき、ブロックの水平方向又は垂直方向のサイズが16画素より大きい場合、それぞれ16画素以下となるように分割することができる。この時、洗練化処理の基準となる動きベクトルとしては、同一ブロック内の全てのサブブロックについて、動きベクトル符号化部111Bで符号化された当該ブロックの動きベクトルを用いる。 The refining unit 111C may divide a block larger than a predetermined threshold into smaller sub-blocks and perform refinement processing on each sub-block. For example, the refining unit 111C sets the execution unit of the refining process to 16×16 pixels, and if the horizontal or vertical size of the block is larger than 16 pixels, it is divided into 16 pixels or less. can do. At this time, the motion vectors of all sub-blocks in the same block encoded by the motion vector encoding unit 111B are used as the reference motion vectors for the refinement process.

サブブロックごとに処理を行う場合、洗練化部111Cは、図7の全ての手順をサブブロックごとに実行してもよい。また、洗練化部111Cは、図7の処理の一部のみをサブブロックごとに処理してもよい。具体的には、洗練化部111Cは、図7のステップS71及びS72については、ブロック毎に処理を行い、ステップS73及びS74について、サブブロックごとに処理してもよい。 When performing processing for each subblock, the refining unit 111C may perform all the procedures in FIG. 7 for each subblock. Also, the refining unit 111C may process only a part of the processing in FIG. 7 for each sub-block. Specifically, the refining unit 111C may process steps S71 and S72 of FIG. 7 for each block, and may process steps S73 and S74 for each sub-block.

予測信号生成部111Dは、洗練化部111Cから出力される修正された動きベクトルに基づいて予測信号を生成するように構成されている。 The predicted signal generator 111D is configured to generate a predicted signal based on the modified motion vector output from the refiner 111C.

ここで、後述するように、予測信号生成部111Dは、上述の洗練化処理の過程で算出される情報(例えば、探索コスト)に基づいて、ブロック毎にBDOF処理を行うか否かについて判定するように構成されている。 Here, as will be described later, the prediction signal generation unit 111D determines whether or not to perform BDOF processing for each block based on information (for example, search cost) calculated in the course of the refinement processing described above. is configured as

具体的には、予測信号生成部111Dは、動きベクトルが修正されない場合には、動きベクトル符号化部111Bで符号化された動きベクトルに基づいて予測信号を生成するように構成されている。一方で、予測信号生成部111Dは、動きベクトルが修正される場合には、洗練化部111Cで修正された動きベクトルに基づいて予測信号を生成するように構成されている。 Specifically, the prediction signal generation unit 111D is configured to generate a prediction signal based on the motion vector encoded by the motion vector encoding unit 111B when the motion vector is not corrected. On the other hand, the prediction signal generation unit 111D is configured to generate a prediction signal based on the motion vector corrected by the refinement unit 111C when the motion vector is corrected.

図8は、予測信号生成部111Dの処理手順の一例を示すフローチャートである。ここで、洗練化部111Cにてサブブロック単位で洗練化処理が行われた場合、予測信号生成部111Dの処理もサブブロック単位で実行される。その場合、以下の説明のブロックという単語は、適宜、サブブロックに読み替えることができる。 FIG. 8 is a flow chart showing an example of a processing procedure of the prediction signal generator 111D. Here, when refinement processing is performed in units of subblocks by the refinement unit 111C, processing in the prediction signal generation unit 111D is also performed in units of subblocks. In that case, the word "block" in the following description can be appropriately read as "sub-block".

図8に示すように、ステップS81において、予測信号生成部111Dは、予測信号を生成する。 As shown in FIG. 8, in step S81, the prediction signal generator 111D generates a prediction signal.

具体的には、予測信号生成部111Dは、動きベクトル符号化部111Bで符号化された動きベクトル或いは洗練化部111Cで符号化された動きベクトルを入力として、かかる動きベクトルが指す位置が非整数画素位置の場合は、参照フレームの画素値にフィルタを適用して非整数画素位置の画素を内挿する。ここで、具体的なフィルタについては、非特許文献1で開示されている最大8タップの水平垂直可分型のフィルタを適用することができる。 Specifically, the prediction signal generation unit 111D receives the motion vector encoded by the motion vector encoding unit 111B or the motion vector encoded by the refinement unit 111C, and the position indicated by the motion vector is a non-integer. For pixel locations, a filter is applied to the pixel values of the reference frame to interpolate pixels at non-integer pixel locations. Here, as a specific filter, a horizontal/vertical separable filter with a maximum of 8 taps disclosed in Non-Patent Document 1 can be applied.

予測信号生成部111Dは、当該ブロックが双予測を行うブロックである場合は、一つ目(以後、L0と呼ぶ)の参照フレーム及び動きベクトルによる予測信号及び二つ目(以後、L1と呼ぶ)の参照フレーム及び動きベクトルによる予測信号の両方を生成する。 When the block is a block to be bi-predicted, the prediction signal generation unit 111D generates a prediction signal based on the first (hereinafter referred to as L0) reference frame and motion vector and the second (hereinafter referred to as L1) generates both the reference frame and the motion vector prediction signal.

ステップS82において、予測信号生成部111Dは、ブロック毎に、後述するBDOF処理の適用条件が満足されているかどうかについて確認する。 In step S82, the prediction signal generation unit 111D checks whether or not the conditions for applying the BDOF process, which will be described later, are satisfied for each block.

かかる適用条件としては、少なくとも当該ブロックが双予測を行うブロックであることという条件を含む。 Such application conditions include at least the condition that the block in question is a block for bi-prediction.

また、適用条件は、洗練化部111CのステップS73における整数画素位置探索において、上述の探索コストが最小となる探索点の探索コストが、予め定めた閾値よりも大きい又は予め定めた閾値以上であることという条件を含んでもよい。 The application condition is that the search cost of the search point with the minimum search cost in the integer pixel position search in step S73 of the refining unit 111C is greater than or equal to a predetermined threshold. It may include the condition that

また、所定条件は、当該ブロックが属するシーケンスのSPS141において、「sps_bdof_enabled_flag」の値が当該シーケンスにてBDOFを使用可能であるということを示していること(例えば、当該フラグの値が「1」であること)という条件を含んでもよい。 Also, the predetermined condition is that the value of "sps_bdof_enabled_flag" in the SPS 141 of the sequence to which the block belongs indicates that BDOF can be used in the sequence (for example, if the value of the flag is "1"). It may include the condition that

また、適用条件は、当該ブロックが属するスライスのスライスヘッダ143A/143Bにおいて、「slice_disable_bdof_dmvr_prof_flag」の値が当該スライスにおいてBDOF処理を使用可能であるということを示していること(例えば、当該フラグの値が「0」であること)という条件を含んでもよい。 Also, the applicable condition is that the value of "slice_disable_bdof_dmvr_prof_flag" in the slice header 143A/143B of the slice to which the block belongs indicates that BDOF processing can be used in the slice (for example, the value of the flag is be “0”).

また、適用条件は、L0側の参照フレーム及びL1側の参照フレームのいずれ一方が当該フレームに対して時間的に過去のフレームで、他方の参照フレームが当該フレームに対して時間的に未来のフレームであり、当該フレームからの時間的な距離(例えば、POCの差の絶対値)のL0側とL1側との比率が、予め定めた比率になっていることという条件を含んでもよい。 In addition, the application condition is that one of the reference frame on the L0 side and the reference frame on the L1 side is a temporally past frame with respect to the current frame, and the other reference frame is a temporally future frame with respect to the current frame. and may include a condition that the ratio between the L0 side and the L1 side of the temporal distance (for example, the absolute value of the POC difference) from the frame is a predetermined ratio.

ここで、比率の決定方法は、例えば、後述のBDOF処理におけるL0側とL1側との勾配や輝度値を用いて演算する際の重み係数の逆数に比例するように決定してもよい。 Here, the method of determining the ratio may be, for example, proportional to the reciprocal of the weighting factor when calculating using the gradient between the L0 side and the L1 side in the later-described BDOF process and the luminance value.

例えば、L0側の重み係数を「2/3」とし、L1側の重み係数を「1/3」とする場合、参照フレームの距離の比率として、L0と当該フレーム間の距離を「1」とすると、L1と当該フレーム間の距離が「2」となる場合のみ、BDOF処理を適用するようにしてもよい。 For example, when the weighting factor on the L0 side is set to "2/3" and the weighting factor on the L1 side is set to "1/3", the distance between L0 and the relevant frame is set to "1" as the ratio of the distance to the reference frame. Then, the BDOF process may be applied only when the distance between L1 and the frame is "2".

同様に、例えば、L0側の重み係数を「1/2」とし、L1側の重み係数を「1/2」とする場合、参照フレームの距離の比率として、L0と当該フレーム間の距離を「1」とすると、L1と当該フレーム間の距離が「1」となる場合、すなわち、当該フレームとL0及びL1との間の距離が等しい場合のみ。BDOF処理を適用するようにしてもよい。 Similarly, for example, when the weighting factor on the L0 side is set to "1/2" and the weighting factor on the L1 side is set to "1/2", the distance between L0 and the frame is set to "1/2" as the ratio of the distance to the reference frame. 1", only when the distance between L1 and the frame is "1", that is, when the distances between the frame and L0 and L1 are equal. BDOF processing may be applied.

すなわち、予測信号生成部111Dは、かかる適用条件として、2つの参照フレーム(L0/L1)の画素値同士又は2つの参照フレーム(L0/L1)の画素値から算出した値同士を用いて演算する場合の重み係数の逆数に比例するように、2つの参照フレーム(L0/L1)と当該フレームとの時間的な距離に関する条件を備えてもよい。 That is, the prediction signal generation unit 111D performs calculation using pixel values of two reference frames (L0/L1) or values calculated from pixel values of two reference frames (L0/L1) as the applicable condition. A condition regarding the temporal distance between the two reference frames (L0/L1) and the relevant frames may be provided so as to be proportional to the reciprocal of the weighting factor of the case.

また、予測信号生成部111Dは、かかる適用条件として、かかる重み係数が等しい場合、かかる時間的な距離に関する条件として、2つの参照フレーム(L0/L1)のそれぞれと当該フレームとの時間的な距離が等しいことを備えてもよい。 In addition, the prediction signal generation unit 111D, as an applicable condition, sets the temporal distance between each of the two reference frames (L0/L1) and the corresponding frame as a condition regarding the temporal distance when the weighting factors are equal. are equal to each other.

なお、ここでは、一例として重み係数が「1/2」の場合を説明したが、L0側及びL1側に同じ重み(例えば、「1」でもよい)が用いられている場合に、かかるフレームとL0及びL1との間の距離が等しい場合のみ、BDOF処理を適用するようにしてもよい。 Here, as an example, a case where the weighting factor is "1/2" has been described. The BDOF process may be applied only when the distances between L0 and L1 are equal.

かかる適用条件を満足すると判定された場合には、本処理手順は、ステップS83に移り、かかる適用条件が満足されていない場合、本処理手順は、ステップS84に移る。 If it is determined that the application condition is satisfied, the process proceeds to step S83, and if the application condition is not satisfied, the process proceeds to step S84.

ステップS83において、予測信号生成部111Dは、BDOF処理を実行して予測信号を生成する。BDOF処理の処理自体は、既知の手法を用いることができるため、概要のみを説明し、詳細についての説明は省略する。 In step S83, the prediction signal generator 111D performs BDOF processing to generate a prediction signal. Since a known method can be used for the BDOF processing itself, only the outline will be described and the detailed description will be omitted.

第1に、予測信号生成部111Dは、当該ブロックの参照ブロック内の各画素について、垂直方向及び水平方向の輝度値の勾配を算出する。具体的な算出方法は、例えば、非特許文献1に記載の方法で算出できる。ここで、L0の水平方向の勾配を「gradientHL0」と呼び、L0の垂直方向の勾配を「gradientVL0」と呼び、L1の水平方向の勾配を「gradientHL1」と呼び、L1の垂直方向の勾配を「gradientVL1」と呼ぶこととする。 First, the prediction signal generator 111D calculates gradients of luminance values in the vertical and horizontal directions for each pixel in the reference block of the block. A specific calculation method can be calculated by the method described in Non-Patent Document 1, for example. Here, the horizontal gradient of L0 is called "gradientHL0", the vertical gradient of L0 is called "gradientVL0", the horizontal gradient of L1 is called "gradientHL1", and the vertical gradient of L1 is called " gradientVL1".

第2に、予測信号生成部111Dは、当該ブロックの補正MV(vx、vy)を算出する。具体的な算出方法は、例えば、非特許文献1に記載の方法で算出できる。ここで、上述の勾配の和(tempH、tempV)及びL0及びL1の参照ブロック間の輝度値差分(diff)について、以下のように算出し、非特許文献1に記載のように、上述の(vx、vy)の算出に用いてもよい。 Second, the prediction signal generator 111D calculates the correction MV (vx, vy) of the block. A specific calculation method can be calculated by the method described in Non-Patent Document 1, for example. Here, the sum of the gradients (tempH, tempV) and the luminance value difference (diff) between the reference blocks of L0 and L1 are calculated as follows, and as described in Non-Patent Document 1, the above ( vx, vy) may be used.

diff=predSampleL0×weightL0-predSampleL1×weightL1
tempH=gradientHL0×weightL0+gradientHL1×weightL1
tempV=gradientVL0×weightL0+gradientVL1×weightL1
ここで、「predSampleL0」及び「predSampleL1」は、それぞれ、L0及びL1の参照ブロックの輝度値であり、「weightL0」及び「weightL1」は、それぞれ、上述の勾配及び輝度値差分算出時の重み係数である。
diff=predSampleL0×weightL0−predSampleL1×weightL1
tempH=gradientHL0×weightL0+gradientHL1×weightL1
tempV=gradientVL0×weightL0+gradientVL1×weightL1
Here, "predSampleL0" and "predSampleL1" are the luminance values of the reference blocks of L0 and L1, respectively, and "weightL0" and "weightL1" are weight coefficients for calculating the gradient and luminance value difference described above, respectively. be.

ここでは、「diff」、「tempH」、「tempV」の3つのパラメータを例に共通の重みを用いる例を説明したが、L0側の情報及びL1側の情報を加減乗除する際であれば、同様の重みを設定することができる。 Here, an example of using a common weight for the three parameters "diff", "tempH", and "tempV" has been described. Similar weights can be set.

また、かかる重みの逆数に比例して、上述の通り、BDOF処理の参照フレームとの距離に関する適用条件を設定してもよい。言い換えると、当該フレームとL0及びL1の各参照フレームとの距離の比の逆数に比例するように、上述のように、加減乗除の際の重みを設定してもよい。 In addition, as described above, an application condition regarding the distance from the reference frame for BDOF processing may be set in proportion to the inverse of the weight. In other words, as described above, weights for addition, subtraction, multiplication, and division may be set so as to be proportional to the reciprocal of the ratio of the distance between the current frame and the reference frames of L0 and L1.

このように設定することで、L0とL1との間について、勾配や輝度値等が線形に変化すると仮定した場合に、当該フレームの時間的な位置に適切な重み係数を設定することができる。また、重み係数に対応したBDOF処理の適用条件を設定することで、適切な重み係数を常に用いることを保証することができる。 By setting in this way, when it is assumed that the gradient, luminance value, etc., between L0 and L1 change linearly, an appropriate weighting factor can be set for the temporal position of the frame. Also, by setting the application condition of the BDOF process corresponding to the weighting factor, it is possible to ensure that the appropriate weighting factor is always used.

第3に、予測信号生成部111Dは、上記で求めた勾配及び補正MVを用いて、各画素についての輝度値補正量「bdofOffset」について、例えば、以下のように算出する。 Third, the prediction signal generation unit 111D uses the gradient and the correction MV obtained above to calculate the brightness value correction amount “bdofOffset” for each pixel, for example, as follows.

bdofOffset=vx×(weightL0×gradientHL0―weightL1×gradientHL1)+vy×(weightL0×gradientVL0―weightL1×gradientVL1)
第4に、予測信号生成部111Dは、例えば、非特許文献1に記載のように、「bdofOffset」を用いて、各画素の補正後の輝度値の予測値を算出することができる。
bdofOffset = vx x (weightL0 x gradientHL0 - weightL1 x gradientHL1) + vy x (weightL0 x gradientVL0 - weightL1 x gradientVL1)
Fourthly, the prediction signal generation unit 111D can calculate the prediction value of the corrected luminance value of each pixel using "bdofOffset" as described in Non-Patent Document 1, for example.

すなわち、予測信号生成部111Dは、BDOF処理において、2つの参照フレーム(L0/L1)の画素値同士又は2つの参照フレーム(L0/L1)の画素値から算出した値同士を用いて演算する場合の重み係数に基づいて、上述の適用条件に2つの参照フレームと当該フレームとの時間的な距離に関する条件を備えるように構成されている。 That is, in the BDOF processing, the prediction signal generation unit 111D performs calculation using pixel values of two reference frames (L0/L1) or values calculated from pixel values of two reference frames (L0/L1). Based on the weighting factor of , the application condition is provided with a condition regarding the temporal distance between the two reference frames and the frame in question.

BDOF処理が実施された後、本処理手順は、ステップS85に移り処理を終了する。 After the BDOF process is performed, the process proceeds to step S85 and ends.

ステップS84では、当該ブロックが、双予測を行うブロックであった場合、予測信号生成部111Dは、ステップS81で生成したL0及びL1の予測信号を合成して最終的な予測信号を生成する。具体的な合成方法については、既知の手法を用いることができるため、詳細は省略する。当該ブロックが、片予測を行うブロックであった場合は、予測信号生成部111Dは、ステップS81で生成した予測信号をそのまま最終的な予測信号とする。 In step S84, if the block is a block for bi-prediction, the prediction signal generator 111D combines the L0 and L1 prediction signals generated in step S81 to generate a final prediction signal. Since a known method can be used for a specific synthesizing method, the details are omitted. If the block is a block for which uni-prediction is to be performed, the prediction signal generator 111D uses the prediction signal generated in step S81 as it is as the final prediction signal.

予測信号生成部111Dは、以上の手順で最終的な予測信号を生成した後に、ステップS85へ移り処理を終了する。 After generating the final prediction signal by the above procedure, the prediction signal generation unit 111D proceeds to step S85 and ends the processing.

アフィン動きベクトル算出部111Eは、動きベクトル探索部111Aにて当該ブロックでアフィン動き補償を行うと決定した場合に、動きベクトル符号化部111Bで符号化したコントロールポイント動きベクトルに基づいて当該ブロックを分割したサブブロック毎の動きベクトルを算出するように構成されている。 When the motion vector search unit 111A determines to perform affine motion compensation on the block, the affine motion vector calculation unit 111E divides the block based on the control point motion vector encoded by the motion vector encoding unit 111B. It is configured to calculate a motion vector for each sub-block.

図9は、アフィン動きベクトル算出部111Eの処理手順の一例を示すフローチャートである。 FIG. 9 is a flowchart showing an example of the processing procedure of the affine motion vector calculation unit 111E.

図9に示すように、ステップS91において、アフィン動きベクトル算出部111Eは、「dHorX」、「dHorY」、「dVerX」及び「dVerY」の計4つのパラメータの値を計算する。 As shown in FIG. 9, in step S91, the affine motion vector calculator 111E calculates values of a total of four parameters "dHorX", "dHorY", "dVerX" and "dVerY".

ここで、アフィン動きベクトル算出部111Eは、パラメータの計算には、動きベクトル符号化部111Bで符号化したコントロールポイント動きベクトルの値を用いる。 Here, the affine motion vector calculation unit 111E uses the value of the control point motion vector encoded by the motion vector encoding unit 111B for parameter calculation.

コントロールポイント動きベクトルは、上述のように、ブロック毎に2つ又は3つ存在する。図10に、コントロールポイント動きベクトルが3つ(「CPMV0」、「CPMV1」、「CPMV2」)である場合の例を示す。 There are two or three control point motion vectors per block, as described above. FIG. 10 shows an example in which there are three control point motion vectors (“CPMV0”, “CPMV1”, and “CPMV2”).

ここで、図10において、実線が、当該ブロックの境界を示し、点線が、当該ブロックを分割したサブブロックの境界を示し、実線の矢印が、コントロールポイント動きベクトルを示し、点線の矢印が、各サブブロックの動きベクトルを示している。 Here, in FIG. 10, the solid line indicates the boundary of the block, the dotted line indicates the boundary of sub-blocks into which the block is divided, the solid arrow indicates the control point motion vector, and the dotted arrow indicates each It shows the motion vectors of the sub-blocks.

コントロールポイント動きベクトルが、2つである場合は、図10のCPMV0とCPMV1のみが存在する状態である。コントロールポイント動きベクトルの値から、「dHorX」、「dHorY」、「dVerX」及び「dVerY」の計4つのパラメータの値を計算する具体的な方法は、既知の手法を用いることができるため、詳細についての説明は省略する。 When there are two control point motion vectors, only CPMV0 and CPMV1 in FIG. 10 exist. A specific method for calculating the values of the four parameters "dHorX", "dHorY", "dVerX" and "dVerY" from the value of the control point motion vector can use a known technique. Description of is omitted.

ステップS92において、アフィン動きベクトル算出部111Eは、「fallbackMode」を当該ブロックに適用するかどうかを決定する。 In step S92, the affine motion vector calculator 111E determines whether to apply the "fallbackMode" to the block.

ここで、「fallbackMode」は、当該ブロックを分割した全てのサブブロックにおいて、同一の動きベクトルを用いるモードである。「fallbackMode」の判定方法は、既知の手法を用いることができるため、詳細についての説明は省略する。「fallbackMode」を当該ブロックに適用する場合は、本処理手順は、ステップS93に進み、「fallbackMode」を当該ブロックに適用しない場合は、本処理手順は、ステップS94へ進む。 Here, "fallbackMode" is a mode in which the same motion vector is used in all sub-blocks into which the block is divided. Since a known method can be used for the determination method of "fallbackMode", the detailed description is omitted. If the "fallbackMode" is applied to the block, the process proceeds to step S93, and if the "fallbackMode" is not applied to the block, the process proceeds to step S94.

ステップS93では、アフィン動きベクトル算出部111Eは、「fallbackMode」を用いる場合の各サブブロックの動きベクトルを算出する。 In step S93, the affine motion vector calculation unit 111E calculates the motion vector of each sub-block when "fallbackMode" is used.

上述の通り、「fallbackMode」の場合は、同一ブロック内の全てのサブブロックの動きベクトルの値は、同じになる。具体的な算出方法は、既知の手法を用いることができるため、詳細についての説明は省略する。 As described above, in the case of "fallbackMode", all sub-blocks in the same block have the same motion vector value. Since a known method can be used for a specific calculation method, a detailed description is omitted.

例えば、非特許文献1では、上述の「dHorX」、「dHorY」、「dVerX」及び「dVerY」の値と、当該ブロックの左上の座標を原点としたときのブロック中央の座標値(当該ブロックの高さと幅をそれぞれ「1/2」にした値)とを予め定めたモデルに代入し、動きベクトルを算出している。本処理手順は、ステップS93が完了した後、ステップS97へ移り処理を終了する。 For example, in Non-Patent Document 1, the values of "dHorX", "dHorY", "dVerX", and "dVerY" described above, and the coordinate value of the center of the block when the upper left coordinate of the block is set as the origin ( A motion vector is calculated by substituting "1/2" of the height and width) into a predetermined model. In this processing procedure, after step S93 is completed, the process proceeds to step S97 and ends.

ステップS94において、アフィン動きベクトル算出部111Eは、「fallbackMode」を適用しない場合の各サブブロックの動きベクトルを算出する。具体的な算出方法は、既知の手法を用いることができるため、詳細についての説明は省略する。 In step S94, the affine motion vector calculator 111E calculates the motion vector of each sub-block when the "fallbackMode" is not applied. Since a known method can be used for a specific calculation method, a detailed description is omitted.

例えば、非特許文献1では、「dHorX」、「dHorY」、「dVerX」及び「dVerY」の値と、当該ブロックの左上の座標を原点としたときの各サブブロック中央の座標値とを予め定めたモデルに代入し、動きベクトルを算出している。本処理手順は、ステップS94が終了した後、ステップS95へ移る。 For example, in Non-Patent Document 1, the values of “dHorX”, “dHorY”, “dVerX” and “dVerY” and the coordinate value of the center of each sub-block when the origin is the upper left coordinate of the block are predetermined. The motion vector is calculated by substituting it into the model. After step S94 ends, the processing procedure proceeds to step S95.

ステップS95において、アフィン動きベクトル算出部111Eは、当該ブロックでPROF処理を適用する条件が満足されているか否かについて判定する。 In step S95, the affine motion vector calculator 111E determines whether or not the block satisfies the conditions for applying the PROF process.

適用条件は、「sps_affine_prof_enabled_flag」の値が「1」であることという条件を含んでもよい。 The applicable condition may include a condition that the value of 'sps_affine_prof_enabled_flag' is '1'.

また、適用条件は、「slice_disable_bdof_dmvr_prof_flag」の値が当該スライスにおいてPROF処理を使用可能であるということを示していること(例えば、当該フラグの値が「0」であること)という条件を含んでもよい。 Also, the application condition may include a condition that the value of "slice_disable_bdof_dmvr_prof_flag" indicates that the PROF process can be used in the slice (for example, the value of the flag is "0"). .

さらに、適用条件は、当該ブロックに「fallbackMode」が適用されないことという条件を含んでもよい。 Furthermore, the application condition may include a condition that "fallbackMode" is not applied to the block.

アフィン動きベクトル算出部111Eは、全ての適用条件が満足されていると判定するとき、当該ブロックにPROF処理を適用すると決定し、本処理手順は、ステップS96へ進む。それ以外の場合は、当該ブロックにPROF処理を適用しないと決定し、本処理手順は、ステップS97へ移り処理を終了する。 When determining that all application conditions are satisfied, the affine motion vector calculation unit 111E determines to apply the PROF processing to the block, and the processing procedure proceeds to step S96. Otherwise, it is decided not to apply the PROF process to the block, and the process proceeds to step S97 and ends.

以上では、アフィン動きベクトル算出部111Eが、全ての適用条件が満足されているか否かについて判定する例を示したが、アフィン動きベクトル算出部111Eは、論理的に等価な別の方法で判定してもよい。 In the above example, the affine motion vector calculation unit 111E determines whether or not all application conditions are satisfied. may

具体的には、上述の適用条件を全て反転させ、PROF処理を適用しない条件として定義し、アフィン動きベクトル算出部111Eは、どれか1つでも適用しない条件に当てはまる場合は、当該ブロックにPROF処理を適用しないと決定して、ステップS97へ進み、いずれにも当てはまらない場合は、当該ブロックにPROF処理を適用すると決定して、ステップS96へ進んでもよい。 Specifically, all of the application conditions described above are inverted and defined as conditions for not applying PROF processing. and proceed to step S97, and if none of the above apply, it may be determined to apply the PROF processing to the block and proceed to step S96.

上述の例に対応するPROF処理を適用しない条件は、以下のように定義できる。 Conditions for not applying the PROF process corresponding to the above example can be defined as follows.

かかる適用しない条件は、「sps_affine_prof_enabled_flag」の値が「0」であることという条件を含んでもよい。 Such non-applicable conditions may include the condition that the value of 'sps_affine_prof_enabled_flag' is '0'.

また、かかる適用しない条件は、「slice_disable_bdof_dmvr_prof_flag」の値が当該スライスにおいてPROF処理を使用禁止であるということを示していること(例えば、当該フラグの値が「1」であること)という条件を含んでもよい。 Also, the non-applicable condition includes the condition that the value of "slice_disable_bdof_dmvr_prof_flag" indicates that the use of PROF processing is prohibited in the slice (for example, the value of the flag is "1"). It's okay.

さらに、かかる適用しない条件は、当該ブロックに「fallbackMode」が適用されることという条件を含んでもよい。 Further, such non-applicable conditions may include a condition that "fallbackMode" is applied to the block.

ステップS96において、アフィン動きベクトル算出部111Eは、PROF処理で用いる「diffMV」の値を算出する。「diffMV」の値は、例えば、各サブブロックの左上の座標を原点としたときの各画素位置について算出される。なお、当該ブロック内の各サブブロックのサイズが同じ場合(例えば、4×4画素)は、1つのサブブロック分の各画素位置についての「diffMV」を算出すれば、他のサブブロックでは、その値を流用することができる。 In step S96, the affine motion vector calculator 111E calculates the value of "diffMV" used in PROF processing. The value of "diffMV" is calculated for each pixel position when the upper left coordinate of each sub-block is set as the origin, for example. Note that if each sub-block in the block has the same size (for example, 4×4 pixels), calculating the “diffMV” for each pixel position for one sub-block allows the other sub-blocks to have the same size. values can be used.

「diffMV」については、例えば、以下のように算出できる。 "diffMV" can be calculated, for example, as follows.

diffMV[x][y][0]=x×(dHorX<<2)+y×(dVerX<<2)-posOffsetX
diffMV[x][y][1]=x×(dHorY<<2)+y×(dVerY<<2)-posOffsetY
ここで、x、yは、各サブブロックの左上の座標を原点としたときの各画素位置(x,y)を意味し、[0]は、「diffMV」のx方向成分を意味し、[1]は、「diffMV」のy方向成分を意味している。
diffMV[x][y][0]=x*(dHorX<<2)+y*(dVerX<<2)-posOffsetX
diffMV[x][y][1]=x*(dHorY<<2)+y*(dVerY<<2)-posOffsetY
Here, x, y means each pixel position (x, y) when the upper left coordinate of each sub-block is taken as the origin, [0] means the x-direction component of "diffMV", and [ 1] means the y-direction component of "diffMV".

なお、以下の関係が成立する。 In addition, the following relationship is established.

posOffsetX=6×dHorX+6×dVerX
posOffsetY=6×dHorY+6×dVerY
この後、アフィン動きベクトル算出部111Eは、非特許文献1に記載のように、右シフト及びクリッピング処理を行う。
posOffsetX=6*dHorX+6*dVerX
posOffsetY=6*dHorY+6*dVerY
After that, the affine motion vector calculation unit 111E performs right shift and clipping processing as described in Non-Patent Document 1.

「diffMV」が算出された後、本処理手順は、ステップS97へ移り処理を終了する。 After "diffMV" is calculated, the process proceeds to step S97 and ends.

以上の説明は、当該ブロックのうち1つの参照フレームについての処理である。例えば、参照フレームを2つ持つ双予測の場合は、L0及びL1について、上述のステップS91~S97の処理がそれぞれ実行される。よって、PROF処理の適用有無の判定結果や「diffMV」の算出結果は、L0及びL1について、それぞれ異なる可能性がある。 The above description is the processing for one reference frame of the block. For example, in the case of bi-prediction with two reference frames, the processes of steps S91 to S97 described above are executed for L0 and L1, respectively. Therefore, there is a possibility that the determination result of whether or not the PROF process is applied and the calculation result of "diffMV" are different for L0 and L1.

図11は、アフィン予測信号生成部111Fの処理の一例を示すフローチャートである。 FIG. 11 is a flow chart showing an example of processing of the affine prediction signal generator 111F.

アフィン予測信号生成部111Fは、「slice_disable_bdof_dmvr_prof_flag」が、スライスヘッダに対応するスライス内において、PROF処理が使用可であることを示す場合(フラグの値が「0」である場合)にPROF処理を行い、PROF処理が使用不可であることを示す場合(フラグの値が「0」である場合)にPROF処理を行わずに予測信号を生成するように構成されている。 The affine prediction signal generation unit 111F performs PROF processing when “slice_disable_bdof_dmvr_prof_flag” indicates that PROF processing can be used in the slice corresponding to the slice header (when the value of the flag is “0”). , the prediction signal is generated without performing the PROF process when it indicates that the PROF process cannot be used (when the value of the flag is "0").

なお、アフィン予測信号生成部111Fは、スライスヘッダに、「slice_disable_bdof_dmvr_prof_flag」が含まれていない場合、かかるフラグが使用可を示す(フラグの値が「0」である)と暗黙的に解釈して処理を行うように構成されていてもよい。 Note that when the slice header does not include "slice_disable_bdof_dmvr_prof_flag", the affine prediction signal generation unit 111F implicitly interprets and processes the flag as indicating that the flag is usable (the value of the flag is "0"). may be configured to perform

ステップS111において、アフィン予測信号生成部111Fは、予測信号を生成する。 In step S111, the affine prediction signal generator 111F generates a prediction signal.

具体的には、アフィン予測信号生成部111Fは、アフィン動きベクトル算出部111Eで算出されたサブブロック毎の動きベクトルを入力として、かかる動きベクトルが指す位置が非整数画素位置の場合は、参照フレームの画素値にフィルタを適用して非整数画素位置の画素を内挿する。ここで、具体的なフィルタについては、非特許文献1で開示されている最大6タップの水平垂直可分型のフィルタを適用することができる。 Specifically, the affine prediction signal generation unit 111F receives as input the motion vector for each subblock calculated by the affine motion vector calculation unit 111E, and if the position indicated by the motion vector is a non-integer pixel position, the reference frame A filter is applied to the pixel values of to interpolate pixels at non-integer pixel positions. Here, as a specific filter, a horizontally and vertically separable filter with a maximum of 6 taps disclosed in Non-Patent Document 1 can be applied.

当該ブロックが双予測を行うブロックである場合は、アフィン予測信号生成部111Fは、L0及びL1の予測信号の両方を生成する。 If the block is a block for bi-prediction, the affine prediction signal generator 111F generates both L0 and L1 prediction signals.

ステップS112において、アフィン予測信号生成部111Fは、当該ブロックの当該予測方向(L0又はL1)において、PROF処理を適用するか否かについて判定する。かかる判定には、上述のステップS95での判定結果がそのまま用いられる。 In step S112, the affine prediction signal generator 111F determines whether or not to apply the PROF process in the prediction direction (L0 or L1) of the block. For such determination, the determination result in step S95 described above is used as it is.

当該ブロックの当該予測方向にPROF処理を適用すると判定された場合は、本処理手順は、ステップS113へ進む。一方、当該ブロックの当該予測方向にPROF処理を適用しないと判定された場合は、本処理手順は、ステップS114へ進む。 If it is determined that the PROF process is applied to the prediction direction of the block, the process proceeds to step S113. On the other hand, if it is determined not to apply the PROF process to the prediction direction of the block, the process proceeds to step S114.

ステップS113において、アフィン予測信号生成部111Fは、PROF処理を実行する。PROF処理の具体的な処理は、既知の手法を用いることができるため、詳細は省略する。アフィン予測信号生成部111Fは、PROF処理により予測信号の補正を行う。 In step S113, the affine prediction signal generator 111F executes PROF processing. Since a known method can be used for specific processing of the PROF processing, details thereof are omitted. The affine prediction signal generator 111F corrects the prediction signal by PROF processing.

ステップS114において、アフィン予測信号生成部111Fは、当該ブロックが双予測を行うブロックであった場合、ステップS111で生成したL0とL1の予測信号、又は、かかる予測信号をステップS113で補正した予測信号を合成して、最終的な予測信号を生成する。具体的な合成方法については、既知の手法を用いることができるため、詳細は省略する。アフィン予測信号生成部111Fは、当該ブロックが片予測を行うブロックであった場合は、ステップS111で生成した予測信号、又は、かかる予測信号をステップS113で補正した予測信号を、そのまま最終的な予測信号とする。 In step S114, if the block is a block for bi-prediction, the affine prediction signal generation unit 111F generates the prediction signals of L0 and L1 generated in step S111, or the prediction signals obtained by correcting these prediction signals in step S113. to produce the final prediction signal. Since a known method can be used for a specific synthesizing method, the details are omitted. If the block is a block for which uni-prediction is performed, the affine prediction signal generation unit 111F uses the prediction signal generated in step S111 or the prediction signal obtained by correcting the prediction signal in step S113 as the final prediction. signal.

最終的な予測信号の生成が完了した後、本処理手順は、ステップS115へ移り処理を終了する。 After the generation of the final prediction signal is completed, the process proceeds to step S115 and ends.

以上の例では、便宜上、予測信号生成部111Dとアフィン予測信号生成部111Fとを異なる処理ブロックとして説明したが、これらの一部の処理は、共通化可能であり、単一の処理ブロックとすることもできる。 In the above example, the prediction signal generation unit 111D and the affine prediction signal generation unit 111F are explained as different processing blocks for convenience. can also

例えば、ステップS81及びS111、並びに、ステップS84及びステップS114は、同一の処理とみなすことができる。 For example, steps S81 and S111, and steps S84 and S114 can be regarded as the same process.

この場合、図8のステップS82でNoと判定された後に、図10のステップS112、S113及びS114を順に実行するようにすれば、図8及び図10のフローチャートを統合して単一の処理ブロックとみなすことができる。この時、BDOF処理及びPROF処理は、ブロック単位で排他的に適用されることとなる。
(インループフィルタ処理部150)
以下において、本実施形態に係るインループフィルタ処理部150について説明する。図12は、本実施形態に係るインループフィルタ処理部150を示す図である。
In this case, if steps S112, S113 and S114 in FIG. 10 are sequentially executed after step S82 in FIG. 8 is determined as No, the flow charts in FIGS. can be regarded as At this time, the BDOF processing and the PROF processing are exclusively applied in units of blocks.
(In-loop filtering unit 150)
The in-loop filtering unit 150 according to this embodiment will be described below. FIG. 12 is a diagram showing the in-loop filtering unit 150 according to this embodiment.

図12に示すように、インループフィルタ処理部150は、ブロック境界検出部151と、境界強度判定部153と、フィルタ決定部154と、フィルタ処理部155とを有する。 As shown in FIG. 12 , the in-loop filtering section 150 has a block boundary detection section 151 , a boundary strength determination section 153 , a filter determination section 154 and a filter processing section 155 .

ここで、末尾に「A」が付されている構成は、垂直方向のブロック境界に対するデブロッキングフィルタ処理に関する構成であり、末尾に「B」が付されている構成は、水平方向のブロック境界に対するデブロッキングフィルタ処理に関する構成である。 Here, the configuration with "A" at the end is the configuration for deblocking filter processing for vertical block boundaries, and the configuration with "B" at the end is for horizontal block boundaries. It is a configuration related to deblocking filter processing.

以下、垂直方向のブロック境界に対するデブロッキングフィルタ処理が行われた後に、水平方向のブロック境界に対するデブロッキングフィルタ処理が行われるケースについて例示する。 A case in which deblocking filtering is performed on horizontal block boundaries after deblocking filtering is performed on vertical block boundaries will be exemplified below.

デブロッキングフィルタ処理は、上述したように、符号化ブロックに対して適用されてもよく、予測ブロックに対して適用されてもよく、変換ブロックに対して適用されてもよい。また、デブロッキングフィルタ処理は、上記の各ブロックを分割したサブブロックに適用されてもよい。すなわち、対象ブロック及び隣接ブロックは、符号化ブロックであってもよく、予測ブロックであってもよく、変換ブロックであってもよく、これらを分割したサブブロックでもよい。 Deblocking filtering may be applied to encoded blocks, predicted blocks, and transformed blocks, as described above. Also, deblocking filtering may be applied to sub-blocks obtained by dividing each of the above blocks. That is, the target block and adjacent blocks may be encoded blocks, predicted blocks, transformed blocks, or sub-blocks obtained by dividing these blocks.

サブブロックの定義には、洗練化部111C及び予測信号生成部111Dの処理単位として説明したサブブロックが含まれる。また、サブブロックの定義には、アフィン動きベクトル算出部111E及びアフィン予測信号生成部111Eの処理単位として説明したサブブロックが含まれる。サブブロックにデブロッキングフィルタを適用する場合は、適宜、以下の説明のブロックをサブブロックに読み替えることができる。 The definition of the sub-block includes the sub-block described as the processing unit of the refining section 111C and the prediction signal generating section 111D. Also, the definition of sub-block includes the sub-block described as the processing unit of the affine motion vector calculation unit 111E and the affine prediction signal generation unit 111E. When applying the deblocking filter to sub-blocks, the blocks described below can be read as sub-blocks as appropriate.

垂直方向のブロック境界に対するデブロッキングフィルタ処理及び水平方向のブロック境界に対するデブロッキングフィルタ処理は、同様の処理であるため、以下においては、垂直方向のブロック境界に対するデブロッキングフィルタ処理について説明する。 Since the deblocking filtering process for vertical block boundaries and the deblocking filtering process for horizontal block boundaries are similar processes, the deblocking filtering process for vertical block boundaries will be described below.

ブロック境界検出部151Aは、ブロックサイズを示す制御データに基づいて、ブロックの境界を検出するように構成されている。ここで、ブロックは、符号化ブロック(CU)、予測ブロック(PU)、変換ブロック(TU)である。具体的な検出方法は、既知の手法が適用可能なため、詳細の説明は省略する。 151 A of block boundary detection parts are comprised so that the boundary of a block may be detected based on the control data which show block size. Here, the blocks are coding blocks (CU), prediction blocks (PU), and transform blocks (TU). Since a known method can be applied to a specific detection method, detailed description is omitted.

境界強度判定部153Aは、対象ブロックと隣接ブロックとのブロック境界の境界強度を判定するように構成されている。 153 A of boundary strength determination parts are comprised so that the boundary strength of the block boundary of a target block and an adjacent block may be determined.

また、境界強度判定部153Aは、対象ブロック及び隣接ブロックがイントラ予測ブロックであるか否かについて示す制御データに基づいて、ブロック境界の境界強度を判定するように構成されていてもよい。 Also, the boundary strength determination unit 153A may be configured to determine the boundary strength of the block boundary based on control data indicating whether the target block and the adjacent block are intra-prediction blocks.

例えば、図13に示すように、境界強度判定部153Aは、対象ブロック及び隣接ブロックの少なくともいずれか1つのブロックがイントラ予測ブロックである場合(すなわち、ブロック境界の両側のブロックの少なくともいずれかがイントラ予測ブロックである場合)に、ブロック境界の境界強度が「2」であると判定ように構成されていてもよい。 For example, as shown in FIG. 13, the boundary strength determination unit 153A determines whether at least one of the target block and the adjacent block is an intra-prediction block (that is, at least one of the blocks on both sides of the block boundary is an intra-prediction block). If it is a prediction block), it may be determined that the boundary strength of the block boundary is "2".

また、境界強度判定部153Aは、対象ブロック及び隣接ブロックに非零(ゼロ)の直交変換係数が含まれるか否か及びブロック境界が変換ブロックの境界であるか否かについて示す制御データに基づいて、ブロック境界の境界強度を判定するように構成されていてもよい。 In addition, the boundary strength determination unit 153A determines whether or not the target block and adjacent blocks include non-zero (zero) orthogonal transform coefficients, and whether or not the block boundary is a boundary between transform blocks, based on control data. , may be configured to determine the boundary strength of a block boundary.

例えば、図13に示すように、境界強度判定部153Aは、対象ブロック及び隣接ブロックの少なくともいずれか1つのブロックが非零の直交変換係数を含み、かつ、ブロック境界が変換ブロックの境界である場合(すなわち、ブロック境界の両側のブロックの少なくともいずれかに非零の変換係数が存在し、TUの境界である場合)に、ブロック境界の境界強度が「1」であると判定するように構成されていてもよい。 For example, as shown in FIG. 13, when at least one of the target block and the adjacent block contains a non-zero orthogonal transform coefficient and the block boundary is a transform block boundary, (i.e., when at least one of the blocks on both sides of the block boundary has a non-zero transform coefficient and is a TU boundary), the boundary strength of the block boundary is determined to be "1". may be

また、境界強度判定部153Aは、対象ブロック及び隣接ブロックの動きベクトルの差の絶対値が閾値(例えば、1/2画素)以上であるか否かについて示す制御データに基づいて、ブロック境界の境界強度を判定するように構成されていてもよい。 In addition, the boundary strength determination unit 153A determines whether or not the absolute value of the motion vector difference between the target block and the adjacent block is equal to or greater than a threshold value (for example, 1/2 pixel). It may be configured to determine strength.

例えば、図13に示すように、境界強度判定部153Aは、対象ブロック及び隣接ブロックの動きベクトルの差の絶対値が閾値(例えば、1/2画素)以上である場合(すなわち、ブロック境界の両側のブロックの動きベクトルの差の絶対値が閾値(例えば、1/2画素)以上である場合)に、ブロック境界の境界強度が「1」であると判定するように構成されていてもよい。 For example, as shown in FIG. 13, the boundary strength determination unit 153A determines when the absolute value of the difference between the motion vectors of the target block and the adjacent block is equal to or greater than a threshold value (for example, 1/2 pixel) (that is, when both sides of the block boundary The boundary strength of the block boundary may be determined to be "1" when the absolute value of the motion vector difference between the blocks is equal to or greater than a threshold value (eg, 1/2 pixel).

また、境界強度判定部153Aは、対象ブロック及び隣接ブロックの動きベクトルの予測で参照される参照ブロックが異なるか否かについて示す制御データに基づいて、ブロック境界の境界強度を判定するように構成されていてもよい。 Further, the boundary strength determination unit 153A is configured to determine the boundary strength of the block boundary based on control data indicating whether or not the reference blocks referred to in the motion vector prediction of the target block and the adjacent block are different. may be

例えば、図13に示すように、境界強度判定部153Aは、対象ブロック及び隣接ブロックの動きベクトルの予測で参照される参照ブロックが異なる場合(すなわち、ブロック境界の両側のブロックで参照画像が異なる場合)に、ブロック境界の境界強度が「1」であると判定するように構成されていてもよい。 For example, as shown in FIG. 13, the boundary strength determination unit 153A determines whether the reference blocks referred to in the motion vector prediction of the current block and the adjacent block are different (that is, when the reference images are different in the blocks on both sides of the block boundary). ), the boundary strength of the block boundary may be determined to be “1”.

境界強度判定部153Aは、対象ブロック及び隣接ブロックの動きベクトルの数が異なるか否かについて示す制御データに基づいて、ブロック境界の境界強度を判定するように構成されていてもよい。 The boundary strength determination unit 153A may be configured to determine the boundary strength of the block boundary based on control data indicating whether or not the numbers of motion vectors of the target block and the adjacent blocks are different.

例えば、図13に示すように、境界強度判定部153Aは、対象ブロック及び隣接ブロックの動きベクトルの数が異なる場合(すなわち、ブロック境界の両側のブロックで動きベクトルの数が異なる場合)に、ブロック境界の境界強度が「1」であると判定するように構成されていてもよい。 For example, as shown in FIG. 13, the boundary strength determination unit 153A determines whether the block It may be configured to determine that the boundary strength of the boundary is "1".

例えば、図13に示すように、境界強度判定部153Aは、上述した条件がいずれも満たされない場合に、ブロック境界の境界強度が「0」であると判定するように構成されていてもよい。 For example, as shown in FIG. 13, the boundary strength determination unit 153A may be configured to determine that the boundary strength of the block boundary is "0" when none of the above conditions are satisfied.

なお、境界強度の値が大きいほど、ブロック境界で生じるブロック歪みが大きい可能性が高い。 It should be noted that the larger the value of the boundary strength, the higher the possibility that the block distortion occurring at the block boundary is large.

上述の境界強度判定方法は、輝度信号及び色差信号に対して、共通の方法で判定してもよいし、一部異なる条件を用いて判定してもよい。 The boundary strength determination method described above may be determined using a common method for the luminance signal and the color difference signal, or may be determined using partially different conditions.

フィルタ決定部154Aは、ブロック境界に適用するフィルタ処理(例えば、デブロッキングフィルタ処理)の種類を決定するように構成されている。 The filter determination unit 154A is configured to determine the type of filtering (for example, deblocking filtering) to be applied to block boundaries.

例えば、フィルタ決定部154Aは、ブロック境界の境界強度や、対象ブロック及び隣接ブロックに含まれる量子化パラメータ等に基づいて、ブロック境界に対して、フィルタ処理を適用するか否か、弱フィルタ処理及び強フィルタ処理のいずれのフィルタ処理を適用するかについて決定するように構成されていてもよい。 For example, the filter determination unit 154A determines whether or not to apply filter processing to block boundaries, weak filter processing and It may be configured to determine which filtering of the strong filtering is to be applied.

フィルタ決定部154Aは、ブロック境界の境界強度が「0」である場合に、フィルタ処理を適用しないと決定するように構成されていてもよい。 The filter determining unit 154A may be configured to determine not to apply filtering when the boundary strength of the block boundary is "0".

フィルタ処理部155Aは、フィルタ決定部154Aの決定に基づいて、デブロッキング前画像に対する処理を行うように構成されている。デブロッキング前画像に対する処理は、フィルタ処理無し、弱フィルタ処理、強フィルタ処理等である。
(画像復号装置200)
以下、図14を参照して、本実施形態に係る画像復号装置200について説明する。図14は、本実施形態に係る画像復号装置200の機能ブロックの一例について示す図である。
The filter processing unit 155A is configured to process the pre-deblocking image based on the determination of the filter determination unit 154A. The processing for the pre-deblocking image includes no filtering, weak filtering, strong filtering, and the like.
(Image decoding device 200)
The image decoding device 200 according to this embodiment will be described below with reference to FIG. FIG. 14 is a diagram showing an example of functional blocks of the image decoding device 200 according to this embodiment.

図14に示すように、画像復号装置200は、復号部210と、逆変換・逆量子化部220と、加算器230と、インター予測部241と、イントラ予測部242と、インループフィルタ処理部250と、フレームバッファ260とを有する。 As shown in FIG. 14, the image decoding device 200 includes a decoding unit 210, an inverse transform/inverse quantization unit 220, an adder 230, an inter prediction unit 241, an intra prediction unit 242, and an in-loop filtering unit. 250 and a frame buffer 260 .

復号部210は、画像符号化装置100によって生成される符号化データを復号し、係数レベル値を復号するように構成されている。 The decoding unit 210 is configured to decode the encoded data generated by the image encoding device 100 and decode the coefficient level values.

ここで、例えば、復号は、符号化部140で行われるエントロピー符号化とは逆の手順のエントロピー復号である。 Here, for example, the decoding is entropy decoding in a procedure opposite to the entropy encoding performed by the encoding unit 140 .

また、復号部210は、符号化データの復号処理によって制御データを取得するように構成されていてもよい。 Further, the decoding unit 210 may be configured to acquire the control data by decoding the encoded data.

なお、上述したように、制御データは、符号化ブロックサイズ、予測ブロックサイズ、変換ブロックサイズ等のサイズデータを含んでもよい。 Note that, as described above, the control data may include size data such as the encoding block size, prediction block size, transform block size, and the like.

また、上述したように、制御データは、シーケンスパラメータセット(SPS)、ピクチャパラメータセット(PPS)、スライスヘッダ等のヘッダ情報を含んでもよい。 Also, as described above, the control data may include header information such as sequence parameter sets (SPS), picture parameter sets (PPS), slice headers, and the like.

例えば、復号部210は、スライスヘッダから、PROF処理の使用可否を制御するフラグ、或いは、DMVR処理、BDOF処理、PROF処理の使用可否を一括して制御するフラグ等を復号するように構成されていてもよい。 For example, the decoding unit 210 is configured to decode a flag for controlling whether or not to use the PROF process, or a flag for collectively controlling whether or not to use the DMVR process, the BDOF process, and the PROF process, from the slice header. may

逆変換・逆量子化部220は、復号部210から出力される係数レベル値の逆変換処理を行うように構成されている。ここで、逆変換・逆量子化部220は、逆変換処理に先立って、係数レベル値の逆量子化を行うように構成されていてもよい。 The inverse transform/inverse quantization unit 220 is configured to perform inverse transform processing on the coefficient level values output from the decoding unit 210 . Here, the inverse transform/inverse quantization unit 220 may be configured to perform inverse quantization of the coefficient level values prior to the inverse transform processing.

ここで、逆変換処理及び逆量子化は、変換・量子化部131で行われる変換処理及び量子化とは逆の手順で行われる。 Here, the inverse transform processing and inverse quantization are performed in the reverse order of the transform processing and quantization performed by the transform/quantization unit 131 .

加算器230は、逆変換・逆量子化部220から出力される予測残差信号に予測信号を加算してフィルタ処理前復号信号を生成し、フィルタ処理前復号信号をイントラ予測部242及びインループフィルタ処理部250に出力するように構成されている。 The adder 230 adds the prediction signal to the prediction residual signal output from the inverse transform/inverse quantization unit 220 to generate a pre-filtering decoded signal. It is configured to output to the filter processing unit 250 .

ここで、フィルタ処理前復号信号は、イントラ予測部242で用いる参照ブロックを構成する。 Here, the unfiltered decoded signal constitutes a reference block used in intra prediction section 242 .

インター予測部241は、インター予測部111と同様に、インター予測(フレーム間予測)によって予測信号を生成するように構成されている。 Like the inter prediction section 111, the inter prediction section 241 is configured to generate a prediction signal by inter prediction (inter-frame prediction).

具体的には、インター予測部241は、符号化データから復号した動きベクトルと参照フレームに含まれる参照信号とに基づいて予測信号を予測ブロック毎に生成するように構成されている。インター予測部241は、予測信号を加算器230に出力するように構成されている。 Specifically, the inter prediction unit 241 is configured to generate a prediction signal for each prediction block based on a motion vector decoded from encoded data and a reference signal included in a reference frame. The inter prediction section 241 is configured to output a prediction signal to the adder 230 .

イントラ予測部242は、イントラ予測部112と同様に、イントラ予測(フレーム内予測)によって予測信号を生成するように構成されている。 The intra prediction section 242, like the intra prediction section 112, is configured to generate a prediction signal by intra prediction (intra-frame prediction).

具体的には、イントラ予測部242は、対象フレームに含まれる参照ブロックを特定し、特定された参照ブロックに基づいて予測信号を予測ブロック毎に生成するように構成されている。イントラ予測部242は、予測信号を加算器230に出力するように構成されている。 Specifically, the intra prediction unit 242 is configured to identify a reference block included in the target frame and generate a prediction signal for each prediction block based on the identified reference block. The intra prediction section 242 is configured to output the prediction signal to the adder 230 .

インループフィルタ処理部250は、インループフィルタ処理部150と同様に、加算器230から出力されるフィルタ処理前復号信号に対してフィルタ処理を行うとともに、フィルタ処理後復号信号をフレームバッファ260に出力するように構成されている。 Similar to in-loop filtering section 150 , in-loop filtering section 250 performs filtering on the unfiltered decoded signal output from adder 230 and outputs the filtered decoded signal to frame buffer 260 . is configured to

ここで、例えば、フィルタ処理は、ブロック(符号化ブロック、予測ブロック、変換ブロック或いはそれらを分割したサブブロック)の境界部分で生じる歪みを減少するデブロッキングフィルタ処理である。 Here, for example, the filter processing is deblocking filter processing that reduces distortion occurring at boundaries of blocks (encoding blocks, prediction blocks, transform blocks, or sub-blocks obtained by dividing them).

フレームバッファ260は、フレームバッファ160と同様に、インター予測部241で用いる参照フレームを蓄積するように構成されている。 The frame buffer 260, like the frame buffer 160, is configured to accumulate reference frames used by the inter prediction section 241. FIG.

ここで、フィルタ処理後復号信号は、インター予測部241で用いる参照フレームを構成する。
(インター予測部241)
以下、図15を参照して、本実施形態に係るインター予測部241について説明する。図15は、本実施形態に係るインター予測部241の機能ブロックの一例について示す図である。
Here, the decoded signal after filtering constitutes a reference frame used in the inter prediction section 241 .
(Inter prediction unit 241)
The inter prediction unit 241 according to this embodiment will be described below with reference to FIG. 15 . FIG. 15 is a diagram showing an example of functional blocks of the inter prediction unit 241 according to this embodiment.

図15に示すように、インター予測部241は、動きベクトル復号部241Bと、洗練化部241Cと、予測信号生成部241Dと、アフィン動きベクトル算出部241Eと、アフィン予測信号生成部241Fとを有する。 As shown in FIG. 15, the inter prediction unit 241 includes a motion vector decoding unit 241B, a refinement unit 241C, a prediction signal generation unit 241D, an affine motion vector calculation unit 241E, and an affine prediction signal generation unit 241F. .

インター予測部241は、動きベクトルに基づいて予測ブロックに含まれる予測信号を生成するように構成されている予測部の一例である。 The inter prediction unit 241 is an example of a prediction unit configured to generate a prediction signal included in a prediction block based on motion vectors.

動きベクトル復号部241Bは、画像符号化装置100から受信する制御データの復号によって動きベクトルを取得するように構成されている。 The motion vector decoding unit 241B is configured to acquire motion vectors by decoding control data received from the image encoding device 100 .

また、動きベクトル復号部241Bは、当該ブロックにアフィン動き補償を用いるか否かに関する情報も復号するように構成されている。 The motion vector decoding unit 241B is also configured to decode information as to whether or not affine motion compensation is used for the block.

ここで、当該ブロックにアフィン動き補償を用いない場合は、洗練化処理部241Cと予測信号生成部241Dの処理を、当該ブロックにアフィン動き補償を用いる場合はアフィン動きベクトル算出部241Eとアフィン予測信号生成部241Fの処理を行う。 Here, when the affine motion compensation is not used for the block, the processing of the refinement processing unit 241C and the prediction signal generation unit 241D is performed. The processing of the generation unit 241F is performed.

洗練化部241Cは、洗練化部111Cと同様に、動きベクトルを修正する洗練化処理を実行するように構成されている。 The refinement unit 241C is configured to perform a refinement process for correcting motion vectors, similar to the refinement unit 111C.

予測信号生成部241Dは、予測信号生成部111Dと同様に、動きベクトルに基づいて予測信号を生成するように構成されている。 The prediction signal generator 241D is configured to generate a prediction signal based on the motion vector, like the prediction signal generator 111D.

アフィン動きベクトル算出部241Eは、アフィン動きベクトル算出部111Eと同様に、動きベクトル復号部241Bで復号されたコントロールポイント動きベクトルを用いて、各サブブロックの動きベクトルを算出するように構成されている。 The affine motion vector calculator 241E, like the affine motion vector calculator 111E, is configured to calculate the motion vector of each sub-block using the control point motion vectors decoded by the motion vector decoder 241B. .

アフィン予測信号生成部241Fは、アフィン予測信号生成部111Fと同様に、アフィン動きベクトル算出部241Eで算出された各サブブロックの動きベクトルを用いて予測信号を及びとアフィン予測信号生成部241Fは、予測信号生成部111D及びアフィン予測信号生成部111Fと同様に、同一の処理ブロックに統合することもできる。
(インループフィルタ処理部250)
以下において、本実施形態に係るインループフィルタ処理部250について説明する。図16は、本実施形態に係るインループフィルタ処理部250を示す図である。
Similar to the affine prediction signal generation unit 111F, the affine prediction signal generation unit 241F generates a prediction signal using the motion vector of each sub-block calculated by the affine motion vector calculation unit 241E. As with the prediction signal generator 111D and the affine prediction signal generator 111F, they can be integrated into the same processing block.
(In-loop filtering unit 250)
The in-loop filtering unit 250 according to this embodiment will be described below. FIG. 16 is a diagram showing the in-loop filtering unit 250 according to this embodiment.

図16に示すように、インループフィルタ処理部250は、ブロック境界検出部251と、境界強度判定部253と、フィルタ決定部254と、フィルタ処理部255とを有する。 As shown in FIG. 16 , the in-loop filtering section 250 has a block boundary detection section 251 , a boundary strength determination section 253 , a filter determination section 254 and a filter processing section 255 .

ここで、末尾に「A」が付されている構成は、垂直方向のブロック境界に対するデブロッキングフィルタ処理に関する構成であり、末尾に「B」が付されている構成は、水平方向のブロック境界に対するデブロッキングフィルタ処理に関する構成である。 Here, the configuration with "A" at the end is the configuration for deblocking filter processing for vertical block boundaries, and the configuration with "B" at the end is for horizontal block boundaries. It is a configuration related to deblocking filter processing.

ここでは、垂直方向のブロック境界に対するデブロッキングフィルタ処理が行われた後に、水平方向のブロック境界に対するデブロッキングフィルタ処理が行われるケースについて例示する。 Here, a case is illustrated in which deblocking filtering is performed on horizontal block boundaries after deblocking filtering is performed on vertical block boundaries.

デブロッキングフィルタ処理は、上述したように、符号化ブロックに対して適用されてもよく、予測ブロックに対して適用されてもよく、変換ブロックに対して適用されてもよい。また、デブロッキングフィルタ処理は、上述の各ブロックを分割したサブブロックに適用されてもよい。すなわち、対象ブロック及び隣接ブロックは、符号化ブロックであってもよく、予測ブロックであってもよく、変換ブロックであってもよく、これらを分割したサブブロックでもよい。 Deblocking filtering may be applied to encoded blocks, predicted blocks, and transformed blocks, as described above. Also, deblocking filtering may be applied to sub-blocks obtained by dividing each block described above. That is, the target block and adjacent blocks may be encoded blocks, predicted blocks, transformed blocks, or sub-blocks obtained by dividing these blocks.

垂直方向のブロック境界に対するデブロッキングフィルタ処理及び水平方向のブロック境界に対するデブロッキングフィルタ処理は、同様の処理であるため、以下においては、垂直方向のブロック境界に対するデブロッキングフィルタ処理について説明する。 Since the deblocking filtering process for vertical block boundaries and the deblocking filtering process for horizontal block boundaries are similar processes, the deblocking filtering process for vertical block boundaries will be described below.

ブロック境界検出部251Aは、ブロック境界検出部151Aと同様に、ブロックサイズを示す制御データに基づいて、ブロックの境界を検出するように構成されている。 The block boundary detection section 251A, like the block boundary detection section 151A, is configured to detect block boundaries based on control data indicating the block size.

境界強度判定部253Aは、境界強度判定部153Aと同様に、対象ブロックと隣接ブロックとのブロック境界の境界強度を判定するように構成されている。ブロック境界の境界強度の判定方法は、上述した通りである。 The boundary strength determination unit 253A is configured to determine the boundary strength of the block boundary between the target block and the adjacent block, similarly to the boundary strength determination unit 153A. The method for determining the boundary strength of block boundaries is as described above.

フィルタ決定部254Aは、フィルタ決定部154Aと同様に、ブロック境界に適用するデブロッキングフィルタ処理の種類を決定するように構成されている。デブロッキングフィルタ処理の種類の決定方法は、上述した通りである。 The filter determination unit 254A is configured to determine the type of deblocking filter processing to be applied to block boundaries, similar to the filter determination unit 154A. The method for determining the type of deblocking filtering is as described above.

フィルタ処理部255Aは、フィルタ処理部155Aと同様に、フィルタ決定部254Aの決定に基づいて、デブロッキング前画像に対する処理を行うように構成されている。デブロッキング前画像に対する処理は、フィルタ処理無し、弱フィルタ処理、強フィルタ処理等である。
(変更例1)
以下、図17及び図18を参照して、上述の実施形態の変更例1について説明する。以下においては、上述の実施形態に対する相違点について主として説明する。上述の実施形態では、BDOF処理及びPROF処理について、それぞれ詳細な説明を省略したが、本変更例では、具体的な処理の一例について説明する。
The filter processing unit 255A is configured to process the pre-deblocking image based on the determination of the filter determination unit 254A, similarly to the filter processing unit 155A. The processing for the pre-deblocking image includes no filtering, weak filtering, strong filtering, and the like.
(Modification 1)
Modification 1 of the above-described embodiment will be described below with reference to FIGS. 17 and 18. FIG. In the following, differences with respect to the above-described embodiments will be mainly described. In the above-described embodiment, detailed descriptions of the BDOF processing and the PROF processing are omitted, but in this modified example, an example of specific processing will be described.

第1に、ステップS83のBDOF処理の具体例について、図17を用いて説明する。 First, a specific example of the BDOF processing in step S83 will be described with reference to FIG.

図17に示すように、ステップS171において、予測信号生成部111D/241Dは、BDOF処理を適用するブロック又はサブブロックに対応するL0及びL1の参照ブロック内の各画素について、水平方向及び垂直方向の輝度値勾配をそれぞれ算出する。 As shown in FIG. 17, in step S171, the prediction signal generation unit 111D/241D performs horizontal and vertical directions for each pixel in the reference blocks of L0 and L1 corresponding to the block or sub-block to which the BDOF process is applied. Luminance value gradients are calculated respectively.

具体的には、予測信号生成部111D/241Dは、ブロック内の各画素位置(x,y)について、以下の式で、上述の勾配を算出する。 Specifically, the prediction signal generator 111D/241D calculates the above-described gradient for each pixel position (x, y) in the block using the following formula.

gradientHL0[x][y]=(predSamplesL0[hx+1][vy]>>shift1)-(predSamplesL0[hx-1][vy]>>shift1)
gradientV0[x][y]=(predSamplesL0[hx][vy+1>shift1)-(predSamplesL0[hx][vy-1]>>shift1)
gradientHL1[x][y]=(predSamplesL1hx+1][vy]>>shift1)-(predSamplesL1[hx-1][vy]>>shift1)
gradientV1[x][y]=(predSamplesL1[hx][vy+1]>shift1)-(predSamplesL0[hx][vy-1]>>shift1)
ここで「predSamplesL0」及び「predSamplesL1」は、ステップS81で算出したL0及びL1の予測信号である。また、[hx]及び[vy]は、以下の式で定義されている。
gradientHL0[x][y]=(predSamplesL0[hx+1][vy]>>shift1)-(predSamplesL0[hx−1][vy]>>shift1)
gradientV0[x][y]=(predSamplesL0[hx][vy+1>shift1)-(predSamplesL0[hx][vy-1]>>shift1)
gradientHL1[x][y]=(predSamplesL1hx+1][vy]>>shift1)−(predSamplesL1[hx−1][vy]>>shift1)
gradientV1[x][y]=(predSamplesL1[hx][vy+1]>shift1)-(predSamplesL0[hx][vy-1]>>shift1)
Here, "predSamplesL0" and "predSamplesL1" are the prediction signals of L0 and L1 calculated in step S81. [hx] and [vy] are defined by the following formulas.

以下の式において、「nCbW」は、当該ブロックの幅であり、「nCbH」は、当該ブロックの高さであり、「Clip3(min,max,input)は、「input」の値を「min≦input≦max」となるようにクリップする関数である。 In the following formula, 'nCbW' is the width of the block, 'nCbH' is the height of the block, and 'Clip3 (min, max, input) is the value of 'input' to 'min≤ input≦max”.

hx=Clip3(1,nCbW,x)
hy=Clip3(1,nCbH,y)
なお、「shift1」は、以下の式によって定義されている。
hx=Clip3(1, nCbW, x)
hy=Clip3(1, nCbH, y)
Note that "shift1" is defined by the following formula.

shift1=Max(6,bitDepth-6)
ここで、「bitDepth」は、画素値の処理を行う際のビット深度である。
shift1=Max(6, bitDepth-6)
Here, "bitDepth" is the bit depth when processing pixel values.

ステップS172において、予測信号生成部111D/241Dは、補正MVを算出する。 In step S172, the prediction signal generator 111D/241D calculates the corrected MV.

ここで、第1に、予測信号生成部111D/241Dは、以下の3つのパラメータの値を、当該ブロック又はサブブロックの各画素について算出する。 Here, first, the prediction signal generator 111D/241D calculates the values of the following three parameters for each pixel of the block or sub-block.

diff[x][y]=(predSamplesL0[hx][vy]>>shift2)-(predSamplesL1[hx][vy]>>shift2)
tempH[x][y]=(gradientHL0[x][y]+gradientHL1[x][y])>>shift3
tempV[x][y]=(gradientVL0[x][y]+gradientVL1[x][y])>>shift3
ここで、「shift2」及び「shift3」は、以下の式によって定義されている。
diff[x][y]=(predSamplesL0[hx][vy]>>shift2)-(predSamplesL1[hx][vy]>>shift2)
tempH[x][y]=(gradientHL0[x][y]+gradientHL1[x][y])>>shift3
tempV[x][y]=(gradientVL0[x][y]+gradientVL1[x][y])>>shift3
Here, "shift2" and "shift3" are defined by the following equations.

shift2=Max(4,bitDepth-8)
shift3=Max(3,15-bitDepth)
第2に、予測信号生成部111D/241Dは、当該ブロック又はサブブロックを4×4画素ブロックに分割し、下記の通り、各4×4画素ブロック毎に、パラメータを算出する。
shift2=Max(4, bitDepth-8)
shift3=Max(3,15-bitDepth)
Second, the prediction signal generator 111D/241D divides the block or sub-block into 4×4 pixel blocks, and calculates parameters for each 4×4 pixel block as follows.

Figure 0007200074000001
Figure 0007200074000001

ここで、「xSb」及び「yXb」は、当該ブロック又はサブブロックの左上の画素を原点としたときの各4×4画素ブロックの左上の画素の座標である。また、「Sign(input)」は、「input」の値が正の場合は「1」を返し、「input」の値が負の場合は「-1」を返し、「input」の値が「0」の場合は「0」を返す関数である。 Here, “xSb” and “yXb” are the coordinates of the upper left pixel of each 4×4 pixel block when the upper left pixel of the block or sub-block is taken as the origin. Also, "Sign(input)" returns "1" if the value of "input" is positive, returns "-1" if the value of "input" is negative, and returns "-1" if the value of "input" is " 0", it is a function that returns "0".

予測信号生成部111D/241Dは、以下の通り、上述のように算出した値を用いて、補正MV(vx,vy)を算出する。 The prediction signal generator 111D/241D calculates the correction MV (vx, vy) as follows using the values calculated as described above.

vx=sGx2>0 ? Clip3(-mvRefineThres,mvRefineThres-1,-(sGxdI<<3)>>Floor(Log2(sGx2))):0
vy=sGx2>0 ? Clip3(-mvRefineThres,mvRefineThres-1,((sGydI<<3)-((vx×sGxGy)<<12+vx×sGxGy)>>1)>>Floor(Log2(sGx2))):0
ここで、「mvRefineThres」は、以下の式によって定義されている。
vx=sGx2>0? Clip3 (-mvRefineThres, mvRefineThres-1, -(sGxdI<<3)>>Floor(Log2(sGx2))): 0
vy=sGx2>0? Clip3 (-mvRefineThres, mvRefineThres-1, ((sGydI<<3)-((vx×sGxGy m ) <<12+vx×sGxGy s )>>1)>>Floor(Log2(sGx2))): 0
Here, "mvRefineThres" is defined by the following formula.

mvRefineThres=1<<Max(5,bitDepth-7)
以上の構成とすることで、補正MV(vx,vy)の各成分のビット幅を、符号込みで「1<<Max(5,bitDepth-7)+1」ビット以内に抑えることができる。
mvRefineThres=1<<Max(5, bitDepth-7)
With the above configuration, the bit width of each component of the corrected MV (vx, vy) can be suppressed within "1<<Max(5, bitDepth-7)+1" bits including the sign.

ステップS173において、予測信号生成部111D/241Dは、以下の通り、各画素の予測信号を補正する。 In step S173, the prediction signal generator 111D/241D corrects the prediction signal of each pixel as follows.

bdofOffset=(vx×(gradientHL0[x+1][y+1]-gradientHL1[x+1][y+1]))>>1+(vy×(gradientVL0[x+1][y+1]-gradientVL1[x+1][y+1]))>>1
pbSamples[x][y]=Clip3(0,(2bitDepth)-1,(predSamplesL0[x+1][y+1]+offset4+predSamplesL1[x+1][y+1]+bdofOffset)>>shift4)
ここで、「offset4」及び「shift4」は、以下の式によって定義されている。
bdofOffset=(vx×(gradientHL0[x+1][y+1]−gradientHL1[x+1][y+1]))>>1+(vy×(gradientVL0[x+1][y+1]−gradientVL1[x+1][y+1]))>>1
pbSamples[x][y]=Clip3(0, (2 bitDepth )−1, (predSamplesL0[x+1][y+1]+offset4+predSamplesL1[x+1][y+1]+bdofOffset)>>shift4)
Here, "offset4" and "shift4" are defined by the following equations.

offset4=1<<(shift4-1)
shift4=Max(3,15-bitDepth)
予測信号生成部111D/241Dは、以上の処理を全て行った後、ステップS174に進み処理を終了する。
offset4=1<<(shift4-1)
shift4=Max(3,15-bitDepth)
After performing all of the above processes, the prediction signal generator 111D/241D proceeds to step S174 and ends the process.

次に、ステップS113のPROF処理について、図18を用いて具体例を説明する。 Next, a specific example of the PROF processing in step S113 will be described with reference to FIG.

図18に示すように、ステップS181において、アフィン予測信号生成部111F/241Fは、PROF処理を適用するL0及びL1の参照ブロック内の各画素について、水平方向及び垂直方向の輝度値勾配をそれぞれ算出する。 As shown in FIG. 18, in step S181, the affine prediction signal generator 111F/241F calculates horizontal and vertical luminance value gradients for each pixel in the L0 and L1 reference blocks to which the PROF process is applied. do.

具体的には、アフィン予測信号生成部111F/241Fは、以下の式で、ブロック内の各画素位置(x,y)について勾配を算出する。 Specifically, the affine prediction signal generator 111F/241F calculates the gradient for each pixel position (x, y) in the block using the following formula.

gradientH[x][y]=(predSamples[x+2][y]>>shift1)-(predSamples[x][y]>>shift1)
gradientV[x][y]=(predSamples[x][y+2]>>shift1)-(predSamples[x][y]>>shift1)
ここで、「predSamples」は、ステップS111で生成したL0又はL1の予測信号である。ここで、
shift1=Max(6,bitDepth-6)
とする。
gradientH[x][y]=(predSamples[x+2][y]>>shift1)−(predSamples[x][y]>>shift1)
gradientV[x][y]=(predSamples[x][y+2]>>shift1)−(predSamples[x][y]>>shift1)
Here, "predSamples" is the L0 or L1 prediction signal generated in step S111. here,
shift1=Max(6, bitDepth-6)
and

アフィン予測信号生成部111F/241Fは、L0及びL1の両方にPROF処理を適用する場合は、上述の「gradientH」及び「gradientV」を、L0とL1のそれぞれについて算出する。この場合、ステップS181での計算内容は、画素単位で見るとステップS171の計算内容と完全に同一となる。 When applying the PROF processing to both L0 and L1, the affine prediction signal generator 111F/241F calculates the above-described "gradientH" and "gradientV" for L0 and L1, respectively. In this case, the calculation content in step S181 is completely the same as the calculation content in step S171 when viewed in units of pixels.

ステップS182において、アフィン予測信号生成部111F/241Fは、補正MVを計算する。かかる処理は、実際はステップS96としてアフィン動きベクトル算出部111E/241Eの内部で行われるが、便宜上、ステップS182において行われるものとして説明する。実際は、アフィン予測信号生成部111F/241Fは、ステップS96で算出された値をそのまま用いればよい。 In step S182, the affine prediction signal generator 111F/241F calculates the corrected MV. This processing is actually performed inside the affine motion vector calculation unit 111E/241E as step S96, but for the sake of convenience, it will be described as being performed in step S182. Actually, the affine prediction signal generator 111F/241F may use the value calculated in step S96 as it is.

第1に、アフィン予測信号生成部111F/241Fは、上述のステップS96の説明の場合と同様に、「diffMv」の値を算出する。 First, the affine prediction signal generation unit 111F/241F calculates the value of "diffMv" in the same manner as described in step S96 above.

diffMv[x][y][0]=x×(dHorX<<2)+y×(dVerX<<2)-posOffsetX
diffMv[x][y][1]=x×(dHorY<<2)+y×(dVerY<<2)-posOffsetY
第2に、アフィン予測信号生成部111F/241Fは、上述の「diffMv」の値を、それぞれ7ビットだけ右にシフトする。
diffMv[x][y][0]=x*(dHorX<<2)+y*(dVerX<<2)-posOffsetX
diffMv[x][y][1]=x*(dHorY<<2)+y*(dVerY<<2)-posOffsetY
Second, the affine prediction signal generators 111F/241F shift the above-described "diffMv" values to the right by 7 bits.

第3に、アフィン予測信号生成部111F/241Fは、以下のように、クリッピング処理を行う。 Third, the affine prediction signal generator 111F/241F performs clipping processing as follows.

diffMv[x][y][i]=Clip3(-dmvLimit,dmvLimit-1,diffMv[x][y][i])
ここで、
dmvLimit=1<<Max(5,bitDepth-7)
である。
diffMv[x][y][i]=Clip3(-dmvLimit, dmvLimit-1, diffMv[x][y][i])
here,
dmvLimit=1<<Max(5, bitDepth-7)
is.

以上のような構成とすることで、「diffMv」の各成分のビット幅を、符号込みで「1<<Max(5,bitDepth-7)+1」ビット以内に抑えることができる。これは、ステップS172で算出した補正MVと同一のビット幅である。 With the above configuration, the bit width of each component of "diffMv" can be suppressed to within "1<<Max(5, bitDepth-7)+1" bits with encoding. This is the same bit width as the corrected MV calculated in step S172.

ステップS183において、アフィン予測信号生成部111F/241Fは、予測信号の補正を行う。 In step S183, the affine prediction signal generator 111F/241F corrects the prediction signal.

以下のように、アフィン予測信号生成部111F/241Fは、PROF処理を適用するブロック及び予測方向について予測信号「pbSamples」の値を補正する。 As described below, the affine prediction signal generation unit 111F/241F corrects the value of the prediction signal “pbSamples” for the block to which the PROF processing is applied and the prediction direction.

dI=gradientH[x][y]×diffMv[x][y][0]+gradientV[x][y]×diffMv[x][y][1]
pbSamples[x][y]=predSamples[x+1][y+1]+(dI>>1)
アフィン予測信号生成部111F/241Fは、L0及びL1の両方でPROF処理を適用する場合は、上述の処理をL0及びL1のそれぞれについて実行する。
dI=gradientH[x][y]*diffMv[x][y][0]+gradientV[x][y]*diffMv[x][y][1]
pbSamples[x][y]=predSamples[x+1][y+1]+(dI>>1)
When applying the PROF processing to both L0 and L1, the affine prediction signal generator 111F/241F performs the above-described processing for each of L0 and L1.

アフィン予測信号生成部111F/241Fは、上述の補正が完了した後、ステップS184へ移動してPROF処理を終了する。 After completing the above-described correction, the affine prediction signal generator 111F/241F moves to step S184 and ends the PROF process.

アフィン予測信号生成部111F/241Fは、PROF処理の完了後は、ステップS114で説明した予測値合成処理を実行する。予測値の合成は、例えば、以下の式で実行できる。 After completing the PROF process, the affine prediction signal generator 111F/241F executes the prediction value combining process described in step S114. Synthesis of predicted values can be performed, for example, by the following formula.

predSamples[x][y]=Clip3(0,(1<<bitDepth)-1,(predSamplesL0[x][y]+predSamplesL1[x][y]+offset2)>>shift2)
ここで、
offset2=1<<(shift2-1)
shift2=Max(3,15-bitDepth)
である。
predSamples[x][y]=Clip3(0, (1<<bitDepth)−1, (predSamplesL0[x][y]+predSamplesL1[x][y]+offset2)>>shift2)
here,
offset2=1<<(shift2-1)
shift2=Max(3,15-bitDepth)
is.

なお、さらにL0側の予測信号「predSamplesL0」及びL1側の予測信号「predSamplesL1」の両方がPROF処理によって補正されていた場合、「predSamplesL0」及び「predSamplesL1」に、ステップS183の計算を代入すると、以下のように変形できる。 Further, when both the L0-side prediction signal "predSamplesL0" and the L1-side prediction signal "predSamplesL1" have been corrected by the PROF process, substituting the calculation in step S183 for "predSamplesL0" and "predSamplesL1" yields the following: can be transformed as

dI_Bi=(dI_L0>>1)+(dI_L1>>1)
pbSamples[x][y]=Clips(0,(1<<bitDepth)-1,(predSamplesL0_orig[x][y]+offset2+predSamplesL1_orig[x][y]+dI_Bi)>>shift2)
ここで、「dI_L0」及び「dI_L1」は、それぞれL0及びL1のdIの値であり、「predSamplesL0_orig」及び「predSamplesL1_orig」は、PROF処理による補正前の予測信号である。
dI_Bi=(dI_L0>>1)+(dI_L1>>1)
pbSamples[x][y]=Clips(0, (1<<bitDepth)−1, (predSamplesL0_orig[x][y]+offset2+predSamplesL1_orig[x][y]+dI_Bi)>>shift2)
Here, “dI_L0” and “dI_L1” are dI values of L0 and L1, respectively, and “predSamplesL0_orig” and “predSamplesL1_orig” are prediction signals before correction by PROF processing.

以上で説明したBDOF処理及びPROF処理で算出される勾配及び補正MVの値は、それぞれビット幅が同一になるようにクリッピングされているため、そこから算出した「bdofOffset」及び「dI_Bi」のビット幅も同一となる。 Since the gradient and correction MV values calculated by the BDOF processing and PROF processing described above are clipped so that the bit widths are the same, the bit widths of "bdofOffset" and "dI_Bi" calculated therefrom are are also the same.

すなわち、予測信号生成部予測信号生成部111D/241Dによって行われるBDOF処理中で算出するオフセット量及びアフィン予測信号生成部111F/241Fによって行われるPROF処理中で2つの参照フレーム(L0/L1)についてそれぞれ算出したオフセット量の合成後の値のビット幅が同一となるように演算してもよい。 That is, the offset amount calculated during the BDOF processing performed by the prediction signal generation unit prediction signal generation unit 111D/241D and the two reference frames (L0/L1) during the PROF processing performed by the affine prediction signal generation unit 111F/241F The calculation may be performed so that the bit width of the combined value of the calculated offset amounts is the same.

また、PROF処理後の予測信号を合成する際の「offset2」及び「shift2」の値と、BDOF処理の「offset4」及び「shift4」の値も同一である。よって、BDOF処理時及びPROF処理を、L0及びL1の両方に適用した場合の予測値生成処理は、完全に同一の式となる。 Also, the values of “offset2” and “shift2” when synthesizing the predicted signal after PROF processing are the same as the values of “offset4” and “shift4” of BDOF processing. Therefore, the prediction value generation processing when the BDOF processing and the PROF processing are applied to both L0 and L1 are completely the same formula.

BDOF処理及びPROF処理を、以上のような構成とすることで、以下の通りとなる。 By configuring the BDOF processing and the PROF processing as described above, the following is obtained.

第1に、ステップS171及びステップS181の勾配算出処理を全く同じ処理とすることができる。 First, the gradient calculation processing in steps S171 and S181 can be exactly the same.

すなわち、予測信号生成部111D/241Dによって行われるBDOF処理中の勾配算出処理及びアフィン予測信号生成部111F/241Fによって行われるPROF処理中の勾配算出処理を、PROF処理が2つの参照フレーム(L0/L1)の両方に適用された場合に同一の処理とすることができる。 That is, the gradient calculation processing during the BDOF processing performed by the prediction signal generation units 111D/241D and the gradient calculation processing during the PROF processing performed by the affine prediction signal generation units 111F/241F are performed by the two reference frames (L0/ L1) can be treated identically when applied to both.

第2に、ステップS172及びステップS182の出力である補正MVのビット幅を全く同一とすることができる。 Secondly, the bit widths of the corrected MVs output from steps S172 and S182 can be exactly the same.

すなわち、予測信号生成部111D/241Dによって行われるBDOF処理中の補正MV量及びアフィン予測信号生成部111F/241Fによって行われるPROF処理中で用いる補正MV量が、それぞれ同一のビット幅になるようにそれぞれクリッピング処理を行うことができる。 That is, the corrected MV amount used in the BDOF processing performed by the prediction signal generation units 111D/241D and the corrected MV amount used in the PROF processing performed by the affine prediction signal generation units 111F/241F are set to have the same bit width. Clipping processing can be performed for each.

第3に、ステップS173の予測値補正処理と、ステップS183及びステップS114の予測値補正及び予測値合成処理とを、全く同じ処理とすることができる。 Thirdly, the prediction value correction processing in step S173 and the prediction value correction and prediction value combination processing in steps S183 and S114 can be exactly the same processing.

すなわち、予測信号生成部111D/241Dによって行われるオフセット量を用いた最終的な予測信号生成処理及びアフィン予測信号生成部111F/241Fによって行われるオフセット量の合成後の値を用いた最終的な予測信号生成処理を同一の処理とすることができる。 That is, the final prediction signal generation processing using the offset amount performed by the prediction signal generation unit 111D/241D and the final prediction using the combined value of the offset amount performed by the affine prediction signal generation unit 111F/241F The signal generation process can be the same process.

BDOF処理及びPROF処理は、上述のように、ブロック毎に排他的に適用されるため、上述の同一の処理部分は、ハードウェア上で実装した場合に、BDOF処理及びPROF処理で、処理回路を共有することが可能になる。これにより、回路規模の削減が期待できる。
(変更例2)
以下、図19及び図20を参照して、上述の実施形態の変更例2について説明する。以下においては、上述の実施形態に対する相違点について主として説明する。本変更例では、ブロック境界検出部151/251でのブロック境界検出方法及び境界強度判定部153/253での境界強度の判定方法について、上述の実施形態とは異なる例を説明する。
Since the BDOF processing and the PROF processing are applied exclusively block by block, as described above, the same processing portion described above, when implemented on hardware, is the BDOF processing and the PROF processing. can be shared. As a result, a reduction in circuit scale can be expected.
(Modification 2)
Modification 2 of the above-described embodiment will be described below with reference to FIGS. 19 and 20. FIG. In the following, differences with respect to the above-described embodiments will be mainly described. In this modified example, an example different from the above embodiment will be described for the block boundary detection method in the block boundary detection units 151/251 and the boundary strength determination method in the boundary strength determination units 153/253.

以下では、ブロック境界検出部151Aについて説明するが、ブロック境界検出部151B/251A/251Bにおいても同様の処理でブロック境界を検出することができる。 Although the block boundary detection section 151A will be described below, block boundaries can also be detected by similar processing in the block boundary detection sections 151B/251A/251B.

図19は、ブロック境界検出部151Aの処理の一例を示すフローチャートである。以下、CU単位で処理を行う場合を例に説明する。 FIG. 19 is a flow chart showing an example of processing of the block boundary detection unit 151A. A case where processing is performed in units of CUs will be described below as an example.

ステップS191において、ブロック境界検出部151Aは、CU境界を検出する。ブロック境界検出部151Aは、垂直方向の境界を検出する処理ブロックであるため、当該CUの左側の垂直方向の境界をフィルタリング処理対象のブロック境界として検出する。 In step S191, the block boundary detection unit 151A detects CU boundaries. Since the block boundary detection unit 151A is a processing block that detects a vertical boundary, it detects the left vertical boundary of the CU as a block boundary to be filtered.

なお、「ブロック境界として検出する」とは、例えば、画面内の当該画素位置が境界か否かについて示す二次元のフラグの配列(例えば、「edgeFalgs[x][y]」)を用意しておき、境界として検出した画素位置のフラグ値を「1」とし、そうでない画素位置のフラグ値を「0」とすることに相当する。 Note that "detecting as a block boundary" means, for example, preparing a two-dimensional flag array (for example, "edgeFalgs[x][y]") indicating whether the pixel position in the screen is a boundary or not. This corresponds to setting the flag value to "1" at pixel positions detected as boundaries and setting the flag value to "0" at other pixel positions.

ここで、当該CUの左側の垂直方向の境界が、ピクチャ境界やスライス境界やタイル境界等の符号化単位の境界に位置する場合は、ブロック境界検出部151Aは、当該境界をブロック境界として検出しないこととしてもよい。 Here, when the left vertical boundary of the CU is positioned at a coding unit boundary such as a picture boundary, a slice boundary, or a tile boundary, the block boundary detection unit 151A does not detect the boundary as a block boundary. You can do it.

ブロック境界検出部151Aは、上記の手順で、CU境界を検出した後、ステップS192へ移る。 After the block boundary detection unit 151A detects the CU boundary in the above procedure, the process proceeds to step S192.

ステップS192において、ブロック境界検出部151Aは、TU境界(変換ブロック境界)を検出する。 In step S192, the block boundary detection unit 151A detects TU boundaries (transformation block boundaries).

ブロック境界検出部151Aは、当該CUの左側の垂直方向の境界を起点として、水平方向の座標を4画素ずつ、垂直方向の画素位置を1画素ずつ増加させながら、各画素位置がTU境界かどうかを確認する。当該画素位置が、TU境界であった場合、ブロック境界検出部151Aは、当該画素位置をブロック境界として検出する。 The block boundary detection unit 151A detects whether each pixel position is a TU boundary while increasing the horizontal coordinate by 4 pixels and the vertical pixel position by 1 pixel, starting from the vertical boundary on the left side of the CU. to confirm. If the pixel position is a TU boundary, the block boundary detection unit 151A detects the pixel position as a block boundary.

ブロック境界検出部151Aは、上記の手順で、TU境界を検出した後、ステップS193へ移る。 After the block boundary detection unit 151A detects the TU boundary in the above procedure, the process proceeds to step S193.

ステップS193において、ブロック境界検出部151Aは、サブブロック境界を検出する。 In step S193, the block boundary detection unit 151A detects sub-block boundaries.

ステップS193で検出対象とするサブブロック境界は、例えば、インター予測を行ったCUのサブブロック境界としてもよい。 The sub-block boundary to be detected in step S193 may be, for example, the sub-block boundary of a CU subjected to inter prediction.

この時、上述のサブブロック境界には、洗練化部111C/241Cで実行されるDMVR処理におけるサブブロック(例えば、16×16画素サイズ)の境界、及び、アフィン動きベクトル算出部111E/241E及びアフィン予測信号生成部111F/241Fで行われるアフィン動き補償におけるサブブロック(例えば、4×4画素サイズ)の境界の両方が含まれてもよい。 At this time, the above-mentioned sub-block boundaries include boundaries of sub-blocks (eg, 16×16 pixel size) in DMVR processing performed by refinement units 111C/241C, and affine motion vector calculation units 111E/241E and affine motion vector calculation units 111E/241E. Both boundaries of sub-blocks (for example, 4×4 pixel size) in affine motion compensation performed by the prediction signal generator 111F/241F may be included.

ステップS193で検出対象とするサブブロック境界は、例えば、アフィン動き補償又は「merge_subblock」が適用されたCUのサブブロック境界としてもよい。 The sub-block boundary to be detected in step S193 may be, for example, the sub-block boundary of a CU to which affine motion compensation or "merge_subblock" is applied.

なお、アフィン動き補償のサブブロックは、当該CUでPROF処理が適用される場合は、PROF処理のサブブロックと一致する。 Note that sub-blocks for affine motion compensation match sub-blocks for PROF processing when PROF processing is applied to the CU.

ここで、ステップS193でアフィン動き補償のサブブロック境界を検出対象とした場合、ブロック境界検出部151Aは、当該CUでPROF処理が適用される場合には、アフィン動き補償のサブブロック境界及びPROF処理のサブブロック境界を検出対象から除外してもよい。 Here, when the sub-block boundary for affine motion compensation is to be detected in step S193, the block boundary detection unit 151A detects the sub-block boundary for affine motion compensation and the PROF process when the PROF process is applied to the CU. may be excluded from detection targets.

すなわち、ブロック境界検出部151Aは、当該CUでアフィン動き補償が適用され且つ当該CUでPROF処理が適用されない場合のみ、アフィン動き補償のサブブロック境界を検出対象としてもよい。勿論、ブロック境界検出部151Aは、PROF処理が適用されるCUについても、アフィン動き補償のサブブロック境界及びPROF処理のサブブロック境界を検出対象としてもよい。 That is, the block boundary detection unit 151A may detect sub-block boundaries for affine motion compensation only when affine motion compensation is applied to the CU and PROF processing is not applied to the CU. Of course, the block boundary detection unit 151A may detect sub-block boundaries for affine motion compensation and sub-block boundaries for PROF processing for CUs to which PROF processing is applied.

なお、ブロック境界検出部151Aは、双予測を行うブロックのサブブロック境界については、L0又はL1の少なくともいずれかでPROF処理が適用されているときに、「PROF処理が適用されるCU」とみなしてもよい。また、ブロック境界検出部151Aは、L0及びL1の両方でPROF処理が適用されているときのみ、「PROF処理が適用されるCU」とみなしてもよい。以下の説明においても同様に解釈できる。 Note that the block boundary detection unit 151A regards a sub-block boundary of a block on which bi-prediction is performed as a "CU to which PROF processing is applied" when PROF processing is applied to at least one of L0 or L1. may Also, the block boundary detection unit 151A may regard a CU to which the PROF process is applied only when the PROF process is applied to both L0 and L1. The following description can be similarly interpreted.

ブロック境界検出部151Aは、当該CUの左側の垂直方向の境界を起点として、水平方向の座標を、以下の方法で算出したサブブロックサイズずつ、垂直方向の画素位置を1画素ずつ増加させながら、各画素位置がサブブロック境界かどうかを確認する。 Starting from the vertical boundary on the left side of the CU, the block boundary detection unit 151A increases the horizontal coordinates by the sub-block size calculated by the following method and increases the vertical pixel position by one pixel. Check if each pixel location is a sub-block boundary.

ブロック境界検出部151Aは、当該画素位置がサブブロック境界であった場合、当該画素位置をブロック境界として検出する。ここで、ブロック境界検出部151Aは、当該位置がサブブロック境界であっても、当該CUにPROF処理が適用されている場合には、サブブロック境界として検出しないという処理としてもよい。 If the pixel position is a sub-block boundary, the block boundary detection unit 151A detects the pixel position as a block boundary. Here, even if the position is a sub-block boundary, the block boundary detection unit 151A may perform processing not to detect the position as a sub-block boundary when the PROF processing is applied to the CU.

上記のサブブロックサイズは、例えば、以下のように算出できる。 The above sub-block size can be calculated, for example, as follows.

サブブロックサイズ=Max(8,(nCbW/NumSbX))
ここで、「nCbW」は、当該CUの幅(水平方向の画素数)であり、「NumSbX」は、当該CU内の水平方向に含まれるサブブロックの数である。
Sub-block size = Max(8, (nCbW/NumSbX))
Here, "nCbW" is the width of the CU (the number of pixels in the horizontal direction), and "NumSbX" is the number of sub-blocks included in the CU in the horizontal direction.

上述の式が用いられて場合、サブブロック境界は、当該CUの左側の垂直方向の境界を起点として、最も細かい場合で水平方向に8画素おきの間隔でサブブロック境界かどうかを判定することとなる。 When the above formula is used, the sub-block boundary is determined whether it is a sub-block boundary at intervals of every 8 pixels in the horizontal direction, starting from the vertical boundary on the left side of the CU. Become.

また、上述のサブブロックサイズは、例えば、以下のように算出してもよい。 Also, the sub-block size described above may be calculated as follows, for example.

サブブロックサイズ=Max(4,(nCbW/NumSbX))
この場合、サブブロック境界は、当該CUの左側の垂直方向の境界を起点として、最も細かい場合で水平方向に4画素おきの間隔でサブブロック境界かどうかを判定することとなる。
Sub-block size = Max(4, (nCbW/NumSbX))
In this case, the sub-block boundary is judged whether or not it is a sub-block boundary at intervals of every 4 pixels in the horizontal direction, starting from the vertical boundary on the left side of the CU in question.

すなわち、ブロック境界検出部151Aは、対象ブロックの左端又は上端の座標を基準として、最小で4画素おきの間隔にて、対象画素位置がサブブロック境界であるかどうかについて判定するように構成されている。 That is, the block boundary detection unit 151A is configured to determine whether or not the target pixel position is a sub-block boundary at intervals of at least every four pixels with reference to the coordinates of the left end or top end of the target block. there is

ブロック境界検出部151Aは、以上の手順で、サブブロック境界を検出した後に、ステップS194へ移り処理を終了する。 After the block boundary detection unit 151A detects the sub-block boundary in the above procedure, the process proceeds to step S194 and ends.

以上では、CU境界、TU境界、サブブロック境界をそれぞれ区別せずに単純にブロック境界として検出する例を説明したが、それぞれを区別して記憶しておいてもよい。 In the above example, the CU boundary, the TU boundary, and the sub-block boundary are simply detected as block boundaries without being distinguished from each other, but they may be stored separately.

例えば、CU境界、TU境界、サブブロック境界という区別で記憶してもよいし、TU境界、動きベクトル境界として区別してもよい。この時、CU境界は、TU境界及び動きベクトル境界の両方として検出される。また、TU境界は、TU境界として検出され、サブブロック境界は、動きベクトル境界として検出される。この区別は、例えば、下記の境界強度判定部153Aで用いることができる。 For example, they may be stored separately as CU boundaries, TU boundaries, and sub-block boundaries, or as TU boundaries and motion vector boundaries. At this time, CU boundaries are detected as both TU boundaries and motion vector boundaries. Also, TU boundaries are detected as TU boundaries, and sub-block boundaries are detected as motion vector boundaries. This distinction can be used, for example, in the boundary strength determination section 153A described below.

以下では、境界強度判定部153Aについて説明するが、境界強度判定部153B/253A/253Bにおいても全く同じ判定を行うことができる。 Although the boundary strength determination unit 153A will be described below, exactly the same determination can be performed by the boundary strength determination units 153B/253A/253B.

境界強度判定部153Aは、対象画素位置がブロック境界でない場合に、境界強度を「0」と判定するように構成されていてもよい。 The boundary strength determination unit 153A may be configured to determine the boundary strength to be "0" when the target pixel position is not a block boundary.

すなわち、ブロック境界検出部151は、PROF処理が適用されたブロック内のサブブロックをブロック境界として検出しないように構成されており、境界強度判定部153Aは、ブロック境界として検出されなかった画素位置の境界強度を「0」と判定するように構成されており、フィルタ決定部154は、境界強度が「0」の場合には、ブロック境界にデブロッキングフィルタを適用しないと決定するように構成されていてもよい。 That is, the block boundary detection unit 151 is configured not to detect sub-blocks in blocks to which the PROF processing is applied as block boundaries, and the boundary strength determination unit 153A detects pixel positions not detected as block boundaries. The boundary strength is determined to be "0", and the filter determination unit 154 is configured to determine not to apply the deblocking filter to the block boundary when the boundary strength is "0". may

境界強度判定部153Aは、対象ブロック及び隣接ブロックがイントラ予測ブロックであるか否かを示す制御データに基づいてブロック境界の境界強度を判定するように構成されていてもよい。 153 A of boundary strength determination parts may be comprised so that the boundary strength of a block boundary may be determined based on the control data which show whether a target block and an adjacent block are intra prediction blocks.

例えば、図20に示すように、境界強度判定部153Aは、対象ブロック及び隣接ブロックの少なくともいずれか1つのブロックがイントラ予測ブロックである場合(すなわち、ブロック境界の両側のブロックの少なくともいずれかがイントラ予測ブロックである場合)に、ブロック境界の境界強度が「2」であると判定ように構成されていてもよい。 For example, as shown in FIG. 20, the boundary strength determination unit 153A determines whether at least one of the target block and the adjacent block is an intra-prediction block (that is, at least one of the blocks on both sides of the block boundary is an intra-prediction block). If it is a prediction block), it may be determined that the boundary strength of the block boundary is "2".

また、境界強度判定部153Aは、対象ブロック及び隣接ブロックに非零(ゼロ)の直交変換係数が含まれるか否か及びブロック境界が変換ブロックの境界であるか否かを示す制御データに基づいてブロック境界の境界強度を判定するように構成されていてもよい。 In addition, the boundary strength determination unit 153A determines based on control data indicating whether or not the target block and adjacent blocks include non-zero (zero) orthogonal transform coefficients and whether or not the block boundary is a boundary between transform blocks. It may be arranged to determine the boundary strength of the block boundary.

例えば、図20に示すように、境界強度判定部153Aは、対象ブロック及び隣接ブロックの少なくともいずれか1つのブロックが非零の直交変換係数を含み、かつ、ブロック境界が変換ブロックの境界である場合(すなわち、ブロック境界の両側のブロックの少なくともいずれかに非零の変換係数が存在し、TUの境界である場合)に、ブロック境界の境界強度が「1」であると判定するように構成されていてもよい。 For example, as shown in FIG. 20, when at least one of the target block and the adjacent block contains a non-zero orthogonal transform coefficient, and the block boundary is a boundary between transform blocks, the boundary strength determination unit 153A (i.e., when at least one of the blocks on both sides of the block boundary has a non-zero transform coefficient and is a TU boundary), the boundary strength of the block boundary is determined to be "1". may be

また、境界強度判定部153Aは、対象ブロック及び隣接ブロックの動きベクトルの差の絶対値が閾値(例えば、1/2画素)以上であるか否かを示す制御データに基づいてブロック境界の境界強度を判定するように構成されていてもよい。その際、当該のブロック境界がPROF処理を適用するブロック内のサブブロック境界であるかどうかに基づいてブロック境界の境界強度を判定するように構成されていてもよい。 In addition, the boundary strength determination unit 153A determines the boundary strength of the block boundary based on control data indicating whether the absolute value of the difference between the motion vectors of the target block and the adjacent block is equal to or greater than a threshold value (eg, ½ pixel). may be configured to determine. At that time, the boundary strength of the block boundary may be determined based on whether the block boundary is a sub-block boundary within the block to which the PROF processing is applied.

例えば、図20に示すように、境界強度判定部153Aは、対象ブロック及び隣接ブロックの動きベクトルの差の絶対値が閾値(例えば、1/2画素)以上である場合(すなわち、ブロック境界の両側のブロックの動きベクトルの差の絶対値が閾値(例えば、1/2画素)以上である場合)、かつ、当該のブロック境界がステップS95においてPROF処理を適用すると判定されたブロックのサブブロック(4×4画素ブロック)境界ではない場合に、ブロック境界の境界強度が「1」であると判定するように構成されていてもよい。 For example, as shown in FIG. 20, the boundary strength determination unit 153A determines when the absolute value of the difference between the motion vectors of the target block and the adjacent block is equal to or greater than a threshold value (for example, 1/2 pixel) (that is, when both sides of the block boundary If the absolute value of the motion vector difference between the blocks is equal to or greater than a threshold value (for example, 1/2 pixel), and the block boundary is the sub-block (4 It may be configured to determine that the boundary strength of the block boundary is "1" when it is not a x4 pixel block) boundary.

すなわち、境界強度判定部153Aは、ブロック境界毎に境界強度を判定するように構成されており、かかるブロック境界の両側のブロックの動きベクトルの差の絶対値が1/2画素以上であり、且つ、かかるブロック境界がPROF処理が適用されたサブブロック境界ではない場合に、境界強度を「1」と判定するように構成されていてもよい。 That is, the boundary strength determination unit 153A is configured to determine the boundary strength for each block boundary, the absolute value of the difference between the motion vectors of the blocks on both sides of the block boundary is 1/2 pixel or more, and , the boundary strength may be determined to be "1" when the block boundary is not a sub-block boundary to which PROF processing is applied.

ここで、フィルタ決定部154は、境界強度が「0」の場合には、ブロック境界にデブロッキングフィルタを適用しないと決定するように構成されていてもよい。 Here, the filter determining unit 154 may be configured to determine not to apply the deblocking filter to the block boundary when the boundary strength is "0".

例えば、境界強度判定部153Aは、対象ブロック及び隣接ブロックの動きベクトルの差の絶対値が閾値(例えば、1/2画素)以上である場合(すなわち、ブロック境界の両側のブロックの動きベクトルの差の絶対値が閾値(例えば、1/2画素)以上である場合)、かつ、当該のブロック境界の両側のブロックがステップS95においてPROF処理を適用すると判定されたブロックではない場合に、ブロック境界の境界強度が「1」であると判定するように構成されていてもよい。 For example, when the absolute value of the difference between the motion vectors of the target block and the adjacent block is equal to or greater than a threshold value (for example, 1/2 pixel), the boundary strength determination unit 153A determines the difference between the motion vectors of the blocks on both sides of the block boundary. is equal to or greater than a threshold value (for example, 1/2 pixel)), and the blocks on both sides of the block boundary are not blocks determined to apply PROF processing in step S95. It may be configured to determine that the boundary strength is "1".

例えば、境界強度判定部153Aは、対象ブロック及び隣接ブロックの動きベクトルの差の絶対値が閾値(例えば、1/2画素)以上である場合(すなわち、ブロック境界の両側のブロックの動きベクトルの差の絶対値が閾値(例えば、1/2画素)以上である場合)、かつ、当該のブロック境界のうち少なくともどちらかのブロックがステップS95においてPROF処理を適用すると判定されたブロックではない場合に、ブロック境界の境界強度が「1」であると判定するように構成されていてもよい。 For example, when the absolute value of the difference between the motion vectors of the target block and the adjacent block is equal to or greater than a threshold value (for example, 1/2 pixel), the boundary strength determination unit 153A determines the difference between the motion vectors of the blocks on both sides of the block boundary. is equal to or greater than a threshold (e.g., 1/2 pixel)), and at least one of the block boundaries is not the block determined to apply PROF processing in step S95, It may be configured to determine that the boundary strength of the block boundary is "1".

なお、双予測を行うブロックのサブブロック境界については、L0又はL1の少なくともいずれかでPROF処理が適用されているときに、「PROF処理を適用すると判定されたブロック」とみなしてもよい。すなわち、この場合はPROF処理がL0及びL1の両方で適用さなかった場合は、動きベクトルの差が閾値以上の場合は境界強度を「1」と判定する。 Note that sub-block boundaries of blocks to be bi-predicted may be regarded as “blocks determined to apply PROF processing” when PROF processing is applied to at least one of L0 and L1. That is, in this case, if the PROF process is not applied to both L0 and L1, the boundary strength is determined to be "1" if the motion vector difference is equal to or greater than the threshold.

すなわち、境界強度判定部153Aは、対象ブロックが双予測である場合で且つ2つの参照フレームのうちの少なくともいずれか1つにPROF処理が適用された場合に、対象ブロックにPROF処理が適用されたとみなすように構成されていてもよい。 That is, when the target block is bi-prediction and when the PROF process is applied to at least one of the two reference frames, the boundary strength determination unit 153A determines that the PROF process has been applied to the target block. It may be configured to assume

また、L0とL1の両方でPROF処理が適用されているときのみ、「PROF処理を適用すると判定されたブロック」とみなしてもよい。すなわち、この場合はPROF処理がL0又はL1のみで適用された場合で、且つ、動きベクトルの差が閾値以上の場合は、境界強度を「1」と判定する。 Also, only when the PROF process is applied to both L0 and L1, it may be regarded as "a block determined to apply the PROF process". That is, in this case, if the PROF process is applied only to L0 or L1 and if the motion vector difference is equal to or greater than the threshold, the boundary strength is determined to be "1".

また、別の例として、PROF処理が適用されているブロック境界では、境界強度の判定において、動きベクトルの差を判定しない或いは動きベクトルの差を「0」とみなす、といった判定をすることもできる。具体例としては、以下のように判定できる。 As another example, at block boundaries to which PROF processing is applied, it is also possible to determine whether the motion vector difference is not determined or the motion vector difference is regarded as "0" in determining the boundary strength. . As a specific example, it can be determined as follows.

当該ブロックが片予測を行うブロックで、且つ、当該ブロックでPROFが適用される場合、サブブロック境界における境界強度の判定では、動きベクトルの差を判定しない或いは動きベクトルの差を「0」とみなす。 If the block is a block that performs uni-prediction and PROF is applied to the block, the boundary strength determination at the sub-block boundary does not determine the motion vector difference or considers the motion vector difference to be "0". .

当該ブロックが双予測を行うブロックで、且つ、L0側の参照フレーム及びL1側の参照フレームが異なる場合、L0側及びL1側のうち、PROFが適用される予測方向(L0のみ、L1のみ又は両方)において、動きベクトルの差を判定しない或いは動きベクトルの差を「0」とみなす。 If the block is a block that performs bi-prediction and the reference frame on the L0 side and the reference frame on the L1 side are different, the prediction direction to which PROF is applied (L0 only, L1 only, or both of the L0 side and L1 side) ), the motion vector difference is not determined or the motion vector difference is regarded as "0".

当該ブロックが双予測を行うブロックで、且つ、L0側の参照フレーム及びL1側の参照フレームが同じフレームの場合、L0側でPROFが適用される場合に、当該サブブロック境界の両側のL0の動きベクトル同士の差を判定しない又は当該サブブロック境界の両側のL0の動きベクトル同士の差を「0」とみなす。 If the block is a block that performs bi-prediction, and the reference frame on the L0 side and the reference frame on the L1 side are the same frame, and when PROF is applied on the L0 side, the movement of L0 on both sides of the sub-block boundary Do not judge the difference between the vectors or consider the difference between the L0 motion vectors on both sides of the sub-block boundary to be "0".

同様に、L1側でPROFが適用される場合に、当該サブブロック境界の両側のL1の動きベクトル同士の差を判定しない又は当該サブブロック境界の両側のL1の動きベクトル同士の差を「0」とみなす。 Similarly, when PROF is applied on the L1 side, the difference between the motion vectors of L1 on both sides of the sub-block boundary is not determined, or the difference between the motion vectors of L1 on both sides of the sub-block boundary is set to "0". Consider.

この場合、L0とL1との間の動きベクトルの差は、従来通り、境界強度の判定に用いられる。具体的には、例えば、当該サブブロック境界の左側のサブブロックのL0側の動きベクトルと当該サブブロック境界の右側のサブブロックのL1側の動きベクトルとの差は、境界強度の判定に用いられる。 In this case, the motion vector difference between L0 and L1 is conventionally used to determine the boundary strength. Specifically, for example, the difference between the L0-side motion vector of the sub-block on the left side of the sub-block boundary and the L1-side motion vector of the sub-block on the right side of the sub-block boundary is used to determine the boundary strength. .

すなわち、境界強度判定部153Aは、対象境界の両側ブロックの同一の予測方向同士の動きベクトルの差を判定する際、当該予測方向にPROF処理が適用された場合に、当該予測方向同士の動きベクトルの差を判定しない或いは当該予測方向同士の動きベクトルの差を「0」とみなすように構成されていてもよい。 That is, when determining the difference between the motion vectors in the same prediction directions of the blocks on both sides of the target boundary, the boundary strength determination unit 153A determines that the motion vectors in the prediction directions are , or the difference between the motion vectors in the prediction directions may be regarded as "0".

または、当該ブロックが双予測を行うブロックで、且つ、L0側の参照フレームとL1側の参照フレームが同じフレームの場合、当該サブブロック境界の両側の動きベクトルがそれぞれPROFを適用する場合に、動きベクトルの差を判定しない或いは動きベクトルの差を「0」とみなすこともできる。 Alternatively, if the block is a block that performs bi-prediction and the reference frame on the L0 side and the reference frame on the L1 side are the same frame, motion vectors on both sides of the sub-block boundary apply PROF. It is also possible to not determine the vector difference or to consider the motion vector difference to be "0".

この場合、例えば、L0側及びL1側の両方でPROFが適用されている場合、L0とL1間の動きベクトルの差も判定しない或いはL0とL1間の動きベクトルの差を「0」とみなす点が、上述の例と異なる。 In this case, for example, when PROF is applied on both the L0 side and the L1 side, the difference in motion vector between L0 and L1 is not determined, or the difference in motion vector between L0 and L1 is regarded as "0". is different from the example above.

また、境界強度判定部153Aは、対象ブロック及び隣接ブロックの動きベクトルの予測で参照される参照ブロックが異なるか否かを示す制御データに基づいて、ブロック境界の境界強度を判定するように構成されていてもよい。 In addition, the boundary strength determination unit 153A is configured to determine the boundary strength of the block boundary based on control data indicating whether or not the reference blocks referred to in the motion vector prediction of the target block and the adjacent block are different. may be

例えば、図20に示すように、境界強度判定部153Aは、対象ブロック及び隣接ブロックの動きベクトルの予測で参照される参照ブロックが異なる場合(すなわち、ブロック境界の両側のブロックで参照画像が異なる場合)に、ブロック境界の境界強度が「1」であると判定するように構成されていてもよい。 For example, as shown in FIG. 20, the boundary strength determination unit 153A determines whether the reference blocks referred to in the motion vector prediction of the target block and the adjacent block are different (that is, when the reference images are different in the blocks on both sides of the block boundary). ), the boundary strength of the block boundary may be determined to be “1”.

境界強度判定部153Aは、対象ブロック及び隣接ブロックの動きベクトルの数が異なるか否かを示す制御データに基づいて、ブロック境界の境界強度を判定するように構成されていてもよい。 The boundary strength determination unit 153A may be configured to determine the boundary strength of the block boundary based on control data indicating whether or not the numbers of motion vectors of the target block and the adjacent blocks are different.

例えば、図20に示すように、境界強度判定部153Aは、対象ブロック及び隣接ブロックの動きベクトルの数が異なる場合(すなわち、ブロック境界の両側のブロックで動きベクトルの数が異なる場合)に、ブロック境界の境界強度が「1」であると判定するように構成されていてもよい。 For example, as shown in FIG. 20, the boundary strength determination unit 153A determines whether the block It may be configured to determine that the boundary strength of the boundary is "1".

以上では、動きベクトルや参照ブロックを用いて境界強度を判定する方法の例について説明したが、動きベクトルや参照ブロックを用いた判定を行うのは、上述のCU境界、サブブロック境界又は動きベクトル境界として検出されたブロック境界のみとしてもよい。 An example of a method of determining boundary strength using motion vectors and reference blocks has been described above. Only the block boundaries detected as .

つまり、TU境界であって、サブブロック境界や動きベクトル境界ではないブロック境界においては、動きベクトルや参照ブロックを用いた判定をスキップするようにしてもよい。この時、TU境界では、境界の両側のブロックの少なくともいずれかに、非零の直交変換係数が存在するか否かのみを確認することとなる。 In other words, determination using motion vectors and reference blocks may be skipped at block boundaries that are TU boundaries but not sub-block boundaries or motion vector boundaries. At this time, at the TU boundary, it is only confirmed whether or not at least one of the blocks on both sides of the boundary has a non-zero orthogonal transform coefficient.

例えば、図20に示すように、境界強度判定部153Aは、上述した条件がいずれも満たされない場合に、ブロック境界の境界強度が「0」であると判定するように構成されていてもよい。 For example, as shown in FIG. 20, the boundary strength determination unit 153A may be configured to determine that the boundary strength of the block boundary is "0" when none of the above conditions are satisfied.

すなわち、アフィン予測信号生成部111F/241Fは、ブロック毎にPROF処理の適否を判定し、かかるPROF処理の適用時には、ブロックを分割したサブブロック毎にPROF処理を行うように構成されている。 That is, the affine prediction signal generator 111F/241F is configured to determine whether the PROF process is appropriate for each block, and to perform the PROF process for each sub-block obtained by dividing the block when applying the PROF process.

また、インループフィルタ処理部150/250は、ブロック境界毎にデブロッキングフィルタの適否を判定し、PROF処理が適用されたブロックのサブブロック境界についてはデブロッキングフィルタを適用しないと決定するように構成されている。 Further, the in-loop filtering unit 150/250 is configured to determine whether the deblocking filter is appropriate for each block boundary, and to determine not to apply the deblocking filter to sub-block boundaries of blocks to which PROF processing has been applied. It is

以上のような構成とすることで、PROF処理が適用されたブロック境界又はサブブロック境界の境界強度が「0」となり、デブロッキングフィルタが適用されなくなる。PROF処理は、主観画質向上効果があるため、このような構成とすることでデブロッキングフィルタによってブロック境界の画素値を補正することで、かえって主観画質を損なってしまうことを防ぐことができる。 With the configuration as described above, the boundary strength of the block boundary or sub-block boundary to which the PROF processing is applied becomes "0", and the deblocking filter is not applied. Since the PROF process has the effect of improving the subjective image quality, it is possible to prevent the subjective image quality from being impaired by correcting the pixel values at the block boundary using the deblocking filter with such a configuration.

また、上述の画像符号化装置100及び画像復号装置200は、コンピュータに各機能(各工程)を実行させるプログラムであって実現されていてもよい。 Also, the image encoding device 100 and the image decoding device 200 described above may be implemented as a program that causes a computer to execute each function (each process).

なお、上記の各実施形態では、本発明を画像符号化装置100及び画像復号装置200への適用を例にして説明したが、本発明は、かかる例のみに限定されるものではなく、画像符号化装置100及び画像復号装置200の各機能を備えた画像符号化/復号システムにも同様に適用できる。 In each of the above-described embodiments, the present invention is applied to the image encoding device 100 and the image decoding device 200 as examples, but the present invention is not limited to such examples. The same can be applied to an image encoding/decoding system having the functions of the encoding device 100 and the image decoding device 200 .

本発明によれば、PROF処理が適用されたサブブロック境界にデブロッキングフィルタを適用しないようにすることで、主観画質の劣化を防ぐことができる。 According to the present invention, degradation of subjective image quality can be prevented by not applying a deblocking filter to sub-block boundaries to which PROF processing has been applied.

10…画像処理システム
100…画像符号化装置
111、241…インター予測部
111A…動きベクトル探索部
111B…動きベクトル符号化部
111C、241C…洗練化部
111D、241D…予測信号生成部
111E、241E…アフィン動きベクトル算出部
111F、241F…アフィン予測信号生成部
112、242…イントラ予測部
121…減算器
122、230…加算器
131…変換・量子化部
132、220…逆変換・逆量子化部
140…符号化部
150、250…インループフィルタ処理部
160、260…フレームバッファ
200…画像復号装置
210…復号部
241B…動きベクトル復号部
10... Image processing system 100... Image encoding devices 111, 241... Inter prediction unit 111A... Motion vector search unit 111B... Motion vector encoding units 111C, 241C... Refinement units 111D, 241D... Prediction signal generation units 111E, 241E... Affine motion vector calculation units 111F, 241F... Affine prediction signal generation units 112, 242... Intra prediction unit 121... Subtractors 122, 230... Adder 131... Transform/quantization units 132, 220... Inverse transform/inverse quantization unit 140 Encoding units 150, 250 In-loop filtering units 160, 260 Frame buffer 200 Image decoding device 210 Decoding unit 241B Motion vector decoding unit

Claims (9)

画像復号装置であって、
ブロック毎にPROF(Prediction Refinementwith Optical Flow)処理の適否を判定し、前記PROF処理の適用時には前記ブロックを分割したサブブロック毎に前記PROF処理を行うように構成されているアフィン予測信号生成部と、
ブロック境界毎にデブロッキングフィルタの適否を判定し、前記PROF処理が適用されたブロックのサブブロック境界についてはデブロッキングフィルタを適用しないと決定するように構成されているインループフィルタ処理部とを備えることを特徴とする画像復号装置。
An image decoding device,
an affine prediction signal generator configured to determine whether or not PROF (Prediction Refinement with Optical Flow) processing is appropriate for each block, and to perform the PROF processing for each sub-block obtained by dividing the block when the PROF processing is applied;
an in-loop filtering unit configured to determine whether the deblocking filter is appropriate for each block boundary, and to determine not to apply the deblocking filter to sub-block boundaries of blocks to which the PROF processing has been applied. An image decoding device characterized by:
前記インループフィルタ処理部は、対象ブロックの左端又は上端の座標を基準として、最小で4画素おきの間隔にて、対象画素位置が前記サブブロック境界であるかどうかについて判定するように構成されているブロック境界検出部を更に備えることを特徴とする請求項1に記載の画像復号装置。 The in-loop filtering unit is configured to determine whether the target pixel position is the sub-block boundary at intervals of at least every four pixels with reference to the coordinates of the left end or the upper end of the target block. 2. The image decoding device according to claim 1, further comprising a block boundary detection unit. 前記インループフィルタ処理部は、
前記ブロック境界毎に境界強度を判定するように構成されており、前記ブロック境界の両側のブロックの動きベクトルの差の絶対値が1/2画素以上であり且つ前記ブロック境界がPROF処理が適用されたサブブロック境界ではない場合に、境界強度を「1」と判定するように構成されている境界強度判定部と、
前記境界強度が「0」の場合には、前記ブロック境界にデブロッキングフィルタを適用しないと決定するように構成されているフィルタ決定部とを備えることを特徴とする請求項1又は2に記載の画像復号装置。
The in-loop filtering unit is
The method is configured to determine a boundary strength for each of the block boundaries, wherein an absolute value of a difference between motion vectors of blocks on both sides of the block boundary is 1/2 pixel or more, and PROF processing is applied to the block boundary. a boundary strength determination unit configured to determine the boundary strength as "1" if the boundary is not a sub-block boundary;
3. The filter determination unit according to claim 1, further comprising a filter determination unit configured to determine not to apply a deblocking filter to the block boundary when the boundary strength is '0'. Image decoding device.
前記インループフィルタ処理部は、
前記PROF処理が適用されたブロック内のサブブロックを前記ブロック境界として検出しないように構成されているブロック境界検出部と、
前記ブロック境界として検出されなかった画素位置の境界強度を「0」と判定するように構成されている境界強度判定部と、
前記境界強度が「0」の場合には、前記ブロック境界にデブロッキングフィルタを適用しないと決定するように構成されているフィルタ決定部とを備えることを特徴とする請求項1又は2に記載の画像復号装置。
The in-loop filtering unit is
a block boundary detection unit configured not to detect sub-blocks in a block to which the PROF processing is applied as the block boundary;
a boundary strength determination unit configured to determine a boundary strength of "0" at a pixel position not detected as the block boundary;
3. The filter determination unit according to claim 1, further comprising a filter determination unit configured to determine not to apply a deblocking filter to the block boundary when the boundary strength is '0'. Image decoding device.
前記境界強度判定部は、対象ブロックが双予測である場合で且つ2つの参照フレームのうちの少なくともいずれか1つに前記PROF処理が適用された場合に、前記対象ブロックに前記PROF処理が適用されたとみなすように構成されていることを特徴とする請求項3又は4に記載の画像復号装置。 The boundary strength determination unit applies the PROF processing to the target block when the target block is bi-predictive and when the PROF processing is applied to at least one of two reference frames. 5. The image decoding device according to claim 3, wherein the image decoding device is configured to be regarded as 前記境界強度判定部は、対象ブロックが双予測である場合で且つ2つの参照フレームのうちの両方に前記PROF処理が適用された場合に、前記対象ブロックに前記PROF処理が適用されたとみなすように構成されていることを特徴とする請求項3又は4に記載の画像復号装置。 When the target block is bi-predictive and the PROF processing is applied to both of two reference frames, the boundary strength determination unit considers that the PROF processing has been applied to the target block. 5. The image decoding device according to claim 3, wherein: 前記境界強度判定部は、対象境界の両側ブロックの同一の予測方向同士の動きベクトルの差を判定する際、当該予測方向に前記PROF処理が適用された場合に、当該予測方向同士の動きベクトルの差を判定しない或いは当該予測方向同士の動きベクトルの差をゼロとみなすように構成されていることを特徴とする請求項3又は4に記載の画像復号装置。 When determining a difference between motion vectors in the same prediction direction of blocks on both sides of the target boundary, the boundary strength determination unit determines that, when the PROF process is applied to the prediction direction, motion vectors in the prediction directions 5. The image decoding apparatus according to claim 3 , wherein the apparatus is configured not to determine the difference or to regard the difference between the motion vectors in the prediction directions as zero. ブロック毎にPROF(Prediction Refinementwith Optical Flow)処理の適否を判定し、前記PROF処理の適用時には前記ブロックを分割したサブブロック毎に前記PROF処理を行う工程と、
ブロック境界毎にデブロッキングフィルタの適否を判定し、前記PROF処理が適用されたブロックのサブブロック境界についてはデブロッキングフィルタを適用しないと決定する工程とを有することを特徴とする画像復号方法。
a step of determining whether or not PROF (Prediction Refinement with Optical Flow) processing is appropriate for each block, and performing the PROF processing on each sub-block obtained by dividing the block when applying the PROF processing;
determining suitability of a deblocking filter for each block boundary, and determining not to apply the deblocking filter to a sub-block boundary of a block to which the PROF processing has been applied.
画像復号装置で用いるプログラムであって、コンピュータに、
ブロック毎にPROF(Prediction Refinementwith Optical Flow)処理の適否を判定し、前記PROF処理の適用時には前記ブロックを分割したサブブロック毎に前記PROF処理を行う工程と、
ブロック境界毎にデブロッキングフィルタの適否を判定し、前記PROF処理が適用されたブロックのサブブロック境界についてはデブロッキングフィルタを適用しないと決定する工程とを実行させることを特徴とするプログラム。
A program for use in an image decoding device, the computer comprising:
a step of determining whether or not PROF (Prediction Refinement with Optical Flow) processing is appropriate for each block, and performing the PROF processing on each sub-block obtained by dividing the block when applying the PROF processing;
determining whether a deblocking filter is appropriate for each block boundary, and determining that the deblocking filter is not applied to a sub-block boundary of a block to which the PROF processing has been applied.
JP2019172136A 2019-09-20 2019-09-20 Image decoding device, image decoding method and program Active JP7200074B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2019172136A JP7200074B2 (en) 2019-09-20 2019-09-20 Image decoding device, image decoding method and program
PCT/JP2020/031565 WO2021054040A1 (en) 2019-09-20 2020-08-21 Image decoding device, image decoding method, and program
CN202080058192.5A CN114270867B (en) 2019-09-20 2020-08-21 Image decoding device, image decoding method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019172136A JP7200074B2 (en) 2019-09-20 2019-09-20 Image decoding device, image decoding method and program

Publications (2)

Publication Number Publication Date
JP2021052228A JP2021052228A (en) 2021-04-01
JP7200074B2 true JP7200074B2 (en) 2023-01-06

Family

ID=74883520

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019172136A Active JP7200074B2 (en) 2019-09-20 2019-09-20 Image decoding device, image decoding method and program

Country Status (3)

Country Link
JP (1) JP7200074B2 (en)
CN (1) CN114270867B (en)
WO (1) WO2021054040A1 (en)

Family Cites Families (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DK149021C (en) * 1981-12-28 1993-05-03 Anton Brandi Jensen PLANT WITH GROUND AIR CONDITIONS FOR AIR DRYING OF GRAIN IN A DRY STORAGE AND FOR TRANSPORTING THE GRAIN AWAY FROM STORAGE
CN101404767A (en) * 2008-11-24 2009-04-08 崔天龙 Parameter-variable automated video transcoding method based on image analysis and artificial intelligence
AU2016200566B2 (en) * 2009-07-01 2017-02-16 Sony Group Corporation Image processing device and method
AU2015200216B2 (en) * 2010-06-04 2015-11-05 Sony Corporation Image Processing Device and Method
BR112013013509B1 (en) * 2010-12-07 2021-12-28 Sony Corporation IMAGE PROCESSING DEVICE, AND, IMAGE PROCESSING METHOD
JP6037064B2 (en) * 2011-01-18 2016-11-30 ソニー株式会社 Image processing apparatus, image processing method, program, and recording medium
US9380320B2 (en) * 2012-02-10 2016-06-28 Broadcom Corporation Frequency domain sample adaptive offset (SAO)
TWI524739B (en) * 2012-02-10 2016-03-01 美國博通公司 Sample adaptive offset (sao) in accordance with video coding
WO2013145773A1 (en) * 2012-03-30 2013-10-03 株式会社Jvcケンウッド Image encoder, image coding method, image coding program, transmitter, transmission method, and transmission program, and image decoder, image decoding method, image decoding program, receiver, reception method, and reception program
SG10201800588QA (en) * 2012-04-13 2018-02-27 Mitsubishi Electric Corp Image encoding device, image decoding device, image encoding method and image decoding method
JP5814191B2 (en) * 2012-06-27 2015-11-17 日本電信電話株式会社 Deblocking processing method, deblocking processing apparatus, program, and recording medium
US9380289B2 (en) * 2012-07-20 2016-06-28 Qualcomm Incorporated Parameter sets in video coding
JP6256340B2 (en) * 2012-09-20 2018-01-10 ソニー株式会社 Image processing apparatus and method, and program
CN104284199B (en) * 2013-07-11 2019-02-01 Nxp股份有限公司 Video encoding/decoding method and device are carried out with the deblocking effect operation for reducing complexity
CN119364024A (en) * 2015-06-11 2025-01-24 杜比实验室特许公司 Method and medium for encoding and decoding image using adaptive deblocking filtering
JP2018107500A (en) * 2016-12-22 2018-07-05 キヤノン株式会社 Coding device, coding method, program, decoding device, decoding method, and program
WO2020211866A1 (en) * 2019-04-19 2020-10-22 Beijing Bytedance Network Technology Co., Ltd. Applicability of prediction refinement with optical flow process

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
BROSS, Benjamin et al.,Versatile Video Coding (Draft 6),Joint Video Experts Team (JVET) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11 15th Meeting: Gothenburg, SE, 3-12 July 2019, [JVET-O2001-vE],JVET-O2001 (version 14),2019年07月31日,<URL:https://jvet-experts.org/doc_end_user/documents/15_Gothenburg/wg11/JVET-O2001-v1.zip>: JVET-O2001-vE.docx: pp.309-310,316-318
CHEN, Jianle et al.,Algorithm description for Versatile Video Coding and Test Model 6 (VTM 6),Joint Video Experts Team (JVET) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11 15th Meeting: Gothenburg, SE, 3-12 July 2019, [JVET-O2002-v2],JVET-O2002 (version 2),ITU-T,2019年09月10日,<URL:https://jvet-experts.org/doc_end_user/documents/15_Gothenburg/wg11/JVET-O2002-v2.zip>: JVET-O2002-v2.docx: pp.41-43
CHEN, Wei et al.,Non-CE9: Block Boundary Prediction Refinement with Optical Flow for DMVR,Joint Video Experts Team (JVET) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11 15th Meeting: Gothenburg, SE, 3-12 July 2019, [JVET-O0581],JVET-O0581 (version 1),2019年07月06日,<URL:https://jvet-experts.org/doc_end_user/documents/15_Gothenburg/wg11/JVET-O0581-v3.zip>: JVET-O0581-v2.DOCX: pp.1-3
LI, Guichun et al.,Non-CE5: On deblocking on affine internal prediction sub-block edges,Joint Video Experts Team (JVET) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11 16th Meeting: Geneva, CH, 1-11 October 2019, [JVET-P0441],JVET-P0441 (version 2),2019年09月25日,<URL:https://jvet-experts.org/doc_end_user/documents/16_Geneva/wg11/JVET-P0441-v2.zip>: JVET-P0441.docx: JVET-P0441.docx; pp.1-3, JVET-P0441-Spec-Text.docx; pp.316-318
UNNO, Kyohei et al.,Non-CE5: Deblocking filter at PROF sub-block boundary,Joint Video Experts Team (JVET) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11 16th Meeting: Geneva, CH, 1-11 October 2019, [JVET-P0547-v2],JVET-P0547 (version 2),2019年10月07日,<URL:https://jvet-experts.org/doc_end_user/documents/16_Geneva/wg11/JVET-P0547-v2.zip>: JVET-P0547-v2.docx: pp.1-8

Also Published As

Publication number Publication date
JP2021052228A (en) 2021-04-01
CN114270867B (en) 2024-10-01
CN114270867A (en) 2022-04-01
WO2021054040A1 (en) 2021-03-25

Similar Documents

Publication Publication Date Title
CN110476424B (en) Video coding and decoding method and device
US9241160B2 (en) Reference processing using advanced motion models for video coding
EP3220646A1 (en) Method for performing localized multihypothesis prediction during video coding of a coding unit, and associated apparatus
JP2020150313A (en) Image decoding device, image decoding method and program
US20250008161A1 (en) Image decoding device, method and program with prediction refinement optical flow
JP7106025B2 (en) Image decoding device, image decoding method and program
US20240283972A1 (en) Image decoding device, image decoding method, and program
JP7200074B2 (en) Image decoding device, image decoding method and program
WO2020049446A1 (en) Partial interweaved prediction
JP7356783B2 (en) Image decoding device, image decoding method and program
JP7055937B1 (en) Image decoder, image decoding method and program
JP7012191B1 (en) Image decoder, image decoding method and program
JP2021052389A (en) Image decoding device, image decoding method and program
WO2019229682A1 (en) Application of interweaved prediction
WO2024222798A1 (en) Methods and apparatus of inheriting block vector shifted cross-component models for video coding
JP7134118B2 (en) Image decoding device, image decoding method and program
CN119013983A (en) Motion compensated picture boundary padding

Legal Events

Date Code Title Description
RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20210407

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20210702

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20220705

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220905

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: 20221206

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20221221

R150 Certificate of patent or registration of utility model

Ref document number: 7200074

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150