Method and apparatus for sub-picture-based image encoding / decoding, and method for transmitting bitstream
By applying bidirectional optical flow (BDOF) or optical flow prediction refinement (PROF) in image encoding/decoding methods and devices to optimize the extraction and refinement of predicted samples, the low high-resolution image encoding/decoding efficiency in the prior art is solved. The problem of this achieves more efficient image transmission and storage.
Patent Information
- Application Number
- CN202411781791.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2019-09-25
- Filing Date
- 2020-09-23
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2040-09-23
AI Technical Summary
The prior art is difficult to effectively improve the encoding/decoding efficiency of high resolution and high-quality images, resulting in increased transmission and storage costs.
By determining whether bidirectional optical flow (BDOF) or optical flow prediction refinement (PROF) is applied to the current block in the image encoding/decoding method and device, and extracting and refining the prediction samples based on the decision, thereby optimizing the encoding and decoding process. .
The efficiency of image encoding/decoding is improved, transmission and storage costs are reduced, and encoding and decoding strategies determined based on whether the sub-picture and the current sub-picture are used as pictures are supported.
Smart Images

Figure CN119450036A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to an image encoding / decoding method and apparatus and a method for transmitting a bitstream, and more particularly, to an image encoding / decoding method and apparatus for performing sub-picture encoding / decoding and a method for transmitting a bitstream generated by the image encoding method / apparatus of the present disclosure. Background Art
[0002] Recently, the demand for high-resolution and high-quality images, such as high-definition (HD) images and ultra-high-definition (UHD) images, is increasing in various fields. As the resolution and quality of image data are improved, the amount of information or bit volume transmitted is relatively increased compared to existing image data. The increase in the amount of information or bit volume transmitted leads to an increase in transmission cost and storage cost.
[0003] Therefore, efficient image compression technology is needed to effectively transmit, store, and reproduce information about high-resolution and high-quality images. Summary of the invention
[0004] Technical issues
[0005] An object of the present disclosure is to provide an image encoding / decoding method and apparatus with improved encoding / decoding efficiency.
[0006] Another object of the present disclosure is to provide an image encoding / decoding method and apparatus for encoding / decoding an image based on a sub-picture.
[0007] Another object of the present disclosure is to provide an image encoding / decoding method and apparatus for performing BDOF or PROF based on determination of whether a current sub-picture is regarded as a picture.
[0008] Another object of the present disclosure is to provide a method for transmitting a bit stream generated by the image encoding method or apparatus according to the present disclosure.
[0009] Another object of the present disclosure is to provide a recording medium storing a bit stream generated by the image encoding method or apparatus according to the present disclosure.
[0010] Another object of the present disclosure is to provide a recording medium storing a bit stream received and decoded by the image decoding apparatus according to the present disclosure and used to reconstruct an image.
[0011] The technical problems solved by the present disclosure are not limited to the above-mentioned technical problems, and other technical problems not described here will be clear to those skilled in the art through the following description.
[0012] Technical Solution
[0013] According to one aspect of the present disclosure, an image decoding method may include: determining whether bidirectional optical flow (BDOF) or optical flow prediction refinement (PROF) is applied to a current block; based on BDOF or PROF being applied to the current block, extracting prediction samples of the current block from a reference picture of the current block based on motion information of the current block; and deriving refined prediction samples of the current block by applying BDOF or PROF to the current block based on the extracted prediction samples.
[0014] In the image decoding method of the present disclosure, the step of extracting the prediction sample of the current block may be performed based on whether the current sub-picture including the current block is regarded as a picture.
[0015] In the image decoding method of the present disclosure, whether the current sub-picture is regarded as a picture may be determined based on flag information signaled through a bitstream.
[0016] In the image decoding method of the present disclosure, flag information may be signaled through a sequence parameter set (SPS).
[0017] In the image decoding method of the present disclosure, the step of extracting the prediction sample of the current block may be performed based on the position of the prediction sample to be extracted, and wherein the position of the prediction sample may be clipped within a predetermined range.
[0018] In the image decoding method of the present disclosure, based on the current sub-picture being regarded as a picture, the predetermined range may be specified by the boundary position of the current sub-picture.
[0019] In the image decoding method disclosed in the present invention, the position of the predicted sample to be extracted may include an x-coordinate and a y-coordinate, the x-coordinate may be limited to the range of the left boundary position and the right boundary position of the current sub-picture, and the y-coordinate may be limited to the range of the upper boundary position and the lower boundary position of the current sub-picture.
[0020] In the image decoding method disclosed in the present invention, the left border position of the current sub-picture can be derived as the product of the position information of the predetermined unit specifying the left position of the current sub-picture and the width of the predetermined unit, the right border position of the current sub-picture can be derived by performing a "-1" operation on the product of the position information of the predetermined unit specifying the right position of the current sub-picture and the width of the predetermined unit, the upper border position of the current sub-picture can be derived as the product of the position information of the predetermined unit specifying the upper position of the current sub-picture and the height of the predetermined unit, and the lower border position of the current sub-picture can be derived by performing a "-1" operation on the product of the position information of the predetermined unit specifying the lower position of the current sub-picture and the height of the predetermined unit.
[0021] In the image decoding method of the present disclosure, the predetermined unit may be a grid or a CTU.
[0022] In the image decoding method of the present disclosure, based on the fact that the current sub-picture is not regarded as a picture, the predetermined range may be a range of the current picture including the current block.
[0023] According to another aspect of the present disclosure, an image decoding device may include a memory and at least one processor. The at least one processor may determine whether bidirectional optical flow (BDOF) or optical flow prediction refinement (PROF) is applied to a current block; based on BDOF or PROF being applied to the current block, extracting a prediction sample of the current block from a reference picture of the current block based on motion information of the current block; and deriving a refined prediction sample of the current block by applying BDOF or PROF to the current block based on the extracted prediction sample.
[0024] In the image decoding apparatus of the present disclosure, the at least one processor may extract the prediction sample of the current block based on whether a current sub-picture including the current block is regarded as a picture.
[0025] According to another aspect of the present disclosure, an image encoding method may include: determining whether bidirectional optical flow (BDOF) or optical flow prediction refinement (PROF) is applied to a current block; based on BDOF or PROF being applied to the current block, extracting prediction samples of the current block from a reference picture of the current block based on motion information of the current block; and deriving refined prediction samples of the current block by applying BDOF or PROF to the current block based on the extracted prediction samples.
[0026] In the image encoding method of the present disclosure, the step of extracting the prediction sample of the current block may be performed based on whether the current sub-picture including the current block is regarded as a picture.
[0027] A transmission method according to another aspect of the present disclosure may transmit a bit stream generated by the image encoding method and / or the image encoding device of the present disclosure to an image decoding device.
[0028] In addition, a computer-readable recording medium according to another aspect of the present disclosure may store a bit stream generated by the image encoding device or the image encoding method of the present disclosure.
[0029] The features of the brief summary of the present disclosure above are merely exemplary aspects of the following detailed description of the present disclosure and do not limit the scope of the present disclosure.
[0030] Beneficial Effects
[0031] According to the present disclosure, it is possible to provide an image encoding / decoding method and apparatus with improved encoding / decoding efficiency.
[0032] Furthermore, according to the present disclosure, it is possible to provide an image encoding / decoding method and apparatus for encoding / decoding an image based on a sub-picture.
[0033] Furthermore, according to the present disclosure, it is possible to provide an image encoding / decoding method and apparatus for performing BDOF or PROF based on determination of whether a current sub-picture is regarded as a picture.
[0034] Furthermore, according to the present disclosure, it is possible to provide a method of transmitting a bit stream generated by the image encoding method or apparatus according to the present disclosure.
[0035] Furthermore, according to the present disclosure, it is possible to provide a recording medium storing a bit stream generated by the image encoding method or apparatus according to the present disclosure.
[0036] Furthermore, according to the present disclosure, it is possible to provide a recording medium that stores a bit stream received and decoded by the image decoding device according to the present disclosure and used to reconstruct an image.
[0037] Those skilled in the art will understand that the effects that can be achieved through the present disclosure are not limited to what has been specifically described above, and other advantages of the present disclosure will be more clearly understood from the detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 FIG. 4 is a diagram schematically illustrating a video encoding system to which an embodiment of the present disclosure is applicable.
[0039] Figure 2 is a view schematically illustrating an image encoding device to which an embodiment of the present disclosure is applicable.
[0040] Figure 3 is a view schematically illustrating an image decoding device to which an embodiment of the present disclosure is applicable.
[0041] Figure 4 is a flowchart illustrating a video / image encoding method based on inter-frame prediction.
[0042] Figure 5 is a view illustrating a configuration of the inter prediction unit 180 according to the present disclosure.
[0043] Figure 6 is a flowchart illustrating a video / image decoding method based on inter-frame prediction.
[0044] Figure 7 is a view illustrating a configuration of the inter prediction unit 260 according to the present disclosure.
[0045] Figure 8 is a view illustrating motion that can be expressed in the affine mode.
[0046] Fig. 9 is a view illustrating a parametric model of an affine pattern.
[0047] Fig.10is a view illustrating a method of generating an affine merge candidate list.
[0048] Fig.11 is a view illustrating CPMV derived from neighboring blocks.
[0049] Fig.12 is a view illustrating neighboring blocks used to derive inherited affine merge candidates.
[0050] Fig.13 is a view illustrating neighboring blocks used to derive and construct affine merge candidates.
[0051] Fig.14 is a view illustrating a method of generating an affine MVP candidate list.
[0052] Fig.15 is a view of neighboring blocks illustrating a sub-block based TMVP mode.
[0053] Fig.16 is a view illustrating a method of inducing a motion vector field according to a sub-block based TMVP mode.
[0054] Fig.17 is a view illustrating a CU extended to perform BDOF.
[0055] Fig.18 is a view illustrating the relationship between Δv(i,j), v(i,j), and a sub-block motion vector.
[0056] Fig.19 is a view illustrating an embodiment of a syntax for signaling a sub-picture syntax element in an SPS.
[0057] Fig. 20 is a view illustrating an embodiment of an algorithm for deriving a predetermined variable such as SubPicTop.
[0058] Fig.21 is a view illustrating a method of encoding an image using a sub-picture by an encoding apparatus according to an embodiment.
[0059] Fig. 22 is a view illustrating a method of decoding an image using a sub-picture by a decoding apparatus according to an embodiment.
[0060] Fig.23 is a view illustrating a process of deriving a prediction sample of a current block by applying BDOF.
[0061] Fig.24 is a view illustrating input and output of a BDOF process according to an embodiment of the present disclosure.
[0062] Fig.25is a view illustrating variables used for BDOF processing according to an embodiment of the present disclosure.
[0063] Fig.26 is a view illustrating a method of generating prediction samples of each sub-block in a current CU based on whether BDOF is applied according to an embodiment of the present disclosure.
[0064] Fig. 27 is a view illustrating a method of deriving a gradient, an autocorrelation, and a cross-correlation of a current sub-block according to an embodiment of the present disclosure.
[0065] Fig.28 is a view illustrating a method of deriving motion refinement (vx, vy), deriving a BDOF offset, and generating a prediction sample of a current sub-block according to an embodiment of the present disclosure.
[0066] Fig.29 is a view illustrating a process of deriving a prediction sample of a current block by applying PROF.
[0067] Fig.30 is a view illustrating an example of PROF processing according to the present disclosure.
[0068] Fig.31 is a view illustrating a case where a reference sample is to be extracted across a sub-picture boundary.
[0069] Fig.32 yes Fig.31 A magnified image of the extracted area.
[0070] Fig.33 is a view illustrating a reference sample extraction process according to an embodiment of the present disclosure.
[0071] Fig.34 is a flowchart illustrating a reference sample extraction process according to the present disclosure.
[0072] Fig.35 is a view illustrating a portion of a fractional sample interpolation process according to the present disclosure.
[0073] Fig.36 is a view illustrating a portion of the sbTMVP derivation method according to the present disclosure.
[0074] Fig.37 is a view illustrating a method of deriving a sub-picture boundary position according to the present disclosure.
[0075] Fig.38 is a diagram showing a content streaming system to which an embodiment of the present disclosure is applicable. DETAILED DESCRIPTION
[0076] Hereinafter, the embodiments of the present disclosure will be described in detail with reference to the accompanying drawings to facilitate implementation by those skilled in the art. However, the present disclosure can be implemented in various forms and is not limited to the embodiments described herein.
[0077] When describing the present disclosure, if it is determined that the detailed description of related known functions or configurations makes the scope of the present disclosure unnecessarily ambiguous, the detailed description thereof will be omitted. In the drawings, parts irrelevant to the description of the present disclosure are omitted, and like reference numerals are given to like parts.
[0078] In the present disclosure, when a component is "connected", "coupled" or "linked" to another component, it may include not only a direct connection relationship but also an indirect connection relationship with intermediate components. In addition, when a component "includes" or "has" other components, unless otherwise specified, it means that other components may also be included, rather than excluding other components.
[0079] In the present disclosure, the terms first, second, etc. are used only for the purpose of distinguishing one component from other components, and do not limit the order or importance of the components unless otherwise specified. Accordingly, within the scope of the present disclosure, a first component in one embodiment may be referred to as a second component in another embodiment, and similarly, a second component in one embodiment may be referred to as a first component in another embodiment.
[0080] In the present disclosure, components that are distinguished from each other are intended to clearly describe each feature and do not mean that the components must be separated. That is, multiple components can be integrated and implemented in one hardware or software unit, or one component can be distributed and implemented in multiple hardware or software units. Therefore, even if not specifically stated, implementations in which these components are integrated or distributed are also included in the scope of the present disclosure.
[0081] In the present disclosure, the components described in each embodiment are not necessarily indispensable components, and some components may be optional components. Therefore, the embodiments consisting of a subset of the components described in the embodiments are also included in the scope of the present disclosure. In addition, the embodiments including other components in addition to the components described in the various embodiments are included in the scope of the present disclosure.
[0082] The present disclosure relates to encoding and decoding of images. Unless otherwise defined in the present disclosure, terms used in the present disclosure may have general meanings commonly used in the technical field to which the present disclosure belongs.
[0083] In the present disclosure, a "picture" generally refers to a unit representing an image within a specific time period, and a slice / tile is a coding unit constituting a part of a picture, and a picture may be composed of one or more slices / tiles. In addition, a slice / tile may include one or more coding tree units (CTUs).
[0084] In the present disclosure, "pixel" or "pel" may refer to the smallest unit constituting a picture (or image). In addition, "sample" may be used as a term corresponding to a pixel. A sample may generally represent a pixel or a pixel value, or may represent only a pixel / pixel value of a luminance component or only a pixel / pixel value of a chrominance component.
[0085] In the present disclosure, a "unit" may refer to a basic unit of image processing. The unit may include at least one of a specific area of a picture and information related to the area. In some cases, the unit may be used interchangeably with terms such as "sample array", "block" or "area". In general, an M×N block may include M columns and N rows of samples (or sample arrays) or a set (or array) of transform coefficients.
[0086] In the present disclosure, "current block" may mean one of "current coding block", "current coding unit", "coding target block", "decoding target block" or "processing target block". When prediction is performed, "current block" may mean "current prediction block" or "prediction target block". When transform (inverse transform) / quantization (dequantization) is performed, "current block" may mean "current transform block" or "transform target block". When filtering is performed, "current block" may mean "filtering target block".
[0087] In the present disclosure, the term " / " or "," may be interpreted as indicating "and / or". For example, "A / B" and "A, B" may mean "A and / or B". In addition, "A / B / C" and "A / B / C" may mean "at least one of A, B, and / or C".
[0088] In the present disclosure, the term "or" should be interpreted to indicate "and / or". For example, the expression "A or B" may include 1) only "A", 2) only "B", or 3) both "A and B". In other words, in the present disclosure, "or" should be interpreted to indicate "additionally or alternatively".
[0089] Overview of Video Coding Systems
[0090] Figure 1 is a diagram schematically illustrating a video encoding system according to the present disclosure.
[0091] The video encoding system according to the embodiment may include an encoding device 10 and a decoding device 20. The encoding device 10 may deliver the encoded video and / or image information or data to the decoding device 20 via a digital storage medium or a network in the form of a file or a stream.
[0092] The encoding device 10 according to the embodiment may include a video source generator 11, an encoding unit 12, and a transmitter 13. The decoding device 20 according to the embodiment may include a receiver 21, a decoding unit 22, and a renderer 23. The encoding unit 12 may be called a video / image encoding unit, and the decoding unit 22 may be called a video / image decoding unit. The transmitter 13 may be included in the encoding unit 12. The receiver 21 may be included in the decoding unit 22. The renderer 23 may include a display and the display may be configured as a separate device or an external component.
[0093] The video source generator 11 can obtain the video / image by the process of capturing, synthesizing or generating the video / image. The video source generator 11 may include a video / image capturing device and / or a video / image generating device. The video / image capturing device may include, for example, one or more cameras, a video / image archive including previously captured videos / images, etc. The video / image generating device may include, for example, a computer, a tablet computer, and a smart phone, and may generate the video / image (electronically). For example, a virtual video / image may be generated by a computer, etc. In this case, the video / image capturing process may be replaced by a process of generating relevant data.
[0094] The encoding unit 12 may encode the input video / image. For compression and encoding efficiency, the encoding unit 12 may perform a series of processes such as prediction, transformation, and quantization. The encoding unit 12 may output encoded data (encoded video / image information) in the form of a bitstream.
[0095] The transmitter 13 transmits the encoded video / image information or data output in the form of a bit stream to the receiver 21 of the decoding device 20 in the form of a file or stream through a digital storage medium or a network. The digital storage medium may include various storage media, such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitter 13 may include an element for generating a media file in a predetermined file format and may include an element for transmission through a broadcast / communication network. The receiver 21 may extract / receive a bit stream from a storage medium or a network and transmit the bit stream to the decoding unit 22.
[0096] The decoding unit 22 may decode a video / image by performing a series of processes corresponding to the operations of the encoding unit 12, such as dequantization, inverse transformation, and prediction.
[0097] The renderer 23 may render the decoded video / image. The rendered video / image may be displayed through a display.
[0098] Overview of Image Coding Equipment
[0099] Figure 2 is a view schematically showing an image encoding device to which an embodiment of the present disclosure is applicable.
[0100] like Figure 2 As shown, the image encoding device 100 may include an image segmenter 110, a subtractor 115, a transformer 120, a quantizer 130, a dequantizer 140, an inverse transformer 150, an adder 155, a filter 160, a memory 170, an inter-frame prediction unit 180, an intra-frame prediction unit 185, and an entropy encoder 190. The inter-frame prediction unit 180 and the intra-frame prediction unit 185 may be collectively referred to as a "prediction unit". The transformer 120, the quantizer 130, the dequantizer 140, and the inverse transformer 150 may be included in a residual processor. The residual processor may also include a subtractor 115.
[0101] In some embodiments, all or at least some of the components configuring the image encoding apparatus 100 may be configured by one hardware component (eg, an encoder or a processor). In addition, the memory 170 may include a decoded picture buffer (DPB) and may be configured by a digital storage medium.
[0102] The image segmenter 110 may segment the input image (or picture or frame) input to the image encoding device 100 into one or more processing units. For example, the processing unit may be referred to as a coding unit (CU). The coding unit may be obtained by recursively segmenting a coding tree unit (CTU) or a maximum coding unit (LCU) according to a quadtree binary tree ternary tree (QT / BT / TT) structure. For example, a coding unit may be segmented into a plurality of coding units of a deeper depth based on a quadtree structure, a binary tree structure, and / or a ternary tree structure. For the segmentation of the coding unit, the quadtree structure may be applied first, and then the binary tree structure and / or the ternary tree structure may be applied. The encoding process according to the present disclosure may be performed based on the final coding unit that is no longer segmented. The maximum coding unit may be used as the final coding unit, and the coding unit of a deeper depth obtained by segmenting the maximum coding unit may also be used as the final coding unit. Here, the encoding process may include the prediction, transformation, and reconstruction processes described later. As another example, the processing unit of the encoding process may be a prediction unit (PU) or a transformation unit (TU). The prediction unit and the transform unit may be divided or partitioned from the final coding unit. The prediction unit may be a sample prediction unit, and the transform unit may be a unit for deriving a transform coefficient and / or a unit for deriving a residual signal from the transform coefficient.
[0103] The prediction unit (inter prediction unit 180 or intra prediction unit 185) may perform prediction on the block to be processed (current block) and generate a prediction block including prediction samples of the current block. The prediction unit may determine whether to apply intra prediction or inter prediction based on the current block or CU. The prediction unit may generate various information related to the prediction of the current block and transmit the generated information to the entropy encoder 190. The information about the prediction may be encoded in the entropy encoder 190 and output in the form of a bitstream.
[0104] The intra prediction unit 185 can predict the current block by referring to the samples in the current picture. Depending on the intra prediction mode and / or the intra prediction technology, the reference samples can be located in the neighbors of the current block or can be placed separately. The intra prediction mode may include multiple non-directional modes and multiple directional modes. The non-directional mode may include, for example, a DC mode and a plane mode. Depending on the level of detail of the prediction direction, the directional mode may include, for example, 33 directional prediction modes or 65 directional prediction modes. However, this is only an example, and more or fewer directional prediction modes may be used according to the settings. The intra prediction unit 185 may determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring blocks.
[0105] The inter prediction unit 180 may derive a prediction block of the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. In this case, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may also include inter prediction direction (L0 prediction, L1 prediction, dual prediction, etc.) information. In the case of inter prediction, the neighboring blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different. The temporal neighboring block may be referred to as a collocated reference block, a collocated CU (colCU), etc. The reference picture including the temporal neighboring block may be referred to as a collocated picture (colPic). For example, the inter prediction unit 180 may configure a motion information candidate list based on the neighboring blocks and generate information indicating which candidate is used to derive the motion vector and / or reference picture index of the current block. Inter prediction may be performed based on various prediction modes. For example, in the case of skip mode and merge mode, the inter prediction unit 180 may use the motion information of the neighboring block as the motion information of the current block. In the case of skip mode, unlike the merge mode, the residual signal may not be transmitted. In the case of motion vector prediction (MVP) mode, the motion vector of the neighboring block may be used as a motion vector predictor, and the motion vector of the current block may be signaled by encoding the motion vector difference and an indicator of the motion vector predictor. The motion vector difference may mean the difference between the motion vector of the current block and the motion vector predictor.
[0106] The prediction unit can generate a prediction signal based on the various prediction methods and prediction techniques described below. For example, the prediction unit can apply not only intra-frame prediction or inter-frame prediction, but also intra-frame prediction and inter-frame prediction at the same time to predict the current block. The prediction method that simultaneously applies both intra-frame prediction and inter-frame prediction to predict the current block can be called combined inter-frame and intra-frame prediction (CIIP). In addition, the prediction unit can perform intra-frame block copying (IBC) to predict the current block. Intra-frame block copying can be used for content image / video encoding of games, etc., for example, screen content coding (SCC). IBC is a method of predicting the current picture using a previously reconstructed reference block in the current picture at a position separated by a predetermined distance from the current block. When IBC is applied, the position of the reference block in the current picture can be encoded as a vector (block vector) corresponding to a predetermined distance.
[0107] The prediction signal generated by the prediction unit can be used to generate a reconstruction signal or to generate a residual signal. The subtractor 115 can generate a residual signal (residual block or residual sample array) by subtracting the prediction signal (prediction block or prediction sample array) output from the prediction unit from the input image signal (original block or original sample array). The generated residual signal can be transmitted to the transformer 120.
[0108] The transformer 120 may generate transform coefficients by applying a transform technique to the residual signal. For example, the transform technique may include at least one of a discrete cosine transform (DCT), a discrete sine transform (DST), a karhunen-loève transform (KLT), a graph-based transform (GBT), or a conditional nonlinear transform (CNT). Here, GBT refers to a transform obtained from a graph when relationship information between pixels is represented by a graph. CNT refers to a transform obtained based on a prediction signal generated using all previously reconstructed pixels. In addition, the transform process may be applied to square pixel blocks of the same size or may be applied to blocks of variable size instead of square.
[0109] The quantizer 130 may quantize the transform coefficients and transmit them to the entropy encoder 190. The entropy encoder 190 may encode the quantized signal (information about the quantized transform coefficients) and output a bitstream. The information about the quantized transform coefficients may be referred to as residual information. The quantizer 130 may rearrange the quantized transform coefficients in the block form into a one-dimensional vector form based on the coefficient scanning order, and generate information about the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form.
[0110] The entropy encoder 190 may perform various encoding methods, such as exponential Golomb, context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), etc. The entropy encoder 190 may encode information required for video / image reconstruction other than quantized transform coefficients together or separately (e.g., values of syntax elements, etc.). The encoded information (e.g., encoded video / image information) may be transmitted or stored in units of a network abstraction layer (NAL) in the form of a bitstream. The video / image information may also include information about various parameter sets, such as an adaptive parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may also include general constraint information. The signaled information, transmitted information, and / or syntax elements described in the present disclosure may be encoded and included in a bitstream through the above-described encoding process.
[0111] The bitstream may be transmitted over a network or may be stored in a digital storage medium. The network may include a broadcast network and / or a communication network, and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitter (not shown) for transmitting a signal output from the entropy encoder 190 and / or a storage unit (not shown) for storing the signal may be included as an internal / external element of the image encoding device 100. Alternatively, a transmitter may be provided as a component of the entropy encoder 190.
[0112] The quantized transform coefficients output from the quantizer 130 may be used to generate a residual signal. For example, the residual signal (residual block or residual sample) may be reconstructed by applying dequantization and inverse transformation to the quantized transform coefficients through the dequantizer 140 and the inverse transformer 150.
[0113] The adder 155 adds the reconstructed residual signal to the prediction signal output from the inter-frame prediction unit 180 or the intra-frame prediction unit 185 to generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array). If the block to be processed has no residual, such as when the skip mode is applied, the prediction block can be used as a reconstructed block. The adder 155 can be called a reconstructor or a reconstructed block generator. The generated reconstructed signal can be used for intra-frame prediction of the next block to be processed in the current picture, and can be used for inter-frame prediction of the next picture by filtering as described below.
[0114] In addition, as described below, luma mapping and chroma scaling (LMCS) is applicable to the picture coding process.
[0115] The filter 160 can improve the subjective / objective image quality by applying filtering to the reconstructed signal. For example, the filter 160 can generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture, and store the modified reconstructed picture in the memory 170, specifically, in the DPB of the memory 170. Various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filtering, bilateral filtering, etc. The filter 160 can generate various information related to filtering and transmit the generated information to the entropy encoder 190, as described later in the description of each filtering method. The information related to filtering can be encoded by the entropy encoder 190 and output in the form of a bit stream.
[0116] The modified reconstructed picture transferred to the memory 170 may be used as a reference picture in the inter prediction unit 180. When inter prediction is applied by the image encoding apparatus 100, prediction mismatch between the image encoding apparatus 100 and the image decoding apparatus may be avoided and encoding efficiency may be improved.
[0117] The DPB of the memory 170 may store the modified reconstructed picture for use as a reference picture in the inter-frame prediction unit 180. The memory 170 may store the motion information of the block from which the motion information in the current picture is derived (or encoded) and / or the motion information of the reconstructed block in the picture. The stored motion information may be transmitted to the inter-frame prediction unit 180 and used as the motion information of the spatial neighboring block or the motion information of the temporal neighboring block. The memory 170 may store the reconstructed samples of the reconstructed blocks in the current picture and may transmit the reconstructed samples to the intra-frame prediction unit 185.
[0118] Overview of Image Decoding Equipment
[0119] Figure 3 is a view schematically showing an image decoding device to which an embodiment of the present disclosure is applicable.
[0120] like Figure 3 As shown, the image decoding device 200 may include an entropy decoder 210, a dequantizer 220, an inverse transformer 230, an adder 235, a filter 240, a memory 250, an inter-frame prediction unit 260, and an intra-frame prediction unit 265. The inter-frame prediction unit 260 and the intra-frame prediction unit 265 may be collectively referred to as a "prediction unit". The dequantizer 220 and the inverse transformer 230 may be included in a residual processor.
[0121] According to an embodiment, all or at least some of the plurality of components configuring the image decoding apparatus 200 may be configured by hardware components (eg, a decoder or a processor). In addition, the memory 250 may include a decoded picture buffer (DPB) or may be configured by a digital storage medium.
[0122] The image decoding device 200 having received a bit stream including video / image information may perform the same Figure 2 The image encoding device 100 may reconstruct the image by processing corresponding to the processing performed by the image encoding device 100. For example, the image decoding device 200 may perform decoding using a processing unit applied in the image encoding device. Therefore, the processing unit of decoding may be, for example, a coding unit. The coding unit may be obtained by partitioning the coding tree unit or the maximum coding unit. The reconstructed image signal decoded and output by the image decoding device 200 may be reproduced by a reproduction device (not shown).
[0123] The image decoding device 200 may receive the image in the form of a bit stream from Figure 2The received signal may be decoded by the entropy decoder 210. For example, the entropy decoder 210 may parse the bitstream to derive information (e.g., video / image information) required for image reconstruction (or picture reconstruction). The video / image information may also include information about various parameter sets, such as an adaptive parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may also include general constraint information. The image decoding device may also decode the picture based on the information about the parameter set and / or the general constraint information. The information and / or syntax elements signaled / received described in the present disclosure may be decoded and obtained from the bitstream through a decoding process. For example, the entropy decoder 210 may decode the information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output the values of the syntax elements required for image reconstruction and the quantized values of the transform coefficients of the residual. More specifically, the CABAC entropy decoding method can receive a bin corresponding to each syntax element in the bitstream, use the decoding target syntax element information, the decoding information of the neighboring block and the decoding target block, or the information of the symbol / bin decoded in the previous stage to determine the context model, perform arithmetic decoding on the bin by predicting the probability of occurrence of the bin according to the determined context model, and generate a symbol corresponding to the value of each syntax element. In this case, the CABAC entropy decoding method can update the context model by using the information of the decoded symbol / bin for the context model of the next symbol / bin after determining the context model. The information related to the prediction in the information decoded by the entropy decoder 210 can be provided to the prediction unit (inter-frame prediction unit 260 and intra-frame prediction unit 265), and the residual value of the entropy decoding performed on it in the entropy decoder 210, that is, the quantized transform coefficient and the related parameter information can be input to the dequantizer 220. In addition, the information about filtering in the information decoded by the entropy decoder 210 can be provided to the filter 240. In addition, a receiver (not shown) for receiving a signal output from the image encoding apparatus may be further configured as an internal / external element of the image decoding apparatus 200 , or the receiver may be a component of the entropy decoder 210 .
[0124] In addition, the image decoding device according to the present disclosure may be referred to as a video / image / picture decoding device. The image decoding device may be divided into an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder may include an entropy decoder 210. The sample decoder may include a dequantizer 220, an inverse transformer 230, an adder 235, a filter 240, a memory 250, an inter-frame prediction unit 260, or at least one of an intra-frame prediction unit 265.
[0125] The dequantizer 220 may dequantize the quantized transform coefficients and output the transform coefficients. The dequantizer 220 may rearrange the quantized transform coefficients in the form of two-dimensional blocks. In this case, the rearrangement may be performed based on the coefficient scanning order performed in the image encoding device. The dequantizer 220 may dequantize the quantized transform coefficients by using a quantization parameter (e.g., quantization step size information) and obtain the transform coefficients.
[0126] The inverse transformer 230 may inversely transform the transform coefficients to obtain a residual signal (residual block, residual sample array).
[0127] The prediction unit may perform prediction on the current block and generate a prediction block including prediction samples of the current block. The prediction unit may determine whether to apply intra prediction or inter prediction to the current block based on the information about prediction output from the entropy decoder 210, and may determine a specific intra / inter prediction mode (prediction technique).
[0128] The same as described in the prediction unit of the image encoding device 100 , the prediction unit can generate a prediction signal based on various prediction methods (techniques) described later.
[0129] The intra prediction unit 265 may predict the current block by referring to samples in the current picture. The description of the intra prediction unit 185 is also applicable to the intra prediction unit 265.
[0130] The inter-frame prediction unit 260 can derive the prediction block of the current block based on the reference block (reference sample array) specified by the motion vector on the reference picture. In this case, in order to reduce the amount of motion information transmitted in the inter-frame prediction mode, the motion information can be predicted in units of blocks, sub-blocks or samples based on the correlation of the motion information between the neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may also include inter-frame prediction direction (L0 prediction, L1 prediction, dual prediction, etc.) information. In the case of inter-frame prediction, the neighboring blocks may include spatial neighboring blocks existing in the current picture and temporal neighboring blocks existing in the reference picture. For example, the inter-frame prediction unit 260 may configure a motion information candidate list based on the neighboring blocks, and derive the motion vector and / or reference picture index of the current block based on the received candidate selection information. Inter-frame prediction may be performed based on various prediction modes, and information about the prediction may include information indicating the inter-frame prediction mode of the current block.
[0131] The adder 235 can generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the obtained residual signal to the prediction signal (prediction block, prediction sample array) output from the prediction unit (including the inter-frame prediction unit 260 and / or the intra-frame prediction unit 265). The description of the adder 155 is also applicable to the adder 235.
[0132] In addition, as described below, luma mapping and chroma scaling (LMCS) is applied to the picture decoding process.
[0133] The filter 240 can improve the subjective / objective image quality by applying filtering to the reconstructed signal. For example, the filter 240 can generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture, and store the modified reconstructed picture in the memory 250, specifically, in the DPB of the memory 250. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filtering, bilateral filtering, etc.
[0134] The (modified) reconstructed picture stored in the DPB of the memory 250 may be used as a reference picture in the inter-frame prediction unit 260. The memory 250 may store the motion information of the block from which the motion information in the current picture is derived (or decoded) and / or the motion information of the reconstructed block in the picture. The stored motion information may be transmitted to the inter-frame prediction unit 260 to be used as the motion information of the spatial neighboring block or the motion information of the temporal neighboring block. The memory 250 may store the reconstructed samples of the reconstructed block in the current picture and transmit the reconstructed samples to the intra-frame prediction unit 265.
[0135] In the present disclosure, the implementations described in the filter 160, the inter-frame prediction unit 180 and the intra-frame prediction unit 185 of the image encoding device 100 can be equally or correspondingly applied to the filter 240, the inter-frame prediction unit 260 and the intra-frame prediction unit 265 of the image decoding device 200.
[0136] Overview of Inter Prediction
[0137] The image encoding device / image decoding device may perform inter-frame prediction in units of blocks to derive prediction samples. Inter-frame prediction may mean prediction derived in a manner that depends on data elements of pictures other than the current picture. When inter-frame prediction is applied to the current block, the prediction block of the current block may be derived based on a reference block specified by a motion vector on a reference picture.
[0138] In this case, in order to reduce the amount of motion information sent in the inter-frame prediction mode, the motion information of the current block can be derived based on the correlation of the motion information between the neighboring blocks and the current block, and the motion information can be derived in units of blocks, sub-blocks or samples. The motion information may include a motion vector and a reference picture index. The motion information may also include inter-frame prediction type information. Here, the inter-frame prediction type information may mean the direction information of the inter-frame prediction. The inter-frame prediction type information may indicate that the current block is predicted using one of L0 prediction, L1 prediction or dual prediction.
[0139] When inter prediction is applied to the current block, the neighboring blocks of the current block may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. The reference picture including the reference block of the current block and the reference picture including the temporal neighboring blocks may be the same or different. The temporal neighboring block may be referred to as a collocated reference block or collocated CU (colCU), and the reference picture including the temporal neighboring block may be referred to as a collocated picture (colPic).
[0140] Furthermore, a motion information candidate list may be constructed based on neighboring blocks of the current block, and in this case, a flag or index information indicating which candidate to use in order to derive a motion vector and / or a reference picture index of the current block may be signaled.
[0141] According to the inter prediction type, the motion information may include L0 motion information and / or L1 motion information. A motion vector in the L0 direction may be defined as an L0 motion vector or MVL0, and a motion vector in the L1 direction may be defined as an L1 motion vector or MVL1. Prediction based on the L0 motion vector may be defined as L0 prediction, prediction based on the L1 motion vector may be defined as L1 prediction, and prediction based on both the L0 motion vector and the L1 motion vector may be defined as dual prediction. Here, the L0 motion vector may mean a motion vector associated with the reference picture list L0, and the L1 motion vector may mean a motion vector associated with the reference picture list L1.
[0142] The reference picture list L0 may include pictures before the current picture in the output order as reference pictures, and the reference picture list L1 may include pictures after the current picture in the output order. The previous picture may be defined as a forward (reference) picture, and the subsequent picture may be defined as a backward (reference) picture. In addition, the reference picture list L0 may also include pictures after the current picture in the output order as reference pictures. In this case, in the reference picture list L0, the previous picture may be indexed first, and then the subsequent picture may be indexed. The reference picture list L1 may also include pictures before the current picture in the output order as reference pictures. In this case, in the reference picture list L1, the subsequent picture may be indexed first, and then the previous picture may be indexed. Here, the output order may correspond to a picture order count (POC) order.
[0143] Figure 4 is a flowchart illustrating a video / image encoding method based on inter-frame prediction.
[0144] Figure 5 is a view illustrating a configuration of the inter predictor 180 according to the present disclosure.
[0145] Figure 4 The encoding method can be Figure 2 The image encoding device of the present invention may be performed. Specifically, step S410 may be performed by the inter-frame predictor 180, and step S420 may be performed by the residual processor. Specifically, step S420 may be performed by the subtractor 115. Step S430 may be performed by the entropy encoder 190. The prediction information of step S430 may be derived by the inter-frame predictor 180, and the residual information of step S430 may be derived by the residual processor. The residual information is information about the residual sample. The residual information may include information about the quantized transform coefficient for the residual sample. As described above, the residual sample may be derived as a transform coefficient by the transformer 120 of the image encoding device, and the transform coefficient may be derived as a quantized transform coefficient by the quantizer 130. The information about the quantized transform coefficient may be encoded by the entropy encoder 190 through the residual encoding process.
[0146] The image encoding device may perform inter-frame prediction for the current block (S410). The image encoding device may derive the inter-frame prediction mode and motion information of the current block and generate a prediction sample of the current block. Here, the inter-frame prediction mode determination, motion information derivation, and prediction sample generation processes may be performed simultaneously or any one of them may be performed before the other processes. For example, Figure 5 As shown, the inter-frame prediction unit 180 of the image encoding device may include a prediction mode determination unit 181, a motion information derivation unit 182, and a prediction sample derivation unit 183. The prediction mode determination unit 181 may determine the prediction mode of the current block, the motion information derivation unit 182 may derive the motion information of the current block, and the prediction sample derivation unit 183 may derive the prediction sample of the current block. For example, the inter-frame prediction unit 180 of the image encoding device may search for a block similar to the current block in a predetermined area (search area) of the reference picture through motion estimation, and derive a reference block whose difference with the current block is equal to or less than a predetermined criterion or a minimum value. Based on this, a reference picture index indicating a reference picture in which the reference block is located may be derived, and a motion vector may be derived based on the position difference between the reference block and the current block. The image encoding device may determine a mode applied to the current block among various inter-frame prediction modes. The image encoding device may compare rate-distortion (RD) costs for various prediction modes, and determine the optimal inter-frame prediction mode for the current block. However, a method of determining the inter prediction mode of the current block by the image encoding apparatus is not limited to the above example, and various methods may be used.
[0147] For example, the inter prediction mode of the current block may be determined as at least one of a merge mode, a merge skip mode, a motion vector prediction (MVP) mode, a symmetric motion vector difference (SMVD) mode, an affine mode, a sub-block based merge mode, an adaptive motion vector resolution (AMVR) mode, a history-based motion vector predictor (HMVP) mode, a pairwise average merge mode, a merge mode with motion vector difference (MMVD) mode, a decoder-side motion vector refinement (DMVR) mode, a combined inter- and intra-prediction (CIIP) mode, or a geometric partitioning mode (GPM).
[0148] For example, when the skip mode or merge mode is applied to the current block, the image encoding device may derive a merge candidate from a neighboring block of the current block, and use the derived merge candidate to construct a merge candidate list. In addition, the image encoding device may derive a reference block whose difference with the current block is equal to or less than a predetermined criterion or minimum value from the reference blocks indicated by the merge candidates included in the merge candidate list. In this case, a merge candidate associated with the derived reference block may be selected, and merge index information indicating the selected merge candidate may be generated and signaled to the image decoding device. The motion information of the selected merge candidate may be used to derive the motion information of the current block.
[0149] As another example, when the MVP mode is applied to the current block, the image encoding device may derive a motion vector predictor (MVP) candidate from a neighboring block of the current block, and use the derived MVP candidate to construct an MVP candidate list. In addition, the image encoding device may use the motion vector of the MVP candidate selected from among the MVP candidates included in the MVP candidate list as the MVP of the current block. In this case, for example, the motion vector indicating the reference block derived by the above-mentioned motion estimation may be used as the motion vector of the current block, and the MVP candidate having the smallest motion vector difference with the motion vector of the current block among the MVP candidates may be the selected MVP candidate. A motion vector difference (MVD) as a difference obtained by subtracting the MVP from the motion vector of the current block may be derived. In this case, index information indicating the selected MVP candidate and information about the MVD may be signaled to the image decoding device. In addition, when the MVP mode is applied, the value of the reference picture index may be constructed as reference picture index information and separately signaled to the image decoding device.
[0150] The image encoding apparatus may derive residual samples based on the predicted samples (S420). The image encoding apparatus may derive residual samples by comparing the original samples of the current block with the predicted samples. For example, the residual samples may be derived by subtracting the corresponding predicted samples from the original samples.
[0151] The image encoding device may encode the image information including the prediction information and the residual information (S430). The image encoding device may output the encoded image information in the form of a bitstream. The prediction information may include prediction mode information (e.g., a skip flag, a merge flag, or a mode index, etc.) and information about motion information as information related to the prediction process. Among the prediction mode information, the skip flag indicates whether the skip mode is applied to the current block, and the merge flag indicates whether the merge mode is applied to the current block. Alternatively, the prediction mode information may indicate one of a plurality of prediction modes, such as a mode index. When the skip flag and the merge flag are 0, it can be determined that the MVP mode is applied to the current block. The information about the motion information may include candidate selection information (e.g., a merge index, an mvp flag, or an mvp index) as information for deriving a motion vector. Among the candidate selection information, the merge index may be signaled when the merge mode is applied to the current block, and may be information for selecting one of the merge candidates included in the merge candidate list. Among the candidate selection information, the MVP flag or the MVP index may be signaled when the MVP mode is applied to the current block, and may be information for selecting one of the MVP candidates in the MVP candidate list. Specifically, the MVP flag may be signaled using a syntax element mvp_10_flag or mvp_11_flag. In addition, the information about the motion information may include information about the above-mentioned MVD and / or reference picture index information. In addition, the information about the motion information may include information indicating whether L0 prediction, L1 prediction, or bi-prediction is applied. The residual information is information about the residual sample. The residual information may include information about the quantized transform coefficients for the residual sample.
[0152] The output bit stream may be stored in a (digital) storage medium and transmitted to the image decoding device or may be transmitted to the image decoding device via a network.
[0153] As described above, the image encoding device can generate a reconstructed picture (a picture including reconstructed samples and reconstructed blocks) based on the reference sample and the residual sample. This is for the image encoding device to derive the same prediction result as the prediction result performed by the image decoding device, thereby improving the coding efficiency. Therefore, the image encoding device can store the reconstructed picture (or reconstructed sample and reconstructed block) in a memory and use it as a reference picture for inter-frame prediction. As described above, the in-loop filtering process is also applicable to the reconstructed picture.
[0154] Figure 6 is a flowchart illustrating a video / image decoding method based on inter-frame prediction.
[0155] Figure 7 is a view illustrating a configuration of the inter prediction unit 260 according to the present disclosure.
[0156] The image decoding apparatus may perform an operation corresponding to the operation performed by the image encoding apparatus. The image decoding apparatus may perform prediction on the current block based on the received prediction information and derive a prediction sample.
[0157] Figure 6 The decoding method can be obtained by Figure 3 The image decoding device of the present invention is performed. Steps S610 to S630 may be performed by the inter-frame prediction unit 260, and the prediction information of step S610 and the residual information of step S640 may be obtained from the bitstream by the entropy decoder 210. The residual processor of the image decoding device may derive the residual samples of the current block based on the residual information (S640). Specifically, the dequantizer 220 of the residual processor may perform dequantization based on the quantized transform coefficient derived according to the residual information to derive the transform coefficient, and the inverse transformer 230 of the residual processor may perform inverse transform on the transform coefficient to derive the residual sample of the current block. Step S650 may be performed by the adder 235 or the reconstructor.
[0158] Specifically, the image decoding apparatus may determine a prediction mode of the current block based on the received prediction information (S610). The image decoding apparatus may determine which inter prediction mode is applied to the current block based on prediction mode information in the prediction information.
[0159] For example, it may be determined whether the skip mode is applied to the current block based on a skip flag. In addition, it may be determined whether the merge mode or the MVP mode is applied to the current block based on a merge flag. Alternatively, one of various inter-frame prediction mode candidates may be selected based on a mode index. The inter-frame prediction mode candidate may include a skip mode, a merge mode, and / or an MVP mode or may include various inter-frame prediction modes to be described below.
[0160] The image decoding device may derive motion information of the current block based on the determined inter prediction mode (S620). For example, when the skip mode or merge mode is applied to the current block, the image decoding device may construct a merge candidate list to be described below, and select one of the merge candidates included in the merge candidate list. The selection may be performed based on the above-mentioned candidate selection information (merge index). The motion information of the selected merge candidate may be used to derive the motion information of the current block. For example, the motion information of the selected merge candidate may be used as the motion information of the current block.
[0161] As another example, when the MVP mode is applied to the current block, the image decoding device may construct an MVP candidate list, and use the motion vector of the MVP candidate selected from the MVP candidates included in the MVP candidate list as the MVP of the current block. The selection may be performed based on the above-mentioned candidate selection information (mvp flag or mvp index). In this case, the MVD of the current block may be derived based on the information about the MVD, and the motion vector of the current block may be derived based on the MVP and MVD of the current block. In addition, the reference picture index of the current block may be derived based on the reference picture index information. The picture indicated by the reference picture index in the reference picture list of the current block may be derived as a reference picture referenced for inter-frame prediction of the current block.
[0162] The image decoding device may generate a prediction sample of the current block based on the motion information of the current block (S630). In this case, a reference picture may be derived based on a reference picture index of the current block, and a sample of the reference block indicated by a motion vector of the current block on the reference picture may be used to derive the prediction sample of the current block. In some cases, a prediction sample filtering process may also be performed for all or some of the prediction samples of the current block.
[0163] For example, Figure 7 As shown, the inter-frame prediction unit 260 of the image decoding device may include a prediction mode determination unit 261, a motion information derivation unit 262, and a prediction sample derivation unit 263. In the inter-frame prediction unit 260 of the image decoding device, the prediction mode determination unit 261 may determine the prediction mode of the current block based on the received prediction mode information, the motion information derivation unit 262 may derive the motion information (motion vector and / or reference picture index, etc.) of the current block based on the received motion information, and the prediction sample derivation unit 263 may derive the prediction sample of the current block.
[0164] The image decoding device may generate residual samples of the current block based on the received residual information (S640). The image decoding device may generate reconstructed samples of the current block based on the predicted samples and the residual samples and generate a reconstructed picture based thereon (S650). Thereafter, the in-loop filtering process is applied to the reconstructed picture as described above.
[0165] As described above, the inter-frame prediction process may include a step of determining an inter-frame prediction mode, a step of deriving motion information according to the determined prediction mode, and a step of performing prediction (generating prediction samples) based on the derived motion information. As described above, the inter-frame prediction process may be performed by an image encoding device and an image decoding device.
[0166] Hereinafter, the steps of deriving motion information according to the prediction mode will be described in more detail.
[0167] As described above, inter-frame prediction can be performed using the motion information of the current block. The image encoding device can derive the optimal motion information of the current block through a motion estimation process. For example, the image encoding device can use the original block in the original picture of the current block in fractional pixel units to search for a similar reference block with high correlation within a predetermined search range in the reference picture, and use it to derive motion information. The similarity of the block can be calculated based on the sum of absolute differences (SAD) between the current block and the reference block. In this case, the motion information can be derived based on the reference block with the minimum SAD in the search area. The derived motion information can be signaled to the image decoding device according to various methods based on the inter-frame prediction mode.
[0168] When the merge mode is applied to the current block, the motion information of the current block is not sent directly, and the motion information of the neighboring blocks is used to derive the motion information of the current block. Therefore, the motion information of the current prediction block can be indicated by sending flag information indicating that the merge mode is used and candidate selection information (e.g., merge index) indicating which neighboring block is used as a merge candidate. In the present disclosure, since the current block is a prediction execution unit, the current block can be used as the same meaning as the current prediction block, and the neighboring block can be used as the same meaning as the neighboring prediction block.
[0169] The image encoding device may search for a merge candidate block for deriving motion information of the current block to perform a merge mode. For example, up to five merge candidate blocks may be used, but not limited thereto. The maximum number of merge candidate blocks may be sent in a slice header or a tile group header, but not limited thereto. After finding the merge candidate block, the image encoding device may generate a merge candidate list and select the merge candidate block with the minimum RD cost as the final merge candidate block.
[0170] The merge candidate list may use, for example, five merge candidate blocks. For example, four spatial merge candidates and one temporal merge candidate may be used.
[0171] Overview of Affine Mode
[0172] Hereinafter, an affine mode as an example of an inter-frame prediction mode will be described in detail. In a conventional video encoding / decoding system, only one motion vector is used to express the motion information of the current block (translation motion model). However, in conventional methods, the optimal motion information is expressed only in units of blocks, but the optimal motion information cannot be expressed in units of pixels. In order to solve this problem, an affine motion mode that defines the motion information of a block in units of pixels has been proposed. According to the affine mode, two to four motion vectors associated with the current block can be used to determine the motion vectors of each pixel and / or sub-block unit of the block.
[0173] Compared with the existing motion information expressed using translation (or displacement) of pixel values, in the affine mode, the motion information of each pixel can be expressed using at least one of translation, scaling, rotation or shearing.
[0174] Figure 8 is a view illustrating motion that can be expressed in the affine mode.
[0175] exist Figure 8 Among the motions shown, the affine mode that uses displacement, scaling or rotation to express the motion information of each pixel may be a similar or simplified affine mode. The affine mode in the following description may mean a similar or simplified affine mode.
[0176] The motion information in the affine mode can be expressed using two or more control point motion vectors (CPMVs). The CPMVs can be used to derive the motion vector for a specific pixel position of the current block. In this case, the set of motion vectors for each pixel and / or sub-block of the current block can be defined as an affine motion vector field (affine MVF).
[0177] Fig. 9 is a view illustrating a parametric model of an affine pattern.
[0178] When the affine mode is applied to the current block, the affine MVF can be derived using one of a 4-parameter model and a 6-parameter model. In this case, the 4-parameter model may refer to a model type using two CPMVs, and the 6-parameter model may refer to a model type using three CPMVs. Fig. 9 (a) and Fig. 9 (b) shows the CPMV used in the 4-parameter model and the 6-parameter model respectively.
[0179] When the position of the current block is (x, y), the motion vector according to the pixel position may be derived according to the following formula 1 or formula 2. For example, the motion vector according to the 4-parameter model may be derived according to formula 1, and the motion vector according to the 6-parameter model may be derived according to formula 2.
[0180] [Formula 1]
[0181]
[0182] [Formula 2]
[0183]
[0184] In Equations 1 and 2, mv0={mv_0x, mv_0y} may be the CPMV at the upper left corner position of the current block, mv1={mv_1x, mv_1y} may be the CPMV at the upper right position of the current block, and mv2={mv_2x, mv_2y} may be the CPMV at the lower left position of the current block. In this case, W and H correspond to the width and height of the current block, respectively, and mv={mv_x, mv_y} may mean the motion vector of the pixel position {x, y}.
[0185] In the encoding / decoding process, the affine MVF can be determined in units of pixels and / or predefined sub-blocks. When the affine MVF is determined in units of pixels, the motion vector can be derived based on the individual pixel values. In addition, when the affine MVF is determined in units of sub-blocks, the motion vector of the corresponding block can be derived based on the center pixel value of the sub-block. The center pixel value may mean a virtual pixel present in the center of the sub-block or a lower right pixel among the four pixels present in the center. In addition, the center pixel value may be a specific pixel in the sub-block and may be a pixel representing the sub-block. In the present disclosure, the case where the affine MVF is determined in units of 4×4 sub-blocks will be described. However, this is only for convenience of description, and the size of the sub-block may be changed differently.
[0186] That is, when affine prediction is available, the motion model applicable to the current block may include three models, namely, a translation motion model, a 4-parameter affine motion model, and a 6-parameter affine motion model. Here, the translation motion model may represent a model used by an existing block unit motion vector, the 4-parameter affine motion model may represent a model used by two CPMVs, and the 6-parameter affine motion model may represent a model used by three CPMVs. The affine mode may be divided into detailed modes according to the motion information encoding / decoding method. For example, the affine mode may be further divided into an affine MVP mode and an affine merge mode.
[0187] When the affine merge mode is applied to the current block, the CPMV can be derived from the neighboring blocks of the current block encoded / decoded in the affine mode. The affine merge mode can be applied to the current block when at least one neighboring block of the current block is encoded / decoded in the affine mode. That is, when the affine merge mode is applied to the current block, the CPMV of the current block can be derived using the CPMV of the neighboring blocks. For example, the CPMV of the neighboring blocks can be determined as the CPMV of the current block, or the CPMV of the current block can be derived based on the CPMV of the neighboring blocks. When the CPMV of the current block is derived based on the CPMV of the neighboring blocks, at least one encoding parameter of the current block or the neighboring blocks can be used. For example, the CPMV of the neighboring blocks can be modified based on the size of the neighboring blocks and the size of the current block and used as the CPMV of the current block.
[0188] In addition, the affine merge that derives MV in units of sub-blocks may be referred to as a sub-block merge mode, which may be specified by a merge_subblock_flag having a first value (e.g., 1). In this case, the affine merge candidate list described below may be referred to as a sub-block merge candidate list. In this case, the candidate derived as the SbTMVP described below may be further included in the sub-block merge candidate list. In this case, the candidate derived as the sbTMVP may be used as a candidate for index #0 of the sub-block merge candidate list. In other words, the candidate derived as the sbTMVP may be located in front of the inherited affine candidate and the constructed affine candidate described below in the sub-block merge candidate list.
[0189] For example, an affine mode flag specifying whether affine mode is applicable to the current block may be defined, which may be signaled at at least one higher level (e.g., sequence, picture, slice, patch, patch group, tile, etc.) of the current block. For example, the affine mode flag may be named sps_affine_enabled_flag.
[0190] When the affine merge mode is applied, the affine merge candidate list may be configured to derive the CPMV of the current block. In this case, the affine merge candidate list may include at least one of an inherited affine merge candidate, a constructed affine merge candidate, or a zero merge candidate. When the neighboring blocks of the current block are encoded / decoded in affine mode, the inherited affine merge candidate may mean a candidate derived using the CPMV of the neighboring block. Constructing an affine merge candidate may mean a candidate that derives each CPMV based on the motion vector of the neighboring block of each control point (CP). In addition, a zero merge candidate may mean a candidate consisting of a CPMV of size 0. In the following description, CP may mean a specific position of a block used to derive a CPMV. For example, CP may be each vertex position of a block.
[0191] Fig.10 is a view illustrating a method of generating an affine merge candidate list.
[0192] Reference Fig.10 , the affine merge candidates can be added to the affine merge candidate list in the order of inheriting the affine merge candidate (S1210), constructing the affine merge candidate (S1220), and the zero merge candidate (S1230). When the number of candidates included in the candidate list does not meet the maximum number of candidates even if all the inherited affine merge candidates and the constructed affine merge candidates are added to the affine merge candidate list, the zero merge candidate can be added. In this case, the zero merge candidate can be added until the number of candidates in the affine merge candidate list meets the maximum number of candidates.
[0193] Fig.11is a view illustrating a control point motion vector (CPMV) derived from neighboring blocks.
[0194] For example, up to two inherited affine merging candidates may be derived, each of which may be derived based on at least one of a left neighboring block and an upper neighboring block.
[0195] Fig.12 is a view illustrating neighboring blocks used to derive inheritance affine candidates.
[0196] The inherited affine merge candidate derived from the left neighboring block is based on Fig.12 The inherited affine merge candidate derived from the upper neighboring block can be based on Fig.12 The candidate for inherited affine merging may be derived from at least one of the neighboring blocks B0, B1, or B2 of the left and top neighboring blocks. In this case, the scanning order of the neighboring blocks may be A0 to A1 and B0, B1, and B2, but is not limited thereto. For each of the left and top neighboring blocks, the inherited affine merging candidate may be derived based on the first neighboring block available in the scanning order. In this case, no redundancy check may be performed between the candidates derived from the left neighboring block and the top neighboring block.
[0197] For example, Fig.11 As shown, when the left neighboring block A is encoded / decoded in affine mode, at least one of the motion vectors v2, v3, and v4 corresponding to the CP of the neighboring block A can be derived. When the neighboring block A is encoded / decoded by a 4-parameter affine model, the inherited affine merge candidate can be derived using v2 and v3. In contrast, when the neighboring block A is encoded / decoded by a 6-parameter affine model, the inherited affine merge candidate can be derived using v2, v3, and v4.
[0198] Fig.13 is a view illustrating neighboring blocks used to derive and construct affine merge candidates.
[0199] Constructing an affine candidate may mean a candidate with a CPMV derived using a combination of general motion information of neighboring blocks. The motion information of each CP may be derived using a spatial neighboring block or a temporal neighboring block of the current block. In the following description, CPMVk may mean a motion vector representing the kth CP. For example, referring to Fig.13 , CPMV1 may be determined as the first motion vector available among the motion vectors of B2, B3, and A2, and in this case, the scanning order may be B2, B3, and A2. CPMV2 may be determined as the first motion vector available among the motion vectors of B1 and B0, and in this case, the scanning order may be B1 and B0. CPMV3 may be determined as one of the motion vectors of A1 and A0, and in this case, the scanning order may be A1 and A0. When TMVP is applicable to the current block, CPMV4 may be determined as the motion vector of the temporally neighboring block T.
[0200] After deriving the four motion vectors of each CP, an affine merge candidate can be derived based on this. The affine merge candidate can be configured by including at least two motion vectors selected from the four motion vectors of each CP derived. For example, the affine merge candidate can be composed of at least one of {CPMV1, CPMV2, CPMV3}, {CPMV1, CPMV2, CPMV4}, {CPMV1, CPMV3, CPMV4}, {CPMV2, CPMV3, CPMV4}, {CPMV1, CPMV2} or {CPMV1, CPMV3} in this order. The affine candidate constructed by three motion vectors can be a candidate for a 6-parameter affine model. In contrast, the affine candidate constructed by two motion vectors can be a candidate for a 4-parameter affine model. In order to avoid the scaling process of the motion vector, when the reference picture indexes of the CPs are different from each other, the combination of the relevant CPMVs can be ignored and not used to derive the affine candidate.
[0201] When the affine MVP mode is applied to the current block, the encoding / decoding device may derive two or more CPMV predictors and CPMV of the current block and derive the CPMV difference based on them. In this case, the CPMV difference may be signaled from the encoding device to the decoding device. The image decoding device may derive the CPMV predictor of the current block, reconstruct the signaled CPMV difference, and then derive the CPMV of the current block based on the CPMV predictor and the CPMV difference.
[0202] In addition, when the affine merge mode or sub-block based TMVP is not applied to the current block (for example, the value of the affine merge flag or merge_subblock_flag is 0), the affine MVP mode can be applied to the current block. Alternatively, when the value of inter_affine_flag is 1, the affine MVP mode can be applied to the current block. In addition, the affine MVP mode can be expressed as an affine CP MVP mode. The affine MVP candidate list described below can be referred to as a control point motion vector prediction sub-candidate list.
[0203] When the affine MVP mode is applied to the current block, the affine MVP candidate list may be configured to derive the CPMV of the current block.
[0204] In this case, the affine MVP candidate list may include at least one of an inherited affine MVP candidate, a constructed affine MVP candidate, a translation motion affine MVP candidate, or a zero MVP candidate. For example, the affine MVP candidate list may include at most n (eg, n=2) candidates.
[0205] In this case, the inherited affine MVP candidate may mean a candidate derived based on the CPMV of a neighboring block when the neighboring block of the current block is encoded / decoded in affine mode. The constructed affine MVP candidate may mean a candidate derived by generating a CPMV combination based on the motion vector of the CP neighboring block. The zero MVP candidate may mean a candidate consisting of a CPMV with a value of 0. The derivation method and the characteristics of the inherited affine MVP candidate and the constructed affine MVP candidate are the same as those of the inherited affine candidate and the constructed affine candidate described above, so their description will be omitted.
[0206] When the maximum number of candidates in the affine MVP candidate list is 2, affine MVP candidates, translational motion affine MVP candidates and zero MVP candidates may be added when the current number of candidates is less than 2. Specifically, the translational motion affine MVP candidates may be derived in the following order.
[0207] For example, when the number of candidates included in the affine MVP candidate list is less than 2 and CPMV0 for constructing the affine MVP candidate is valid, CPMV0 can be used as the affine MVP candidate. That is, the affine MVP candidate whose all motion vectors of CP0, CP1, and CP2 are CPMV0 can be added to the affine MVP candidate list.
[0208] Next, when the number of candidates in the affine MVP candidate list is less than 2 and CPMV1 for constructing the affine MVP candidate is valid, CPMV1 can be used as the affine MVP candidate. That is, the affine MVP candidate whose motion vectors of CP0, CP1, and CP2 are all CPMV1 can be added to the affine MVP candidate list.
[0209] Next, when the number of candidates in the affine MVP candidate list is less than 2 and CPMV2 for constructing the affine MVP candidate is valid, CPMV2 can be used as the affine MVP candidate. That is, the affine MVP candidate whose motion vectors of CP0, CP1, and CP2 are all CPMV2 can be added to the affine MVP candidate list.
[0210] Regardless of the above conditions, when the number of candidates in the affine MVP candidate list is less than 2, the temporal motion vector predictor (TMVP) of the current block may be added to the affine MVP candidate list. Regardless of the above, when the number of candidates in the affine MVP candidate list is less than 2, a zero MVP candidate may be added to the affine MVP candidate list.
[0211] Fig.14 is a view illustrating a method of generating an affine MVP candidate list.
[0212] Reference Fig.14, the candidates may be added to the affine MVP candidate list in the order of inheriting the affine MVP candidate (S1610), constructing the affine MVP candidate (S1620), translating the motion affine MVP candidate (S1630), and zeroing the MVP candidate (S1640). As described above, steps S1620 to S1640 may be performed depending on whether the number of candidates included in the affine MVP candidate list in each step is less than 2.
[0213] The scanning order of the inherited affine MVP candidate may be equal to the scanning order of the inherited affine merge candidate. However, in the case of the inherited affine MVP candidate, only the neighboring blocks that refer to the same reference picture as the reference picture of the current block may be considered. When the inherited affine MVP candidate is added to the affine MVP candidate list, redundancy check may not be performed.
[0214] In order to derive and construct affine MVP candidates, we can only consider Fig.13 The spatial neighboring blocks shown. In addition, the scanning order for constructing the affine MVP candidate can be equal to the scanning order for constructing the affine merge candidate. In addition, in order to derive the construction of the affine MVP candidate, the reference picture index of the neighboring block can be checked, and in the scanning order, the first neighboring block that is inter-coded and refers to the same reference picture as the reference picture of the current block can be used.
[0215] Overview of Sub-block Based Temporal Motion Vector Prediction (SbTMVP) Mode
[0216] Hereinafter, a subblock-based TMVP mode as an example of an inter prediction mode will be described in detail. According to the subblock-based TMVP mode, a motion vector field (MVF) of a current block may be derived and a motion vector may be derived in units of subblocks.
[0217] Unlike the conventional TMVP mode performed in units of coding units, for coding units to which the sub-block based TMVP mode is applied, motion vectors may be encoded / decoded in units of sub-coding units. In addition, according to the conventional TMVP mode, temporal motion vectors may be derived from collocated blocks in collocated pictures, but in the sub-block based TMVP mode, motion vector fields may be derived from reference blocks in collocated pictures specified by motion vectors derived from neighboring blocks of the current block. Hereinafter, the motion vector derived from the neighboring blocks may be referred to as motion shift or representative motion vector of the current block.
[0218] Fig.15 is a view of neighboring blocks illustrating a sub-block based TMVP mode.
[0219] When the sub-block based TMVP mode is applied to the current block, the neighboring blocks used to determine the motion shift may be determined. Fig.15The neighboring blocks for determining motion shift are scanned in the order of blocks A1, B1, B0 and A0 of the current block. As another example, the neighboring blocks for determining motion shift may be limited to specific neighboring blocks of the current block. For example, the neighboring block for determining motion shift may always be determined as block A1. When a neighboring block has a motion vector of a reference col picture, the corresponding motion vector may be determined as motion shift. The motion vector determined as motion shift may be referred to as a temporal motion vector. In addition, when the above-mentioned motion vector cannot be derived from the neighboring blocks, the motion shift may be set to (0,0).
[0220] Fig.16 is a view illustrating a method of deriving a motion vector field according to a sub-block based TMVP mode.
[0221] Next, the reference block on the collocated picture specified by the motion shift can be determined. For example, the sub-block-based motion information (motion vector or reference picture index) can be obtained from the col picture by adding the motion shift to the coordinates of the current block. Fig.16 In the example shown, it is assumed that the motion shift is the motion vector of the A1 block. By applying the motion shift to the current block, the sub-blocks (col sub-blocks) corresponding to the respective sub-blocks configuring the current block in the col picture can be specified. Thereafter, using the motion information of the corresponding sub-blocks (col sub-blocks) in the col picture, the motion information of the respective sub-blocks of the current block can be derived. For example, the motion information of the corresponding sub-block can be obtained from the center position of the corresponding sub-block. In this case, the center position can be the position of the lower right sample among the four samples located at the center of the corresponding sub-block. When the motion information of a particular sub-block of the col block corresponding to the current block is not available, the motion information of the center sub-block of the col block can be determined as the motion information of the corresponding sub-block. When the motion vector of the corresponding sub-block is derived, similar to the above-mentioned TMVP process, it is possible to switch to the reference picture index and the motion vector of the current sub-block. That is, when deriving a sub-block-based motion vector, the POC of the reference picture of the reference block can be considered to perform scaling of the motion vector.
[0222] As described above, a sub-block-based TMVP candidate of the current block may be derived using a motion vector field or motion information of the current block derived on a sub-block basis.
[0223] Hereinafter, a merge candidate list configured in units of subblocks is defined as a subblock-unit merge candidate list. The above-mentioned affine merge candidates and subblock-based TMVP candidates may be merged to configure a subblock-unit merge candidate list.
[0224] In addition, a sub-block-based TMVP mode flag that specifies whether the sub-block-based TMVP mode is applicable to the current block may be defined, which may be signaled at at least one level among the higher levels of the current block (e.g., sequence, picture, slice, patch, patch group, tile, etc.). For example, the sub-block-based TMVP mode flag may be named sps_sbtmvp_enabled_flag. When the sub-block-based TMVP mode is applicable to the current block, the sub-block-based TMVP candidate may be first added to the sub-block unit merge candidate list, and then the affine merge candidate may be added to the sub-block unit merge candidate list. In addition, the maximum number of candidates that may be included in the sub-block unit merge candidate list may be signaled. For example, the maximum number of candidates that may be included in the sub-block unit merge candidate list may be 5.
[0225] The size of the sub-block used to derive the sub-block unit merge candidate list may be signaled or preset to M×N. For example, M×N may be 8×8. Therefore, the affine mode or the sub-block-based TMVP mode is applicable to the current block only when the size of the current block is 8×8 or larger.
[0226] The following will describe the implementation of the prediction execution method disclosed in the present invention. Figure 4 Step S410 or Figure 6 The following prediction execution method is performed in step S630.
[0227] A prediction block of a current block may be generated based on motion information derived according to a prediction mode. A prediction block (predicted block) may include prediction samples (prediction sample array) of a current block. When a motion vector of a current block specifies a partial sample unit, an interpolation process may be performed, and thereby, prediction samples of a current block may be derived in units of partial samples within a reference picture based on reference samples. When affine inter prediction is applied to a current block, prediction samples may be generated based on sample / sub-block units MV. When bi-prediction is applied, prediction samples derived by a weighted sum or weighted average (according to a phase) of prediction samples derived based on L0 prediction (i.e., prediction using MVL0 and a reference picture within a reference picture list L0) and prediction samples derived based on L1 prediction (i.e., prediction using MLV1 and a reference picture within a reference picture list L1) may be used as prediction samples of a current block. When bi-prediction is applied and a reference picture for L0 prediction and a reference picture for L1 prediction are located in different temporal directions relative to a current picture (i.e., if it corresponds to bi-prediction and bi-directional prediction), this may be referred to as true bi-prediction.
[0228] In the image decoding device, reconstructed samples and reconstructed pictures can be generated based on the derived prediction samples, and then an in-loop filtering process can be performed. In addition, in the image encoding device, residual samples can be derived based on the derived prediction samples, and encoding of image information including prediction information and residual information can be performed.
[0229] Bi-prediction with CU-level weights (BCW)
[0230] When bi-prediction is applied to the current block as described above, the prediction sample can be derived based on weighted averaging. Conventionally, the bi-prediction signal (i.e., bi-prediction sample) can be derived by a simple average of the L0 prediction signal (L0 prediction sample) and the L1 prediction signal (L1 prediction sample). That is, the bi-prediction sample is derived by averaging the L0 prediction sample based on the L0 reference picture and MVL0 and the L1 prediction sample based on the L1 reference picture and MVL1. However, according to the present disclosure, when bi-prediction is applied, the bi-prediction signal (bi-prediction sample) can be derived by a weighted average of the L0 prediction signal and the L1 prediction signal as follows.
[0231] [Formula 3]
[0232] P bi-pred =(((8-w)*P 0 +w*P 1 +4)>>3
[0233] In the above formula 3, P bi-pred represents the bi-prediction signal (bi-prediction block) derived by weighted averaging, P 0 and P 1 denote L0 prediction samples (L0 prediction blocks) and L1 prediction samples (L1 prediction blocks). In addition, (8-w) and w denote the samples applied to P 0 and P 1 The weight of .
[0234] When generating a dual prediction signal by weighted averaging, five weights may be allowed. For example, the weight w may be selected from {-2, 3, 4, 5, 10}. For each dual prediction CU, the weight w may be determined by one of two methods. As the first of the two methods, when the current CU is not in merge mode (non-merged CU), the weight index may be signaled together with the motion vector difference. For example, the bitstream may include information about the weight index after the information about the motion vector difference. As the second of the two methods, when the current CU is in merge mode (merged CU), the weight index may be derived from the neighboring block based on the merge candidate index (merged index).
[0235] The generation of a dual prediction signal by weighted averaging can be limited to be applied only to CUs having a size including 256 or more samples (luminance component samples). That is, dual prediction by weighted averaging can be performed only for CUs whose product of the width and height of the current block is 256 or more. In addition, the weight w can be used as one of the five weights as described above, and one of a different number of weights can be used. For example, depending on the characteristics of the current image, five weights can be used for low-delay pictures and three weights can be used for non-low-delay pictures. In this case, the three weights can be {3, 4, 5}.
[0236] By applying a fast search algorithm, the image encoding device can determine the weight index without significantly increasing the complexity. In this case, the fast search algorithm can be summarized as follows. 0 and P 1 The weights of P are not equal. In addition, equal weighting can mean applying 0 and P 1 The weights can be equal.
[0237] - In the case where the AMVR mode in which the resolution of the motion vector is adaptively changed is applied together, when the current picture is a low-delay picture, unequal weights may be conditionally checked only for each of the 1-pel motion vector resolution and the 4-pel motion vector resolution.
[0238] - In a case where the affine mode is applied together and the affine mode is selected as the optimal mode for the current block, the image encoding apparatus may perform affine motion estimation (ME) for respective unequal weights.
[0239] - Unequal weights may only be checked conditionally when the two reference pictures used for bi-prediction are equal.
[0240] - When the predetermined condition is met, the unequal weight may not be checked. The predetermined picture may be based on the POC distance between the current picture and the reference picture, the quantization parameter (QP), the temporal level, etc.
[0241] The weight index of the BCW can be encoded using one context coding bin and one or more subsequent bypass coding bins. The first context coding bin specifies whether equal weights are used. When unequal weights are used, additional bins can be bypass coded and signaled. Additional bins can be signaled to specify which weights to use.
[0242] Weighted prediction (WP) is a tool for efficiently encoding images including faded images. According to weighted prediction, weighting parameters (weights and offsets) can be signaled for each reference picture included in each of the reference picture lists L0 and L1. Then, when motion compensation is performed, the weights and offsets can be applied to the corresponding reference pictures. Weighted prediction and BCW can be used for different types of images. In order to avoid interaction between weighted prediction and BCW, the BCW weight index may not be signaled for a CU using weighted prediction. In this case, the weight may be inferred to be 4. That is, equal weights may be applied.
[0243] In the case of a CU to which merge mode is applied, a weight index can be inferred from neighboring blocks based on a merge candidate index. This can be applied to both general merge mode and inherited affine merge mode.
[0244] In the case of constructing an affine merge mode, affine motion information can be configured based on motion information of up to three blocks. The BCW weight index of a CU using the constructed affine merge mode can be set to the BCW weight index of the first CP in the combination. That is, BCW may not be applied to a CU encoded in CIIP mode. For example, the BCW weight index of a CU encoded in CIIP mode can be set to a value specifying equal weights.
[0245] Bidirectional Optical Flow (BDOF)
[0246] According to the present disclosure, BDOF can be used to refine the dual prediction signal. When dual prediction is applied to the current block (e.g., CU), BDOF generates prediction samples by calculating the refined motion information. Therefore, the process of calculating the refined motion information by applying BDOF can be included in the above-mentioned motion information derivation step.
[0247] For example, BDOF may be applied at a 4×4 sub-block level. That is, BDOF may be performed in units of 4×4 sub-blocks within the current block.
[0248] For example, BODF may be applied to a CU that satisfies at least one or all of the following conditions.
[0249] - The CU is encoded in true bi-prediction mode, that is, one of the two reference pictures precedes the current picture in display order, and the other follows the current picture in display order
[0250] -CU is not in affine mode or ATMVP merge mode
[0251] -CU has more than 64 luma samples
[0252] -CU height and width is 8 or more luma samples
[0253] -BCW weight index specifies equal weighting, i.e., equal weighting is applied to L0 prediction samples and L1 prediction samples
[0254] - Weighted prediction (WP) is not applied to the current CU
[0255] -CIIP mode is used for the current CU
[0256] In addition, BDOF may be applied only to the luma component. However, the present disclosure is not limited thereto, and BDOF may be applied to the chroma component or both the luma component and the chroma component.
[0257] The BDOF mode is based on the concept of optical flow. That is, it is assumed that the motion of the object is smooth. When BDOF is applied, for each 4×4 sub-block, the motion refinement (v x ,v y ). Motion refinement can be calculated by minimizing the difference between L0 prediction samples and L1 prediction samples. Motion refinement can be used to adjust the bi-prediction sample values within the 4×4 sub-block.
[0258] Hereinafter, the process of performing BDOF will be described in more detail.
[0259] First, the horizontal gradient of the two prediction signals can be calculated and vertical gradient In this case, k can be 0 or 1. The gradient can be calculated by directly calculating the difference between two adjacent samples. For example, the gradient can be calculated as follows.
[0260] [Formula 4]
[0261]
[0262] In the above formula 4, I (k) (i, j) represents the sample value of the coordinate (i, j) of the prediction signal in list k (k = 0, 1). (0) (i, j) can represent the sample value at position (i, j) in the L0 prediction block, I (1) (i, j) may represent a sample value at position (i, j) in the L1 prediction block. In the above formula 4, the first shift shift1 may be determined based on the bit depth of the luma component. For example, when the bit depth of the luma component is bitDepth, shift1 may be determined as max(6, bitDepth-6).
[0263] As mentioned above, after calculating the gradients, the autocorrelation and cross-correlation S between the gradients 1 , S 2 , S 3 , S 5 and S 6 It can be calculated as follows.
[0264] [Formula 5]
[0265] S 1 =∑ (i,j)∈Ω Abs(ψ x (i,j)), S 3 =∑ (i,j)∈Ω θ(i,j)·Sign(ψ x (i,j))
[0266]
[0267] in
[0268]
[0269] θ(i,j)=(I (1) (i,j)>>n b )-(I (0) (ij,j)>>n b )
[0270] where Ω is a 6×6 window around the 4×4 sub-block.
[0271] In the above formula 5, n a and n b Can be set to min(1, bitDepth-11) and min(4, bitDepth-8) respectively.
[0272] Motion refinement (v x ,v y ) can be derived as follows using the above autocorrelation and cross-correlation between gradients.
[0273] [Formula 6]
[0274]
[0275] in S_(2,s)=S_2&(2^(n_(S_2))-1), th′ BIO =2 13-BD .and It is the floor function.
[0276] In the above formula 6, n S2 It can be 12. Based on the derived motion refinement and gradient, the following adjustments can be performed for each sample in the 4×4 sub-block.
[0277] [Formula 7]
[0278]
[0279] Finally, the prediction sample pred of the CU to which BDOF is applied can be calculated by adjusting the bi-prediction sample of the CU as follows: BDOF .
[0280] [Formula 8]
[0281] pred BDOF (x,y)=(I (0) (x,y)+I (1) (x,y)+b(x,y)+o offset )>>shift
[0282] In the above formula, n a 、n b and n S2 They can be 3, 6 and 12 respectively. These values can be selected so that the multiplier does not exceed 15 bits and the bit width of the intermediate parameters is maintained within 32 bits in the BDOF process.
[0283] In order to derive the gradient value, the prediction samples I in the list k (k = 0, 1) that exist outside the current CU can be generated (k) (i,j). Fig.17 is a view illustrating a CU extended to perform BDOF.
[0284] like Fig.17 As shown, to perform BDOF, rows / columns that extend around the boundary of the CU can be used. In order to control the computational complexity of generating prediction samples outside the boundary, the extended area ( Fig.17 The predicted samples in the white area in CU ( Fig.17 Prediction samples in the extended position (gray area in the ) can be generated using a normal 8-tap motion compensated interpolation filter. Sample values at the extended position can be used only for gradient calculations. When sample values and / or gradient values outside the CU boundary are needed to perform the remaining steps of the BDOF process, the nearest neighboring sample values and / or gradient values can be padded (repeated) and used.
[0285] When the width and / or height of a CU is greater than 16 luma samples, the corresponding CU may be divided into sub-blocks having a width and / or height of 16 luma samples. The boundaries of the sub-blocks may be processed in the same manner as the above-mentioned CU boundaries in BDOF processing. The maximum unit size for performing BDOF processing may be limited to 16×16.
[0286] For each sub-block, it can be determined whether to perform BDOF. That is, BDOF processing for each sub-block can be skipped. For example, when the SAD value between the initial L0 prediction sample and the initial L1 prediction sample is less than a predetermined threshold, the BDOF processing may not be applied to the corresponding sub-block. In this case, when the width and height of the corresponding sub-block are W and H, the predetermined threshold may be set to (8*W*(H>>1). Considering the complexity of the additional SAD calculation, the SAD between the initial L0 prediction sample and the initial L1 prediction sample calculated in the DMVR process may be reused.
[0287] When BCW is available for the current block, for example, when the BCW weight index specifies unequal weights, BDOF may not be applied. Similarly, when WP is available for the current block, for example, when luma_weight_lx_flag of at least one of the two reference pictures is 1, BDOF may not be applied. In this case, luma_weight_lx_flag may be information specifying whether a weighting factor of WP for a luminance component for lx prediction (x is 0 or 1) is present in the bitstream or information specifying whether WP is applied to a luminance component for lx prediction. BDOF may not be applied when the CU is encoded in symmetric MVD (SMVD) mode or CIIP mode.
[0288] Optical flow prediction refinement (PROF)
[0289] Hereinafter, a method for refining a sub-block based affine motion compensation prediction block by applying optical flow will be described. The prediction samples generated by performing sub-block based affine motion compensation can be refined based on the difference derived from the optical flow equation. The refinement of these prediction samples may be referred to as optical flow prediction refinement (PROF) in the present disclosure. Through PROF, inter-frame prediction at pixel level granularity can be achieved without increasing the bandwidth of memory access.
[0290] The parameters of the affine motion model can be used to derive motion vectors for each pixel in the CU. However, since pixel-based affine motion compensation prediction results in high complexity and an increase in memory access bandwidth, sub-block-based affine motion compensation prediction can be performed. When performing sub-block-based affine motion compensation prediction, the CU can be divided into 4×4 sub-blocks, and motion vectors can be determined for each sub-block. In this case, the motion vectors of each sub-block can be derived from the CPMV of the CU. Sub-block-based affine motion compensation has a trade-off relationship between coding efficiency and complexity and memory access bandwidth. Since motion vectors are derived in sub-block units, complexity and memory access bandwidth are reduced, but prediction accuracy is reduced.
[0291] Therefore, motion compensation of refined granularity can be achieved through refinement by applying optical flow to sub-block based affine motion compensation prediction.
[0292] As described above, the luma prediction samples can be refined by adding the difference derived from the optical flow equation after performing sub-block based affine motion compensation. More specifically, PROF can be performed in the following four steps.
[0293] Step 1) Generate a predicted sub-block I(i, j) by performing sub-block based affine motion compensation.
[0294] Step 2) Calculate the spatial gradient g of the prediction sub-block at each sample position x (i,j) and g y (i, j). In this case, a 3-tap filter may be used, and the filter coefficients may be [-1, 0, 1]. For example, the spatial gradient may be calculated as follows.
[0295] [Formula 9]
[0296] g x (i,j)=I(i+1,j)-I(i-1,j)
[0297] g y (i,j)=I(i,j+1)-I(i,j-1)
[0298] To calculate the gradient, the prediction subblock can be extended by one pixel on each side. In this case, to reduce memory bandwidth and complexity, the pixels of the extended boundary can be copied from the nearest integer number of pixels in the reference picture. Therefore, additional interpolation of the padded area can be skipped.
[0299] Step 3) The brightness prediction refinement (ΔI(i,j)) can be calculated by the optical flow equation. For example, the following formula can be used.
[0300] [Formula 10]
[0301] ΔI(i,j)=g x (i,j)*Δv x (i,j)+g y (i,j)*Δv y (i,j)
[0302] In the above formula, Δv(i,j) represents the difference between the pixel motion vector (pixel MV, v(i,j)) calculated at the sample position (i,j) and the sub-block MV of the sub-block to which the sample (i,j) belongs.
[0303] Fig.18 is a view illustrating the relationship between Δv(i,j), v(i,j), and a sub-block motion vector.
[0304] exist Fig.18In the example shown, for example, the motion vector v(i, j) at the upper left sample position of the current sub-block is equal to the motion vector v of the current sub-block. SB The difference between φ(i,j) and φ(j) may be represented by a thick dashed arrow, and the vector represented by the thick dashed arrow may correspond to Δv(i,j).
[0305] The affine model parameters and pixel position from the center of the sub-block do not change. Therefore, Δv(i,j) can be calculated only for the first sub-block and can be reused for other sub-blocks in the same CU. Assuming that the horizontal offset and vertical offset from the pixel position to the center of the sub-block are x and y respectively, Δv(x,y) can be derived as follows.
[0306] [Formula 11]
[0307]
[0308] For the 4-parameter affine model,
[0309]
[0310] For the 6-parameter affine model,
[0311]
[0312] In the above text, (v 0x ,v 0y )、(v 1x ,v 1y ) and (v 2x ,v 2y ) correspond to the upper-left CPMV, upper-right CPMV and lower-left CPMV respectively, and w and h represent the width and height of the CU respectively.
[0313] Step 4) Finally, the final prediction block I'(i,j) can be generated based on the calculated luma prediction refinement ΔI(i,j) and the prediction sub-block I(i,j). For example, the final prediction block I' can be generated as follows.
[0314] [Formula 12]
[0315] I′(i,j)=I(i,j)+ΔI(i,j)
[0316] Overview of sub-screens
[0317] As described above, quantization and dequantization of the luminance component and the chrominance component may be performed based on the quantization parameter. In addition, one picture to be encoded may be divided into units of a plurality of CTUs, slices, tiles, or tiles, and further, the picture may be divided into units of a plurality of sub-pictures.
[0318] Within a picture, a sub-picture can be encoded or decoded regardless of whether the previous sub-picture is encoded or decoded. For example, different quantization or different resolutions can be applied to multiple sub-pictures.
[0319] Furthermore, sub-pictures can be treated like separate pictures. For example, the picture to be encoded can be a projected picture or a packed picture in a 360-degree image / video or an omnidirectional image / video.
[0320] In this embodiment, a portion of the screen may be rendered or displayed based on a viewport of a user terminal (e.g., a head mounted display). Therefore, in order to achieve low latency, at least one sub-screen covering the viewport among the sub-screens of a screen may be encoded or decoded preferentially or independently of the remaining sub-screens.
[0321] The encoding result of the sub-picture may be referred to as a sub-bitstream, a sub-stream, or simply a bitstream. A decoding device may decode the sub-picture from the sub-bitstream, the sub-stream, or the bitstream. In this case, a high-level syntax (HLS) such as PPS, SPS, VPS, and / or DPS (decoding parameter set) may be used to encode / decode the sub-picture.
[0322] In the present disclosure, the high-level syntax (HLS) may include at least one of the APS syntax, the PPS syntax, the SPS syntax, the VPS syntax, the DPS syntax, or the slice header syntax. For example, the APS (APS syntax) or the PPS (PPS syntax) may include information / parameters that are commonly applicable to one or more slices or pictures. The SPS (SPS syntax) may include information / parameters that are commonly applicable to one or more sequences. The VPS (VPS syntax) may include information / parameters that are commonly applicable to multiple layers. The DPS (DPS syntax) may include information / parameters that are commonly applicable to the entire video. For example, the DPS may include information / parameters related to the concatenation of a coded video sequence (CVS).
[0323] Definition of sprite
[0324] A sub-picture can construct a rectangular area of a coded picture. The size of a sub-picture can be set differently within the picture. For all pictures belonging to a sequence, the size and position of a specific individual sub-picture can be set equally. Separate sub-picture sequences can be decoded independently. Blocks and slices (and CTBs) can be restricted to not cross sub-picture boundaries. To this end, the encoding device can perform encoding so that the sub-pictures are decoded independently. To this end, semantic constraints in the bitstream may be required. In addition, for each picture in a sequence, the arrangement of blocks, slices, and tiles in the sub-picture can be constructed differently.
[0325] Sub-screen design purpose
[0326] The sub-picture design is intended to be an abstraction or encapsulation of a range smaller than the picture level or larger than the slice or tile group level. Therefore, the VCL NAL unit of the motion constant tile set (MCTS) subset can be extracted from one VVC bitstream and redirected to another VVC bitstream without difficulties such as modifications at the VCL level. Here, MCTS is a coding technique that allows spatial and temporal independence between tiles. When MCTS is applied, it is impossible to refer to information about tiles that are not included in the MCTS to which the current tile belongs. When an image is divided into MCTS and encoded, independent transmission and decoding of the MCTS can be performed.
[0327] The advantage of this sprite design is that it changes the viewing direction in a mixed-resolution viewport-dependent 360° streaming scheme.
[0328] Subscreen usage
[0329] The use of sub-pictures is required in viewport-dependent 360° schemes that provide extended real space resolution over the viewport. For example, schemes in tiles covering the viewport derived from 6K (6144×3072) ERP (equirectangular projection) pictures or cubemap projection (CMP) resolutions with equivalent 4K decoding performance (HEVC level 5.1) are included in sections D.6.3 and D.6.4 of OMAF and adopted in the VR Industry Forum Guidelines. Such resolutions are known to be suitable for head mounted displays using quad HD (2560×1440) display panels.
[0330] Coding: Content can be encoded with two spatial resolutions including a resolution with a cube face size of 1656×1536 and a resolution with a cube face size of 768×768. In both bitstreams, a 6×4 tile grid can be used and MCTS can be encoded at each tile position.
[0331] Streaming MCTS selection: 12 MCTS can be selected from the high-resolution bitstream, and 12 additional MCTS can be obtained from the low-resolution bitstream. Therefore, a hemisphere (180°×180°) of streaming content can be generated from the high-resolution bitstream.
[0332] Merged decoding using MCTS and bitstream: Receive MCTS of a single time instance, which can be merged into a coded picture with a resolution of 1920×4608 compliant with HEVC level 5.1. In another option of merging the picture, four tile columns have a width value of 768, two tile columns have a width value of 384, and three tile rows have a height value of 768, thereby constructing a picture consisting of 3840×2304 luma samples. Here, the width and height units can be units of the number of luma samples.
[0333] Sub-picture signaling
[0334] You can Fig.19 It is shown that the signaling of sub-pictures is performed at the SPS level. Fig.19 The syntax for signaling sub-picture syntax elements in SPS is shown below. Fig.19 The syntax elements of .
[0335] The syntax element pic_width_max_in_luma_samples may specify the maximum width of each decoded picture in units of luma samples with reference to the SPS. The value of pic_width_max_in_luma_samples is greater than 0 and may have a value that is an integer multiple of andMinCbSizeY. Here, MinCbSizeY is a variable that specifies the minimum size of a luma component coding block.
[0336] The syntax element pic_height_max_in_luma_samples may specify the maximum height of each decoded picture in units of luma samples with reference to the SPS. pic_height_max_in_luma_samples is greater than 0 and may have a value that is an integer multiple of MinCbSizeY.
[0337] The syntax element subpic_grid_col_width_minus1 may be used to specify the width of each element of the sub-picture identifier grid. For example, subpic_grid_col_width_minus1 may specify the width of each element of the sub-picture identifier grid in units of 4 samples, and the value obtained by adding 1 to subpic_grid_col_width_minus1 may specify the width of each element of the sub-picture identifier grid in units of 4 samples. The length of the syntax element may be Ceil(Log2(pic_width_max_in_luma_samples / 4)) bits in length.
[0338] Therefore, the variable NumSubPicGridCols, which specifies the number of columns in the sub-picture grid, can be derived as follows.
[0339] NumSubPicGridCols=(pic_width_max_in_luma_samples+subpic_grid_col_width_minus1*4+3) / (subpic_grid_col_width_minus1*4+4)
[0340] The syntax element subpic_grid_row_height_minus1 may be used to specify the height of each element of the sub-picture identifier grid. For example, subpic_grid_row_height_minus1 may specify the height of each element of the sub-picture identifier grid in units of 4 samples. The value obtained by adding 1 to subpic_grid_row_height_minus1 may specify the height of each element of the sub-picture identifier grid in units of 4 samples. The length of the syntax element may be Ceil(Log2(pic_height_max_in_luma_samples / 4)) bits in length.
[0341] Therefore, the variable NumSubPicGridRows, which specifies the number of rows in the sub-picture grid, can be derived as follows.
[0342] NumSubPicGridRows=(pic_height_max_in_luma_samples+subpic_grid_row_height_minus1*4+3) / (subpic_grid_row_height_minus1*4+4)
[0343] The syntax element subpic_grid_idx[i][j] may specify the subpicture index of the grid position (i, j). The length of the syntax element may be Ceil(Log2(max_subpics_minus1+1)) bits.
[0344] The variables SubPicTop[subpic_grid_idx[i][j]], SubPicLeft[subpic_grid_idx[i][j]], SubPicWidth[subpic_grid_idx[i][j]], SubPicHeight[subpic_grid_idx[i][j]] and NumSubPics can be as follows Fig. 20 The algorithm is derived as in .
[0345] The syntax element subpic_treated_as_pic_flag[i] may specify whether a sub-picture is treated as the same as a normal picture in a decoding process other than an in-loop filtering process. For example, a first value (e.g., 0) of subpic_treated_as_pic_flag[i] may specify that the i-th sub-picture of each coded picture in the CVS is not treated as a picture in a decoding process other than an in-loop filtering process. A second value (e.g., 1) of subpic_treated_as_pic_flag[i] may specify that the i-th sub-picture of each coded picture in the CVS is treated as a picture in a decoding process other than an in-loop filtering process. When the value of subpic_treated_as_pic_flag[i] is not obtained from the bitstream, the value of subpic_treated_as_pic_flag[i] may be derived as a first value (e.g., 0).
[0346] The syntax element loop_filter_across_subpic_enabled_flag[i] may specify whether in-loop filtering is performed across the boundary of the i-th sub-picture of each coded picture belonging to the CVS. For example, a first value (e.g., 0) of loop_filter_across_subpic_enabled_flag[i] may specify that in-loop filtering is not performed across the boundary of the i-th sub-picture of each coded picture belonging to the CVS. A second value (e.g., 1) of loop_filter_across_subpic_enabled_flag[i] may specify that in-loop filtering may be performed across the boundary of the i-th sub-picture of each coded picture belonging to the CVS. When the value of loop_filter_across_subpic_enabled_flag[i] is not obtained from the bitstream, the value of loop_filter_across_subpic_enabled_flag[i] may be derived as the second value.
[0347] In addition, for bitstream consistency, the following constraints may be applied. For any two sub-pictures subpicA and subpicB, when the index of subpicA is less than the index of subpicB, all coded NAL units of subpicA may have a lower decoding order than all coded NAL units of subpicB. Alternatively, after decoding is performed, the shape of the sub-picture needs to have a perfect left boundary and a perfect top boundary that construct the picture boundary or the boundary of a previously decoded sub-picture.
[0348] Overview of sub-picture based encoding and decoding
[0349] The following disclosure relates to the encoding / decoding of the above-mentioned pictures and / or sub-pictures. The encoding device may encode the current picture based on the sub-picture structure. Alternatively, the encoding device may encode at least one sub-picture that constructs the current picture and output a (sub) bitstream including (encoding) information about at least one (encoded) sub-picture.
[0350] The decoding apparatus may decode at least a sub-picture belonging to a current picture based on a (sub-)bitstream including (encoding) information on at least one sub-picture.
[0351] Fig.21 It is a view illustrating a method for encoding an image using a sub-picture by an encoding device according to an embodiment. The encoding device may divide an input picture into a plurality of sub-pictures (S2110). The encoding device may encode at least one sub-picture using information about the sub-picture (S2120). For example, each sub-picture may be independently separated and encoded using information about the sub-picture. Next, the encoding device may output a bitstream by encoding image information including information about the sub-picture (S2130). Here, the bitstream of the sub-picture may be referred to as a substream or a sub-bitstream.
[0352] The information about the sub-picture will be described variously in the present disclosure, for example, there may be information about whether in-loop filtering can be performed across the boundary of the sub-picture, information about the sub-picture area, information about the grid spacing using the sub-picture, etc.
[0353] Fig. 22 22 is a view illustrating a method for decoding an image using a sub-picture by a decoding device according to an embodiment. The decoding device may obtain information about a sub-picture from a bit stream (S2210). Next, the decoding device may derive at least one sub-picture (S2220) and decode at least one sub-picture (S2230).
[0354] In this way, the decoding device may decode at least one sub-picture, thereby outputting at least one decoded sub-picture or a current picture including at least one sub-picture. The bitstream may include a sub-stream or a sub-bitstream of the sub-picture.
[0355] As described above, information about the sub-picture can be constructed in the HLS of the bitstream. The decoding device can derive at least one sub-picture based on the information about the sub-picture. The decoding device can decode the sub-picture based on the CABAC method, the prediction method, the residual processing method (transformation, quantization), the in-loop filtering method, etc.
[0356] When outputting the decoded sub-pictures, the decoded sub-pictures may be output together in the form of an OPS (output sub-picture set). For example, when the current picture is related to a 360° or omnidirectional image / video and is partially rendered, only some sub-pictures may be decoded, and some or all decoded sub-pictures may be rendered according to the user's viewport.
[0357] When the information specifying whether in-loop filtering across a sub-picture boundary is available specifies availability, the decoding device may perform in-loop filtering (e.g., deblocking filter) on a sub-picture boundary located between two sub-pictures. In addition, when the sub-picture boundary is equal to the picture boundary, in-loop filtering processing on the sub-picture boundary may not be applied.
[0358] The present disclosure relates to sub-picture based encoding / decoding. Hereinafter, BDOF and PROF to which embodiments of the present disclosure are applicable will be described in more detail.
[0359] As described above, by applying BDOF in the inter-frame prediction process to refine the reference sample in the motion compensation process, the compression performance of the image can be increased. BDOF can be performed in the normal mode. That is, BDOF is not performed in the case of the affine mode, GPM mode or CIIP mode.
[0360] Fig.23 is a view illustrating a process of deriving a prediction sample of a current block by applying BDOF.
[0361] Fig.23 The BDOF-based inter-frame prediction process can be performed by an image encoding device and an image decoding device.
[0362] First, in step S2310, the motion information of the current block may be derived. The motion information of the current block may be derived by various methods described in the present disclosure. For example, the motion information of the current block may be derived by a conventional merge mode, an MMVD mode, or an AMVP mode. The motion information may include dual-prediction motion information (L0 motion information and L1 motion information). For example, the L0 motion information may include MVL0 (L0 motion vector) and refIdxL0 (L0 reference picture index), and the L1 motion information may include MVL1 (L1 motion vector) and refIdxL1 (L1 reference picture index).
[0363] Thereafter, the prediction sample of the current block may be derived based on the derived motion information of the current block (S2320). Specifically, the L0 prediction sample of the current block may be derived based on the L0 motion information. In addition, the L1 prediction sample of the current block may be derived based on the L1 motion information.
[0364] Thereafter, a BDOF offset may be derived based on the derived prediction samples (S2330). The BDOF of step S2330 may be performed according to the method described in the present disclosure. For example, the BDOF offset may be derived based on the gradient (based on the phase) of the L0 prediction samples and the gradient (based on the phase) of the L1 prediction samples.
[0365] Thereafter, based on the LX (X=0 or 1) prediction samples and the BDOF offset, a refined prediction sample of the current block may be derived (S2340). The refined prediction sample may be used to generate a final prediction block of the current block.
[0366] The image encoding device can be based on Fig.23 The predicted sample of the current block generated by the method is used to derive the residual sample by comparing it with the original sample. As described above, the information about the residual sample (residual information) can be included in the image / video information and encoded and output in the form of a bit stream. In addition, as described above, the image decoding device can be based on Fig.23 The reconstructed current block is generated by using the prediction samples of the current block generated by the method and the residual samples obtained based on the residual information in the bitstream.
[0367] Fig.24 is a view illustrating input and output of a BDOF process according to an embodiment of the present disclosure.
[0368] like Fig.24 As shown, the input of the BDOF process may include the width nCbW and height CbH of the current block, the predicted sub-blocks predSamplesL0 and predSamplesL1 of the boundary area extension predetermined length (e.g., 2), the prediction direction indexes predFlagL0 and predFlagL1, and the reference picture indexes refIdxL0 and refIdxL1. In addition, the input of the BDOF process may also include a BDOF utilization flag bdofUtilizationFlag. In this case, the BDOF utilization flag may be an input that specifies whether BDOF is applied to the corresponding sub-block in units of sub-blocks within the current block.
[0369] In addition, the BDOF process may generate a refined prediction block pbSamples by applying BDOF based on input information.
[0370] Fig.25 is a view illustrating variables used for BDOF processing according to an embodiment of the present disclosure. Fig.25 Can be Fig.24 After processing.
[0371] like Fig.25As shown, in order to perform BDOF processing, the input bit depth bitDepth of the current block can be set to BitDepth Y In this case, BitDepth Y It can be derived based on information about the bit depth signaled by the bitstream. In addition, various right shifts can be set based on the bit depth. For example, the first shift shift1, the second shift shift2, the third shift shift3 and the fourth shift shift4 can be as follows Fig.24 The variable mvRefineThres used to specify the clipping range of motion refinement can be set based on the bit depth. Fig.24 The purpose of the various variables described in .
[0372] Fig.26 is a view illustrating a method of generating prediction samples of each subblock in a current CU based on whether BDOF is applied according to an embodiment of the present disclosure. Fig.26 Can be Fig.25 After processing.
[0373] Can be performed on each sub-block in the current CU Fig.26 The process shown in FIG. 1 is performed, and in this case, the size of the subblock may be 4×4. When the BDOF utilization flag bdofUtilizationFlag of the current subblock is the first value (false, “0”), BDOF may not be applied to the current subblock. In this case, the prediction sample of the current subblock is derived by the weighted sum of the L0 prediction sample and the L1 prediction sample, and in this case, the weight applied to the L0 prediction sample and the weight applied to the L1 prediction sample may be the same. Fig.26 The shift4 and offset4 used in formula (1) can be Fig.17 When the BDOF utilization flag bdofUtilizationFlag of the current sub-block is the second value (true, "1"), BDOF may be applied to the current sub-block. In this case, the prediction sample of the current sub-block may be generated by the BDOF process according to the present disclosure.
[0374] Fig. 27 is a view illustrating a method of deriving a gradient, an autocorrelation, and a cross-correlation of a current sub-block according to an embodiment of the present disclosure. Fig. 27 Can be Fig.26 After processing.
[0375] Execute for each sub-block in the current CU Fig. 27 The process shown, and in this case, the size of the sub-block can be 4×4.
[0376] according to Fig. 27 According to equations (1) and (2), the position (h) of each sample position (x, y) in the current sub-block can be derived x ,h y ). Thereafter, the horizontal gradient and the vertical gradient of each sample position can be derived according to equations (3) to (6). Thereafter, the variables (the first intermediate parameter diff and the second intermediate parameters tempH and tempV) for deriving autocorrelation and cross-correlation can be derived according to equations (7) to (9). For example, the first intermediate parameter diff can be derived using the value obtained by applying the right shift second shift shift2 to the prediction samples predSamplesL0 and predSamplesL1 of the current block. For example, the second intermediate parameters tempH and tempV can be derived by applying the right shift third shift shift3 to the sum of the gradient in the L0 direction and the gradient in the L1 direction as in equations (8) and (9). Thereafter, the autocorrelation and cross-correlation can be derived based on the derived first intermediate parameter and the second intermediate parameter according to equations (10) to (16).
[0377] Fig.28 is an example of the derived motion refinement (v x ,v y ), a view of a method for deriving a BDOF offset and generating prediction samples for a current sub-block. Fig.28 Can be Fig. 27 After processing.
[0378] Execute for each sub-block in the current CU Fig.28 The process shown, and in this case, the size of the sub-block can be 4×4.
[0379] according to Fig.28 , we can derive the motion refinement (v) according to equations (1) and (2) x ,v y ). The motion refinement may be clipped within the range specified by mvRefineThres. In addition, based on the motion refinement and the gradient, the BDOF offset bdofOffset may be derived according to equation (3). The derived BDOF offset may be used to generate the prediction samples pbSamples of the current sub-block according to equation (4).
[0380] By continuously executing the reference Figure 24 to Figure 28 The method described above can realize the BDOF processing according to the first embodiment of the present disclosure. Figure 24 to Figure 28In the embodiment, the first shift shift1 is set to Max(6, bitDepth - 6), and mvRefineThres is set to 1 << Max(, bitDepth - 7). Therefore, the bit width of predSample and each parameter of BDOF according to BitDepth can be derived as shown in the following table.
[0381] [Table 1]
[0382]
[0383] As described above, by applying BDOF in the inter-frame prediction process to refine the reference sample in the motion compensation process, the compression performance of the image can be increased. BDOF can be executed in the normal mode. That is, BDOF is not executed in the case of the affine mode, the GPM mode, or the CIIP mode.
[0384] As a method similar to BDOF, PROF can be performed on the blocks encoded in the affine mode. As described above, by refining the reference sample in each 4×4 sub-block via PROF, the compression performance of the image can be increased.
[0385] According to the present disclosure, the above-described affine motion (sub-block motion) information of the current block can be derived, and the affine motion information can be refined by the above PROF process or the prediction sample derived based on the affine motion information can be refined.
[0386] Fig.29 is a view illustrating the process of deriving the prediction sample of the current block by applying PROF.
[0387] Fig.29 The PROF-based inter-frame prediction process can be executed by an image encoding device and an image decoding device.
[0388] First, in step S2910, the motion information of the current block can be derived. The motion information of the current block can be derived by various methods described in the present disclosure. For example, the motion information of the current block can be derived by the methods described in the above affine mode or the sub-block-based TMVP mode. The motion information may include the sub-block motion information of the current block. The sub-block motion information may include dual-prediction sub-block motion information (L0 sub-block motion information and L1 sub-block motion information). For example, the L0 sub-block motion information may include sbMVL0 (L0 sub-block motion vector) and refIdxL0 (L0 reference picture index), and the L1 sub-block motion information may include sbMVL1 (L1 sub-block motion vector) and refIdxL1 (L1 reference picture index).
[0389] Thereafter, the prediction samples of the current block may be derived based on the derived motion information of the current block (S2920). Specifically, the L0 prediction samples of each sub-block of the current block may be derived based on the L0 sub-block motion information. In addition, the L1 prediction samples of each sub-block of the current block may be derived based on the L1 sub-block motion information.
[0390] Thereafter, a PROF offset may be derived based on the derived prediction sample (S2930). The PROF of step S2930 may be performed according to the method described in the present disclosure. For example, a differential motion vector diffMv and a gradient of the LX (X=0 or 1) prediction sample may be calculated, and based on these, a PROF offset dI or ΔI may be derived according to the method described in the present disclosure. Various examples of the present disclosure relate to differential motion vector derivation, gradient derivation, and / or PROF offset derivation.
[0391] Thereafter, based on the LX (X=0 or 1) prediction samples and the PROF offset, a refined prediction sample of the current block may be derived (S2940). The refined prediction sample may be used to generate a final prediction block of the current block. For example, the final prediction block of the current block may be generated by weighted summing of the refined L0 prediction sample and the refined L1 prediction sample.
[0392] The image encoding device can be based on Fig.29 The predicted sample of the current block generated by the method is derived from the residual sample by comparison with the original sample. Information about the residual sample (residual information) may be included in the image / video information and encoded and output in the form of a bit stream as described above. In addition, the image decoding device may be based on the Fig.29 The reconstructed current block is generated by using the prediction samples of the current block generated by the method and the residual samples obtained based on the residual information in the bitstream.
[0393] Fig.30 is a view illustrating an example of PROF processing according to the present disclosure.
[0394] according to Fig.30 In the example of , the PROF process can be performed using the width sbWidth, height sbHeight, predicted sub-block predSamples of the boundary region extending the predetermined length borderExtention of the current sub-block, and the differential motion vector diffMv as inputs. In this case, for example, the predicted sub-block can be a predicted sub-block generated by performing affine motion compensation. As a result of performing the PROF process, a refined predicted sub-block pbSamples can be generated.
[0395] In order to perform PROF processing, a predetermined first shift shift1 may be calculated. The first shift may be based on the bit depth BitDepth of the luminance component.Y be derived. For example, the first shift can be derived as the maximum of 6 and (BitDepth Y - 6).
[0396] Thereafter, for each sample position (x, y) of the input prediction sub - block, the horizontal gradient gradientH,g x and the vertical gradient gradientV,g y can be calculated. The horizontal gradient and the vertical gradient can be calculated according to Fig.30 Equations (1) and (2) respectively.
[0397] Thereafter, based on the horizontal gradient, the vertical gradient, and the differential motion vector diffM v , the PROF offset dI or ΔI for each sample position can be calculated. For example, the PROF offset can be calculated according to Fig.30 Equation (3). In Equation (3), the differential motion vector diffM v used to calculate the PROF offset can mean Δv as described in Fig.18 . In this case, diffMv can be clipped as follows by dmvLimit, and dmvLimit can be calculated based on BitDepth Y as follows.
[0398] [Equation 13]
[0399] dmvLimit = 1 << Max(5, BitDepthY - 7),
[0400] diffMv[x][y][i] = Clip3(-dmvLimit, dmvLimit - 1, diffMv[x][y][i])
[0401] Thereafter, based on the calculated PROF offset and the prediction sub - block predSamples, the refined prediction sub - block pbsamples can be derived. For example, the refined prediction sub - block can be derived according to Fig.30 Equation (4).
[0402] According to Fig.30 the example, the first shift shift1) can be set to Max(6, bitDepth - 6), dmvLimit can be set to 1 << Max(5, bitDepth - 7). Additionally, diffMv can be clipped within the range of [-dmvLimit, dmvLimit - 1]. Therefore, the bit width of predSample and each parameter of the PROF according to BitDepth Y can be derived as shown in the following table.
[0403] [Table 2]
[0404]
[0405] The present disclosure may provide various implementations for the case where a sub-picture is treated as a picture (e.g., subpic_treated_as_pic_flag==1) when performing sub-picture-based encoding / decoding. For example, in BDOF or PROF processing, a reference sample extraction process may be constrained not to reference reference samples included in a sub-picture different from the sub-picture to which the current block belongs. In addition, in a temporal motion vector predictor derivation process, a bilinear interpolation process of luma samples, an 8-tap interpolation filter process of luma samples, and / or a chroma sample interpolation process, a constraint based on a sub-picture being treated as a picture may be added.
[0406] As described above, in the BDOF and / or PROF process, in order to calculate the gradient, reference samples extending a predetermined length around the boundary of the current block may be used. However, when the current sub-picture to which the current block belongs is regarded as a picture, the range of the reference samples used to calculate the gradient needs to be limited to the same sub-picture as the current sub-picture.
[0407] As described above, the prediction sample can be modified by bdofOffset in the case of BDOF and by dI in the case of PROF. bdofOffset and dI can be obtained based on gradients. The gradient can be derived based on the difference between reference samples in the reference picture. In order to derive the gradient, a reference sample extraction process of extracting reference samples from the reference picture and an 8-tap interpolation filtering process can be performed. The output of the reference sample extraction process can be a luminance sample at an integer pixel position.
[0408] Fig.31 is a view illustrating a case where a reference sample is to be extracted across a sub-picture boundary.
[0409] exist Fig.31 In the example, the region to be extracted in the reference picture (extraction region) can be specified according to the motion vector of the current block included in the current sub-picture [1] in the current picture. In this case, the extraction region may exist across the boundary of the sub-picture [1] in the reference picture. That is, the reference sample to be extracted may be included in a sub-picture different from the current sub-picture [1].
[0410] Fig.32 yes Fig.31 A magnified image of the extracted area.
[0411] like Fig.32As shown, the reference samples to be extracted may be included in sub-pictures (sub-picture [0], sub-picture [2], sub-picture [3]) different from the current sub-picture [1]. Consider Fig.32 In the case shown, when a sub-picture is regarded as a picture, the range of reference samples to be extracted needs to be restricted to the same sub-picture as the current sub-picture.
[0412] Fig.33 is a view illustrating a reference sample extraction process according to an embodiment of the present disclosure.
[0413] exist Fig.33 In the reference sample extraction process, information about the motion vector of the current block and the reference picture refPicLX can be input. L The information about the motion vector of the current block specifies the extraction area and may be an integer sample position (xInt) derived from the motion vector of the current block. L ,yInt L ).
[0414] Fig.33 The output of the reference sample extraction process may be a prediction block of the current block. In this case, the prediction block may be a prediction block to be refined by BDOF or PROF.
[0415] like Fig.33 As shown, it can be determined whether the current sub-picture is treated as a picture. For example, when subpic_treated_as_pic_flag is 1, it can be determined that the current sub-picture is treated as a picture and the extraction area can be limited to the same sub-picture as the current sub-picture.
[0416] When the current sub-screen is used as a screen, such as Fig.33 As shown in formula (1), the x-coordinate xInt specifying the position of the sample to be extracted can be limited to the range of [SubPicLeftBoundaryPos, SubPicRightBoundaryPos]. SubPicLeftBoundaryPos can specify the position of the left boundary of the current sub-picture. In addition, SubPicRightBoundaryPos can specify the position of the right boundary of the current sub-picture. According to the above formula (1), since the x-coordinate of the reference sample to be extracted exists in the range of SubPicLeftBoundaryPos to SubPicRightBoundaryPos, the reference sample located outside the left boundary or right boundary of the sub-picture is not extracted. The method of deriving SubPicLeftBoundaryPos and SubPicRightBoundaryPos will be described later.
[0417] Similarly, when the current sub-picture is regarded as a picture, such as Fig.33 As shown in formula (2), the y coordinate yInt of the position of the sample to be extracted can be limited to the range of [SubPicTopBoundaryPos, SubPicBotBoundaryPos]. SubPicTopBoundaryPos can specify the position of the upper boundary of the current sub-picture. In addition, SubPicBotBoundaryPos can specify the position of the lower boundary of the current sub-picture. According to the above formula (2), the y coordinate of the reference sample to be extracted exists in the range of SubPicTopBoundaryPos to SubPicBotBoundaryPos, and the reference samples outside the upper or lower boundary of the sub-picture are not extracted. The method of deriving SubPicTopBoundaryPos and SubPicBotBoundaryPos will be described later.
[0418] When the current sub-picture is not treated as a picture, for example, when subpic_treated_as_pic_flag is 0, the coordinates of the reference sample to be extracted can be derived according to equations (3) and (4). According to the above equations (3) and (4), the coordinates of the reference sample to be extracted are not clipped by the boundary position of the sub-picture. According to the above equations (3) and (4), the coordinates of the reference sample to be extracted can be clipped within the range of the current picture.
[0419] Thereafter, according to equation (5), extraction of reference samples from the reference picture may be performed based on the coordinates (xInt, yInt) of the reference samples to be extracted.
[0420] Fig.34 is a flowchart illustrating a reference sample extraction process according to the present disclosure.
[0421] Fig.33 and Fig.34 The reference sample extraction process may be performed by an image encoding device and an image decoding device for performing BDOF and / or PROF.
[0422] Reference Fig.34 First, it may be determined whether the current sub-picture is treated as a picture (S3410). The determination of step S3410 may be performed based on subpic_treated_as_pic_flag.
[0423] When the current sub-picture is treated as a picture (eg, subpic_treated_as_pic_flag==1), the extraction position may be derived (S3420), and the derived extraction position may be clipped (S3430). The derivation and clipping of the extraction position may be based on Fig.33The clipping of step S3430 may be a process of changing the corresponding extraction position to a position in the current sub-picture (eg, a boundary position of the current sub-picture) when the derived extraction position is outside the boundary of the current sub-picture.
[0424] When the current sub-picture is not treated as a picture (eg, subpic_treated_as_pic_flag==0), the extraction position may be derived (S3440). For example, the extraction position may be derived based on Fig.33 The formula (3) and formula (4) are used to execute.
[0425] Thereafter, reference sample extraction (S3450) may be performed based on the extraction position derived in step S3430 or step S3440. For example, reference sample extraction may be performed based on Fig.33 The formula (5) is used to execute.
[0426] according to Fig.34 In the illustrated embodiment, when a sub-picture is regarded as a picture, reference samples outside the boundary of the current sub-picture may not be extracted in the reference sample extraction process, that is, reference samples belonging to a sub-picture different from the current sub-picture in the reference picture may not be referenced.
[0427] Hereinafter, a fractional sample interpolation process according to another embodiment of the present disclosure will be described.
[0428] As described above, when the motion vector of the current block specifies a fractional sample unit, an interpolation process may be performed, and a prediction sample of the current block may be derived based on reference samples of the fractional sample unit in a reference picture accordingly.
[0429] Fig.35 is a view illustrating a portion of a fractional sample interpolation process according to the present disclosure.
[0430] In order to perform the fractional sample interpolation process, the variables fRefWidth and fRefHeight can be derived. Fig.35 As shown, fRefWidth and fRefHeight may be derived differently depending on whether the current sub-picture is treated as a picture (subpic_treated_as_pic_flag).
[0431] When the current sub-picture is treated as a picture, for example, when subpic_treated_as_pic_flag is 1, fRefWidth and fRefHeight can be derived as follows.
[0432] fRefWidth=(SubPicWidth[SubPicIdx]*(subpic_grid_col_width_minus1+1)*4)
[0433] fRefHeight=(SubPicHeight[SubPicIdx]*(subpic_grid_row_height_minus1+1)*4)
[0434] In the above, SubPicWidth[SubPicIdx] and SubPicHeight[SubPicIdx] may respectively mean the width and height of the current sub-picture. In this case, the width and height of the sub-picture may be represented by the number of grids configuring the sub-picture. For example, a sub-picture width of 4 may mean that the corresponding sub-picture includes four grids in the horizontal direction. In addition, subpic_grid_col_width_minus1 and subpic_grid_row_height_minus1 may respectively mean the width and height of the grid configuring the sub-picture. In this case, the width and height of the grid may be expressed in units of 4 pixels. For example, a grid width of 4 may mean that the width of the grid is 16 (4×4) pixels.
[0435] When the current sub-picture is not treated as a picture, for example, when subpic_treated_as_pic_flag is 0, fRefWidth and fRefHeight may be derived as the width PicOutputWidthL and height PicOutputHeightL of the output image of the reference picture, respectively.
[0436] The fRefWidth and fRefHeight derived as described above can be used according to Fig.35 The scaling factors hori_scale_fp and vert_scale_fp are derived from equations (1) and (2). Thereafter, according to equations (3) to (6), the position of the reference sample specified by the motion vector (refx L ,refy L Based on the derived position of the reference sample, the integer position (xInt L ,yInt L ) and fractional position (xFrac L ,yFrac L ). The above-mentioned reference sample extraction process or 8-tap interpolation filtering process can be performed based on the derived integer position and / or fractional position.
[0437] Hereinafter, a sbTMVP derivation method according to another embodiment of the present disclosure will be described.
[0438] As reference Fig.16 As described, motion shift can be derived and applied to the current block, thereby specifying the sub-blocks (col sub-blocks) in the col picture corresponding to the sub-blocks configuring the current block. Thereafter, using the motion information of the corresponding sub-blocks (col sub-blocks) of the col picture, the motion information of the sub-blocks of the current block can be derived. Based on the derived motion information of the sub-blocks, the sbTMVP can be derived.
[0439] Fig.36 is a view illustrating a portion of the sbTMVP derivation method according to the present disclosure.
[0440] Fig.36 FIG. 4 shows a portion of the process after the motion shift of the current block is derived during the sbTMVP derivation process. Specifically, Fig.36 The illustrated process includes a process of deriving the position of the corresponding col sub-block for each sub-block configuring the current block.
[0441] according to Fig.36 First, according to equations (1) and (2), the position (xSb, ySb) of the lower right center sample of the current sub-block can be derived. Thereafter, the position (xColSb, yColSb) of the col sub-block can be derived according to whether the current sub-picture is treated as a picture (e.g., subpic_treated_as_pic_flag).
[0442] Specifically, when subpic_treated_as_pic_flag is 1, the y coordinate yColSb of the col sub-block can be derived according to formula (3). In this case, yColSb derived from ySb and motion shift tempMv can be clipped to the position specified by SubPicTopBoundaryPos and SubPicBotBoundaryPos and the y coordinate yCtb of the current CTB. Through formula (3), the y coordinate of the col sub-block exists in the current CTB and the current sub-picture. In addition, when subpic_treated_as_pic_flag is 0, according to formula (4), the y coordinate yColSb of the col sub-block can be derived. In this case, yColSb derived from ySb and motion shift tempMv can be clipped to the position specified by the y coordinate yCtb of the current CTB and the height of the current picture. Through formula (4), the y coordinate of the col sub-block exists in the current CTB and the current picture.
[0443] Similarly, when subpic_treated_as_pic_flag is 1, according to formula (5), the x-coordinate xColSb of the col sub-block can be derived. In this case, xColSb derived from xSb and motion shift tempMv can be clipped to the position specified by SubPicLeftBoundaryPos and SubPicRightBoundaryPos and the x-coordinate xCtb of the current CTB. Through formula (5), the x-coordinate of the col sub-block exists in the current CTB and the current sub-picture. In addition, when subpic_treated_as_pic_flag is 0, according to formula (6), the x-coordinate yColSb of the col sub-block can be derived. In this case, xColSb derived from xSb and motion shift tempMv can be clipped to the position specified by the x-coordinate xCtb of the current CTB and the width of the current picture. Through formula (6), the x-coordinate of the col sub-block exists in the current CTB and the current picture.
[0444] According to the present disclosure, when the current sub-picture is regarded as a picture, the col sub-block of the current sub-block used to derive the sbTMVP exists in the same sub-picture as the current sub-picture.
[0445] Hereinafter, a sub-picture boundary position derivation method according to another embodiment of the present disclosure will be described.
[0446] Fig.37 is a view illustrating a method of deriving a sub-picture boundary position according to the present disclosure.
[0447] According to the present disclosure, the sub-picture left boundary position SubPicLeftBoundaryPos, the sub-picture right boundary position SubPicRightBoundaryPos, the sub-picture top boundary position SubPicTopBoundaryPos and the sub-picture bottom boundary position SubPicBotBoundaryPos can be derived. In the present disclosure, SubPicIdx can be an index for identifying each sub-picture in the current picture.
[0448] When the current sub-picture specified by SubPicIdx is regarded as a picture, SubPicLeftBoundaryPos can be derived based on the position information SubPicLeft of the predetermined unit specifying the left position of the current sub-picture and the width information subpic_grid_col_width_minus1 of the corresponding unit. The predetermined unit may be a grid. However, the present disclosure is not limited thereto, for example, the predetermined unit may be a CTU. When the predetermined unit is a CTU, the left position of the current sub-picture may be derived as the product of the position information of the CTU unit specifying the left position of the current sub-picture and the size of the CTU.
[0449] When the current sub-picture is regarded as a picture, SubPicRightBoundaryPos can be derived based on the position information of the predetermined unit specifying the left position of the current sub-picture, the width information of the predetermined unit specifying the width of the current sub-picture, and the width information of the corresponding unit. For example, the position information of the predetermined unit specifying the right position of the current sub-picture can be derived by adding the left position of the current sub-picture and the width of the current sub-picture. SubPicRightBoundaryPos can be derived by performing a "-1" operation on the final calculated value. The predetermined unit may be a grid. However, the present disclosure is not limited thereto, and for example, the predetermined unit may be a CTU. When the predetermined unit is a CTU, the right position of the current sub-picture can be derived by performing a "-1" operation on the product of the position information of the CTU unit specifying the right position of the current sub-picture and the size of the CTU. The position information of the CTU unit specifying the right position of the current sub-picture can be derived as the sum of the position information of the CTU unit specifying the left position of the current sub-picture and the width information of the CTU unit specifying the width of the current sub-picture.
[0450] Similarly, SubPicTopBoundaryPos may be derived based on the position information SubPicTop of the predetermined unit specifying the upper position of the current sub-picture and the height information subpic_grid_low_height_minus1 of the corresponding unit. The predetermined unit may be a grid. However, the present disclosure is not limited thereto, and for example, the predetermined unit may be a CTU. When the predetermined unit is a CTU, the upper position of the current sub-picture may be derived as the product of the position information of the CTU unit specifying the upper position of the current sub-picture and the size of the CTU.
[0451] When the current sub-picture is regarded as a picture, SubPicBotBoundaryPos can be derived based on the position information of the predetermined unit specifying the upper position of the current sub-picture, the height information of the predetermined position specifying the height of the current sub-picture, and the height of the corresponding unit. For example, the position information of the predetermined unit specifying the lower position of the current sub-picture can be derived by adding the upper position of the current sub-picture to the height of the current sub-picture. SubPicBotBoundaryPos can be derived by performing a "-1" operation on the final calculated value. The predetermined unit may be a grid. However, the present disclosure is not limited thereto, and for example, the predetermined unit may be a CTU. When the predetermined unit is a CTU, the lower position of the current sub-picture can be derived by performing a "-1" operation on the product of the position information of the CTU unit specifying the lower position of the current sub-picture and the size of the CTU. The position information of the CTU unit specifying the lower position of the current sub-picture can be derived as the sum of the position information of the CTU unit specifying the upper position of the current sub-picture and the height information of the CTU unit specifying the height of the current sub-picture.
[0452] The various embodiments described in the present disclosure may be implemented alone or in combination with other embodiments. Alternatively, some embodiments may be added to another embodiment, or some embodiments may be replaced with other embodiments.
[0453] Although for the sake of clarity of description, the exemplary method of the present disclosure described above is represented as a series of operations, it is not intended to limit the order of executing the steps, and these steps can be performed simultaneously or in different orders when necessary. In order to implement the method according to the present invention, the steps described may further include other steps, may include the remaining steps except some steps, or may include other additional steps except some steps.
[0454] In the present disclosure, an image encoding device or an image decoding device that performs a predetermined operation (step) may perform an operation (step) of confirming an execution condition or situation of the corresponding operation (step). For example, if it is described that a predetermined operation is performed when a predetermined condition is met, the image encoding device or the image decoding device may perform the predetermined operation after determining whether the predetermined condition is met.
[0455] The various embodiments of the present disclosure are not a list of all possible combinations and are intended to describe representative aspects of the present disclosure, and matters described in the various embodiments may be applied independently or in combination of two or more.
[0456] Various embodiments of the present disclosure may be implemented in hardware, firmware, software or a combination thereof. In the case of implementing the present disclosure in hardware, the present disclosure may be implemented in an application specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a general purpose processor, a controller, a microcontroller, a microprocessor, etc.
[0457] In addition, the image decoding device and the image encoding device to which the embodiments of the present disclosure are applied may be included in a multimedia broadcast transmission and reception device, a mobile communication terminal, a home theater video device, a digital theater video device, a surveillance camera, a video chat device, a real-time communication device such as video communication, a mobile streaming device, a storage medium, a camera, a video on demand (VoD) service provider, an OTT video (over the top video) device, an Internet streaming service provider, a three-dimensional (3D) video device, a video phone video device, a medical video device, etc., and may be used to process a video signal or a data signal. For example, an OTT video device may include a game console, a Blu-ray player, an Internet access TV, a home theater system, a smart phone, a tablet PC, a digital video recorder (DVR), etc.
[0458] Fig.38 is a diagram showing a content streaming system to which an embodiment of the present disclosure can be applied.
[0459] like Fig.38 As shown in , a content streaming system to which the embodiments of the present disclosure are applied may mainly include an encoding server, a streaming server, a network server, a media storage device, a user device, and a multimedia input device.
[0460] The encoding server compresses the content input from a multimedia input device such as a smart phone, camera, or camcorder into digital data to generate a bitstream and sends the bitstream to the streaming server. As another example, when a multimedia input device such as a smart phone, camera, or camcorder directly generates a bitstream, the encoding server can be omitted.
[0461] The bitstream may be generated by the image encoding method or the image encoding device to which the embodiments of the present disclosure are applied, and the streaming server may temporarily store the bitstream in the process of transmitting or receiving the bitstream.
[0462] The streaming server sends multimedia data to the user device based on the user's request through the network server, and the network server is used as a medium to inform the user of the service. When the user requests the required service from the network server, the network server can deliver it to the streaming server, and the streaming server can send the multimedia data to the user. In this case, the content streaming system may include a separate control server. In this case, the control server is used to control the command / response between the devices in the content streaming system.
[0463] The streaming server may receive content from a media storage device and / or an encoding server. For example, when receiving content from an encoding server, the content may be received in real time. In this case, in order to provide a smooth streaming service, the streaming server may store the bitstream within a predetermined time.
[0464] Examples of user devices may include mobile phones, smart phones, laptop computers, digital broadcast terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation devices, slate PCs, tablet PCs, ultrabooks, wearable devices (e.g., smart watches, smart glasses, head-mounted displays), digital televisions, desktop computers, digital signage, etc.
[0465] Each server in the content streaming system may operate as a distributed server, in which case data received from each server may be distributed.
[0466] The scope of the present disclosure includes software or machine-executable commands (e.g., operating systems, applications, firmware, programs, etc.) for enabling operations of methods according to various embodiments to be performed on a device or computer, and non-transitory computer-readable media having such software or commands stored thereon and executable on a device or computer.
[0467] Industrial Applicability
[0468] The embodiments of the present disclosure may be used to encode or decode an image.
Claims
1. An image decoding method performed by an image decoding device, the image decoding method comprising the following steps: Determine whether bidirectional optical flow BDOF or optical flow prediction refinement PROF is applied to the current block; Based on the BDOF or PROF applied to the current block, generating a prediction sample of the current block from a reference image of the current block based on motion information of the current block; as well as deriving a refined prediction sample of the current block by applying BDOF or PROF to the current block based on the generated prediction sample, wherein the step of generating the predicted sample of the current block is performed based on whether a current sub-image including the current block is regarded as an image, wherein the step of generating the predicted sample of the current block is performed based on a position within the reference image used to generate the predicted sample, wherein the position in the reference image is clipped within a predetermined range, Wherein, based on the current sub-image being regarded as the image, the predetermined range is specified by the boundary position of the current sub-image, and wherein, whether the current sub-image is regarded as the image is determined based on flag information notified by a signal through a bitstream.
2. The image decoding method according to claim 1, wherein: The flag information is signaled through a sequence parameter set SPS.
3. An image encoding method performed by an image encoding device, the image encoding method comprising the following steps: Determine whether bidirectional optical flow BDOF or optical flow prediction refinement PROF is applied to the current block; Based on the BDOF or PROF applied to the current block, generating a prediction sample of the current block from a reference image of the current block based on motion information of the current block; as well as deriving a refined prediction sample of the current block by applying BDOF or PROF to the current block based on the generated prediction sample, wherein the step of generating the predicted sample of the current block is performed based on whether a current sub-image including the current block is regarded as an image, wherein the step of generating the predicted sample of the current block is performed based on a position within the reference image used to generate the predicted sample, wherein the position in the reference image is clipped within a predetermined range, Wherein, based on the current sub-image being regarded as the image, the predetermined range is specified by the boundary position of the current sub-image, and wherein, whether the current sub-image is regarded as the image is determined based on flag information notified by a signal through a bitstream.
4. A method of transmitting a bit stream generated by the image encoding method according to claim 3.
Citation Information
Patent Citations
Inter prediction mode-based image processing method and apparatus therefor
CN107925760A
Method and apparatus of motion compensation for video coding based on bi prediction optical flow techniques
CN107925775A
Method and apparatus of candidate skipping for predictor refinement in video coding
CN110169070A
Method and system for detecting, in night environment, danger due to presence of pedestrian, for advanced driver assistance system
WO2016088960A1