Image coding / decoding method for performing BDOF, device, and method for transmitting bit stream

The image encoding/decoding method enhances efficiency by using Bi-directional Optical Flow to improve motion vector derivation and prediction, addressing the challenge of high-resolution image transmission and storage costs.

JP2024125405AActive Publication Date: 2024-09-18NOKIA TECHNOLOGIES OY
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2024106620
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2019-09-23
Filing Date
2024-07-02
Publication Date
2024-09-18
Estimated Expiration
2040-09-09

AI Technical Summary

Technical Problem

The increasing demand for high-resolution, high-quality images poses challenges in efficient transmission and storage due to the increased amount of information, leading to higher costs and the need for improved image compression technologies.

Method used

An image encoding/decoding method and apparatus that utilizes Bi-directional Optical Flow (BDOF) to enhance encoding/decoding efficiency by deriving improved motion vectors and offsets, applying BDOF to sub-blocks within current blocks, and generating improved prediction samples.

Benefits of technology

The method improves encoding/decoding efficiency, enabling more effective transmission and storage of high-resolution images by reducing the amount of data required, thus lowering transmission and storage costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024125405000001
    Figure 2024125405000001
Patent Text Reader

Abstract

To provide an image coding / decoding method of performing a BDOP (Bi-directional optical flow), and provide a device.SOLUTION: An image decoding method contains: a step of deriving a prediction sample of the current block on the basis of motion information of the current block; step of determining whether or not a BDOF (Bi-directional optical flow) is adopted to the current block; a step of deriving a gradient against the current sub-block in the current block in the case of adopting the BDOF to the current block; a step of driving a motion vector (vx and vy) to be improved to the current block on the basis of the gradient; a step of deriving the gradient and a BDOF offset on the basis of the motion vector to be improved; and a step of deriving the prediction sample of the current block and the prediction sample to be improved to the current block on the basis of the BDOF off set.SELECTED DRAWING: Figure 15
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present disclosure relates to an image encoding / decoding method, an apparatus, and a method for transmitting a bitstream. More specifically, BDOP (Bi-directional optical flow) Image encoding / decoding method and apparatus for performing the above, and image generated by the image encoding method / apparatus of the present disclosure The present invention relates to a method for transmitting a bitstream. [Background technology]

[0002] Recently, high-resolution, high-quality images, such as HD (High Definition) images and Demand for HD and UHD (Ultra High Definition) images is increasing in various fields The higher the resolution and quality of image data, the easier it is to transmit it compared to conventional image data. The amount of information or bits transmitted increases relatively. , resulting in increased transmission and storage costs.

[0003] This allows for the effective transmission, storage and playback of high-resolution, high-quality image information. Highly efficient image compression technology is required. Summary of the Invention [Problem to be solved by the invention]

[0004] The present disclosure provides an image encoding / decoding method and apparatus with improved encoding / decoding efficiency. The purpose is to:

[0005] The present disclosure also provides an image encoding / decoding method and apparatus for performing BDOF offset. The purpose is to

[0006] The present disclosure also aims to provide an image encoding / decoding method and apparatus that performs BDOF. The target.

[0007] The present disclosure also relates to a bitstream generated by an image encoding method or apparatus according to the present disclosure. The present invention aims to provide a method for transmitting beams.

[0008] The present disclosure also relates to a bitstream generated by an image encoding method or apparatus according to the present disclosure. The object of the present invention is to provide a recording medium that stores a stream.

[0009] The present disclosure also provides a method for decoding an image received and decoded by an image decoding device according to the present disclosure. The object is to provide a recording medium that stores a bitstream used for restoration.

[0010] The technical problems to be solved by the present disclosure are not limited to the above-mentioned technical problems, Other technical problems that are not solved by the present disclosure will be apparent to those skilled in the art from the following description. This will be clearly understood by those skilled in the art. [Means for solving the problem]

[0011] An image decoding method according to one aspect of the present disclosure is an image decoding method performed by an image decoding device. A method for deriving a predicted sample of a current block based on motion information of the current block, determining whether to apply BDOF to the current block; , when BDOF is applied to the current block, a current sub-block within the current block and deriving a gradient for the current sub-object based on the gradient. The improved motion vector for the block (v x ,v y ) and deriving the graph and deriving a BDOF offset based on the refined motion vector. and the predicted sample of the current block based on the BDOF offset. and deriving an improved prediction sample for the current block. It can be used to form, construct, encompass, contain, etc.

[0012] In the image decoding method according to the present disclosure, the step of deriving the gradient includes: shifting predicted samples of the current block right by a first shift amount; The shift amount is set to a fixed value regardless of the bit depth of the current block. This can be done.

[0013] In the image decoding method according to the present disclosure, the first shift amount may be six.

[0014] In the image decoding method according to the present disclosure, the improved motion vector (v x ,v y ) The step of outputting includes: deriving a second intermediate parameter tempH based on the gradient; and deriving tempV.

[0015] In the image decoding method according to the present disclosure, the step of right-shifting the predicted samples of the current block by a second shift amount; The second shift amount is a fixed value regardless of the bit depth of the current block. can be set to

[0016] In the image decoding method according to the present disclosure, the second shift amount may be four.

[0017] In the image decoding method according to the present disclosure, the second intermediate parameters tempH and temp The step of deriving pV includes shifting the value derived based on the gradient by a third amount. the third shift amount is a bit depth of the current block. can be set to a fixed value regardless of

[0018] In the image decoding method according to the present disclosure, the third shift amount may be one.

[0019] In the image decoding method according to the present disclosure, the improved motion vector (v x ,v y )teeth, It can be clipped to a predetermined range.

[0020] In the image decoding method according to the present disclosure, the improved motion vector (v x ,v y ) The predetermined range to be ripped is fixed regardless of the bit depth of the current block. The range can be set to a specified range.

[0021] In the image decoding method according to the present disclosure, the step of deriving the BDOF offset includes: The value derived based on the gradient and the improved motion vector is then converted into a predetermined sequence. the predetermined shift amount is a bit shift of the current block. It can be set to a fixed range regardless of the block depth.

[0022] In the image decoding method according to the present disclosure, an improved prediction sample for the current block is The step of deriving the pull includes clipping the BDOF offset to a predetermined range. the predetermined range is set based on the bit depth of the current block. It is possible.

[0023] An image decoding device according to another aspect of the present disclosure includes a memory and at least one processor. and wherein the at least one processor selects the current block based on motion information of the current block. Derive a predicted sample of the block and determine whether to apply BDOF to the current block. If BDOF is applied to the current block, the current sub-block in the current block a gradient for the current sub-block is derived based on the gradient; The improved motion vector (v x ,v y ) and derive the gradient and the improved A BDOF offset is derived based on the motion vector of the current block. and the BDOF offset. A sample can be derived.

[0024] An image coding method according to another aspect of the present disclosure includes: a prediction sample of a current block based on motion information of the current block, and determining whether to apply BDOF to the current block. When BDOF is applied to the current block, the current sub-block in the current block deriving a gradient for the current sample based on the gradient; The improved motion vector for the block (v x ,v y ) and deriving the graph A step for deriving a BDOF offset based on the gradient and the improved motion vector. and calculating the predicted sample of the current block based on the BDOF offset. and deriving an improved prediction sample for the current block. do.

[0025] A transmission method according to another aspect of the present disclosure is a method for transmitting an image by an image encoding device or an image encoding method according to the present disclosure. The generated bitstream can be transmitted.

[0026] A computer-readable recording medium according to another aspect of the present disclosure includes: The bitstream generated by the image encoder can be stored.

[0027] The features described above in the brief summary of the present disclosure are illustrative of the following detailed description of the present disclosure. These are merely exemplary embodiments and are not intended to limit the scope of the present disclosure. [Effects of the Invention]

[0028] According to the present disclosure, an image encoding / decoding method and apparatus with improved encoding / decoding efficiency are provided. can be provided.

[0029] Also, according to the present disclosure, there is provided an image encoding / decoding method and apparatus for deriving a BDOF offset. Placement can be provided.

[0030] The present disclosure also provides an image encoding / decoding method and apparatus that performs BDOF. It is possible.

[0031] Furthermore, according to the present disclosure, the bits generated by the image encoding method or apparatus according to the present disclosure A method for transmitting a video stream can be provided.

[0032] Furthermore, according to the present disclosure, the bits generated by the image encoding method or apparatus according to the present disclosure A recording medium storing the video stream can be provided.

[0033] Further, according to the present disclosure, a video signal received and decoded by the video decoding device according to the present disclosure is A recording medium storing a bitstream used for image restoration can be provided. .

[0034] The effects obtained by the present disclosure are not limited to the above-mentioned effects, and other effects not described above include the following: From the following description, it will be clearly understood by a person having ordinary skill in the art to which the present disclosure pertains. It will be. [Brief explanation of the drawings]

[0035] [Figure 1] 1 is a diagram illustrating a video coding system to which embodiments of the present disclosure can be applied; [Figure 2] 1 is a diagram schematically illustrating an image encoding device to which an embodiment of the present disclosure can be applied. [Figure 3] FIG. 1 is a diagram schematically illustrating an image decoding device to which an embodiment of the present disclosure can be applied. [Figure 4] 1 is a flowchart illustrating a video / image coding method based on inter prediction. [Figure 5] 10 is a diagram illustrating an example configuration of an inter prediction unit 180 according to the present disclosure. [Figure 6] 1 is a flowchart illustrating a video / image decoding method based on inter prediction. [Figure 7] 10 is a diagram illustrating an example of the configuration of an inter prediction unit 260 according to the present disclosure. [Figure 8] FIG. 10 is a diagram illustrating peripheral blocks used as spatial merging candidates. [Figure 9] FIG. 1 is a diagram illustrating a merge candidate list construction method according to an example of the present disclosure. [Figure 10] FIG. 10 illustrates candidate pairs for redundancy checks performed on spatial candidates. [Figure 11] FIG. 10 is a diagram illustrating a method for scaling motion vectors of temporal candidates. [Figure 12] FIG. 10 is a diagram for explaining a position to which a time candidate is guided. [Figure 13] FIG. 2 is a diagram illustrating a motion vector predictor candidate list construction method according to an example of the present disclosure. [Figure 14] FIG. 10 is a diagram showing an expanded CU for performing BDOF. [Figure 15] 10 is a diagram illustrating a process of deriving a predicted sample of a current block by applying BDOF. [Figure 16] FIG. 1 is a diagram illustrating inputs and outputs of a BDOF process according to an embodiment of the present disclosure. [Figure 17] FIG. 1 is a diagram illustrating variables used in a BDOF process according to an embodiment of the present disclosure. [Figure 18] 10 is a diagram illustrating a method for generating a predicted sample for each sub-block in a current CU based on whether BDOF is applied, according to an embodiment of the present disclosure. [Figure 19] 10A and 10B are diagrams illustrating a method for deriving gradient, autocorrelation, and cross-correlation of a current sub-block according to an embodiment of the present disclosure. [Figure 20] 10 is a diagram illustrating a method for deriving an improved motion vector (motion refinement, vx, vy), deriving a BDOF offset, and generating a predicted sample of a current sub-block according to one embodiment of the present disclosure. [Figure 21] FIG. 10 is a diagram illustrating variables used in a BDOF process according to another embodiment of the present disclosure. [Figure 22] 10A and 10B are diagrams illustrating a method for deriving gradient, autocorrelation, and cross-correlation of a current sub-block according to another embodiment of the present disclosure. [Figure 23]10 is a diagram illustrating a method for deriving a refined motion vector (motion refinement, vx, vy), deriving a BDOF offset, and generating a predicted sample of a current sub-block according to another embodiment of the present disclosure. [Figure 24] FIG. 10 is a diagram illustrating variables used in a BDOF process according to another embodiment of the present disclosure. [Figure 25] 10A and 10B are diagrams illustrating a method for deriving gradient, autocorrelation, and cross-correlation of a current sub-block according to another embodiment of the present disclosure. [Figure 26] FIG. 10 is a diagram illustrating variables used in a BDOF process according to another embodiment of the present disclosure. [Figure 27] 10A and 10B are diagrams illustrating a method for deriving gradient, autocorrelation, and cross-correlation of a current sub-block according to another embodiment of the present disclosure. [Figure 28] FIG. 1 illustrates a content streaming system to which an embodiment of the present disclosure can be applied. DETAILED DESCRIPTION OF THE INVENTION

[0036] Hereinafter, with reference to the accompanying drawings, embodiments of the present disclosure will be described in detail. However, the present disclosure will be described in detail so that a person having ordinary skill in the art can easily carry out the invention. As those skilled in the art would realize, the described embodiments may be modified in various different ways, all without departing from the spirit or scope of the present invention.

[0037] In describing the embodiments of the present disclosure, specific descriptions of known configurations or functions are omitted. If it is determined that there is a risk of making the main points of the disclosure unclear, a detailed explanation will be provided. In the drawings, parts that are not relevant to the description of the present disclosure are omitted. Similar parts are designated by similar reference numerals.

[0038] In this disclosure, an element may be "coupled," "coupled," or "connected" to another element. When this is the case, this is not only a direct connection, but also a connection between them. It can also include an indirect connection relationship that exists. When the term "include" or "have" is used, this does not include other components unless specifically stated to the contrary. It does not mean that an element is excluded, but that it can further include another component.

[0039] In this disclosure, terms such as "first" and "second" refer to one component separated from another component. and does not imply any order or importance among the components unless otherwise stated. Therefore, within the scope of this disclosure, the first component of one embodiment may be replaced with another component. In the embodiment, it may be referred to as a second component, and similarly, the second component of one embodiment may be referred to as a second component of another embodiment. In the embodiment, this may be referred to as the first component.

[0040] In this disclosure, components that are distinct from one another are used to clearly describe their respective features. This does not mean that the components are necessarily separated. Several components may be integrated into a single hardware or software unit. Even if one component is distributed and consists of multiple hardware or software units, Therefore, even if not specifically mentioned, such integrated or distributed embodiments are also included in the present disclosure. Included in the range shown.

[0041] In this disclosure, the components described in the various embodiments are essential components. This does not imply that some may be optional components. Embodiments consisting of a subset of the disclosed components are also within the scope of the present disclosure. Examples including components other than those described in the examples are also included within the scope of the present disclosure. do.

[0042] This disclosure relates to image encoding and decoding, and the terms used in this disclosure are , unless otherwise defined in this disclosure, have their ordinary meaning in the technical field to which this disclosure pertains. It is possible.

[0043] In this disclosure, a "picture" generally refers to any one of a particular time period. A slice / tile is a unit that represents one image. A coding unit that constitutes part of a picture. A picture consists of one or more slices. A slice / tile can consist of one or more CTUs (coding units). It can contain a reeunit.

[0044] In this disclosure, a "pixel" or "pel" refers to one pixel. It can also mean the smallest unit that makes up a chart (or image). It also corresponds to a pixel. The term "sample" can be used to describe a sample. It can show the value of a pixel or a pixel, and the luma component of the pixel / pixel It can also show only the value, which shows only the chroma component pixel / pixel value. It is also possible to do this.

[0045] In this disclosure, a "unit" can refer to a basic unit of image processing. A unit is a particular region of a picture and at least some of the information related to that region. The unit may be a "sample array," a "block," or the like, depending on the case. It can be used interchangeably with terms such as "block" or "area." In this case, an MxN block is a sample (or sample array) consisting of M columns and N rows. contains a set (or array) of transform coefficients It can be done.

[0046] In this disclosure, the term "current block" refers to a "current coding block" or "current coding block." "block to be coded", "block to be decoded" or "block to be processed" When a prediction is made, it can mean either one of the following: "Current predicted block" or "block to be predicted" can mean "current predicted block." If transform (inverse transform) / quantization (inverse quantization) is performed, the "current block" is the "current transform block". This can mean a "lock" or a "block to be converted." In this case, the "current block" can mean the "block to be filtered."

[0047] In this disclosure, " / " and "," can be interpreted as "and / or." For example, "A / B" and "A, B" can be interpreted as "A and / or B." " / B / C" and "A, B, C" mean "at least one of A, B and / or C." It is possible.

[0048] In this disclosure, "or" can be interpreted as "and / or." For example, "A "or B" means 1) only "A", 2) only "B", or 3) "A and B." Alternatively, in this disclosure, "or" can mean "additionally or alternatively." "additionally orally" can mean can.

[0049] Video Coding System Overview

[0050] FIG. 1 is a diagram illustrating a video coding system according to this disclosure.

[0051] The video coding system according to one embodiment includes an encoding device 10 and a decoding device 20. The encoding device 10 may include a Image information or data in file or streaming format on a digital storage medium The data may be transmitted to the decoding device 20 via a network or a computer.

[0052] The encoding device 10 according to the embodiment includes a video source generating unit 11, an encoding unit 12, and a transmitting unit. The decoding device 20 according to one embodiment includes a receiving unit 21, a decoding unit 22, and a and a rendering unit 23. The encoding unit 12 includes a video / image encoding unit. The decoding unit 22 may be referred to as a video / image decoding unit. The transmitting unit 13 can be included in the encoding unit 12. The receiving unit 21 can be included in the decoding unit 13. 22. The rendering unit 23 may also include a display unit. The display unit may be configured as a separate device or external component. Cut.

[0053] The video source generator 11 generates video / images through a process of capturing, synthesizing, or generating the video / images. The video source generating unit 11 can acquire video / images by This may include a capture device and / or a video / image generating device. A capture device can be, for example, one or more cameras, previously captured video / images, The video / image generating device may include a video / image archive containing images. , for example, computers, tablets, and smartphones, etc. For example, a virtual video / image can be generated via a computer. Video / images can be generated, in which case the video / image capture process It can be substituted for the process by which data is generated.

[0054] The encoding unit 12 is capable of encoding the input video / image. For coding efficiency, a series of steps such as prediction, transformation, and quantization can be performed. The encoding unit 12 converts the encoded data (encoded video / image information) into a bit stream. It can be output in bitstream format.

[0055] The transmission unit 13 transmits the coded video / image information or data in file or streaming format over a digital storage medium or network. The digital storage medium can be transmitted to the receiving section 21 of the decoding device 20 via the B, SD, CD, DVD, Blu-ray (registered trademark), HDD, SSD, etc. The transmission unit 13 may include a storage medium having a predetermined file format. It may include elements for generating media files via a broadcast / communication network. The receiving unit 21 may include an element for transmitting the signal via the network. Extract / receive the bitstream from a storage medium or a network and transmit it to the decoder 22. It is possible.

[0056] The decoding unit 22 performs a series of operations such as inverse quantization, inverse transformation, and prediction corresponding to the operations of the encoding unit 12. A procedure can be performed to decode the video / image.

[0057] The rendering unit 23 can render the decoded video / images. The rendered video / image can be displayed via a display unit.

[0058] Overview of the image encoding device

[0059] FIG. 2 is a diagram schematically illustrating an image encoding device to which an embodiment of the present disclosure can be applied.

[0060] As shown in FIG. 2, the image encoding device 100 includes an image dividing unit 110, a subtraction unit 111, and an image encoding unit 112. 5, transform unit 120, quantization unit 130, inverse quantization unit 140, inverse transform unit 150, and addition unit 155 , filtering unit 160, memory 170, inter prediction unit 180, intra prediction unit 18 5 and an entropy coding unit 190. The quantizer 185 and the transformer 120 may be collectively referred to as the "predictor." The residual transform unit 130, the inverse quantization unit 140, and the inverse transform unit 150 The residual processing unit may further include a subtraction unit 115. It is also possible.

[0061] All or at least some of the components constituting the image encoding device 100 may be the same as those in the embodiment. Therefore, it can be realized with one hardware component (e.g., encoder or processor). The memory 170 also stores a DPB (decoded picture block). The data may include a buffer and may be embodied in a digital storage medium.

[0062] The image division unit 110 divides an input image (or picture) input to the image encoding device 100 into Dividing a frame into one or more processing units In one example, the processing unit may be a coding unit. A coding unit can be called a coding tree unit (CU). Unit (coding tree unit, CTU) or maximum coding unit (la rgest coding unit, LCU) to QT / BT / TT (Quad-tree / Recursively by binary-tree / ternary-tree structure For example, one code can be obtained by dividing The unit is based on a quadtree, binary tree and / or ternary tree structure. per depth) into multiple coding units. For the division of units, a quadtree structure is first applied, followed by a binary tree structure and / or a ternary tree structure. can be applied later. Based on the final coding unit that is not further divided, , the coding procedure according to the present disclosure can be performed. It can be used as the final coding unit and divides the maximum coding unit. The resulting lower depth coding unit is used as the final coding unit. Here, the coding procedure may be a prediction, conversion and / or As another example, the processing units of the coding procedure may include steps such as decompression. The unit is a prediction unit (PU) or a transform unit (TU). The prediction unit and the transform unit may be a TransformUnit. Each of the bits is divided or partitioned from the final coding unit. The prediction unit may be a unit of sample prediction, and the transform unit may be The unit is the unit from which the conversion coefficients are derived and / or from which the conversion coefficients are derived. It can be a unit that induces the dual signal.

[0063] The prediction unit (the inter prediction unit 180 or the intra prediction unit 185) predicts the current block ( a predicted sample for the current block, The prediction unit can generate a predicted block. Intra prediction or inter prediction is applied to each current block or CU. The prediction unit can determine whether to use the current block prediction. The information about the prediction can be generated and transmitted to the entropy coding unit 190. The entropy encoding unit 190 can encode the data and output it in a bitstream format. do.

[0064] The intra prediction unit 185 predicts the current block by referring to samples in the current picture. The referenced samples may be in intra prediction mode and / or intra prediction mode. It may be located in the neighborhood of the current block according to the measurement technique, Intra prediction modes can be combined with multiple non-directional modes. The non-directional modes may include, for example, DC and PL modes. The directional mode can include a planar mode. Depending on the level of detail, for example, 33 directional prediction modes or 65 directional prediction modes can be used. However, this is only an example and may include more or less based on the configuration. The intra prediction unit 185 can use the directional prediction modes applied to the surrounding blocks. The prediction mode can be used to determine the prediction mode to be applied to the current block. do.

[0065] The inter prediction unit 180 predicts a reference block identified by a motion vector on a reference picture. Based on the block (reference sample array), a predicted block for the current block is derived. In this case, in order to reduce the amount of motion information transmitted in the inter prediction mode, Therefore, the motion information is calculated based on the correlation between the motion information of the surrounding blocks and the current block. The motion information can be predicted in units of sub-blocks or samples. The motion information may include an inter-prediction method and a reference picture index. It may further include direction (such as L0 prediction, L1 prediction, or Bi prediction) information. If , the surrounding blocks are spatial surrounding blocks currently present in the picture. neighboring block) and the temporal neighboring blocks (t The reference block may include a temporary neighboring block. The reference picture including the block and the reference picture including the temporal peripheral block may be the same. The temporal peripheral blocks may be different from each other. located reference block), collocated CU (colCU), etc. The reference picture including the temporal peripheral block can be called a co-located picture. It can be called a picture (collocatedpicture, colPic) For example, the inter prediction unit 180 constructs a motion information candidate list based on neighboring blocks. and deriving a motion vector and / or a reference picture index for the current block. For this purpose, information can be generated that indicates which candidates are to be used. Inter prediction can be performed based on the mode, for example, skip mode and merge mode. In this case, the inter prediction unit 180 uses the motion information of the neighboring blocks as the motion information of the current block. In skip mode, unlike merge mode, The signal may not be transmitted. In the case of MVP mode, the motion vectors of the surrounding blocks are used as the motion vectors. Used as a predictor (motion vector predictor), the motion vector difference (motion vector difference) and the input to the motion vector predictor The motion vector of the current block is determined by encoding an indicator. The motion vector differential can be signaled by subtracting the motion vector of the current block from the motion vector of the current block. and the motion vector predictor.

[0066] The prediction unit generates a prediction signal based on various prediction methods and / or techniques described below. For example, the prediction unit may use intra prediction or inter prediction for predicting the current block. Not only can it apply inter-prediction, but it can also apply intra-prediction and inter-prediction simultaneously. Intra prediction and inter prediction can be applied simultaneously to predict the current block. The prediction method used is CIIP (combined inter- and intra-prediction). The prediction unit can be called an image prediction unit. It is also possible to perform an intrablock copy (IBC). Intra-block copy is, for example, SCC (screen content coding ) can be used for image / video coding of content such as games. BC is an already reconstructed block in the current picture at a predetermined distance from the current block. This is a method of predicting the current block using a reference block. When IBC is applied, The position of the reference block in the current picture is determined by the vector (block vector) corresponding to the predetermined distance. can be encoded as a vector.

[0067] The predicted signal generated by the predictor is used to generate a reconstructed signal or The subtractor 115 can be used to generate a residual signal. The predicted signal (prediction signal) output from the prediction unit is The residual signal (residual signal) is obtained by subtracting the predicted sample array from the measured block. It can generate a residual signal, a residual block, or a residual sample array. The resulting residual signal can be transmitted to the converter 120 .

[0068] The transform unit 120 applies a transform technique to the residual signal to generate transform coefficients (transform coefficients). For example, the transform technique can generate DCT ( DiscreteCosineTransform), DST(DiscreteSin eTransform), KLT(Karhunen-LoeveTransform) , GBT (Graph-Based Transform), or CNT (Condition (mainly Non-linear Transform) Here, when the relationship information between pixels is expressed as a graph, GBT can be , denotes the transformation obtained from this graph. CNT is the sum of all previously restored pixels. Prediction using all previously reconstructed pixels This means generating a signal and then obtaining a transformation based on it. The transformation process is performed by dividing the signal into the same squares. It can also be applied to blocks of pixels of different sizes, and can be applied to non-square, variable-sized blocks. It can also be applied to blocks.

[0069] The quantization unit 130 quantizes the transform coefficients and transmits them to the entropy coding unit 190. The entropy coding unit 190 encodes the quantized signal (quantized transform coefficients) The quantized information can be coded and output in a bitstream format. The information about the transformed coefficients can be called residual information. 0 is block-quantized based on the coefficient scan order. The transform coefficients can be rearranged in a one-dimensional vector format, and the quantities in the one-dimensional vector format can be generating information about the quantized transform coefficients based on the quantized transform coefficients; It is also possible.

[0070] The entropy coding unit 190 may use, for example, an exponential Golomb omb), CAVLC(context-adaptive variable length hcoding), CABAC(context-adaptivebinaryari Various encoding methods can be used, such as entropy coding. In addition to the quantized transform coefficients, the encoder 190 also stores information necessary for video / image reconstruction (e.g. For example, the values ​​of syntax elements) together or separately. The encoded information (e.g., encoded video / image information) ) is a bitstream format of NAL (Network Abstraction Layer) The video / image information can be transmitted or stored in units of r) units. Parameter Set (APS), Picture Parameter Set (PPS), Sequence Parameter Various parameter sets, such as the Signal Processing System (SPS) or the Video Parameter Set (VPS) The video / image information may further include information regarding the general restriction information. May further include general constraint information. The signaling information, transmitted information and / or syntax referred to in this disclosure The elements are encoded via the encoding procedure described above and included in the bitstream. can be done.

[0071] The bitstream can be transmitted over a network or digitally The network may be a broadcast network and / or a communication network. Digital storage media can include USB, SD, CD, DVD, Blu-ray, etc. It can include various storage media such as ay (registered trademark), HDD, SSD, etc. A transmission unit (not shown) for transmitting the signal output from the tropy coding unit 190 and / or a storage unit A storage unit (not shown) that stores the image data may be provided as an internal / external element of the image encoding device 100. Alternatively, the transmission unit may be provided as a component of the entropy coding unit 190. Cut.

[0072] The quantized transform coefficients output from the quantizer 130 are used to generate the residual signal. For example, the quantized transform coefficients can be dequantized by the inverse quantization unit 140 and the and inverse transform unit 150 to apply inverse quantization and inverse transform to obtain a residual signal. (residual block or residual sample) can be reconstructed.

[0073] The adder 155 outputs the restored residual signal to the inter predictor 180 or the intra predictor 180. The signal is added to the predicted signal output from the measurement unit 185 to perform reconstruction. ed) signals (reconstructed picture, reconstructed block, reconstructed sample array) can be generated. Residuals for the current block are not processed as in the case of skip mode. If not, the predicted block can be used as the reconstruction block. 55 can be called a restoration unit or a restoration block generator. The generated restoration signal is , which can be used for intra prediction of the next block to be processed in the current picture. , which is used for inter prediction of the next picture after filtering as described below. It is also possible.

[0074] On the other hand, as will be described later, LMCS (luma mapping window) is used in the picture coding process. chromatic scaling) can also be applied.

[0075] The filtering unit 160 applies filtering to the restored signal to obtain subjective / objective image quality. For example, the filtering unit 160 may apply various filtering to the reconstructed picture. Applying a filtering method to generate a modified reconstructed picture The corrected reconstructed picture can be stored in the memory 170, specifically in the The various filtering methods can be stored in the DPB, for example, deblocking. filtering, sample adaptive offset set), adaptive loop filter, bidirectional filter The filtering section may include a bilateral filter. 160 is a filter related information as will be described later in the explanation of each filtering method. The filter can generate various information related to the filter and transmit it to the entropy coding unit 190. The information about the ring is encoded in the entropy encoding unit 190 and is then stored in a bitstream format. It can be output as an expression.

[0076] The corrected reconstructed picture transmitted to the memory 170 is then referenced by the inter-prediction unit 180. The image coding device 100 can use the image as an inter-frame picture. When the prediction is applied, the prediction mismatch between the image encoding device 100 and the image decoding device is This can be avoided and the coding efficiency can be improved.

[0077] The DPB in the memory 170 is used as a reference picture in the inter-prediction unit 180. The memory 170 stores the current picture. The motion information of the block from which the motion information is derived (or coded) and / or already restored The motion information of the blocks in the picture may be stored. is used as motion information of spatial or temporal surrounding blocks. , can be transmitted to the inter predictor 180. The memory 170 stores the The reconstructed samples of the reconstructed block can be stored and transmitted to the intra prediction unit 185. It is possible.

[0078] Overview of the image decoding device

[0079] FIG. 3 is a diagram schematically illustrating an image decoding device to which an embodiment of the present disclosure can be applied.

[0080] As shown in FIG. 3, the image decoding device 200 includes an entropy decoding unit 210, Inverse quantization unit 220, inverse transformation unit 230, addition unit 235, filtering unit 240, memory 2 50, the inter prediction unit 260 and the intra prediction unit 265. The prediction unit 260 and the intra prediction unit 265 may be collectively referred to as a "prediction unit." The quantization unit 220 and the inverse transform unit 230 may be included in the residual processing unit.

[0081] All or at least some of the components constituting the image decoding device 200 are the same as those in the embodiment. Therefore, it is realized in one hardware component (e.g., decoder or processor). The memory 170 may also include a digital picture library (DPB), a digital storage medium (DSM), or the like. This can be achieved by:

[0082] The image decoding device 200 receives a bitstream containing video / image information and performs the decoding process shown in FIG. The image is restored by executing a process corresponding to the process performed by the image encoding device 100. For example, the image decoding device 200 can perform the processing unit applied in the image coding device. Therefore, the processing unit for decoding can be, for example, A coding unit can be a coding unit. The image decoding device can then divide and obtain the maximum coding unit. The restored image signal decoded and outputted through the device 200 is transmitted to a playback device (not shown). It can be played.

[0083] The image decoding device 200 converts the signal output from the image encoding device of FIG. 1 into a bit stream. The received signal is then passed through the entropy decoding unit 210. For example, the entropy decoding unit 210 can decode the bitstream as follows: Sampling to obtain information (e.g., video / image information) required for image restoration (or picture restoration) The video / image information can be derived from an adaptive parameter set (APS), a pixel Picture Parameter Set (PPS), Sequence Parameter Set (SPS) or Video It may also contain information about various parameter sets, such as the parameter set (VPS). In addition, the video / image information may include general constraint information (generalconstant information). The image decoding device may further include image information. information about said parameter set and / or said general restriction information for decoding an image. The signaling information, received information and The decoding procedure is performed to decode the syntax elements and / or the image data. For example, the entropy decoding unit 210 may Bit coding based on coding methods such as Exponential-Golomb coding, CAVLC, or CABAC Decode the information in the stream and obtain the values ​​of the syntax elements required for image restoration, residual quantized values ​​of the transform coefficients for CABAC can be output. The entropy decoding method extracts the bins ( bin) and receives the syntax element information to be decoded, the surrounding blocks, and the block to be decoded. The code is generated using the decoded information of the block or the symbol / bin information decoded in the previous step. Determine the context model and then The probability of occurrence of a bin is predicted and the bin is arithmetically decoded. By performing a coding, a symbol corresponding to the value of each syntax element is generated. At this time, the CABAC entropy decoding method is based on the decision of the context model. After that, the decoded symbol / bin is used for the context model of the next symbol / bin. The context model can be updated using the information from the entropy decoding unit 21. Among the information decoded in step 0, information related to prediction is transmitted to the prediction unit (inter prediction unit 260 and The intra prediction unit 265 performs entropy decoding on the image data. The residual values, i.e., the quantized transform coefficients and related parameter information, The dequantized signal can be input to the inverse quantization unit 220. The dequantized signal can also be decoded by the entropy decoding unit 210. Among the collected information, the information related to filtering is provided to the filtering unit 240. On the other hand, a receiving unit (not shown) that receives the signal output from the image coding device can (not shown) may be further provided as an internal / external element of the image decoding device 200, or may be received The signaling unit may also be provided as a component of the entropy decoding unit 210.

[0084] On the other hand, the image decoding device according to the present disclosure is called a video / image / picture decoding device. The image decoding device may include an information decoder (video / image / picture information decoder). decoder) and / or sample decoder (video / image / picture sample decoder) The information decoder may include an entropy decoding unit 210. The sample decoder includes an inverse quantization unit 220, an inverse transform unit 230, an adder unit 235, a filter the decoding unit 240, the memory 250, the inter prediction unit 260, and the intra prediction unit 265 It may include at least one.

[0085] The inverse quantization unit 220 inverse quantizes the quantized transform coefficients and outputs the transform coefficients. The inverse quantization unit 220 rearranges the quantized transform coefficients in a two-dimensional block format. In this case, the reordering can be performed in the same order as the coefficient scan order performed by the image coding apparatus. The inverse quantization unit 220 may perform the quantization based on the quantization parameter (e.g., performing inverse quantization on the quantized transform coefficients using the quantization step size information; The transform coefficient can be obtained.

[0086] The inverse transform unit 230 inversely transforms the transform coefficients to generate a residual signal (residual block , residual sample array) can be obtained.

[0087] The prediction unit performs prediction on the current block, and A predicted block containing: The prediction unit performs the following operation based on the prediction information output from the entropy decoding unit 210: , whether intra prediction or inter prediction is applied to the current block. It is possible to determine the specific intra / inter prediction mode (prediction technique). This can be done.

[0088] The prediction unit can generate a prediction signal based on various prediction methods (techniques) described below. is the same as that described in the description of the prediction unit of the image encoding device 100.

[0089] The intra prediction unit 265 predicts the current block by referring to samples in the current picture. The intra prediction unit 185 can be described in relation to the intra prediction unit 265. The same can be applied to

[0090] The inter prediction unit 260 predicts a reference block identified by a motion vector on a reference picture. Based on the block (reference sample array), a predicted block for the current block is derived. In this case, in order to reduce the amount of motion information transmitted in the inter prediction mode, Therefore, the motion information is calculated based on the correlation between the motion information of the surrounding blocks and the current block. The motion information can be predicted in units of sub-blocks or samples. The motion information may include an inter-prediction method and a reference picture index. It may further include direction (such as L0 prediction, L1 prediction, or Bi prediction) information. In this case, the surrounding blocks are spatial surrounding blocks that exist in the current picture. l neighboring block) and the temporal neighboring blocks (t For example, The motion prediction unit 260 constructs a motion information candidate list based on the surrounding blocks and The motion vector and / or the reference picture index of the current block are determined based on the complementary selection information. Inter prediction is performed based on various prediction modes (techniques). The prediction information may be a model of inter prediction for the current block. It may contain information indicating the code (technique).

[0091] The adder 235 outputs the acquired residual signal to a prediction unit (inter prediction unit 260 and / or or intra prediction unit 265) By adding the sample array to the reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array), The adder 155 can generate a sample array. can be similarly applied to

[0092] Meanwhile, as will be described later, LMCS (luma mapping window) is used in the picture decoding process. chromatic scaling) can also be applied.

[0093] The filtering unit 240 applies filtering to the restored signal to obtain subjective / objective image quality. For example, the filtering unit 240 may apply various filtering to the reconstructed picture. Applying a filtering method to generate a modified reconstructed picture The corrected reconstructed picture can be stored in the memory 250, specifically in the The various filtering methods can be stored in the DPB, for example, deblocking. filtering, sample adaptive offset set), adaptive loop filter, bidirectional filter It may include a bilateral filter, etc.

[0094] The (corrected) reconstructed picture stored in the DPB of the memory 250 is used by the inter prediction unit 2 60 can be used as a reference picture. The motion information of the block from which the motion information is derived (or decoded) and / or the motion information of the block already reconstructed The motion information of the blocks in the selected picture may be stored. , in order to utilize it as motion information of spatial surrounding blocks or motion information of temporal surrounding blocks, The memory 250 can transmit the reconstruction data in the current picture to the inter-prediction unit 260. The reconstructed samples of the blocks can be stored and transmitted to the intra prediction unit 265. It is possible.

[0095] In this specification, the filtering unit 160 and the inter-prediction unit of the image encoding device 100 The embodiments described above for the image decoding device 200 and the intra-prediction unit 180 and the intra-prediction unit 185 are also applicable to the image decoding device 200. The filtering unit 240, the inter prediction unit 260, and the intra prediction unit 265 are also It can be applied to or corresponding to:

[0096] Inter Prediction Overview

[0097] The image encoding / decoding device performs inter prediction on a block-by-block basis to derive predicted samples. Inter prediction is based on data elements from a picture(s) other than the current picture. It can mean a prediction technique derived in a dependent manner. When super prediction is applied, the reference block identified by the motion vector on the reference picture is used. Based on the block, a prediction block for the current block can be derived.

[0098] At this time, in order to reduce the amount of motion information transmitted in the inter prediction mode, the surrounding blocks are The motion information of the current block is derived based on the correlation between the motion information of the current block and the block. The motion information can be derived in units of blocks, sub-blocks or samples. In this case, the motion information may include a motion vector and a reference picture index. The motion information may further include inter-prediction type information. The inter-prediction type information may indicate direction information of inter-prediction. The type information indicates whether the current block uses one of L0 prediction, L1 prediction, or Bi prediction. It is possible to indicate what is expected.

[0099] When inter prediction is applied to the current block, the neighboring blocks of the current block are , the spatial neighboring blocks currently present in the picture gblock) and the temporal surrounding blocks (temporalneig) present in the reference picture A reference to the current block can be included. The reference picture including the temporally surrounding block and the reference picture including the temporally surrounding block are the same. The temporal peripheral block may be a collocated reference block (c collocated reference block), collocated coding unit (co The reference picture including the temporal peripheral block can be called a reference picture. It is called a collocated picture (colPic). This can be done.

[0100] On the other hand, a motion information candidate list can be constructed based on the neighboring blocks of the current block. At this time, the motion vector and / or reference picture index of the current block can be derived. A flag or index information indicating which candidate is used to signal It can be ing.

[0101] The motion information may include L0 motion information and / or L1 motion information depending on the inter prediction type. The motion vector in the L0 direction is defined as the L0 motion vector or MVL0. The motion vector in the L1 direction is defined as the L1 motion vector or MVL1. Prediction based on L0 motion vectors can be defined as L0 prediction, and L Prediction based on the L1 motion vector can be defined as L1 prediction, and the L0 motion vector can be defined as L1 prediction. Prediction based on both the L1 motion vector and the L2 motion vector is bipredictive. on), where the L0 motion vector is the L0 motion vector in the reference picture list L 0, and L1 motion vectors refer to motion vectors relative to the reference picture L1. It can refer to the motion vectors associated with stream L1.

[0102] The reference picture list L0 includes pictures that are earlier in output order than the current picture. as reference pictures, and the reference picture list L1 includes the current picture and It can contain pictures that come after it in output order, while the previous pictures are , can be defined as a forward (reference) picture, and the pictures after that can be defined as backward (reference) pictures. On the other hand, the reference picture list L0 can be defined as a list of pictures that are smaller than the current picture. It can also include pictures that come after it in output order. In this case, the reference picture In the image list L0, the previous picture is indexed first, and the next picture is indexed second. The reference picture list L1 can be indexed to a picture that is further out than the current picture. The reference picture list can also include previous pictures in the input order. Later pictures are indexed first in L1, and earlier pictures are indexed next. Here, the output order is POC (picture order It can correspond to the order of count.

[0103] FIG. 4 is a flow chart diagram illustrating a video / image coding method based on inter prediction.

[0104] FIG. 5 is a diagram illustrating an example configuration of the inter prediction unit 180 according to the present disclosure.

[0105] The encoding method of FIG. 4 can be performed by the image encoding device of FIG. 2. , step S410 can be performed by the inter prediction unit 180, and step S 420 can be performed by the residual processing unit. Specifically, step S4 20 can be performed by the subtraction unit 115. Step S430 is The prediction information in step S430 can be performed by the inter-encoding unit 190. The residual information in step S430 is derived by the residual prediction unit 180. The residual information can be derived by a processing unit. It can contain information about the quantized transform coefficients for the samples. The residual samples are converted into transform coefficients by the transform unit 120 of the image encoding device. The transform coefficients are derived as quantized transform coefficients through a quantization unit 130. The information about the quantized transform coefficients may be used for residual coding. The data can be encoded by the entropy encoding unit 190 through the procedure.

[0106] The image encoding apparatus may perform inter prediction on the current block (S410 The image coding apparatus derives the inter prediction mode and motion information of the current block, A prediction sample of the current block can be generated. Here, the inter prediction mode is determined. The steps of determining the motion information and generating the predicted sample may be performed simultaneously, or any one of them may be performed simultaneously. One step may precede the other. For example, as shown in Figure 5, The inter-prediction unit 180 of the image encoding device includes a prediction mode determination unit 181, a motion information derivation unit 182, and a 2, and a prediction sample derivation unit 183. The prediction mode for the current block is determined, and the motion information deriving unit 182 determines the prediction mode for the current block. The motion information is derived, and the predicted sample of the current block is derived by the predicted sample derivation unit 183. For example, the inter-prediction unit 180 of the image encoding device may perform motion estimation (mo The previous image is then extracted within a certain area (search area) of the reference picture via a search estimation. A block similar to the current block is searched for, and a block having a minimum or a certain difference from the current block is searched for. Based on this, the reference block can be derived. a reference picture index pointing to a reference picture in which the reference block is located; A motion vector can be derived based on the position difference between the current block and the image. The encoding device determines which of various prediction modes to apply to the current block. The image encoding apparatus can perform rate distortion estimation for the various inter prediction modes. Compare the Rate-Distortion (RD) cost of the current block. However, the image coding device currently The method for determining the inter prediction mode for a block is not limited to the above example, and various methods may be used. Methods are available.

[0107] For example, the inter prediction mode for the current block is merge mode. de), skip mode (skipmode), MVP mode (MotionVecto rPrediction mode), SMVD mode (SymmetricMotion VectorDifference, affine mode, sub Subblock-based merge mode, AMVR mode (Adaptive Motion Vector Resolution mode) de), HMVP mode (History-basedMotionVectorPre bi-predictive merge mode (pair-wise average mode) rgemode), MMVD mode (MergemodewithMotionVect or Differences mode), DMVR mode (Decoder sideMo tionVectorRefinementmode), CIIP mode (Combin edInterandIntraPredictionmode), and GPM(Geo metricPartitioningmode) is determined to be at least one of It is possible.

[0108] For example, if the skip mode or merge mode is applied to the current block, the image code The merger derives merge candidates from the neighboring blocks of the current block, and The image encoding device can use the candidates to construct a merge candidate list. Among the reference blocks pointed to by the merge candidates in the merge candidate list, the current block and It is possible to derive a reference block in which the difference between the two is minimum or equal to or less than a certain standard. A merge candidate associated with the derived reference block is selected, and the selected merge candidate is Merge index information indicating the complement is generated and signaled to the image decoding device. The motion information of the current block can be calculated using the motion information of the selected merge candidate. It can be derived.

[0109] In another example, if the MVP mode is applied to the current block, the image encoding device , a motion vector predictor (MVP, MotionVe Inducing MVP candidates, we use the induced MVP candidates to generate MVP candidates. The image coding device can construct a list of MVP candidates. The motion vector of the selected MVP candidate is set to the motion vector of the current block. In this case, for example, the motion vector derived by the motion estimation described above can be used as the MVP. The motion vector pointing to the reference block is used as the motion vector of the current block. Among the MVP candidates, the one with the smallest difference from the motion vector of the current block is selected. The MVP candidate with the smallest motion vector can be the selected MVP candidate. The difference obtained by subtracting the MVP from the motion vector of the current block is MVD(mot In this case, the ion vector difference (PVD) can be derived. The index information indicating the selected MVP candidate and the information about the MVD are used for image decoding. In addition, when the MVP mode is applied, the The reference picture index value is composed of the reference picture index information and is stored separately. The image decoding device can be signaled.

[0110] The image encoding device derives residual samples based on the predicted samples. The image encoding device performs the above-described operations (S420). The residual sample can be derived by comparison with a sample, for example: The residual samples are obtained by subtracting the corresponding predicted samples from the original samples. can be derived from

[0111] The image encoding device is capable of encoding image information including prediction information and residual information. The image encoding device converts the encoded image information into a bitstream format (S430). The prediction information is information related to the prediction procedure, and can be outputted by the prediction Mode information (e.g., skipflag, mergeflag, or modeindex) The prediction mode information may include information about the motion information. pflag is information indicating whether skip mode is applied to the current block. mergeflag indicates whether merge mode is applied to the current block. Alternatively, the prediction mode information may be information that indicates a plurality of prediction modes, such as modeindex. The skipflag and mer may be information indicating one of the above. If each geflag is 0, MVP mode is applied to the current block. The information about the motion information can be used to derive a motion vector. Candidate selection information (e.g., mergeindex, mvpflag, or mvp Among the candidate selection information, the merge index may include It may be signaled if merge mode is applied to the current block, Information for selecting one of the merge candidates included in the merge candidate list Among the candidate selection information, MVPflag or MVPindex can be , which can be signaled if MVP mode is applied to the current block. , the information required to select one of the MVP candidates included in the MVP candidate list. Specifically, MVPflag can be a syntax element mvp_l0_ It can be signaled using flag or mvp_l1_flag. The information about the motion information may be the information about the MVD and / or the information about the reference picture. The information about the motion information may include L0 prediction, L The register may include information indicating whether mono-prediction or bi-prediction is applied. The dual information is information about the residual sample. may contain information about the quantized transform coefficients for the residual samples. can.

[0112] The output bitstream is stored in a (digital) storage medium and then sent to an image decoding device. Alternatively, it may be transmitted to the image decoding device via a network. Cut.

[0113] On the other hand, as described above, the image coding device Generate a reconstructed picture (a picture containing reconstructed samples and reconstructed blocks) based on the sample This means that the same prediction results as those performed in the image decoding device can be used in the image coding device. This is because it is derived in place, which improves coding efficiency. Therefore, the image coding apparatus generates a reconstructed picture (or a reconstructed sample, a reconstructed block) as The image can be stored in memory and used as a picture for inter prediction. Further in-loop filtering procedures can be applied to the picture, as described above. is.

[0114] FIG. 6 is a flowchart illustrating a video / image decoding method based on inter prediction.

[0115] FIG. 7 is a diagram illustrating an example configuration of the inter prediction unit 260 according to the present disclosure.

[0116] The image decoding device can perform operations corresponding to those performed by the image coding device. The image decoding apparatus performs prediction for the current block based on the received prediction information. Therefore, predicted samples can be derived.

[0117] The decoding method of Fig. 6 can be performed by the image decoding apparatus of Fig. 3. Steps S610 to S630 may be performed by the inter-prediction unit 260. The prediction information in step S610 and the residual information in step S640 are sent to the entropy decoding unit. The image can be obtained from the bitstream by the image decoder 210. The dual processing unit generates a residual signal for the current block based on the residual information. Specifically, the residual processing unit derives the inverse sample (S640). The quantization unit 220 generates quantized transform coefficients derived based on the residual information. , and the inverse transform unit 2 of the residual processing unit derives the transform coefficients by performing inverse quantization based on the 30 performs an inverse transform on the transform coefficients to generate a residual sum for the current block. Step S650 is performed by the addition unit 235 or the reconstruction unit. It can be done.

[0118] Specifically, the image decoding apparatus performs a prediction process for the current block based on the received prediction information. The image decoding apparatus can determine a prediction mode to be used (S610). Based on the prediction mode information in the You can decide whether to

[0119] For example, based on the skipflag, the skip mode is set for the current block. It can also determine whether or not the merge flag is applied. Whether the merge mode or MVP mode is applied to the current block is determined. Alternatively, various inter-prediction methods can be determined based on the mode index. In the inter prediction mode candidate, any one of the inter prediction mode candidates may be selected. The complement may include skip mode, merge mode and / or MVP mode, or This can include various inter-prediction modes, which will be described later.

[0120] The image decoding apparatus performs the decoding of the current block based on the determined inter prediction mode. For example, the image decoding apparatus may derive motion information for the current block (S620). If the lock is in skip or merge mode, the merge candidate list (see below) and selecting one of the merge candidates included in the merge candidate list. The selection can be made based on the candidate selection information (merge index) described above. The motion information of the selected merge candidate can be used to select the current block. For example, the motion information of the selected merge candidate can be derived by can be used as the motion information of the current block.

[0121] In another example, when the MVP mode is applied to the current block, the image decoding apparatus , compose an MVP candidate list, and from among the MVP candidates included in the MVP candidate list, The motion vector of the selected MVP candidate can be used as the MVP of the current block. The selection is based on the candidate selection information (mvpflag or mvpindex) described above. In this case, the current block may be determined based on the information about the MVD. The MVD of the block can be derived based on the MVP of the current block and the MVD. The motion vector of the current block can be derived by using the reference picture. deriving a reference picture index of the current block based on the index information; The reference picture index in the reference picture list for the current block can be The picture pointed to by the pointer is a reference picture used for inter prediction of the current block. It can be derived as

[0122] The image decoding apparatus performs a motion decoding on the current block based on the motion information of the current block. A predicted sample can be generated (S630). In this case, the reference The reference picture is derived based on a picture index, and the motion vector of the current block is calculated. The current block is calculated using the samples of the reference block that the vector points to on the reference picture. Optionally, the predicted sample of the current block may be derived. A further predictive sample filtering procedure may be performed on all or part of the can.

[0123] For example, as shown in FIG. 7, the inter prediction unit 260 of the image decoding device performs a prediction The image processing unit 260 may include a mode determination unit 261, a motion information derivation unit 262, and a predicted sample derivation unit 263. The inter prediction unit 260 of the image decoding device receives the prediction mode from the prediction mode determination unit 261. determining a prediction mode for the current block based on prediction mode information and deriving motion information; The motion information of the current block (motion information) is calculated based on the information about the motion information received by the motion information calculation unit 262. a prediction sample derivation unit 2 derives a prediction vector and / or a reference picture index, etc. At 63, predicted samples of the current block can be derived.

[0124] The image decoding apparatus performs the following operations on the current block based on the received residual information: The image decoding apparatus can generate residual samples corresponding to the above-mentioned A reconstruction signal for the current block is calculated based on the predicted sample and the residual sample. A sample is generated, and a reconstructed picture can be generated based on the sample (S650). Then, the in-loop filtering procedure can be further applied to the restored picture as described above. That is exactly what I did.

[0125] As described above, the inter prediction procedure includes an inter prediction mode decision step, a decided inter prediction mode decision step, and a A step of deriving motion information according to a prediction mode, and performing prediction based on the derived motion information (prediction The inter prediction procedure may include a step of generating a predicted sample. This can be performed in an image encoding device and an image decoding device.

[0126] The motion information derivation step according to the prediction mode will be described in more detail below.

[0127] As mentioned above, inter prediction can be performed using the motion information of the current block. The image coding device can perform the motion estimation procedure. Therefore, the optimal motion information for the current block can be derived. The positioning is performed by using the original block in the original picture to find a similar block with high correlation to the current block. The reference block is searched for in a predetermined search range in the reference picture in fractional pixel units. The similarity of the blocks can be calculated by the current block. SAD (sum of absolute differences) between the lock and the reference block ) in this case, it is calculated based on the reference block with the smallest SAD in the search area. The derived motion information can be used for the inter prediction mode. The signal can be signaled to the image decoding device in various ways based on the received signal.

[0128] If mergemode is applied to the current block, The motion information of the current block is not directly transmitted, but is transmitted using the motion information of the neighboring blocks. Therefore, the flag information informing that merge mode was used and Candidate selection information (e.g., merge candidate) that indicates whether the neighboring blocks of the By transmitting the motion information of the current prediction block, the motion information of the current prediction block can be indicated. In the present disclosure, the current block is the unit of prediction execution, so the current block is the current prediction The term "surrounding block" is used interchangeably with "surrounding predicted block." It can be done.

[0129] The image coding apparatus uses the motion information of the current block to perform the merge mode. Find the merge candidate block to be used For example, up to five merging candidate blocks can be used. The maximum number of merge candidate blocks is not limited to the number of merge candidate blocks in the slice header or tile group. The merge candidate block may be transmitted from, but is not limited to, a block header. After finding the blocks, the image coding apparatus can generate a list of merge candidates. Among them, the merge candidate block with the smallest RD cost is selected as the final merge candidate block. You can choose.

[0130] The present disclosure provides various embodiments for the merge candidate blocks that make up the merge candidate list. The merge candidate list may use, for example, five merge candidate blocks. For example, if you have four spatial merge candidates, ) and one temporal merge candidate It is possible.

[0131] FIG. 8 is a diagram illustrating neighboring blocks used as spatial merge candidates.

[0132] FIG. 9 is a diagram illustrating a method for constructing a merge candidate list according to an example of the present disclosure.

[0133] The image coding device / image decoding device searches the spatially surrounding blocks of the current block and derives The spatial merge candidate can be inserted into the merge candidate list (S910). The intermediate neighboring block is the block adjacent to the lower left corner of the current block, as shown in FIG. A0, left peripheral block A1, upper right corner peripheral block B0, upper peripheral block B1 , and the upper left corner peripheral block B2. However, this is an example only. In addition to the spatial peripheral blocks mentioned above, there are also right peripheral blocks, lower peripheral blocks, and lower right peripheral blocks. Additional peripheral blocks such as blocks can also be used as the spatial peripheral blocks. The image decoding device / image decoding device searches the spatial surrounding blocks based on priority. The available blocks are detected by the spatial merge function. For example, the image coding device / image decoding device can derive the following as candidates as shown in FIG. Search the five blocks shown in the order A1, B1, B0, A0, B2 to find the available By indexing the candidates sequentially, a merge candidate list can be constructed.

[0134] The image encoding device / image decoding device searches for blocks temporally surrounding the current block. The derived temporal merge candidates may be inserted into the merge candidate list (S920). The temporal peripheral blocks are located in pictures different from the current picture in which the current block is located. The temporal peripheral block can be located on a reference picture that is a pixel. The pictures are called collocated pictures or col pictures. The temporal peripheral block can be the current block on the col picture. The lower right corner of the co-located block for the block The search can be performed in the order of the surrounding blocks and the lower right center block. If motiondatacompression is applied to For each object, specific motion information is stored as representative motion information for each fixed storage unit. In this case, the motion information for all blocks in the certain storage unit can be This eliminates the need to store motion data, which reduces the effect of motion data compression. In this case, the fixed storage unit may be, for example, 16x16 sample units, or It may be predetermined in units of 8x8 samples, or may be determined by the image encoding device. Size information for the fixed storage unit can also be signaled to the conversion device. Before When the described motion data compression is applied, the motion information of the blocks around the time can be replaced with the representative motion information of the fixed storage unit where the blocks around the time are located. That is, in this case, from the perspective of implementation, instead of the prediction block located at the coordinates of the blocks around the time, after arithmetic right shifting by a certain value based on the coordinates of the blocks around the time ( upper left sample position), the time merge candidate can be derived based on the motion information of the prediction block covering the position obtained by arithmetic left shifting. For example, when the fixed storage unit is 2 × 2 sample units, if the coordinates of the blocks around the time are (xTnb, yTnb), the motion information of the prediction block located at the corrected position ((xTnb >> n) << n), (yTnb >> n) << n)) can be used for the time merge candidate. Specifically, for example, when the fixed n × 2 n sample unit is 16 × 16 sample units, if the coordinates of the blocks around the time are (xT nb, yTnb), the motion information of the prediction block located at the corrected position ((xTnb >> 4) << 4) , (yTnb >> 4) << 4)) can be used for the time merge candidate. Or, for example, when the fixed storage unit is 8 × 8 sample units , if the coordinates of the blocks around the time are (xTnb, yTnb), the motion information of the prediction block located at the corrected position ((xTnb >> 3) << 3), (yTnb >> 3) << 3)) can be used for the time merge candidate. Or, for example, when the fixed storage unit is 8 × 8 sample units, if the coordinates of the blocks around the time are (xTnb, yTnb), the motion information of the prediction block located at the corrected position ((xTnb >> 3) << 3), (yTnb >> 3) << 3)) can be used for the time merge candidate. Or, for example, when the fixed storage unit is 8 × 8 sample units, if the coordinates of the blocks around the time are (xTnb, yTnb), the motion information of the prediction block located at the corrected position ((xTnb >> 3) << 3), (yTnb >> 3) << 3)) can be used for the time merge candidate. The motion information of the prediction block located at the corrected position ((xTnb >> 3) << 3), (yTnb >> 3) << 3)) can be used for the time merge candidate. The motion information of the prediction block located at the corrected position ((xTnb >> 3) << 3), (yTnb >> 3) << 3)) can be used for the time merge candidate.

[0135] Referring again to FIG. 9, the image encoding device / image decoding device currently has the largest number of merge candidates. It can be checked whether the number of merge candidates is smaller than the number of large merge candidates (S930). The number of page candidates is either predefined or signaled from the image coding device to the image decoding device. For example, the image coding apparatus may and generating and encoding information to be transmitted to the image decoding device in a bitstream format. If the maximum number of merge candidates is reached, the subsequent candidate addition process (S940 ) may not be performed.

[0136] If the check result in step S930 indicates that the number of current merge candidates is greater than the maximum number of merge candidates, If the value of the merging candidate is smaller than the value of the merging candidate, the image encoding device / image decoding device selects the additional merging candidate based on a predetermined method. After the complement is derived, it can be inserted into the merge candidate list (S940). Merge candidates are, for example, historybasedmergecandidate(s) , pair-wise average merge candidate(s), ATMVP , combined bi-predictive merge candidates (current slice / tile group If the slice / tile group type of the group is B type) and / or zero (zero o) It may include at least one of the vector merge candidates.

[0137] If the check result in step S930 indicates that the number of current merge candidates is greater than the maximum number of merge candidates, is not smaller than In this case, the image coding apparatus can end the marking process based on the RD cost. The best merge candidate can be selected from the merge candidates that make up the merge candidate list, and Candidate selection information (e.g., merge candidate index, mer The image decoding device can signal the image data (the image data index) to the image decoding device. selecting the optimal merge candidate based on the merge candidate list and the candidate selection information; It is possible.

[0138] The motion information of the selected merge candidate is used as the motion information of the current block. and a prediction sample of the current block can be calculated based on motion information of the current block. As described above, the image coding apparatus can derive the prediction sample. A residual sample of the current block may be derived based on the residual sample. Residual information about the dual samples can be signaled to an image decoding device. The image decoding device can generate residual sums derived based on the residual information. A reconstructed sample is generated based on the sample and the predicted sample, and a reconstructed picture is generated based on the reconstructed sample. As mentioned above, the cha can be generated.

[0139] If skipmode is applied to the current block, and deriving motion information of the current block in the same manner as when the page mode is applied. However, if skip mode is applied, the register for the block is Therefore, the predicted samples can be used immediately as the reconstructed samples. The skip mode is applicable when the value of cu_skip_flag is 1, for example. .

[0140] Below, we will explain how to guide spatial candidates in merge mode and / or skip mode. The spatial candidates may refer to the spatial merge candidates described above.

[0141] The spatial candidate induction is based on spatially adjacent blocks (Spatial Neighbors). For example, the position shown in FIG. Up to four spatial candidates can be derived from the candidate blocks present in the location. The order can be A1 → B1 → B0 → A0 → B2. However, the order of the spatial candidates is The order is not limited to the above order, and may be, for example, B1 → A1 → B0 → A0 → B2. The last position in the sequence (position B2 in the example above) is the first of the four preceding positions. (In the above example, A1, B1, B0 and A0) In this case, if a block at a given location is not available, The block belongs to a different slice or a different tile than the current block, or This can include cases where the block is an intra-predicted block. If a spatial candidate is derived from the position (A1 or B1 in the above example), the subsequent position A redundancy check can be performed on the candidate spaces. The motion information of the candidate is identical to the motion information of a spatial candidate already included in the merge candidate list. In this case, the subsequent spatial candidate is not included in the merge candidate list, thereby improving coding efficiency. The redundancy checks performed on subsequent spatial candidates can be improved. This is not done for all possible candidate pairs, but only for some candidate pairs. This can reduce the computational complexity.

[0142] FIG. 10 is a diagram illustrating candidate pairs for redundancy checks performed on spatial candidates. do.

[0143] In the example shown in FIG. 10, the redundancy check for the spatial candidate at the B0 position is This can be done only for the spatial candidate at the 0 position. The redundancy check can be performed only on the spatial candidates for the B0 position. Redundancy checks for spatial candidates at 1 position are only performed for spatial candidates at A0 position Finally, a redundancy check on the spatial candidates for the B2 location can be performed using the A0 location and B This can only be done for the 0-position spatial candidate.

[0144] In the example shown in Figure 10, the order of inducing spatial candidates is A0 → B0 → B1 → A1 → B2. However, the order of guiding space candidates is not limited to this. Even if the change is made, the redundancy check is performed only for some candidate pairs, as shown in the example in Figure 10. A check can be performed.

[0145] Below, we will explain how to guide time candidates in merge mode and / or skip mode. The time candidate can be the time merge candidate described above. The motion vectors of can also correspond to temporal candidates in MVP mode.

[0146] Only one time candidate can be included in the merge candidate list. During the deriving process, the motion vectors of the temporal candidates can be scaled. The coding is done using a collocated reference picture. e, colPic) (hereinafter referred to as "col picture") This is done based on the co-located CU (hereinafter referred to as "col block"). The reference picture list used to derive the col block is stored in the slice header. This can be explicitly signaled in the

[0147] FIG. 11 is a diagram for explaining a method for scaling motion vectors of temporal candidates.

[0148] In Figure 11, curr_CU and curr_pic represent the current block and the current picture. col_CU and col_pic indicate the col block and col picture. _ref indicates the reference picture of the col block, and tb indicates the reference picture of the current block. td indicates the distance between the reference picture of the col block and the current picture, and td indicates the distance between the reference picture of the col block and the col picture. The tb and td indicate the distance between the pictures. rCount) can be expressed as a value corresponding to the difference between the motion vectors of the temporal candidates. The filtering can be performed based on tb and td. The index can be set to 0.

[0149] FIG. 12 is a diagram for explaining positions to which time candidates are guided.

[0150] In Fig. 12, the block with a thick solid line indicates the current block. The time candidates are Block in the col picture that corresponds to position 0 (bottom right position) or position C1 (center position) First, it is determined that the C0 position is available, and then the C0 position is available. If the C0 position is available, time candidates can be derived based on the C0 position. If this is not possible, time candidates can be derived based on the C1 position. For example, If the block in the next col picture is an intra-predicted block or the current C If it is outside the TU row, it can be determined that the C0 position is not available.

[0151] As mentioned above, when motiondatacompression is applied, c The motion vector of the ol block can be stored for each predetermined unit block. To derive the motion vector of the block covering the C0 or C1 position, For example, if the predetermined unit block is an 8x8 block, and the C0 position is When the C1 position is (xColCi, yColCi), the time candidate is derived. The position of is corrected to ((xColCi>>3)<<3,(yColCi>>3)<<3) It is possible.

[0152] In the following, in merge mode and / or skip mode, history-based candidates We will explain how to derive candidates. It can be expressed as y-based merge candidates.

[0153] History-based candidates are added to the merge candidate list by spatial and temporal candidates. After being decoded, the merge candidate list can be added to the merge candidate list. The movement information of the encrypted block is stored in a table, and the History- The table can be used as a base candidate for multiple Hi The story-based candidate table can be saved as a new CTU row. A table can be initialized when a row begins. All history-based suggestions stored in the table are deleted and the table is emptied. For each inter-predicted block, the associated motion information is The inter-predicted frame information can be added to the table as the last entry. The predicted block may not be a block predicted based on the sub-blocks. The movement information added to the table can be used as a new history-based candidate. Cut.

[0154] The table of history-based candidates can have a predetermined size. For example, the size can be 5. In this case, the table can contain up to 5 Histor y-based candidates can be saved. When a new candidate is added to the table, First, a restricted fi is used where a redundancy check is performed to see if the same candidate exists in the table. The first-in-first-out (FIFO) rule applies. If it already exists in the table, the same candidate is removed from the table and all subsequent The position of the history-based candidate can be moved forward.

[0155] History-based candidates can be used in the process of constructing a merge candidate list. When a candidate is selected, the history-based candidates that were most recently included in the table are checked in order. and can be included in the merge candidate list at a later time position. When a merging candidate list contains a merging candidate, the merging candidate list contains a list of candidates already in the merging candidate list. A redundancy check can be performed with the spatial or temporal candidates included in , the spatial or temporal candidates already included in the merge candidate list and the History-based If two or more History-based candidates overlap at the same time, the History-based candidate is used as the merge candidate. The redundancy check can be simplified as follows: This reduces the amount of calculation.

[0156] The number of history-based candidates used to generate the merge candidate list is (N<= 4) ?M:(8-N) where N is already included in the merge candidate list. M denotes the number of available History-bases stored in the table. d indicates the number of candidates. That is, if the merge candidate list contains four or fewer candidates, The number of history-based candidates used to generate the page candidate list is M, If the merge candidate list contains N candidates that are greater than four, the creation of the merge candidate list is The number of history-based candidates used in the construction can be set to (8-N).

[0157] If the total number of available merge candidates reaches (maximum allowed number of merge candidates - 1), The construction of the merge candidate list using the tree-based candidates can be completed.

[0158] In the following, in merge mode and / or skip mode, Pair-wise average We will explain how to derive ge candidates. Pair-wise average candidates are It can be expressed as a pair-wise average merge candidate or pair-wise candidate. .

[0159] Pair-wise average candidates are already included in the merge candidate list. It can be generated by taking the defined candidate pairs and averaging them. The candidate pairs are {(0,1),(0,2),(1,2),(0,3),(1,3),(2, 3)}, and the numbers that make up each candidate pair can be indices into the merge candidate list. That is, the already defined candidate pair (0,1) is at index 0 in the merge candidate list. Pair-wise average candidates are pairs of index 1 and index 2 candidates. It can be generated by averaging the index 0 candidate and the index 1 candidate. Pair-wise average candidates can be derived in the order of the candidate pairs. That is, for the candidate pair (0,1), we induce a pair-wise average candidate. After the introduction, Pair-wiseave is performed in the order of candidate pair (0,2) and candidate pair (1,2). A rage candidate induction process can be performed. Pair-wise average candidate The induction process can be performed until the construction of the merge candidate list is completed. For example, The air-wise average candidate induction process is a process of deriving merge candidates from the merge candidate list. The number of complements can be done until the number of maximum merge candidates is reached.

[0160] Pair-wise average candidates are generated individually for each reference picture in the list. It can be calculated separately for one reference picture list (L0list or L1list) If two motion vectors are available, the average of these two motion vectors can be calculated. In this case, even if two motion vectors point to different reference pictures, the two motion vectors can be used together. The average of the motion vectors of the reference picture list can be calculated. If only one motion vector is available, the available motion vector is Pair-w The average motion vector can be used as a candidate motion vector. If two motion vectors are not available for the reference picture list, can be determined to be invalid.

[0161] Even after the Pair-wise average candidate is included in the merge candidate list, If the merge candidate list is not yet constructed, the zero vector is used until the maximum number of merge candidates is reached. The rule can be added to the merge candidate list.

[0162] If MVP mode is applied to the current block, the restored spatial surrounding blocks ( For example, the motion vectors of the surrounding blocks shown in FIG. 8 and / or the temporal surrounding blocks (or Col block) is used to calculate the motion vector predictor (mot ionvectorpredictor, MVP) candidate list can be generated. The motion vectors of the original spatial surrounding blocks and / or the motion vectors corresponding to the temporal surrounding blocks are The vector can be used as a motion vector predictor candidate for the current block. Bi-prediction is applied. In this case, the MVP candidate list for deriving L0 motion information and the MVP candidate list for deriving L1 motion information are The complementary list is generated separately and can be used. The information to be used is selected from the motion vector predictor candidates included in the MVP candidate list. Candidate selection information (e.g., MVP flag) indicating the best motion vector predictor candidate selected In this case, the prediction unit may include the candidate selection information (or MVP index). Using the MVP candidate list, the current block is selected from the motion vector predictor candidates included in the MVP candidate list. The prediction unit of the image coding device can select a motion vector predictor for the current block. The motion vector difference (MVD) between the motion vector of the lock and the motion vector predictor is calculated. This can be encoded and output in bitstream format. VD is calculated by subtracting the motion vector predictor from the motion vector of the current block. The prediction unit of the image decoding device can predict the motion vector included in the information about the prediction. a motion vector differential is obtained, and the motion vector differential is added to the motion vector predictor. The motion vector of the current block can be derived by the above-mentioned method. The unit obtains a reference picture index indicating a reference picture from the information about the prediction. It can be obtained or derived from

[0163] FIG. 13 is a diagram illustrating a motion vector predictor candidate list construction method according to an example of the present disclosure. is.

[0164] First, we search for spatial candidate blocks of the current block and select available candidate blocks using MVP. The candidate can be inserted into the candidate list (S1010). It is determined whether there are less than two MVP candidates (S1020). If there are two, The MVP candidate list can be completed.

[0165] In step S1020, if there are less than two available spatial candidate blocks, the current block is Search for available candidate blocks in the block and insert them into the MVP candidate list. If no temporal candidate block is available, a zero motion vector can be used (S1030). By inserting the vector into the MVP candidate list (S1040), the MVP candidate list is constructed. The construction can be completed.

[0166] On the other hand, when MVP mode is applied, the reference picture index is explicitly signaled. In this case, the picture index for L0 prediction (ref dxL0) and the reference picture index for L1 prediction (refidxL1) are separated. For example, if MVP mode is applied and bi-prediction (BI) is used, When the prediction is applied, the information about refidxL0 and re Both pieces of information about fidxL1 can be signaled.

[0167] As mentioned above, when the MVP mode is applied, the MV derived from the image coding device Information about MVD can be signaled to the image decoding device. The information may include, for example, information indicating the x, y components for the MVD magnitude and sign. In this case, whether the absolute value of the MVD is greater than 0 and greater than 1, the remainder of the MVD For example, when the MVD absolute value is greater than 1, the information indicating the The information indicating whether the MVD absolute value is greater than 0 is flag information indicating whether the MVD absolute value is greater than 0. It can be signaled only if the value of

[0168] An example of a predictive execution method according to the present disclosure will be described below. 4 or step S630 of FIG.

[0169] Based on the motion information derived according to the prediction mode, a predicted value for the current block is calculated. The predicted block (predicted block) can be generated from the current It can contain predicted samples of the block (prediction sample array). If the vector points to fractional sample units, the interpolation An interpolation procedure can be performed, which allows A predicted sample of the current block is derived based on a reference sample in fractional sample units. Affine inter prediction is applied to the current block. In this case, prediction samples can be generated based on the sample / sub-block MV. When bi-prediction is applied, L0 prediction (i.e., reference Prediction based on the reference pictures in picture list L0 and MVL0 The measured sample and the L1 prediction (i.e., the reference picture in the reference picture list L1 and the MVL The weighted sum or weighted average (by phase) of the predicted samples derived based on the prediction using The predicted sample derived by the average is used as the predicted sample of the current block. When bi-prediction is applied, the reference picture used for L0 prediction and the reference picture used for L1 prediction can be used. If the reference pictures are located in different temporal directions relative to the current picture ( In other words, if it is bi-predictive but corresponds to bidirectional prediction, this is called true bi-prediction. This can be called measurement.

[0170] In the image decoding device, the reconstructed samples and the reconstructed peaks are calculated based on the derived predicted samples. A texture can be generated, after which steps such as in-loop filtering can be performed. In addition, in the image coding device, residual samples are calculated based on the derived predicted samples. The sample is derived and the image information including the prediction information and the residual information is coded. This can be done.

[0171] Bi-directional optical flow (BDOF)

[0172] According to the present disclosure, a bi-prediction signal is refined. BDOF can be used to apply bi-prediction to the current block (e.g., CU). When used, it is for calculating improved motion information to generate predicted samples. Therefore, the process of calculating the improved motion information by applying BDOF is the same as the above-mentioned motion information. It may be included in the derivation step.

[0173] For example, BDOF can be applied at the 4x4 sub-block level. , can be performed in units of 4x4 sub-blocks within the current block.

[0174] BODF can be applied to CUs that meet at least one or all of the following conditions: do.

[0175] - if the CU is coded in true bi-predictive mode, i.e., two reference pictures One of them precedes the current picture in the display order, and the other If the order follows the current picture

[0176] - If the CU is not in affine mode or ATMVP merge mode

[0177] - If the CU has 64 or more luma samples

[0178] -When the height and width of the CU are 8 luma samples or more

[0179] - If the BCW weight index indicates equal weight, i.e., the L0 predicted sample and the L 1 indicates that the same weight is applied to the predicted samples

[0180] -Weighted Prediction (WP) is applied to the current CU. If not

[0181] - If CIIP mode is not currently used for the CU

[0182] Also, BDOF can be applied only to the luma component. However, it is not limited to this. OF may be applied only to the chroma component, or to both the luma and chroma components. may be applied as follows.

[0183] BDOF mode is based on the concept of optical flow. In other words, we assume that the object's motion is smooth. If applied, for each 4x4 sub-block, the refined motion vector (m otionrefinement)(v x ,v y ) can be calculated. Improved motion vectors (motion refinement) is the difference between the L0 predicted sample and the L1 predicted sample. The improved motion vector (motionrefinement) can be calculated by minimizing ement adjusts the bi-predicted sample values ​​within a 4x4 sub-block. ) can be used to

[0184] The process of performing BDOF will be described in more detail below.

[0185] [Table 1]

[0186]

number

[0187] In the above formula 1, I (k) (i,j) is the coordinate (i ,j) sample values. For example, I (0) (i,j) in the L0 predicted block ,j) means the sample value at position I (1) (i,j) is (i,j) in the L1 prediction block In Equation 1, the first shift amount (shift1 ) can be determined based on the bit depth of the luma component. For example, When the bit depth is bitDepth, shift1 is max(6,bitDe pth-6).

[0188] After the gradients are calculated as described above, the autocorrelation between the gradients is calculated. correlation and cross-correlation S1, S2, S3, S5 and S6 can be calculated as follows:

[0189]

number

[0190] In the formula 2, n a and n b are min(1,bitDepth-11) and mi It can be set to n(4, bitDepth-8).

[0191] The improved motion vector ( motion refinement)(v x ,v y ) can be derived as follows:

[0192]

number

[0193] In the above formula 3, n S2 can be 12. The derived improved motion vector (m otion refinement) and gradients within 4x4 sub-blocks. The following adjustments can be made to each sample of

[0194]

number

[0195] Finally, BDOF is applied by adjusting the bi-predictive samples of the CU as follows: Predicted samples of the selected CU (pred BDOF ) can be calculated.

[0196]

number

[0197] In the above formula, n a , n b and n S2 can be 3, 6 and 12 respectively. The value is the multiplier in the BDOF process does not exceed 15 bits, and the intermediate Bit width of parameters (intermediate parameters) idth) can be chosen to be kept within 32 bits.

[0198] To derive the gradient values, we use a list k (k = 0, 1) that currently exists outside the CU. Prediction sample in I (k) (i,j) can be generated. Figure 14 is expanded to perform BDOF. FIG. 10 is a diagram showing a CU.

[0199] As shown in Figure 14, to perform BDOF, rows are extended around the boundary of the CU. / column can be used to control the computational complexity of generating out-of-bounds prediction samples. Then, the predicted samples in the expanded region (white region in Fig. 14) are filtered by a bilinear filter (bil The predicted samples in the CU (gray area in Figure 14) are generated using the inear filter. The filter is a normal 8-tap motion compensation interpolation filter (normal8-tapmotionc compensationinterpolationfilter) The sample values ​​at the extended positions can only be used for gradient calculation. To perform the remaining steps of the procedure, samples and / or graphs located outside the CU boundary are used. If gradient values ​​are required, the nearest adjacent sample values ​​and / or gradient values ​​are used. Can be used with padding (repetition).

[0200] If the width and / or height of a CU is greater than 16 luma samples, the CU can be divided into sub-blocks that are 16 luma samples in height. The boundary of the block can be treated the same as the CU boundary described above in the BDOF process. The maximum unit size in which the OF process is performed can be limited to 16x16.

[0201] For each sub-block, it can be determined whether to perform BDOF. That is, the BDOF process for each sub-block can be skipped. For example, between the initial LO prediction sample and the initial L1 prediction sample, If the SAD value of the sub-block is smaller than a predetermined threshold, the BDOF process is applied to the sub-block. In this case, the width and height of the sub-block are W and H, respectively. Then, the predetermined threshold can be set to (8*W*H>>1). The initial L0 predicted sample and the initial L1 predicted sample calculated in the DMVR process are The SAD between them can be reused.

[0202] If BCW is available for the current block, e.g., BCW weight index If indicates unequal weighting, BDOF may not be applied. If WP is available for a block, e.g., at least one of the two reference pictures If luma_weight_lx_flag for one of the two is 1, BDOF is applied. In this case, luma_weight_lx_flag is set to lx WP weighting factor for the luma component of the prediction (x is 0 or 1) ors) is present in the bitstream. This may be information indicating whether WP is applied to the luma component of the prediction. If coded in VD (SymmetricMVD) mode or CIIP mode, BD OF may not be applicable.

[0203] As mentioned above, BDOF is applied in the inter prediction process and the reference sample is used in the motion compensation process. By improving the filter, the image compression performance can be improved. This can be done in affine mode, GPM mode, CIIP mode, etc. In such cases, BDOF is not performed.

[0204] The present disclosure provides a BDOF offset (bdof) for improving the reference sample in the BDOF process. When deriving offset, b(x,y), normalization and clipping is applied to prevent potential errors in BDOF and improve performance. In this disclosure, normalization is performed in various units. (e.g., 1 / 64-pel, 1 / 32-pel, 2-pel, etc.) This can mean unifying the value to a unit (e.g., 1-pel). In the above, [a, b] means the range of values ​​from a to b, and a value x is Clipping to the range means that if x is smaller than a, it is clipped to the value of a, and if x is larger than b, it is clipped to the value of The range of x is restricted to have the value of b if the value is larger than the In addition, in this disclosure, the bit depth can mean the number of bits of the luma component. For example, the bit depth of the luma component and the bit depth of the chroma component may be It may include the bit depth if they are the same.

[0205] FIG. 15 illustrates a process of deriving a predicted sample of a current block by applying BDOF. This is a diagram of the

[0206] The BDOF-based inter prediction procedure in FIG. 15 is performed by an image encoding device and an image decoding device. It can be done.

[0207] First, in step S1510, the motion information of the current block is derived. The motion information can be derived by various methods described in this disclosure. The motion information of the block is derived by the normal merge mode, the MMVD mode, or the AMVP mode. The motion information may include bi-predictive motion information (L0 motion information, L1 motion information). For example, the L0 motion information is MVL0 (L0 motion vector), refIdxL 0 (L0 reference picture index), and the L1 motion information may include MVL1( L1 motion vector), refIdxL1 (L1 reference picture index) can.

[0208] Then, based on the derived motion information of the current block, the predicted sample of the current block is Specifically, the L0 motion information is used to derive the L1 motion vector for the current block (S1520). In addition, the L0 prediction sample for the current block can be derived based on the L1 motion information. The corresponding L1 prediction samples can be derived.

[0209] Then, the BDOF offset can be derived based on the derived predicted samples (S15 30). The BDOF of step S1530 is performed according to the method described in this disclosure. For example, the gradient (by phase) of the L0 prediction sample and the The BDOF offset can be derived based on the gradient (by phase) of the L1 prediction samples. Cut.

[0210] Then, the LX (X=0 or 1) predicted sample is calculated based on the BDOF offset. An improved prediction sample of the current block can be derived (S1540). The predicted samples can be used as the final predicted block for the current block.

[0211] The image coding apparatus performs the following processing based on the predicted samples of the current block generated according to the method of FIG. Based on this, a residual sample can be derived through comparison with the original sample. Information about the registered residual sample (residual information) is included in the image / video information. As mentioned above, the data can be encoded and output in bitstream format. In addition, the image decoding apparatus may generate a prediction sub-sequence of the current block generated by the method of FIG. Residual samples obtained based on residual information in the sample and bitstream As mentioned above, the current block can be restored based on the pull. be.

[0212] FIG. 16 is a diagram illustrating inputs and outputs of a BDOF process according to an embodiment of the present disclosure. .

[0213] As shown in Figure 16, the inputs of the BDOF process are the width (nCbW) and height ( nCbH), the predicted sub-block (pr edSamplesL0,predSamplesL1), prediction direction index (pr edFlagL0, predFlagL1) and reference picture index (refId xL0, refIdxL1). Also, the input of the BDOF process is It may also include a utilization flag (bdofUtilizationFlag). At this time, the BDOF usage flag is input for each sub-block in the current block. It is possible to indicate whether BDOF is applied to a sub-block.

[0214] The BDOF process also improves the accuracy of the BDOF calculation by applying the BDOF based on the input information. A sampled prediction block (pbSamples) can be generated.

[0215] FIG. 17 is a diagram illustrating variables used in a BDOF process according to one embodiment of the present disclosure. FIG. 17 may be a process following FIG.

[0216] As shown in FIG. 17, to perform the BDOF process, the input bit depth ( bit / Depth) is BitDepth Y In this case, Bi tDepth Y is related to the bit depth signaled via the bitstream. It can be guided based on the information. Also, various right shifts based on the bit depth For example, a first shift amount (shift1), a second shift amount ( shift2), the third shift amount (shift3) and the fourth shift amount (shift4) are Based on the block depth, the following can be derived as shown in FIG. The offset (offset4) can be set based on shift4. , the variable mvRefineT for specifying the clipping range of the refined motion vectors. The hres can be set based on the bit depth. The uses of variables will be explained later.

[0217] FIG. 18 shows the current state of each sub-CU based on whether BDOF is applied or not, according to one embodiment of the present disclosure. 18 is a diagram illustrating a method for generating predicted samples for a subblock. This may be a process following that shown in FIG.

[0218] The process shown in FIG. 18 is performed for each sub-block in the current CU. The size of the block can be 4x4. The BDOF usage flag ( bdofUtilizationFlag) is the first value (False, "0") In this case, BDOF may not be applied to the current sub-block. The predicted sample of a block is derived by the weighted sum of the L0 predicted sample and the L1 predicted sample. At this time, the weights applied to the L0 predicted samples and the weights applied to the L1 predicted samples are The shift4 and offset4 used in equation (1) in FIG. , the value set in FIG. 17. The BDOF usage flag (b If the dofUtilizationFlag is set to the second value (True, "1"), BDOF can be applied to the current sub-block. The sample can be produced by a BDOF process according to the present disclosure, as described below.

[0219] FIG. 19 shows the gradient, autocorrelation, and FIG. 19 is a diagram for explaining a method for inducing cross-correlation. FIG. 19 is a process following FIG. 18. obtain.

[0220] The process shown in FIG. 19 is performed for each sub-block in the current CU. The size of the blocks can be 4x4.

[0221] According to FIG. 19, each sample position in the current sub-block is calculated according to equations (1) and (2). Position (h) relative to (x,y) x ,h y) can be derived. Then, equation (3) to equation The horizontal and vertical gradients for each sample position are derived according to (6). Then, the autocorrelation and cross-correlation are derived according to equations (7) to (9). The variables to be used (the first intermediate parameter diff and the second intermediate parameter tempH and t For example, the first intermediate parameter diff can be derived from the equation (7) ), the predicted samples of the current block (predSamplesL0, predSa The value obtained by applying a right shift of the second shift amount, shift2, to the For example, the second intermediate parameters tempH and tempV can be calculated by the following equation (8): As shown in equation (9), the gradient in the L0 direction and the gradient in the L1 direction are summed. It can be derived by applying a right shift to the value by the third shift amount (shift3). Then, based on the derived first and second intermediate parameters, equations (10) to The autocorrelation and cross-correlation can be derived according to equation (16).

[0222] FIG. 20 shows an example of a motion vector refinement process according to an embodiment of the present disclosure. nement, v x ,v y ) and induce the BDOF offset, and FIG. 20 is a diagram illustrating a method for generating predicted samples, following the process shown in FIG. could be.

[0223] The process shown in FIG. 20 is performed for each sub-block in the current CU. The size of the blocks can be 4x4.

[0224] According to FIG. 20, the motion vectors (v x , v y ) can be induced. The improved motion vectors can be clipped to the range specified by mvRefineThres . Also, based on the improved motion vectors and gradients, the BDOF offset (bdofOffs et) can be induced according to Equation (3). Using the induced BDOF offset, the predicted samples (pbSamples) of the current sub-block can be generated according to Equation (4).

[0225] The method described with reference to FIGS. 16 to 20 can realize the BDOF process according to the first embodiment of the present disclosure by being performed continuously. In the embodiment according to FIGS. 16 to 20, the first shift amount shift1 is set to Max(6, bitDepth - 6), and m vRefineThres is set to 1 << Max(5, bitDepth - 7). Therefore, the bit widths of the respective parameters of predSample and BDOF according to BitDepth can be induced as shown in the following table.

[0226] [Table 2] [[ID=…]]In Table 1 above, for example, when BitDepth is 8, predSample has values in the 16-bit range, the gradient is 11 bits, v x , v y uses 6 bits , and as a result, the range of the bdofOffset value is [-49856, 48298]. ​​​​​​As shown in Table 1, as BitDepth changes, the bit depth of predSample However, the gradient that is most closely related to BitDepth is Although the epth varies, it has a fixed bit width (11 bits). v not related to itDepth x ,v y The bit width of It changes with time.

[0228] According to another embodiment of the present disclosure described below, normalization of the parameters used in the BDOF process By improving the clipping and the relationship between each parameter and BitDepth, This allows each parameter to have a more accurate value. This also solves the memory overflow issue in the BDOF process. can.

[0229] Another embodiment of the present disclosure is a part of the first embodiment of the present disclosure described above with reference to FIGS. 16 to 20. This can be achieved by changing

[0230] The BDOF process according to the second embodiment of the present disclosure will now be described.

[0231] The second embodiment of the present disclosure uses a normalization method different from the BDOF process in the first embodiment of the present disclosure. According to the present disclosure, the gradient (gradientHLX, gradie ntVLX, where X is 0 or 1) are the left and right and top and bottom 2- It shows the gradient at pixel distance. Also, v x ,v y has 1 / 32-pel precision on) and has a value range of [-32,31] or [-32,32], then v x , v y A value of 1 actually indicates a 1 / 32-pel distance. x ,v y is a 1-pixel unit It can be considered as applying the "1<<5" operation to the place value.

[0232] According to the second embodiment of the present disclosure, each parameter ( horizontal gradient, vertical gradient, v x ,v y ) to a 1-pixel value For example, for a gradient that is a 2-pixel distance gradient, you can use >> You can normalize to a 1-pixel value by applying the 1 / 3 operation. v with 2-pel accuracy x ,v y For , apply the operation ">>5" to 1-pixel units Taking this into account, as shown in equation (3) of FIG. For normalization, we use gradient and v x ,v y The value multiplied by and is shifted to the right by the first shift amount, shift1. In this case, shift1 is fixed regardless of the bit depth. It can be set to a given value (e.g., 7). x ,v y also related to bit depth Instead of using the v x ,v y Click The ping range variable mvRefineThres is set to a value of "1<<5". As described above, the normalization according to the second embodiment of the present disclosure uses the gradient and v x ,v y can be considered together.

[0233] The second embodiment of the present disclosure improves on the first embodiment of the present disclosure shown in FIGS. 17, 19, and 20. This can be achieved by:

[0234] FIG. 21 is a diagram illustrating variables used in a BDOF process according to another embodiment of the present disclosure. FIG. 21 can be a modified example of the example of FIG. 17. Therefore, in FIGS. 17 and 21, The explanation of common parts can be omitted.

[0235] As shown in FIG. 21, to perform the BDOF process, the input bit depth ( bitDepth) is BitDepth Y In this case, Bit Depth Y The bit depth information is signaled via the bitstream. In addition, the first shift amount (shift1), the second shift amount (shift2), The shift amount (shift2) and the third shift amount (shift3) are independent of the bit depth. It can be set to a fixed value. For example, the first shift amount (shift1), the second The shift amount (shift2) and the third shift amount (shift3) are 7, 4, and 1, respectively. The fourth shift amount (shift4) and offset (offset t4) can be derived in the same way as in the example of Figure 17. Also, the variable mvRefineT hres can be set to a fixed value regardless of bit depth, e.g. , the variable mvRefineThres can be set to "1<<5".

[0236] FIG. 22 shows the gradient, autocorrelation and FIG. 22 is a diagram illustrating a method for inducing cross-correlation. 19 and 22. Therefore, the description of the common parts between FIG.

[0237] Compared with the example of FIG. 19, in the gradient calculation of Equations (3) to (6) of FIG. 22, The right shift operation (">>shift1") may not be performed. By omitting the right shift operation, gradients with higher accuracy can be obtained. Cut.

[0238] FIG. 23 shows an improved motion vector (motionref) according to another embodiment of the present disclosure. inement, v x ,v y ) and induce the BDOF offset. 23 is a diagram for explaining a method for generating predicted samples. Therefore, the description of the common parts between FIG. 20 and FIG. 23 can be omitted. .

[0239] Compared with the example in Figure 20, in the calculation of bdofOffset in equation (3) in Figure 23, The right shift operation ">>1" can be changed to ">>shift1". That is, as mentioned above, , gradient and v x ,v y For normalization of the gradient and v x ,v y The value multiplied by It can be shifted right by one shift amount (shift1). In this case, shift1 is As mentioned above, it can be set to a fixed value (e.g., 7) regardless of the bit depth. It is.

[0240] As described above, the examples of FIGS. 17, 19, and 20 according to the first embodiment of the present disclosure are shown in FIGS. 21 and 22. By making the modifications shown in FIGS. 22 and 23, the second embodiment of the present disclosure can be realized. do.

[0241] According to the second embodiment of the present disclosure, predSample and BDO by BitDepth The bit width of each parameter of F can be derived as shown in the table below.

[0242] [Table 3]

[0243] As shown in Table 2, the gradients that are highly related to bit depth are The range of gradient values ​​is determined based on the predSample value. This allows for increased accuracy of gradient values. Not relevant x ,v y The bit width of the has a fixed value regardless of the bit depth. According to Table 2, the range of gradient values ​​increases, but v x ,v y The range of values This does not affect the range of bdofOffset values, as the range is reduced.

[0244] The BDOF process according to the third embodiment of the present disclosure will now be described.

[0245] As described above in the second embodiment of the present disclosure, the gradient and v x ,v y is in 1 pixel units However, according to the embodiment of FIG. 22, the gradient Bit overflow can occur during the calculation process. For example, as shown in equations (3) to (6) in FIG. 22, a shift operation is performed during the gradient calculation process. If not, 32-bit arithmetic can be used to calculate the gradient. That is, bit overflow can occur during gradient calculation.

[0246] Taking this into consideration, the third embodiment of the present disclosure performs normalization for the gradient It can be applied during calculation, i.e., the ">>1" operation is applied during gradient calculation. By performing normalization using the above formula, bit overflow can be prevented. According to the third embodiment, the gradient can be no more than 16 bits. x , v y The normalization for is done by applying a right shift operation by an adjusted shift1. For example, shift1 can be performed at a fixed It can be set to a value (e.g., 6).

[0247] The third embodiment of the present disclosure improves on FIGS. 21 and 22 of the second embodiment of the present disclosure. It can be achieved.

[0248] FIG. 24 is a diagram illustrating variables used in a BDOF process according to another embodiment of the present disclosure. FIG. 24 can be a modified example of the example in FIG. 21. Therefore, in FIGS. 21 and 24, The explanation of common parts can be omitted.

[0249] As shown in FIG. 24, to perform the BDOF process, the input bit depth ( bitDepth) is BitDepth Y In this case, Bit Depth Y The bit depth information is signaled via the bitstream. In addition, the first shift amount (shift1), the second shift amount (shift2), The shift amount (shift2) and the third shift amount (shift3) are independent of the bit depth. It can be set to a fixed value. For example, the first shift amount (shift1), the second The shift amount (shift2) and the third shift amount (shift3) are 6, 4, and 1, respectively. The fourth shift amount (shift4) and offset (offset 4) can be derived in the same way as in the example of Figure 17. Also, the variable mvRefineTh res can be set to a fixed value regardless of bit depth, e.g. The variable mvRefineThres can be set to "1<<5".

[0250] FIG. 25 shows the gradient, autocorrelation and FIG. 25 is a diagram illustrating a method for inducing cross-correlation. 22 and 25. Therefore, the description of the common parts between FIG. 22 and FIG. 25 can be omitted.

[0251] Compared with the method of FIG. 22, in the gradient calculation of Equations (3) to (6) of FIG. , a right shift operation (>>1) can be performed. By performing a right shift operation in the do.

[0252] Also, as shown in Figure 24, shift1 is corrected to 6, so the gradient and v x ,v y The total right shift amount applied to the third embodiment of the present disclosure is "7". The total right shift amount in the two embodiments can be maintained the same.

[0253] As described above, the example of FIGS. 21 and 22 according to the second embodiment of the present disclosure can be applied to the example of FIGS. 24 and 25. By making the above modifications, the third embodiment of the present disclosure can be realized.

[0254] According to the third embodiment of the present disclosure, predSample and BDO by BitDepth The bit width of each parameter of F can be derived as shown in the table below. can.

[0255] [Table 4]

[0256] As shown in Table 3, the gradients that are highly related to bit depth are The range of gradient values ​​is determined based on the predSample value. Therefore, the accuracy of the gradient value can be increased. By performing a right shift operation in equation (6), bit overflow during gradient calculation is prevented. This can prevent v that is not related to bit depth. x ,v y The bit width of It can have a fixed value regardless of the bit depth.

[0257] The BDOF process according to the fourth embodiment of the present disclosure will now be described.

[0258] As described above in the second embodiment of the present disclosure, the gradient and v x ,v y is a 1-pixel unit However, according to the embodiment of FIG. 22, the gradient meter Bit overflow can occur during the calculation process. For example, as shown in equations (3) to (6) in FIG. 22, a shift operation is performed in the gradient calculation process. If not, 32-bit arithmetic can be used to calculate the gradient, i.e. That is, bit overflow can occur during gradient calculation.

[0259] Taking this into consideration, the fourth embodiment of the present disclosure performs clipping during gradient calculation. This makes it possible to prevent bit overflow. , the gradient can be no more than 16 bits. x ,v y against The normalization can be performed in the same manner as in the second embodiment of the present disclosure. nt and v x ,v y The value multiplied by can be shifted right by the first shift amount (shift1). In this case, shift1 is a fixed value (for example, 7) can be set.

[0260] The fourth embodiment of the present disclosure is realized by improving the second embodiment of the present disclosure shown in FIGS. 21 and 22. It can be realized.

[0261] FIG. 26 is a diagram illustrating variables used in a BDOF process according to another embodiment of the present disclosure. FIG. 26 can be a modified example of the example in FIG. 21. Therefore, in FIGS. 21 and 26, The explanation of common parts can be omitted.

[0262] As shown in FIG. 26, to perform the BDOF process, the input bit depth ( bitDepth) is BitDepth Y In this case, Bit Depth Ycan be derived based on information regarding the bit depth signaled via the bit stream. Also, the first shift amount (shift1), the second shift amount (shift2), and the third shift amount (shift3) can be set to fixed values regardless of the bit depth. For example, the first shift amount (shift1), the second shift amount (shift2), and the third shift amount (shift3) can be set to 7, 4, and 1, respectively. The fourth shift amount (shift4) and the offset (offset4) can be derived in the same manner as in the example of FIG. 17. Also, the variable mvRefineThres can be set to a fixed value regardless of the bit depth. For example, the variable mvRefineThres can be set to "1<<5". Also, a variable gradLimit for specifying the clipping range of the gradient value can be set. At this time, gradLimit can be set based on the bit depth, and for example, can be set to "1<<Max(15, BitDepth + 3)". Figure 28 is a diagram for explaining a method of deriving the gradient, autocorrelation, and cross-correlation of the current sub-block according to another embodiment of the present disclosure. Figure 28 can be an example obtained by modifying the example of Figure 22. Therefore, the description of the common part in Figures 22 and 28 can be omitted. Compared with the method of Figure 22, in the gradient calculation of equations (3) to (6) of Figure 28, a clipping operation can be performed. That is, the calculated gradient value can be clipped to a value within the range specified by gradLimit. For example 、 、 、 、 、 、 、 、 、 、

[0263] Figure 27 is a diagram for explaining a method of deriving the gradient, autocorrelation, and cross-correlation of the current sub-block according to another embodiment of the present disclosure. Figure 27 can be an example obtained by modifying the example of Figure 22. Therefore, the description of the common part in Figures 22 and 27 can be omitted. 、 、 、

[0264] 、 、 For example, the clipping range is [-gradLimit,gradLimit-1]. According to the third embodiment of the present disclosure, the clipping operation is performed in the gradient calculation process. By performing this calculation, it is possible to prevent bit overflow from occurring.

[0265] As described above, the example of FIGS. 21 and 22 according to the second embodiment of the present disclosure can be applied to the example of FIGS. 26 and 27. By making these modifications, the fourth embodiment of the present disclosure can be realized.

[0266] According to the fourth embodiment of the present disclosure, predSample and BDO by BitDepth The bit width of each parameter of F can be derived as shown in the table below. can.

[0267] [Table 5]

[0268] As shown in Table 4, the gradients that are highly related to bit depth are The range of gradient values ​​is determined based on the predSample value. Since the gradient value can be calculated by the formula (3) in FIG. ~By performing clipping calculation using equation (6), bit overrun during gradient calculation is avoided. It can prevent the flow of data and is not related to bit depth. x ,v y Bit of The width can have a fixed value regardless of the bit depth.

[0269] An example of clipping BDOF offsets according to the present disclosure will now be described.

[0270] Prediction samples generated by inter-prediction interpolation (predSample) is a range of values ​​depending on the input bit depth and the coefficients of the interpolation filter. is defined and in the worst case has a value range of [-16830, 33150]. To prevent 16-bit overflow, the predSample value is set to -8192. By adding, the value of predSample becomes [-25022, 24958].

[0271] Therefore, as shown in Table 1, BitDepth Y If is 8, predSam ple has a 16-bit range of values, gradient has 11-bit, v x ,v y is 6 bits As a result, the range of bdofOffset values ​​is [-49856, 48298] Thus, according to various embodiments of the present disclosure, predSample and bdofOf When adding fset, a 16-bit overflow can occur.

[0272] According to the present disclosure, the BDOF offset (bdofOffset) value is cleared to a predetermined range. When calculating the value of the predicted sample improved by mapping, 16 bits are used. More specifically, when the bit depth is 8 to 10, it is possible to prevent the occurrence of a flow. If it is 12, predSample has a value in the 16-bit range, and the bit depth is If the values ​​are 14 and 16, predSample is in the 18-bit and 20-bit ranges. Therefore, the clipping range of bdofOffset is also For example, you can specify the clipping range of bdofOffset. The variable OffsetLimit is defined on a bit depth basis, and in the embodiment of the present disclosure, Clipping of ofOffset can additionally be applied.

[0273] For example, in equation (4) of FIG. 20 and equation (4) of FIG. 23, bdofOffset is [-Of fsetLimit, OffsetLimit-1]. For example, in equation (4) of FIG. 20 and equation (4) of FIG. 23, bdofOffset is expressed as follows: Clip3(-OffsetLimit,OffsetLimit-1,bdofOff set), where OffsetLimit is a bit stream. For example, OffsetLimit can be defined based on the <Max(12 BitDepth Y )" as described above. By applying clipping to t, predSample and bdofOffset This can prevent bit overflow that may occur when adding

[0274] Hereinafter, according to another embodiment of the present disclosure, the BDOF offset (bdofOffset) is The method of induction will be explained.

[0275] According to this embodiment, in order to improve the accuracy of the BDOF offset, the gradient calculation This minimizes the number of right shift operations in the bdofOffset calculation. When a right shift operation is performed in the process, an offset value is added to bdofOffse The precision of t can be further increased. In this case, the offset value is calculated based on the right shift amount. For example, this embodiment can be applied to the third embodiment of the present disclosure. In this case, equation (3) in FIG. 23 can be transformed as follows:

[0276] bdofOffset=(vx*(gradientHL0[x+1][y+1]-g radientHL1[x+1][y+1]+offset))>>shift1+(v y *(gradientVL0[x+1][y+1]-gradientVL1[x+1 ][y+1])+offset)>>shift1

[0277] In the above formula, shift1 is set to "6" and offset is set to "1<<(shi ft1-1) can be set based on shift1.

[0278] The modification of the formula (3) is not limited to that applied to the third embodiment of the present disclosure, but may be applied to any other embodiment of the present disclosure. This can also be applied to other embodiments. For example, the modification of the formula (3) can be applied to the fourth embodiment of the present disclosure. In this case, shift1 is set to "7" and offset is set to "1<<(shi ft1-1) can be set based on shift1.

[0279] According to this embodiment, the right shift operation in the gradient calculation process is minimized, and bdofOf When performing a right shift operation during the fset calculation process, an offset value is added to The precision of fOffset can be increased.

[0280] Hereinafter, according to another embodiment of the present disclosure, the BDOF offset (bdofOffset) is The method of induction will be explained.

[0281] As mentioned above, in the BDOF offset calculation process, predictionsample Various variables are derived using the gradient and the like. When normalizing, the right shift amount is set to "1" or When stripping is performed, the bit range of the gradient values ​​may change. For example, in Table 1 As shown, the first embodiment of the present disclosure provides predictions in the 16-bit range. Applying >>6 to the ample calculates the gradient in the 11-bit range. In this case, the third or fourth embodiment of the present disclosure can be used to obtain a 16-bit range. Apply ">>1" to the predictionsample or apply clipping. When using the gradient, the values ​​in the 16-bit range are displayed as shown in Table 3 or Table 4. However, as the range of gradient values ​​increases, When calculating variables such as tempH and tempV, which are calculated using In this embodiment, taking this into consideration, tempH and tempV Bit overflow is avoided by applying a right shift operation to each term of the gradient during calculation. For example, the occurrence of low can be prevented by using the equations (8) and (9) in FIGS. can be corrected as follows:

[0282] tempH[x][y]=(gradientHL0[x][y]>>shift3) +(gradientHL1[x][y]>>shift3)(8)

[0283] tempV[x][y]=(gradientVL0[x][y]>>shift3) +(gradientVL1[x][y]>>shift3)(9)

[0284] In the modified formulas (8) and (9), shift3 is Max(1, bitDept h-11) or can be set to a fixed value of 1. As described above, in the third embodiment of the present disclosure, By modifying the fourth embodiment, the bit overrun occurs when calculating tempH and tempV. This can prevent the occurrence of flow.

[0285] A method for preventing bit overflow according to another embodiment of the present disclosure will now be described. do.

[0286] As described above, the third or fourth embodiment of the present disclosure provides a 16-bit range pre If you apply ">>1" to the dictionsample or apply clipping, In this case, a 16-bit overflow occurs when calculating variables such as tempH and tempV. At this time, sG calculated based on the variables tempH and tempV In the calculation of intermediate parameters such as x2, sGy2, sGxGy, sGxdI, and sGydI, Even if the variable t Not only empH and tempV, but also sGx2, sGy2, sGxGy, sGxdI, s To prevent bit overflows from occurring in the calculation of intermediate parameters such as GydI, To do this, the amount of right shift (shift ) applied to the modified equations (8) and (9) is For example, in the third embodiment of the present disclosure, the equations (8) and (3) in FIG. When modifying equation (9) as above, shift3 is Max(6,bitDep th-6) or a fixed value of 6. In the fourth embodiment of the present disclosure, When modifying equations (8) and (9) in Figure 27 as above, shift3 is Max It can be set to (6, bitDepth-6)+1 or a fixed value of 7. According to this, not only the variables tempH and tempV, but also sGx2, sGy2, sGxGy, Bit overflow also occurs in the calculation of intermediate parameters such as sGxdI and sGydI. The occurrence of the above can be prevented.

[0287] The embodiments of the present disclosure are not limited to the examples described above, and the embodiments described in the present disclosure may be used in other embodiments or can be used in combination with the modified examples. For example, the fifth embodiment of the present disclosure is Among the steps constituting the first embodiment of the present disclosure described with reference to FIGS. 16 to 20, This can be realized by changing step 7. For example, FIG. 17 of the first embodiment of the present disclosure is 24 of the third embodiment of the present disclosure, the fifth embodiment of the present disclosure is derived. It is possible.

[0288] While the exemplary methods of the present disclosure are presented as a series of acts for clarity of explanation, This is not intended to restrict the order in which steps are performed, but rather to The steps may be performed simultaneously or in different orders. In order to achieve this, the steps shown may include other steps or some steps may be omitted. It may include the remaining steps, or may exclude some steps and include additional steps. It can also be done as follows.

[0289] In the present disclosure, an image encoding device or an image decoding device that performs a predetermined operation (step) , you can perform an operation (step) to check the execution conditions and status of the operation (step). For example, if it is stated that a certain action will be performed when a certain condition is met, The image encoding device or image decoding device performs an operation to check whether the predetermined condition is satisfied. After that, the predetermined operation can be performed.

[0290] The various embodiments of the present disclosure do not list all possible combinations, and the present disclosure The various examples are intended to illustrate exemplary embodiments of the present invention, and the matters described in the various examples may be used independently. may be applied, or a combination of two or more thereof may be applied.

[0291] Additionally, various embodiments of the present disclosure may be implemented using hardware, firmware, or other This can be achieved by hardware, software, or a combination of these. In the case of realization, one or more ASICs (Application Specific Integrated Circuits), DSPs (Digital Signal Pr) ocessors), DSPDs(DigitalSignalProcessingD evices), PLDs (ProgrammableLogic Devices), F PGAs (Field Programmable Gate Arrays), general-purpose processors General processor, controller, microcontroller, micro This can be realized by a microprocessor or the like.

[0292] Furthermore, the image decoding device and the image encoding device to which the embodiments of the present disclosure are applied are multimedia. Media broadcasting transmitter / receiver, mobile communication terminal, home cinema video equipment, digital cinema video devices, surveillance cameras, video conversation devices, real-time communication devices such as video communications, mobile Providing streaming devices, storage media, camcorders, and video-on-demand (VoD) services Equipment, OTT video (Over-the-top video) equipment, Internet streaming video equipment, video telephone equipment, and medical equipment It can be included in video equipment and used to process video or data signals. For example, as an OTT video (Over the top video) device, consoles, Blu-ray players, Internet-connected TVs, home theater systems smartphones, tablet PCs, DVRs (Digital Video Recorders) r) and the like.

[0293] FIG. 28 is a diagram illustrating a content streaming system to which an embodiment of the present disclosure can be applied. is.

[0294] As shown in FIG. 28, a content streaming system to which an embodiment of the present disclosure is applied It is broadly divided into encoding servers, streaming servers, web servers, media storage servers, etc. , user devices and multimedia input devices.

[0295] The encoding server receives multimedia inputs from smartphones, cameras, camcorders, etc. Compressing the content input from the device into digital data to generate a bitstream; It serves to transmit this to the streaming server. Multimedia input devices such as monitors, cameras, and video cameras generate bitstreams directly. In this case, the encoding server can be omitted.

[0296] The bitstream is generated by an image encoding method and / or an image encoding method to which an embodiment of the present disclosure is applied. The bitstream can be generated by an encoding device, and the streaming server transmits the bitstream. The bitstream can be temporarily stored during the transmission or reception process.

[0297] The streaming server transmits multimedia content based on a user's request via a web server. The web server transmits the media data to the user device, and the web server determines what services are available to the user. The user can then inform the web server of the desired When a service is requested, the web server transmits this to the streaming server, The streaming server can transmit multimedia data to users. In this case, the content streaming system may include a separate control server, In this case, the control server controls commands between the devices in the content streaming system. It can play a role in controlling the command / response.

[0298] The streaming server receives content from a media storage and / or encoding server. For example, when receiving content from the encoding server, In this case, the content can be received in real time. To provide a streaming service, the streaming server transmits the bitstream to It can be stored for a certain period of time.

[0299] Examples of the user device include a mobile phone, a smartphone, Laptop computers, digital broadcasting terminals, PDAs rsonaldigitalassistants), PMP(portablemul timediaplayer), navigation, slate PC (slatePC), Tablet PC, Ultrabook, Wearable wearable devices, such as smartwatches watch), smart glasses, HMD (head-mounted display) teddisplay), digital TV, desktop computer, digital signage Examples include:

[0300] Each server in the content streaming system operates as a distributed server. In this case, data received from each server can be processed in a distributed manner.

[0301] The scope of the present disclosure extends to any device or computer on which the operations of the methods of the various embodiments are performed. software or machine-executable commands (e.g., operating System, application, firmware, program, etc.) and the software or commands stored on the device or computer. Executable non-transitory computer-readable medium Includes a ter-readable medium. [Industrial Applicability]

[0302] Embodiments according to the present disclosure can be used to encode / decode images.

Claims

1. An image decoding method performed by an image decoding device, comprising: The image decoding method includes: deriving a predicted sample of the current block based on motion information of the current block; P and The current block is assigned a BDOF (Bi-directional optical flow) ) whether to apply; When applying BDOF to the current block, deriving a gradient for a current sub-block within the current block; An improved motion vector ( v x , v y ) Derive a BDOF offset based on the gradient and the refined motion vector. The step of issuing; The current block is then reconstructed based on the predicted samples and the BDOF offset. and deriving an improved prediction sample for the block. method.

2. The step of deriving the gradient includes: shifting right by an amount The first shift amount is set to a fixed value regardless of the bit depth of the current block. The image decoding method according to claim 1 , wherein

3. The image decoding method according to claim 2 , wherein the first shift amount is six.

4. The improved motion vector (v x , v y ) is derived by A step of deriving a first intermediate parameter diff based on the predicted samples of the current block. Tep and Deriving second intermediate parameters tempH and tempV based on the gradient. The image decoding method according to claim 1 , further comprising the steps of:

5. The step of deriving the first intermediate parameter diff is right shifting the pull by a second shift amount; The second shift amount is set to a fixed value regardless of the bit depth of the current block. The image decoding method according to claim 4, wherein the image decoding method is defined as

6. The image decoding method according to claim 5 , wherein the second shift amount is four.

7. The step of deriving the second intermediate parameters tempH and tempV comprises: right-shifting a value derived based on the entries by a third shift amount; The third shift amount is set to a fixed value regardless of the bit depth of the current block. The image decoding method according to claim 4, wherein the image decoding method is defined as

8. The image decoding method according to claim 7 , wherein the third shift amount is one.

9. The improved motion vector (v x , v y ) is clipped to a predetermined range.

2. The image decoding method according to claim 1.

10. The improved motion vector (v x , v y The predetermined range for clipping the 10. The method of claim 9, wherein the bit depth is set to a fixed range regardless of the bit depth of the current block. A method for decoding an image.

11. The step of deriving the BDOF offset may further include: shifting the derived value based on the motion vector by a predetermined shift amount to the right. , The predetermined shift amount is within a fixed range regardless of the bit depth of the current block. The image decoding method according to claim 1 , wherein the first and second inputs are set to:

12. The step of deriving an improved prediction sample for the current block includes the BDO. clipping the F offset to a predetermined range; 2. The method of claim 1, wherein the predetermined range is set based on a bit depth of the current block.

2. The image decoding method according to claim 1 .

13. An image decoding device, comprising: Memory, and The at least one processor: deriving a predicted sample of the current block based on motion information of the current block; determining whether to apply BDOF to the current block; When applying , An improved motion vector ( v x , v y ) is derived, Derive a BDOF offset based on the gradient and the refined motion vector. broth, The current block is then reconstructed based on the predicted samples and the BDOF offset. and deriving improved prediction samples for the block.

14. An image coding method performed by an image coding device, comprising: The image encoding method includes: deriving a predicted sample of the current block based on motion information of the current block; P and determining whether to apply BDOF to the current block; When applying BDOF to the current block, deriving a gradient for a current sub-block within the current block; An improved motion vector ( v x , v y ) Derive a BDOF offset based on the gradient and the refined motion vector. The step of issuing; The current block is then reconstructed based on the predicted samples and the BDOF offset. and deriving improved prediction samples for the block.

15. A method for transmitting a bit stream generated by the image coding method according to claim 14. Law.

Citation Information

Patent Citations

  • Method and apparatus for video encoding and decoding with bi-directional optical flow adapted to weighted prediction

    WO2020150080A1